diff --git a/cadquery/CQ.py b/cadquery/CQ.py index ee1433e..c1bd328 100644 --- a/cadquery/CQ.py +++ b/cadquery/CQ.py @@ -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) diff --git a/cadquery/freecad_impl/shapes.py b/cadquery/freecad_impl/shapes.py index 01850ab..03e34b5 100644 --- a/cadquery/freecad_impl/shapes.py +++ b/cadquery/freecad_impl/shapes.py @@ -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): diff --git a/changes.md b/changes.md index 2445102..8e00d3c 100644 --- a/changes.md +++ b/changes.md @@ -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)