CFx SDK Documentation  2020SP3
DbSurface.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 #ifndef _DBSURFACE_H_INCLUDED_
26 #define _DBSURFACE_H_INCLUDED_
27 // This application incorporates Teigha(R) software pursuant to a license
28 // agreement with Open Design Alliance.
29 // Teigha(R) Copyright (C) 2002-2016 by Open Design Alliance.
30 // All rights reserved.
31 //
32 // By use of this software, its documentation or related materials, you
33 
34 #include "TD_PackPush.h"
35 #include "ModelerDefs.h"
36 #include "DbEntity.h"
37 #include "Db3dSolid.h"
38 
39 class OdModelerGeometry;
40 class OdStreamBuf;
41 class OdBrBrep;
42 
43 class OdDbSurface;
44 class OdDbNurbSurface;
45 
50 
55 
60 {
62  kExtendEdge = 0x00,
64  kStretchEdge = 0x01,
65 };
66 
76 {
77 public:
80 
84  virtual OdUInt16 uIsolineDensity() const;
85 
91  virtual void setUIsolineDensity(OdUInt16 numIsolines);
92 
96  virtual OdUInt16 vIsolineDensity() const;
97 
103  virtual void setVIsolineDensity(OdUInt16 numIsolines);
104 
118  static OdResult createFrom ( const OdDbEntity* pFromEntity, OdDbSurfacePtr& pNewSurface );
119 
135 
152  virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr& pSolid) const;
153 
167  virtual OdResult getArea(double& area) const;
168 
172  bool isNull() const;
173 
184  OdStreamBuf* pStreamBuf,
185  AfTypeVer typeVer = kAfTypeVerAny);
186 
199  OdStreamBuf* pStreamBuf,
200  AfTypeVer *pTypeVer = 0);
201 
206  void brep( OdBrBrep& brep );
207 
209  OdDb::DwgVersion ver,
210  OdDbObjectId& replaceId,
211  bool& exchangeXData);
212 
214  OdRxObjectPtrArray& entitySet) const;
215 
217  const OdGeMatrix3d& xfm );
218 
226  virtual OdResult setBody( const void* pGeometry );
227 
231  virtual void *body( ) const;
232 
233  // OdDbObject methods
235  OdDbDwgFiler* pFiler);
236 
237  virtual void dwgOutFields(
238  OdDbDwgFiler* pFiler) const;
239 
241  OdDbDxfFiler* pFiler);
242 
243  virtual void dxfOutFields(
244  OdDbDxfFiler* pFiler) const;
245 
246  virtual bool subWorldDraw(
247  OdGiWorldDraw* pWd) const;
248 
250  void* pClsid) const;
251 
255  virtual OdDbSubentId internalSubentId(void* ent) const;
259  virtual void* internalSubentPtr(const OdDbSubentId& id) const;
260 
281  OdDbEntityPtr pEntity,
282  unsigned int flags ) const;
283 
298  virtual OdResult booleanUnion(const OdDbSurfacePtr pSurface, OdDbSurfacePtr& pNewSurface);
299 
315  virtual OdResult booleanSubtract(const OdDbSurfacePtr pSurface, OdDbSurfacePtr& pNewSurface);
316 
332  virtual OdResult booleanSubtract(const OdDb3dSolidPtr pSolid, OdDbSurfacePtr& pNewSurface);
333 
350  virtual OdResult booleanIntersect(const OdDbSurfacePtr pSurface2, OdDbEntityPtrArray& intersectionEntities);
351 
368  virtual OdResult booleanIntersect(const OdDb3dSolidPtr pSolid, OdDbEntityPtrArray& intersectionEntities);
369 
385  virtual OdResult imprintEntity(const OdDbEntityPtr pEntity);
386 
402  virtual OdResult createSectionObjects(const OdGePlane& sectionPlane, OdDbEntityPtrArray& sectionObjects) const;
403 
417  virtual OdResult sliceByPlane(const OdGePlane& slicePlane,
418  OdDbSurfacePtr& pNegHalfSurface,
419  OdDbSurfacePtr& pNewSurface);
435  virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface,
436  OdDbSurfacePtr& pNegHalfSurface,
437  OdDbSurfacePtr& pNewSurface);
438 
453  virtual OdResult chamferEdges(const OdArray<OdDbSubentId *> &edgeSubentIds,
454  const OdDbSubentId& baseFaceSubentId,
455  double baseDist,
456  double otherDist);
457 
472  virtual OdResult filletEdges( const OdArray<OdDbSubentId *> &edgeSubentIds,
473  const OdGeDoubleArray& radius,
474  const OdGeDoubleArray& startSetback,
475  const OdGeDoubleArray& endSetback);
476 
477  virtual OdResult setSubentColor(const OdDbSubentId& subentId, const OdCmColor& color);
478  virtual OdResult getSubentColor(const OdDbSubentId& subentId, OdCmColor& color) const;
479  virtual OdResult setSubentMaterial(const OdDbSubentId& subentId, const OdDbObjectId& matId);
480  virtual OdResult getSubentMaterial(const OdDbSubentId& subentId, OdDbObjectId& matId) const;
481  virtual OdResult setSubentMaterialMapper(const OdDbSubentId& subentId, const OdGiMapper& mapper);
482  virtual OdResult getSubentMaterialMapper(const OdDbSubentId& subentId, OdGiMapper& mapper) const;
483 
485  OdGsMarkerArray& gsMarkers) const;
486 
488  OdGsMarker gsMark,
489  const OdGePoint3d& pickPoint,
490  const OdGeMatrix3d& viewXform,
491  OdDbFullSubentPathArray& subentPaths,
492  const OdDbObjectIdArray* pEntAndInsertStack = 0) const;
493 
494  virtual OdResult subGetTransformedCopy(const OdGeMatrix3d& mat, OdDbEntityPtr& pCopy) const;
495 
510 
512 
532  static OdResult trimSurface(const OdDbObjectId& blankSurfaceId,
533  const OdDbObjectIdArray& toolIds,
534  const OdDbObjectIdArray& toolCurveIds,
535  const OdGeVector3dArray& projVectors,
536  const OdGePoint3d& pickPoint,
537  const OdGeVector3d& viewVector,
538  bool bAutoExtend,
539  bool bAssociativeEnabled);
540 
556  OdResult projectOnToSurface(const OdDbEntity* pEntityToProject,
557  const OdGeVector3d& projectionDirection,
558  OdDbEntityPtrArray& projectedEntities) const;
559 
571  OdResult getPerimeter(double&) const;
572 
588  OdResult rayTest( const OdGePoint3d& rayBasePoint,
589  const OdGeVector3d& rayDir,
590  double rayRadius,
591  OdArray<OdDbSubentId> & subEntIds,
592  OdGeDoubleArray& parameters) const;
593 
608  static OdResult createOffsetSurface ( OdDbEntity* pInputSurface,
609  double dOffsetDistance,
610  OdDbEntityPtr& offsetSurface);
611 
627  static OdResult createOffsetSurface ( OdDbEntity* pInputSurface,
628  double dOffsetDistance,
629  bool bAssociativeEnabled,
630  OdDbObjectId& offsetSurfaceId);
631 
635  static OdResult createFilletSurface ( const OdDbObjectId& surfId1,
636  const OdGePoint3d& pickPt1,
637  const OdDbObjectId& surfId2,
638  const OdGePoint3d& pickPt2,
639  double dRadius,
640  OdDb::FilletTrimMode trimMode,
641  const OdGeVector3d& projDir,
642  OdDbSurface*& filletSurface);
643 
647  static OdResult createFilletSurface ( const OdDbObjectId& surfId1,
648  const OdGePoint3d& pickPt1,
649  const OdDbObjectId& surfId2,
650  const OdGePoint3d& pickPt2,
651  double dRadius,
652  OdDb::FilletTrimMode trimMode,
653  const OdGeVector3d& projDir,
654  bool bAssociativeEnabled,
655  OdDbObjectId& filletSurfaceId);
656 
660  static OdResult createExtendSurface ( OdDbObjectId sourceSurface,
661  const OdArray<OdDbSubentId>& edgesId,
662  double dExtDist,
663  EdgeExtensionType extOption,
664  bool bAssociativeEnabled,
665  OdDbObjectId& newExtendSurfaceId );
666 
671  double dExtDist,
672  EdgeExtensionType extOption,
673  bool bAssociativeEnabled );
674 
675  virtual OdResult subGetGeomExtents( OdGeExtents3d& extents) const;
676 };
677 
678 #include "TD_PackPop.h"
679 #endif //_DBSURFACE_H_INCLUDED_
OdDbSurface::getArea
virtual OdResult getArea(double &area) const
OdResult
OdResult
Definition: OdResult.h:29
OdDbSurface::body
virtual void * body() const
OdGePlane
Definition: GePlane.h:45
OdGeVector3d
Definition: GeVector3d.h:54
AfTypeVer
int AfTypeVer
Definition: ModelerDefs.h:29
OdDbSurface::setBody
virtual OdResult setBody(const void *pGeometry)
OdDbSurface::sliceByPlane
virtual OdResult sliceByPlane(const OdGePlane &slicePlane, OdDbSurfacePtr &pNegHalfSurface, OdDbSurfacePtr &pNewSurface)
OdDbSurface::subGetTransformedCopy
virtual OdResult subGetTransformedCopy(const OdGeMatrix3d &mat, OdDbEntityPtr &pCopy) const
OdDbSurface::createFilletSurface
static OdResult createFilletSurface(const OdDbObjectId &surfId1, const OdGePoint3d &pickPt1, const OdDbObjectId &surfId2, const OdGePoint3d &pickPt2, double dRadius, OdDb::FilletTrimMode trimMode, const OdGeVector3d &projDir, OdDbSurface *&filletSurface)
OdDbSurface::setUIsolineDensity
virtual void setUIsolineDensity(OdUInt16 numIsolines)
OdDbSurface::extendEdges
OdResult extendEdges(OdDbFullSubentPathArray &edgesId, double dExtDist, EdgeExtensionType extOption, bool bAssociativeEnabled)
OdDbSurface::createFrom
static OdResult createFrom(const OdDbEntity *pFromEntity, OdDbSurfacePtr &pNewSurface)
OdDbSurface::vIsolineDensity
virtual OdUInt16 vIsolineDensity() const
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdDbSurface
Definition: DbSurface.h:76
OdDbObjectId
Definition: DbObjectId.h:99
OdDbSurface::subWorldDraw
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
OdDbSurface::convertToNurbSurface
virtual OdResult convertToNurbSurface(OdDbNurbSurfaceArray &nurbSurfaceArray)
kAfTypeVerAny
@ kAfTypeVerAny
Definition: ModelerDefs.h:80
OdDbNurbSurface
Definition: DbNurbSurface.h:49
Db3dSolid.h
OdDbSurface::isNull
bool isNull() const
OdDbSurface::subGetGeomExtents
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
OdDbSurface::internalSubentId
virtual OdDbSubentId internalSubentId(void *ent) const
OdDbSurface::getSubentMaterial
virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId &matId) const
OdDbFullSubentPath
Definition: DbSubentId.h:49
OdArray
Definition: OdArray.h:591
TD_PackPop.h
OdDbSurface::createInterferenceObjects
virtual OdResult createInterferenceObjects(OdDbEntityPtrArray &interferenceObjects, OdDbEntityPtr pEntity, unsigned int flags) const
OdGsMarker
ptrdiff_t OdGsMarker
Definition: OdPlatformSettings.h:889
OdDbSurface::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdUInt16
unsigned short OdUInt16
Definition: OdPlatformSettings.h:760
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdDbSurface::decomposeForSave
virtual OdDbObjectPtr decomposeForSave(OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
OdDbSurface::acisOut
OdResult acisOut(OdStreamBuf *pStreamBuf, AfTypeVer typeVer=kAfTypeVerAny)
OdDbSurface::booleanSubtract
virtual OdResult booleanSubtract(const OdDbSurfacePtr pSurface, OdDbSurfacePtr &pNewSurface)
OdDbSurface::internalSubentPtr
virtual void * internalSubentPtr(const OdDbSubentId &id) const
OdDbSurface::projectOnToSurface
OdResult projectOnToSurface(const OdDbEntity *pEntityToProject, const OdGeVector3d &projectionDirection, OdDbEntityPtrArray &projectedEntities) const
OdDbSurface::trimSurface
static OdResult trimSurface(const OdDbObjectId &blankSurfaceId, const OdDbObjectIdArray &toolIds, const OdDbObjectIdArray &toolCurveIds, const OdGeVector3dArray &projVectors, const OdGePoint3d &pickPoint, const OdGeVector3d &viewVector, bool bAutoExtend, bool bAssociativeEnabled)
OdDb::DwgVersion
DwgVersion
Definition: OdaDefs.h:46
OdDbSurface::subGetClassID
virtual OdResult subGetClassID(void *pClsid) const
OdDbSurface::subSubentPtr
virtual OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath &id) const
OdDbSurface::imprintEntity
virtual OdResult imprintEntity(const OdDbEntityPtr pEntity)
OdSmartPtr
Definition: SmartPtr.h:58
OdGePoint3d
Definition: GePoint3d.h:55
OdDbSurface::setSubentMaterial
virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, const OdDbObjectId &matId)
DbEntity.h
OdDb::SubentType
SubentType
Definition: DbBaseSubentId.h:38
OdDbSurface::subGetSubentPathsAtGsMarker
virtual OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &viewXform, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack=0) const
OdDbSurface::booleanIntersect
virtual OdResult booleanIntersect(const OdDbSurfacePtr pSurface2, OdDbEntityPtrArray &intersectionEntities)
OdDbSurface::booleanSubtract
virtual OdResult booleanSubtract(const OdDb3dSolidPtr pSolid, OdDbSurfacePtr &pNewSurface)
OdDbSurface::setSubentMaterialMapper
virtual OdResult setSubentMaterialMapper(const OdDbSubentId &subentId, const OdGiMapper &mapper)
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbSurface::subExplode
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const
OdDbSurface::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbSurface)
OdModelerGeometry
Definition: ModelerGeometry.h:78
OdDbSurface::createOffsetSurface
static OdResult createOffsetSurface(OdDbEntity *pInputSurface, double dOffsetDistance, OdDbEntityPtr &offsetSurface)
TD_PackPush.h
OdDbSurface::createExtendSurface
static OdResult createExtendSurface(OdDbObjectId sourceSurface, const OdArray< OdDbSubentId > &edgesId, double dExtDist, EdgeExtensionType extOption, bool bAssociativeEnabled, OdDbObjectId &newExtendSurfaceId)
OdDbNurbSurfaceArray
OdArray< OdDbNurbSurface *, OdMemoryAllocator< OdDbNurbSurface * > > OdDbNurbSurfaceArray
Definition: DbSurface.h:44
OdDbSurface::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbSurface::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdBrBrep
Definition: BrBrep.h:45
EdgeExtensionType
EdgeExtensionType
Definition: DbSurface.h:60
OdGiWorldDraw
Definition: GiWorldDraw.h:44
OdDbSurface::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbEntity
Definition: DbEntity.h:90
OdDbSurface::setVIsolineDensity
virtual void setVIsolineDensity(OdUInt16 numIsolines)
OdDbSurface::convertToRegion
virtual OdResult convertToRegion(OdDbEntityPtrArray &regions)
OdGiDrawableTraits
Definition: Gi.h:71
OdStreamBuf
Definition: OdStreamBuf.h:67
OdDbSurface::booleanUnion
virtual OdResult booleanUnion(const OdDbSurfacePtr pSurface, OdDbSurfacePtr &pNewSurface)
OdDbSurface::booleanIntersect
virtual OdResult booleanIntersect(const OdDb3dSolidPtr pSolid, OdDbEntityPtrArray &intersectionEntities)
OdGeExtents3d
Definition: GeExtents3d.h:45
ModelerDefs.h
OdDbSurface::filletEdges
virtual OdResult filletEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdGeDoubleArray &radius, const OdGeDoubleArray &startSetback, const OdGeDoubleArray &endSetback)
kExtendEdge
@ kExtendEdge
Definition: DbSurface.h:62
OdDbSurface::uIsolineDensity
virtual OdUInt16 uIsolineDensity() const
OdDbSurface::setSubentColor
virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color)
OdDbSurface::thicken
virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr &pSolid) const
OdDbSurface::subGetGsMarkersAtSubentPath
virtual OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbSurface::sliceBySurface
virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface, OdDbSurfacePtr &pNegHalfSurface, OdDbSurfacePtr &pNewSurface)
OdDbSurface::createFilletSurface
static OdResult createFilletSurface(const OdDbObjectId &surfId1, const OdGePoint3d &pickPt1, const OdDbObjectId &surfId2, const OdGePoint3d &pickPt2, double dRadius, OdDb::FilletTrimMode trimMode, const OdGeVector3d &projDir, bool bAssociativeEnabled, OdDbObjectId &filletSurfaceId)
OdDbSurface::acisIn
OdResult acisIn(OdStreamBuf *pStreamBuf, AfTypeVer *pTypeVer=0)
OdDbSurface::subTransformBy
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
OdDbSurface::createOffsetSurface
static OdResult createOffsetSurface(OdDbEntity *pInputSurface, double dOffsetDistance, bool bAssociativeEnabled, OdDbObjectId &offsetSurfaceId)
OdDbSurfacePtr
OdSmartPtr< OdDbSurface > OdDbSurfacePtr
Definition: DbSurface.h:54
OdDbSurface::getSubentMaterialMapper
virtual OdResult getSubentMaterialMapper(const OdDbSubentId &subentId, OdGiMapper &mapper) const
kStretchEdge
@ kStretchEdge
Definition: DbSurface.h:64
OdDbSurface::rayTest
OdResult rayTest(const OdGePoint3d &rayBasePoint, const OdGeVector3d &rayDir, double rayRadius, OdArray< OdDbSubentId > &subEntIds, OdGeDoubleArray &parameters) const
OdDbSurface::brep
void brep(OdBrBrep &brep)
OdCmColor
Definition: CmColor.h:59
OdDb::FilletTrimMode
FilletTrimMode
Definition: DbDatabase.h:379
OdGiMapper
Definition: GiMaterial.h:1123
OdDbSurface::getSubentColor
virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const
OdDbSurface::chamferEdges
virtual OdResult chamferEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdDbSubentId &baseFaceSubentId, double baseDist, double otherDist)
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbSurface::createSectionObjects
virtual OdResult createSectionObjects(const OdGePlane &sectionPlane, OdDbEntityPtrArray &sectionObjects) const
OdDbSubentId
Definition: DbBaseSubentId.h:72
OdDbSurface::OdDbSurface
OdDbSurface()
OdDbSurface::getPerimeter
OdResult getPerimeter(double &) const
OdDbSurface::subSetAttributes
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const