This commit is contained in:
Jeremy Wright 2015-06-12 14:24:43 -04:00
commit 1769eac353
3 changed files with 6 additions and 5 deletions

View File

@ -2105,7 +2105,7 @@ class Workplane(CQ):
return self.cutBlind(maxDim)
def loft(self,filled=True,combine=True):
def loft(self,filled=True,ruled=False,combine=True):
"""
Make a lofted solid, through the set of wires.
:return:
@ -2113,7 +2113,7 @@ class Workplane(CQ):
wiresToLoft = self.ctx.pendingWires
self.ctx.pendingWires = []
r = Solid.makeLoft(wiresToLoft)
r = Solid.makeLoft(wiresToLoft, ruled)
if combine:
parentSolid = self.findSolid(searchStack=False,searchParents=True)

View File

@ -616,7 +616,7 @@ class Solid(Shape):
# needs to allow free-space wires ( those not made from a workplane )
@classmethod
def makeLoft(cls, listOfWire):
def makeLoft(cls, listOfWire, ruled=False):
"""
makes a loft from a list of wires
The wires will be converted into faces when possible-- it is presumed that nobody ever actually
@ -624,7 +624,7 @@ class Solid(Shape):
"""
# the True flag requests building a solid instead of a shell.
return Shape.cast(FreeCADPart.makeLoft([i.wrapped for i in listOfWire], True))
return Shape.cast(FreeCADPart.makeLoft([i.wrapped for i in listOfWire], True, ruled))
@classmethod
def makeWedge(cls, xmin, ymin, zmin, z2min, x2min, xmax, ymax, zmax, z2max, x2max, pnt=None, dir=None):

View File

@ -31,7 +31,7 @@ v0.1.8
* Integrated Coveralls.io, with a badge in README.md
* Integrated version badge in README.md
v0.1.9 (Unreleased)
v0.2.0 (Unreleased)
-----
* Added license badge in changes.md
* Fixed Solid.makeSphere implementation
@ -40,3 +40,4 @@ v0.1.9 (Unreleased)
* Cleaned up spelling and misc errors in docstrings
* Fixed FreeCAD import error on Arch Linux (thanks @moeb)
* Made FreeCAD import report import error instead of silently failing (thanks @moeb)
* Added ruled option for the loft operation (thanks @hyOzd)