Code Monkey home page Code Monkey logo

Comments (8)

hroncok avatar hroncok commented on July 22, 2024

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.

hroncok avatar hroncok commented on July 22, 2024

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.

virajrch avatar virajrch commented on July 22, 2024

@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.

hroncok avatar hroncok commented on July 22, 2024

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.

hroncok avatar hroncok commented on July 22, 2024
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.

virajrch avatar virajrch commented on July 22, 2024

Awesome! Thank you very much.

from python-admesh.

hroncok avatar hroncok commented on July 22, 2024

0.98.3 released on pypi, tnaks for the report.

Just curious: What project do you want to use this in?

from python-admesh.

virajrch avatar virajrch commented on July 22, 2024

Thanks. This goes in online quotation for a 3D Printing Service. :)

from python-admesh.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.