Draft: Fixed filled mode - fixes #2708
This commit is contained in:
parent
cb3da6ff9c
commit
72848a5aef
|
@ -600,7 +600,7 @@ def getMovableChildren(objectslist,recursive=True):
|
||||||
added.extend(getMovableChildren(children))
|
added.extend(getMovableChildren(children))
|
||||||
return added
|
return added
|
||||||
|
|
||||||
def makeCircle(radius, placement=None, face=True, startangle=None, endangle=None, support=None):
|
def makeCircle(radius, placement=None, face=None, startangle=None, endangle=None, support=None):
|
||||||
'''makeCircle(radius,[placement,face,startangle,endangle])
|
'''makeCircle(radius,[placement,face,startangle,endangle])
|
||||||
or makeCircle(edge,[face]):
|
or makeCircle(edge,[face]):
|
||||||
Creates a circle object with given radius. If placement is given, it is
|
Creates a circle object with given radius. If placement is given, it is
|
||||||
|
@ -616,7 +616,8 @@ def makeCircle(radius, placement=None, face=True, startangle=None, endangle=None
|
||||||
n = "Circle"
|
n = "Circle"
|
||||||
obj = FreeCAD.ActiveDocument.addObject("Part::Part2DObjectPython",n)
|
obj = FreeCAD.ActiveDocument.addObject("Part::Part2DObjectPython",n)
|
||||||
_Circle(obj)
|
_Circle(obj)
|
||||||
#obj.MakeFace = face
|
if face != None:
|
||||||
|
obj.MakeFace = face
|
||||||
if isinstance(radius,Part.Edge):
|
if isinstance(radius,Part.Edge):
|
||||||
edge = radius
|
edge = radius
|
||||||
if DraftGeomUtils.geomType(edge) == "Circle":
|
if DraftGeomUtils.geomType(edge) == "Circle":
|
||||||
|
@ -647,7 +648,7 @@ def makeCircle(radius, placement=None, face=True, startangle=None, endangle=None
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def makeRectangle(length, height, placement=None, face=True, support=None):
|
def makeRectangle(length, height, placement=None, face=None, support=None):
|
||||||
'''makeRectangle(length,width,[placement],[face]): Creates a Rectangle
|
'''makeRectangle(length,width,[placement],[face]): Creates a Rectangle
|
||||||
object with length in X direction and height in Y direction.
|
object with length in X direction and height in Y direction.
|
||||||
If a placement is given, it is used. If face is False, the
|
If a placement is given, it is used. If face is False, the
|
||||||
|
@ -659,7 +660,8 @@ def makeRectangle(length, height, placement=None, face=True, support=None):
|
||||||
obj.Length = length
|
obj.Length = length
|
||||||
obj.Height = height
|
obj.Height = height
|
||||||
obj.Support = support
|
obj.Support = support
|
||||||
#obj.MakeFace = face
|
if face != None:
|
||||||
|
obj.MakeFace = face
|
||||||
if placement: obj.Placement = placement
|
if placement: obj.Placement = placement
|
||||||
if gui:
|
if gui:
|
||||||
_ViewProviderRectangle(obj.ViewObject)
|
_ViewProviderRectangle(obj.ViewObject)
|
||||||
|
@ -805,7 +807,7 @@ def makeWire(pointslist,closed=False,placement=None,face=None,support=None):
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def makePolygon(nfaces,radius=1,inscribed=True,placement=None,face=True,support=None):
|
def makePolygon(nfaces,radius=1,inscribed=True,placement=None,face=None,support=None):
|
||||||
'''makePolgon(nfaces,[radius],[inscribed],[placement],[face]): Creates a
|
'''makePolgon(nfaces,[radius],[inscribed],[placement],[face]): Creates a
|
||||||
polygon object with the given number of faces and the radius.
|
polygon object with the given number of faces and the radius.
|
||||||
if inscribed is False, the polygon is circumscribed around a circle
|
if inscribed is False, the polygon is circumscribed around a circle
|
||||||
|
@ -817,7 +819,8 @@ def makePolygon(nfaces,radius=1,inscribed=True,placement=None,face=True,support=
|
||||||
_Polygon(obj)
|
_Polygon(obj)
|
||||||
obj.FacesNumber = nfaces
|
obj.FacesNumber = nfaces
|
||||||
obj.Radius = radius
|
obj.Radius = radius
|
||||||
#obj.MakeFace = face
|
if face != None:
|
||||||
|
obj.MakeFace = face
|
||||||
if inscribed:
|
if inscribed:
|
||||||
obj.DrawMode = "inscribed"
|
obj.DrawMode = "inscribed"
|
||||||
else:
|
else:
|
||||||
|
@ -836,7 +839,7 @@ def makeLine(p1,p2):
|
||||||
obj = makeWire([p1,p2])
|
obj = makeWire([p1,p2])
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def makeBSpline(pointslist,closed=False,placement=None,face=True,support=None):
|
def makeBSpline(pointslist,closed=False,placement=None,face=None,support=None):
|
||||||
'''makeBSpline(pointslist,[closed],[placement]): Creates a B-Spline object
|
'''makeBSpline(pointslist,[closed],[placement]): Creates a B-Spline object
|
||||||
from the given list of vectors. If closed is True or first
|
from the given list of vectors. If closed is True or first
|
||||||
and last points are identical, the wire is closed. If face is
|
and last points are identical, the wire is closed. If face is
|
||||||
|
@ -868,7 +871,8 @@ def makeBSpline(pointslist,closed=False,placement=None,face=True,support=None):
|
||||||
obj.Closed = closed
|
obj.Closed = closed
|
||||||
obj.Points = pointslist
|
obj.Points = pointslist
|
||||||
obj.Support = support
|
obj.Support = support
|
||||||
#obj.MakeFace = face
|
if face != None:
|
||||||
|
obj.MakeFace = face
|
||||||
if placement: obj.Placement = placement
|
if placement: obj.Placement = placement
|
||||||
if gui:
|
if gui:
|
||||||
_ViewProviderWire(obj.ViewObject)
|
_ViewProviderWire(obj.ViewObject)
|
||||||
|
@ -877,7 +881,7 @@ def makeBSpline(pointslist,closed=False,placement=None,face=True,support=None):
|
||||||
FreeCAD.ActiveDocument.recompute()
|
FreeCAD.ActiveDocument.recompute()
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def makeBezCurve(pointslist,closed=False,placement=None,face=True,support=None,Degree=None):
|
def makeBezCurve(pointslist,closed=False,placement=None,face=None,support=None,Degree=None):
|
||||||
'''makeBezCurve(pointslist,[closed],[placement]): Creates a Bezier Curve object
|
'''makeBezCurve(pointslist,[closed],[placement]): Creates a Bezier Curve object
|
||||||
from the given list of vectors. Instead of a pointslist, you can also pass a Part Wire.'''
|
from the given list of vectors. Instead of a pointslist, you can also pass a Part Wire.'''
|
||||||
if not isinstance(pointslist,list):
|
if not isinstance(pointslist,list):
|
||||||
|
@ -899,7 +903,8 @@ def makeBezCurve(pointslist,closed=False,placement=None,face=True,support=None,D
|
||||||
Part.BezierCurve().MaxDegree)
|
Part.BezierCurve().MaxDegree)
|
||||||
obj.Closed = closed
|
obj.Closed = closed
|
||||||
obj.Support = support
|
obj.Support = support
|
||||||
#obj.MakeFace = face
|
if face != None:
|
||||||
|
obj.MakeFace = face
|
||||||
obj.Proxy.resetcontinuity(obj)
|
obj.Proxy.resetcontinuity(obj)
|
||||||
if placement: obj.Placement = placement
|
if placement: obj.Placement = placement
|
||||||
if gui:
|
if gui:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user