Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unwrapped_shapetype should use the wrapped object #889

Open
bernhard-42 opened this issue Jan 29, 2025 · 0 comments
Open

unwrapped_shapetype should use the wrapped object #889

bernhard-42 opened this issue Jan 29, 2025 · 0 comments

Comments

@bernhard-42
Copy link
Collaborator

When testing docs/tutorial_joints.py the function write_svg in this file fails.
If I change this in topology/utils.py, it works

diff --git a/src/build123d/topology/utils.py b/src/build123d/topology/utils.py
index c876ba2..c1bbb1e 100644
--- a/src/build123d/topology/utils.py
+++ b/src/build123d/topology/utils.py
@@ -424,7 +424,7 @@ def unwrapped_shapetype(obj: Shape) -> TopAbs_ShapeEnum:
         if len(shapetypes) == 1:
             result = shapetypes.pop()
         else:
-            result = shapetype(obj)
+            result = shapetype(obj.wrapped)
     else:
         result = shapetype(obj.wrapped)
     return result

After this change, all build123d tests are still successful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant