Creating a hollow cylinder by a loft

138 views
Skip to first unread message

Dov Grobgeld

unread,
Feb 3, 2024, 2:17:21 PM2/3/24
to CadQuery
Hello,

I'm a newbie to cadquery and I tried creating a hollow cylinder by a loft, but it doesn't work. Here is my sample program:

#!/usr/bin/env python

import cadquery as cq

# Creates a hollow cylinder
cyl_hollow = (cq
              .Workplane('front')
              .circle(100)
              .circle(120)
              .extrude(50))

exporters.export(cyl_hollow, 'cyl_hollow.stl')

# Create a solid cylinder by a loft
cyl_loft = (cq
            .Workplane('front')
            .circle(100)
            .workplane(offset=50)
            .circle(100)
            .loft())
exporters.export(cyl_loft, 'cyl_loft.stl')

# Try to create a hollow cylinder by a loft. This fails!
cyl_hollow_loft = (cq
                   .Workplane('front')
                   .circle(100)
                   .circle(120)
                   .workplane(offset=50)
                   .circle(100)
                   .circle(120)
                   .loft())
exporters.export(cyl_hollow_loft, 'cyl_loft_hollow.stl')
And here are the three generated geometries.

loft-problems.png
I expected cyl_loft_hallow.stl to be the same as cyl_hollow.stl .

Any suggestions?

Thanks!
Dov




Dov Grobgeld

unread,
Feb 3, 2024, 3:43:58 PM2/3/24
to CadQuery
Just a note that of course I can do a loft of the inside and the outside solids and do a cut (boolean subtraction) between them. But I still wonder why extrude works, wheras loft doesn't work for disjoint wires.

Thanks!

Jeremy Wright

unread,
Feb 4, 2024, 10:26:09 AM2/4/24
to Dov Grobgeld, CadQuery

--
cadquery home: https://github.com/CadQuery/cadquery
post issues at https://github.com/CadQuery/cadquery/issues
run it at home at : https://github.com/CadQuery/CQ-editor
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/CA%2B%2BfsGHW%2BCZRi85DHboj9ob3ErrqTdpF3Y9-QmkHtwcbbVv1mw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages