Rhino C++ API  7.18
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
ON_BrepLoop Class Reference

#include <opennurbs_brep.h>

Inheritance diagram for ON_BrepLoop:
ON_Geometry ON_Object

Public Types

enum  TYPE {
  unknown = 0, outer = 1, inner = 2, slit = 3,
  crvonsrf = 4, ptonsrf = 5, type_count = 6
}
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 

Public Member Functions

 ON_BrepLoop ()
 
 ON_BrepLoop (int)
 loop index More...
 
ON_BrepBrep () const
 
ON_COMPONENT_INDEX ComponentIndex () const override
 virtual ON_Geometry::ComponentIndex() override More...
 
void DestroyRuntimeCache (bool bDelete=true) override
 
int Dimension () const override
 
void Dump (ON_TextLog &) const override
 for debugging More...
 
ON_BrepFaceFace () const
 
bool GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override
 virtual ON_Geometry GetBBox override
More...
 
int IndexOfTrim (const ON_BrepTrim &) const
 Interface. More...
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
ON_BrepLoopoperator= (const ON_BrepLoop &)
 
bool Read (ON_BinaryArchive &) override
 
unsigned int SizeOf () const override
 virtual ON_Object::SizeOf override More...
 
int SurfaceIndexOf () const
 
const ON_SurfaceSurfaceOf () const
 
bool Transform (const ON_Xform &xform) override
 virtual ON_Geometry::Transform() override. More...
 
bool TransformTrim (const ON_Xform &xform)
 
ON_BrepTrimTrim (int lti) const
 
int TrimCount () const
 
bool Write (ON_BinaryArchive &) const override
 
- Public Member Functions inherited from ON_Geometry
 ON_Geometry ()=default
 
 ON_Geometry (const ON_Geometry &)=default
 
 ~ON_Geometry ()=default
 
ON_BoundingBox BoundingBox () const
 
virtual class ON_BrepBrepForm (class ON_Brep *brep=nullptr) const
 
virtual void ClearBoundingBox ()
 
virtual bool EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const
 
bool GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const
 
bool GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const
 
virtual bool GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const
 
virtual bool HasBrepForm () const
 
virtual bool IsDeformable () const
 
virtual bool IsMorphable () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
virtual bool MakeDeformable ()
 
virtual bool Morph (const class ON_SpaceMorph &morph)
 
ON_Geometryoperator= (const ON_Geometry &)=default
 
bool Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Scale (double scale_factor)
 
virtual bool SwapCoordinates (int i, int j)
 
bool Translate (const ON_3dVector &translation_vector)
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
virtual ON::object_type ObjectType () const
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 

Public Attributes

int m_fi = -1
 index of face that uses this loop More...
 
int m_loop_index = -1
 index of loop in ON_Brep.m_L[] array More...
 
ON_U m_loop_user
 
ON_BoundingBox m_pbox
 
ON_ComponentStatus m_status = ON_ComponentStatus::NoneSet
 
ON_SimpleArray< int > m_ti
 trim indices More...
 
TYPE m_type = ON_BrepLoop::unknown
 

Friends

class ON_Brep
 

Additional Inherited Members

- Static Public Attributes inherited from ON_Geometry
const static ON_Geometry Unset
 

Member Enumeration Documentation

◆ TYPE

Enumerator
unknown 
outer 

2d loop curves form a simple closed curve with a counterclockwise orientation

inner 

2d loop curves form a simple closed curve with a clockwise orientation

slit 

always closed - used internally during splitting operations

crvonsrf 

"loop" is a curveonsrf made from a single (open or closed) trim that is has type ON_BrepTrim::crvonsrf.

ptonsrf 

"loop" is a ptonsrf made from a single trim that is has type ON_BrepTrim::ptonsrf.

type_count 

Constructor & Destructor Documentation

◆ ON_BrepLoop() [1/2]

ON_BrepLoop::ON_BrepLoop ( )

◆ ON_BrepLoop() [2/2]

ON_BrepLoop::ON_BrepLoop ( int  )

loop index

Member Function Documentation

◆ Brep()

ON_Brep* ON_BrepLoop::Brep ( ) const

Returns: Brep that the loop belongs to.

◆ ComponentIndex()

ON_COMPONENT_INDEX ON_BrepLoop::ComponentIndex ( ) const
overridevirtual

virtual ON_Geometry::ComponentIndex() override

Reimplemented from ON_Geometry.

◆ DestroyRuntimeCache()

void ON_BrepLoop::DestroyRuntimeCache ( bool  bDelete = true)
overridevirtual

Expert interface Description: Expert user function. If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. Many objects employ lazy creation of (runtime) caches that save information to help speed geometric calculations. This function will destroy all runtime information. Parameters: bDelete - [in] if true, any cached information is properly deleted. If false, any cached information is simply discarded. This is useful when the cached information may be in alternate memory pools that are managed in nonstandard ways.

Reimplemented from ON_Object.

◆ Dimension()

int ON_BrepLoop::Dimension ( ) const
overridevirtual

virtual ON_Geometry overrides A loop is derived from ON_Geometry so that is can be passed around to things that expect ON_Geometry pointers. It is not a very useful stand-alone object. Description: virtual ON_Geometry::Dimension() override. Returns: 2

Reimplemented from ON_Geometry.

◆ Dump()

void ON_BrepLoop::Dump ( ON_TextLog ) const
overridevirtual

for debugging

Reimplemented from ON_Object.

◆ Face()

ON_BrepFace* ON_BrepLoop::Face ( ) const

Returns: Brep face this loop belongs to.

◆ GetBBox()

bool ON_BrepLoop::GetBBox ( double *  boxmin,
double *  boxmax,
bool  bGrowBox = false 
) const
overridevirtual

virtual ON_Geometry GetBBox override

Reimplemented from ON_Geometry.

◆ IndexOfTrim()

int ON_BrepLoop::IndexOfTrim ( const ON_BrepTrim ) const

Interface.

Returns the index i such that loop.m_ti[i] = trim.m_trim_index. Returns -1 if the trim is not in this loop

◆ IsValid()

bool ON_BrepLoop::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief englis description of the reason the object is not valid is appened to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.

Reimplemented from ON_Object.

◆ operator=()

ON_BrepLoop& ON_BrepLoop::operator= ( const ON_BrepLoop )

◆ Read()

bool ON_BrepLoop::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ SizeOf()

unsigned int ON_BrepLoop::SizeOf ( ) const
overridevirtual

virtual ON_Object::SizeOf override

ON_Object overrides

(Loops and trims are purely topological - geometry queries should be directed at the trim's 2d curve or the trim's edge's 3d curve.)

Reimplemented from ON_Object.

◆ SurfaceIndexOf()

int ON_BrepLoop::SurfaceIndexOf ( ) const

Returns: brep.m_S[] surface index of the 3d surface geometry used by this loop or -1.

◆ SurfaceOf()

const ON_Surface* ON_BrepLoop::SurfaceOf ( ) const

Returns: Pointer to the surface geometry used by the loop.

◆ Transform()

bool ON_BrepLoop::Transform ( const ON_Xform xform)
overridevirtual

virtual ON_Geometry::Transform() override.

Reimplemented from ON_Geometry.

◆ TransformTrim()

bool ON_BrepLoop::TransformTrim ( const ON_Xform xform)

Description: Expert user tool that transforms all the parameter space (2d) trimming curves in this loop. Only 2d curve geometry is changed. The caller is responsible for reversing loops, toggle m_bRev, flags, etc. Parameters: xform - [in] Transformation applied to 2d curve geometry. Returns True if successful. If false is returned, the brep may be invalid.

◆ Trim()

ON_BrepTrim* ON_BrepLoop::Trim ( int  lti) const

Parameters: lti - [in] index into the loop's m_ti[] array. Returns: The trim brep.m_T[loop.m_ti[lti]];

◆ TrimCount()

int ON_BrepLoop::TrimCount ( ) const

Returns: Number of trims in this loop.

◆ Write()

bool ON_BrepLoop::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Friends And Related Function Documentation

◆ ON_Brep

friend class ON_Brep
friend

Member Data Documentation

◆ m_fi

int ON_BrepLoop::m_fi = -1

index of face that uses this loop

◆ m_loop_index

int ON_BrepLoop::m_loop_index = -1

index of loop in ON_Brep.m_L[] array

◆ m_loop_user

ON_U ON_BrepLoop::m_loop_user
mutable

Union available for application use. The constructor zeros m_loop_user. The value is of m_loop_user is not saved in 3DM archives and may be changed by some computations.

◆ m_pbox

ON_BoundingBox ON_BrepLoop::m_pbox

parameter space trimming loop bounding box runtime information - not saved

◆ m_status

ON_ComponentStatus ON_BrepLoop::m_status = ON_ComponentStatus::NoneSet
mutable

◆ m_ti

ON_SimpleArray<int> ON_BrepLoop::m_ti

trim indices

◆ m_type

TYPE ON_BrepLoop::m_type = ON_BrepLoop::unknown