You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow explicit constraints on subset of the triangles #71
Is there a way to allow explicit triangle positions after the flattening?
A = { all triangles. }
A_fixed = { all triangles with explicit mapping. }
A_free = A - A_fixed
Flatten A_free while honoring the given mapping for A_fixed. In my case the A_fixed maps the triangles onto a planar surface, hence they are flattened.
I think what you're talking about would be provided by #42, which is planned for LSCM but not implemented. When running, you would have to:
Run ABF (if you're using that)
Use the optimized angles to define the position of your fixed triangle(s).
Pin all vertices of the fixed triangle(s) to known locations as an input to LSCM.
Fixing full triangles will eventually create an over constrained system and, depending on the 3D surface, may produce worse results than just running the algorithm on the full mesh.
Why are you interested in this? What are you trying to accomplish?
I have a portion of a surface S facets facets_p already flattened. It has to be a portion of the facets since facets_p boundary is connected to the facets on another surface S2 and so on. All these facets from different surfaces are flattened together.
Now, the rest of the surface S facets facets_r := facets - facets_p also need to be flattened while maintaining the flattened vertex positions on the boundary of facets_p. That's where the pinning will take place.
Does that make sense, or I could add more details.
Below is the geometry I have F1, F2, F3 are the faces to unfold. These must end up without self-intersections after the unfold. Now, S1, S2, and S3 (omitted in the image for clarity) are the surfaces defining the faces that also need to be unfold while maintaining their boundary facet edges with the respective faces, i.e. the boundary facet edges between Si and Fi should lie at the same position after unfold. This is where I plan to apply the pinning constraints. I do not care whether these surface unfolds intersect with other faces/surfaces as long as it does not intersect with the face it defines, i.e. Si unfold should not overlap with Fi unfold.
I imagine it would be very hard to control the flattening process with such requirements along with a non-manifold mesh.
Again, it's a bit hard to explain in words here, but I'll be happy to add more details if you are interested.
Let me make sure I'm interpreting the diagram correctly:
You have a surface S composed of 3 parts S1-3, where the last two parts bifurcate from the first to create a y-intersection (non-manifold).
Each S has a subset of faces F and you want to maintain the interior boundary Bi between Si and Fi after flattening. The diagram doesn't show this, but it seems like you might already have the flattened boundary Bi, and you don't want this to change in shape at all.
You don't care if a flattened Si or Fi intersects with another Sj or Fj, as long as it doesn't intersect with its i counterpart.
So for this particular example, you'd want three flattened charts.
If all of that's correct, then there are a few things to think about:
The HalfEdgeMesh structure in this project requires a manifold mesh. If what I've described about the manifoldness above is accurate, then you'd need to split your surfaces into manifold components Si before running them here. It sounds like the independent flattening wouldn't be a problem in terms of the results (i.e. you don't care if they intersect across S), but I'm not sure how easy it is to decompose your surface into manifold components.
Is Fi a subset of Si? And is Bi pre-determined? If Fi is in Si and Bi is not predetermined, why can't you just flatten Si? This library does not introduce splits at any edges on its own, so your boundary will be maintained (though it will be arbitrarily positioned in the output).
If Bi is pre-determined, then you will have to wait for A7: Multi-pin UV constraints for LSCM #42. The flattening results will vary greatly depending on the exact surfaces and boundaries involved. I'm not really sure what LSCM will do when you have two separate regions of conformal energy divided by a pinned boundary.
In this case, yes. In general, the faces form a manifold body and meet each other at boundaries Bij. The surfaces may extend beyond these boundaries leading to an "X" like intersection at Bij.
Yes, all the faces have been flattened together. Now the surfaces have to be flattened in such a way that the Si- Fi boundary ends up at the same position again as it did when we flattened all the faces together.
Fi should NOT intersect with any other Fj, which I assume the algorithm handles when we flatten all faces together. Now, any Si should NOT overlap with it corresponding face Fi after flattening, but rather just meet with it at the pre-flattened boundary. The flattened Si may overlap with anything other than Fi (i.e. Fj or Sj where i!=j).
Right. Depends on how you count though. As I have it right now, one chart will be the flattened mesh from all faces together. And the one from each surface flattened while pinning the facet edges at the boundary with its face.
Thanks for your insights!
Yeah, the faces form a manifold. The surface facets in the Si-Fi region individually are manifold as well.
Yes always. The faces are contained by the surfaces. The surfaces are a larger patch and the face is a reduced portion of it defined by its boundary on the surface. I cannot flatten just Sis individually cause then the boundary edges (connecting Fi and Fj together for example) would end up at different places. That boundary connection has to be unique on the flattened mesh. This is guaranteed when I flatten all faces together.
Right, I hope it would honor the pinning on the surface-face boundary.
Thanks again! I may be able to assist you with coding the enhancement in. Currently going through the ABF papers and understanding the math.
This should largely leave the ABF classes untouched, and most of the work would be in the interface for AngleBasedLSCM, which actually does the pinning. ABF -generated angles should just work as is since ABF is more or less just a pre-optimization step for LSCM. I also probably leave HLSCM untouched for the moment, as it performs a multi-scale decimation and mapping the high-level pins to the decimation would take some extra thought.
If you want to contribute, you should take a look at conductor/tracks/A7. I've recently started using Claude Code with this conductor plugin to follow a TDD development workflow. You don't have to use it, but I probably will review against its spec.
changed the title [-]Allow explcit constraints on subset of the triangles.[/-][+]Allow explicit constraints on subset of the triangles[/+]on Mar 28, 2026
@abhi-k9 Multi-pinning is now available in the develop branch. Depends on whether you're using the functional or class interface, but basically you create a list of the vertex indices and their UV coordinates and pass that list to the LSCM::Compute method:
Activity
csparker247 commentedon Mar 26, 2026
I think what you're talking about would be provided by #42, which is planned for LSCM but not implemented. When running, you would have to:
Fixing full triangles will eventually create an over constrained system and, depending on the 3D surface, may produce worse results than just running the algorithm on the full mesh.
Why are you interested in this? What are you trying to accomplish?
abhi-k9 commentedon Mar 27, 2026
That's great!
I have a portion of a surface
Sfacetsfacets_palready flattened. It has to be a portion of the facets sincefacets_pboundary is connected to the facets on another surfaceS2and so on. All these facets from different surfaces are flattened together.Now, the rest of the surface
Sfacetsfacets_r := facets - facets_palso need to be flattened while maintaining the flattened vertex positions on the boundary offacets_p. That's where the pinning will take place.Does that make sense, or I could add more details.
Thanks.
csparker247 commentedon Mar 28, 2026
Yes, that makes sense. Is there a reason why all facets can't be reflattened together, though?
abhi-k9 commentedon Mar 28, 2026
Below is the geometry I have
F1,F2,F3are the faces to unfold. These must end up without self-intersections after the unfold. Now,S1,S2, andS3(omitted in the image for clarity) are the surfaces defining the faces that also need to be unfold while maintaining their boundary facet edges with the respective faces, i.e. the boundary facet edges betweenSiandFishould lie at the same position after unfold. This is where I plan to apply the pinning constraints. I do not care whether these surface unfolds intersect with other faces/surfaces as long as it does not intersect with the face it defines, i.e.Siunfold should not overlap withFiunfold.I imagine it would be very hard to control the flattening process with such requirements along with a non-manifold mesh.
Again, it's a bit hard to explain in words here, but I'll be happy to add more details if you are interested.
csparker247 commentedon Mar 28, 2026
Let me make sure I'm interpreting the diagram correctly:
If all of that's correct, then there are a few things to think about:
HalfEdgeMeshstructure in this project requires a manifold mesh. If what I've described about the manifoldness above is accurate, then you'd need to split your surfaces into manifold components Si before running them here. It sounds like the independent flattening wouldn't be a problem in terms of the results (i.e. you don't care if they intersect across S), but I'm not sure how easy it is to decompose your surface into manifold components.abhi-k9 commentedon Mar 28, 2026
Bij. The surfaces may extend beyond these boundaries leading to an "X" like intersection atBij.Si-Fiboundary ends up at the same position again as it did when we flattened all the faces together.Fishould NOT intersect with any otherFj, which I assume the algorithm handles when we flatten all faces together. Now, anySishould NOT overlap with it corresponding faceFiafter flattening, but rather just meet with it at the pre-flattened boundary. The flattenedSimay overlap with anything other thanFi(i.e.FjorSjwherei!=j).Thanks for your insights!
Yeah, the faces form a manifold. The surface facets in the
Si-Firegion individually are manifold as well.Yes always. The faces are contained by the surfaces. The surfaces are a larger patch and the face is a reduced portion of it defined by its boundary on the surface. I cannot flatten just
Sis individually cause then the boundary edges (connectingFiandFjtogether for example) would end up at different places. That boundary connection has to be unique on the flattened mesh. This is guaranteed when I flatten all faces together.Right, I hope it would honor the pinning on the surface-face boundary.
Thanks again! I may be able to assist you with coding the enhancement in. Currently going through the ABF papers and understanding the math.
csparker247 commentedon Mar 28, 2026
This should largely leave the ABF classes untouched, and most of the work would be in the interface for AngleBasedLSCM, which actually does the pinning. ABF -generated angles should just work as is since ABF is more or less just a pre-optimization step for LSCM. I also probably leave HLSCM untouched for the moment, as it performs a multi-scale decimation and mapping the high-level pins to the decimation would take some extra thought.
If you want to contribute, you should take a look at
conductor/tracks/A7. I've recently started using Claude Code with this conductor plugin to follow a TDD development workflow. You don't have to use it, but I probably will review against its spec.[-]Allow explcit constraints on subset of the triangles.[/-][+]Allow explicit constraints on subset of the triangles[/+]csparker247 commentedon Jun 15, 2026
@abhi-k9 Multi-pinning is now available in the
developbranch. Depends on whether you're using the functional or class interface, but basically you create a list of the vertex indices and their UV coordinates and pass that list to theLSCM::Computemethod:OpenABF/tests/src/TestParameterization.cpp
Lines 1353 to 1358 in 166526e
Let me know how it goes.