Draft: trimex extrusions now sets the solid property of the extruded object to True
This commit is contained in:
parent
039cacbfde
commit
04c1530b09
|
@ -1114,13 +1114,14 @@ def makeVisGroup(group=None,name="VisGroup"):
|
||||||
group.addObject(obj)
|
group.addObject(obj)
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def extrude(obj,vector):
|
def extrude(obj,vector,solid=False):
|
||||||
'''makeExtrusion(object,vector): extrudes the given object
|
'''makeExtrusion(object,vector): extrudes the given object
|
||||||
in the direction given by the vector. The original object
|
in the direction given by the vector. The original object
|
||||||
gets hidden.'''
|
gets hidden.'''
|
||||||
newobj = FreeCAD.ActiveDocument.addObject("Part::Extrusion","Extrusion")
|
newobj = FreeCAD.ActiveDocument.addObject("Part::Extrusion","Extrusion")
|
||||||
newobj.Base = obj
|
newobj.Base = obj
|
||||||
newobj.Dir = vector
|
newobj.Dir = vector
|
||||||
|
newobj.Solid = solid
|
||||||
obj.ViewObject.Visibility = False
|
obj.ViewObject.Visibility = False
|
||||||
formatObject(newobj,obj)
|
formatObject(newobj,obj)
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
|
|
|
@ -2885,7 +2885,7 @@ class Trimex(Modifier):
|
||||||
delta = self.extrude(self.shift,real=True)
|
delta = self.extrude(self.shift,real=True)
|
||||||
#print("delta",delta)
|
#print("delta",delta)
|
||||||
self.doc.openTransaction("Extrude")
|
self.doc.openTransaction("Extrude")
|
||||||
obj = Draft.extrude(self.obj,delta)
|
obj = Draft.extrude(self.obj,delta,solid=True)
|
||||||
self.doc.commitTransaction()
|
self.doc.commitTransaction()
|
||||||
self.obj = obj
|
self.obj = obj
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user