Path: Fix radius type inconsistency, issue #6170 [Bug]
Make `self.radius` a float type throughout since other methods and functions treat it as such.
This commit is contained in:
@@ -134,11 +134,10 @@ class Tag:
|
||||
self.height = math.fabs(height)
|
||||
self.actualHeight = self.height
|
||||
self.angle = math.fabs(angle)
|
||||
self.radius = (
|
||||
radius
|
||||
if FreeCAD.Units.Quantity == type(radius)
|
||||
else FreeCAD.Units.Quantity(radius, FreeCAD.Units.Length)
|
||||
)
|
||||
if hasattr(radius, "Value"):
|
||||
self.radius = radius.Value
|
||||
else:
|
||||
self.radius = FreeCAD.Units.Quantity(radius, FreeCAD.Units.Length).Value
|
||||
self.enabled = enabled
|
||||
self.isSquare = False
|
||||
|
||||
@@ -209,7 +208,7 @@ class Tag:
|
||||
self.solid.translate(orig)
|
||||
radius = min(self.radius, radius)
|
||||
self.realRadius = radius
|
||||
if not PathGeom.isRoughly(0, radius.Value):
|
||||
if not PathGeom.isRoughly(0, radius):
|
||||
PathLog.debug("makeFillet(%.4f)" % radius)
|
||||
self.solid = self.solid.makeFillet(radius, [self.solid.Edges[0]])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user