Git Product home page Git Product logo

Comments (7)

onitake avatar onitake commented on August 27, 2024 1

My PR has been merged and I ran some tests.

Compiling out-of-tree C++ against libSavitar works fine now and the Python bindings are still ABI compatible.

Closing this issue.

from libsavitar.

onitake avatar onitake commented on August 27, 2024

Looks like I spoke too soon, this causes a dependency problem with the Python.h include.

Maybe this should be moved to the .cpp sources instead?

from libsavitar.

onitake avatar onitake commented on August 27, 2024

I think this issue could be solved by changing the types of the getVerticesAsBytes, getFacesAsBytes and getFlatVerticesAsBytes methods in class MeshData, thus removing any leftover Python dependencies from the C++ library.

Are you using these anywhere outside the Python bindings?
If not, I'd like to propose a patch that changes PyObject* to std::vector and adds a suitable MappedType in Types.sip.

from libsavitar.

nallath avatar nallath commented on August 27, 2024

Cura is the only one that uses it right now.

from libsavitar.

onitake avatar onitake commented on August 27, 2024

The reason why I brought this up is because I ran into some errors when I making Debian packages of libSavitar. The Python symbols would make the resulting -dev package depend on libpython3.5-dev and require additional compilation arguments. This is not appropriate for a C++ library, I think.

So I moved all Python stuff into the SIP library, and this does in fact work fine. I tested it against Cura 2.5.0.

from libsavitar.

LipuFei avatar LipuFei commented on August 27, 2024

@nallath @onitake In this case, perhaps separating this into C++ library code and python bindings code would be a better solution (of course, more work is required). The current changes in #3 will break Cura unfortunately...

from libsavitar.

onitake avatar onitake commented on August 27, 2024

@LipuFei They actually won't, since only the C++ parts are changed. The Python3 API is still the same.

I verified this, Cura 2.5 works fine with the changes.

from libsavitar.

Related Issues (13)

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.