CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
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
34{
35public:
36
41 {
43 kUnifyVertices = 1,
45 kTriangulateHoles = 1 << 1,
47 kForceTriangulation = 1 << 2
48 };
49
54 {
55 public:
56
66 virtual bool isFaceOrientedCorrectly( const OdGePoint3d* pts, const OdInt32* face ) const
67 {
68 return true;
69 }
70 };
71
76 {
81 };
82
87 {
90 };
91
96 {
101 };
102//DOM-IGNORE-BEGIN
104//DOM-IGNORE-END
105
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
329
335 virtual OdUInt32 numNonTriangleFaces() const = 0;
336
340 virtual void triangulate() = 0;
341};
346
347#endif
348
349
#define ODGI_EXPORT
Definition: GiExport.h:35
OdSmartPtr< OdGiShellToolkit > OdGiShellToolkitPtr
unsigned int OdUInt32
int OdInt32
unsigned char OdUInt8
Definition: GeTol.h:49
virtual bool isFaceOrientedCorrectly(const OdGePoint3d *pts, const OdInt32 *face) const
virtual bool getOriginalFaceDescription(OdUInt32 nFaceOffset, OdGiShellOriginalFaceDescription &result) const =0
virtual bool hasDupilcateVertices() const =0
virtual OdUInt32 numSingularEdges(bool bOnlyCount=true) const =0
virtual const OdGeTol & tolerance() const =0
virtual OdUInt32 numDegeneratedFaces() const =0
virtual const OdInt32 * faceList() const =0
virtual void removeDegenerateFaces()=0
virtual bool checkFacesOrientation(const OdGiShellFaceOrientationCallback *pCallback) const =0
virtual OdUInt32 numSharpEdges(bool bOnlyCount=true) const =0
virtual bool fixFaceOrientation(const OdGiShellFaceOrientationCallback *pCallback, bool bRestoreModel=true)=0
virtual bool fixFaceOrientation(bool bRestoreModel=true)=0
virtual void getIncorrectOrientedFaces(const OdGiShellFaceOrientationCallback *pCallback, OdArray< OdGiShellFaceDescription > &faces, bool bAddNotOriented=true) const =0
static OdSmartPtr< OdGiShellToolkit > create()
virtual void getSingularEdges(OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, bool bOnlyCount=true) const =0
virtual OdUInt32 numNonTriangleFaces() const =0
virtual const OdGePoint3d * vertices() const =0
virtual void unifyVertices()=0
virtual void triangulate()=0
virtual void addShell(OdUInt32 nPoints, const OdGePoint3d *pPoints, OdUInt32 nFaces, const OdInt32 *pFaces, OdUInt8 options=OdGiShellToolkit::kTriangulateHoles)=0
virtual void filterEdgesByCreaseAngle(OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, double dAngle) const =0
virtual OdGeTol & tolerance()=0
virtual void getSharpEdges(OdArray< OdGiShellEdgeDescription > &edges, bool bOnlyCount=true) const =0
virtual void clear()=0
virtual OdUInt32 faceListSize() const =0
virtual OdUInt32 numVertices() const =0
virtual void getIncorrectOrientedFaces(OdArray< OdGiShellFaceDescription > &faces, bool bAddNotOriented=true) const =0
ODRX_DECLARE_MEMBERS(OdGiShellToolkit)
virtual bool hasDuplicateFaces(OdUInt32 *pFirstDuplicateFace=NULL, bool bRollFaces=false) const =0
virtual bool checkFacesOrientation() const =0
virtual void removeDuplicateFaces(bool bRollFaces=false)=0