Path: Fix paths through model
All cut patterns except Offset were cutting through model.
This commit is contained in:
@@ -91,12 +91,11 @@ class PathGeometryGenerator:
|
||||
|
||||
if shape.BoundBox.ZMin != 0.0:
|
||||
shape.translate(FreeCAD.Vector(0.0, 0.0, 0.0 - shape.BoundBox.ZMin))
|
||||
if shape.BoundBox.ZLength == 0.0:
|
||||
self.shape = shape
|
||||
else:
|
||||
if shape.BoundBox.ZLength > 1.0e-8:
|
||||
FreeCAD.Console.PrintWarning('Shape appears to not be horizontal planar. ZMax is {}.\n'.format(shape.BoundBox.ZMax))
|
||||
|
||||
self._prepareConstants()
|
||||
else:
|
||||
self.shape = shape
|
||||
self._prepareConstants()
|
||||
|
||||
def _prepareConstants(self):
|
||||
# Apply drop cutter extra offset and set the max and min XY area of the operation
|
||||
|
||||
@@ -1281,14 +1281,17 @@ class ObjectWaterline(PathOp.ObjectOp):
|
||||
|
||||
if cont:
|
||||
# Identify solid areas in the offset data
|
||||
ofstSolidFacesList = self._getSolidAreasFromPlanarFaces(ofstArea)
|
||||
if ofstSolidFacesList:
|
||||
clearArea = Part.makeCompound(ofstSolidFacesList)
|
||||
self.showDebugObject(clearArea, 'ClearArea_{}'.format(caCnt))
|
||||
if obj.CutPattern == 'Offset' or obj.CutPattern == 'None':
|
||||
ofstSolidFacesList = self._getSolidAreasFromPlanarFaces(ofstArea)
|
||||
if ofstSolidFacesList:
|
||||
clearArea = Part.makeCompound(ofstSolidFacesList)
|
||||
self.showDebugObject(clearArea, 'ClearArea_{}'.format(caCnt))
|
||||
else:
|
||||
cont = False
|
||||
data = FreeCAD.Units.Quantity(csHght, FreeCAD.Units.Length).UserString
|
||||
PathLog.error('Could not determine solid faces at {}.'.format(data))
|
||||
else:
|
||||
cont = False
|
||||
data = FreeCAD.Units.Quantity(csHght, FreeCAD.Units.Length).UserString
|
||||
PathLog.error('Could not determine solid faces at {}.'.format(data))
|
||||
clearArea = activeArea
|
||||
|
||||
if cont:
|
||||
# Make waterline path for current CUTAREA depth (csHght)
|
||||
|
||||
Reference in New Issue
Block a user