Comments (8)
You are not missing anything, those methods (in fact really admesh C functions), despite their names, don't return anything, they only calculate the value and save it in the internal stats struct. Due to #3 this remains unavailable for python-admesh.
from python-admesh.
Solution might be to extend python-admesh with methods that do not blindly copy admesh terrible API (I don't want to go that way) or fix #3 and look to stl.stats.volume
.
from python-admesh.
@hroncok I see. May be I have to customize admesh to output data that can be converted to python dict
or something.
from python-admesh.
Well, please try to avoid customizing admesh, when other solution is possible.
I might be able to create a custom method that would return as many stats as currently possible - in a dict.
from python-admesh.
In [1]: from admesh import Stl
In [2]: s = Stl('test/block.stl')
In [3]: s.calculate_volume()
In [4]: s.stats['volume']
Out[4]: 61.023746490478516
In [5]: s.stats['size']
Out[5]: {'x': 3.9370079040527344, 'y': 3.9370079040527344, 'z': 3.9370079040527344}
Expect a release soon.
from python-admesh.
Awesome! Thank you very much.
from python-admesh.
0.98.3 released on pypi, tnaks for the report.
Just curious: What project do you want to use this in?
from python-admesh.
Thanks. This goes in online quotation for a 3D Printing Service. :)
from python-admesh.
Related Issues (12)
- Python3 admesh issue HOT 2
- Data input: parse STL and facet import HOT 5
- Fails to compile with new Cython
- test/utils.py not in sdist
- Mac - problem with installation HOT 10
- Member variables of stl_file (stats, facet_start, etc.) are not exposed HOT 2
- Make ADMeshException HOT 1
- 0.98.4 fails to compile HOT 10
- Does not compile with Cython 0.23 HOT 2
- Missing surface_area in stats HOT 8
- Deepcopy doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-admesh.