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

Warning when instantiating primitive #2200

Closed
schlegelp opened this issue Mar 31, 2024 · 0 comments · Fixed by #2201
Closed

Warning when instantiating primitive #2200

schlegelp opened this issue Mar 31, 2024 · 0 comments · Fixed by #2201

Comments

@schlegelp
Copy link

Hi. With the most recent trimesh version 4.2.3 I get this:

>>> import trimesh as tm
>>> sphere = tm.primitives.Sphere()
primitive faces are immutable: not setting!

I did only minimal testing but it seems that despite the warning I get the expected primitives.

There was one oddity though which I'm not sure is related to the warning:

>>> sphere1 = tm.primitives.Sphere(radius=1, center=(0, 0, 0), subdivisions=2)
>>> sphere2 = tm.primitives.Sphere(radius=1, center=(5, 0, 0), subdivisions=2)
>>> sphere3 = tm.primitives.Sphere(radius=2, center=(10, 0, 0), subdivisions=2)
>>> sphere4 = tm.primitives.Sphere(radius=2, center=(15, 0, 0), subdivisions=0)
Screenshot 2024-03-31 at 09 54 52

Sphere 1 through 4 are lined up left to right. As you can see sphere4 (red) where we use subdivisions=0 did not change the radius.

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

Successfully merging a pull request may close this issue.

1 participant