Commit 99cd60ab authored by sumpfralle's avatar sumpfralle

add the tool diameter offset for toolpath cropping only for polygons derived...

add the tool diameter offset for toolpath cropping only for polygons derived from a 3D model (not for existing 2D models)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@921 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 9b5a670d
......@@ -4301,7 +4301,7 @@ Usually you will want to use the cutter radius here to cut around the outline.</
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Crop the selected toolpath to the current 2D model (or alternatively the 2D projection of the current 3D model) with a positive offset of the tool diameter. </property>
<property name="tooltip_text" translatable="yes">Crop the selected toolpath to the current 2D model (or alternatively the 2D projection of the current 3D model). A positive offset of the tool diameter is added to the outline polygons in case of using a contour derived from a 3D model.</property>
<property name="image">CropToolpath</property>
<property name="xalign">0</property>
</object>
......
......@@ -3114,15 +3114,15 @@ class ProjectGui:
plane = self._get_projection_plane()
self.update_progress_bar("Calculating the 2D projection")
contour = self.model.get_waterline_contour(plane)
self.update_progress_bar("Applying the tool diameter offset")
contour = contour.get_offset_model(
2 * tp.get_tool_settings()["tool_radius"])
else:
log.warn(("The current model (%s) does not support " \
+ "projections") % str(type(self.model)))
return
self.update_progress_bar("Applying the tool diameter offset")
offset_model = contour.get_offset_model(
2 * tp.get_tool_settings()["tool_radius"])
self.update_progress_bar("Cropping the toolpath")
tp.crop(offset_model.get_polygons(), callback=self.update_progress_bar)
tp.crop(contour.get_polygons(), callback=self.update_progress_bar)
def update_toolpath_table(self, new_index=None, skip_model_update=False):
def get_time_string(minutes):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment