Closed bernhard-42 closed 1 year ago
Thanks - this is clearly an error. However, I don't really see the utility of is_solid
at all. Here are some alternatives:
from build123d import *
print(f"{isinstance(Solid.make_box(1,1,1),Solid)=}")
print(f"{isinstance(Face.make_rect(1,1),Solid)=}")
print(f"{len(Compound(children=[Solid.make_box(1,1,1)]).solids())=}")
print(f"{len(Compound(children=[Face.make_rect(1,1)]).solids())=}")
isinstance(Solid.make_box(1,1,1),Solid)=True
isinstance(Face.make_rect(1,1),Solid)=False
len(Compound(children=[Solid.make_box(1,1,1)]).solids())=1
len(Compound(children=[Face.make_rect(1,1)]).solids())=0
I propose elimination of is_solid
- do you see any reason to keep it?
Since it was there I used it and started to wonder why it always returns False ...
I agree, we don't really need it.
Okay, good - I'll remove it. A little less code to maintain.
Currently it is implemented as
But I guess it should be
since
shape_type
is a method and no property. And it returns a string.