CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
ModelerGeometry.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 _OD_MODELERGEOMETRY_INCLUDED_
26#define _OD_MODELERGEOMETRY_INCLUDED_
27
28#define STL_USING_MAP
29#define STL_USING_VECTOR
30#include "OdaSTL.h"
31#include "RxObject.h"
32#include "ModelerDefs.h"
33#include "DbEntity.h"
34#include "Db3dSolid.h"
35#include "DbRegion.h"
36#include "DbSubDMesh.h"
37#include "DbNurbSurface.h"
38#include "Ge/GeMatrix3dArray.h"
39#include "Ge/GeNurbCurve3d.h"
41#include "MaterialResolver.h"
42#include "ModelerGeometryDefs.h"
43
44class OdStreamBuf;
45class OdBrBrep;
46class OdBrEntity;
47class OdGiCommonDraw;
49class OdDbCurve;
52class OdDbLoftOptions;
54class OdDbSection;
55class SectArgs;
57class OdBrMesh2d;
58namespace GeMesh { class OdGeTrMesh; }
60
61#include "TD_PackPush.h"
62
79{
80protected:
81 //DOM-IGNORE-BEGIN
83 //DOM-IGNORE-END
84
85public:
86 //DOM-IGNORE-BEGIN
88 //DOM-IGNORE-END
89
90 // in/out functionality
91
112 virtual OdResult in(OdStreamBuf* pStreamBuf, AfTypeVer *typeVer = 0, bool standardSaveFlag = true) = 0;
113
114
134 virtual OdResult out(OdStreamBuf* pStreamBuf, AfTypeVer typeVer, bool standardSaveFlag = true) const = 0;
135
142 virtual bool brep(OdBrBrep& brBrep) const = 0;
143
144 virtual OdResult getEdgeSubentityGeometry(OdArray<OdUInt32> indexesOfEdgeCalculation, OdGeCurve3d*& pEdgeCurve) = 0;
145
150 virtual OdResult setSubentPath(OdBrEntity & /*pInpEnt*/, OdDbFullSubentPath& /*subpath*/) { return eNotImplemented; }
151
156 virtual OdResult generateMesh(const OdBrMesh2dFilter& filter, OdBrMesh2d &mesh2d) { return eNotImplemented; }
157
163 virtual bool setFACETRES(double facetRes) = 0;
164
169 {
174 };
175
205 virtual bool worldDraw(OdGiCommonDraw* pWd, OdUInt32 geomType, const NumIsolines *pNumIsolines = 0) = 0;
206
221 virtual bool drawSilhouettes(OdGiViewportDraw* pVd) = 0;
222
223 virtual OdResult getCachedSilhouettes(OdGeCurve3dPtrArray* cachedSilhouettes) = 0;
224
238 const OdGeVector3d& viewDir,
239 const OdDbEntityPtrArray& entities,
240 const OdGeMatrix3dArray* xforms = NULL,
241 OdEdgeTypeFlags edgeType = kTangent) = 0;
242
243
255 virtual bool explode(OdDbEntityPtrArray& entitySet) const = 0;
256
262 virtual bool getTransformation(OdGeMatrix3d& xfm) = 0;
263
270 virtual void transformBy( const OdGeMatrix3d& xfm ) = 0;
271
285 virtual void createBox( double xLen, double yLen, double zLen ) = 0;
286
312 virtual void createFrustum( double height, double xRadius, double yRadius, double topXRadius ) = 0;
313
323 virtual void createSphere( double radius ) = 0;
324
338 virtual void createTorus( double majorRadius, double minorRadius ) = 0;
339
361 virtual void createWedge( double xLen, double yLen, double zLen ) = 0;
362
382 virtual OdResult extrude(const OdDbRegion* pRegion, double height, double taperAngle, bool isSolid = true) = 0;
383
404 virtual OdResult revolve(const OdDbRegion* pRegion, const OdGePoint3d& axisPoint,
405 const OdGeVector3d& axisDir, double angleOfRevolution, bool isSolid = true) = 0;
406
410 virtual void ClearColorAttributes() = 0;
411
415 virtual void ClearMaterialAttributes(const OdArray<OdDbSubentId>* aSubents = NULL) = 0;
416
421
426 {
428 kNoMaterials = 0,
430 kHasMaterials = 1,
432 kUnknown = 2
433 };
434
441 virtual MaterialState hasMaterials() const {return kUnknown; }
442
449 virtual bool hasTrueColorAttributes() const = 0;
450
459 virtual OdResult getPlane(OdGePlane& regionPlane) const = 0;
460
466 virtual bool setMMPerUnit(double mmPerUnit) = 0;
467
473 virtual bool getMMPerUnit(double &mmPerUnit) const = 0;
474
479 {
481 kUndefined = 0,
483 kBody = 1,
487 kRegion = 3,
489 kSurface = 4
490 };
491
505 virtual geomType bodyType() const = 0;
506
507
528 virtual OdResult booleanOper(OdDbDatabase* database, OdDb::BoolOperType operation, OdModelerGeometry* otherBody,
529 geomType typeThis, geomType typeOther) = 0;
530
554 virtual OdResult booleanOper(OdDbDatabase* database, OdDb::BoolOperType operation, const OdModelerGeometry* otherBody,
555 geomType typeThis, geomType typeOther, OdSmartPtr<OdModelerGeometry>& result, OdDbEntityPtrArray* intersectionEntities = NULL) const = 0;
556
570 const OdModelerGeometry* otherSolid,
571 bool createNewSolid,
572 bool& solidsInterfere,
573 OdDb3dSolidPtr& commonVolumeSolid)
574 const = 0;
575
583 virtual OdResult getArea(double& regionArea) const = 0;
584
592 virtual OdResult getPerimeter(double&) const = 0;
593
620 virtual OdResult getAreaProp( const OdGePoint3d& origin, const OdGeVector3d& xAxis,
621 const OdGeVector3d& yAxis, double& perimeter,
622 double& area, OdGePoint2d& centroid,
623 double momInertia[2], double& prodInertia,
624 double prinMoments[2], OdGeVector2d prinAxes[2],
625 double radiiGyration[2], OdGePoint2d& extentsLow,
626 OdGePoint2d& extentsHigh ) const = 0;
627
633 virtual OdResult clear( ) = 0;
634
661 virtual OdResult extrudeAlongPath(const OdDbRegion* region, const OdDbCurve* path, double taperAngle = 0.0, bool isSolid = true) = 0;
662
689 virtual OdResult imprintEntity(const OdDbEntity *pEntity) = 0;
690
707 virtual OdResult getMassProp(double& volume,
708 OdGePoint3d& centroid,
709 double momInertia[3],
710 double prodInertia[3],
711 double prinMoments[3],
712 OdGeVector3d prinAxes[3],
713 double radiiGyration[3],
714 OdGeExtents3d& extents) const = 0;
715
733 virtual OdResult getSection(const OdGePlane& plane, OdDbRegionPtr &sectionRegion, OdDbEntityPtrArray* pSectionCurves = NULL) const = 0;
734
762 virtual OdResult getSlice(const OdGePlane& plane, bool getNegHalfToo, OdDb3dSolidPtr &negHalfSolid) = 0;
763
793 virtual OdResult getSlice(OdDbSurface* pSurface, bool bGetNegHalfToo, OdDb3dSolidPtr& pNegHalfSolid) = 0;
794
801 virtual OdResult cleanBody() = 0;
802
818 virtual OdResult offsetBody(double offsetDistance) = 0;
819
820 //virtual OdResult offsetBody(OdDbEntity* pOffsetEnt, double offsetDistance) = 0;
821
839
859 const OdGeVector3d& directionVec,
860 OdDbSweepOptions& sweepOptions,
861 bool isSolid = true,
862 bool bHistoryEnabled = false) = 0;
863
879 OdDbEntityPtrArray& crossSectionCurves,
880 OdDbEntityPtrArray& guideCurves,
881 OdDbEntity* pPathCurve,
882 OdDbLoftOptions& loftOptions,
883 bool isSolid = true) = 0;
884
898 OdDbEntityPtrArray& blendedEdges,
899 OdDbBlendOptions& blendOptions,
900 bool isSolid = true) = 0;
901
916 //virtual OdResult createLoftedObjectByCoedges(
917 // OdDbEntityPtrArray& crossSectionCurves,
918 // OdDbEntityPtrArray& guideCurves,
919 // OdDbEntity* pPathCurve,
920 // OdDbLoftOptions& loftOptions,
921 // bool isSolid = true) = 0;
922
947 virtual OdResult createPyramid(double height, int sides,
948 double radius, double topRadius = 0.0 ) = 0;
949
973 const OdGePoint3d& axisPnt,
974 const OdGeVector3d& axisDir,
975 double revAngle, double startAngle,
976 OdDbRevolveOptions& revolveOptions,
977 bool isSolid = true,
978 bool bHistoryEnabled = false) = 0;
979
999 OdDbEntity* pPathEnt,
1000 OdDbSweepOptions& sweepOptions,
1001 bool isSolid = true,
1002 bool bHistoryEnabled = false) = 0;
1003
1004 // Loft options utility functions
1005
1018 OdDbEntityPtrArray& crossSectionCurves,
1019 bool& allOpen, bool& allClosed, bool& allPlanar,
1020 bool displayErrorMessages = false ) = 0;
1021
1031 bool displayErrorMessages = false ) = 0;
1032
1041 virtual OdResult checkPathCurve ( OdDbEntity *pPathCurve,
1042 bool displayErrorMessages = false ) = 0;
1043
1044 // Sweep options utility functions
1045
1072 OdDb::Planarity& planarity, OdGePoint3d& pnt, OdGeVector3d& vec,
1073 bool& closed, double& approxArcLen, bool displayErrorMessages = false ) = 0;
1074
1083 virtual OdResult checkSweepPathCurve ( OdDbEntity *pPathEnt, bool displayErrorMessages = false ) = 0;
1084
1085 // Revolve options utility functions
1086
1105 OdDbEntity* pRevEnt,
1106 const OdGePoint3d& axisPnt,
1107 const OdGeVector3d& axisDir,
1108 bool& closed,
1109 bool& endPointsOnAxis,
1110 bool& planar,
1111 bool displayErrorMessages = false) = 0;
1112
1123 virtual OdResult createFrom ( const OdDbEntity* pFromEntity ) = 0;
1124
1134
1144 virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr& pSolid) const = 0;
1145
1158 virtual OdResult intersectWith( const OdDbEntity* ent, OdDb::Intersect intType,
1159 OdGePoint3dArray& points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker ) const = 0;
1160
1174 virtual OdResult intersectWith( const OdDbEntity* ent, OdDb::Intersect intType, const OdGePlane& projPlane,
1175 OdGePoint3dArray& points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker ) const = 0;
1176
1185 virtual OdResult copySubEntity(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity) const = 0;
1186
1202 virtual OdResult taperFaces(const OdArray<OdDbSubentId *> &faceSubentIds, const OdGePoint3d &basePoint,
1203 const OdGeVector3d &draftVector, double draftAngle) = 0;
1204
1216 virtual OdResult removeFaces(const OdArray<OdDbSubentId *> &faceSubentIds) = 0;
1217
1233 virtual OdResult offsetFaces(const OdArray<OdDbSubentId *> &faceSubentIds, double offsetDistance) = 0;
1234
1251 virtual OdResult shellBody(const OdArray<OdDbSubentId *> &faceSubentIds, double offsetDistance) = 0;
1252
1262 virtual OdResult transformFaces(const OdArray<OdDbSubentId *> &faceSubentIds, const OdGeMatrix3d &matrix) = 0;
1263
1277 OdGsMarker gsMark,
1278 const OdGePoint3d& pickPoint,
1279 const OdGeMatrix3d& viewXform,
1280 OdDbFullSubentPathArray& subentPaths,
1281 const OdDbObjectIdArray* entAndInsertStack = 0) const = 0;
1282
1292 OdGsMarkerArray& gsMarkers) const = 0;
1293
1294 //DOM-IGNORE-BEGIN
1301 virtual OdDbSubentId internalSubentId(void* ent) const = 0;
1302
1308 virtual void* internalSubentPtr(const OdDbSubentId& id) const = 0;
1309
1310 virtual bool getNurbCurvesCache(OdGeCurve3dPtrArray &) const { return false; }
1311
1312 // for internal use only
1313 virtual OdResult setBody(const void * /*pBody*/) { return eNotImplemented; }
1314 virtual void * body( ) const { return 0; }
1315 //DOM-IGNORE-END
1316
1325 virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color) = 0;
1326
1335 virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const = 0;
1336
1349 virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId matId) = 0;
1350
1359 virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdUInt64& matId) const = 0;
1360
1373 OdGeMatrix3d &mx,
1374 OdUInt8 &projection,
1375 OdUInt8 &tiling,
1376 OdUInt8 &autoTransform) = 0;
1377
1390 OdGeMatrix3d &mx,
1391 OdUInt8 &projection,
1392 OdUInt8 &tiling,
1393 OdUInt8 &autoTransform) const = 0;
1394
1405 virtual OdResult chamferEdges(const OdArray<OdDbSubentId *> &edgeSubentIds,
1406 const OdDbSubentId& baseFaceSubentId,
1407 double baseDist,
1408 double otherDist) = 0;
1409
1420 virtual OdResult filletEdges( const OdArray<OdDbSubentId *> &edgeSubentIds,
1421 const OdGeDoubleArray& radius,
1422 const OdGeDoubleArray& startSetback,
1423 const OdGeDoubleArray& endSetback) = 0;
1424
1435 virtual OdResult createSectionObjects(const OdGePlane& sectionPlane, OdDbEntityPtrArray& sectionObjects) const = 0;
1436
1449 virtual OdResult sliceByPlane(const OdGePlane& slicePlane, OdDbSurfacePtr& pNegHalfSurface, OdDbSurfacePtr& pNewSurface, bool bNotModifyItself) = 0;
1450
1462 virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface, OdDbSurfacePtr& pNegHalfSurface, OdDbSurfacePtr& pNewSurface, bool bNotModifyItself) = 0;
1463
1496 virtual OdResult extrudeFaces(const OdArray<OdDbSubentId *> &faceSubentIds, double height, double taper) = 0;
1497
1523 virtual OdResult extrudeFacesAlongPath(const OdArray<OdDbSubentId *> &faceSubentIds, const OdDbCurve* path) = 0;
1524
1532 virtual OdResult ChangeFacesDoubleSidedParam(bool isDoubleSided) = 0;
1533
1543
1559 virtual OdResult get( int& iUDegree, int& iVDegree, bool& bRational, int& iUNumControlPoints, int& iVNumControlPoints,
1560 OdGePoint3dArray& ctrlPtsArr, OdGeDoubleArray& weights,
1561 OdGeKnotVector& uKnots, OdGeKnotVector& vKnots) const = 0;
1562
1578 virtual OdResult set (int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints,
1579 const OdGePoint3dArray& ctrlPtsArr, const OdGeDoubleArray& weights,
1580 const OdGeKnotVector& uKnots, const OdGeKnotVector& vKnots) = 0;
1581
1589 virtual OdResult getNumberOfControlPointsInU(int& iCount) const = 0;
1590
1598 virtual OdResult getNumberOfControlPointsInV(int& iCount) const = 0;
1599
1607 virtual OdResult getNumberOfKnotsInU(int& iCount) const = 0;
1608
1616 virtual OdResult getNumberOfKnotsInV(int& iCount) const = 0;
1617
1625 virtual OdResult getUKnots(OdGeKnotVector& knots) const = 0;
1626
1634 virtual OdResult getVKnots(OdGeKnotVector& knots) const = 0;
1635
1643 virtual OdResult getDegreeInU(int& iDegree) const = 0;
1644
1652 virtual OdResult getDegreeInV(int& iDegree) const = 0;
1653
1665 virtual OdResult isClosedInU(bool& bIsClosed) const = 0;
1666
1678 virtual OdResult isClosedInV(bool& bIsClosed) const = 0;
1679
1692 virtual OdResult isPeriodicInU(bool& bIsPeriodic) const = 0;
1693
1706 virtual OdResult isPeriodicInV(bool& bIsPeriodic) const = 0;
1707
1717 virtual OdResult getPeriodInU(double& dPeriod) const = 0;
1718
1728 virtual OdResult getPeriodInV(double& dPeriod) const = 0;
1729
1741 virtual OdResult evaluate(double dU, double dV, OdGePoint3d& pos) const = 0;
1742
1756 virtual OdResult evaluate(double dU, double dV, OdGePoint3d& pos, OdGeVector3d& uDeriv, OdGeVector3d& vDeriv) const = 0;
1757
1774 virtual OdResult evaluate(double dU, double dV, OdGePoint3d& pos, OdGeVector3d& uDeriv, OdGeVector3d& vDeriv,
1775 OdGeVector3d& uuDeriv, OdGeVector3d& uvDeriv, OdGeVector3d& vvDeriv) const = 0;
1776
1792 virtual OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d& point, OdGeVector3dArray& derivatives) const = 0;
1793
1803 virtual OdResult isRational(bool& bIsRational) const = 0;
1804
1818 virtual OdResult isPlanar(bool& bIsPlanar, OdGePoint3d& ptOnSurface, OdGeVector3d& normal) const = 0;
1819
1830 virtual OdResult isPointOnSurface(const OdGePoint3d& point, bool& bOnSurface) const = 0;
1831
1842 virtual OdResult getNormal(double dU, double dV, OdGeVector3d& normal) const = 0;
1843
1851 virtual OdResult getNumberOfSpansInU(int& iSpan) const = 0;
1852
1860 virtual OdResult getNumberOfSpansInV(int& iSpan) const = 0;
1861
1870 virtual OdResult getIsolineAtU(double dNumberSegments, OdDbCurvePtrArray& lineSegments) const = 0;
1871
1880 virtual OdResult getIsolineAtV(double dNumberSegments, OdDbCurvePtrArray& lineSegments) const = 0;
1881
1891 virtual OdResult InsertKnot(double dVal, int iUorV) = 0;
1892
1903 virtual OdResult InsertControlPointsAtU(double dU, const OdGePoint3dArray& vCtrlPts, const OdGeDoubleArray& vWeights) = 0;
1904
1915 virtual OdResult InsertControlPointsAtV(double dV, const OdGePoint3dArray& uCtrlPts, const OdGeDoubleArray& uWeights) = 0;
1916
1925 virtual OdResult RemoveControlPointsAtU(int iUDegree) = 0;
1926
1935 virtual OdResult RemoveControlPointsAtV(int iVDegree) = 0;
1936
1950 virtual OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore) = 0;
1951
1966 virtual OdResult modifyPositionAndTangent(double dU, double dV, const OdGePoint3d& point, const OdGeVector3d* uDeriv, const OdGeVector3d* vDeriv) = 0;
1967
1977 virtual OdResult getParameterOfPoint(const OdGePoint3d& point, double& dU, double& dV) const = 0;
1978
1997 virtual OdResult getControlPoints(int& iUCount, int& iVCount, OdGePoint3dArray& points) const = 0;
1998
2017 virtual OdResult setControlPoints(int iUCount, int iVCount, const OdGePoint3dArray& points) = 0;
2018
2031 virtual OdResult getControlPointAndWeight(int iUIndex, int iVIndex, OdGePoint3d& point, double& weight, bool& bIsRational) const = 0;
2032
2044 virtual OdResult setControlPointAndWeight(int iUIndex, int iVIndex, const OdGePoint3d& point, double weight) = 0;
2045
2054 virtual OdResult setColorToSubents(OdCmColor const& color) = 0;
2055
2065
2072
2084 OdUInt8 &tiling, OdUInt8 &autoTransform) = 0;
2085
2090 OdDbEntityPtrArray& sourceEntArr,
2091 OdArray<OdDbEntityPtr>& intBoundaryEnts,
2092 OdArray<OdDbEntityPtr>& intFillEnts,
2093 OdArray<OdDbEntityPtr>& backgroundEnts,
2094 OdArray<OdDbEntityPtr>& foregroundEnts,
2095 OdArray<OdDbEntityPtr>& curveTangencyEnts,
2096 bool bIsSetProperties) = 0;
2097
2124 virtual OdResult trimSurface( const OdDbObjectIdArray& toolIds,
2125 const OdDbObjectIdArray& toolCurveIds,
2126 const OdGeVector3dArray& projVectors,
2127 const OdGePoint3d& pickPoint,
2128 const OdGeVector3d& viewVector,
2129 bool bAutoExtend,
2130 bool bAssociativeEnabled) = 0;
2131
2141 virtual OdResult projectOnToEntity( const OdDbEntity* pEntityToProject,
2142 const OdGeVector3d& projectionDirection,
2143 OdDbEntityPtrArray& projectedEntities ) const = 0;
2144
2155 const OdGeIntArray& limitingFlags) = 0;
2156
2157 //FELIX_CHANGE_BEGIN
2158 virtual OdResult rayTestEntities( const OdGePoint3d& rayBasePoint,
2159 const OdGeVector3d& rayDir,
2160 double dRayRadius,
2161 std::vector<OdDbEntityPtr> & i_entities,
2162 OdArray<OdDbSubentId> & o_subEntIds,
2163 std::vector<int> & o_indexentities,
2164 OdGeDoubleArray& parameters ) const = 0;
2165 virtual OdResult rayTestSolids( const OdGePoint3d& rayBasePoint,
2166 const OdGeVector3d& rayDir,
2167 double dRayRadius,
2168 std::vector<OdDb3dSolidPtr> &i_solids,
2169 OdArray<OdDbSubentId> & o_subEntIds,
2170 std::vector<int> & o_indexsolids,
2171 OdGeDoubleArray& parameters ) const = 0;
2172 //FELIX_CHANGE_END
2185 virtual OdResult rayTest( const OdGePoint3d& rayBasePoint,
2186 const OdGeVector3d& rayDir,
2187 double rayRadius,
2188 OdArray<OdDbSubentId> & subEntIds,
2189 OdGeDoubleArray& parameters) const = 0;
2190
2213 const OdGePoint3d& pickPt1,
2214 OdDbSurfacePtr& surf2,
2215 const OdGePoint3d& pickPt2,
2216 double dRadius,
2217 OdDb::FilletTrimMode trimMode,
2218 const OdGeVector3d& projDir) = 0;
2219
2230 double dExtDist,
2231 EdgeExtensionType extOption ) = 0;
2232
2244 OdGePoint3dArray& vertexArray,
2245 OdInt32Array& faceArray,
2246 OdGiFaceData*& faceData ) = 0;
2247
2256
2260 virtual OdResult generateSectionGeometry( SectArgs& sectArgs, OdDbEntity *pEnt, bool* bHasForeground ) = 0;
2261
2283 virtual OdResult getSectionViewInfo(const OdArray<OdDbEntityPtr>& pEnts, const OdGePoint3dArray& pPoints, const OdGeVector3d& normal, OdArray<OdDbEntityPtr>& backgroundEnts, OdArray<OdDbEntityPtr>& intHatchEnts, OdArray<OdDbEntityPtr>& intBoundaryEnts, OdArray<OdDbEntityPtr>& curveVisibilityEdges, SectionType sectType = kFull_ST, OdEdgeTypeFlags edgeVis = kTangent) = 0;
2284
2293
2302
2314 virtual OdResult addSubentitySpecialSettings(AcisDataType addedDT, AcisDataTypeArrFirst addedDTFirst, const OdDbSubentId subentId, OdArray<OdUInt32>& retArray, OdUInt32 idx) = 0;
2315
2332 virtual OdResult convertTo(const OdGePoint3dArray &arrVertexes, const OdInt32Array &arrEdges, const OdInt32Array &arrFaces, OdGiFaceData &fd,
2333 OdBoolArray &arrFacesColors, OdBoolArray &arrFacesMaterials, OdDbEntity* pEntity) = 0;
2334
2344 virtual bool getFaceMesh(GeMesh::OdGeTrMesh& mesh, OdGsMarker iFace, const wrTriangulationParams& triangulationParams) = 0;
2345
2351 virtual OdResult auditAcisData(OdDbAuditInfo* pInfo, const OdRxObject* pObj) { return eNotImplemented; }
2352
2358 virtual void enableAcisAudit(bool bEnable) = 0;
2359};
2360
2366
2372#include "TD_PackPop.h"
2373
2374#endif // _OD_MODELERGEOMETRY_INCLUDED_
@ kSolid
Definition: BrepBuilder.h:47
#define DBENT_EXPORT
Definition: DbExport.h:67
@ kUnknown
EdgeExtensionType
Definition: DbSurface.h:62
#define eNotImplemented
AcisDataTypeArrFirst
Definition: ModelerDefs.h:128
AcisDataType
Definition: ModelerDefs.h:107
int AfTypeVer
Definition: ModelerDefs.h:29
OdSmartPtr< OdModelerGeometry > OdModelerGeometryPtr
OdArray< OdModelerGeometryPtr > OdModelerGeometryPtrArray
OdEdgeTypeFlags
@ kTangent
@ kFull_ST
ptrdiff_t OdGsMarker
unsigned int OdUInt32
unsigned char OdUInt8
OdResult
Definition: OdResult.h:29
virtual OdResult createSectionObjects(const OdGePlane &sectionPlane, OdDbEntityPtrArray &sectionObjects) const =0
virtual OdResult getPeriodInV(double &dPeriod) const =0
virtual bool worldDraw(OdGiCommonDraw *pWd, OdUInt32 geomType, const NumIsolines *pNumIsolines=0)=0
virtual OdResult getNormal(double dU, double dV, OdGeVector3d &normal) const =0
virtual OdResult getAreaProp(const OdGePoint3d &origin, const OdGeVector3d &xAxis, const OdGeVector3d &yAxis, double &perimeter, double &area, OdGePoint2d &centroid, double momInertia[2], double &prodInertia, double prinMoments[2], OdGeVector2d prinAxes[2], double radiiGyration[2], OdGePoint2d &extentsLow, OdGePoint2d &extentsHigh) const =0
virtual OdResult checkSweepPathCurve(OdDbEntity *pPathEnt, bool displayErrorMessages=false)=0
virtual void createWedge(double xLen, double yLen, double zLen)=0
virtual OdResult sliceByPlane(const OdGePlane &slicePlane, OdDbSurfacePtr &pNegHalfSurface, OdDbSurfacePtr &pNewSurface, bool bNotModifyItself)=0
virtual bool explode(OdDbEntityPtrArray &entitySet) const =0
virtual OdResult getControlPoints(int &iUCount, int &iVCount, OdGePoint3dArray &points) const =0
virtual void transformBy(const OdGeMatrix3d &xfm)=0
virtual OdResult out(OdStreamBuf *pStreamBuf, AfTypeVer typeVer, bool standardSaveFlag=true) const =0
virtual OdResult extrudeFaces(const OdArray< OdDbSubentId * > &faceSubentIds, double height, double taper)=0
virtual OdResult getCachedSilhouettes(OdGeCurve3dPtrArray *cachedSilhouettes)=0
virtual OdResult revolve(const OdDbRegion *pRegion, const OdGePoint3d &axisPoint, const OdGeVector3d &axisDir, double angleOfRevolution, bool isSolid=true)=0
virtual OdResult intersectWith(const OdDbEntity *ent, OdDb::Intersect intType, const OdGePlane &projPlane, OdGePoint3dArray &points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker) const =0
virtual OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore)=0
virtual OdResult checkCrossSectionCurves(OdDbEntityPtrArray &crossSectionCurves, bool &allOpen, bool &allClosed, bool &allPlanar, bool displayErrorMessages=false)=0
virtual OdResult get(int &iUDegree, int &iVDegree, bool &bRational, int &iUNumControlPoints, int &iVNumControlPoints, OdGePoint3dArray &ctrlPtsArr, OdGeDoubleArray &weights, OdGeKnotVector &uKnots, OdGeKnotVector &vKnots) const =0
virtual OdResult evaluate(double dU, double dV, OdGePoint3d &pos, OdGeVector3d &uDeriv, OdGeVector3d &vDeriv, OdGeVector3d &uuDeriv, OdGeVector3d &uvDeriv, OdGeVector3d &vvDeriv) const =0
virtual OdResult getIsolineAtU(double dNumberSegments, OdDbCurvePtrArray &lineSegments) const =0
virtual OdResult getParameterOfPoint(const OdGePoint3d &point, double &dU, double &dV) const =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 =0
virtual MaterialState hasMaterials() const
virtual OdResult RemoveControlPointsAtU(int iUDegree)=0
virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color)=0
virtual OdResult setMaterialToSubents(OdDbObjectId materialId)=0
virtual OdResult getNumberOfControlPointsInU(int &iCount) const =0
virtual OdResult modifyPositionAndTangent(double dU, double dV, const OdGePoint3d &point, const OdGeVector3d *uDeriv, const OdGeVector3d *vDeriv)=0
virtual OdResult isRational(bool &bIsRational) const =0
virtual OdResult setSubentMaterialMapper(const OdDbSubentId &subentId, OdGeMatrix3d &mx, OdUInt8 &projection, OdUInt8 &tiling, OdUInt8 &autoTransform)=0
virtual OdResult createCachedCurves(OdGeCurve3dPtrArray &pCurves)=0
virtual OdResult filletEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdGeDoubleArray &radius, const OdGeDoubleArray &startSetback, const OdGeDoubleArray &endSetback)=0
virtual OdResult isPeriodicInV(bool &bIsPeriodic) const =0
virtual OdResult trimSurface(const OdDbObjectIdArray &toolIds, const OdDbObjectIdArray &toolCurveIds, const OdGeVector3dArray &projVectors, const OdGePoint3d &pickPoint, const OdGeVector3d &viewVector, bool bAutoExtend, bool bAssociativeEnabled)=0
virtual OdResult rayTestEntities(const OdGePoint3d &rayBasePoint, const OdGeVector3d &rayDir, double dRayRadius, std::vector< OdDbEntityPtr > &i_entities, OdArray< OdDbSubentId > &o_subEntIds, std::vector< int > &o_indexentities, OdGeDoubleArray &parameters) const =0
virtual OdResult createLoftedObject(OdDbEntityPtrArray &crossSectionCurves, OdDbEntityPtrArray &guideCurves, OdDbEntity *pPathCurve, OdDbLoftOptions &loftOptions, bool isSolid=true)=0
virtual bool getNurbCurvesCache(OdGeCurve3dPtrArray &) const
virtual OdResult in(OdStreamBuf *pStreamBuf, AfTypeVer *typeVer=0, bool standardSaveFlag=true)=0
virtual OdResult offsetFaces(const OdArray< OdDbSubentId * > &faceSubentIds, double offsetDistance)=0
virtual void ClearMaterialMapperAttributes()=0
virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface, OdDbSurfacePtr &pNegHalfSurface, OdDbSurfacePtr &pNewSurface, bool bNotModifyItself)=0
virtual OdResult setControlPointAndWeight(int iUIndex, int iVIndex, const OdGePoint3d &point, double weight)=0
virtual OdResult getNumberOfKnotsInU(int &iCount) const =0
virtual OdResult getEdgeSubentityGeometry(OdArray< OdUInt32 > indexesOfEdgeCalculation, OdGeCurve3d *&pEdgeCurve)=0
virtual OdResult getSlice(OdDbSurface *pSurface, bool bGetNegHalfToo, OdDb3dSolidPtr &pNegHalfSolid)=0
virtual OdResult evaluate(double dU, double dV, OdGePoint3d &pos, OdGeVector3d &uDeriv, OdGeVector3d &vDeriv) const =0
virtual OdResult generateMesh(const OdBrMesh2dFilter &filter, OdBrMesh2d &mesh2d)
virtual OdResult createExtrudedObject(OdDbEntity *pSweepEnt, const OdGeVector3d &directionVec, OdDbSweepOptions &sweepOptions, bool isSolid=true, bool bHistoryEnabled=false)=0
virtual OdResult getArea(double &regionArea) const =0
virtual void * internalSubentPtr(const OdDbSubentId &id) const =0
virtual bool drawSilhouettes(OdGiViewportDraw *pVd)=0
ODRX_DECLARE_MEMBERS(OdModelerGeometry)
virtual OdResult generateSectionGeometry(const OdDbSection *pSection, OdDbEntityPtrArray &sourceEntArr, OdArray< OdDbEntityPtr > &intBoundaryEnts, OdArray< OdDbEntityPtr > &intFillEnts, OdArray< OdDbEntityPtr > &backgroundEnts, OdArray< OdDbEntityPtr > &foregroundEnts, OdArray< OdDbEntityPtr > &curveTangencyEnts, bool bIsSetProperties)=0
virtual OdResult createSculptedSolid(OdDbEntityPtrArray &limitingBodies, const OdGeIntArray &limitingFlags)=0
virtual OdResult taperFaces(const OdArray< OdDbSubentId * > &faceSubentIds, const OdGePoint3d &basePoint, const OdGeVector3d &draftVector, double draftAngle)=0
virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const =0
virtual OdResult extrudeFacesAlongPath(const OdArray< OdDbSubentId * > &faceSubentIds, const OdDbCurve *path)=0
virtual OdResult getDegreeInU(int &iDegree) const =0
virtual OdResult copySubEntity(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity) const =0
virtual OdResult checkRevolveCurve(OdDbEntity *pRevEnt, const OdGePoint3d &axisPnt, const OdGeVector3d &axisDir, bool &closed, bool &endPointsOnAxis, bool &planar, bool displayErrorMessages=false)=0
virtual OdResult getControlPointAndWeight(int iUIndex, int iVIndex, OdGePoint3d &point, double &weight, bool &bIsRational) const =0
virtual void createSphere(double radius)=0
virtual bool brep(OdBrBrep &brBrep) const =0
virtual OdResult clear()=0
virtual bool setFACETRES(double facetRes)=0
virtual OdResult convertToNurbSurface(OdDbNurbSurfacePtrArray &nurbSurfaceArray)=0
virtual OdResult getPeriodInU(double &dPeriod) const =0
virtual OdResult getBoundingBox(OdGeExtents3d &box)=0
virtual OdResult generateSectionGeometry(SectArgs &sectArgs, OdDbEntity *pEnt, bool *bHasForeground)=0
virtual OdResult intersectWith(const OdDbEntity *ent, OdDb::Intersect intType, OdGePoint3dArray &points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker) const =0
virtual OdResult imprintEntity(const OdDbEntity *pEntity)=0
virtual geomType bodyType() const =0
virtual OdResult offsetBody(double offsetDistance)=0
virtual OdResult createSweptObject(OdDbEntity *pSweepEnt, OdDbEntity *pPathEnt, OdDbSweepOptions &sweepOptions, bool isSolid=true, bool bHistoryEnabled=false)=0
virtual OdResult getNumberOfSpansInU(int &iSpan) const =0
virtual OdResult getObjectMesh(const OdDbFaceterSettings *faceter, OdGePoint3dArray &vertexArray, OdInt32Array &faceArray, OdGiFaceData *&faceData)=0
virtual OdResult getSubentPathsAtGsMarker(OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &viewXform, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *entAndInsertStack=0) const =0
virtual OdResult separateBody(OdDb3dSolidPtrArray &newSolids)=0
virtual OdResult isClosedInV(bool &bIsClosed) const =0
virtual OdResult cleanBody()=0
virtual void createFrustum(double height, double xRadius, double yRadius, double topXRadius)=0
virtual void * body() const
virtual void createTorus(double majorRadius, double minorRadius)=0
virtual OdResult isPlanar(bool &bIsPlanar, OdGePoint3d &ptOnSurface, OdGeVector3d &normal) const =0
virtual OdResult getVKnots(OdGeKnotVector &knots) const =0
virtual OdResult getUKnots(OdGeKnotVector &knots) const =0
virtual OdResult rayTest(const OdGePoint3d &rayBasePoint, const OdGeVector3d &rayDir, double rayRadius, OdArray< OdDbSubentId > &subEntIds, OdGeDoubleArray &parameters) const =0
virtual OdResult booleanOper(OdDbDatabase *database, OdDb::BoolOperType operation, OdModelerGeometry *otherBody, geomType typeThis, geomType typeOther)=0
virtual OdResult getDegreeInV(int &iDegree) const =0
virtual OdResult InsertKnot(double dVal, int iUorV)=0
virtual bool getFaceMesh(GeMesh::OdGeTrMesh &mesh, OdGsMarker iFace, const wrTriangulationParams &triangulationParams)=0
virtual OdResult ChangeFacesDoubleSidedParam(bool isDoubleSided)=0
virtual OdResult removeFaces(const OdArray< OdDbSubentId * > &faceSubentIds)=0
virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr &pSolid) const =0
virtual OdResult getSection(const OdGePlane &plane, OdDbRegionPtr &sectionRegion, OdDbEntityPtrArray *pSectionCurves=NULL) const =0
virtual OdResult projectOnToEntity(const OdDbEntity *pEntityToProject, const OdGeVector3d &projectionDirection, OdDbEntityPtrArray &projectedEntities) const =0
virtual bool setMMPerUnit(double mmPerUnit)=0
virtual OdResult checkInterference(OdDbDatabase *database, const OdModelerGeometry *otherSolid, bool createNewSolid, bool &solidsInterfere, OdDb3dSolidPtr &commonVolumeSolid) const =0
virtual OdResult isPointOnSurface(const OdGePoint3d &point, bool &bOnSurface) const =0
virtual OdResult booleanOper(OdDbDatabase *database, OdDb::BoolOperType operation, const OdModelerGeometry *otherBody, geomType typeThis, geomType typeOther, OdSmartPtr< OdModelerGeometry > &result, OdDbEntityPtrArray *intersectionEntities=NULL) const =0
virtual OdDbSubentId internalSubentId(void *ent) const =0
virtual OdResult convertTo(const OdGePoint3dArray &arrVertexes, const OdInt32Array &arrEdges, const OdInt32Array &arrFaces, OdGiFaceData &fd, OdBoolArray &arrFacesColors, OdBoolArray &arrFacesMaterials, OdDbEntity *pEntity)=0
virtual OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d &point, OdGeVector3dArray &derivatives) const =0
virtual OdResult transformFaces(const OdArray< OdDbSubentId * > &faceSubentIds, const OdGeMatrix3d &matrix)=0
virtual OdResult getNumberOfKnotsInV(int &iCount) const =0
virtual OdResult checkPathCurve(OdDbEntity *pPathCurve, bool displayErrorMessages=false)=0
virtual OdResult setColorToSubents(OdCmColor const &color)=0
virtual OdResult createPyramid(double height, int sides, double radius, double topRadius=0.0)=0
virtual OdResult evaluate(double dU, double dV, OdGePoint3d &pos) const =0
virtual OdResult getIsolineAtV(double dNumberSegments, OdDbCurvePtrArray &lineSegments) const =0
virtual OdResult setControlPoints(int iUCount, int iVCount, const OdGePoint3dArray &points)=0
virtual OdResult getGsMarkersAtSubentPath(const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const =0
virtual void enableAcisAudit(bool bEnable)=0
virtual bool getTransformation(OdGeMatrix3d &xfm)=0
virtual OdResult InsertControlPointsAtV(double dV, const OdGePoint3dArray &uCtrlPts, const OdGeDoubleArray &uWeights)=0
virtual OdResult setSubentPath(OdBrEntity &, OdDbFullSubentPath &)
virtual OdResult getSubentMaterialMapper(const OdDbSubentId &subentId, OdGeMatrix3d &mx, OdUInt8 &projection, OdUInt8 &tiling, OdUInt8 &autoTransform) const =0
virtual OdResult setBody(const void *)
virtual OdResult extendEdges(OdDbFullSubentPathArray &edgesId, double dExtDist, EdgeExtensionType extOption)=0
virtual OdResult createBlendObject(OdDbEntityPtrArray &blendedEdges, OdDbBlendOptions &blendOptions, bool isSolid=true)=0
virtual OdResult set(int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints, const OdGePoint3dArray &ctrlPtsArr, const OdGeDoubleArray &weights, const OdGeKnotVector &uKnots, const OdGeKnotVector &vKnots)=0
virtual bool hasTrueColorAttributes() const =0
virtual void ClearColorAttributes()=0
virtual OdResult getPerimeter(double &) const =0
virtual OdResult isPeriodicInU(bool &bIsPeriodic) const =0
virtual OdResult addSubentitySpecialSettings(AcisDataType addedDT, AcisDataTypeArrFirst addedDTFirst, const OdDbSubentId subentId, OdArray< OdUInt32 > &retArray, OdUInt32 idx)=0
virtual OdResult InsertControlPointsAtU(double dU, const OdGePoint3dArray &vCtrlPts, const OdGeDoubleArray &vWeights)=0
virtual OdResult rayTestSolids(const OdGePoint3d &rayBasePoint, const OdGeVector3d &rayDir, double dRayRadius, std::vector< OdDb3dSolidPtr > &i_solids, OdArray< OdDbSubentId > &o_subEntIds, std::vector< int > &o_indexsolids, OdGeDoubleArray &parameters) const =0
virtual OdResult setMaterialResolver(const OdMaterialResolver *pResolver)
virtual OdResult getHlrCurves(OdEdgeHLREdgeVisitor &edgeVisitor, const OdGeVector3d &viewDir, const OdDbEntityPtrArray &entities, const OdGeMatrix3dArray *xforms=NULL, OdEdgeTypeFlags edgeType=kTangent)=0
virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId matId)=0
virtual void ClearMaterialAttributes(const OdArray< OdDbSubentId > *aSubents=NULL)=0
virtual OdResult auditAcisData(OdDbAuditInfo *pInfo, const OdRxObject *pObj)
virtual OdResult extrude(const OdDbRegion *pRegion, double height, double taperAngle, bool isSolid=true)=0
virtual OdResult isClosedInU(bool &bIsClosed) const =0
virtual OdResult shellBody(const OdArray< OdDbSubentId * > &faceSubentIds, double offsetDistance)=0
virtual OdResult chamferEdges(const OdArray< OdDbSubentId * > &edgeSubentIds, const OdDbSubentId &baseFaceSubentId, double baseDist, double otherDist)=0
virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdUInt64 &matId) const =0
virtual OdResult restoreAttributes(OdModelerGeometry *oldmodeler)=0
virtual OdResult getSlice(const OdGePlane &plane, bool getNegHalfToo, OdDb3dSolidPtr &negHalfSolid)=0
virtual void createBox(double xLen, double yLen, double zLen)=0
virtual OdResult RemoveControlPointsAtV(int iVDegree)=0
virtual OdResult extrudeAlongPath(const OdDbRegion *region, const OdDbCurve *path, double taperAngle=0.0, bool isSolid=true)=0
virtual OdResult getPlane(OdGePlane &regionPlane) const =0
virtual OdResult setMaterialMapperToSubents(OdGeMatrix3d &mx, OdUInt8 &projection, OdUInt8 &tiling, OdUInt8 &autoTransform)=0
virtual OdResult createFrom(const OdDbEntity *pFromEntity)=0
virtual OdResult convertToRegion(OdDbEntityPtrArray &regions)=0
virtual OdResult getNumberOfControlPointsInV(int &iCount) const =0
virtual OdResult createRevolvedObject(OdDbEntity *pRevEnt, const OdGePoint3d &axisPnt, const OdGeVector3d &axisDir, double revAngle, double startAngle, OdDbRevolveOptions &revolveOptions, bool isSolid=true, bool bHistoryEnabled=false)=0
virtual OdResult checkSweepCurve(OdDbEntity *pSweepEnt, OdDb::Planarity &planarity, OdGePoint3d &pnt, OdGeVector3d &vec, bool &closed, double &approxArcLen, bool displayErrorMessages=false)=0
virtual bool getMMPerUnit(double &mmPerUnit) const =0
virtual OdResult getSectionViewInfo(const OdArray< OdDbEntityPtr > &pEnts, const OdGePoint3dArray &pPoints, const OdGeVector3d &normal, OdArray< OdDbEntityPtr > &backgroundEnts, OdArray< OdDbEntityPtr > &intHatchEnts, OdArray< OdDbEntityPtr > &intBoundaryEnts, OdArray< OdDbEntityPtr > &curveVisibilityEdges, SectionType sectType=kFull_ST, OdEdgeTypeFlags edgeVis=kTangent)=0
virtual OdResult createFilletSurface(OdDbSurfacePtr &surf1, const OdGePoint3d &pickPt1, OdDbSurfacePtr &surf2, const OdGePoint3d &pickPt2, double dRadius, OdDb::FilletTrimMode trimMode, const OdGeVector3d &projDir)=0
virtual OdResult checkGuideCurves(OdDbEntityPtrArray &guideCurves, bool displayErrorMessages=false)=0
virtual OdResult getNumberOfSpansInV(int &iSpan) const =0
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
FilletTrimMode
Definition: DbDatabase.h:382
BoolOperType
Definition: ModelerDefs.h:158
Intersect
Definition: OdaDefs.h:481
Planarity
Definition: DbEntity.h:74