gumyr / build123d

A python CAD programming library
Apache License 2.0
437 stars 80 forks source link

is_manifold on a Compound object throws exception #353

Closed Ruudjhuu closed 10 months ago

Ruudjhuu commented 10 months ago

The property is_mainfold throws an exception stating that Export3MF is not defined when called on a Compound object, Pylint should have caught this in my opinion.

I am not sure what the goal is here. With some small guidance regarding the intentions, I might be able to fix it.

Reproduction

from build123d import Box

Box(10, 10, 10).is_manifold

Error:

Traceback (most recent call last):
  File "/home/ruud/git/gridfinity_build123/test.py", line 3, in <module>
    Box(10, 10, 10).is_manifold
  File "/home/ruud/git/gridfinity_build123/.venv/lib/python3.11/site-packages/build123d/topology.py", line 1493, in is_manifold
    return all([Export3MF.is_manifold(sub_shape) for sub_shape in self])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ruud/git/gridfinity_build123/.venv/lib/python3.11/site-packages/build123d/topology.py", line 1493, in <listcomp>
    return all([Export3MF.is_manifold(sub_shape) for sub_shape in self])
                ^^^^^^^^^
NameError: name 'Export3MF' is not defined
gumyr commented 10 months ago

Thanks for pointing this out - a problem from a left-over change.