CFx SDK Documentation  2022 SP0
ModelerGeometry.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 _OD_MODELERGEOMETRY_INCLUDED_
26 #define _OD_MODELERGEOMETRY_INCLUDED_
27 
28 #define STL_USING_MAP
29 #include "OdaSTL.h"
30 #include "RxObject.h"
31 #include "ModelerDefs.h"
32 #include "DbEntity.h"
33 #include "Db3dSolid.h"
34 #include "DbRegion.h"
35 #include "DbSubDMesh.h"
36 #include "DbNurbSurface.h"
37 #include "Ge/GeNurbCurve3d.h"
38 #include "Ge/GeCurve3dPtrArray.h"
39 #include "MaterialResolver.h"
40 
41 //FELIX_CHANGE_BEGIN
42 #include <vector>
43 //FELIX_CHANGE_END
44 
45 class OdStreamBuf;
46 class OdBrBrep;
47 class OdBrEntity;
48 class OdGiCommonDraw;
49 class OdGiViewportDraw;
50 class OdDbCurve;
51 class OdDbRevolveOptions;
52 class OdDbSweepOptions;
53 class OdDbLoftOptions;
54 class OdDbSection;
55 class SectArgs;
56 class OdBrMesh2dFilter;
57 class OdBrMesh2d;
58 namespace ACIS { class ABAuditInfo; }
59 
60 #include "TD_PackPush.h"
61 
78 {
79 protected:
81 
82 public:
84 
85  // in/out functionality
86 
106  virtual OdResult in(OdStreamBuf* pStreamBuf, AfTypeVer *typeVer = 0, bool standardSaveFlag = true) = 0;
107 
108 
127  virtual OdResult out(OdStreamBuf* pStreamBuf, AfTypeVer typeVer, bool standardSaveFlag = true) const = 0;
128 
136  virtual bool brep(OdBrBrep& brBrep) const = 0;
137 
138 
139  virtual OdResult setSubentPath(OdBrEntity & /*pInpEnt*/, OdDbFullSubentPath& /*subpath*/) { return eNotImplemented; }
140 
141  virtual OdResult generateMesh(const OdBrMesh2dFilter& filter, OdBrMesh2d &mesh2d) { return eNotImplemented; }
142 
147  virtual bool setFACETRES(double facetRes) = 0;
148 
149  struct NumIsolines
150  {
151  OdUInt32 numU, numV;
152  };
182  virtual bool worldDraw(OdGiCommonDraw* pWd, OdUInt32 geomType, const NumIsolines *pNumIsolines = 0) = 0;
183 
198  virtual bool drawSilhouettes(OdGiViewportDraw* pVd) = 0;
199  virtual OdResult getCachedSilhouettes(OdGeCurve3dPtrArray* cachedSilhouettes) = 0;
200 
214  virtual bool explode(OdDbEntityPtrArray& entitySet) const = 0;
215 
220  virtual bool getTransformation(OdGeMatrix3d& xfm) = 0;
221 
227  virtual void transformBy( const OdGeMatrix3d& xfm ) = 0;
228 
246  virtual void createBox( double xLen, double yLen, double zLen ) = 0;
273  virtual void createFrustum( double height, double xRadius, double yRadius, double topXRadius ) = 0;
285  virtual void createSphere( double radius ) = 0;
300  virtual void createTorus( double majorRadius, double minorRadius ) = 0;
301 
324  virtual void createWedge( double xLen, double yLen, double zLen ) = 0;
325 
345  virtual OdResult extrude(const OdDbRegion* pRegion, double height, double taperAngle, bool isSolid = true) = 0;
346 
366  virtual OdResult revolve(const OdDbRegion* pRegion, const OdGePoint3d& axisPoint,
367  const OdGeVector3d& axisDir, double angleOfRevolution, bool isSolid = true) = 0;
368 
372  virtual void ClearColorAttributes() = 0;
373 
377  virtual void ClearMaterialAttributes() = 0;
378 
382  virtual void ClearMaterialMapperAttributes() = 0;
383 
388  {
389  kNoMaterials = 0,
390  kHasMaterials = 1,
391  kUnknown = 2
392  };
393  virtual MaterialState hasMaterials() const {return kUnknown; }
394 
399  virtual bool hasTrueColorAttributes() const = 0;
400 
409  virtual OdResult getPlane(OdGePlane& regionPlane) const = 0;
410 
417  virtual bool setMMPerUnit(double mmPerUnit) = 0;
424  virtual bool getMMPerUnit(double &mmPerUnit) const = 0;
425 
429  enum geomType
430  {
431  kUndefined = 0,
432  kBody = 1,
433  kSolid = 2,
434  kRegion = 3,
435  kSurface = 4
436  };
437 
451  virtual geomType bodyType() const = 0;
452 
453 
470 
487  virtual OdResult booleanOper(OdDb::BoolOperType operation, const OdSmartPtr<OdModelerGeometry> pModelerPar, OdDbEntityPtrArray& intersectionEntities) = 0;
488 
495  virtual OdResult getArea(double& regionArea) const = 0;
496 
504  virtual OdResult getPerimeter(double&) const = 0;
505 
533  virtual OdResult getAreaProp( const OdGePoint3d& origin, const OdGeVector3d& xAxis,
534  const OdGeVector3d& yAxis, double& perimeter,
535  double& area, OdGePoint2d& centroid,
536  double momInertia[2], double& prodInertia,
537  double prinMoments[2], OdGeVector2d prinAxes[2],
538  double radiiGyration[2], OdGePoint2d& extentsLow,
539  OdGePoint2d& extentsHigh ) const = 0;
540 
546  virtual OdResult clear( ) = 0;
547 
572  virtual OdResult extrudeAlongPath(const OdDbRegion* region, const OdDbCurve* path, double taperAngle = 0.0, bool isSolid = true) = 0;
573 
598  virtual OdResult imprintEntity(const OdDbEntity *pEntity) = 0;
599 
615  virtual OdResult checkInterference(const OdDb3dSolid* otherSolid,
616  bool createNewSolid,
617  bool& solidsInterfere,
618  OdDb3dSolidPtr &commonVolumeSolid)
619  const = 0;
620 
636  virtual OdResult getMassProp(double& volume,
637  OdGePoint3d& centroid,
638  double momInertia[3],
639  double prodInertia[3],
640  double prinMoments[3],
641  OdGeVector3d prinAxes[3],
642  double radiiGyration[3],
643  OdGeExtents3d& extents) const = 0;
644 
658  virtual OdResult getSection(const OdGePlane& plane, OdDbRegionPtr &sectionRegion, OdDbEntityPtrArray* pSectionCurves = NULL) const = 0;
659 
676  virtual OdResult getSlice(const OdGePlane& plane, bool getNegHalfToo, OdDb3dSolidPtr &negHalfSolid) = 0;
677 
695  virtual OdResult getSlice(OdDbSurface* pSurface, bool bGetNegHalfToo, OdDb3dSolidPtr& pNegHalfSolid) = 0;
696 
702  virtual OdResult cleanBody() = 0;
703 
718  virtual OdResult offsetBody(double offsetDistance) = 0;
719  //virtual OdResult offsetBody(OdDbEntity* pOffsetEnt, double offsetDistance) = 0;
732  virtual OdResult separateBody(OdDb3dSolidPtrArray &newSolids) = 0;
747  const OdGeVector3d& directionVec,
748  OdDbSweepOptions& sweepOptions,
749  bool isSolid = true,
750  bool bHistoryEnabled = false) = 0;
766  OdDbEntityPtrArray& crossSectionCurves,
767  OdDbEntityPtrArray& guideCurves,
768  OdDbEntity* pPathCurve,
769  OdDbLoftOptions& loftOptions,
770  bool isSolid = true) = 0;
771 
786  //virtual OdResult createLoftedObjectByCoedges(
787  // OdDbEntityPtrArray& crossSectionCurves,
788  // OdDbEntityPtrArray& guideCurves,
789  // OdDbEntity* pPathCurve,
790  // OdDbLoftOptions& loftOptions,
791  // bool isSolid = true) = 0;
792 
813  virtual OdResult createPyramid(double height, int sides,
814  double radius, double topRadius = 0.0 ) = 0;
815 
836  const OdGePoint3d& axisPnt,
837  const OdGeVector3d& axisDir,
838  double revAngle, double startAngle,
839  OdDbRevolveOptions& revolveOptions,
840  bool isSolid = true,
841  bool bHistoryEnabled = false) = 0;
842 
858  virtual OdResult createSweptObject ( OdDbEntity* pSweepEnt,
859  OdDbEntity* pPathEnt,
860  OdDbSweepOptions& sweepOptions,
861  bool isSolid = true,
862  bool bHistoryEnabled = false) = 0;
863 
864  // Loft options utility functions
877  OdDbEntityPtrArray& crossSectionCurves,
878  bool& allOpen, bool& allClosed, bool& allPlanar,
879  bool displayErrorMessages = false ) = 0;
880 
890  bool displayErrorMessages = false ) = 0;
891 
900  virtual OdResult checkPathCurve ( OdDbEntity *pPathCurve,
901  bool displayErrorMessages = false ) = 0;
902 
903  // Sweep options utility functions
919  virtual OdResult checkSweepCurve ( OdDbEntity *pSweepEnt,
920  OdDb::Planarity& planarity, OdGePoint3d& pnt, OdGeVector3d& vec,
921  bool& closed, double& approxArcLen, bool displayErrorMessages = false ) = 0;
922 
923  virtual OdResult checkSweepPathCurve ( OdDbEntity *pPathEnt, bool displayErrorMessages = false ) = 0;
924 
925  // Revolve options utility functions
940  OdDbEntity* pRevEnt,
941  const OdGePoint3d& axisPnt,
942  const OdGeVector3d& axisDir,
943  bool& closed,
944  bool& endPointsOnAxis,
945  bool& planar,
946  bool displayErrorMessages = false) = 0;
947 
958  virtual OdResult createFrom ( const OdDbEntity* pFromEntity ) = 0;
959 
967  virtual OdResult convertToRegion ( OdDbEntityPtrArray& regions ) = 0;
968 
978  virtual OdResult thicken(double thickness, bool bBothSides, OdDb3dSolidPtr& pSolid) const = 0;
988  virtual OdResult intersectWith( const OdDbEntity* ent, OdDb::Intersect intType,
989  OdGePoint3dArray& points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker ) const = 0;
990 
1001  virtual OdResult intersectWith( const OdDbEntity* ent, OdDb::Intersect intType, const OdGePlane& projPlane,
1002  OdGePoint3dArray& points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker ) const = 0;
1003 
1004  virtual OdResult copySubEntity(const OdDbSubentId &subentId, OdDbEntityPtr &newEntity) const = 0;
1019  virtual OdResult taperFaces(const OdArray<OdDbSubentId *> &faceSubentIds, const OdGePoint3d &basePoint,
1020  const OdGeVector3d &draftVector, double draftAngle) = 0;
1031  virtual OdResult removeFaces(const OdArray<OdDbSubentId *> &faceSubentIds) = 0;
1032 
1047  virtual OdResult offsetFaces(const OdArray<OdDbSubentId *> &faceSubentIds, double offsetDistance) = 0;
1048 
1062  virtual OdResult shellBody(const OdArray<OdDbSubentId *> &faceSubentIds, double offsetDistance) = 0;
1063 
1073  virtual OdResult transformFaces(const OdArray<OdDbSubentId *> &faceSubentIds, const OdGeMatrix3d &matrix) = 0;
1074 
1086  OdGsMarker gsMark,
1087  const OdGePoint3d& pickPoint,
1088  const OdGeMatrix3d& viewXform,
1089  OdDbFullSubentPathArray& subentPaths,
1090  const OdDbObjectIdArray* entAndInsertStack = 0) const = 0;
1100  OdGsMarkerArray& gsMarkers) const = 0;
1106  virtual OdDbSubentId internalSubentId(void* ent) const = 0;
1107 
1113  virtual void* internalSubentPtr(const OdDbSubentId& id) const = 0;
1114 
1115  virtual bool getNurbCurvesCache(OdGeCurve3dPtrArray &) const { return false; }
1116 
1117  // for internal use only
1118  virtual OdResult setBody(const void * /*pBody*/) { return eNotImplemented; }
1119  virtual void * body( ) const { return 0; }
1120 
1129  virtual OdResult setSubentColor(const OdDbSubentId &subentId, const OdCmColor &color) = 0;
1130 
1139  virtual OdResult getSubentColor(const OdDbSubentId &subentId, OdCmColor &color) const = 0;
1140 
1152  virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId matId) = 0;
1153 
1162  virtual OdResult getSubentMaterial(const OdDbSubentId &subentId, OdUInt64& matId) const = 0;
1163 
1164  virtual OdResult setSubentMaterialMapper( const OdDbSubentId &subentId,
1165  OdGeMatrix3d &mx,
1166  OdUInt8 &projection,
1167  OdUInt8 &tiling,
1168  OdUInt8 &autoTransform) = 0;
1170  OdGeMatrix3d &mx,
1171  OdUInt8 &projection,
1172  OdUInt8 &tiling,
1173  OdUInt8 &autoTransform) const = 0;
1184  virtual OdResult chamferEdges(const OdArray<OdDbSubentId *> &edgeSubentIds,
1185  const OdDbSubentId& baseFaceSubentId,
1186  double baseDist,
1187  double otherDist) = 0;
1198  virtual OdResult filletEdges( const OdArray<OdDbSubentId *> &edgeSubentIds,
1199  const OdGeDoubleArray& radius,
1200  const OdGeDoubleArray& startSetback,
1201  const OdGeDoubleArray& endSetback) = 0;
1202 
1212  virtual OdResult createSectionObjects(const OdGePlane& sectionPlane, OdDbEntityPtrArray& sectionObjects) const = 0;
1213 
1227  OdDbEntityPtr pEntity,
1228  unsigned int flags ) const = 0;
1239  virtual OdResult sliceByPlane(const OdGePlane& slicePlane, OdDbSurfacePtr& pNegHalfSurface, OdDbSurfacePtr& pNewSurface, bool bNotModifyItself) = 0;
1240 
1251  virtual OdResult sliceBySurface(const OdDbSurfacePtr pSlicingSurface, OdDbSurfacePtr& pNegHalfSurface, OdDbSurfacePtr& pNewSurface, bool bNotModifyItself) = 0;
1252 
1278  virtual OdResult extrudeFaces(const OdArray<OdDbSubentId *> &faceSubentIds, double height, double taper) = 0;
1279 
1301  virtual OdResult extrudeFacesAlongPath(const OdArray<OdDbSubentId *> &faceSubentIds, const OdDbCurve* path) = 0;
1302 
1303  virtual OdResult ChangeFacesDoubleSidedParam(bool isDoubleSided) = 0;
1304 
1312  virtual OdResult convertToNurbSurface(OdDbNurbSurfaceArray& nurbSurfaceArray) = 0;
1313 
1314  virtual OdResult get( int& iUDegree, int& iVDegree, bool& bRational, int& iUNumControlPoints, int& iVNumControlPoints,
1315  OdGePoint3dArray& ctrlPtsArr, OdGeDoubleArray& weights,
1316  OdGeKnotVector& uKnots, OdGeKnotVector& vKnots) const = 0;
1317 
1318  virtual OdResult set (int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints,
1319  const OdGePoint3dArray& ctrlPtsArr, const OdGeDoubleArray& weights,
1320  const OdGeKnotVector& uKnots, const OdGeKnotVector& vKnots) = 0;
1328  virtual OdResult getNumberOfControlPointsInU(int& iCount) const = 0;
1329 
1337  virtual OdResult getNumberOfControlPointsInV(int& iCount) const = 0;
1338 
1346  virtual OdResult getNumberOfKnotsInU(int& iCount) const = 0;
1347 
1355  virtual OdResult getNumberOfKnotsInV(int& iCount) const = 0;
1356 
1364  virtual OdResult getUKnots(OdGeKnotVector& knots) const = 0;
1365 
1373  virtual OdResult getVKnots(OdGeKnotVector& knots) const = 0;
1374 
1382  virtual OdResult getDegreeInU(int& iDegree) const = 0;
1383 
1391  virtual OdResult getDegreeInV(int& iDegree) const = 0;
1392 
1401  virtual OdResult isClosedInU(bool& bIsClosed) const = 0;
1402 
1411  virtual OdResult isClosedInV(bool& bIsClosed) const = 0;
1412 
1421  virtual OdResult isPeriodicInU(bool& bIsPeriodic) const = 0;
1422 
1431  virtual OdResult isPeriodicInV(bool& bIsPeriodic) const = 0;
1432 
1441  virtual OdResult getPeriodInU(double& dPeriod) const = 0;
1450  virtual OdResult getPeriodInV(double& dPeriod) const = 0;
1451 
1462  virtual OdResult evaluate(double dU, double dV, OdGePoint3d& pos) const = 0;
1463 
1477  virtual OdResult evaluate(double dU, double dV, OdGePoint3d& pos, OdGeVector3d& uDeriv, OdGeVector3d& vDeriv) const = 0;
1478 
1494  virtual OdResult evaluate(double dU, double dV, OdGePoint3d& pos, OdGeVector3d& uDeriv, OdGeVector3d& vDeriv,
1495  OdGeVector3d& uuDeriv, OdGeVector3d& uvDeriv, OdGeVector3d& vvDeriv) const = 0;
1496 
1509  virtual OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d& point, OdGeVector3dArray& derivatives) const = 0;
1510 
1519  virtual OdResult isRational(bool& bIsRational) const = 0;
1520 
1531  virtual OdResult isPlanar(bool& bIsPlanar, OdGePoint3d& ptOnSurface, OdGeVector3d& normal) const = 0;
1532 
1542  virtual OdResult isPointOnSurface(const OdGePoint3d& point, bool& bOnSurface) const = 0;
1543 
1553  virtual OdResult getNormal(double dU, double dV, OdGeVector3d& normal) const = 0;
1554 
1562  virtual OdResult getNumberOfSpansInU(int& iSpan) const = 0;
1563 
1571  virtual OdResult getNumberOfSpansInV(int& iSpan) const = 0;
1572 
1581  virtual OdResult getIsolineAtU(double dNumberSegments, OdDbCurvePtrArray& lineSegments) const = 0;
1582 
1591  virtual OdResult getIsolineAtV(double dNumberSegments, OdDbCurvePtrArray& lineSegments) const = 0;
1592 
1603  virtual OdResult InsertKnot(double dVal, int iUorV) = 0;
1604 
1615  virtual OdResult InsertControlPointsAtU(double dU, const OdGePoint3dArray& vCtrlPts, const OdGeDoubleArray& vWeights) = 0;
1616 
1627  virtual OdResult InsertControlPointsAtV(double dV, const OdGePoint3dArray& uCtrlPts, const OdGeDoubleArray& uWeights) = 0;
1628 
1637  virtual OdResult RemoveControlPointsAtU(int iUDegree) = 0;
1638 
1647  virtual OdResult RemoveControlPointsAtV(int iVDegree) = 0;
1648 
1661  virtual OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore) = 0;
1662 
1676  virtual OdResult modifyPositionAndTangent(double dU, double dV, const OdGePoint3d& point, const OdGeVector3d* uDeriv, const OdGeVector3d* vDeriv) = 0;
1677 
1687  virtual OdResult getParameterOfPoint(const OdGePoint3d& point, double& dU, double& dV) const = 0;
1688 
1704  virtual OdResult getControlPoints(int& iUCount, int& iVCount, OdGePoint3dArray& points) const = 0;
1705 
1721  virtual OdResult setControlPoints(int iUCount, int iVCount, const OdGePoint3dArray& points) = 0;
1722 
1723  virtual OdResult getControlPointAndWeight(int iUIndex, int iVIndex, OdGePoint3d& point, double& weight, bool& bIsRational) const = 0;
1724 
1725  virtual OdResult setControlPointAndWeight(int iUIndex, int iVIndex, const OdGePoint3d& point, double weight) = 0;
1726 
1734  virtual OdResult setColorToSubents(OdCmColor const& color) = 0;
1735 
1743  virtual OdResult setMaterialToSubents(OdDbObjectId materialId) = 0;
1744 
1745  virtual OdResult setMaterialResolver(const OdMaterialResolver *pResolver) = 0;
1746 
1748  OdUInt8 &tiling, OdUInt8 &autoTransform) = 0;
1749 
1754  OdDbEntityPtrArray& sourceEntArr,
1755  OdArray<OdDbEntityPtr>& intBoundaryEnts,
1756  OdArray<OdDbEntityPtr>& intFillEnts,
1757  OdArray<OdDbEntityPtr>& backgroundEnts,
1758  OdArray<OdDbEntityPtr>& foregroundEnts,
1759  OdArray<OdDbEntityPtr>& curveTangencyEnts,
1760  bool bIsSetProperties) = 0;
1776  virtual OdResult trimSurface( const OdDbObjectIdArray& toolIds,
1777  const OdDbObjectIdArray& toolCurveIds,
1778  const OdGeVector3dArray& projVectors,
1779  const OdGePoint3d& pickPoint,
1780  const OdGeVector3d& viewVector,
1781  bool bAutoExtend,
1782  bool bAssociativeEnabled) = 0;
1783 
1784  virtual OdResult projectOnToEntity( const OdDbEntity* pEntityToProject,
1785  const OdGeVector3d& projectionDirection,
1786  OdDbEntityPtrArray& projectedEntities ) const = 0;
1787 
1797  const OdGeIntArray& limitingFlags) = 0;
1798 
1799  //FELIX_CHANGE_BEGIN
1800  virtual OdResult rayTestEntities( const OdGePoint3d& rayBasePoint,
1801  const OdGeVector3d& rayDir,
1802  double dRayRadius,
1803  std::vector<OdDbEntityPtr> & i_entities,
1804  OdArray<OdDbSubentId> & o_subEntIds,
1805  std::vector<int> & o_indexentities,
1806  OdGeDoubleArray& parameters ) const = 0;
1807  virtual OdResult rayTestSolids( const OdGePoint3d& rayBasePoint,
1808  const OdGeVector3d& rayDir,
1809  double dRayRadius,
1810  std::vector<OdDb3dSolidPtr> &i_solids,
1811  OdArray<OdDbSubentId> & o_subEntIds,
1812  std::vector<int> & o_indexsolids,
1813  OdGeDoubleArray& parameters ) const = 0;
1814  //FELIX_CHANGE_END
1826  virtual OdResult rayTest( const OdGePoint3d& rayBasePoint,
1827  const OdGeVector3d& rayDir,
1828  double rayRadius,
1829  OdArray<OdDbSubentId> & subEntIds,
1830  OdGeDoubleArray& parameters) const = 0;
1831 
1853  const OdGePoint3d& pickPt1,
1854  OdDbSurfacePtr& surf2,
1855  const OdGePoint3d& pickPt2,
1856  double dRadius,
1857  OdDb::FilletTrimMode trimMode,
1858  const OdGeVector3d& projDir) = 0;
1859 
1870  double dExtDist,
1871  EdgeExtensionType extOption ) = 0;
1872 
1873  virtual OdResult getObjectMesh( const OdDbFaceterSettings *faceter,
1874  OdGePoint3dArray& vertexArray,
1875  OdInt32Array& faceArray,
1876  OdGiFaceData*& faceData ) = 0;
1877 
1878 
1887 
1891  virtual OdResult generateSectionGeometry( SectArgs& sectArgs, OdDbEntity *pEnt, bool* bHasForeground ) = 0;
1892 
1894 
1895 #ifdef SOLID_HISTORY
1896  virtual OdResult SetPerSubentityAttributes(unsigned long iEntIndex) = 0;
1897 #endif
1898 
1899  virtual OdResult convertTo(const OdGePoint3dArray &arrVertexes, const OdInt32Array &arrEdges, const OdInt32Array &arrFaces, OdGiFaceData &fd,
1900  OdInt32Array &arrFacesColors, OdInt32Array &arrFacesMaterials, OdDbEntity* pEntity) = 0;
1901 
1902 };
1903 
1908 
1909 #include "TD_PackPop.h"
1910 
1911 #endif // _OD_MODELERGEOMETRY_INCLUDED_
@ kSolid
Definition: BrepBuilder.h:39
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
EdgeExtensionType
Definition: DbSurface.h:60
@ eNotImplemented
#define NULL
Definition: GsProperties.h:177
int AfTypeVer
Definition: ModelerDefs.h:29
OdSmartPtr< OdModelerGeometry > OdModelerGeometryPtr
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 convertToNurbSurface(OdDbNurbSurfaceArray &nurbSurfaceArray)=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 void ClearMaterialAttributes()=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 setMaterialResolver(const OdMaterialResolver *pResolver)=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 void * internalSubentPtr(const OdDbSubentId &id) const =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 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 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 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 checkInterference(const OdDb3dSolid *otherSolid, bool createNewSolid, bool &solidsInterfere, OdDb3dSolidPtr &commonVolumeSolid) const =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 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 getDegreeInV(int &iDegree) const =0
virtual OdResult InsertKnot(double dVal, int iUorV)=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 isPointOnSurface(const OdGePoint3d &point, bool &bOnSurface) const =0
virtual OdDbSubentId internalSubentId(void *ent) const =0
virtual OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d &point, OdGeVector3dArray &derivatives) const =0
virtual OdResult booleanOper(OdDb::BoolOperType operation, OdSmartPtr< OdModelerGeometry > otherRegion)=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 convertTo(const OdGePoint3dArray &arrVertexes, const OdInt32Array &arrEdges, const OdInt32Array &arrFaces, OdGiFaceData &fd, OdInt32Array &arrFacesColors, OdInt32Array &arrFacesMaterials, OdDbEntity *pEntity)=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 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 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 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 booleanOper(OdDb::BoolOperType operation, const OdSmartPtr< OdModelerGeometry > pModelerPar, OdDbEntityPtrArray &intersectionEntities)=0
virtual OdResult setSubentMaterial(const OdDbSubentId &subentId, OdDbObjectId matId)=0
virtual void * body() const
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 createInterferenceObjects(OdDbEntityPtrArray &interferenceObjects, OdDbEntityPtr pEntity, unsigned int flags) const =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 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:379
BoolOperType
Definition: ModelerDefs.h:113
Intersect
Definition: OdaDefs.h:470
Planarity
Definition: DbEntity.h:74