CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbSurface.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
24
25#ifndef _DBSURFACE_H_INCLUDED_
26#define _DBSURFACE_H_INCLUDED_
27
28#include "TD_PackPush.h"
29#include "ModelerDefs.h"
30#include "DbEntity.h"
31#include "Db3dSolid.h"
32
34class OdStreamBuf;
35class OdBrBrep;
36
37class OdDbSurface;
38class OdDbNurbSurface;
39
45
51
57
62{
67};
68
75{
76public:
81
82 //DOM-IGNORE-BEGIN
84 //DOM-IGNORE-END
85
92 virtual OdUInt16 uIsolineDensity() const;
93
100 virtual void setUIsolineDensity(OdUInt16 numIsolines);
101
108 virtual OdUInt16 vIsolineDensity() const;
109
116 virtual void setVIsolineDensity(OdUInt16 numIsolines);
117
132 static OdResult createFrom(const OdDbEntity* pFromEntity, OdDbSurfacePtr& pNewSurface);
133
151
170 virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr& pSolid) const;
171
185 virtual OdResult getArea(double& area) const;
186
194 bool isNull() const;
195
206 OdStreamBuf* pStreamBuf,
207 AfTypeVer typeVer = kAfTypeVerAny) const;
208
221 OdStreamBuf* pStreamBuf,
222 AfTypeVer *pTypeVer = 0);
223
229 void brep(OdBrBrep& brep);
230
240 bool getFaceMesh(GeMesh::OdGeTrMesh& mesh, OdGsMarker iFace, const wrTriangulationParams& triangulationParams) const;
241
271 OdDbObjectId& replaceId,
272 bool& exchangeXData);
273
286 OdRxObjectPtrArray& entitySet) const;
287
297 const OdGeMatrix3d& xfm);
298
309 virtual void saveAs(
310 OdGiWorldDraw* pWd,
311 OdDb::DwgVersion ver) const;
312
320 virtual OdResult setBody(const void* pGeometry);
321
325 virtual void* body() const;
326
327 // OdDbObject methods
328
349 OdDbDwgFiler* pFiler);
350
365 virtual void dwgOutFields(
366 OdDbDwgFiler* pFiler) const;
367
388 OdDbDxfFiler* pFiler);
389
404 virtual void dxfOutFields(
405 OdDbDxfFiler* pFiler) const;
406
415 virtual bool subWorldDraw(
416 OdGiWorldDraw* pWd) const;
417
424 virtual void subViewportDraw(
425 OdGiViewportDraw* pVd) const;
426
435 void* pClsid) const;
436
446 virtual OdDbSubentId internalSubentId(void* ent) const;
447
457 virtual void* internalSubentPtr(const OdDbSubentId& id) const;
458
468
497 OdDbEntityPtr pEntity,
498 unsigned int flags) const;
499
532 virtual OdResult booleanUnion(const OdDbSurface* pSurface, OdDbSurfacePtr& pNewSurface);
533
564 virtual OdResult booleanSubtract(const OdDbSurface* pSurface, OdDbSurfacePtr& pNewSurface);
565
596 virtual OdResult booleanSubtract(const OdDb3dSolid* pSolid, OdDbSurfacePtr& pNewSurface);
597
638 virtual OdResult booleanIntersect(const OdDbSurface* pSurface, OdDbEntityPtrArray& intersectionEntities);
639
681 virtual OdResult booleanIntersect(const OdDb3dSolid* pSolid, OdDbEntityPtrArray& intersectionEntities);
682
702 virtual OdResult imprintEntity(const OdDbEntityPtr pEntity);
703
722 virtual OdResult createSectionObjects(const OdGePlane& sectionPlane, OdDbEntityPtrArray& sectionObjects) const;
723
739 virtual OdResult sliceByPlane(const OdGePlane& slicePlane,
740 OdDbSurfacePtr& pNegHalfSurface,
741 OdDbSurfacePtr& pNewSurface);
742
760 virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface,
761 OdDbSurfacePtr& pNegHalfSurface,
762 OdDbSurfacePtr& pNewSurface);
763
779 virtual OdResult chamferEdges(const OdArray<OdDbSubentId *> &edgeSubentIds,
780 const OdDbSubentId& baseFaceSubentId,
781 double baseDist,
782 double otherDist);
783
799 virtual OdResult filletEdges( const OdArray<OdDbSubentId *> &edgeSubentIds,
800 const OdGeDoubleArray& radius,
801 const OdGeDoubleArray& startSetback,
802 const OdGeDoubleArray& endSetback);
803
813 virtual OdResult setSubentColor(const OdDbSubentId& subentId, const OdCmColor& color);
814
824 virtual OdResult getSubentColor(const OdDbSubentId& subentId, OdCmColor& color) const;
825
835 virtual OdResult setSubentMaterial(const OdDbSubentId& subentId, const OdDbObjectId& matId);
836
846 virtual OdResult getSubentMaterial(const OdDbSubentId& subentId, OdDbObjectId& matId) const;
847
857 virtual OdResult setSubentMaterialMapper(const OdDbSubentId& subentId, const OdGiMapper& mapper);
858
868 virtual OdResult getSubentMaterialMapper(const OdDbSubentId& subentId, OdGiMapper& mapper) const;
869
880 OdGsMarkerArray& gsMarkers) const;
881
896 OdGsMarker gsMark,
897 const OdGePoint3d& pickPoint,
898 const OdGeMatrix3d& viewXform,
899 OdDbFullSubentPathArray& subentPaths,
900 const OdDbObjectIdArray* pEntAndInsertStack = 0) const;
901
915 virtual OdResult subGetTransformedCopy(const OdGeMatrix3d& mat, OdDbEntityPtr& pCopy) const;
916
933
952
983 static OdResult trimSurface(const OdDbObjectId& blankSurfaceId,
984 const OdDbObjectIdArray& toolIds,
985 const OdDbObjectIdArray& toolCurveIds,
986 const OdGeVector3dArray& projVectors,
987 const OdGePoint3d& pickPoint,
988 const OdGeVector3d& viewVector,
989 bool bAutoExtend,
990 bool bAssociativeEnabled);
991
1015 OdResult projectOnToSurface(const OdDbEntity* pEntityToProject,
1016 const OdGeVector3d& projectionDirection,
1017 OdDbEntityPtrArray& projectedEntities) const;
1018
1031 OdResult getPerimeter(double&) const;
1032
1050 OdResult rayTest( const OdGePoint3d& rayBasePoint,
1051 const OdGeVector3d& rayDir,
1052 double rayRadius,
1053 OdArray<OdDbSubentId> & subEntIds,
1054 OdGeDoubleArray& parameters) const;
1055
1070 static OdResult createOffsetSurface ( OdDbEntity* pInputSurface,
1071 double dOffsetDistance,
1072 OdDbEntityPtr& offsetSurface);
1073
1092 static OdResult createOffsetSurface ( OdDbEntity* pInputSurface,
1093 double dOffsetDistance,
1094 bool bAssociativeEnabled,
1095 OdDbObjectId& offsetSurfaceId);
1096
1101 const OdGePoint3d& pickPt1,
1102 const OdDbObjectId& surfId2,
1103 const OdGePoint3d& pickPt2,
1104 double dRadius,
1105 OdDb::FilletTrimMode trimMode,
1106 const OdGeVector3d& projDir,
1107 OdDbSurface*& filletSurface);
1108
1113 const OdGePoint3d& pickPt1,
1114 const OdDbObjectId& surfId2,
1115 const OdGePoint3d& pickPt2,
1116 double dRadius,
1117 OdDb::FilletTrimMode trimMode,
1118 const OdGeVector3d& projDir,
1119 bool bAssociativeEnabled,
1120 OdDbObjectId& filletSurfaceId);
1121
1126 const OdArray<OdDbSubentId>& edgesId,
1127 double dExtDist,
1128 EdgeExtensionType extOption,
1129 bool bAssociativeEnabled,
1130 OdDbObjectId& newExtendSurfaceId );
1131
1136 double dExtDist,
1137 EdgeExtensionType extOption,
1138 bool bAssociativeEnabled );
1139
1148 virtual OdResult subGetGeomExtents( OdGeExtents3d& extents) const;
1149
1175 virtual void subHandOverTo(OdDbObject* pNewObject);
1176
1181 virtual void subClose();
1182
1188 virtual OdUInt32 numChanges() const;
1189
1190 //DOM-IGNORE-BEGIN
1191 virtual void copyFrom(const OdRxObject* pSource) ODRX_OVERRIDE;
1192 //DOM-IGNORE-END
1193};
1194
1195#include "TD_PackPop.h"
1196#endif //_DBSURFACE_H_INCLUDED_
#define DBENT_EXPORT
Definition: DbExport.h:67
OdSmartPtr< OdDbSurface > OdDbSurfacePtr
Definition: DbSurface.h:56
OdArray< OdDbNurbSurfacePtr > OdDbNurbSurfacePtrArray
Definition: DbSurface.h:50
OdSmartPtr< OdDbNurbSurface > OdDbNurbSurfacePtr
Definition: DbSurface.h:44
EdgeExtensionType
Definition: DbSurface.h:62
@ kStretchEdge
Definition: DbSurface.h:66
@ kExtendEdge
Definition: DbSurface.h:64
@ kAfTypeVerAny
Definition: ModelerDefs.h:80
int AfTypeVer
Definition: ModelerDefs.h:29
ptrdiff_t OdGsMarker
unsigned int OdUInt32
unsigned short OdUInt16
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
virtual OdResult convertToRegion(OdDbEntityPtrArray &regions)
virtual void copyFrom(const OdRxObject *pSource) ODRX_OVERRIDE
virtual OdResult booleanUnion(const OdDbSurface *pSurface, OdDbSurfacePtr &pNewSurface)
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)
OdResult acisIn(OdStreamBuf *pStreamBuf, AfTypeVer *pTypeVer=0)
virtual OdResult subGetSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &viewXform, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack=0) const
static OdResult createExtendSurface(OdDbObjectId sourceSurface, const OdArray< OdDbSubentId > &edgesId, double dExtDist, EdgeExtensionType extOption, bool bAssociativeEnabled, OdDbObjectId &newExtendSurfaceId)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual void saveAs(OdGiWorldDraw *pWd, OdDb::DwgVersion ver) const
virtual OdResult imprintEntity(const OdDbEntityPtr pEntity)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
static OdResult createOffsetSurface(OdDbEntity *pInputSurface, double dOffsetDistance, bool bAssociativeEnabled, OdDbObjectId &offsetSurfaceId)
virtual OdResult booleanIntersect(const OdDb3dSolid *pSolid, OdDbEntityPtrArray &intersectionEntities)
OdResult projectOnToSurface(const OdDbEntity *pEntityToProject, const OdGeVector3d &projectionDirection, OdDbEntityPtrArray &projectedEntities) const
virtual OdResult filletEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdGeDoubleArray &radius, const OdGeDoubleArray &startSetback, const OdGeDoubleArray &endSetback)
virtual void setVIsolineDensity(OdUInt16 numIsolines)
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits *pTraits) const
virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId &matId) const
virtual OdResult getSubentMaterialMapper(const OdDbSubentId &subentId, OdGiMapper &mapper) const
virtual void setUIsolineDensity(OdUInt16 numIsolines)
virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const
virtual OdResult setSubentMaterialMapper(const OdDbSubentId &subentId, const OdGiMapper &mapper)
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
virtual OdResult chamferEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdDbSubentId &baseFaceSubentId, double baseDist, double otherDist)
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)
virtual OdResult getArea(double &area) const
OdResult acisOut(OdStreamBuf *pStreamBuf, AfTypeVer typeVer=kAfTypeVerAny) const
virtual OdUInt16 uIsolineDensity() const
virtual OdResult createInterferenceObjects(OdDbEntityPtrArray &interferenceObjects, OdDbEntityPtr pEntity, unsigned int flags) const
virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, const OdDbObjectId &matId)
virtual OdResult convertToNurbSurface(OdDbNurbSurfacePtrArray &nurbSurfaceArray)
virtual void subViewportDraw(OdGiViewportDraw *pVd) const
virtual OdUInt32 numChanges() const
virtual void subClose()
virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface, OdDbSurfacePtr &pNegHalfSurface, OdDbSurfacePtr &pNewSurface)
virtual void subHandOverTo(OdDbObject *pNewObject)
static OdResult createOffsetSurface(OdDbEntity *pInputSurface, double dOffsetDistance, OdDbEntityPtr &offsetSurface)
virtual OdDbSubentId internalSubentId(void *ent) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdResult subGetGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
virtual void * body() const
OdResult getPerimeter(double &) const
void brep(OdBrBrep &brep)
OdResult rayTest(const OdGePoint3d &rayBasePoint, const OdGeVector3d &rayDir, double rayRadius, OdArray< OdDbSubentId > &subEntIds, OdGeDoubleArray &parameters) const
virtual OdResult booleanSubtract(const OdDb3dSolid *pSolid, OdDbSurfacePtr &pNewSurface)
virtual OdDbObjectPtr decomposeForSave(OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
bool getFaceMesh(GeMesh::OdGeTrMesh &mesh, OdGsMarker iFace, const wrTriangulationParams &triangulationParams) const
virtual void * internalSubentPtr(const OdDbSubentId &id) const
static OdResult createFrom(const OdDbEntity *pFromEntity, OdDbSurfacePtr &pNewSurface)
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color)
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const
OdResult extendEdges(OdDbFullSubentPathArray &edgesId, double dExtDist, EdgeExtensionType extOption, bool bAssociativeEnabled)
virtual OdResult booleanIntersect(const OdDbSurface *pSurface, OdDbEntityPtrArray &intersectionEntities)
virtual OdResult setBody(const void *pGeometry)
virtual OdResult createSectionObjects(const OdGePlane &sectionPlane, OdDbEntityPtrArray &sectionObjects) const
ODDB_DECLARE_MEMBERS(OdDbSurface)
virtual OdResult sliceByPlane(const OdGePlane &slicePlane, OdDbSurfacePtr &pNegHalfSurface, OdDbSurfacePtr &pNewSurface)
virtual OdUInt16 vIsolineDensity() const
bool isNull() const
virtual OdResult subGetClassID(void *pClsid) const
virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr &pSolid) const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
virtual OdDbEntityPtr subSubentPtr(const OdDbFullSubentPath &id) const
virtual OdResult subGetTransformedCopy(const OdGeMatrix3d &mat, OdDbEntityPtr &pCopy) const
virtual OdResult booleanSubtract(const OdDbSurface *pSurface, OdDbSurfacePtr &pNewSurface)
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)
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
FilletTrimMode
Definition: DbDatabase.h:382
DwgVersion
Definition: OdaDefs.h:47