CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
OdDbMPolygon Class Reference

#include <DbMPolygon.h>

Inheritance diagram for OdDbMPolygon:
OdDbEntity OdDbObject OdGiDrawable OdRxObject

Public Types

enum  loopDir { kExterior = 0 , kInterior = 1 , kAnnotation = 2 }
 
- Public Types inherited from OdDbEntity
enum  VisualStyleType { kFullVisualStyle , kFaceVisualStyle , kEdgeVisualStyle }
 
- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0 , kDrawableIsAnEntity = 1 , kDrawableUsesNesting = 2 , kDrawableIsCompoundObject = 4 ,
  kDrawableViewIndependentViewportDraw = 8 , kDrawableIsInvisible = 16 , kDrawableHasAttributes = 32 , kDrawableRegenTypeDependantGeometry = 64 ,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128) , kDrawableRegenDraw = 256 , kDrawableStandardDisplaySingleLOD = 512 , kDrawableShadedDisplaySingleLOD = 1024 ,
  kDrawableViewDependentViewportDraw = 2048 , kDrawableBlockDependentViewportDraw = 4096 , kDrawableIsExternalReference = 8192 , kDrawableNotPlottable = 16384 ,
  kDrawableNotAllowLCS = 32768 , kDrawableMergeControlOff = 65536 , kLastFlag = kDrawableMergeControlOff
}
 
enum  DrawableType {
  kGeometry = 0 , kDistantLight = 1 , kPointLight = 2 , kSpotLight = 3 ,
  kAmbientLight , kSolidBackground , kGradientBackground , kImageBackground ,
  kGroundPlaneBackground , kViewport , kWebLight , kSkyBackground ,
  kImageBasedLightingBackground
}
 

Public Member Functions

 OdDbMPolygon ()
 
virtual ~OdDbMPolygon ()
 
 ODDB_DECLARE_MEMBERS (OdDbMPolygon)
 
virtual OdDbHatchPtr hatch ()
 
virtual OdDbHatchPtr hatch () const
 
virtual double elevation () const
 
virtual void setElevation (double elevation)
 
virtual OdGeVector3d normal () const
 
virtual void setNormal (const OdGeVector3d &normal)
 
virtual OdResult evaluateHatch (bool bUnderestimateNumLines=false)
 
virtual OdDbHatch::HatchPatternType patternType () const
 
virtual OdString patternName () const
 
virtual void setPattern (OdDbHatch::HatchPatternType patType, const OdString &patName)
 
virtual double patternAngle () const
 
virtual void setPatternAngle (double angle)
 
virtual double patternSpace () const
 
virtual void setPatternSpace (double space)
 
virtual double patternScale () const
 
virtual void setPatternScale (double scale)
 
virtual bool patternDouble () const
 
virtual void setPatternDouble (bool isDouble)
 
virtual int numPatternDefinitions () const
 
virtual void getPatternDefinitionAt (int index, double &angle, double &baseX, double &baseY, double &offsetX, double &offsetY, OdGeDoubleArray &dashes) const
 
void setGradientAngle (double angle)
 
void setGradientShift (float shiftValue)
 
void setGradientOneColorMode (bool oneColorMode)
 
void setGradientColors (unsigned int count, const OdCmColor *colors, const double *values)
 
void setGradient (OdDbHatch::GradientPatternType gradType, const OdString &gradName)
 
virtual OdCmColor patternColor () const
 
virtual void setPatternColor (const OdCmColor &pc)
 
virtual OdResult getArea (double &area, bool areaViaHatch=false) const
 
virtual OdGeVector2d getOffsetVector () const
 
virtual OdResult appendLoopFromBoundary (const OdDbCircle *pCircle, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult appendLoopFromBoundary (const OdDbPolyline *pPoly, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult appendLoopFromBoundary (const OdDb2dPolyline *pPoly, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual int numMPolygonLoops () const
 
virtual OdResult getMPolygonLoopAt (int loopIndex, OdGePoint2dArray &vertices, OdGeDoubleArray &bulges) const
 
virtual OdResult appendMPolygonLoop (const OdGePoint2dArray &vertices, const OdGeDoubleArray &bulges, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult insertMPolygonLoopAt (int loopIndex, const OdGePoint2dArray &vertices, const OdGeDoubleArray &bulges, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult replaceMPolygonLoopAt (int loopIndex, const OdGePoint2dArray &vertices, const OdGeDoubleArray &bulges, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult replaceMPolygonLoopAt (const OdIntArray &loopIndices, const OdGePoint2dArrayArray &vertices, const OdArray< OdGeDoubleArray > &bulges, OdIntArray &rejectedLoop, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult removeMPolygonLoopAt (int loopIndex)
 
virtual OdResult getLoopDirection (int lindex, OdDbMPolygon::loopDir &dir) const
 
virtual OdResult setLoopDirection (int lindex, OdDbMPolygon::loopDir dir)
 
virtual bool isPointOnLoopBoundary (const OdGePoint3d &worldPt, int loop, double tol=OdDbMPolygonCrossingFuzz) const
 
virtual int isPointInsideMPolygon (const OdGePoint3d &worldPt, OdGeIntArray &loopsArray, double tol=OdDbMPolygonCrossingFuzz) const
 
virtual int getParentLoop (int curLoop) const
 
virtual OdResult getMPolygonTree (OdDbMPolygonNode *&loopNode) const
 
virtual void deleteMPolygonTree (OdDbMPolygonNode *loopNode) const
 
virtual int getClosestLoopTo (const OdGePoint3d &worldPt) const
 
virtual double getPerimeter () const
 
virtual OdResult balanceTree ()
 
virtual bool isBalanced () const
 
virtual OdResult balanceDisplay ()
 
virtual OdResult createLoopsFromBoundaries (const OdDbObjectIdArray &ids, OdIntArray &rejectedObjs, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult createLoops (const OdGePoint2dArrayArray &vertices, const OdArray< OdGeDoubleArray > &bulges, OdIntArray &rejectedObjs, bool excludeCrossing=true, double tol=OdDbMPolygonCrossingFuzz)
 
virtual OdResult getChildLoops (int curLoop, OdGeIntArray &selectedLoopIndexes) const
 
virtual OdDbEntityPtr subSubentPtr (const OdDbFullSubentPath &path) const ODRX_OVERRIDE
 
virtual OdResult subExplode (OdRxObjectPtrArray &entitySet) const
 
virtual OdResult subTransformBy (const OdGeMatrix3d &xfn)
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subSetDatabaseDefaults (OdDbDatabase *pDb, bool doSubents)
 
virtual void saveAs (OdGiWorldDraw *pWd, OdDb::DwgVersion ver) const
 
- Public Member Functions inherited from OdDbEntity
 ODDB_DECLARE_MEMBERS (OdDbEntity)
 
 OdDbEntity ()
 
OdDbObjectId blockId () const
 
OdCmColor color () const
 
virtual OdResult setColor (const OdCmColor &color, bool doSubents=true)
 
OdUInt16 colorIndex () const
 
virtual OdCmEntityColor entityColor () const
 
virtual OdResult setColorIndex (OdUInt16 colorIndex, bool doSubents=true)
 
OdDbObjectId colorId () const
 
virtual OdResult setColorId (OdDbObjectId colorId, bool doSubents=true)
 
OdCmTransparency transparency () const
 
virtual OdResult setTransparency (const OdCmTransparency &transparency, bool doSubents=true)
 
OdString plotStyleName () const
 
OdDb::PlotStyleNameType getPlotStyleNameId (OdDbObjectId &plotStyleNameId) const
 
virtual OdResult setPlotStyleName (const OdString &plotStyleName, bool doSubents=true)
 
virtual OdResult setPlotStyleName (OdDb::PlotStyleNameType plotStyleNameType, OdDbObjectId plotStyleNameId=OdDbObjectId::kNull, bool doSubents=true)
 
OdString layer () const
 
OdDbObjectId layerId () const
 
virtual OdResult setLayer (const OdString &layerName, bool doSubents=true, bool allowHiddenLayer=false)
 
virtual OdResult setLayer (OdDbObjectId layerId, bool doSubents=true, bool allowHiddenLayer=false)
 
OdString linetype () const
 
OdDbObjectId linetypeId () const
 
virtual OdResult setLinetype (const OdString &linetypeName, bool doSubents=true)
 
virtual OdResult setLinetype (OdDbObjectId linetypeID, bool doSubents=true)
 
OdString material () const
 
OdDbObjectId materialId () const
 
virtual OdResult setMaterial (const OdString &materialName, bool doSubents=true)
 
virtual OdResult setMaterial (OdDbObjectId materialID, bool doSubents=true)
 
OdDbObjectId visualStyleId (VisualStyleType vstype=kFullVisualStyle) const
 
virtual OdResult setVisualStyle (OdDbObjectId visualStyleId, VisualStyleType vstype=kFullVisualStyle, bool doSubents=true)
 
virtual const OdGiMappermaterialMapper () const
 
virtual void setMaterialMapper (const OdGiMapper *mapper, bool doSubents=true)
 
double linetypeScale () const
 
virtual OdResult setLinetypeScale (double linetypeScale, bool doSubents=true)
 
OdDb::Visibility visibility () const
 
ODRX_SEALED_VIRTUAL OdResult setVisibility (OdDb::Visibility visibility, bool doSubents=true) ODRX_SEALED
 
OdDb::Visibility tempVisibility () const
 
void setTempVisibility (OdDb::Visibility visibility)
 
OdDb::LineWeight lineWeight () const
 
virtual OdResult setLineWeight (OdDb::LineWeight lineWeight, bool doSubents=true)
 
virtual bool castShadows () const
 
virtual void setCastShadows (bool castShadows)
 
virtual bool receiveShadows () const
 
virtual void setReceiveShadows (bool receiveShadows)
 
virtual OdDb::CollisionType collisionType () const
 
void setPropertiesFrom (const OdDbEntity *pSource, bool doSubents=true)
 
virtual bool isPlanar () const
 
virtual OdResult getPlane (OdGePlane &plane, OdDb::Planarity &planarity) const
 
void subHandOverTo (OdDbObject *pNewObject)
 
ODRX_SEALED_VIRTUAL OdResult transformBy (const OdGeMatrix3d &xfm) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getTransformedCopy (const OdGeMatrix3d &xfm, OdDbEntityPtr &pCopy) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult explode (OdRxObjectPtrArray &entitySet) const ODRX_SEALED
 
virtual OdResult explodeToBlock (OdDbBlockTableRecord *pBlockRecord, OdDbObjectIdArray *ids=0)
 
virtual OdResult explodeGeometry (OdRxObjectPtrArray &entitySet) const
 
virtual OdResult explodeGeometryToBlock (OdDbBlockTableRecord *pBlockRecord, OdDbObjectIdArray *ids=0)
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
void setDatabaseDefaults (OdDbDatabase *pDb=0, bool doSubents=false)
 
virtual void subSetDatabaseDefaults (OdDbDatabase *pDb, bool doSubents)
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual void subList () const
 
virtual OdResult subGetClassID (void *pClsid) const
 
void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual OdResult subErase (bool erasing) ODRX_OVERRIDE
 
virtual OdResult subOpen (OdDb::OpenMode mode) ODRX_OVERRIDE
 
void recordGraphicsModified (bool graphicsModified=true)
 
virtual void copyFrom (const OdRxObject *pSource)
 
ODRX_SEALED_VIRTUAL void list () const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void highlight (bool bDoIt=true, const OdDbFullSubentPath *pSubId=0, bool highlightAll=false) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getOsnapPoints (OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPoints) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getOsnapPoints (OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPoints, const OdGeMatrix3d &insertionMat) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool isContentSnappable () const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getGripPoints (OdGePoint3dArray &gripPoints) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult moveGripPointsAt (const OdIntArray &indices, const OdGeVector3d &offset) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getGripPoints (OdDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize, const OdGeVector3d &curViewDir, const int bitFlags) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult moveGripPointsAt (const OdDbVoidPtrArray &grips, const OdGeVector3d &offset, int bitFlags) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getStretchPoints (OdGePoint3dArray &stretchPoints) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult moveStretchPointsAt (const OdIntArray &indices, const OdGeVector3d &offset) ODRX_SEALED
 
virtual void dragStatus (const OdDb::DragStat status)
 
ODRX_SEALED_VIRTUAL void gripStatus (const OdDb::GripStat status) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool cloneMeForDragging () ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool hideMeForDragging () const ODRX_SEALED
 
virtual void saveAs (OdGiWorldDraw *pWd, OdDb::DwgVersion ver) const
 
ODRX_SEALED_VIRTUAL OdResult getCompoundObjectTransform (OdGeMatrix3d &xM) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult intersectWith (const OdDbEntity *pEnt, OdDb::Intersect intType, OdGePoint3dArray &points, OdGsMarker thisGsMarker=0, OdGsMarker otherGsMarker=0) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult intersectWith (const OdDbEntity *pEnt, OdDb::Intersect intType, const OdGePlane &projPlane, OdGePoint3dArray &points, OdGsMarker thisGsMarker=0, OdGsMarker otherGsMarker=0) const ODRX_SEALED
 
OdResult boundingBoxIntersectWith (const OdDbEntity *pEnt, OdDb::Intersect intType, OdGePoint3dArray &points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker) const
 
OdResult boundingBoxIntersectWith (const OdDbEntity *pEnt, OdDb::Intersect intType, const OdGePlane &projPlane, OdGePoint3dArray &points, OdGsMarker thisGsMarker, OdGsMarker otherGsMarker) const
 
ODRX_SEALED_VIRTUAL OdResult getSubentPathsAtGsMarker (OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &xfm, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack=0) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getGsMarkersAtSubentPath (const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getGripPointsAtSubentPath (const OdDbFullSubentPath &path, OdDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize, const OdGeVector3d &curViewDir, const OdUInt32 bitflags) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult moveGripPointsAtSubentPaths (const OdDbFullSubentPathArray &paths, const OdDbVoidPtrArray &gripAppData, const OdGeVector3d &offset, const OdUInt32 bitflags) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult deleteSubentPaths (const OdDbFullSubentPathArray &paths) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult addSubentPaths (const OdDbFullSubentPathArray &paths) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbEntityPtr subentPtr (const OdDbFullSubentPath &path) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult transformSubentPathsBy (const OdDbFullSubentPathArray &paths, const OdGeMatrix3d &xform) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getSubentClassId (const OdDbFullSubentPath &path, void *clsId) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdResult getSubentPathGeomExtents (const OdDbFullSubentPath &path, OdGeExtents3d &extents) ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void subentGripStatus (OdDb::GripStat status, const OdDbFullSubentPath &subentity) ODRX_SEALED
 
virtual OdGeMatrix3d getEcs () const
 
- Public Member Functions inherited from OdDbObject
 ODDB_DECLARE_MEMBERS (OdDbObject)
 
 ~OdDbObject ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 
OdDbObjectId objectId () const
 
OdDbHandle getDbHandle () const
 
OdDbHandle handle () const
 
OdDbObjectId ownerId () const
 
virtual void setOwnerId (OdDbObjectId ownerId)
 
OdDbDatabasedatabase () const
 
void createExtensionDictionary ()
 
OdDbObjectId extensionDictionary () const
 
bool releaseExtensionDictionary ()
 
OdDbXrecordPtr createXrecord (const OdString &xrecordName, OdDb::DuplicateRecordCloning style=OdDb::kDrcIgnore)
 
void upgradeOpen ()
 
void downgradeOpen ()
 
void cancel ()
 
virtual OdResult subOpen (OdDb::OpenMode mode)
 
virtual void subClose ()
 
OdResult erase (bool eraseIt=true)
 
virtual OdResult subErase (bool erasing)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
virtual void subHandOverTo (OdDbObject *pNewObject)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void audit (OdDbAuditInfo *pAuditInfo)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdDb::DuplicateRecordCloning mergeStyle () const
 
virtual OdResBufPtr xData (const OdString &regappName=OdString::kEmpty) const
 
virtual void setXData (const OdResBuf *pRb)
 
bool isEraseStatusToggled () const
 
bool isErased () const
 
bool isReadEnabled () const
 
bool isWriteEnabled () const
 
bool isNotifyEnabled () const
 
bool isModified () const
 
bool isModifiedXData () const
 
bool isModifiedGraphics () const
 
bool isNewObject () const
 
bool isNotifying () const
 
bool isUndoing () const
 
bool isReallyClosing () const
 
bool isDBRO () const
 
void assertReadEnabled () const
 
void assertWriteEnabled (bool autoUndo=true, bool recordModified=true)
 
void assertNotifyEnabled () const
 
void disableUndoRecording (bool disable)
 
bool isUndoRecordingDisabled () const
 
OdDbDwgFilerundoFiler ()
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
void addReactor (OdDbObjectReactor *pReactor) const
 
void removeReactor (OdDbObjectReactor *pReactor) const
 
virtual void addPersistentReactor (const OdDbObjectId &objId)
 
virtual void removePersistentReactor (const OdDbObjectId &objId)
 
bool hasPersistentReactor (const OdDbObjectId &objId) const
 
OdDbObjectIdArray getPersistentReactors () const
 
OdDbObjectReactorArray getTransientReactors () const
 
virtual void recvPropagateModify (const OdDbObject *pSubObj)
 
virtual void xmitPropagateModify () const
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr deepClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &idMap)
 
void setOdDbObjectIdsInFlux ()
 
bool isOdDbObjectIdsInFlux () const
 
virtual void copied (const OdDbObject *pObject, const OdDbObject *pNewObject)
 
virtual void erased (const OdDbObject *pObject, bool erasing=true)
 
virtual void goodbye (const OdDbObject *pObject)
 
virtual void openedForModify (const OdDbObject *pObject)
 
virtual void modified (const OdDbObject *pObject)
 
virtual void subObjModified (const OdDbObject *pObject, const OdDbObject *pSubObj)
 
virtual void modifyUndone (const OdDbObject *pObject)
 
virtual void modifiedXData (const OdDbObject *pObject)
 
virtual void unappended (const OdDbObject *pObject)
 
virtual void reappended (const OdDbObject *pObject)
 
bool isAProxy () const
 
virtual void objectClosed (const OdDbObjectId &objectId)
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
virtual void copyFrom (const OdRxObject *pSource)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
virtual OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
virtual OdDbObjectPtr decomposeForSave (OdDb::SaveType format, OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void convertForSave (OdDb::DwgVersion ver)
 
virtual void composeForLoad (OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo *pAuditInfo)
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
virtual bool isPersistent () const
 
virtual OdDbStub * id () const
 
ODRX_SEALED_VIRTUAL OdResult getClassID (void *pClsid) const ODRX_SEALED
 
void setGsNode (OdGsCache *pNode)
 
OdGsCachegsNode () const
 
void xDataTransformBy (const OdGeMatrix3d &xfm)
 
bool hasFields () const
 
OdDbObjectId getField (const OdString &fieldName) const
 
OdDbObjectPtr getField (const OdString &fieldName, OdDb::OpenMode mode) const
 
virtual OdDbObjectId setField (const OdString &fieldName, OdDbField *pField)
 
virtual OdResult removeField (OdDbObjectId fieldId)
 
virtual OdDbObjectId removeField (const OdString &fieldName)
 
OdDbObjectId getFieldDictionary () const
 
OdDbObjectPtr getFieldDictionary (OdDb::OpenMode mode) const
 
virtual OdRxClasssaveAsClass (OdRxClass *pClass) const
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual bool isPersistent () const =0
 
virtual OdDbStub * id () const =0
 
virtual void setGsNode (OdGsCache *pGsNode)=0
 
virtual OdGsCachegsNode () const =0
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_SEALED
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Member Functions inherited from OdDbEntity
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const ODRX_OVERRIDE
 
virtual OdResult subTransformBy (const OdGeMatrix3d &xfm)
 
virtual OdResult subGetTransformedCopy (const OdGeMatrix3d &xfm, OdDbEntityPtr &pCopy) const
 
virtual OdResult subExplode (OdRxObjectPtrArray &entitySet) const
 
virtual OdResult subGetCompoundObjectTransform (OdGeMatrix3d &xM) const
 
virtual bool subCloneMeForDragging ()
 
virtual bool subHideMeForDragging () const
 
virtual void subGripStatus (const OdDb::GripStat status)
 
virtual OdResult subGetOsnapPoints (OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPoints) const
 
virtual OdResult subGetOsnapPoints (OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPoints, const OdGeMatrix3d &insertionMat) const
 
virtual bool subIsContentSnappable () const
 
virtual OdResult subGetGripPoints (OdGePoint3dArray &gripPoints) const
 
virtual OdResult subMoveGripPointsAt (const OdIntArray &indices, const OdGeVector3d &offset)
 
virtual OdResult subGetGripPoints (OdDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize, const OdGeVector3d &curViewDir, const int bitFlags) const
 
virtual OdResult subMoveGripPointsAt (const OdDbVoidPtrArray &grips, const OdGeVector3d &offset, int bitFlags)
 
virtual OdResult subGetStretchPoints (OdGePoint3dArray &stretchPoints) const
 
virtual OdResult subMoveStretchPointsAt (const OdIntArray &indices, const OdGeVector3d &offset)
 
virtual OdResult subIntersectWith (const OdDbEntity *pEnt, OdDb::Intersect intType, OdGePoint3dArray &points, OdGsMarker thisGsMarker=0, OdGsMarker otherGsMarker=0) const
 
virtual OdResult subIntersectWith (const OdDbEntity *pEnt, OdDb::Intersect intType, const OdGePlane &projPlane, OdGePoint3dArray &points, OdGsMarker thisGsMarker=0, OdGsMarker otherGsMarker=0) const
 
virtual void subHighlight (bool bDoIt=true, const OdDbFullSubentPath *pSubId=0, bool highlightAll=false) const
 
virtual OdDb::Visibility subVisibility () const
 
virtual OdResult subSetVisibility (OdDb::Visibility visibility, bool doSubents=true)
 
virtual OdResult subGetGeomExtents (OdGeExtents3d &extents) const
 
virtual OdResult subDeleteSubentPaths (const OdDbFullSubentPathArray &paths)
 
virtual OdResult subAddSubentPaths (const OdDbFullSubentPathArray &paths)
 
virtual OdResult subMoveGripPointsAtSubentPaths (const OdDbFullSubentPathArray &paths, const OdDbVoidPtrArray &gripAppData, const OdGeVector3d &offset, const OdUInt32 bitflags)
 
virtual OdResult subGetGripPointsAtSubentPath (const OdDbFullSubentPath &path, OdDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize, const OdGeVector3d &curViewDir, const OdUInt32 bitflags) const
 
virtual OdResult subGetSubentPathsAtGsMarker (OdDb::SubentType type, OdGsMarker gsMark, const OdGePoint3d &pickPoint, const OdGeMatrix3d &xfm, OdDbFullSubentPathArray &subentPaths, const OdDbObjectIdArray *pEntAndInsertStack=0) const
 
virtual OdResult subGetGsMarkersAtSubentPath (const OdDbFullSubentPath &subPath, OdGsMarkerArray &gsMarkers) const
 
virtual OdDbEntityPtr subSubentPtr (const OdDbFullSubentPath &path) const
 
virtual OdResult subTransformSubentPathsBy (const OdDbFullSubentPathArray &paths, const OdGeMatrix3d &xform)
 
virtual OdResult subGetSubentClassId (const OdDbFullSubentPath &path, void *clsId) const
 
virtual OdResult subGetSubentPathGeomExtents (const OdDbFullSubentPath &path, OdGeExtents3d &extents) const
 
virtual void subSubentGripStatus (OdDb::GripStat status, const OdDbFullSubentPath &subentity)
 
- Protected Member Functions inherited from OdDbObject
 OdDbObject ()
 
virtual OdResult subGetClassID (void *pClsid) const
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *traits) const =0
 
virtual bool subWorldDraw (OdGiWorldDraw *wd) const =0
 
virtual void subViewportDraw (OdGiViewportDraw *vd) const =0
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class processes one or more closed polygons as a single polygon. Corresponding C++ library: AcMPolygonObj15

<group OdDb_Classes>

Definition at line 53 of file DbMPolygon.h.

Member Enumeration Documentation

◆ loopDir

Declares the loop directions.

Enumerator
kExterior 

Loop direction is counter-clockwise

kInterior 

Loop direction is clockwise

kAnnotation 

Text

Definition at line 540 of file DbMPolygon.h.

Constructor & Destructor Documentation

◆ OdDbMPolygon()

OdDbMPolygon::OdDbMPolygon ( )

Creates a new instance of a multi polygon object with default parameters.

◆ ~OdDbMPolygon()

virtual OdDbMPolygon::~OdDbMPolygon ( )
virtual

Destroys the multi polygon object.

Member Function Documentation

◆ appendLoopFromBoundary() [1/3]

virtual OdResult OdDbMPolygon::appendLoopFromBoundary ( const OdDb2dPolyline pPoly,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Appends a polygon loop.

Parameters
pPoly[in] Pointer to the OdDb2dPolyline entity.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops; eOk if a polygon appended successfully.
Remarks
OdDb2dPolyline must be closed. This means that it must have three or more points and all points should not lie on one straight line.

◆ appendLoopFromBoundary() [2/3]

virtual OdResult OdDbMPolygon::appendLoopFromBoundary ( const OdDbCircle pCircle,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Appends a polygon loop.

Parameters
pCircle[in] Pointer to the OdDbCircle entity.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops; eOk if a polygon appended successfully.
Remarks
OdDbCircle must be closed.

◆ appendLoopFromBoundary() [3/3]

virtual OdResult OdDbMPolygon::appendLoopFromBoundary ( const OdDbPolyline pPoly,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Appends a polygon loop.

Parameters
pPoly[in] Pointer to the OdDbPolyline entity.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops; eOk if a polygon appended successfully.
Remarks
OdDbPolyline must be closed. This means that it must have three or more points and all points should not lie on one straight line.

◆ appendMPolygonLoop()

virtual OdResult OdDbMPolygon::appendMPolygonLoop ( const OdGePoint2dArray vertices,
const OdGeDoubleArray bulges,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Appends a polygon loop.

Parameters
vertices[in] Array of vertices.
bulges[in] Array of bulge values for loops.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops; eOk if a polygon appended successfully.

◆ balanceDisplay()

virtual OdResult OdDbMPolygon::balanceDisplay ( )
virtual

Checks loops for intersection and direction. If the cycle is placed at an even level of the tree, and the direction is clockwise, it will be marked as invalid (it will not be displayed). To change direction to the correct one, use balanceTree(). If a cycle intersects with another cycle, the cycle with a higher index will be marked as invalid (not drawn). Loops that have been marked as invalid but have the correct direction and no intersections will be marked as valid and will be drawn again.

Returns
eOk if check and changes are successful, or eInvalidInput if getMPolygonTree() did not generate a tree.

◆ balanceTree()

virtual OdResult OdDbMPolygon::balanceTree ( )
virtual

Checks the direction of the loops and changes it to the correct one. The directivity check is based on the resulting tree from getMPolygonTree. Where the depth of the tree indicates the direction of the loop (even values are counterclockwise, odd are clockwise). If in MPolygon there are loops that are not displayed (invalid), they will be marked again as valid (and will be drawn) if they do not intersect with others. Also the check is done for intersections of the displayed (valid) loops. Intersected loops are marked as invalid, and they will not be drawn.

Returns
eOk if checks and changes are successful, or eInvalidInput if getMPolygonTree() does not generate a tree.

◆ createLoops()

virtual OdResult OdDbMPolygon::createLoops ( const OdGePoint2dArrayArray vertices,
const OdArray< OdGeDoubleArray > &  bulges,
OdIntArray rejectedObjs,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Creates loops from vertices and bulges for empty OdDbMPolygon.

Parameters
vertices[in] Array of vertices.
bulges[in] Array of bulge values.
rejectedObjs[out] Return indices of objectId from the IDs array that led to errors while creating loops.
excludeCrossing[in] Set true to disable creating a polygon if there are crossings between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crossings between loops or if OdDbMPolygon has loops; eInvalidInput if the IDs array is empty or has rejected objects; eOk if a polygon appended successfully.
Remarks
If there is at least one rejected objectId, loops will not be added. OdDbMPolygon should not contain loops.

◆ createLoopsFromBoundaries()

virtual OdResult OdDbMPolygon::createLoopsFromBoundaries ( const OdDbObjectIdArray ids,
OdIntArray rejectedObjs,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Creates loops from entities for an empty OdDbMPolygon. Every ObjectId must be one closed loop.

Parameters
ids[in] Array of entity object IDs.
rejectedObjs[out] Return indices of objectId from the entity object IDs array that led to errors while creating loops.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops or if OdDbMPolygon has loops; eInvalidInput if the IDs array is empty or has rejected objects; eOk if a polygon appended successfully.
Remarks
If there is at least one rejected objectId, loops will not be added. OdDbMPolygon should not contain loops.

◆ deleteMPolygonTree()

virtual void OdDbMPolygon::deleteMPolygonTree ( OdDbMPolygonNode loopNode) const
virtual

Recursively deletes the tree created by OdDbMPolygon::getMPolygonTree(OdDbMPolygonNode*& loopNode).

Parameters
loopNode[in] Pointer to the root node of the tree.

◆ dwgInFields()

virtual OdResult OdDbMPolygon::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data is read.
Remarks
This function is called by dwgIn() to allow the object to read its data. When overriding this function:
  1. Call assertWriteEnabled().
  2. Call the parent class's dwgInFields(pFiler).
  3. If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned.
  4. Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written.
  5. Return pFiler->filerStatus().
Returns
eOk if reading was successful or an appropriate OdResult error code otherwise.

Reimplemented from OdDbEntity.

◆ dwgOutFields()

virtual void OdDbMPolygon::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

Writes the .dwg file data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are written.
Remarks

This function is called by dwgIn() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbEntity.

◆ dxfInFields()

virtual OdResult OdDbMPolygon::dxfInFields ( OdDbDxfFiler pFiler)
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data is read.
Remarks
This function is called by dxfIn() to allow the object to read its data. When overriding this function:
  1. Call assertWriteEnabled().
  2. Call the parent class's dwgInFields(pFiler).
  3. If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned.
  4. Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written.
  5. Return pFiler->filerStatus().
Returns
eOk if reading was successful or an appropriate OdResult error code otherwise.

Reimplemented from OdDbEntity.

◆ dxfOutFields()

virtual void OdDbMPolygon::dxfOutFields ( OdDbDxfFiler pFiler) const
virtual

Writes the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are to be written.
Remarks

This function is called by dxfOut() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.

Reimplemented from OdDbEntity.

◆ elevation()

virtual double OdDbMPolygon::elevation ( ) const
virtual

Returns the elevation of this entity in the OCS.

Returns
The elevation of this entity in the OCS.
Remarks
The elevation is the distance from the WCS origin to the plane of this entity.

◆ evaluateHatch()

virtual OdResult OdDbMPolygon::evaluateHatch ( bool  bUnderestimateNumLines = false)
virtual

Evaluates the hatch for this MPolygon entity.

Parameters
bUnderestimateNumLines[in] Underestimates the hatch count before aborting.
Returns
eOk if successful, or an appropriate error code otherwise.

◆ getArea()

virtual OdResult OdDbMPolygon::getArea ( double &  area,
bool  areaViaHatch = false 
) const
virtual

Returns the area of this entity.

Parameters
area[out] Receives the area.
areaViaHatch[in] Set true to calculate the area like a hatch (used before version 20.3).
Returns
eOk if successful, or an appropriate error code if not.

◆ getChildLoops()

virtual OdResult OdDbMPolygon::getChildLoops ( int  curLoop,
OdGeIntArray selectedLoopIndexes 
) const
virtual

Returns an array of indices of the loops that are children of the specified loop.

Parameters
curLoop[in] Specified loop index.
selectedLoopIndexes[out] Return the array with indices of are child loops.
Returns
eOk if found or not found child loops, or eInvalidInput if curLoop out of loop array range, or eAmbiguousOutput if can't build MPolygonTree.
Remarks
return the empty selectedLoopIndexes if Specified loop does not a child loops.

◆ getClosestLoopTo()

virtual int OdDbMPolygon::getClosestLoopTo ( const OdGePoint3d worldPt) const
virtual

Finds the closest loop from the OdDbMPolygon within the pick box around the specified 3D point.

Parameters
worldPt[in] 3D point in world coordinate system.
Returns
Index of the closest loop.
Remarks
Returns -1 if there is no loop in the pick box. The pick box is created around the input point. The size of the pick box is specified by the system variable PICKBOX. If two loops are at the same distance from the point, the function finds a loop with a lower index. If two loops are within the pick box, the function finds a loop that is closer to the worldPt point.

◆ getLoopDirection()

virtual OdResult OdDbMPolygon::getLoopDirection ( int  lindex,
OdDbMPolygon::loopDir dir 
) const
virtual

Gets the direction of the specified loop in the closed polygon.

Parameters
lindex[in] Loop index as an Ingeter value in the range 0 to numMPolygonLoops()-1.
dir[out] Reference to a variable in which the loop direction must be saved.
Returns
eOk if successful, or eInvalidInput if loop index is out of range.

◆ getMPolygonLoopAt()

virtual OdResult OdDbMPolygon::getMPolygonLoopAt ( int  loopIndex,
OdGePoint2dArray vertices,
OdGeDoubleArray bulges 
) const
virtual

Gets the specified loop.

Parameters
loopIndex[in] Loop index.
vertices[out] Receives the vertices that comprise this loop.
bulges[out] Receives a set of bulges corresponding to the vertices array.
Returns
eInvalidInput if loopIndex equal or greater then OdDbMPolygon::numMPolygonLoops() or if loopIndex is less than 0. eOk if a polygon loop returned successfully.

◆ getMPolygonTree()

virtual OdResult OdDbMPolygon::getMPolygonTree ( OdDbMPolygonNode *&  loopNode) const
virtual

Creates a nesting tree of nodes, where the nodes represent the nesting of the loops.

Parameters
loopNode[out] Pointer to the root node of the tree.
Returns
eOk if tree creation is successful.
Remarks
Return eOk if the loops count in OdDbMPolygon is zero. To avoid memory leaks use OdDbMPolygon::deleteMPolygonTree(loopNode). If loops in OdDbMPolygon were changed, get a new tree using this function.

◆ getOffsetVector()

virtual OdGeVector2d OdDbMPolygon::getOffsetVector ( ) const
virtual

Returns the offset vector.

Returns
The offset vector.

◆ getParentLoop()

virtual int OdDbMPolygon::getParentLoop ( int  curLoop) const
virtual

Returns the index of the parent loop, related to the specified loop.

Parameters
curLoop[in] Specified loop index.
Returns
Non-negative index if the loop is found, or -1 if the specified loop does not have a parent loop, or -2 if the specified loop does not exist, or -3 if the specified loop intersects with a possible outer loop.

◆ getPatternDefinitionAt()

virtual void OdDbMPolygon::getPatternDefinitionAt ( int  index,
double &  angle,
double &  baseX,
double &  baseY,
double &  offsetX,
double &  offsetY,
OdGeDoubleArray dashes 
) const
virtual

Returns the specified pattern definition line.

Parameters
lineIndex[in] Line index.
lineAngle[out] Receives the line angle.
baseX[out] Receives the line base point X.
baseY[out] Receives the line base point Y.
offsetX[out] Receives the line offset X.
offsetY[out] Receives the line offset Y.
dashes[out] Receives the line dash lengths.
Returns
The specified pattern definition line.

◆ getPerimeter()

virtual double OdDbMPolygon::getPerimeter ( ) const
virtual

Calculates the OdDbMPolygon perimeter by adding the lengths of all borders.

Returns
Perimeter of the OdDbMPolygon.
Remarks
Annotation boundaries are not taken into account.

◆ hatch() [1/2]

virtual OdDbHatchPtr OdDbMPolygon::hatch ( )
virtual

Returns the OdSmartPtr class for the OdDbHatch object pointer.

Returns
The OdSmartPtr class for the OdDbHatch object pointer.

◆ hatch() [2/2]

virtual OdDbHatchPtr OdDbMPolygon::hatch ( ) const
virtual

Returns the OdSmartPtr class for the OdDbHatch object pointer.

Returns
The OdSmartPtr class for the OdDbHatch object pointer.

◆ insertMPolygonLoopAt()

virtual OdResult OdDbMPolygon::insertMPolygonLoopAt ( int  loopIndex,
const OdGePoint2dArray vertices,
const OdGeDoubleArray bulges,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Inserts a polygon loop to the specified position.

Parameters
loopIndex[in] Loop index.
vertices[in] Array of vertices.
bulges[in] Array of bulge values for loops.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops; eOk if a polygon insert successfully.

◆ isBalanced()

virtual bool OdDbMPolygon::isBalanced ( ) const
virtual

Checks if there are loops that are not drawn (invalid). Does not check loops that are drawn (valid) for intersection or direction.

Returns
True if all loops are drawn, or false if MPolygon has loops that are not drawn (invalid).
Remarks
Use balanceDisplay()/balanceTree() to check and mark valid and invalid loops (loops that are drawn or not drawn).

◆ isPointInsideMPolygon()

virtual int OdDbMPolygon::isPointInsideMPolygon ( const OdGePoint3d worldPt,
OdGeIntArray loopsArray,
double  tol = OdDbMPolygonCrossingFuzz 
) const
virtual

The function projects worldPt to the polygon plane, then if the point is on some boundary, indices of these boundaries are added to the loopsArray and the function returns, otherwise it finds the innermost loop containing the point and adds its index to the loopsArray before returning.

Parameters
worldPt[in] Point in WCS.
loopsArray[out] Boundary indices array.
tol[in] Measurement accuracy tolerance.
Returns
The function returns loopsArray.size().

◆ isPointOnLoopBoundary()

virtual bool OdDbMPolygon::isPointOnLoopBoundary ( const OdGePoint3d worldPt,
int  loop,
double  tol = OdDbMPolygonCrossingFuzz 
) const
virtual

Determines whether the specified point in WCS is on the specified loop of the polygon.

Parameters
worldPt[in] Point in WCS.
loop[in] Loop index.
tol[in] Measurement accuracy tolerance.
Returns
True if the specified point is on the specified loop of the polygon; false otherwise.

◆ normal()

virtual OdGeVector3d OdDbMPolygon::normal ( ) const
virtual

Returns the WCS normal to the plane of this entity.

Returns
The WCS normal to the plane of this entity.

◆ numMPolygonLoops()

virtual int OdDbMPolygon::numMPolygonLoops ( ) const
virtual

Returns the number of loops in the closed polygon.

◆ numPatternDefinitions()

virtual int OdDbMPolygon::numPatternDefinitions ( ) const
virtual

Returns the number of pattern definition lines.

Returns
The number of pattern definition lines.

◆ ODDB_DECLARE_MEMBERS()

OdDbMPolygon::ODDB_DECLARE_MEMBERS ( OdDbMPolygon  )

◆ patternAngle()

virtual double OdDbMPolygon::patternAngle ( ) const
virtual

Returns the pattern angle.

Returns
The pattern angle.
Remarks
All angles are expressed in radians.

◆ patternColor()

virtual OdCmColor OdDbMPolygon::patternColor ( ) const
virtual

Returns the color information as an OdCmColor instance.

Returns
The color information as an OdCmColor instance.

◆ patternDouble()

virtual bool OdDbMPolygon::patternDouble ( ) const
virtual

Returns the pattern double flag.

Returns
The pattern double flag.
Remarks
Setting the pattern double flag causes a second set of lines, at 90° to the first, for kUserDefined hatch.

◆ patternName()

virtual OdString OdDbMPolygon::patternName ( ) const
virtual

Returns the name of the pattern.

Returns
The name of the pattern.

◆ patternScale()

virtual double OdDbMPolygon::patternScale ( ) const
virtual

Returns the pattern scale.

Returns
The pattern scale.

◆ patternSpace()

virtual double OdDbMPolygon::patternSpace ( ) const
virtual

Returns the pattern spacing.

Returns
The pattern spacing.
Remarks
Pattern spacing is the distance between parallel lines for kUserDefined hatch.

◆ patternType()

virtual OdDbHatch::HatchPatternType OdDbMPolygon::patternType ( ) const
virtual

Returns the hatch pattern type for this MPolygon entity.

Remarks
patternType() returns one of the following:
Value kUserDefined 0 kPreDefined 1 kCustomDefined 2

◆ removeMPolygonLoopAt()

virtual OdResult OdDbMPolygon::removeMPolygonLoopAt ( int  loopIndex)
virtual

Removes a polygon loop from the specified position.

Parameters
loopIndex[in] Loop index.
Returns
eInvalidInput if loopIndex is equal or greater then OdDbMPolygon::numMPolygonLoops() or if loopIndex is less than 0. eOk if a polygon loop returned successfully.
Remarks
Throws:
Cause eNotApplicable OdDbMPolygon::numMPolygonLoops() == 0

◆ replaceMPolygonLoopAt() [1/2]

virtual OdResult OdDbMPolygon::replaceMPolygonLoopAt ( const OdIntArray loopIndices,
const OdGePoint2dArrayArray vertices,
const OdArray< OdGeDoubleArray > &  bulges,
OdIntArray rejectedLoop,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Replace a polygon loops in the specified positions.

Parameters
loopIndices[in] Array of loop indices.
vertices[in] Array of vertices.
bulges[in] Array of bulge values for loops.
rejectedLoop[out] Return index of loop from the loopIndices that led to errors while replacing loops.
excludeCrossing[in] Set true to disable creating a polygon if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crossings between loops; eInvalidInput if 'loopIndices' is empty or size not equal vertices size or bulges size; eInvalidIndex if loop index is out of range for number of loops; eOk if loops replacing of polygon is successfully.
Remarks
If there is at least one rejected loop, loops will not be replaced.

◆ replaceMPolygonLoopAt() [2/2]

virtual OdResult OdDbMPolygon::replaceMPolygonLoopAt ( int  loopIndex,
const OdGePoint2dArray vertices,
const OdGeDoubleArray bulges,
bool  excludeCrossing = true,
double  tol = OdDbMPolygonCrossingFuzz 
)
virtual

Replace a polygon loop in the specified position.

Parameters
loopIndex[in] Loop index.
vertices[in] Array of vertices.
bulges[in] Array of bulge values for loops.
excludeCrossing[in] Set true to disable replace a loop if there are crosses between loops.
tol[in] Measurement accuracy tolerance.
Returns
eAmbiguousInput if excludeCrossing is true and there are crosses between loops; eInvalidIndex if loop index is out of range for number of loops; eOk if a loop replaced successfully.
Remarks
This method replaces behavior such as: e.g.: storeCopyLoop(loopIndex); removeMPolygonLoopAt(loopIndex); if(insertMPolygonLoopAt(loopIndex, ...) != eOk) restoreCopyLoop(loopIndex);

◆ saveAs()

virtual void OdDbMPolygon::saveAs ( OdGiWorldDraw pWd,
OdDb::DwgVersion  ver 
) const
virtual

Creates a geometric representation of the entity for saving proxy graphics or converting to previous formats.

Parameters
pWd[in] Pointer to the OdGiWorldDraw object.
ver[in] Specifies the reason why the method is called.
Remarks
This method can be overridden in a custom classes.

Reimplemented from OdDbEntity.

◆ setElevation()

virtual void OdDbMPolygon::setElevation ( double  elevation)
virtual

Sets the elevation of this entity in the OCS.

Parameters
elevation[in] Elevation value.
Remarks
The elevation is the distance from the WCS origin to the plane of this entity.

◆ setGradient()

void OdDbMPolygon::setGradient ( OdDbHatch::GradientPatternType  gradType,
const OdString gradName 
)

Sets the gradient type and name.

Parameters
gradientType[in] Gradient type.
gradientName[in] Gradient name: SPHERICAL, HEMISPHERICAL, CURVED, LINEAR, CYLINDER, INVSPHERICAL, INVHEMISPHERICAL, INVCURVED, INVLINEAR or INVCYLINDER.
Remarks
gradientType is one of the following:
Value kPreDefinedGradient 0 kUserDefinedGradient 1

◆ setGradientAngle()

void OdDbMPolygon::setGradientAngle ( double  angle)

Sets the angle of the gradient.

Parameters
angle[in] Gradient angle.
Remarks
All angles are expressed in radians.

◆ setGradientColors()

void OdDbMPolygon::setGradientColors ( unsigned int  count,
const OdCmColor colors,
const double *  values 
)

Sets the colors and interpolation values describing the gradient fill.

Parameters
count[in] Size of 'colors' and 'values' arrays.
colors[in] Array of colors defining the gradient.
values[in] Array of interpolation values for the gradient.
Remarks
Count must be two for the current implementation.

Throws:

Cause eInvalidInput count < 2 || values[0] != 0 || values[count-1] != 1 eNotImplementedYet count > 2

◆ setGradientOneColorMode()

void OdDbMPolygon::setGradientOneColorMode ( bool  oneColorMode)

Controls the oneColorMode.

Parameters
oneColorMode[in] Controls the oneColorMode.

◆ setGradientShift()

void OdDbMPolygon::setGradientShift ( float  shiftValue)

Sets the interpolation value between the default and shifted values of the gradient's definition.

Parameters
gradientShift[in] Shift value.
Remarks
A gradientShift of 0 indicates a fully unshifted gradient. A gradientShift of 1 indicates a fully shifted gradient.

◆ setLoopDirection()

virtual OdResult OdDbMPolygon::setLoopDirection ( int  lindex,
OdDbMPolygon::loopDir  dir 
)
virtual

Sets the direction for the specified loop in the closed polygon.

Parameters
lindex[in] Loop index as an Ingeter value in range 0 to numMPolygonLoops()-1.
dir[in] Loop direction.
Returns
eOk if successful, or eInvalidInput if loop index is out of range.

◆ setNormal()

virtual void OdDbMPolygon::setNormal ( const OdGeVector3d normal)
virtual

Sets the WCS normal to the plane of this entity.

Parameters
normal[in] Normal vector.

◆ setPattern()

virtual void OdDbMPolygon::setPattern ( OdDbHatch::HatchPatternType  patType,
const OdString patName 
)
virtual

Sets the pattern data.

Parameters
patType[in] Pattern type.
patName[in] Pattern name.
Remarks
patType must be one of the following:
Value kUserDefined 0 kPreDefined 1 kCustomDefined 2

patName is ignored for patType == kUserDefined; appearance is defined by setPatternAngle(), setPatternSpace() and setPatternDouble().

◆ setPatternAngle()

virtual void OdDbMPolygon::setPatternAngle ( double  angle)
virtual

Sets the pattern angle.

Remarks
All angles are expressed in radians.

◆ setPatternColor()

virtual void OdDbMPolygon::setPatternColor ( const OdCmColor pc)
virtual

Sets the color information an OdCmColor instance.

Parameters
color[in] OdCmColor object.

◆ setPatternDouble()

virtual void OdDbMPolygon::setPatternDouble ( bool  isDouble)
virtual

Sets the pattern double flag.

Parameters
isDouble[in] Sets the pattern double flag if true, clears it otherwise.
Remarks
Setting the pattern double flag causes a second set of lines, at 90° to the first, for kUserDefined hatch.

◆ setPatternScale()

virtual void OdDbMPolygon::setPatternScale ( double  scale)
virtual

Sets the pattern scale.

Parameters
scale[in] Pattern scale value.

◆ setPatternSpace()

virtual void OdDbMPolygon::setPatternSpace ( double  space)
virtual

Sets the pattern spacing.

Parameters
space[in] Pattern spacing.
Remarks
Pattern spacing is the distance between parallel lines for kUserDefined hatch.

◆ subExplode()

virtual OdResult OdDbMPolygon::subExplode ( OdRxObjectPtrArray entitySet) const
virtual

Breaks the polygon into a set of polylines.

Parameters
entitySet[out] Resulting set of polylines.
Returns
eOk if the operation is successful; error code otherwise.

Reimplemented from OdDbEntity.

◆ subSetDatabaseDefaults()

virtual void OdDbMPolygon::subSetDatabaseDefaults ( OdDbDatabase pDb,
bool  doSubents 
)
virtual

Applies the default properties of the specified database to this entity.

Parameters
pDb[in] Pointer to the database whose default values are to be used.
doSubents[in] Set to true if subentities should be processed.
Remarks
If pDb is null, the database containing this entity will be used.

The following properties are set: color, layer, linetype, linetype scale, lineweight, plotstyle, visibility.

Reimplemented from OdDbEntity.

◆ subSubentPtr()

virtual OdDbEntityPtr OdDbMPolygon::subSubentPtr ( const OdDbFullSubentPath path) const
virtual

Create an object by OdDbFullSubentPath to the subentity.

Parameters
path[in] The OdDbFullSubentPath to the subentity.
Returns
Return the OdSmartPtr class for the OdDbEntity object pointer; NULL otherwise.

Reimplemented from OdDbEntity.

◆ subTransformBy()

virtual OdResult OdDbMPolygon::subTransformBy ( const OdGeMatrix3d xfn)
virtual

Transforms the polygon by a specified matrix.

Parameters
entitySet[in] Transformation matrix.
Returns
eOk if the operation is successful; error code otherwise.

Reimplemented from OdDbEntity.

◆ subWorldDraw()

virtual bool OdDbMPolygon::subWorldDraw ( OdGiWorldDraw pWd) const
virtual

Reimplemented from OdDbEntity.


The documentation for this class was generated from the following file: