Closed MoeGreen closed 6 years ago
Dale, is this already exported in the C++ SDK?
Steve,
The ON_Mesh2dPolygon() and ON_Mesh2dRegion() functions in the C++ opennurbs SDK are the computational tools you need.
The request for a 3d version will requires a 3d plane to go with the 3d curve and the 3d curve must project to the plane in a reasonable manner. If the 3d curve is planar, then use the 3d plane that contains the curve. Once you have a 3d plane, use the change of basis transformation (note well - do not use the planar projection transformation) to convert the problem to a 2d computation and then map that solution back to 3d. If the polyline is not closed, you will have to supply some sort of closed boundary that contains the polyline.
The C++ function
ON_Mesh2dRegion(
unsigned int point_count,
unsigned int point_stride,
const double* point,
unsigned int edge_count,
unsigned int edge_stride,
const unsigned int* edge,
unsigned int edge_side_stride,
const unsigned char* edge_side,
ON_SimpleArray
accepts interior constraints as well.
In Rhino we can find a good command to create a mesh from polyline 2D and 3D. Could you export it to RhinoCommon?
Thanks, Moe.