Merge pull request #11179 from Roy-043/Draft-Make-Facebinders-link-aware-2nd-error-fix
Draft: Make Facebinders link-aware (2nd error fix)
This commit is contained in:
@@ -104,25 +104,26 @@ class Facebinder(DraftObject):
|
||||
else:
|
||||
extr = face.makeOffsetShape(extr_val, 1e-7, fill=True)
|
||||
extrs.extend(extr.Solids)
|
||||
sh = extrs.pop()
|
||||
shp = Part.Shape() # create empty shape to ensure default Placement
|
||||
shp = shp.fuse(extrs.pop()) # add 1st shape, multiFuse does not work otherwise
|
||||
if extrs:
|
||||
sh = sh.multiFuse(extrs)
|
||||
shp = shp.multiFuse(extrs) # multiFuse is more reliable than serial fuse
|
||||
else:
|
||||
sh = faces.pop()
|
||||
shp = Part.Shape()
|
||||
shp = shp.fuse(faces.pop())
|
||||
if faces:
|
||||
sh = sh.multiFuse(faces)
|
||||
shp = shp.multiFuse(faces)
|
||||
if len(faces) > 1:
|
||||
if hasattr(obj, "Sew") and obj.Sew:
|
||||
sh.sewShape()
|
||||
shp.sewShape()
|
||||
if not hasattr(obj, "RemoveSplitter"):
|
||||
sh = sh.removeSplitter()
|
||||
shp = shp.removeSplitter()
|
||||
elif obj.RemoveSplitter:
|
||||
sh = sh.removeSplitter()
|
||||
shp = shp.removeSplitter()
|
||||
except Part.OCCError:
|
||||
print("Draft: error building facebinder")
|
||||
return
|
||||
obj.Shape = sh
|
||||
obj.Placement = pl
|
||||
obj.Shape = shp
|
||||
obj.Area = area
|
||||
self.props_changed_clear()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user