Code Monkey home page Code Monkey logo

Comments (5)

emil-peters avatar emil-peters commented on June 6, 2024 1

That would be very nice!
We're planning to use this library a lot as the performance, quality and features are quite impressive.

So it would be nice for us to easily add the bindings/features we need 🙌

from meshlib.

Grantim avatar Grantim commented on June 6, 2024 1

I think we will release on next week, if you build meshlib from sources you will be able to use python modules of current master in place

from meshlib.

emil-peters avatar emil-peters commented on June 6, 2024

My guess is adding

    m.def( "relaxKeepVolume", ( bool( * )( Mesh&, const MeshRelaxParams&, ProgressCallback ) )& relaxKeepVolume,
        pybind11::arg( "mesh" ), pybind11::arg( "params" ) = MeshRelaxParams{}, pybind11::arg( "cb" ) = ProgressCallback{},
        "Applies given number of relaxation iterations to the whole mesh ( or some region if it is specified ). \n"
        "do not really keeps volume but tries hard. \n"
        "return true if was finished successfully, false if was interrupted by progress callback");

to MR_ADD_PYTHON_CUSTOM_DEF( mrmeshpy, Relax, [] ( pybind11::module_& m ) in MeshInspector/MeshLib/source/mrmeshpy/MRPythonMeshPlugins.cpp

AND adding the following test to test_relax.py

def test_relax_keep_volume():
    R1 = 2
    R2_1 = 1
    R2_2 = 2.5
    keep_volume_torus = mrmesh.makeTorusWithSpikes(R1, R2_1, R2_2, 10, 12, None)

    params = mrmesh.MeshRelaxParams()
    params.iterations = 5
    res = mrmesh.relaxKeepVolume(keep_volume_torus, params)

    assert (res)

from meshlib.

Grantim avatar Grantim commented on June 6, 2024

Hello! You are absolutely right thanks! I've made PR with this proposal. Also its great idea to create guide page for contributors, we will work on it soon!

from meshlib.

emil-peters avatar emil-peters commented on June 6, 2024

@Grantim any idea when this would be released? 😄

from meshlib.

Related Issues (20)

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.