CFx SDK Documentation  2023 SP0
Db3dSolid.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 GEOMENT_DBSOL3D_H
28 #define GEOMENT_DBSOL3D_H
29 
30 #include "TD_PackPush.h"
31 #include "ModelerDefs.h"
32 #include "Db3dSolid.h"
33 #include "DbRegion.h"
34 #include "DbSubentId.h"
35 
36 class OdDbSubentId;
37 class OdDbCurve;
38 class OdBrBrep;
39 class OdModelerGeometry;
40 class OdDbLoftOptions;
41 class OdDbSweepOptions;
42 class OdDbRevolveOptions;
43 class OdDbSurface;
44 
45 #include "DbEntity.h"
46 #include "OdArray.h"
47 
48 
49 
50 class OdDb3dSolid;
51 
56 
61 
62 
77 {
78 public:
79 
81 
83 
87  bool isNull() const;
88 
98  OdStreamBuf* pStreamBuf,
99  AfTypeVer typeVer = kAfTypeVerAny);
100 
110  OdStreamBuf* pStreamBuf,
111  AfTypeVer *pTypeVer = 0);
112 
117  void brep(
118  OdBrBrep& brep);
119 
120  virtual bool subWorldDraw(
121  OdGiWorldDraw* pWd) const;
122 
123  virtual void subViewportDraw(
124  OdGiViewportDraw* pVd) const;
125 
127  OdDbDwgFiler* pFiler);
128 
129  virtual void dwgOutFields(
130  OdDbDwgFiler* pFiler) const;
131 
133  OdDbDxfFiler* pFiler);
134 
135  virtual void dxfOutFields(
136  OdDbDxfFiler* pFiler) const;
137 
139  void* pClsid) const;
140 
156  virtual void createBox(
157  double xLen,
158  double yLen,
159  double zLen);
160 
186  virtual void createFrustum(
187  double height,
188  double xRadius,
189  double yRadius,
190  double topXRadius);
191 
203  virtual void createSphere(
204  double radius);
205 
223  virtual void createTorus(
224  double majorRadius,
225  double minorRadius);
226 
250  virtual void createWedge(
251  double xLen,
252  double yLen,
253  double zLen);
254 
278  virtual OdResult extrude(
279  const OdDbRegion* pRegion,
280  double height,
281  double taperAngle = 0.0);
282 
304  virtual OdResult revolve(
305  const OdDbRegion* pRegion,
306  const OdGePoint3d& axisPoint,
307  const OdGeVector3d& axisDir,
308  double angleOfRevolution);
309 
328 
356  virtual OdResult extrudeAlongPath(const OdDbRegion* region, const OdDbCurve* path, double taperAngle = 0.0);
357 
385  virtual OdResult imprintEntity(const OdDbEntity *pEntity);
386 
398  virtual OdResult getArea(double& area) const;
399 
418  virtual OdResult checkInterference(const OdDb3dSolid* otherSolid,
419  bool createNewSolid,
420  bool& solidsInterfere,
421  OdDb3dSolidPtr &commonVolumeSolid)
422  const;
423 
442  virtual OdResult getMassProp(double& volume,
443  OdGePoint3d& centroid,
444  double momInertia[3],
445  double prodInertia[3],
446  double prinMoments[3],
447  OdGeVector3d prinAxes[3],
448  double radiiGyration[3],
449  OdGeExtents3d& extents) const;
450 
465  virtual OdResult getSection(const OdGePlane& plane, OdDbRegionPtr &sectionRegion) const;
466 
485  virtual OdResult getSlice(const OdGePlane& plane, bool bGetNegHalfToo, OdDb3dSolidPtr &pNegHalfSolid);
486 
507  virtual OdResult getSlice(OdDbSurface* pSurface, bool bGetNegHalfToo, OdDb3dSolidPtr &pNegHalfSolid);
508 
517  virtual OdResult cleanBody();
518 
535  virtual OdResult offsetBody(double offsetDistance);
536 
552 
569  const OdGeVector3d& directionVec,
570  OdDbSweepOptions& sweepOptions );
571 
589  const OdDbSubentId& faceSubentId,
590  const OdGeVector3d& directionVec,
591  OdDbSweepOptions& sweepOptions );
592 
610  const OdDbSubentId& faceSubentId,
611  double height,
612  OdDbSweepOptions& sweepOptions );
613 
631  OdDbEntityPtrArray& crossSectionCurves,
632  OdDbEntityPtrArray& guideCurves,
633  OdDbEntity* pPathCurve, OdDbLoftOptions& loftOptions );
634 
655  virtual OdResult createPyramid(double height, int sides,
656  double radius, double topRadius = 0.0 );
657 
680  const OdGePoint3d& axisPnt,
681  const OdGeVector3d& axisDir,
682  double revAngle, double startAngle,
683  OdDbRevolveOptions& revolveOptions );
684 
705  const OdDbSubentId& faceSubentId,
706  const OdGePoint3d& axisPnt,
707  const OdGeVector3d& axisDir,
708  double revAngle, double startAngle,
709  OdDbRevolveOptions& revolveOptions );
710 
729  virtual OdResult createSweptSolid ( OdDbEntity *pSweepEnt,
730  const OdDbSubentId& faceSubentId,
731  OdDbEntity* pPathEnt,
732  OdDbSweepOptions& sweepOptions );
733 
751  virtual OdResult createSweptSolid ( OdDbEntity* pSweepEnt,
752  OdDbEntity* pPathEnt,
753  OdDbSweepOptions& sweepOptions );
754 
769  virtual void stlOut(const OdChar* filename, bool asciiFormat) const;
770 
772  OdDb::DwgVersion ver,
773  OdDbObjectId& replaceId,
774  bool& exchangeXData);
775 
777  OdRxObjectPtrArray& entitySet) const;
778 
780  const OdGeMatrix3d& xfm );
781 
798  virtual void saveAs(
799  OdGiWorldDraw* pWd,
800  OdDb::DwgVersion ver ) const;
801 
809  virtual OdResult setBody( const void* pGeometry );
810 
814  virtual void *body( ) const;
815 
832  virtual OdResult copyEdge(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity);
833 
852  virtual OdResult copyFace(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity);
853 
855  OdGsMarker gsMark,
856  const OdGePoint3d& pickPoint,
857  const OdGeMatrix3d& viewXform,
858  OdDbFullSubentPathArray& subentPaths,
859  const OdDbObjectIdArray* pEntAndInsertStack = 0) const;
860 
861 
862  virtual OdDbSubentId internalSubentId(void* ent) const;
863 
864  virtual void* internalSubentPtr(const OdDbSubentId& id) const;
865 
867  OdGsMarkerArray& gsMarkers) const;
868 
870 
899  virtual OdResult extrudeFaces(const OdArray<OdDbSubentId *> &faceSubentIds,
900  double height, double taper);
901 
927  const OdDbCurve* path);
928 
948  virtual OdResult taperFaces(const OdArray<OdDbSubentId *> &faceSubentIds,
949  const OdGePoint3d &basePoint,
950  const OdGeVector3d &draftVector,
951  double draftAngle);
952 
967  virtual OdResult transformFaces(const OdArray<OdDbSubentId *> &faceSubentIds, const OdGeMatrix3d &matrix);
968 
986  virtual OdResult removeFaces(const OdArray<OdDbSubentId *> &faceSubentIds);
987 
1007  virtual OdResult offsetFaces(const OdArray<OdDbSubentId *> &faceSubentIds, double offsetDistance);
1008 
1032  virtual OdResult shellBody(const OdArray<OdDbSubentId *> &faceSubentIds, double offsetDistance);
1033 
1037  virtual OdUInt32 numChanges() const;
1038 
1047  virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color);
1048 
1057  virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const;
1058 
1070  virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId matId);
1071 
1080  virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId& matId) const;
1081 
1093  virtual OdResult setSubentMaterialMapper(const OdDbSubentId &subentId, const OdGiMapper& mapper);
1094 
1103  virtual OdResult getSubentMaterialMapper(const OdDbSubentId &subentId, OdGiMapper& mapper) const;
1104 
1119  virtual OdResult chamferEdges(const OdArray<OdDbSubentId *> &edgeSubentIds,
1120  const OdDbSubentId& baseFaceSubentId,
1121  double baseDist,
1122  double otherDist);
1123 
1138  virtual OdResult filletEdges( const OdArray<OdDbSubentId *> &edgeSubentIds,
1139  const OdGeDoubleArray& radius,
1140  const OdGeDoubleArray& startSetback,
1141  const OdGeDoubleArray& endSetback);
1142 
1162  virtual OdResult createFrom(const OdDbEntity* pFromEntity);
1163 
1171  virtual bool recordHistory() const;
1172 
1180  virtual bool showHistory() const;
1181 
1189  virtual OdResult setRecordHistory(bool bRecord);
1190 
1198  virtual OdResult setShowHistory(bool bShow);
1199 
1211 
1213 
1232  OdResult projectOnToSolid( const OdDbEntity* pEntityToProject,
1233  const OdGeVector3d& projectionDirection,
1234  OdDbEntityPtrArray& projectedEntities) const;
1235 
1248  const OdGeIntArray& limitingFlags);
1249 
1253  virtual void subClose();
1254 
1255  virtual OdResult subGetGeomExtents( OdGeExtents3d& extents) const;
1256 };
1257 
1258 #include "TD_PackPop.h"
1259 
1260 #endif
1261 
OdSmartPtr< OdDb3dSolid > OdDb3dSolidPtr
Definition: Db3dSolid.h:50
OdArray< OdDb3dSolidPtr > OdDb3dSolidPtrArray
Definition: Db3dSolid.h:60
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
@ kAfTypeVerAny
Definition: ModelerDefs.h:80
int AfTypeVer
Definition: ModelerDefs.h:29
ptrdiff_t OdGsMarker
unsigned int OdUInt32
wchar_t OdChar
OdResult
Definition: OdResult.h:29
virtual OdResult createSweptSolid(OdDbEntity *pSweepEnt, OdDbEntity *pPathEnt, OdDbSweepOptions &sweepOptions)
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
virtual void subViewportDraw(OdGiViewportDraw *pVd) const
virtual void createSphere(double radius)
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
virtual OdResult offsetFaces(const OdArray< OdDbSubentId * > &faceSubentIds, double offsetDistance)
virtual void subClose()
OdResult createSculptedSolid(OdDbEntityPtrArray &limitingBodies, const OdGeIntArray &limitingFlags)
virtual OdResult filletEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdGeDoubleArray &radius, const OdGeDoubleArray &startSetback, const OdGeDoubleArray &endSetback)
virtual OdResult checkInterference(const OdDb3dSolid *otherSolid, bool createNewSolid, bool &solidsInterfere, OdDb3dSolidPtr &commonVolumeSolid) const
virtual void createBox(double xLen, double yLen, double zLen)
virtual OdResult convertToBrepAtSubentPaths(const OdDbFullSubentPathArray &)
virtual OdResult getSection(const OdGePlane &plane, OdDbRegionPtr &sectionRegion) const
virtual OdResult revolve(const OdDbRegion *pRegion, const OdGePoint3d &axisPoint, const OdGeVector3d &axisDir, double angleOfRevolution)
OdResult acisIn(OdStreamBuf *pStreamBuf, AfTypeVer *pTypeVer=0)
virtual OdResult extrudeAlongPath(const OdDbRegion *region, const OdDbCurve *path, double taperAngle=0.0)
virtual OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
virtual OdResult transformFaces(const OdArray< OdDbSubentId * > &faceSubentIds, const OdGeMatrix3d &matrix)
virtual OdResult extrudeFacesAlongPath(const OdArray< OdDbSubentId * > &faceSubentIds, const OdDbCurve *path)
virtual void * internalSubentPtr(const OdDbSubentId &id) const
virtual OdResult imprintEntity(const OdDbEntity *pEntity)
OdResult projectOnToSolid(const OdDbEntity *pEntityToProject, const OdGeVector3d &projectionDirection, OdDbEntityPtrArray &projectedEntities) const
virtual void * body() const
virtual OdResult createRevolvedSolid(OdDbEntity *pRevEnt, const OdDbSubentId &faceSubentId, const OdGePoint3d &axisPnt, const OdGeVector3d &axisDir, double revAngle, double startAngle, OdDbRevolveOptions &revolveOptions)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual void createTorus(double majorRadius, double minorRadius)
virtual OdResult createSweptSolid(OdDbEntity *pSweepEnt, const OdDbSubentId &faceSubentId, OdDbEntity *pPathEnt, OdDbSweepOptions &sweepOptions)
virtual OdResult createPyramid(double height, int sides, double radius, double topRadius=0.0)
virtual OdResult getMassProp(double &volume, OdGePoint3d &centroid, double momInertia[3], double prodInertia[3], double prinMoments[3], OdGeVector3d prinAxes[3], double radiiGyration[3], OdGeExtents3d &extents) const
virtual OdResult createFrom(const OdDbEntity *pFromEntity)
virtual OdResult getArea(double &area) const
virtual OdResult getSlice(const OdGePlane &plane, bool bGetNegHalfToo, OdDb3dSolidPtr &pNegHalfSolid)
virtual OdResult chamferEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdDbSubentId &baseFaceSubentId, double baseDist, double otherDist)
virtual OdUInt32 numChanges() const
virtual OdResult createExtrudedSolid(OdDbEntity *pSweepEnt, const OdDbSubentId &faceSubentId, double height, OdDbSweepOptions &sweepOptions)
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const
virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const
virtual OdResult createRevolvedSolid(OdDbEntity *pRevEnt, const OdGePoint3d &axisPnt, const OdGeVector3d &axisDir, double revAngle, double startAngle, OdDbRevolveOptions &revolveOptions)
virtual OdResult createExtrudedSolid(OdDbEntity *pSweepEnt, const OdGeVector3d &directionVec, OdDbSweepOptions &sweepOptions)
virtual OdResult setBody(const void *pGeometry)
virtual OdResult extrudeFaces(const OdArray< OdDbSubentId * > &faceSubentIds, double height, double taper)
virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId matId)
virtual OdResult subGetClassID(void *pClsid) const
virtual OdResult createLoftedSolid(OdDbEntityPtrArray &crossSectionCurves, OdDbEntityPtrArray &guideCurves, OdDbEntity *pPathCurve, OdDbLoftOptions &loftOptions)
virtual OdResult setShowHistory(bool bShow)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual OdResult taperFaces(const OdArray< OdDbSubentId * > &faceSubentIds, const OdGePoint3d &basePoint, const OdGeVector3d &draftVector, double draftAngle)
virtual bool recordHistory() const
virtual OdResult copyFace(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity)
virtual OdResult shellBody(const OdArray< OdDbSubentId * > &faceSubentIds, double offsetDistance)
virtual OdResult copyEdge(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity)
virtual OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath &id) const
virtual OdResult removeFaces(const OdArray< OdDbSubentId * > &faceSubentIds)
virtual void saveAs(OdGiWorldDraw *pWd, OdDb::DwgVersion ver) const
virtual OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &viewXform, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack=0) const
virtual OdResult offsetBody(double offsetDistance)
virtual void createWedge(double xLen, double yLen, double zLen)
virtual OdResult getSubentMaterialMapper(const OdDbSubentId &subentId, OdGiMapper &mapper) const
virtual void createFrustum(double height, double xRadius, double yRadius, double topXRadius)
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
void brep(OdBrBrep &brep)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdResult acisOut(OdStreamBuf *pStreamBuf, AfTypeVer typeVer=kAfTypeVerAny)
virtual OdDbSubentId internalSubentId(void *ent) const
virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId &matId) const
ODDB_DECLARE_MEMBERS(OdDb3dSolid)
virtual OdResult cleanBody()
virtual OdResult getSlice(OdDbSurface *pSurface, bool bGetNegHalfToo, OdDb3dSolidPtr &pNegHalfSolid)
virtual OdResult setSubentMaterialMapper(const OdDbSubentId &subentId, const OdGiMapper &mapper)
virtual OdDbObjectPtr decomposeForSave(OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color)
virtual OdResult extrude(const OdDbRegion *pRegion, double height, double taperAngle=0.0)
virtual void stlOut(const OdChar *filename, bool asciiFormat) const
bool isNull() const
virtual OdResult createExtrudedSolid(OdDbEntity *pSweepEnt, const OdDbSubentId &faceSubentId, const OdGeVector3d &directionVec, OdDbSweepOptions &sweepOptions)
virtual OdResult setRecordHistory(bool bRecord)
virtual bool showHistory() const
virtual OdResult booleanOper(OdDb::BoolOperType operation, OdDb3dSolid *solid)
virtual OdResult separateBody(OdDb3dSolidPtrArray &newSolids)
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
BoolOperType
Definition: ModelerDefs.h:113
DwgVersion
Definition: OdaDefs.h:46