-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapting a mesh to a 3D Curve #3729
Comments
Hello! One thing you can try is to use MeshLib/source/MRMesh/MRFreeFormDeformer.h Lines 47 to 58 in deb3d32
To construct this class you need to path "tooth" bounding box and resolution of free form transformer Then you need to add pairs of points to fit, I suggest you to make Polyline3 from "margin" line MeshLib/source/MRMesh/MRPolyline.h Lines 14 to 29 in deb3d32
And project vertices of the polyline on mesh with MeshLib/source/MRMesh/MRMeshProject.h Lines 27 to 40 in deb3d32
So for each point of "margin" you will have corresponding point on "tooth". Add these pairs to MeshLib/source/MRMesh/MRFreeFormDeformer.h Lines 68 to 69 in deb3d32
Then you need to apply it to "tooth" like this (it is example in python, but c++ code should be similar) MeshLib/source/MRMesh/MRFreeFormDeformer.h Lines 10 to 25 in deb3d32
What do you think? |
I am attempting to deform a mesh such that it connects with a line in 3D space, with some constraints.
For context if anyone is familiar with the dental domain, I am trying to attach a tooth to a margin line.
Currently I am selecting/and or creating vertices on the mesh and dragging them to points on the line, applying a laplacian deformation.
I won't get in to how I select the points on the mesh or how I determine exactly where I am dragging them to, but I can if that information seems like it may be relevant.
My current modifications. You can see a large amount of concavity in this region.
The input mesh I am modifying.
An example of what may be closer to ideal. The mesh maintains a more convex shape where possible, before ultimately becoming concave because the line in space I am fitting to forces it.
Before I continue down the path of something more custom, any chance there are existing tips/tricks/examples to push my results more to what I desire?
The text was updated successfully, but these errors were encountered: