From c28164f0fda25e05766a4268900301550f409a00 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Wed, 3 Nov 2021 03:52:37 +0100 Subject: [PATCH] lot of inx refactorings - changed menu logic --- .../affine_spirals/affine_spirals.inx | 6 +- .../animate_order/animate_order.inx | 2 +- .../another_perspective.inx | 2 +- .../apollonian_gasket/apollonian_gasket.inx | 6 +- .../apply_transformations.inx | 2 +- .../barrel_distorsion/barrel_distorsion.inx | 2 +- .../bezier_envelope/bezier_envelope.inx | 2 +- extensions/fablabchemnitz/blobs/blobs.inx | 4 +- .../bouwkamp_code/bouwkamp_code.inx | 6 +- .../chain_paths/chain_paths.inx | 2 +- .../chip_scratches/chip_scratches.inx | 4 +- .../circle_tangents/circle_tangents.inx | 2 +- .../cleanup_styles/cleanup_styles.inx | 2 +- .../color_harmony/color_harmony.inx | 2 +- .../colorize_path_lengths.inx | 2 +- .../contour_scanner_and_trimmer.inx | 2 +- .../create_links/create_links.inx | 2 +- .../cutting_optimizer/cutting_optimizer.inx | 2 +- .../destructive_clip/destructive_clip.inx | 28 ++-- .../dimensioning/dimensioning.inx | 2 +- .../duplicate_reverse_join.inx | 6 +- .../fablabchemnitz/eggmazing/eggmazing.inx | 38 +++--- .../ellipse_by_five_points.inx | 2 +- .../epilog_dashboard_bbox_adjust.inx | 2 +- .../exponential_distort.inx | 2 +- .../fillet_and_chamfer/fillet_and_chamfer.inx | 2 +- .../filter_by_length_area.inx | 2 +- .../flash_burst/flash_burst.inx | 12 +- extensions/fablabchemnitz/flip/flip.inx | 2 +- .../frame_animation_sequence.inx | 2 +- .../fablabchemnitz/fret_ruler/fret_ruler.inx | 2 +- .../fablabchemnitz/fun_shapes/fun_shapes.inx | 6 +- extensions/fablabchemnitz/gears/gears.inx | 6 +- extensions/fablabchemnitz/gears2/gears2.inx | 67 +++++----- .../generate_palette/generate_palette.inx | 4 +- .../gradient_saver/gradient_saver.inx | 2 +- .../grey_to_monoalpha/grey_to_monoalpha.inx | 2 +- .../guitar_fretboard/guitar_fretboard.inx | 2 +- .../ids_to_text/ids_to_text.inx | 2 +- .../image_triangulation.inx | 2 +- .../imagetracerjs/imagetracerjs.inx | 2 +- .../fablabchemnitz/incadiff/incadiff.inx | 2 +- .../inset_alignment/inset_alignment.inx | 2 +- .../inventory_sticker/inventory_sticker.inx | 4 +- .../isometric_projection.inx | 2 +- .../jitter_gradients/jitter_gradients.inx | 2 +- .../fablabchemnitz/join_paths/join_paths.inx | 2 +- .../jpeg_export/jpeg_export.inx | 4 +- .../fablabchemnitz/knob_scale/knob_scale.inx | 96 +++++++------- .../label_feature_with_fill_color.inx | 2 +- .../laser_check/laser_check.inx | 30 +++-- .../fablabchemnitz/laser_check/laser_check.py | 98 ++++++++------ .../lasercut_jigsaw/lasercut_jigsaw.inx | 124 +++++++++--------- .../leather_case/leather_case.inx | 4 +- .../line_animator/line_animator.inx | 2 +- .../line_shading/line_shading.inx | 2 +- .../longest_continuous_path.inx | 42 +++--- extensions/fablabchemnitz/maze/maze.inx | 4 +- extensions/fablabchemnitz/mirror/mirror.inx | 2 +- .../move_path_node/move_path_node.inx | 26 ++-- .../mutual_cut_line/mutual_cut_line.inx | 2 +- .../optimize_sequence_lasercut_sequence.inx | 2 +- .../optimize_sequence_travel_distance.inx | 40 +++--- .../fablabchemnitz/output_pro/result-imp.jpeg | Bin 0 -> 12581 bytes .../parallel_translation.inx | 2 +- .../path_intersections/path_intersections.inx | 2 +- .../piano_scale/piano_scale.inx | 2 +- .../fablabchemnitz/pixel2svg/pixel2svg.inx | 2 +- .../pixels2objects/pixels2objects.inx | 2 +- .../fablabchemnitz/primitive/primitive.inx | 2 +- .../printing_marks_dotted.inx | 2 +- .../purge_duplicate_path_nodes.inx | 5 +- .../purge_duplicate_path_segments.inx | 2 +- .../purge_pointy_paths/purge_pointy_paths.inx | 2 +- extensions/fablabchemnitz/ratchet/ratchet.inx | 6 +- extensions/fablabchemnitz/raytracing/lens.inx | 4 +- .../fablabchemnitz/raytracing/meta.json | 2 +- .../fablabchemnitz/raytracing/render.inx | 4 +- .../raytracing/set_material.inx | 4 +- .../remove_duplicate_guides.inx | 26 ++-- .../remove_duplicate_lines.inx | 5 +- .../remove_empty_groups.inx | 2 +- .../render_silhouette_regmarks.inx | 3 +- .../replace_color_and_alpha.inx | 6 +- .../reverse_order_of_subpaths.inx | 6 +- .../rotations/rotations_find_all_optimal.inx | 2 +- .../rotations_minimum_bounding_box_area.inx | 2 +- .../rotations/rotations_minimum_width.inx | 2 +- .../round_corners/round_corners.inx | 2 +- .../scale_to_path_length.inx | 2 +- .../scale_to_real/scale_to_real.inx | 2 +- .../scale_to_size/scale_to_size.inx | 2 +- .../set_view_box/set_view_box.inx | 2 +- .../shape_recognition/shape_recognition.inx | 2 +- .../sheet_metal_conus/sheet_metal_conus.inx | 6 +- .../simple_registration.inx | 2 +- .../slider_electrodes/slider_electrodes.inx | 4 +- .../split_and_break_bezier_at_t.inx | 2 +- .../split_bezier/split_bezier.inx | 2 +- .../fablabchemnitz/sprocket/sprocket.inx | 6 +- .../fablabchemnitz/starshine/starshine.inx | 10 +- extensions/fablabchemnitz/streaks/streaks.inx | 6 +- .../stroke_color_as_fill.inx | 2 +- extensions/fablabchemnitz/sudoku/sudoku.inx | 4 +- .../sundial_declining/sundial_declining.inx | 2 +- .../fablabchemnitz/svg2shenzhen/meta.json | 2 +- .../svg2shenzhen/svg2shenzhen_export.inx | 4 +- .../svg2shenzhen/svg2shenzhen_prepare.inx | 4 +- .../svg_embed_and_crop/svg_embed_and_crop.inx | 22 ++-- .../vektorkollektor/vektorkollektor.inx | 4 +- .../vertical_horizontal_scale.inx | 4 +- .../fablabchemnitz/zoetrope/zoetrope.inx | 4 +- 112 files changed, 484 insertions(+), 458 deletions(-) create mode 100644 extensions/fablabchemnitz/output_pro/result-imp.jpeg diff --git a/extensions/fablabchemnitz/affine_spirals/affine_spirals.inx b/extensions/fablabchemnitz/affine_spirals/affine_spirals.inx index bbadf929..83251f25 100644 --- a/extensions/fablabchemnitz/affine_spirals/affine_spirals.inx +++ b/extensions/fablabchemnitz/affine_spirals/affine_spirals.inx @@ -13,9 +13,9 @@ all - - - + + + + Destructive Clip + fablabchemnitz.de.destructive_clip + + path + + + + + + "Destructively" clip selected paths using the topmost as clipping path + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/dimensioning/dimensioning.inx b/extensions/fablabchemnitz/dimensioning/dimensioning.inx index 30907710..d454db1a 100644 --- a/extensions/fablabchemnitz/dimensioning/dimensioning.inx +++ b/extensions/fablabchemnitz/dimensioning/dimensioning.inx @@ -48,7 +48,7 @@ path - + diff --git a/extensions/fablabchemnitz/duplicate_reverse_join/duplicate_reverse_join.inx b/extensions/fablabchemnitz/duplicate_reverse_join/duplicate_reverse_join.inx index 8041d973..77129231 100644 --- a/extensions/fablabchemnitz/duplicate_reverse_join/duplicate_reverse_join.inx +++ b/extensions/fablabchemnitz/duplicate_reverse_join/duplicate_reverse_join.inx @@ -5,9 +5,9 @@ path - - - + + + + Eggmazing + fablabchemnitz.de.eggmazing + + + + + + + + all + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/ellipse_by_five_points/ellipse_by_five_points.inx b/extensions/fablabchemnitz/ellipse_by_five_points/ellipse_by_five_points.inx index 2841e7db..4fce39ad 100644 --- a/extensions/fablabchemnitz/ellipse_by_five_points/ellipse_by_five_points.inx +++ b/extensions/fablabchemnitz/ellipse_by_five_points/ellipse_by_five_points.inx @@ -6,7 +6,7 @@ path - + diff --git a/extensions/fablabchemnitz/epilog_dashboard_bbox_adjust/epilog_dashboard_bbox_adjust.inx b/extensions/fablabchemnitz/epilog_dashboard_bbox_adjust/epilog_dashboard_bbox_adjust.inx index f23f53ef..f94e4e08 100644 --- a/extensions/fablabchemnitz/epilog_dashboard_bbox_adjust/epilog_dashboard_bbox_adjust.inx +++ b/extensions/fablabchemnitz/epilog_dashboard_bbox_adjust/epilog_dashboard_bbox_adjust.inx @@ -53,7 +53,7 @@ all - + Widen the document to send all lines properly to Epilog Dashboard diff --git a/extensions/fablabchemnitz/exponential_distort/exponential_distort.inx b/extensions/fablabchemnitz/exponential_distort/exponential_distort.inx index e5be65c3..e3e46a13 100644 --- a/extensions/fablabchemnitz/exponential_distort/exponential_distort.inx +++ b/extensions/fablabchemnitz/exponential_distort/exponential_distort.inx @@ -9,7 +9,7 @@ all - + diff --git a/extensions/fablabchemnitz/fillet_and_chamfer/fillet_and_chamfer.inx b/extensions/fablabchemnitz/fillet_and_chamfer/fillet_and_chamfer.inx index 80ca435c..78bb5435 100644 --- a/extensions/fablabchemnitz/fillet_and_chamfer/fillet_and_chamfer.inx +++ b/extensions/fablabchemnitz/fillet_and_chamfer/fillet_and_chamfer.inx @@ -18,7 +18,7 @@ all - + diff --git a/extensions/fablabchemnitz/filter_by_length_area/filter_by_length_area.inx b/extensions/fablabchemnitz/filter_by_length_area/filter_by_length_area.inx index e0031021..246b9037 100644 --- a/extensions/fablabchemnitz/filter_by_length_area/filter_by_length_area.inx +++ b/extensions/fablabchemnitz/filter_by_length_area/filter_by_length_area.inx @@ -32,7 +32,7 @@ all - + diff --git a/extensions/fablabchemnitz/flash_burst/flash_burst.inx b/extensions/fablabchemnitz/flash_burst/flash_burst.inx index 41945ce6..161fca2a 100644 --- a/extensions/fablabchemnitz/flash_burst/flash_burst.inx +++ b/extensions/fablabchemnitz/flash_burst/flash_burst.inx @@ -4,21 +4,21 @@ fablabchemnitz.de.flash_burst 10 10 - + 350 350 - + 5 10 - + 3 5 all - - - + + + - + + + + all + + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/generate_palette/generate_palette.inx b/extensions/fablabchemnitz/generate_palette/generate_palette.inx index 78519e95..137635de 100644 --- a/extensions/fablabchemnitz/generate_palette/generate_palette.inx +++ b/extensions/fablabchemnitz/generate_palette/generate_palette.inx @@ -31,7 +31,9 @@ all - + + + + Knob Scale + fablabchemnitz.de.knob_scale + + + 0 + 0 + 100 + 300 + 1 + true + false + false + + + + + + + 2 + 10 + 1 + 5 + + + + + + + + false + 0 + 10 + 20 + 0 + 10 + + + + all + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/label_feature_with_fill_color/label_feature_with_fill_color.inx b/extensions/fablabchemnitz/label_feature_with_fill_color/label_feature_with_fill_color.inx index 9ab25796..4bc70aac 100644 --- a/extensions/fablabchemnitz/label_feature_with_fill_color/label_feature_with_fill_color.inx +++ b/extensions/fablabchemnitz/label_feature_with_fill_color/label_feature_with_fill_color.inx @@ -6,7 +6,7 @@ all - + diff --git a/extensions/fablabchemnitz/laser_check/laser_check.inx b/extensions/fablabchemnitz/laser_check/laser_check.inx index f55d5d2d..49039fe2 100644 --- a/extensions/fablabchemnitz/laser_check/laser_check.inx +++ b/extensions/fablabchemnitz/laser_check/laser_check.inx @@ -3,20 +3,9 @@ Laser Check fablabchemnitz.de.laser_check - - + false - - - - - - - - - 100 - @@ -61,6 +50,21 @@ + + + + + + + + + + 500 + 150 + 0.60 + 2.0 + 12.0 + @@ -92,7 +96,7 @@ all - + diff --git a/extensions/fablabchemnitz/laser_check/laser_check.py b/extensions/fablabchemnitz/laser_check/laser_check.py index dcb6b7de..411a610b 100644 --- a/extensions/fablabchemnitz/laser_check/laser_check.py +++ b/extensions/fablabchemnitz/laser_check/laser_check.py @@ -5,25 +5,34 @@ from inkex.bezier import csplength, csparea from lxml import etree import re import math +import datetime class LaserCheck(inkex.EffectExtension): ''' ToDos: - check for old styles which should be upgraded + - self-intersecting paths + - number of parts to weed in total; number of parts which are smaller than vector grid - add some inkex.Desc to all elements which were checked and which have some issue. use special syntax to remove old stuff each time the check is applied again - this code is horrible ugly stuff ''' def add_arguments(self, pars): pars.add_argument('--tab') + + pars.add_argument('--machine_size', default="812x508") + pars.add_argument('--max_cutting_speed', type=float, default=500) + pars.add_argument('--max_travel_speed', type=float, default=150) + pars.add_argument('--cut_travel_factor', type=float, default=0.60) + pars.add_argument('--price_per_minute_gross', type=float, default=2.0) + pars.add_argument('--vector_grid_xy', type=float, default=12.0) #TODO + pars.add_argument('--show_issues_only', type=inkex.Boolean, default=False) pars.add_argument('--checks', default="check_all") - pars.add_argument('--max_cutting_speed', type=float, default=100) pars.add_argument('--bbox', type=inkex.Boolean, default=False) pars.add_argument('--bbox_offset', type=float, default=5.000) pars.add_argument('--cutting_estimation', type=inkex.Boolean, default=False) - pars.add_argument('--machine_size', default="812x508") pars.add_argument('--elements_outside_canvas', type=inkex.Boolean, default=False) pars.add_argument('--groups_and_layers', type=inkex.Boolean, default=False) pars.add_argument('--clones', type=inkex.Boolean, default=False) @@ -50,7 +59,10 @@ class LaserCheck(inkex.EffectExtension): def effect(self): so = self.options + machineWidth = self.svg.unittouu(so.machine_size.split('x')[0] + "mm") + machineHeight = self.svg.unittouu(so.machine_size.split('x')[1] + "mm") selected = [] #total list of elements to parse + def parseChildren(element): if element not in selected: @@ -92,7 +104,7 @@ class LaserCheck(inkex.EffectExtension): nonShapes.append(element) else: shapes.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} shape elements in total".format(len(shapes))) inkex.utils.debug("{} non-shape elements in total".format(len(nonShapes))) for nonShape in nonShapes: @@ -144,38 +156,35 @@ class LaserCheck(inkex.EffectExtension): bb_width = round(bbox.width, 3) bb_height = round(bbox.height, 3) if bb_left >= fmm: - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("left border... ok") else: inkex.utils.debug("left border... fail: {:0.3f} mm".format(self.svg.uutounit(bb_left, "mm"))) if bb_top >= fmm: - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("top border... ok") else: inkex.utils.debug("top border... fail: {:0.3f} mm".format(self.svg.uutounit(bb_top, "mm"))) if bb_right + fmm <= page_width: - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("right border... ok") else: inkex.utils.debug("right border... fail: {:0.3f} mm".format(self.svg.uutounit(bb_right, "mm"))) if bb_bottom + fmm <= width_height: - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("bottom border... ok") else: inkex.utils.debug("bottom border... fail: {:0.3f} mm".format(self.svg.uutounit(bb_bottom, "mm"))) - - machineWidth = self.svg.unittouu(self.options.machine_size.split('x')[0] + "mm") if bb_width <= machineWidth: - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("page width... ok") else: inkex.utils.debug("page width... fail: {:0.3f} mm".format(bb_width)) - machineHeight = self.svg.unittouu(self.options.machine_size.split('x')[1] + "mm") if bb_height <= machineHeight: - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("page height... ok") else: inkex.utils.debug("page height... fail: {:0.3f} mm".format(bb_height)) @@ -192,7 +201,7 @@ class LaserCheck(inkex.EffectExtension): for child in element: maxDepth(child, level + 1) maxDepth(self.document.getroot(), -1) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("Maximum group depth={}".format(md - 1)) if md - 1 > 2: self.msg("Warning: this group depth might cause issues!") @@ -204,7 +213,7 @@ class LaserCheck(inkex.EffectExtension): layers.append(element) else: groups.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} groups in total".format(len(groups))) inkex.utils.debug("{} layers in total".format(len(layers))) @@ -227,7 +236,7 @@ class LaserCheck(inkex.EffectExtension): for element in selected: if element.tag == inkex.addNS('use','svg'): uses.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} svg:use clones in total".format(len(uses))) for use in uses: inkex.utils.debug("id={}".format(use.get('id'))) @@ -243,7 +252,7 @@ class LaserCheck(inkex.EffectExtension): for element in selected: if element.tag == inkex.addNS('clipPath','svg'): clipPaths.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} svg:clipPath in total".format(len(clipPaths))) for clipPath in clipPaths: inkex.utils.debug("id={}".format(clipPath.get('id'))) @@ -259,7 +268,7 @@ class LaserCheck(inkex.EffectExtension): for element in selected: if element.tag == inkex.addNS('image','svg'): images.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} svg:image in total".format(len(images))) for image in images: inkex.utils.debug("image id={}".format(image.get('id'))) @@ -274,7 +283,7 @@ class LaserCheck(inkex.EffectExtension): for element in selected: if element.tag in (inkex.addNS('line','svg'), inkex.addNS('polyline','svg'), inkex.addNS('polygon','svg')): lowlevels.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} low level strokes in total".format(len(lowlevels))) for lowlevel in lowlevels: inkex.utils.debug("id={}".format(lowlevel.get('id'))) @@ -291,7 +300,7 @@ class LaserCheck(inkex.EffectExtension): for element in selected: if element.tag == inkex.addNS('text','svg'): texts.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} svg:text in total".format(len(texts))) for text in texts: inkex.utils.debug("id={}".format(text.get('id'))) @@ -313,7 +322,7 @@ class LaserCheck(inkex.EffectExtension): strokeColor = stroke[0].split("stroke:")[1].split(";")[0] if strokeColor not in strokeColors: strokeColors.append(strokeColor) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} different stroke colors in total".format(len(strokeColors))) if len(strokeColors) > so.stroke_colors_max: for strokeColor in strokeColors: @@ -335,7 +344,7 @@ class LaserCheck(inkex.EffectExtension): strokeWidth = stroke_width[0].split("stroke-width:")[1].split(";")[0] #possibly w/o units. could contain units from css if strokeWidth not in strokeWidths: strokeWidths.append(strokeWidth) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} different stroke widths in total".format(len(strokeWidths))) if len(strokeWidths) > so.stroke_widths_max: for strokeWidth in strokeWidths: @@ -362,7 +371,7 @@ class LaserCheck(inkex.EffectExtension): strokeDasharray = stroke_dasharray[0].split("stroke-dasharray:")[1].split(";")[0] if strokeDasharray not in strokeDasharrays: strokeDasharrays.append(strokeDasharray) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} different stroke dash arrays in total".format(len(strokeDasharrays))) for strokeDasharray in strokeDasharrays: inkex.utils.debug("stroke dash array {}".format(strokeDasharray)) @@ -432,7 +441,7 @@ class LaserCheck(inkex.EffectExtension): if (strokeVis == 0 or widthVis == 0 or strokeOpacityVis == 0) and (fillVis == 0 or fillOpacityVis == 0): if element not in invisibles: invisibles.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} invisible shapes in total".format(len(invisibles))) for invisible in invisibles: inkex.utils.debug("id={}".format(invisible.get('id'))) @@ -453,7 +462,7 @@ class LaserCheck(inkex.EffectExtension): if float(stroke_opacity[0].split("stroke-opacity:")[1].split(";")[0]) < 1.0: if element not in transparencies: transparencies.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} objects with stroke transparencies < 1.0 in total".format(len(transparencies))) for transparency in transparencies: inkex.utils.debug("id={}".format(transparency.get('id'))) @@ -474,7 +483,7 @@ class LaserCheck(inkex.EffectExtension): (len(commandsCoords) == 2 and commandsCoords[-1][0] == 'Z') or \ (len(commandsCoords) == 3 and commandsCoords[0][1] == commandsCoords[1][1] and commandsCoords[2][1] == 'Z'): pointyPaths.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} pointy paths in total".format(len(pointyPaths))) for pointyPath in pointyPaths: inkex.utils.debug("id={}".format(pointyPath.get('id'))) @@ -491,7 +500,7 @@ class LaserCheck(inkex.EffectExtension): for element in shapes: if element.get('transform') is not None: transformations.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} transformation in total".format(len(transformations))) for transformation in transformations: inkex.utils.debug("transformation in id={}".format(transformation.get('id'))) @@ -512,7 +521,7 @@ class LaserCheck(inkex.EffectExtension): if stotal < self.svg.unittouu(str(so.short_paths_min) + "mm"): shortPaths.append([element, stotal]) totalDropLength += stotal - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} short paths in total".format(len(shortPaths))) if totalDropLength > 0: inkex.utils.debug("{:0.2f}% of total ({:0.2f} mm /{:0.2f} mm)".format(totalDropLength / totalLength, self.svg.uutounit(str(totalDropLength), "mm"), self.svg.uutounit(str(totalLength), "mm"))) @@ -525,18 +534,27 @@ class LaserCheck(inkex.EffectExtension): ''' if so.checks == "check_all" or so.cutting_estimation is True: inkex.utils.debug("\n---------- Cutting time estimation") - totalLength = 0 + totalCuttingLength = 0 for element in shapes: if isinstance(element, inkex.PathElement): slengths, stotal = csplength(element.path.transform(element.composed_transform()).to_superpath()) - totalLength += stotal - inkex.utils.debug("cutting length (mm) = {:0.2f} mm".format(self.svg.uutounit(str(totalLength), "mm"), self.svg.uutounit(str(totalLength), "mm"))) - for f in range(100, 0, -10): - v = so.max_cutting_speed * f/100.0 - tsec = totalLength / v - tmin = tsec / 60 - inkex.utils.debug("cutting time @{:0.0f}% (={}mm/s): {:0.2f}min (={:0.1f}s)".format(f, v, tmin, tsec)) - + totalCuttingLength += stotal + extraTraveLength = (machineWidth / 3 + machineHeight / 3) * 2.0 #from top-left to the ~1/3 of the bed and back again + totalTravelLength = totalCuttingLength * (1.0 - so.cut_travel_factor) + extraTraveLength + totalLength = totalCuttingLength + totalTravelLength + inkex.utils.debug("(measured) cutting length (mm) = {:0.2f} mm".format(self.svg.uutounit(str(totalCuttingLength), "mm"), self.svg.uutounit(str(totalCuttingLength), "mm"))) + inkex.utils.debug("(estimated) travel length (mm) = {:0.2f} mm".format(self.svg.uutounit(str(totalTravelLength), "mm"), self.svg.uutounit(str(totalTravelLength), "mm"))) + inkex.utils.debug("(estimated) total length (mm) = {:0.2f} mm".format(self.svg.uutounit(str(totalLength), "mm"), self.svg.uutounit(str(totalLength), "mm"))) + for speedFactor in [100,90,80,70,60,50,40,30,20,10,5]: + v_cut = so.max_cutting_speed * speedFactor/100.0 + v_travel = so.max_travel_speed #this is always at maximum + tsec_cut = self.svg.uutounit(str(totalCuttingLength)) / v_cut + tsec_travel = self.svg.uutounit(str(totalTravelLength)) / v_travel + tsec_total = tsec_cut + tsec_travel + minutes, seconds = divmod(tsec_total, 60) # split the seconds to minutes and seconds + partial_minutes = round(seconds/60 * 2) / 2 + inkex.utils.debug("@{:03.0f}% (cut={:06.2f}mm/s | travel={:06.2f}mm/s) > {:03.0f}min {:02.0f}sec | cost={:02.0f}€".format(speedFactor, v_cut, v_travel, minutes, seconds, so.price_per_minute_gross * (minutes + partial_minutes))) + ''' Paths with a high amount of nodes will cause issues because each node means slowing down/speeding up the laser mechanics @@ -550,7 +568,7 @@ class LaserCheck(inkex.EffectExtension): nodes = len(element.path) if nodes / stotal > so.nodes_per_path_max / self.svg.unittouu(str(so.nodes_per_path_interval) + "mm"): heavyPaths.append([element, nodes, stotal]) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} Heavy node-loaded paths in total".format(len(heavyPaths))) for heavyPath in heavyPaths: inkex.utils.debug("id={}, nodes={}, length={}mm, density={}nodes/mm".format( @@ -562,7 +580,7 @@ class LaserCheck(inkex.EffectExtension): ) ''' - Elements outside canvas or touching the border. These are critical because they won't be lasered + Elements outside canvas or touching the border. These are critical because they won't be lasered or not correctly lasered ''' if so.checks == "check_all" or so.elements_outside_canvas is True: inkex.utils.debug("\n---------- Elements outside canvas or touching the border") @@ -600,7 +618,7 @@ class LaserCheck(inkex.EffectExtension): bottomOutside = True if rightOutside is True or leftOutside is True or topOutside is True or bottomOutside is True: elementsOutside.append([element, "partially outside"]) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} Elements outside canvas or touching the border in total".format(len(elementsOutside))) for elementOutside in elementsOutside: inkex.utils.debug("id={}, status={}".format( @@ -620,7 +638,7 @@ class LaserCheck(inkex.EffectExtension): for element in shapes: if not isinstance(element, inkex.PathElement) and not isinstance(element, inkex.Group): nonPathShapes.append(element) - if self.options.show_issues_only is False: + if so.show_issues_only is False: inkex.utils.debug("{} non-path shapes in total".format(len(nonPathShapes))) for nonPathShape in nonPathShapes: inkex.utils.debug("id={}".format(nonPathShape.get('id'))) diff --git a/extensions/fablabchemnitz/lasercut_jigsaw/lasercut_jigsaw.inx b/extensions/fablabchemnitz/lasercut_jigsaw/lasercut_jigsaw.inx index cf15e8a4..fbb81d17 100644 --- a/extensions/fablabchemnitz/lasercut_jigsaw/lasercut_jigsaw.inx +++ b/extensions/fablabchemnitz/lasercut_jigsaw/lasercut_jigsaw.inx @@ -1,53 +1,53 @@ - Lasercut Jigsaw - fablabchemnitz.de.lasercut_jigsaw - - - - 4278190335 - 65535 - - - - - - - - 100.0 - 80.0 - 5.0 - - - - - - - - false - 20.0 - 5.0 - - - - - - 5 - 4 - - - - 0.5 - 0.4 - false - 10 - true - 12345 - false - 0 - - - + + + + all + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/leather_case/leather_case.inx b/extensions/fablabchemnitz/leather_case/leather_case.inx index 7b8458c2..4736d1e9 100644 --- a/extensions/fablabchemnitz/leather_case/leather_case.inx +++ b/extensions/fablabchemnitz/leather_case/leather_case.inx @@ -20,8 +20,8 @@ all - - + + diff --git a/extensions/fablabchemnitz/line_animator/line_animator.inx b/extensions/fablabchemnitz/line_animator/line_animator.inx index f3e50594..637d3536 100644 --- a/extensions/fablabchemnitz/line_animator/line_animator.inx +++ b/extensions/fablabchemnitz/line_animator/line_animator.inx @@ -37,7 +37,7 @@ path - + diff --git a/extensions/fablabchemnitz/line_shading/line_shading.inx b/extensions/fablabchemnitz/line_shading/line_shading.inx index c863aa34..0dac1c51 100644 --- a/extensions/fablabchemnitz/line_shading/line_shading.inx +++ b/extensions/fablabchemnitz/line_shading/line_shading.inx @@ -33,7 +33,7 @@ all - + diff --git a/extensions/fablabchemnitz/longest_continuous_path/longest_continuous_path.inx b/extensions/fablabchemnitz/longest_continuous_path/longest_continuous_path.inx index a427e7c9..c70b06e1 100644 --- a/extensions/fablabchemnitz/longest_continuous_path/longest_continuous_path.inx +++ b/extensions/fablabchemnitz/longest_continuous_path/longest_continuous_path.inx @@ -1,24 +1,24 @@ - Longest Continuous Path - fablabchemnitz.de.optimize_path - 0.10 - - - - - - false - false - - path - - - - - - - + Longest Continuous Path + fablabchemnitz.de.optimize_path + 0.10 + + + + + + false + false + + path + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/maze/maze.inx b/extensions/fablabchemnitz/maze/maze.inx index 2ece6107..188fe786 100644 --- a/extensions/fablabchemnitz/maze/maze.inx +++ b/extensions/fablabchemnitz/maze/maze.inx @@ -23,8 +23,8 @@ path - - + + diff --git a/extensions/fablabchemnitz/mirror/mirror.inx b/extensions/fablabchemnitz/mirror/mirror.inx index 50e2d689..4c7ec190 100644 --- a/extensions/fablabchemnitz/mirror/mirror.inx +++ b/extensions/fablabchemnitz/mirror/mirror.inx @@ -6,7 +6,7 @@ path - + diff --git a/extensions/fablabchemnitz/move_path_node/move_path_node.inx b/extensions/fablabchemnitz/move_path_node/move_path_node.inx index a51f371f..bb278821 100644 --- a/extensions/fablabchemnitz/move_path_node/move_path_node.inx +++ b/extensions/fablabchemnitz/move_path_node/move_path_node.inx @@ -4,28 +4,28 @@ fablabchemnitz.de.move_path_node - true + true 0 false 10px 10px false - - + + - + - + - + @@ -33,21 +33,21 @@ - + - + ../000_about_fablabchemnitz.svg path - - - - - + + + + + + + + + + + + + false + + + all + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/output_pro/result-imp.jpeg b/extensions/fablabchemnitz/output_pro/result-imp.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..63415c9c675a8fb8c22b78132a434f7a17e79679 GIT binary patch literal 12581 zcmeIuze)o^5XbS^%YmYC**!1eIJ62vx*#cXihp9%pn{@Rnt+hIa5kcL+KDgXt62CD z{%I_&e1-MSDwxX7;ycqU!;hWe<6hi{n4|t-UzGBsQM9-((L34IXe^l&<+*p+6*FJe z)j6XVbYRV5)QqEgJz8z7EH~HNn;UEGq|-eZo^+U@@#NE$}jS*~=WL z)AAE#gCMF!tvGI_y`-1^x!jY4v;LCz=_@OqRTZmzEAClp#r5T_6E#zeL-TuDhQq1s z&(uz5-$eVWSX8mT$hJH_+)pgvi2wo!Abpath - + diff --git a/extensions/fablabchemnitz/path_intersections/path_intersections.inx b/extensions/fablabchemnitz/path_intersections/path_intersections.inx index d9b28bbe..387cafa3 100644 --- a/extensions/fablabchemnitz/path_intersections/path_intersections.inx +++ b/extensions/fablabchemnitz/path_intersections/path_intersections.inx @@ -8,7 +8,7 @@ all - + diff --git a/extensions/fablabchemnitz/piano_scale/piano_scale.inx b/extensions/fablabchemnitz/piano_scale/piano_scale.inx index 0d699e6d..931abbc0 100644 --- a/extensions/fablabchemnitz/piano_scale/piano_scale.inx +++ b/extensions/fablabchemnitz/piano_scale/piano_scale.inx @@ -36,7 +36,7 @@ all - + diff --git a/extensions/fablabchemnitz/pixel2svg/pixel2svg.inx b/extensions/fablabchemnitz/pixel2svg/pixel2svg.inx index 8d750108..d662ea3e 100644 --- a/extensions/fablabchemnitz/pixel2svg/pixel2svg.inx +++ b/extensions/fablabchemnitz/pixel2svg/pixel2svg.inx @@ -34,7 +34,7 @@ http://florian-berger.de/en/software/pixel2svg all - + diff --git a/extensions/fablabchemnitz/pixels2objects/pixels2objects.inx b/extensions/fablabchemnitz/pixels2objects/pixels2objects.inx index 61a1c461..cdc25c76 100644 --- a/extensions/fablabchemnitz/pixels2objects/pixels2objects.inx +++ b/extensions/fablabchemnitz/pixels2objects/pixels2objects.inx @@ -30,7 +30,7 @@ or deterministically. all - + diff --git a/extensions/fablabchemnitz/primitive/primitive.inx b/extensions/fablabchemnitz/primitive/primitive.inx index f6f8bcc8..c8711843 100644 --- a/extensions/fablabchemnitz/primitive/primitive.inx +++ b/extensions/fablabchemnitz/primitive/primitive.inx @@ -62,7 +62,7 @@ all - + diff --git a/extensions/fablabchemnitz/printing_marks_dotted/printing_marks_dotted.inx b/extensions/fablabchemnitz/printing_marks_dotted/printing_marks_dotted.inx index e91aa098..4223c772 100644 --- a/extensions/fablabchemnitz/printing_marks_dotted/printing_marks_dotted.inx +++ b/extensions/fablabchemnitz/printing_marks_dotted/printing_marks_dotted.inx @@ -36,7 +36,7 @@ all - + diff --git a/extensions/fablabchemnitz/purge_duplicate_path_nodes/purge_duplicate_path_nodes.inx b/extensions/fablabchemnitz/purge_duplicate_path_nodes/purge_duplicate_path_nodes.inx index 458090f4..0d2f3ce2 100644 --- a/extensions/fablabchemnitz/purge_duplicate_path_nodes/purge_duplicate_path_nodes.inx +++ b/extensions/fablabchemnitz/purge_duplicate_path_nodes/purge_duplicate_path_nodes.inx @@ -27,15 +27,14 @@ To join paths, make sure that the paths to consider are already combined (subpat To combine paths, select them and press Ctrl+K. For more information: -https://gitlab.com/EllenWasbo/inkscape-extension-removeduplicatenodes - +https://gitlab.com/EllenWasbo/inkscape-extension-removeduplicatenodes path - + diff --git a/extensions/fablabchemnitz/purge_duplicate_path_segments/purge_duplicate_path_segments.inx b/extensions/fablabchemnitz/purge_duplicate_path_segments/purge_duplicate_path_segments.inx index c1a8eed1..4f6d167a 100644 --- a/extensions/fablabchemnitz/purge_duplicate_path_segments/purge_duplicate_path_segments.inx +++ b/extensions/fablabchemnitz/purge_duplicate_path_segments/purge_duplicate_path_segments.inx @@ -6,7 +6,7 @@ path - + diff --git a/extensions/fablabchemnitz/purge_pointy_paths/purge_pointy_paths.inx b/extensions/fablabchemnitz/purge_pointy_paths/purge_pointy_paths.inx index 66f529eb..dd6c3996 100644 --- a/extensions/fablabchemnitz/purge_pointy_paths/purge_pointy_paths.inx +++ b/extensions/fablabchemnitz/purge_pointy_paths/purge_pointy_paths.inx @@ -6,7 +6,7 @@ path - + diff --git a/extensions/fablabchemnitz/ratchet/ratchet.inx b/extensions/fablabchemnitz/ratchet/ratchet.inx index 9ec3e615..c8ed24cd 100644 --- a/extensions/fablabchemnitz/ratchet/ratchet.inx +++ b/extensions/fablabchemnitz/ratchet/ratchet.inx @@ -44,9 +44,9 @@ path - - - + + + + Remove Duplicate Guides + fablabchemnitz.remove_duplicate_guides + + all + + + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/remove_duplicate_lines/remove_duplicate_lines.inx b/extensions/fablabchemnitz/remove_duplicate_lines/remove_duplicate_lines.inx index 2b86b73b..80ed255b 100644 --- a/extensions/fablabchemnitz/remove_duplicate_lines/remove_duplicate_lines.inx +++ b/extensions/fablabchemnitz/remove_duplicate_lines/remove_duplicate_lines.inx @@ -17,15 +17,14 @@ Remove duplicate line segments (with exact same coordinates) will always be performed. For more information: -https://gitlab.com/EllenWasbo/inkscape-extension-removeduplicatelines - +https://gitlab.com/EllenWasbo/inkscape-extension-removeduplicatelines all - + diff --git a/extensions/fablabchemnitz/remove_empty_groups/remove_empty_groups.inx b/extensions/fablabchemnitz/remove_empty_groups/remove_empty_groups.inx index 82e1e250..15dd8f16 100644 --- a/extensions/fablabchemnitz/remove_empty_groups/remove_empty_groups.inx +++ b/extensions/fablabchemnitz/remove_empty_groups/remove_empty_groups.inx @@ -6,7 +6,7 @@ path - + diff --git a/extensions/fablabchemnitz/render_silhouette_regmarks/render_silhouette_regmarks.inx b/extensions/fablabchemnitz/render_silhouette_regmarks/render_silhouette_regmarks.inx index f4d52efa..d6a7fa54 100644 --- a/extensions/fablabchemnitz/render_silhouette_regmarks/render_silhouette_regmarks.inx +++ b/extensions/fablabchemnitz/render_silhouette_regmarks/render_silhouette_regmarks.inx @@ -11,7 +11,8 @@ all - + + + + + \ No newline at end of file diff --git a/extensions/fablabchemnitz/vektorkollektor/vektorkollektor.inx b/extensions/fablabchemnitz/vektorkollektor/vektorkollektor.inx index 1285355e..293ef11d 100644 --- a/extensions/fablabchemnitz/vektorkollektor/vektorkollektor.inx +++ b/extensions/fablabchemnitz/vektorkollektor/vektorkollektor.inx @@ -53,7 +53,9 @@ all - + + +