23 #if !defined(OPENNURBS_BREP_INC_) 24 #define OPENNURBS_BREP_INC_ 33 #define m_vertex_user_i m_vertex_user.i 34 #define m_trim_user_i m_trim_user.i 35 #define m_edge_user_i m_edge_user.i 36 #define m_loop_user_i m_loop_user.i 37 #define m_face_user_i m_face_user.i 75 unsigned int SizeOf()
const;
78 ON__UINT32
DataCRC(ON__UINT32 current_remainder)
const;
132 double Tolerance()
const;
136 int EdgeCount()
const;
242 int TrimCount()
const;
253 unsigned int SizeOf()
const;
256 ON__UINT32
DataCRC(ON__UINT32 current_remainder)
const;
312 int EdgeCurveIndexOf()
const;
318 const ON_Curve* EdgeCurveOf()
const;
337 bool ChangeEdgeCurve(
346 void UnsetPlineEdgeParameters();
390 #if defined(ON_DLL_TEMPLATE) 394 #pragma warning( push ) 395 #pragma warning( disable : 4231 ) 397 #pragma warning( pop ) 419 void DestroyRuntimeCache(
bool bDelete =
true );
422 unsigned int SizeOf()
const;
465 force_32_bit_trim_type = 0xFFFFFFFF
535 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
544 ON_COMPONENT_INDEX ComponentIndex()
const;
554 ON_BOOL32 SetStartPoint(
559 ON_BOOL32 SetEndPoint(
584 bool ChangeTrimCurve(
int c2i );
594 void DestroyPspaceInformation();
614 bool bRemoveFromStartVertex,
615 bool bRemoveFromEndVertex
640 const ON_Curve* TrimCurveOf()
const;
646 const ON_Curve* EdgeCurveOf()
const;
659 int TrimCurveIndexOf()
const;
666 int EdgeCurveIndexOf()
const;
673 int SurfaceIndexOf()
const;
679 int FaceIndexOf()
const;
725 bool TransformTrim(
const ON_Xform& xform );
788 double m_tolerance[2];
799 void UnsetPlineEdgeParameters();
808 void m__legacy_flags_Set(
int,
int);
809 bool m__legacy_flags_Get(
int*,
int*)
const;
825 void DestroyRuntimeCache(
bool bDelete =
true );
838 int Dimension()
const;
876 int TrimCount()
const;
909 unsigned int SizeOf()
const;
930 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
939 ON_COMPONENT_INDEX ComponentIndex()
const;
954 int SurfaceIndexOf()
const;
974 bool TransformTrim(
const ON_Xform& xform );
995 void DestroyRuntimeCache(
bool bDelete =
true );
1028 int LoopCount()
const;
1058 unsigned int SizeOf()
const;
1061 ON__UINT32 DataCRC(ON__UINT32 current_remainder)
const;
1082 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
1091 ON_COMPONENT_INDEX ComponentIndex()
const;
1094 void ClearBoundingBox();
1132 ON_BOOL32 Transpose();
1145 ON_BOOL32 SetDomain(
1153 // Change the domain of a face
1154 // This changes the parameterization of the face's surface and transforms
1155 // the "u" and "v" coordinates of all the face's parameter space trimming
1156 // curves. The locus of the face is not changed.
1169 bool SetMesh( ON::mesh_type,
ON_Mesh* mesh );
1171 const ON_Mesh*
Mesh( ON::mesh_type mesh_type )
const;
1186 void DestroyMesh( ON::mesh_type mesh_type,
bool bDeleteMesh =
true );
1203 bool TransformTrim(
const ON_Xform& xform );
1240 bool bTransformTrimCurves
1248 int SurfaceIndexOf()
const;
1296 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
1346 int SurfaceNormalDirection()
const;
1368 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
1412 bool IsFinite()
const;
1445 #if defined(ON_DLL_TEMPLATE) 1449 #pragma warning( push ) 1450 #pragma warning( disable : 4231 ) 1463 #pragma warning( pop ) 1475 unsigned int SizeOf()
const;
1486 unsigned int SizeOf()
const;
1497 unsigned int SizeOf()
const;
1508 unsigned int SizeOf()
const;
1519 unsigned int SizeOf()
const;
1531 unsigned int SizeOf()
const;
1543 unsigned int SizeOf()
const;
1558 bool IsValid(
ON_TextLog* text_log = 0 )
const;
1562 unsigned int SizeOf()
const;
1576 void DestroyRuntimeCache(
bool bDelete =
true );
1579 unsigned int SizeOf()
const;
1582 ON__UINT32 DataCRC(ON__UINT32 current_remainder)
const;
1637 void MemoryRelocate();
1652 double tolerance = ON_ZERO_TOLERANCE
1662 void EmergencyDestroy();
1693 void DestroyMesh( ON::mesh_type mesh_type,
bool bDeleteMesh =
true );
1777 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
1802 bool IsValidTopology(
ON_TextLog* text_log = NULL )
const;
1831 bool IsValidGeometry(
ON_TextLog* text_log = NULL )
const;
1861 bool IsValidTolerancesAndFlags(
ON_TextLog* text_log = NULL )
const;
1870 bool IsValidForV2()
const;
1884 ON::object_type ObjectType()
const;
1887 int Dimension()
const;
1890 void ClearBoundingBox();
1900 ON_BOOL32 Transform(
1905 ON_BOOL32 SwapCoordinates(
1910 ON_BOOL32 HasBrepForm()
const;
1973 double vertex_tolerance = ON_UNSET_VALUE
1984 double edge_tolerance = ON_UNSET_VALUE
2215 bool NewPlanarFaceLoop(
2219 ON_BOOL32 bDuplicateCurves =
true 2439 ON_BOOL32 bRev3d =
false,
2453 void SetVertices(
void);
2460 bool SetTrimIsoFlags();
2485 ON_BOOL32 bLazy =
true 2492 bool SetTrimTypeFlags( ON_BOOL32 bLazy =
false );
2493 bool SetTrimTypeFlags(
ON_BrepFace&, ON_BOOL32 bLazy =
false );
2494 bool SetTrimTypeFlags(
ON_BrepLoop&, ON_BOOL32 bLazy =
false );
2495 bool SetTrimTypeFlags(
ON_BrepTrim&, ON_BOOL32 bLazy =
false );
2499 bool GetTrim2dStart(
2513 bool GetTrim3dStart(
2534 bool SetVertexTolerance(
ON_BrepVertex& vertex, ON_BOOL32 bLazy =
false )
const;
2536 bool SetTrimTolerance(
ON_BrepTrim& trim, ON_BOOL32 bLazy =
false )
const;
2538 bool SetEdgeTolerance(
ON_BrepEdge& edge, ON_BOOL32 bLazy =
false )
const;
2558 bool SetVertexTolerances( ON_BOOL32 bLazy =
false );
2578 bool SetTrimTolerances( ON_BOOL32 bLazy =
false );
2598 bool SetEdgeTolerances( ON_BOOL32 bLazy =
false );
2612 bool SetTrimBoundingBox(
ON_BrepTrim& trim, ON_BOOL32 bLazy=
false );
2625 bool SetTrimBoundingBoxes(
ON_BrepLoop& loop, ON_BOOL32 bLazy=
false );
2641 bool SetTrimBoundingBoxes(
ON_BrepFace& face, ON_BOOL32 bLazy=
false );
2655 bool SetTrimBoundingBoxes( ON_BOOL32 bLazy=
false );
2680 void SetTolerancesBoxesAndFlags(
2681 ON_BOOL32 bLazy =
false,
2682 ON_BOOL32 bSetVertexTolerances =
true,
2683 ON_BOOL32 bSetEdgeTolerances =
true,
2684 ON_BOOL32 bSetTrimTolerances =
true,
2685 ON_BOOL32 bSetTrimIsoFlags =
true,
2686 ON_BOOL32 bSetTrimTypeFlags =
true,
2687 ON_BOOL32 bSetLoopTypeFlags =
true,
2688 ON_BOOL32 bSetTrimBoxes =
true 2705 int SurfaceUseCount(
2719 int EdgeCurveUseCount(
2734 int TrimCurveUseCount(
2755 ON_BOOL32 bRevCurveIfFaceRevIsTrue =
false 2776 ON_BOOL32 bRevCurveIfFaceRevIsTrue =
false 2808 int SolidOrientation()
const;
2822 bool IsSolid()
const;
2841 ON_BOOL32* pbIsOriented = NULL,
2842 ON_BOOL32* pbHasBoundary = NULL
2867 bool bStrictlyInside
2871 bool IsSurface()
const;
2894 bool LoopIsSurfaceBoundary(
2904 bool FlipReversedSurfaces();
3009 double angle_tolerance_radians = ON_PI/180.0
3018 void DeleteEdge(
ON_BrepEdge& edge, ON_BOOL32 bDeleteEdgeVertices);
3019 void DeleteTrim(
ON_BrepTrim& trim, ON_BOOL32 bDeleteTrimEdges);
3020 void DeleteLoop(
ON_BrepLoop& loop, ON_BOOL32 bDeleteLoopEdges);
3021 void DeleteFace(
ON_BrepFace& face, ON_BOOL32 bDeleteFaceEdges);
3022 void DeleteSurface(
int s_index);
3023 void Delete2dCurve(
int c2_index);
3024 void Delete3dCurve(
int c3_index);
3037 void LabelConnectedComponent(
3056 int LabelConnectedComponents();
3073 int GetConnectedComponents(
3075 bool bDuplicateMeshes
3107 bool HasRegionTopology()
const;
3125 void DestroyRegionTopology();
3141 ON_BOOL32 bDuplicateMeshes
3160 const int* face_index,
3161 ON_BOOL32 bDuplicateMeshes
3191 bool StandardizeEdgeCurve(
int edge_index,
bool bAdjustEnds );
3213 bool StandardizeEdgeCurve(
int edge_index,
bool bAdjustEnds,
int EdgeCurveUse );
3225 void StandardizeEdgeCurves(
bool bAdjustEnds );
3240 bool StandardizeTrimCurve(
int trim_index );
3249 void StandardizeTrimCurves();
3264 bool StandardizeFaceSurface(
int face_index );
3273 void StandardizeFaceSurfaces();
3276 ON_DEPRECATED
void StardardizeFaceSurfaces();
3323 bool ShrinkSurface(
ON_BrepFace& face,
int DisableSide=0 );
3344 bool ShrinkSurfaces();
3363 bool CullUnusedFaces();
3364 bool CullUnusedLoops();
3365 bool CullUnusedTrims();
3366 bool CullUnusedEdges();
3367 bool CullUnusedVertices();
3368 bool CullUnused3dCurves();
3369 bool CullUnused2dCurves();
3370 bool CullUnusedSurfaces();
3403 int current_edge_index,
3405 int* prev_endi = NULL
3428 int current_edge_index,
3430 int* next_endi = NULL
3450 ON_COMPONENT_INDEX ci
3467 ON_BrepVertex* Vertex( ON_COMPONENT_INDEX vertex_index )
const;
3483 ON_BrepEdge* Edge( ON_COMPONENT_INDEX edge_index )
const;
3499 ON_BrepTrim* Trim( ON_COMPONENT_INDEX trim_index )
const;
3515 ON_BrepLoop* Loop( ON_COMPONENT_INDEX loop_index )
const;
3531 ON_BrepFace* Face( ON_COMPONENT_INDEX face_index )
const;
3567 int MergeFaces(
int fid0,
int fid1);
3592 bool bExtractSingleSegments,
3594 bool bTrimCurves =
true 3622 bool bCloseTrimGap =
true,
3623 int vertex_index = -1
3650 bool bClearTolerances
3694 int RemoveWireEdges(
bool bDeleteVertices =
true );
3708 int RemoveWireVertices();
3713 void Set_user(
ON_U u);
3714 void Clear_vertex_user_i();
3715 void Clear_edge_user_i(
int);
3716 void Clear_edge_user_i();
3717 void Clear_trim_user_i();
3718 void Clear_loop_user_i();
3719 void Clear_face_user_i();
3720 void Clear_user_i();
3768 void SetTrimIsoFlag(
int,
double[6]);
3769 void SetTrimIsoFlag(
int);
3772 bool SetEdgeVertex(
const int,
const int,
const int );
3773 bool HopAcrossEdge(
int&,
int& )
const;
3774 bool SetTrimStartVertex(
const int,
const int);
3775 void SetLoopVertices(
const int);
3776 void ClearTrimVertices();
3777 void ClearEdgeVertices();
3780 bool SwapLoopParameters(
3783 bool SwapTrimParameters(
3788 bool IsValidTrim(
int trim_index,
ON_TextLog* text_log)
const;
3789 bool IsValidTrimTopology(
int trim_index,
ON_TextLog* text_log)
const;
3790 bool IsValidTrimGeometry(
int trim_index,
ON_TextLog* text_log)
const;
3791 bool IsValidTrimTolerancesAndFlags(
int trim_index,
ON_TextLog* text_log)
const;
3793 bool IsValidLoop(
int loop_index,
ON_TextLog* text_log)
const;
3794 bool IsValidLoopTopology(
int loop_index,
ON_TextLog* text_log)
const;
3795 bool IsValidLoopGeometry(
int loop_index,
ON_TextLog* text_log)
const;
3796 bool IsValidLoopTolerancesAndFlags(
int loop_index,
ON_TextLog* text_log)
const;
3798 bool IsValidFace(
int face_index,
ON_TextLog* text_log)
const;
3799 bool IsValidFaceTopology(
int face_index,
ON_TextLog* text_log)
const;
3800 bool IsValidFaceGeometry(
int face_index,
ON_TextLog* text_log)
const;
3801 bool IsValidFaceTolerancesAndFlags(
int face_index,
ON_TextLog* text_log)
const;
3803 bool IsValidEdge(
int edge_index,
ON_TextLog* text_log)
const;
3804 bool IsValidEdgeTopology(
int edge_index,
ON_TextLog* text_log)
const;
3805 bool IsValidEdgeGeometry(
int edge_index,
ON_TextLog* text_log)
const;
3806 bool IsValidEdgeTolerancesAndFlags(
int edge_index,
ON_TextLog* text_log)
const;
3808 bool IsValidVertex(
int vertex_index,
ON_TextLog* text_log)
const;
3809 bool IsValidVertexTopology(
int vertex_index,
ON_TextLog* text_log)
const;
3810 bool IsValidVertexGeometry(
int vertex_index,
ON_TextLog* text_log)
const;
3811 bool IsValidVertexTolerancesAndFlags(
int vertex_index,
ON_TextLog* text_log)
const;
3813 void SetTolsFromLegacyValues();
3860 ON_BOOL32 bTrimmedTriangles =
true,
4011 ON_BOOL32 bCapBottom,
4033 ON_BOOL32 bCapBottom,
4065 ON_BOOL32 bCapStart,
4115 ON_BOOL32 bDuplicateCurves =
true,
4142 bool ON_BrepExtrude(
4184 int ON_BrepExtrudeFace(
4218 int ON_BrepExtrudeLoop(
4248 int ON_BrepExtrudeEdge(
4279 int ON_BrepExtrudeVertex(
4309 int ON_BrepConeFace(
4338 bool ON_BrepConeLoop(
4367 int ON_BrepConeEdge(
4375 int ON_BrepMergeFaces(
ON_Brep&
B,
int fid0,
int fid1);
4378 bool ON_BrepMergeFaces(
ON_Brep&
B);
4390 void ON_BrepMergeAllEdges(
ON_Brep&
B);
int m_face_material_channel
virtual ON_BOOL32 SetEndPoint(ON_3dPoint end_point)
virtual unsigned int SizeOf() const
virtual ON_COMPONENT_INDEX ComponentIndex() const
friend class ON_BrepFaceSide
ON_SimpleArray< int > m_ti
ON_Point & operator=(const ON_Point &)
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
ON_SimpleArray< int > m_ti
bool ReadV1_TCODE_LEGACY_SHL(ON_Object **, ON_3dmObjectAttributes *)
ON_SimpleArray< int > m_ei
ON::object_type ObjectType() const
ON_BOOL32 Read(ON_BinaryArchive &)
ON__UINT32 DataCRC(ON__UINT32 current_remainder) const
ON_CurveProxy & operator=(const ON_CurveProxy &)
virtual ON__UINT32 DataCRC(ON__UINT32 current_remainder) const
ON_BOOL32 Read(ON_BinaryArchive &)
friend class ON_BrepRegionTopology
ON_BOOL32 Trim(const ON_Interval &domain)
ON_BrepFaceSideArray m_FS
void Dump(ON_TextLog &) const
ON_BOOL32 Write(ON_BinaryArchive &) const
bool ReadV1_TCODE_LEGACY_FAC(ON_Object **, ON_3dmObjectAttributes *)
friend class ON_BrepRegion
ON_SimpleArray< ON_BrepTrimPoint > m_pline
void Dump(ON_TextLog &) const
unsigned int SizeOf() const
friend class ON_BrepRegionTopology
ON_SimpleArray< int > m_li
friend class ON_BrepRegionTopologyUserData
ON_SimpleArray< int > m_fsi
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
ON_BOOL32 IsClosed(void) const
virtual ON_BOOL32 SetStartPoint(ON_3dPoint start_point)