Rhino C++ API  9.0
Public Member Functions | Public Attributes | Friends | List of all members
CRhinoOverlapFate Class Reference

#include <rhinoSdkOverlap.h>

Public Member Functions

 CRhinoOverlapFate ()=default
 
 CRhinoOverlapFate (const CRhinoOverlapFate &)
 duplicates m_replacement More...
 
 ~CRhinoOverlapFate ()
 deletes m_replacement More...
 
CRhinoOverlapFateoperator= (const CRhinoOverlapFate &)
 
const ON_CurveReplacement () const
 

Public Attributes

ON_SimpleArray< ON_COMPONENT_INDEXm_dead_segments
 used when !m_entire More...
 
bool m_entire = false
 true: whole object overlapped More...
 
int m_object_index = -1
 index into the input array More...
 

Friends

RHINO_SDK_FUNCTION bool RhinoGetOverlaps (const ON_SimpleArray< const ON_Geometry * > &, const ON_Plane &, double, bool, const ON_SimpleArray< const ON_Geometry * > &, bool, ON_ClassArray< CRhinoOverlapFate > &, ON_Terminator *)
 

Detailed Description

Describes what happened to one input object during an overlap computation. One CRhinoOverlapFate is produced for each input object that was affected (covered) by the overlap; unaffected inputs produce no entry. When m_entire is true the whole object was covered and should be removed. Otherwise m_dead_segments lists the covered segments and Replacement(), if non-null, is the trimmed remainder the caller should substitute.

Constructor & Destructor Documentation

◆ CRhinoOverlapFate() [1/2]

CRhinoOverlapFate::CRhinoOverlapFate ( )
default

◆ ~CRhinoOverlapFate()

CRhinoOverlapFate::~CRhinoOverlapFate ( )

deletes m_replacement

◆ CRhinoOverlapFate() [2/2]

CRhinoOverlapFate::CRhinoOverlapFate ( const CRhinoOverlapFate )

duplicates m_replacement

Member Function Documentation

◆ operator=()

CRhinoOverlapFate& CRhinoOverlapFate::operator= ( const CRhinoOverlapFate )

◆ Replacement()

const ON_Curve* CRhinoOverlapFate::Replacement ( ) const
inline

The remainder curve the caller should substitute for the input, or nullptr when there is no replacement. Owned by this object.

Friends And Related Function Documentation

◆ RhinoGetOverlaps

RHINO_SDK_FUNCTION bool RhinoGetOverlaps ( const ON_SimpleArray< const ON_Geometry * > &  ,
const ON_Plane ,
double  ,
bool  ,
const ON_SimpleArray< const ON_Geometry * > &  ,
bool  ,
ON_ClassArray< CRhinoOverlapFate > &  ,
ON_Terminator  
)
friend

Description: Detects overlapping regions among a set of input objects after they are orthogonally projected onto the given plane, and reports what should happen to each affected object so the overlaps can be removed. The objects are compared in the projected plane, so this finds curves that lie on top of one another when viewed along the plane's normal. Parameters: objects - [in] The geometry to test for overlaps. Supported types are ON_Curve (curves), ON_Point (single points), and ON_PointCloud (sets of points). Objects of any other type, as well as null or invalid objects, are silently ignored. plane - [in] The plane the geometry is orthogonally projected onto before testing (the projection maps each point P to plane.ClosestPointTo(P)). tolerance - [in] Overlap distance tolerance, in the projected plane. whole_curves - [in] True treats an overlapping curve as a single unit; false allows splitting at segment boundaries so that only the overlapping portions are affected. locked - [in] Geometry that participates in the test but is never itself reported or modified. May be empty. locked_exclusive - [in] True reports overlaps only where an input object overlaps a locked object; overlaps purely among the input objects are ignored. fates - [out] One CRhinoOverlapFate per affected input object. Cleared on entry. Inputs that are not overlapped produce no entry. cancel - [in] Optional terminator used to cancel a long-running computation. May be nullptr. Returns: True if at least one overlap was found (fates is non-empty); false otherwise.

Member Data Documentation

◆ m_dead_segments

ON_SimpleArray<ON_COMPONENT_INDEX> CRhinoOverlapFate::m_dead_segments

used when !m_entire

◆ m_entire

bool CRhinoOverlapFate::m_entire = false

true: whole object overlapped

◆ m_object_index

int CRhinoOverlapFate::m_object_index = -1

index into the input array