Browse Source

- when in Gerber UI is selectd the V-Shape tool, all those parameters (tip dia, dip angle, tool_type = 'V' and cut Z) are transferred to the generated Geometry and prefilled in the Geoemtry UI

Marius Stanciu 6 năm trước cách đây
mục cha
commit
6d3770ee3f
2 tập tin đã thay đổi với 17 bổ sung4 xóa
  1. 16 4
      FlatCAMObj.py
  2. 1 0
      README.md

+ 16 - 4
FlatCAMObj.py

@@ -1146,14 +1146,26 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
                         return 'fail'
                     geo_obj.solid_geometry.append(geom)
 
+                    # transfer the Cut Z and Vtip and VAngle values in case that we use the V-Shape tool in Gerber UI
+                    if self.ui.tool_type_radio.get_value() == 'circular':
+                        new_cutz = self.app.defaults['geometry_cutz']
+                        new_vtipdia = self.app.defaults['geometry_vtipdia']
+                        new_vtipangle = self.app.defaults['geometry_vtipangle']
+                        tool_type = 'C1'
+                    else:
+                        new_cutz = self.ui.cutz_spinner.get_value()
+                        new_vtipdia = self.ui.tipdia_spinner.get_value()
+                        new_vtipangle = self.ui.tipangle_spinner.get_value()
+                        tool_type = 'V'
+
                     # store here the default data for Geometry Data
                     default_data = {}
                     default_data.update({
                         "name": iso_name,
                         "plot": self.app.defaults['geometry_plot'],
-                        "cutz": self.app.defaults['geometry_cutz'],
-                        "vtipdia": self.app.defaults['geometry_vtipdia'],
-                        "vtipangle": self.app.defaults['geometry_vtipangle'],
+                        "cutz": new_cutz,
+                        "vtipdia": new_vtipdia,
+                        "vtipangle": new_vtipangle,
                         "travelz": self.app.defaults['geometry_travelz'],
                         "feedrate": self.app.defaults['geometry_feedrate'],
                         "feedrate_z": self.app.defaults['geometry_feedrate_z'],
@@ -1180,7 +1192,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
                             'offset': 'Path',
                             'offset_value': 0.0,
                             'type': _('Rough'),
-                            'tool_type': 'C1',
+                            'tool_type': tool_type,
                             'data': default_data,
                             'solid_geometry': geo_obj.solid_geometry
                         }

+ 1 - 0
README.md

@@ -14,6 +14,7 @@ CAD program, and create G-Code for Isolation routing.
 
 - fixed the FCSpinner and FCDoubleSpinner GUI elements to select all on first click and deselect on second click in the Spinbox LineEdit
 - for Gerber object in Selected Tab added ability to chose a V-Shape tool and therefore control the isolation better by adjusting the cut width of the isolation in function of the cut depth, tip width of the tool and the tip angle of the tool
+- when in Gerber UI is selectd the V-Shape tool, all those parameters (tip dia, dip angle, tool_type = 'V' and cut Z) are transferred to the generated Geometry and prefilled in the Geoemtry UI
 
 30.09.2019