Shell on simple loft results in error

23 views
Skip to first unread message

Wojciech

unread,
Oct 28, 2024, 10:57:26 AM10/28/24
to CadQuery
I have to following problem:

    connector = cq.Workplane('XY').rect(16,8.5).workplane(offset=15).circle(9.0/2).loft()
    connector = connector.faces("<Z").wires().toPending().extrude(-10)
    connector = connector.faces(">Z").wires().toPending().extrude(3)
    connector = connector.faces("+Z or -Z").shell(2)
    connector.val().exportStl("./test.stl")

I want to make a simple shell that goes from a rectangular opening to a circular one. The shape is fine, but as soon a i run shell() I get the non descriptive:

OCP.StdFail.StdFail_NotDone: BRep_API: command not done

When trying to do the same in FreeCAD I get:

<PartDesign> FeatureThickness.cpp(150): Exception on making thick solid: BRep_API: command not done

Does not change if the faces ("+Z or -Z") are added or not, nor if the additional extrudes are present. It this (again) a problem with OCCT? Any workarounds?



Lorenz

unread,
Oct 28, 2024, 10:31:38 PM10/28/24
to CadQuery
Yes, it does appear to be an OCCT problem.  Here is a workaround using sweep (CQ master):

import cadquery as cq
from cadquery.occ_impl.shapes import *

f1 = cq.Sketch().rect(16, 8.5).rect(14, 6.5, mode="s").val()
f2 = cq.Sketch().circle(9.0 / 2).circle((9.0 - 2) / 2, mode="s").moved(z=15).val()

solid1 = sweep([f1, f2], segment((0, 0, 0), (0, 0, 15)))
connector = extrude(f1, (0, 0, -10)) + solid1 + extrude(f2, (0, 0, 3))
connector.export("test1.stl")
Reply all
Reply to author
Forward
0 new messages