CFx SDK Documentation  2020SP3
DbSubDMesh.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 
24 
25 
26 
27 #ifndef _OD_DB_SUBDMESH
28 #define _OD_DB_SUBDMESH
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbEntity.h"
33 #include "DoubleArray.h"
34 #include "DbSurface.h"
35 #include "Db3dSolid.h"
36 #include "CmEntityColorArray.h"
37 
38 #include "Int32Array.h"
39 #include "Gi/GiGeometry.h"
40 
41 class OdDbSurface;
42 class OdDb3dSolid;
43 
53 {
54 public:
56 
58 
59  virtual bool subWorldDraw(
60  OdGiWorldDraw* pWd) const;
61 
62  virtual OdUInt32 subSetAttributes(OdGiDrawableTraits* pTraits) const;
63 
65  OdDbObjectId& replaceId,
66  bool& exchangeXData);
67 
69  OdDbDwgFiler* pFiler);
70 
71  virtual void dwgOutFields(
72  OdDbDwgFiler* pFiler) const;
73 
75  OdDbDxfFiler* pFiler);
76 
77  virtual void dxfOutFields(
78  OdDbDxfFiler* pFiler) const;
79 
81  const OdGeMatrix3d& xfm);
82 
84  OdGeExtents3d& extents) const;
85 
87  OdRxObjectPtrArray& entitySet) const;
88 
89  OdResult setSubDMesh (const OdGePoint3dArray& vertexArray,
90  const OdInt32Array& faceArray,
91  OdInt32 subDLevel);
92 
93  OdResult setSphere (double radius,
94  OdInt32 divAxis,
95  OdInt32 divHeight,
96  OdInt32 subDLevel);
97 
98  OdResult setCylinder (double majorRadius,
99  double minorRadius,
100  double height,
101  OdInt32 divAxis,
102  OdInt32 divHeight,
103  OdInt32 divCap,
104  OdInt32 subDLevel);
105 
106  OdResult setCone (double majorRadius,
107  double minorRadius,
108  double height,
109  OdInt32 divAxis,
110  OdInt32 divHeight,
111  OdInt32 divCap,
112  double radiusRatio,
113  OdInt32 subDLevel);
114 
115  OdResult setTorus (double majorRadius,
116  OdInt32 divSection,
117  OdInt32 divSweepPath,
118  double sectionRadiusRatio,
119  double sectionRotate,
120  OdInt32 subDLevel);
121 
122  OdResult setBox (double xLen,
123  double yLen,
124  double zLen,
125  OdInt32 divX,
126  OdInt32 divY,
127  OdInt32 divZ,
128  OdInt32 subDLevel);
129 
130  OdResult setWedge (double xLen,
131  double yLen,
132  double zLen,
133  OdInt32 divLength,
134  OdInt32 divWidth,
135  OdInt32 divHeight,
136  OdInt32 divSlope,
137  OdInt32 divCap,
138  OdInt32 subDLevel);
139 
140  OdResult setPyramid (double radius,
141  double height,
142  OdInt32 divLength,
143  OdInt32 divHeight,
144  OdInt32 divCap,
145  OdInt32 nSides,
146  double radiusRatio,
147  OdInt32 subDLevel);
148 
153  OdResult subdLevel (OdInt32& result) const;
154 
155  OdResult splitFace (const OdDbSubentId& subentFaceId,
156  const OdDbSubentId& subent0,
157  const OdGePoint3d& point0,
158  const OdDbSubentId& subent1,
159  const OdGePoint3d& point1);
160 
162  double length,
163  const OdGeVector3d& dir,
164  double taper);
165 
167  const OdGePoint3dArray& alongPath,
168  double taper);
169 
170  OdResult isWatertight (bool& result) const;
171 
172  OdResult numOfFaces (OdInt32& result) const;
174  OdResult numOfSubDividedFacesAt (const OdDbFullSubentPathArray& subentPaths, OdInt32& result) const;
175  OdResult numOfVertices (OdInt32& result) const;
177  OdResult numOfEdges (OdInt32& result) const;
178 
179  OdResult getVertices (OdGePoint3dArray& vertexArray) const;
180  OdResult getEdgeArray (OdInt32Array& edgeArray) const;
181  OdResult getFaceArray (OdInt32Array& faceArray) const;
183 
185  //FELIX_CHANGE_BEGIN
187  //FELIX_CHANGE_END
190  //FELIX_CHANGE_BEGIN
192  OdInt32Array& edgeArray,
193  OdInt32Array& faceArray ) const;
195  OdInt32Array& edgeArray,
196  OdInt32Array& faceArray,
197  OdGeDoubleArray& newCreases,
198  OdUInt32Array& edgeData ) const;
199  //FELIX_CHANGE_END
200 
201  OdResult getVertexAt (OdInt32 nIndex, OdGePoint3d& vertex) const;
202  OdResult setVertexAt (OdInt32 nIndex, const OdGePoint3d& vertex);
203  OdResult getVertexAt (const OdDbSubentId& id, OdGePoint3d& vertex) const;
204  OdResult setVertexAt (const OdDbSubentId& id, const OdGePoint3d& vertex);
205 
208 
209  OdResult setCrease (double creaseVal);
210  OdResult setCrease (const OdDbFullSubentPathArray& subentPaths, double creaseVal);
211  OdResult getCrease (const OdDbFullSubentPathArray& subentPaths, OdDoubleArray& result) const;
212  OdResult getCrease (const OdDbSubentId& id, double& result) const;
213 
216  OdDbFullSubentPathArray& subentPaths) const;
217 
220  OdDbFullSubentPathArray& subentPaths) const;
221 
222  OdResult convertToSurface (bool bConvertAsSmooth, const OdDbSubentId& id, OdDbSurfacePtr& pSurface) const;
223  OdResult convertToSurface (bool bConvertAsSmooth, bool optimize, OdDbSurfacePtr& pSurface) const;
224  OdResult convertToSolid (bool bConvertAsSmooth, bool optimize, OdDb3dSolidPtr& pSolid) const;
225 
226  OdResult getSubentColor (const OdDbSubentId& id, OdCmColor& color) const;
227  OdResult setSubentColor (const OdDbSubentId& id, const OdCmColor& color);
228  OdResult getSubentMaterial (const OdDbSubentId& id, OdDbObjectId& material) const;
229  OdResult setSubentMaterial (const OdDbSubentId& id, const OdDbObjectId& material);
232 
233  OdResult getFacePlane (const OdDbSubentId& id, OdGePlane& facePlane) const;
234 
235  OdResult computeVolume (double &retVolume) const;
236  OdResult computeSurfaceArea (double &retSurfArea) const;
237 
238 
239 
246 
248  OdGsMarker gsMark,
249  const OdGePoint3d& ,
250  const OdGeMatrix3d& ,
251  OdDbFullSubentPathArray& subentPaths,
252  const OdDbObjectIdArray* pEntAndInsertStack ) const;
254  OdGsMarkerArray& gsMarkers) const;
255 };
256 
261 
267 {
276 
278  : faceterDevSurface(0.)
279  , faceterDevNormal(0.)
280  , faceterGridRatio(0.)
282  , faceterMaxGrid(0)
283  , faceterMinUGrid(0)
284  , faceterMinVGrid(0)
285  , faceterMeshType(0) {}
286 };
287 
289 
291  const OdDbFaceterSettings *faceter,
292  OdGePoint3dArray& vertexArray,
293  OdInt32Array& faceArray,
294  OdGiFaceData*& faceData);
295 
296 
297 #include "TD_PackPop.h"
298 
299 #endif
OdDbSubDMesh::numOfEdges
OdResult numOfEdges(OdInt32 &result) const
OdDbSubDMesh::getVertexColorArray
OdResult getVertexColorArray(OdCmEntityColorArray &arrColor)
OdDbSubDMesh::extrudeFaces
OdResult extrudeFaces(const OdDbFullSubentPathArray &subentPaths, double length, const OdGeVector3d &dir, double taper)
OdResult
OdResult
Definition: OdResult.h:29
OdDbSubDMesh::setSubDMesh
OdResult setSubDMesh(const OdGePoint3dArray &vertexArray, const OdInt32Array &faceArray, OdInt32 subDLevel)
OdDbSubDMesh::subdRefine
OdResult subdRefine()
OdDbSubDMesh::decomposeForSave
virtual OdDbObjectPtr decomposeForSave(OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
OdGePlane
Definition: GePlane.h:45
OdDbSubDMesh::getNormalArray
OdResult getNormalArray(OdGeVector3dArray &normalArray) const
OdGeVector3d
Definition: GeVector3d.h:54
OdDbSubDMesh::setSubentMaterialMapper
OdResult setSubentMaterialMapper(const OdDbSubentId &id, const OdGiMapper &mapper)
OdDbSubDMesh::getSubentColor
OdResult getSubentColor(const OdDbSubentId &id, OdCmColor &color) const
OdDbSubDMesh::numOfSubDividedVertices
OdResult numOfSubDividedVertices(OdInt32 &result) const
OdDbSubDMesh::subGetGeomExtents
OdResult subGetGeomExtents(OdGeExtents3d &extents) const
Int32Array.h
OdDbSubDMesh::setSphere
OdResult setSphere(double radius, OdInt32 divAxis, OdInt32 divHeight, OdInt32 subDLevel)
OdDbSubDMesh::getSubentMaterial
OdResult getSubentMaterial(const OdDbSubentId &id, OdDbObjectId &material) const
OdDbSubDMesh::setVertexNormalArray
OdResult setVertexNormalArray(OdGeVector3dArray &arrNorm)
OdDbSubDMesh::getSubDividedVertexAt
OdResult getSubDividedVertexAt(const OdDbSubentId &id, OdGePoint3d &vertex) const
OdDbSubDMesh::setCone
OdResult setCone(double majorRadius, double minorRadius, double height, OdInt32 divAxis, OdInt32 divHeight, OdInt32 divCap, double radiusRatio, OdInt32 subDLevel)
MeshFaceterSettings::faceterDevNormal
double faceterDevNormal
Definition: DbSubDMesh.h:269
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdDbSubDMesh::setCrease
OdResult setCrease(double creaseVal)
OdDbSubDMesh::getSubentMaterialMapper
OdResult getSubentMaterialMapper(const OdDbSubentId &id, OdGiMapper &mapper) const
OdDbSurface
Definition: DbSurface.h:76
OdDbObjectId
Definition: DbObjectId.h:99
OdDbSubDMesh::subdDivideUp
OdResult subdDivideUp()
OdDbSubDMeshPtr
OdSmartPtr< OdDbSubDMesh > OdDbSubDMeshPtr
Definition: DbSubDMesh.h:260
OdDb3dSolid
Definition: Db3dSolid.h:77
OdDbSubDMesh::getFaceArray
OdResult getFaceArray(OdInt32Array &faceArray) const
Db3dSolid.h
OdDbSubDMesh::numOfFaces
OdResult numOfFaces(OdInt32 &result) const
OdDbSubDMesh::getSubDividedVertices
OdResult getSubDividedVertices(OdGePoint3dArray &vertexArray) const
OdDbSubDMesh::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbFullSubentPath
Definition: DbSubentId.h:49
DoubleArray.h
OdDbSubDMesh::setVertexTextureArray
OdResult setVertexTextureArray(OdGePoint3dArray &arrPts)
OdDbSubDMesh::computeVolume
OdResult computeVolume(double &retVolume) const
OdArray< OdRxObjectPtr >
OdDbSubDMesh::getVertexAt
OdResult getVertexAt(const OdDbSubentId &id, OdGePoint3d &vertex) const
TD_PackPop.h
OdGsMarker
ptrdiff_t OdGsMarker
Definition: OdPlatformSettings.h:889
OdDbSubDMesh::getFacePlane
OdResult getFacePlane(const OdDbSubentId &id, OdGePlane &facePlane) const
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdInt16
short OdInt16
Definition: OdPlatformSettings.h:756
OdDbSubDMesh::setCylinder
OdResult setCylinder(double majorRadius, double minorRadius, double height, OdInt32 divAxis, OdInt32 divHeight, OdInt32 divCap, OdInt32 subDLevel)
OdDbSubDMesh::subdRefine
OdResult subdRefine(const OdDbFullSubentPathArray &subentPaths)
OdDbSubDMesh::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
MeshFaceterSettings::faceterMaxGrid
OdUInt16 faceterMaxGrid
Definition: DbSubDMesh.h:272
OdDbSubDMesh::getCrease
OdResult getCrease(const OdDbSubentId &id, double &result) const
OdDb::DwgVersion
DwgVersion
Definition: OdaDefs.h:46
OdDbSubDMesh::getVertexNormalArray
OdResult getVertexNormalArray(OdGeVector3dArray &arrNorm)
OdDbSubDMesh::getVertices
OdResult getVertices(OdGePoint3dArray &vertexArray) const
OdDbSubDMesh::setVertexAt
OdResult setVertexAt(const OdDbSubentId &id, const OdGePoint3d &vertex)
OdGiFaceData
Definition: GiGeometry.h:245
OdDbSubDMesh::setSubentColor
OdResult setSubentColor(const OdDbSubentId &id, const OdCmColor &color)
OdDbSubDMesh::subdLevel
OdResult subdLevel(OdInt32 &result) const
OdDbSubDMesh
Definition: DbSubDMesh.h:53
OdDbSubDMesh::getEdgeArray
OdResult getEdgeArray(OdInt32Array &edgeArray) const
OdSmartPtr< OdDbObject >
OdDbSubDMesh::convertToSurface
OdResult convertToSurface(bool bConvertAsSmooth, const OdDbSubentId &id, OdDbSurfacePtr &pSurface) const
OdGePoint3d
Definition: GePoint3d.h:55
DbEntity.h
OdDbSubDMesh::getSubDividedVertexAt
OdResult getSubDividedVertexAt(OdInt32 nIndex, OdGePoint3d &vertex) const
OdDb::SubentType
SubentType
Definition: DbBaseSubentId.h:38
OdDbSubDMesh::subSetAttributes
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
OdDbSubDMesh::getSubDividedData
OdResult getSubDividedData(OdGePoint3dArray &vertexArray, OdInt32Array &edgeArray, OdInt32Array &faceArray) const
OdDbSubDMesh::setVertexColorArray
OdResult setVertexColorArray(OdCmEntityColorArray &arrColor)
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdDbSubDMesh::splitFace
OdResult splitFace(const OdDbSubentId &subentFaceId, const OdDbSubentId &subent0, const OdGePoint3d &point0, const OdDbSubentId &subent1, const OdGePoint3d &point1)
OdDbSubDMesh::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbSubDMesh)
MeshFaceterSettings
Definition: DbSubDMesh.h:267
OdDbSubDMesh::getAdjacentSubentPath
OdResult getAdjacentSubentPath(const OdDbFullSubentPath &path, OdDb::SubentType type, OdDbFullSubentPathArray &subentPaths) const
GiGeometry.h
OdDbSubDMesh::convertToSurface
OdResult convertToSurface(bool bConvertAsSmooth, bool optimize, OdDbSurfacePtr &pSurface) const
OdDbSubDMesh::subdDivideDown
OdResult subdDivideDown()
oddbGetObjectMesh
TOOLKIT_EXPORT OdResult oddbGetObjectMesh(OdDbObject *pObj, const OdDbFaceterSettings *faceter, OdGePoint3dArray &vertexArray, OdInt32Array &faceArray, OdGiFaceData *&faceData)
OdDbSubDMesh::getSubDividedData
OdResult getSubDividedData(OdGePoint3dArray &vertexArray, OdInt32Array &edgeArray, OdInt32Array &faceArray, OdGeDoubleArray &newCreases, OdUInt32Array &edgeData) const
OdDbSubDMesh::convertToSolid
OdResult convertToSolid(bool bConvertAsSmooth, bool optimize, OdDb3dSolidPtr &pSolid) const
OdDbSubDMesh::setVertexAt
OdResult setVertexAt(OdInt32 nIndex, const OdGePoint3d &vertex)
OdDbSubDMesh::getSubDividedFaceArray
OdResult getSubDividedFaceArray(OdInt32Array &faceArray) const
OdDbSubDMesh::computeSurfaceArea
OdResult computeSurfaceArea(double &retSurfArea) const
OdDbSubDMesh::getVertexAt
OdResult getVertexAt(OdInt32 nIndex, OdGePoint3d &vertex) const
MeshFaceterSettings::faceterMeshType
OdInt16 faceterMeshType
Definition: DbSubDMesh.h:275
MeshFaceterSettings::faceterDevSurface
double faceterDevSurface
Definition: DbSubDMesh.h:268
height
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
length
GLuint GLsizei GLsizei * length
Definition: gles2_ext.h:274
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbSubDMesh::OdDbSubDMesh
OdDbSubDMesh()
TD_PackPush.h
CmEntityColorArray.h
MeshFaceterSettings::faceterGridRatio
double faceterGridRatio
Definition: DbSubDMesh.h:270
OdDbSubDMesh::setPyramid
OdResult setPyramid(double radius, double height, OdInt32 divLength, OdInt32 divHeight, OdInt32 divCap, OdInt32 nSides, double radiusRatio, OdInt32 subDLevel)
OdGiWorldDraw
Definition: GiWorldDraw.h:44
MeshFaceterSettings::faceterMinUGrid
OdUInt16 faceterMinUGrid
Definition: DbSubDMesh.h:273
OdDbEntity
Definition: DbEntity.h:90
OdDbSubDMesh::getSubDividedEdgeArray
OdResult getSubDividedEdgeArray(OdInt32Array &edgeArray) const
OdGiDrawableTraits
Definition: Gi.h:71
OdDbSubDMesh::getCrease
OdResult getCrease(const OdDbFullSubentPathArray &subentPaths, OdDoubleArray &result) const
OdDbSubDMesh::setSubentMaterial
OdResult setSubentMaterial(const OdDbSubentId &id, const OdDbObjectId &material)
OdGeExtents3d
Definition: GeExtents3d.h:45
OdDbSubDMesh::numOfVertices
OdResult numOfVertices(OdInt32 &result) const
OdDbSubDMesh::subTransformBy
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
OdDbSubDMesh::setWedge
OdResult setWedge(double xLen, double yLen, double zLen, OdInt32 divLength, OdInt32 divWidth, OdInt32 divHeight, OdInt32 divSlope, OdInt32 divCap, OdInt32 subDLevel)
OdDbSubDMesh::numOfSubDividedFaces
OdResult numOfSubDividedFaces(OdInt32 &result) const
OdDbSubDMesh::extrudeFaces
OdResult extrudeFaces(const OdDbFullSubentPathArray &subentPaths, const OdGePoint3dArray &alongPath, double taper)
OdDbSubDMesh::subGetSubentPathsAtGsMarker
OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &, const OdGeMatrix3d &, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack) const
OdDbSubDMesh::getVertexTextureArray
OdResult getVertexTextureArray(OdGePoint3dArray &arrPts)
OdDbSubDMesh::subExplode
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const
MeshFaceterSettings::MeshFaceterSettings
MeshFaceterSettings()
Definition: DbSubDMesh.h:277
OdDbSubDMesh::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbSubDMesh::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbSubDMesh::subWorldDraw
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
OdDbSubDMesh::setCrease
OdResult setCrease(const OdDbFullSubentPathArray &subentPaths, double creaseVal)
OdDbSubDMesh::getSubentPath
OdResult getSubentPath(OdInt32 nIndex, OdDb::SubentType type, OdDbFullSubentPathArray &subentPaths) const
MeshFaceterSettings::faceterMaxEdgeLength
double faceterMaxEdgeLength
Definition: DbSubDMesh.h:271
OdCmColor
Definition: CmColor.h:59
DbSurface.h
OdDbSubDMesh::numOfSubDividedFacesAt
OdResult numOfSubDividedFacesAt(const OdDbFullSubentPathArray &subentPaths, OdInt32 &result) const
OdGiMapper
Definition: GiMaterial.h:1123
OdDbObject
Definition: DbObject.h:211
MeshFaceterSettings::faceterMinVGrid
OdUInt16 faceterMinVGrid
Definition: DbSubDMesh.h:274
OdDbSubDMesh::setBox
OdResult setBox(double xLen, double yLen, double zLen, OdInt32 divX, OdInt32 divY, OdInt32 divZ, OdInt32 subDLevel)
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbSubentId
Definition: DbBaseSubentId.h:72
OdDbSubDMesh::getSubDividedNormalArray
OdResult getSubDividedNormalArray(OdGeVector3dArray &normalArray) const
OdDbSubDMesh::setTorus
OdResult setTorus(double majorRadius, OdInt32 divSection, OdInt32 divSweepPath, double sectionRadiusRatio, double sectionRotate, OdInt32 subDLevel)
OdDbSubDMesh::isWatertight
OdResult isWatertight(bool &result) const
OdDbSubDMesh::subGetGsMarkersAtSubentPath
OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const