Ordering Line Segments to form a 2D Polygon after slicing a 3D Tri Map

Click For Summary
SUMMARY

The discussion focuses on the challenge of ordering line segments derived from slicing a 3D triangulated shape to form a 2D polygon. The user encounters issues with unordered line segments, rounding errors causing adjacent segments to misalign, and the potential for disjointed polygons due to non-convex shapes. A proposed solution involves rethinking the approach by slicing segments instead of triangles, which could simplify the process of matching endpoints and establishing edges based on shared triangle information.

PREREQUISITES
  • Understanding of 3D triangulation and its representation
  • Familiarity with geometric algorithms for polygon formation
  • Knowledge of numerical precision and rounding error handling
  • Experience with computational geometry concepts
NEXT STEPS
  • Research algorithms for ordering line segments in computational geometry
  • Learn about tolerance handling in geometric computations
  • Explore techniques for merging disjoint polygons
  • Investigate the use of normal vectors in polygon edge creation
USEFUL FOR

3D modelers, computational geometers, software developers working with geometric algorithms, and anyone involved in slicing 3D shapes for visualization or analysis.

nucloxylon
Messages
9
Reaction score
0
I have a 3D shape described by a triangulation map i.e. a map between the vertices to the faces of the shape which are all triangles.

I then sliced the shape by a plane and computed the intersections of the plane and the triangle faces. Each triangle face that intersects the plane, will have two intersection points on two of it's edges thus giving me a line segment that would be apart of the 2D polygon I'm hoping to get out of slicing.

There are a few problems though. For one thing the Line Segments are not ordered. Also, because of some rounding errors, two adjacent line segments might not share the EXACT same point so there has to be some kind of tolerance. Finally the biggest problem I'm facing is that the polygon might be disjointed i.e. the 3D object is not convex, so the polygon slice might be made up of several different polygons.

From a programming perspective, anyone know a fast method to do this and how to deal with the multiple polygons?
 
Physics news on Phys.org
Maybe instead of thinking about slicing triangles to get segments (whose endpoints you then have to match up, worrying about rounding errors and such), you could think about slicing segments to get points. You know which segments belong to the same triangle, and therefore which pairs of resulting points need to have an edge between them, as well as an ordering for each pair (i.e. a normal vector). That might be all you need.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 55 ·
2
Replies
55
Views
5K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
18K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
1K