CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GiShellToolkit.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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-2024 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
37class ODGI_EXPORT OdGiShellToolkit : public OdRxObject
38{
39public:
40
55
60 {
61 public:
62
72 virtual bool isFaceOrientedCorrectly( const OdGePoint3d* pts, const OdInt32* face ) const
73 {
74 return true;
75 }
76 };
77
89
99
110
121
126 {
133
138
146 OdGiShellEdgeVisibilityOptions( bool bDuplicate, bool bVisible, bool bNoFlatHoles = false ) : bDuplicateEdges( bDuplicate ), bVisibleOnly( bVisible ), bIgnoreFlatHoles( bNoFlatHoles ) {}
147 };
148
150
156
176 virtual bool addShell( OdUInt32 nPoints, const OdGePoint3d* pPoints, OdUInt32 nFaces, const OdInt32* pFaces, OdUInt8 options = OdGiShellToolkit::kTriangulateHoles ) = 0;
177
181 virtual void clear() = 0;
182
188 virtual bool hasDupilcateVertices() const = 0;
189
197 virtual OdUInt32 numSharpEdges( bool bOnlyCount = true ) const = 0;
198
206 virtual OdUInt32 numSingularEdges( bool bOnlyCount = true ) const = 0;
207
213 virtual OdUInt32 numDegeneratedFaces() const = 0;
214
224 virtual bool hasDuplicateFaces( OdUInt32* pFirstDuplicateFace = NULL, bool bRollFaces = false ) const = 0;
225
233 virtual bool checkFacesOrientation() const = 0;
234
244 virtual bool checkFacesOrientation( const OdGiShellFaceOrientationCallback* pCallback ) const = 0;
245
249 virtual void unifyVertices() = 0;
250
254 virtual void removeDegenerateFaces() = 0;
255
263 virtual void removeDuplicateFaces( bool bRollFaces = false ) = 0;
264
277 virtual bool fixFaceOrientation( bool bRestoreModel = true ) = 0;
278
293 virtual bool fixFaceOrientation( const OdGiShellFaceOrientationCallback* pCallback, bool bRestoreModel = true ) = 0;
294
303 virtual OdGeTol& tolerance() = 0;
304
310 virtual const OdGeTol& tolerance() const = 0;
311
316 virtual OdUInt32 numVertices() const = 0;
317
322 virtual const OdGePoint3d* vertices() const = 0;
323
329 virtual OdUInt32 faceListSize() const = 0;
330
337 virtual const OdInt32* faceList() const = 0;
338
349 virtual void getSharpEdges( OdArray< OdGiShellEdgeDescription >& edges, bool bOnlyCount = true, bool bIgnoreZeroHoldes = false ) const = 0;
350
357 virtual void getSingularEdges( OdArray< OdGiShellToolkit::OdGiShellEdgeDescription >& edges, bool bOnlyCount = true ) const = 0;
358
366 virtual void getIncorrectOrientedFaces( OdArray< OdGiShellFaceDescription >& faces, bool bAddNotOriented = true ) const = 0;
367
376 virtual void getIncorrectOrientedFaces( const OdGiShellFaceOrientationCallback* pCallback, OdArray< OdGiShellFaceDescription >& faces, bool bAddNotOriented = true ) const = 0;
377
387 virtual bool getOriginalFaceDescription( OdUInt32 nFaceOffset, OdGiShellOriginalFaceDescription& result ) const = 0;
388
400
405 virtual OdUInt32 numNonTriangleFaces() const = 0;
406
410 virtual void triangulate() = 0;
411
425 virtual bool calculateFaceNormals( OdArray< OdGeVector3d >& normals ) const = 0;
426
440 virtual bool calculateAverageVertexNormals( OdArray< OdGeVector3d >& normals ) const = 0;
441
454
472 virtual bool calculateAverageVertexNormals( OdArray< OdGeVector3d >& normals, double creaseAngelLimit, OdGiCalculateNormalCallback pCallback = NULL ) const = 0;
473
486 virtual bool calculateEdgeVisibilitiesByCreaseAngle( OdArray< bool >& visibilities, double creaseAngle ) const = 0;
487
505};
506
510
511#endif
512
513
true
false
Definition DimVarDefs.h:165
#define ODGI_EXPORT
Definition GiExport.h:35
OdSmartPtr< OdGiShellToolkit > OdGiShellToolkitPtr
unsigned int OdUInt32
int OdInt32
unsigned char OdUInt8
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 bool calculateAverageVertexNormals(OdArray< OdGeVector3d > &normals, double creaseAngelLimit, OdGiCalculateNormalCallback pCallback=NULL) 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 bool calculateEdgeVisibilitiesByCreaseAngle(OdArray< OdGiShellEdgeVisibilityDescription > &visibilities, double creaseAngle, const OdGiShellEdgeVisibilityOptions &options=OdGiShellEdgeVisibilityOptions()) const =0
virtual bool calculateAverageVertexNormals(OdArray< OdGeVector3d > &normals) const =0
virtual const OdGePoint3d * vertices() const =0
virtual void unifyVertices()=0
virtual void triangulate()=0
OdGeVector3d(* OdGiCalculateNormalCallback)(OdGiShellToolkit *pToolkit, OdUInt32 nVertexIndex)
virtual bool addShell(OdUInt32 nPoints, const OdGePoint3d *pPoints, OdUInt32 nFaces, const OdInt32 *pFaces, OdUInt8 options=OdGiShellToolkit::kTriangulateHoles)=0
virtual bool calculateEdgeVisibilitiesByCreaseAngle(OdArray< bool > &visibilities, double creaseAngle) const =0
virtual void filterEdgesByCreaseAngle(OdArray< OdGiShellToolkit::OdGiShellEdgeDescription > &edges, double dAngle) const =0
virtual bool calculateFaceNormals(OdArray< OdGeVector3d > &normals) const =0
virtual OdGeTol & tolerance()=0
virtual void clear()=0
virtual void getSharpEdges(OdArray< OdGiShellEdgeDescription > &edges, bool bOnlyCount=true, bool bIgnoreZeroHoldes=false) const =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
OdGiShellEdgeVisibilityOptions(bool bDuplicate, bool bVisible, bool bNoFlatHoles=false)