[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -280,9 +280,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
"App::PropertyLinkList",
|
||||
"BaseShapes",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property", "Additional base objects to be engraved"
|
||||
),
|
||||
QT_TRANSLATE_NOOP("App::Property", "Additional base objects to be engraved"),
|
||||
)
|
||||
obj.setEditorMode("BaseShapes", 2) # hide
|
||||
|
||||
@@ -321,9 +319,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
"App::PropertyFloat",
|
||||
"Discretize",
|
||||
"Path",
|
||||
QT_TRANSLATE_NOOP(
|
||||
"App::Property", "The deflection value for discretizing arcs"
|
||||
),
|
||||
QT_TRANSLATE_NOOP("App::Property", "The deflection value for discretizing arcs"),
|
||||
)
|
||||
obj.addProperty(
|
||||
"App::PropertyFloat",
|
||||
@@ -382,9 +378,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
dist = ptv[-1].distanceToPoint(ptv[0])
|
||||
if dist < FreeCAD.Base.Precision.confusion():
|
||||
Path.Log.debug(
|
||||
"Removing bad carve point: {} from polygon origin".format(
|
||||
dist
|
||||
)
|
||||
"Removing bad carve point: {} from polygon origin".format(dist)
|
||||
)
|
||||
del ptv[-1]
|
||||
ptv.append(ptv[0])
|
||||
@@ -484,9 +478,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
path.append(Path.Command("G0 Z{}".format(obj.SafeHeight.Value)))
|
||||
path.append(
|
||||
Path.Command(
|
||||
"G0 X{} Y{} Z{}".format(
|
||||
newPosition.x, newPosition.y, obj.SafeHeight.Value
|
||||
)
|
||||
"G0 X{} Y{} Z{}".format(newPosition.x, newPosition.y, obj.SafeHeight.Value)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -494,9 +486,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
vSpeed = obj.ToolController.VertFeed.Value
|
||||
path.append(
|
||||
Path.Command(
|
||||
"G1 X{} Y{} Z{} F{}".format(
|
||||
newPosition.x, newPosition.y, newPosition.z, vSpeed
|
||||
)
|
||||
"G1 X{} Y{} Z{} F{}".format(newPosition.x, newPosition.y, newPosition.z, vSpeed)
|
||||
)
|
||||
)
|
||||
for e in wire:
|
||||
@@ -522,9 +512,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
_maximumUsableDepth = _get_maximumUsableDepth(wires, geom)
|
||||
if _maximumUsableDepth is not None:
|
||||
maximumUsableDepth = _maximumUsableDepth
|
||||
Path.Log.debug(
|
||||
f"Maximum usable depth for current face: {maximumUsableDepth}"
|
||||
)
|
||||
Path.Log.debug(f"Maximum usable depth for current face: {maximumUsableDepth}")
|
||||
|
||||
# first pass
|
||||
cutWires(wires, pathlist, obj.OptimizeMovements)
|
||||
@@ -562,9 +550,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
|
||||
if obj.ToolController.Tool.CuttingEdgeAngle >= 180.0:
|
||||
Path.Log.info(
|
||||
translate(
|
||||
"CAM_Vcarve", "Engraver cutting edge angle must be < 180 degrees."
|
||||
)
|
||||
translate("CAM_Vcarve", "Engraver cutting edge angle must be < 180 degrees.")
|
||||
)
|
||||
return
|
||||
|
||||
@@ -582,9 +568,9 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
|
||||
if not faces:
|
||||
for model in self.model:
|
||||
if model.isDerivedFrom(
|
||||
"Sketcher::SketchObject"
|
||||
) or model.isDerivedFrom("Part::Part2DObject"):
|
||||
if model.isDerivedFrom("Sketcher::SketchObject") or model.isDerivedFrom(
|
||||
"Part::Part2DObject"
|
||||
):
|
||||
faces.extend(model.Shape.Faces)
|
||||
|
||||
if faces:
|
||||
@@ -632,14 +618,10 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
"""Debug function to display calculated voronoi edges"""
|
||||
|
||||
if not getattr(self, "voronoiDebugCache", None):
|
||||
Path.Log.error(
|
||||
"debugVoronoi: empty debug cache. Recompute VCarve operation first"
|
||||
)
|
||||
Path.Log.error("debugVoronoi: empty debug cache. Recompute VCarve operation first")
|
||||
return
|
||||
|
||||
vPart = FreeCAD.activeDocument().addObject(
|
||||
"App::Part", f"{obj.Name}-VoronoiDebug"
|
||||
)
|
||||
vPart = FreeCAD.activeDocument().addObject("App::Part", f"{obj.Name}-VoronoiDebug")
|
||||
|
||||
wiresToShow = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user