Rhino C++ API  7.24
Classes | Public Member Functions | List of all members
CRhinoUnroll Class Reference

#include <rhinoSdkUnrollSrf.h>

Public Member Functions

 CRhinoUnroll (const ON_Brep *pBrep, double absolute_tol=0.01, double rel_tol=0.01)
 
 CRhinoUnroll (const ON_Surface *pSurface, double absolute_tol=0.01, double rel_tol=0.01)
 
virtual ~CRhinoUnroll ()
 
void CollectResults (ON_SimpleArray< ON_Brep * > &flatbreps, ON_ClassArray< ON_SimpleArray< ON_Curve * > > &crvonsrf, ON_ClassArray< ON_SimpleArray< ON_3dPoint > > &ptonsrf, ON_ClassArray< ON_SimpleArray< ON_TextDot * > > &dotonsrf)
 
int CreateFlatBreps (bool explode, double explode_spacing=2.0)
 
bool FlattenFaces ()
 
void PrepareCurves (const ON_SimpleArray< const ON_Curve * > &curves_on_surface)
 
void PrepareDots (const ON_SimpleArray< const ON_TextDot * > &dots_on_surface)
 Pull points to individual surfaces and make point on surface vertices. More...
 
int PrepareFaces (int direction_override=-1)
 
void PreparePoints (const ON_SimpleArray< ON_3dPoint > &points_on_surface)
 Pull points to individual surfaces and make point on surface vertices. More...
 

Constructor & Destructor Documentation

◆ CRhinoUnroll() [1/2]

CRhinoUnroll::CRhinoUnroll ( const ON_Surface pSurface,
double  absolute_tol = 0.01,
double  rel_tol = 0.01 
)

◆ CRhinoUnroll() [2/2]

CRhinoUnroll::CRhinoUnroll ( const ON_Brep pBrep,
double  absolute_tol = 0.01,
double  rel_tol = 0.01 
)

◆ ~CRhinoUnroll()

virtual CRhinoUnroll::~CRhinoUnroll ( )
virtual

Member Function Documentation

◆ CollectResults()

void CRhinoUnroll::CollectResults ( ON_SimpleArray< ON_Brep * > &  flatbreps,
ON_ClassArray< ON_SimpleArray< ON_Curve * > > &  crvonsrf,
ON_ClassArray< ON_SimpleArray< ON_3dPoint > > &  ptonsrf,
ON_ClassArray< ON_SimpleArray< ON_TextDot * > > &  dotonsrf 
)

Final Step. get all of the unrolled geometry Get the flattened results from the unroller

◆ CreateFlatBreps()

int CRhinoUnroll::CreateFlatBreps ( bool  explode,
double  explode_spacing = 2.0 
)

Step 4. If FlattenFaces returns success, call CreateFlatBreps to transfer all trimming and "following" geometry to the flatted form Transfer edges from 3d to 2d, including curves on srf and points on srf Returns: number of breps generated by unrolling 0 on error

◆ FlattenFaces()

bool CRhinoUnroll::FlattenFaces ( )

◆ PrepareCurves()

void CRhinoUnroll::PrepareCurves ( const ON_SimpleArray< const ON_Curve * > &  curves_on_surface)

Step. 2 [optional] - Add extra geometry to follow unrolled surface Split 3d curves and pull to individual surfaces and make curve on surface edges

◆ PrepareDots()

void CRhinoUnroll::PrepareDots ( const ON_SimpleArray< const ON_TextDot * > &  dots_on_surface)

Pull points to individual surfaces and make point on surface vertices.

◆ PrepareFaces()

int CRhinoUnroll::PrepareFaces ( int  direction_override = -1)

Step. 1 - See if brep can be unrolled Description: See if the faces can be unrolled. Find linear directions and connections to other faces Replace periodic and rational surfaces with clamped non-rational ones Returns: -1: error 0: only linear faces found 1: non-linear faces found.

◆ PreparePoints()

void CRhinoUnroll::PreparePoints ( const ON_SimpleArray< ON_3dPoint > &  points_on_surface)

Pull points to individual surfaces and make point on surface vertices.