AttributeError: 'Scene' object has no attribute 'area'
See original GitHub issueFile "C:\ProgramData\Anaconda3\lib\site-packages\trimesh\sample.py", line 152, in sample_surface_even
radius = np.sqrt(mesh.area / (2 * count))
AttributeError: 'Scene' object has no attribute 'area'.
It occurs when calling sample_surface_even function. Already the lastest version. However, this bug doesn’t occur when running on Ubuntu 18.04.2.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
AttributeError while changing the display units using python ...
Error messages are pretty helpful in this case. "AttributeError: 'Scene' object has no attribute 'system'". Means that you can not access ...
Read more >obj file loaded as Scene object instead of Trimesh object
the object class returned is Scene, which is incompatible with repair.fix_winding(mesh) , only Trimesh object are accepted. How can I force it ...
Read more >trimesh 3.17.1 documentation
Trimesh is a pure Python (2.7- 3.3+) library for loading and using triangular meshes with an emphasis on watertight meshes. The goal of...
Read more >internal error: modal gizmo-map handler has invalid area
internal error: modal gizmo-map handler has invalid area ... AttributeError: 'Scene' object has no attribute 'ats_settings'.
Read more >Python Render Properties Tab 2.8 - Blender Artists
AttributeError : 'Scene' object has no attribute 'shading'. I took both code lines from the script listener of Blender, so I don't know...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some formats are describing “scenes” (i.e. multiple meshes with transforms), if you want it to always be a “baked”
Trimesh
object in newer versions I would recommend using theforce
kwarg when loading:mesh = trimesh.load('stuff.obj', force='mesh')
How did you generate your mesh? If you loaded it from an obj, the returned object is now either a mesh or scene. I’m unsure why this would be different under different versions of ubuntu, but if you’re creating the obj via some other means it may be being created differently.
If you’re only interested in the area, try the following: