CFx SDK Documentation
2024 SP0
Loading...
Searching...
No Matches
SDK
CFx
dd_inc
Gi
GiShellToolkit.h
Go to the documentation of this file.
1
2
// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3
// All rights reserved.
4
//
5
// This software and its documentation and related materials are owned by
6
// the Alliance. The software may only be incorporated into application
7
// programs owned by members of the Alliance, subject to a signed
8
// Membership Agreement and Supplemental Software License Agreement with the
9
// Alliance. The structure and organization of this software are the valuable
10
// trade secrets of the Alliance and its suppliers. The software is also
11
// protected by copyright law and international treaty provisions. Application
12
// programs incorporating this software must include the following statement
13
// with their copyright notices:
14
//
15
// This application incorporates Open Design Alliance software pursuant to a license
16
// agreement with Open Design Alliance.
17
// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18
// All rights reserved.
19
//
20
// By use of this software, its documentation or related materials, you
21
// acknowledge and accept the above terms.
23
#ifndef ODGI_SHELLTOOLKIT_H_INCLUDED
24
#define ODGI_SHELLTOOLKIT_H_INCLUDED
25
26
#include "
OdVector.h
"
27
#include "
Ge/GeExtents3d.h
"
28
#include "
GiGeometry.h
"
29
33
class
ODGI_EXPORT
OdGiShellToolkit
:
public
OdRxObject
34
{
35
public
:
36
40
enum
ShellToolkitOption
41
{
43
kUnifyVertices = 1,
45
kTriangulateHoles = 1 << 1,
47
kForceTriangulation = 1 << 2
48
};
49
53
class
ODGI_EXPORT
OdGiShellFaceOrientationCallback
54
{
55
public
:
56
66
virtual
bool
isFaceOrientedCorrectly
(
const
OdGePoint3d
* pts,
const
OdInt32
* face )
const
67
{
68
return
true
;
69
}
70
};
71
75
struct
ODGI_EXPORT
OdGiShellOriginalFaceDescription
76
{
78
OdUInt32
nShell
;
80
OdUInt32
nOffset
;
81
};
82
86
struct
ODGI_EXPORT
OdGiShellFaceDescription
87
{
89
OdUInt32
nOffset
;
90
};
91
95
struct
ODGI_EXPORT
OdGiShellEdgeDescription
96
{
98
OdGiShellFaceDescription
face
;
100
OdUInt32
nEdge
;
101
};
102
//DOM-IGNORE-BEGIN
103
ODRX_DECLARE_MEMBERS
(
OdGiShellToolkit
);
104
//DOM-IGNORE-END
105
110
static
OdSmartPtr<OdGiShellToolkit>
create
();
111
125
virtual
void
addShell
(
OdUInt32
nPoints,
const
OdGePoint3d
* pPoints,
OdUInt32
nFaces,
const
OdInt32
* pFaces,
OdUInt8
options =
OdGiShellToolkit::kTriangulateHoles
) = 0;
126
130
virtual
void
clear
() = 0;
131
137
virtual
bool
hasDupilcateVertices
()
const
= 0;
138
145
virtual
OdUInt32
numSharpEdges
(
bool
bOnlyCount =
true
)
const
= 0;
146
153
virtual
OdUInt32
numSingularEdges
(
bool
bOnlyCount =
true
)
const
= 0;
154
160
virtual
OdUInt32
numDegeneratedFaces
()
const
= 0;
161
171
virtual
bool
hasDuplicateFaces
(
OdUInt32
* pFirstDuplicateFace = NULL,
bool
bRollFaces =
false
)
const
= 0;
172
180
virtual
bool
checkFacesOrientation
()
const
= 0;
181
190
virtual
bool
checkFacesOrientation
(
const
OdGiShellFaceOrientationCallback
* pCallback )
const
= 0;
191
195
virtual
void
unifyVertices
() = 0;
196
200
virtual
void
removeDegenerateFaces
() = 0;
201
209
virtual
void
removeDuplicateFaces
(
bool
bRollFaces =
false
) = 0;
210
221
virtual
bool
fixFaceOrientation
(
bool
bRestoreModel =
true
) = 0;
222
234
virtual
bool
fixFaceOrientation
(
const
OdGiShellFaceOrientationCallback
* pCallback,
bool
bRestoreModel =
true
) = 0;
235
241
virtual
OdGeTol
&
tolerance
() = 0;
242
248
virtual
const
OdGeTol
&
tolerance
()
const
= 0;
249
255
virtual
OdUInt32
numVertices
()
const
= 0;
256
262
virtual
const
OdGePoint3d
*
vertices
()
const
= 0;
263
269
virtual
OdUInt32
faceListSize
()
const
= 0;
270
276
virtual
const
OdInt32
*
faceList
()
const
= 0;
277
284
virtual
void
getSharpEdges
(
OdArray< OdGiShellEdgeDescription >
& edges,
bool
bOnlyCount =
true
)
const
= 0;
285
292
virtual
void
getSingularEdges
(
OdArray< OdGiShellToolkit::OdGiShellEdgeDescription >
& edges,
bool
bOnlyCount =
true
)
const
= 0;
293
300
virtual
void
getIncorrectOrientedFaces
(
OdArray< OdGiShellFaceDescription >
& faces,
bool
bAddNotOriented =
true
)
const
= 0;
301
309
virtual
void
getIncorrectOrientedFaces
(
const
OdGiShellFaceOrientationCallback
* pCallback,
OdArray< OdGiShellFaceDescription >
& faces,
bool
bAddNotOriented =
true
)
const
= 0;
310
318
virtual
bool
getOriginalFaceDescription
(
OdUInt32
nFaceOffset,
OdGiShellOriginalFaceDescription
& result )
const
= 0;
319
328
virtual
void
filterEdgesByCreaseAngle
(
OdArray< OdGiShellToolkit::OdGiShellEdgeDescription >
& edges,
double
dAngle )
const
= 0;
329
335
virtual
OdUInt32
numNonTriangleFaces
()
const
= 0;
336
340
virtual
void
triangulate
() = 0;
341
};
345
typedef
OdSmartPtr<OdGiShellToolkit>
OdGiShellToolkitPtr
;
346
347
#endif
348
349
GeExtents3d.h
ODGI_EXPORT
#define ODGI_EXPORT
Definition:
GiExport.h:35
GiGeometry.h
OdGiShellToolkitPtr
OdSmartPtr< OdGiShellToolkit > OdGiShellToolkitPtr
Definition:
GiShellToolkit.h:345
OdUInt32
unsigned int OdUInt32
Definition:
OdPlatformSettings.h:814
OdInt32
int OdInt32
Definition:
OdPlatformSettings.h:813
OdUInt8
unsigned char OdUInt8
Definition:
OdPlatformSettings.h:790
OdVector.h
OdArray
Definition:
OdArray.h:829
OdGePoint3d
Definition:
GePoint3d.h:57
OdGeTol
Definition:
GeTol.h:49
OdGiShellToolkit::OdGiShellFaceOrientationCallback
Definition:
GiShellToolkit.h:54
OdGiShellToolkit::OdGiShellFaceOrientationCallback::isFaceOrientedCorrectly
virtual bool isFaceOrientedCorrectly(const OdGePoint3d *pts, const OdInt32 *face) const
Definition:
GiShellToolkit.h:66
OdGiShellToolkit
Definition:
GiShellToolkit.h:34
OdGiShellToolkit::getOriginalFaceDescription
virtual bool getOriginalFaceDescription(OdUInt32 nFaceOffset, OdGiShellOriginalFaceDescription &result) const =0
OdGiShellToolkit::hasDupilcateVertices
virtual bool hasDupilcateVertices() const =0
OdGiShellToolkit::numSingularEdges
virtual OdUInt32 numSingularEdges(bool bOnlyCount=true) const =0
OdGiShellToolkit::tolerance
virtual const OdGeTol & tolerance() const =0
OdGiShellToolkit::numDegeneratedFaces
virtual OdUInt32 numDegeneratedFaces() const =0
OdGiShellToolkit::faceList
virtual const OdInt32 * faceList() const =0
OdGiShellToolkit::removeDegenerateFaces
virtual void removeDegenerateFaces()=0
OdGiShellToolkit::ShellToolkitOption
ShellToolkitOption
Definition:
GiShellToolkit.h:41
OdGiShellToolkit::kTriangulateHoles
@ kTriangulateHoles
Definition:
GiShellToolkit.h:45
OdGiShellToolkit::checkFacesOrientation
virtual bool checkFacesOrientation(const OdGiShellFaceOrientationCallback *pCallback) const =0
OdGiShellToolkit::numSharpEdges
virtual OdUInt32 numSharpEdges(bool bOnlyCount=true) const =0
OdGiShellToolkit::fixFaceOrientation
virtual bool fixFaceOrientation(const OdGiShellFaceOrientationCallback *pCallback, bool bRestoreModel=true)=0
OdGiShellToolkit::fixFaceOrientation
virtual bool fixFaceOrientation(bool bRestoreModel=true)=0
OdGiShellToolkit::getIncorrectOrientedFaces
virtual void getIncorrectOrientedFaces(const OdGiShellFaceOrientationCallback *pCallback, OdArray< OdGiShellFaceDescription > &faces, bool bAddNotOriented=true) const =0
OdGiShellToolkit::create
static OdSmartPtr< OdGiShellToolkit > create()
OdGiShellToolkit::getSingularEdges
virtual void getSingularEdges(OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, bool bOnlyCount=true) const =0
OdGiShellToolkit::numNonTriangleFaces
virtual OdUInt32 numNonTriangleFaces() const =0
OdGiShellToolkit::vertices
virtual const OdGePoint3d * vertices() const =0
OdGiShellToolkit::unifyVertices
virtual void unifyVertices()=0
OdGiShellToolkit::triangulate
virtual void triangulate()=0
OdGiShellToolkit::addShell
virtual void addShell(OdUInt32 nPoints, const OdGePoint3d *pPoints, OdUInt32 nFaces, const OdInt32 *pFaces, OdUInt8 options=OdGiShellToolkit::kTriangulateHoles)=0
OdGiShellToolkit::filterEdgesByCreaseAngle
virtual void filterEdgesByCreaseAngle(OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, double dAngle) const =0
OdGiShellToolkit::tolerance
virtual OdGeTol & tolerance()=0
OdGiShellToolkit::getSharpEdges
virtual void getSharpEdges(OdArray< OdGiShellEdgeDescription > &edges, bool bOnlyCount=true) const =0
OdGiShellToolkit::clear
virtual void clear()=0
OdGiShellToolkit::faceListSize
virtual OdUInt32 faceListSize() const =0
OdGiShellToolkit::numVertices
virtual OdUInt32 numVertices() const =0
OdGiShellToolkit::getIncorrectOrientedFaces
virtual void getIncorrectOrientedFaces(OdArray< OdGiShellFaceDescription > &faces, bool bAddNotOriented=true) const =0
OdGiShellToolkit::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGiShellToolkit)
OdGiShellToolkit::hasDuplicateFaces
virtual bool hasDuplicateFaces(OdUInt32 *pFirstDuplicateFace=NULL, bool bRollFaces=false) const =0
OdGiShellToolkit::checkFacesOrientation
virtual bool checkFacesOrientation() const =0
OdGiShellToolkit::removeDuplicateFaces
virtual void removeDuplicateFaces(bool bRollFaces=false)=0
OdRxObject
Definition:
RxObject.h:564
OdSmartPtr
Definition:
SmartPtr.h:58
OdGiShellToolkit::OdGiShellEdgeDescription
Definition:
GiShellToolkit.h:96
OdGiShellToolkit::OdGiShellEdgeDescription::face
OdGiShellFaceDescription face
Definition:
GiShellToolkit.h:98
OdGiShellToolkit::OdGiShellEdgeDescription::nEdge
OdUInt32 nEdge
Definition:
GiShellToolkit.h:100
OdGiShellToolkit::OdGiShellFaceDescription
Definition:
GiShellToolkit.h:87
OdGiShellToolkit::OdGiShellFaceDescription::nOffset
OdUInt32 nOffset
Definition:
GiShellToolkit.h:89
OdGiShellToolkit::OdGiShellOriginalFaceDescription
Definition:
GiShellToolkit.h:76
OdGiShellToolkit::OdGiShellOriginalFaceDescription::nShell
OdUInt32 nShell
Definition:
GiShellToolkit.h:78
OdGiShellToolkit::OdGiShellOriginalFaceDescription::nOffset
OdUInt32 nOffset
Definition:
GiShellToolkit.h:80
Generated on Wed Apr 5 2023 17:29:18