You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build some gridfinity stuff, therefore I'm trying to to build the baseplate in CadQuery. However I'm getting some weird Fillets requires that edges be selected-exception.
(The following code are cells from a Jupyter-notebook, where each ##### marks a different cell)
rounding_diameter=7_500outer_width=42_000layer0_inner=42_000- ((2_150+700) *2)
layer0_height=700layer0_rounding_diameter_inner=rounding_diameter- (outer_width-layer0_inner)
layer1_inner=42_000- (2_150*2)
layer1_height=1_800layer1_rounding_diameter_inner=rounding_diameter- (outer_width-layer1_inner)
layer2_inner=42_000- (2_150*2)
layer2_height=1_900layer2_rounding_diameter_inner=rounding_diameter- (outer_width-layer2_inner)
#####fromcadqueryimportWorkplaneobject=Workplane()\
.box(outer_width, outer_width, layer0_height, centered=[True, True, False])\
.faces(">Z")\
.workplane(invert=True)\
.box(layer0_inner, layer0_inner, layer0_height, centered=[True, True, False], combine="cut")\
.edges("|Z and (>X or <X)")\
.fillet(rounding_diameter/2)\
.edges("|Z")\
.fillet(layer0_rounding_diameter_inner/2)
display(object)
#####object=object\
.faces(">Z")\
.workplane()\
.box(outer_width, outer_width, layer1_height, centered=[True, True, False])\
.faces(">Z")\
.workplane(invert=True)\
.box(layer1_inner, layer1_inner, layer1_height, centered=[True, True, False], combine="cut")\
.edges("|Z and (>X or <X)")\
.fillet(rounding_diameter/2)\
.edges("|Z")\
.fillet(layer1_rounding_diameter_inner/2)
display(object)
#####object=object\
.faces(">Z")\
.workplane()\
.box(outer_width, outer_width, layer2_height, centered=[True, True, False])\
.faces(">Z")\
.workplane(invert=True)\
.box(layer2_inner, layer2_inner, layer2_height, centered=[True, True, False], combine="cut")\
.edges("|Z and (>X or <X)")\
.fillet(rounding_diameter/2)\ # <--- THIS IS THE LINE TRIGGERING THE EXCEPTION
.edges("|Z")\
.fillet(layer2_rounding_diameter_inner/2)
display(object)
The weird thing is: If I change the rounding_diameter / 2 to either rounding_diameter / 2.00001 OR rounding_diameter / 1.99999, it does not throw... for me this looks like some kind of floating point error; but then I'm a noob regarding CAD-kernels, and I'm pretty confused that it works with a deviation in both directions.
Also I'm a newby with CadQuery, so please bear with me if I'm completely misunderstanding some concepts here 🙈
Backtrace
{
"name": "StdFail_NotDone",
"message": "BRep_API: command not done",
"stack": "---------------------------------------------------------------------------StdFail_NotDone Traceback (most recent call last)Cell In[117], line 91object = object\\2.faces(\">Z\")\\3.workplane()\\4.box(outer_width, outer_width, layer2_height, centered=[True, True, False])\\5.faces(\">Z\")\\6.workplane(invert=True)\\7.box(layer2_inner, layer2_inner, layer2_height, centered=[True, True, False], combine=\"cut\")\\8.edges(\"|Z and (>X or <X)\")\\----> 9 .fillet(rounding_diameter / 2)\\10.edges(\"|Z\")\\11.fillet(layer2_rounding_diameter_inner / 2)13display(object)File /usr/local/lib/python3.11/dist-packages/cadquery/cq.py:1304, in Workplane.fillet(self, radius)1301if len(edgeList) < 1:1302raise ValueError(\"Fillets requires that edges be selected\")-> 1304 s = solid.fillet(radius, edgeList)1305return self.newObject([s.clean()])File /usr/local/lib/python3.11/dist-packages/cadquery/occ_impl/shapes.py:2780, in Mixin3D.fillet(self, radius, edgeList)2777for e in nativeEdges:2778fillet_builder.Add(radius, e)-> 2780 return self.__class__(fillet_builder.Shape())StdFail_NotDone: BRep_API: command not done"
}
Environment
OS: VSCode dev container running Debian on M1Pro-MacBook Pro:
It looks like you are creating rounded walls. In general, it's recommended to create this kind of shape in 2D. I don't know the root cause of the issue with your code, however, I'd suggest to try moving the fillet to 2D with something like this:
To Reproduce
I'm trying to build some gridfinity stuff, therefore I'm trying to to build the baseplate in CadQuery. However I'm getting some weird
Fillets requires that edges be selected
-exception.(The following code are cells from a Jupyter-notebook, where each
#####
marks a different cell)The weird thing is: If I change the
rounding_diameter / 2
to eitherrounding_diameter / 2.00001
ORrounding_diameter / 1.99999
, it does not throw... for me this looks like some kind of floating point error; but then I'm a noob regarding CAD-kernels, and I'm pretty confused that it works with a deviation in both directions.Also I'm a newby with CadQuery, so please bear with me if I'm completely misunderstanding some concepts here 🙈
Backtrace
Environment
OS: VSCode dev container running Debian on M1Pro-MacBook Pro:
Also see my attached workspace if it is any use: Gridfinity.zip
The text was updated successfully, but these errors were encountered: