CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | List of all members
OdDbHatch Class Reference

#include <DbHatch.h>

Inheritance diagram for OdDbHatch:
OdDbEntity OdDbObject OdGiDrawable OdRxObject

Public Types

enum  HatchLoopType {
  kDefault = 0, kExternal = 1, kPolyline = 2, kDerived = 4,
  kTextbox = 8, kOutermost = 0x10, kNotClosed = 0x20, kSelfIntersecting = 0x40,
  kTextIsland = 0x80, kDuplicate = 0x100, kIsAnnotative = 0x200, kDoesNotSupportScale = 0x400,
  kForceAnnoAllVisible = 0x800, kOrientToPaper = 0x1000, kIsAnnotativeBlock = 0x2000
}
 
enum  HatchEdgeType {
  kNone = 0, kLine = 1, kCirArc = 2, kEllArc = 3,
  kSpline = 4
}
 
enum  HatchPatternType { kUserDefined = 0, kPreDefined = 1, kCustomDefined = 2 }
 
enum  HatchStyle { kNormal = 0, kOuter = 1, kIgnore = 2 }
 
enum  HatchObjectType { kHatchObject = 0, kGradientObject = 1 }
 
enum  GradientPatternType { kPreDefinedGradient = 0, kUserDefinedGradient = 1 }
 
- 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,
  kLastFlag = kDrawableNotPlottable
}
 
enum  DrawableType {
  kGeometry = 0, kDistantLight = 1, kPointLight = 2, kSpotLight = 3,
  kAmbientLight, kSolidBackground, kGradientBackground, kImageBackground,
  kGroundPlaneBackground, kViewport, kWebLight, kSkyBackground,
  kImageBasedLightingBackground
}
 

Public Member Functions

 ODDB_DECLARE_MEMBERS (OdDbHatch)
 
 OdDbHatch ()
 
double elevation () const
 
void setElevation (double elevation)
 
OdGeVector3d normal () const
 
void setNormal (const OdGeVector3d &normal)
 
virtual bool isPlanar () const
 
virtual OdResult getPlane (OdGePlane &plane, OdDb::Planarity &planarity) const
 
int numLoops () const
 
OdInt32 loopTypeAt (int loopIndex) const
 
void getLoopAt (int loopIndex, EdgeArray &edgePtrs) const
 
void getLoopAt (int loopIndex, OdGePoint2dArray &vertices, OdGeDoubleArray &bulges) const
 
void appendLoop (OdInt32 loopType, const EdgeArray &edgePtrs)
 
void appendLoop (OdInt32 loopType, const OdGePoint2dArray &vertices, const OdGeDoubleArray &bulges)
 
void appendLoop (OdInt32 loopType, const OdDbObjectIdArray &dbObjIds)
 
void appendOrderedLoop (OdInt32 loopType, const EdgeArray &edgePtrs)
 
void insertLoopAt (int loopIndex, OdInt32 loopType, const EdgeArray &edgePtrs)
 
void insertLoopAt (int loopIndex, OdInt32 loopType, const OdGePoint2dArray &vertices, const OdGeDoubleArray &bulges)
 
void insertLoopAt (int loopIndex, OdInt32 loopType, const OdDbObjectIdArray &dbObjIds)
 
void removeLoopAt (int loopIndex)
 
bool associative () const
 
void setAssociative (bool isAssociative)
 
void getAssocObjIdsAt (int loopIndex, OdDbObjectIdArray &dbObjIds) const
 
void getAssocObjIds (OdDbObjectIdArray &dbObjIds) const
 
void setAssocObjIdsAt (int loopIndex, const OdDbObjectIdArray &dbObjIds)
 
void removeAssocObjIds ()
 
OdDbHatch::HatchPatternType patternType () const
 
bool isSolidFill () const
 
OdString patternName () const
 
void setPattern (OdDbHatch::HatchPatternType patType, const OdString &patName)
 
void setPattern (OdDbHatch::HatchPatternType patType, const OdString &patName, double angle, double scale, const OdHatchPattern &pat, OdGePoint2d basePt=OdGePoint2d())
 
double patternAngle () const
 
void setPatternAngle (double angle)
 
double patternSpace () const
 
void setPatternSpace (double space)
 
double patternScale () const
 
void setPatternScale (double scale)
 
bool patternDouble () const
 
void setPatternDouble (bool isDouble)
 
int numPatternDefinitions () const
 
void getPatternDefinitionAt (int lineIndex, double &lineAngle, double &baseX, double &baseY, double &offsetX, double &offsetY, OdGeDoubleArray &dashes) const
 
OdDbHatch::HatchStyle hatchStyle () const
 
void setHatchStyle (OdDbHatch::HatchStyle hatchStyle)
 
int numSeedPoints () const
 
const OdGePoint2dgetSeedPointAt (unsigned seedIndex) const
 
void setSeedPointAt (unsigned seedIndex, OdGePoint2d &point)
 
void appendSeedPoint (const OdGePoint2d &point)
 
void removeSeedPointAt (int seedPointIndex)
 
double pixelSize () const
 
void setPixelSize (double pixelSize)
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdResult subGetClassID (void *pClsid) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pWd) const
 
virtual OdResult subTransformBy (const OdGeMatrix3d &xfm) ODRX_OVERRIDE
 
virtual OdResult subGetTransformedCopy (const OdGeMatrix3d &xfm, OdDbEntityPtr &pCopy) const ODRX_OVERRIDE
 
OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void subSetDatabaseDefaults (OdDbDatabase *pDb, bool doSubents)
 
OdResult evaluateHatch (bool bUnderestimateNumLines=false) const
 
int numHatchLines () const
 
void getHatchLineDataAt (int lineIndex, OdGePoint2d &startPoint, OdGePoint2d &endPoint) const
 
void getHatchLinesData (OdGePoint2dArray &startPoints, OdGePoint2dArray &endPoints) const
 
virtual OdResult subExplode (OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
OdDbHatch::HatchObjectType hatchObjectType () const
 
void setHatchObjectType (OdDbHatch::HatchObjectType hatchObjectType)
 
virtual bool isGradient () const
 
virtual bool isHatch () const
 
OdDbHatch::GradientPatternType gradientType () const
 
OdString gradientName () const
 
void setGradient (OdDbHatch::GradientPatternType gradientType, const OdString &gradientName)
 
double gradientAngle () const
 
void setGradientAngle (double angle)
 
void getGradientColors (OdCmColorArray &colors, OdGeDoubleArray &values) const
 
void setGradientColors (OdUInt32 count, const OdCmColor *colors, const double *values)
 
bool getGradientOneColorMode () const
 
void setGradientOneColorMode (bool oneColorMode)
 
double getShadeTintValue () const
 
void setShadeTintValue (double luminance)
 
double gradientShift () const
 
void setGradientShift (double gradientShift)
 
void evaluateGradientColorAt (double value, OdCmColor &color) const
 
void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
void subClose ()
 
void setRawPattern (OdDbHatch::HatchPatternType patType, const OdString &patName, double angle, double scale, const OdHatchPattern &pat)
 
OdHatchPattern getPattern () const
 
OdHatchPattern getRawPattern () const
 
void setOriginPoint (const OdGePoint2d &pt)
 
OdGePoint2d originPoint () const
 
virtual OdResult explodeGeometry (OdRxObjectPtrArray &entitySet) const
 
virtual OdResult getArea (double &area) 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
 
OdCmColor backgroundColor () const
 
void setBackgroundColor (const OdCmColor &color)
 
OdGeMatrix3d getEcs () 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)
 
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 explodeGeometryToBlock (OdDbBlockTableRecord *pBlockRecord, OdDbObjectIdArray *ids=0)
 
void setDatabaseDefaults (OdDbDatabase *pDb=0, bool doSubents=false)
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (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
 
void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual OdResult subErase (bool erasing) 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
 
- 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)
 
OdResult erase (bool eraseIt=true)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void audit (OdDbAuditInfo *pAuditInfo)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *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 ()
 
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 &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
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)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
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 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
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
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
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
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 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 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 ()
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class represents Hatch entities in an OdDbDatabase instance.

See also
TD_Db
Remarks

Loops must be closed, simple, and continuous. They must be self-intersecting itself only at their endpoints. Their start points and end points must coincide. The outer loops must be appended before all of their inner loops.

Teigha provides limited validation of the hatch boundary in order to maintain API efficiency and performance.

<group OdDb_Classes>

Definition at line 66 of file DbHatch.h.

Member Enumeration Documentation

◆ GradientPatternType

Enumerator
kPreDefinedGradient 
kUserDefinedGradient 

Definition at line 121 of file DbHatch.h.

◆ HatchEdgeType

Enumerator
kNone 
kLine 
kCirArc 
kEllArc 
kSpline 

Definition at line 92 of file DbHatch.h.

◆ HatchLoopType

Enumerator
kDefault 
kExternal 
kPolyline 
kDerived 
kTextbox 
kOutermost 
kNotClosed 
kSelfIntersecting 
kTextIsland 
kDuplicate 
kIsAnnotative 
kDoesNotSupportScale 
kForceAnnoAllVisible 
kOrientToPaper 
kIsAnnotativeBlock 

Definition at line 73 of file DbHatch.h.

◆ HatchObjectType

Enumerator
kHatchObject 
kGradientObject 

Definition at line 115 of file DbHatch.h.

◆ HatchPatternType

Enumerator
kUserDefined 
kPreDefined 
kCustomDefined 

Definition at line 101 of file DbHatch.h.

◆ HatchStyle

Enumerator
kNormal 
kOuter 
kIgnore 

Definition at line 108 of file DbHatch.h.

Constructor & Destructor Documentation

◆ OdDbHatch()

OdDbHatch::OdDbHatch ( )

Member Function Documentation

◆ appendLoop() [1/3]

void OdDbHatch::appendLoop ( OdInt32  loopType,
const EdgeArray edgePtrs 
)

Appends a loop onto this Hatch entity.

Parameters
loopType[in] Type of loop being appended.
edgePtrs[in] Array OdGeCurve pointers to the edges that comprise this loop.
Remarks

loopType is one of the following:

Value Description kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

edgePtrs may contain pointers to only the following objects:

OdGeLineSeg2d OdGeCircArc2d OdGeEllipArc2d OdGeNurbCurve2d

◆ appendLoop() [2/3]

void OdDbHatch::appendLoop ( OdInt32  loopType,
const OdDbObjectIdArray dbObjIds 
)

Appends a loop onto this Hatch entity.

Parameters
loopType[in] Type of loop being appended.
dbObjIds[in] Array of OdDbEntity Object IDs that comprise the loop.
Remarks

loopType is one of the following:

Value Description kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

◆ appendLoop() [3/3]

void OdDbHatch::appendLoop ( OdInt32  loopType,
const OdGePoint2dArray vertices,
const OdGeDoubleArray bulges 
)

Appends a loop onto this Hatch entity.

Parameters
loopType[in] Type of loop being appended.
vertices[in] The vertices that comprise this loop.
bulges[in] The bulges corresponding to the vertices array.
Remarks

loopType is one of the following:

Value Description kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

◆ appendOrderedLoop()

void OdDbHatch::appendOrderedLoop ( OdInt32  loopType,
const EdgeArray edgePtrs 
)

Appends an ordered loop onto this Hatch entity.

Parameters
loopType[in] Type of loop being appended.
edgePtrs[in] Array OdGeCurve pointers to the edges that comprise this loop.
Remarks

loopType is one of the following:

Value Description kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

edgePtrs may contain pointers to only the following objects:

OdGeLineSeg2d OdGeCircArc2d OdGeEllipArc2d OdGeNurbCurve2d

◆ appendSeedPoint()

void OdDbHatch::appendSeedPoint ( const OdGePoint2d point)

Appends the specified seed point to this Hatch entity (DXF 10).

Parameters
point[in] Seed point.

◆ appendToOwner()

void OdDbHatch::appendToOwner ( OdDbIdPair idPair,
OdDbObject pOwnerObject,
OdDbIdMapping ownerIdMap 
)
virtual

This function appends this object to the specified owner object.

Parameters
idPair[in] ID pair to append.
pOwnerObject[in] Pointer to the owner object.
ownerIdMap[in/out] Owner's ID map.
Remarks
Adds a record to the specified ID map. This function is used internally to subDeepClone() and subWblockClone().

Reimplemented from OdDbEntity.

◆ associative()

bool OdDbHatch::associative ( ) const

Returns true if and only if this hatch is associative (DXF 71).

Remarks
Associative hatch is automatically recalculated when its boundaries are modified.

◆ backgroundColor()

OdCmColor OdDbHatch::backgroundColor ( ) const

Returns the hatch background color.

◆ decomposeForSave()

OdDbObjectPtr OdDbHatch::decomposeForSave ( OdDb::DwgVersion  ver,
OdDbObjectId replaceId,
bool &  exchangeXData 
)
virtual

Determines the behavior for custom objects when saving to .dwg or .dxf file.

Parameters
ver[in] Drawing version to save as.
replaceId[out] Object ID of the object replacing this object.
exchangeXData[out] Set to true if and only if this function did not add XData to the replacement object.
Remarks
This function either

Returns an OdDbObjectPtr for a non- database -resident (NDBRO) replacement object, setting replaceId to OdDbObjectId::kNull. Returns NULL, setting replaceId for a database -resident (DBRO) replacement object.

Custom objects can decompose themselves into other objects, adding additional XData as required. Teigha transfers XData from this object to the replacement object if and only if exchangeXData is true.

The default implementation returns NULL and sets replaceId to OdDbObjectId::kNull. This function can be overridden in custom classes.

The method is not intended to be called by client code. For processing owned objects use convertForSave() method.

Reimplemented from OdDbObject.

◆ dwgInFields()

virtual OdResult OdDbHatch::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data are 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
Returns eOk if reading was successful or an appropriate OdResult error code in the other case.

Reimplemented from OdDbEntity.

◆ dwgOutFields()

virtual void OdDbHatch::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.
Returns
Returns eOk if writing was successful or an appropriate OdResult error code in the other case.

Reimplemented from OdDbEntity.

◆ dxfInFields()

virtual OdResult OdDbHatch::dxfInFields ( OdDbDxfFiler pFiler)
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are 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
Returns eOk if reading was successful or an appropriate OdResult error code in the other case.

Reimplemented from OdDbEntity.

◆ dxfOutFields()

virtual void OdDbHatch::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). 3) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.
Returns
Returns eOk if writing was successful or an appropriate OdResult error code in the other case.

Reimplemented from OdDbEntity.

◆ elevation()

double OdDbHatch::elevation ( ) const

Returns the elevation of this entity in the OCS (DXF 30).

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

◆ evaluateGradientColorAt()

void OdDbHatch::evaluateGradientColorAt ( double  value,
OdCmColor color 
) const

Returns the interpolated color of the gradient definition.

Parameters
value[in] Interpolation value.
color[out] Receives the interpolated color.

◆ evaluateHatch()

OdResult OdDbHatch::evaluateHatch ( bool  bUnderestimateNumLines = false) const

Evaluates the hatch for this Hatch entity.

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

◆ explodeGeometry()

virtual OdResult OdDbHatch::explodeGeometry ( OdRxObjectPtrArray entitySet) const
virtual

Explodes this entity into a set of simpler entities.

Parameters
entitySet[in/out] Receives an array of pointers to the new entities.
Remarks
The newly created entities will be not database resident. Entities resulting from the explosion are appended to the specified array. The default implementation of this function calls subWorldDraw() and makes entities from geometry generated by subWorldDraw(). This function can be overridden in custom classes.
Returns
Returns eOk if successful, or an appropriate error code if not.

Reimplemented from OdDbEntity.

◆ getArea()

virtual OdResult OdDbHatch::getArea ( double &  area) const
virtual

Returns the area of this entity.

Parameters
area[out] Receives the area.
Returns
Returns eOk if successful, or an appropriate error code if not.

◆ getAssocObjIds()

void OdDbHatch::getAssocObjIds ( OdDbObjectIdArray dbObjIds) const

Returns the Object IDs comprising all the associative boundaries in this Hatch entity.

Parameters
dbObjIds[out] Receives the boundary Object IDs.
Remarks
Returns nothing if this Hatch entity is not associative.

◆ getAssocObjIdsAt()

void OdDbHatch::getAssocObjIdsAt ( int  loopIndex,
OdDbObjectIdArray dbObjIds 
) const

Returns the Object IDs comprising the specified associative loop in this Hatch entity.

Parameters
loopIndex[in] Loop index.
dbObjIds[out] Receives the boundary Object IDs.
Remarks
Returns nothing if this Hatch entity is not associative.

◆ getEcs()

OdGeMatrix3d OdDbHatch::getEcs ( ) const
virtual

Returns the entity coordinate system matrix.

Remarks
Default implementation returns Identity matrix.

Reimplemented from OdDbEntity.

◆ getGradientColors()

void OdDbHatch::getGradientColors ( OdCmColorArray colors,
OdGeDoubleArray values 
) const

Returns the colors and interpolation values describing the gradient fill for this Hatch entity.

Parameters
colors[out] Array of colors defining the gradient.
values[out] Array of interpolation values for the gradient.

◆ getGradientOneColorMode()

bool OdDbHatch::getGradientOneColorMode ( ) const

Returns the oneColorMode for this Hatch entity.

◆ getHatchLineDataAt()

void OdDbHatch::getHatchLineDataAt ( int  lineIndex,
OdGePoint2d startPoint,
OdGePoint2d endPoint 
) const

Returns the hatch line data for the specified hatch line in this Hatch entity.

Parameters
lineIndex[in] Line index.
startPoint[out] Receives the start point.
endPoint[out] Receives the end point.

◆ getHatchLinesData()

void OdDbHatch::getHatchLinesData ( OdGePoint2dArray startPoints,
OdGePoint2dArray endPoints 
) const

Returns all the hatch line data for this Hatch entity.

Parameters
startPoints[out] Receives the start points.
endPoints[out] Receives the end points.

◆ getLoopAt() [1/2]

void OdDbHatch::getLoopAt ( int  loopIndex,
EdgeArray edgePtrs 
) const

Returns the specified loop from this Hatch entity.

Parameters
loopIndex[in] Loop index.
edgePtrs[out] Receives a set of OdGeCurve2d pointers to the edges that comprise this loop.
Remarks
Should be called with edgePtrs if the loop is not a polyline loop.

◆ getLoopAt() [2/2]

void OdDbHatch::getLoopAt ( int  loopIndex,
OdGePoint2dArray vertices,
OdGeDoubleArray bulges 
) const

Returns the specified loop from this Hatch entity.

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.
Remarks
Should be called with vertices and bulges if the loop is a polyline loop.

◆ getPattern()

OdHatchPattern OdDbHatch::getPattern ( ) const

Returns the hatch pattern definition for this Hatch entity as it appears in the PAT file.

◆ getPatternDefinitionAt()

void OdDbHatch::getPatternDefinitionAt ( int  lineIndex,
double &  lineAngle,
double &  baseX,
double &  baseY,
double &  offsetX,
double &  offsetY,
OdGeDoubleArray dashes 
) const

Returns the specified pattern definition line for this Hatch entity.

Parameters
lineIndex[in] Line index.
lineAngle[out] Receives the line angle (DXF 53).
baseX[out] Receives the line base point X (DXF 43).
baseY[out] Receives the line base point Y (DXF 44).
offsetX[out] Receives the line offset X (DXF 45).
offsetY[out] Receives the line offset Y (DXF 46).
dashes[out] Receives the line dash lengths (DXF 79, 49).

◆ getPlane()

virtual OdResult OdDbHatch::getPlane ( OdGePlane plane,
OdDb::Planarity planarity 
) const
virtual

Returns the plane that contains the curve and curve's configuration.

Parameters
plane[out] Plain.
planarity[out] Curve's configuration.
Remarks
planarity and plane return values as follows:

Value Description plane kNonPlanar 0 Non-planar. Not set. kPlanar 1 Planar. Entity plane. kLinear 2 Linear. Arrbitrary plane containing this entity.

Returns
Returns eOk if getting was successful or an appropriate OdResult error code in the other case.

Reimplemented from OdDbEntity.

◆ getRawPattern()

OdHatchPattern OdDbHatch::getRawPattern ( ) const

Returns the hatch pattern definition for this Hatch entity as it appears in the DWG/DXF file.

◆ getSeedPointAt()

const OdGePoint2d& OdDbHatch::getSeedPointAt ( unsigned  seedIndex) const

Returns the specified seed point from this Hatch entity (DXF 10).

Parameters
seedIndex[in] Seed point index.

◆ getShadeTintValue()

double OdDbHatch::getShadeTintValue ( ) const

Returns the luminance value for this Hatch entity.

Returns
Returns a value in the range. [0.0 .. 1.0].

If the gradient is using oneColorMode, this function returns the luminance value applied to the first color.

◆ gradientAngle()

double OdDbHatch::gradientAngle ( ) const

Returns the angle of the gradient for this Hatch entity.

Remarks
All angles are expressed in radians.

◆ gradientName()

OdString OdDbHatch::gradientName ( ) const

Returns the name of the gradient of this Hatch entity.

◆ gradientShift()

double OdDbHatch::gradientShift ( ) const

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

Remarks
A gradientShift of 0 indicates a fully unshifted gradient. A gradientShift of 1 indicates a fully shifted gradient.

◆ gradientType()

OdDbHatch::GradientPatternType OdDbHatch::gradientType ( ) const

Returns the gradient type of this Hatch entity.

Remarks
gradientType is one of the following:

Value kPreDefinedGradient 0 kUserDefinedGradient 1

◆ hatchObjectType()

OdDbHatch::HatchObjectType OdDbHatch::hatchObjectType ( ) const

Returns the hatch object type of this Hatch entity.

Remarks
hatchObjectType is one of the following:

Value Description kHatchObject 0 Classic hatch kGradientObject 1 Color gradient

◆ hatchStyle()

OdDbHatch::HatchStyle OdDbHatch::hatchStyle ( ) const

Returns the hatch style of this hatch entity (DXF 75).

Remarks
hatchStyle is one of the following:

Value kNormal 0 kOuter 1 kIgnore 2

◆ insertLoopAt() [1/3]

void OdDbHatch::insertLoopAt ( int  loopIndex,
OdInt32  loopType,
const EdgeArray edgePtrs 
)

Inserts a loop into this Hatch entity on the specified index.

Parameters
loopIndex[in] Loop index.
loopType[in] Type of loop being appended.
edgePtrs[in] Array OdGeCurve pointers to the edges that comprise this loop.
Remarks
loopType is one of the following:

Value Description. kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

◆ insertLoopAt() [2/3]

void OdDbHatch::insertLoopAt ( int  loopIndex,
OdInt32  loopType,
const OdDbObjectIdArray dbObjIds 
)

Inserts a loop into this Hatch entity on the specified index.

Parameters
loopIndex[in] Loop index.
loopType[in] Type of loop being appended.
dbObjIds[in] Array of OdDbEntity Object IDs that comprise the loop.
Remarks
loopType is one of the following:

Value Description. kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

◆ insertLoopAt() [3/3]

void OdDbHatch::insertLoopAt ( int  loopIndex,
OdInt32  loopType,
const OdGePoint2dArray vertices,
const OdGeDoubleArray bulges 
)

Inserts a loop into this Hatch entity on the specified index.

Parameters
loopIndex[in] Loop index.
loopType[in] Type of loop being appended.
vertices[in] The vertices that comprise this loop.
bulges[in] The bulges corresponding to the vertices array.
Remarks
loopType is one of the following:

Value Description. kDefault 0 Not yet specified. kExternal 1 Defined by external entities. kPolyline 2 Defined by OdGe polyline. kDerived 4 Derived from a picked point. kTextbox 8 Defined by text. kOutermost 0x10 Outermost loop. kNotClosed 0x20 Open loop. kSelfIntersecting 0x40 Self-intersecting loop. kTextIsland 0x80 Text loop surrounded by an even number of loops. kDuplicate 0x100 Duplicate loop.

◆ isGradient()

virtual bool OdDbHatch::isGradient ( ) const
virtual

Returns true if and only if this Hatch entity is a color gradient.

◆ isHatch()

virtual bool OdDbHatch::isHatch ( ) const
virtual

Returns true if and only if this Hatch entity is of type kHatchObject.

◆ isPlanar()

virtual bool OdDbHatch::isPlanar ( ) const
inlinevirtual

Returns true if and only if this entity is planar.

Reimplemented from OdDbEntity.

Definition at line 162 of file DbHatch.h.

◆ isSolidFill()

bool OdDbHatch::isSolidFill ( ) const

Returns true if and only if this hatch is solid fill (DXF 70).

◆ loopTypeAt()

OdInt32 OdDbHatch::loopTypeAt ( int  loopIndex) const

Returns the type of loop at the specified index (DXF 92).

Parameters
loopIndex[in] Loop index.
Remarks
The loop type consists of a combination of bits from the HatchLoopType enumeration.

◆ modifiedGraphics()

virtual void OdDbHatch::modifiedGraphics ( const OdDbObject pObject)
virtual

Notification function called whenever an object derived from OdDbEntity is modified.

Parameters
pObject[in] Pointer to the modified object.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

This function is called whenever the following has occurred.

1) The calling object is opened OdDb::kForWrite.

2) One of its member functions either

a Calls its assertWriteEnabled with recordModified == true.

b Calls its recordGraphicsModified(true).

3) The calling object is being closed.

This function is called whenever the object as been modified. It therefore indicates only that the graphics for it may have changed.

Reimplemented from OdDbObject.

◆ normal()

OdGeVector3d OdDbHatch::normal ( ) const

Returns the WCS normal to the plane of this entity (DXF 210).

◆ numHatchLines()

int OdDbHatch::numHatchLines ( ) const

Returns the number of hatch lines in this Hatch entity.

Remarks
Returns zero if the hatch pattern is SOLID.

◆ numLoops()

int OdDbHatch::numLoops ( ) const

Returns the number of loops in this hatch (DXF 91).

◆ numPatternDefinitions()

int OdDbHatch::numPatternDefinitions ( ) const

Returns the number of pattern definition lines for this Hatch entity (DXF 78).

◆ numSeedPoints()

int OdDbHatch::numSeedPoints ( ) const

Returns the number of seed points for this Hatch entity (DXF 98).

◆ ODDB_DECLARE_MEMBERS()

OdDbHatch::ODDB_DECLARE_MEMBERS ( OdDbHatch  )

◆ originPoint()

OdGePoint2d OdDbHatch::originPoint ( ) const

Returns the origin point of the current Hatch object as OdGePoint2d object.

◆ patternAngle()

double OdDbHatch::patternAngle ( ) const

Returns the pattern angle for this Hatch entity (DXF 52).

Remarks
All angles are expressed in radians.

◆ patternDouble()

bool OdDbHatch::patternDouble ( ) const

Returns the pattern double flag for this Hatch entity (DXF 77).

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

◆ patternName()

OdString OdDbHatch::patternName ( ) const

Returns the name of the pattern for this Hatch entity (DXF 2).

◆ patternScale()

double OdDbHatch::patternScale ( ) const

Returns the pattern scale for this Hatch entity (DXF 41).

◆ patternSpace()

double OdDbHatch::patternSpace ( ) const

Returns the pattern spacing for this Hatch entity (DXF 41).

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

◆ patternType()

OdDbHatch::HatchPatternType OdDbHatch::patternType ( ) const

Returns the hatch pattern type for this Hatch entity (DXF 76).

Remarks

patternType() returns one of the following:

Value kUserDefined 0 kPreDefined 1 kCustomDefined 2

◆ pixelSize()

double OdDbHatch::pixelSize ( ) const

Returns the pixel size for intersection and ray casting.

◆ removeAssocObjIds()

void OdDbHatch::removeAssocObjIds ( )

Removes all Object IDs that are associated with this Hatch entity.

◆ removeLoopAt()

void OdDbHatch::removeLoopAt ( int  loopIndex)

Removes the specified loop from this Hatch entity.

Parameters
loopIndex[in] Loop index.

◆ removeSeedPointAt()

void OdDbHatch::removeSeedPointAt ( int  seedPointIndex)

Remove a specified seed point from this Hatch entity.

Parameters
seedIndex[in] Seed point index.

◆ setAssociative()

void OdDbHatch::setAssociative ( bool  isAssociative)

Controls the associative flag for this hatch (DXF 71).

Parameters
isAssociative[in] Controls the associative flag.
Remarks
Associative hatch is automatically recalculated when its boundaries are modified.

◆ setAssocObjIdsAt()

void OdDbHatch::setAssocObjIdsAt ( int  loopIndex,
const OdDbObjectIdArray dbObjIds 
)

Sets the Object IDs comprising the specified associative loop in this Hatch entity.

Parameters
loopIndex[in] Loop index.
dbObjIds[in] The set of boundary Object ID's that make up the specified loop.
Remarks
Adds the Object ID of this hatch to the reactors of the boundary objects.

◆ setBackgroundColor()

void OdDbHatch::setBackgroundColor ( const OdCmColor color)

Sets the hatch background color.

◆ setElevation()

void OdDbHatch::setElevation ( double  elevation)

Sets the elevation of this entity in the OCS (DXF 30).

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

◆ setGradient()

void OdDbHatch::setGradient ( OdDbHatch::GradientPatternType  gradientType,
const OdString gradientName 
)

Sets the gradient type and name for this Hatch entity.

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 OdDbHatch::setGradientAngle ( double  angle)

Returns the angle of the gradient for this Hatch entity.

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

◆ setGradientColors()

void OdDbHatch::setGradientColors ( OdUInt32  count,
const OdCmColor colors,
const double *  values 
)

Returns the colors and interpolation values describing the gradient fill for this Hatch entity.

Parameters
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 OdDbHatch::setGradientOneColorMode ( bool  oneColorMode)

Controls the oneColorMode for this Hatch entity.

Parameters
oneColorMode[in] Controls the oneColorMode.

◆ setGradientShift()

void OdDbHatch::setGradientShift ( double  gradientShift)

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.

◆ setHatchObjectType()

void OdDbHatch::setHatchObjectType ( OdDbHatch::HatchObjectType  hatchObjectType)

Sets the hatch object type of this Hatch entity.

Parameters
hatchObjectType[in] Hatch object type.
Remarks
hatchObjectType is one of the following:

Value Description kHatchObject 0 Classic hatch kGradientObject 1 Color gradient

◆ setHatchStyle()

void OdDbHatch::setHatchStyle ( OdDbHatch::HatchStyle  hatchStyle)

Sets the hatch style of this Hatch entity (DXF 75).

Parameters
hatchStyle[in] Hatch style.
Remarks
hatchStyle is one of the following:

Value kNormal 0 kOuter 1 kIgnore 2

◆ setNormal()

void OdDbHatch::setNormal ( const OdGeVector3d normal)

Sets the WCS normal to the plane of this entity (DXF 210).

Parameters
normal[in] Normal.

◆ setOriginPoint()

void OdDbHatch::setOriginPoint ( const OdGePoint2d pt)

Sets the origin point to the current Hatch object.

Parameters
pt[in] Origin point.

◆ setPattern() [1/2]

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

Sets the pattern data for this Hatch entity.

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().

◆ setPattern() [2/2]

void OdDbHatch::setPattern ( OdDbHatch::HatchPatternType  patType,
const OdString patName,
double  angle,
double  scale,
const OdHatchPattern pat,
OdGePoint2d  basePt = OdGePoint2d() 
)

Sets the pattern data for this Hatch entity.

Parameters
patType[in] Pattern type.
patName[in] Pattern name.
angle[in] Pattern angle.
scale[in] Pattern scale.
pat[in] Pattern definition (as in PAT file)
basePt[in] Base point.
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()

void OdDbHatch::setPatternAngle ( double  angle)

Sets the pattern angle for this Hatch entity (DXF 52).

Remarks
All angles are expressed in radians.

◆ setPatternDouble()

void OdDbHatch::setPatternDouble ( bool  isDouble)

Sets the pattern double flag for this Hatch entity (DXF 77).

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()

void OdDbHatch::setPatternScale ( double  scale)

Sets the pattern scale for this Hatch entity (DXF 41).

Parameters
scale[in] Pattern scale.

◆ setPatternSpace()

void OdDbHatch::setPatternSpace ( double  space)

Sets the pattern spacing for this Hatch entity (DXF 41).

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

◆ setPixelSize()

void OdDbHatch::setPixelSize ( double  pixelSize)

Sets the pixel size for intersection and ray casting.

Parameters
pixelSize[in] Pixel size.

◆ setRawPattern()

void OdDbHatch::setRawPattern ( OdDbHatch::HatchPatternType  patType,
const OdString patName,
double  angle,
double  scale,
const OdHatchPattern pat 
)

Sets the pattern data for this Hatch entity directly, bypassing OdHatchPatternManager (DXF 76 and DXF 2).

Parameters
patType[in] Pattern type.
patName[in] Pattern name.
angle[in] Pattern angle.
scale[in] Pattern scale.
pat[in] Pattern definition (already scaled and rotated)
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().

Remarks
angle and scale are not applied to the pattern.

◆ setSeedPointAt()

void OdDbHatch::setSeedPointAt ( unsigned  seedIndex,
OdGePoint2d point 
)

Sets the specified seed point for this Hatch entity (DXF 10).

Parameters
seedIndex[in] Seed point index.
point[in] Seed point.

◆ setShadeTintValue()

void OdDbHatch::setShadeTintValue ( double  luminance)

Sets the luminance value for this Hatch entity.

Parameters
luminance[in] Luminace value. [0.0 .. 1.0]

If the gradient is using oneColorMode, this function sets the luminance value applied to the first color.

◆ subClose()

void OdDbHatch::subClose ( )
virtual

Called as the first operation as this object is being closed, for database -resident objects only.

Remarks
This function is notified just before the current open operation is to be closed, giving this function the ability to perform necessary operatons.

When overriding this function:

1) If the OdDbObject's state is incorrect, throw exception.

2) Call parent class's subClose().

3) If other actions are required before close, do them.

The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented from OdDbObject.

◆ subExplode()

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

Reimplemented from OdDbEntity.

◆ subGetClassID()

virtual OdResult OdDbHatch::subGetClassID ( void pClsid) const
virtual

Reimplemented from OdDbEntity.

◆ subGetGsMarkersAtSubentPath()

virtual OdResult OdDbHatch::subGetGsMarkersAtSubentPath ( const OdDbFullSubentPath subPath,
OdGsMarkerArray gsMarkers 
) const
virtual

Reimplemented from OdDbEntity.

◆ subGetSubentPathsAtGsMarker()

virtual OdResult OdDbHatch::subGetSubentPathsAtGsMarker ( OdDb::SubentType  type,
OdGsMarker  gsMark,
const OdGePoint3d pickPoint,
const OdGeMatrix3d xfm,
OdDbFullSubentPathArray subentPaths,
const OdDbObjectIdArray pEntAndInsertStack = 0 
) const
virtual

Reimplemented from OdDbEntity.

◆ subGetTransformedCopy()

virtual OdResult OdDbHatch::subGetTransformedCopy ( const OdGeMatrix3d xfm,
OdDbEntityPtr pCopy 
) const
virtual

Reimplemented from OdDbEntity.

◆ subSetDatabaseDefaults()

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

Called by setDatabaseDefaults() after the values are set.

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 is used.

This function allows custom classes to inspect and modify the values set by setDatabaseDefaults.

The default implementation of this function returns eNotApplicable. This function can be overridden in custom classes.

Remarks
This function is not intended to be called by the user.

Reimplemented from OdDbEntity.

◆ subSubentPtr()

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

Reimplemented from OdDbEntity.

◆ subTransformBy()

virtual OdResult OdDbHatch::subTransformBy ( const OdGeMatrix3d xfm)
virtual

Reimplemented from OdDbEntity.

◆ subViewportDraw()

virtual void OdDbHatch::subViewportDraw ( OdGiViewportDraw pWd) const
virtual

Reimplemented from OdDbEntity.

◆ subWorldDraw()

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

Reimplemented from OdDbEntity.


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