/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef DbImpAssocRotatedDimActionBody_INCLUDED_ #define DbImpAssocRotatedDimActionBody_INCLUDED_ /*!DOM*/ #include "DbAssocGlobal.h" #include "DbImpAssocActionBody.h" #include "DbAssocRotatedDimActionBody.h" #include "DbAssocMLeaderActionBody.h" #include "DbSmartCenterActionBody.h" #include "DbAssocGeomDependency.h" #include "DbRotatedDimension.h" #include "DbAlignedDimension.h" #include "DbBlockReference.h" #include "DbAssocActionParam.h" #include "DbImpSmartCenterActionBody.h" #include "DbDimAssoc.h" #include "TD_PackPush.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** \details Library: Source code provided. */ class DBCONSTRAINTS_EXPORT OdDbImpAssocAnnotationActionBody : public OdDbImpAssocActionBody { public: /** \details Constructor creates an instance of this class. */ OdDbImpAssocAnnotationActionBody(); /** \details Destructor destroys an instance of this class. */ virtual ~OdDbImpAssocAnnotationActionBody(); /** \details Reads the .dwg file data of this object. \param pFiler [in] Filer object from which data are read. \remarks Returns the filer status. */ virtual OdResult dwgInFields(OdDbDwgFiler* pFiler); /** \details Writes the .dwg file data of this object. \param pFiler [in] Pointer to the filer to which data are written. */ virtual void dwgOutFields(OdDbDwgFiler* pFiler) const; /** \details Reads the .dxf file data of this object. \param pFiler [in] Filer object from which data are read. \remarks Returns the filer status. */ virtual OdResult dxfInFields(OdDbDxfFiler* pFiler); /** \details Writes the .dxf file data of this object. \param pFiler [in] Pointer to the filer to which data are written. */ virtual void dxfOutFields(OdDbDxfFiler* pFiler) const; ////////////////////////////////////////////////////////////////////// From Arx /** \details This is the notification call of the corresponding evaluate() method of the parent class that owns this action body. */ virtual void evaluateOverride(OdDbObjectId parentActionId); OdDbObjectId annotationEntDepId() const { return m_annotationEntDepId; } void setAnnotationEntDepId(OdDbObjectId depId) { m_annotationEntDepId = depId; } protected: /*!DOM*/ OdDbAssocDependencyPtr lookUpVpDep(OdDbAssocAction* action); /*!DOM*/ OdResult breakAssociativity(OdDbAssocAction* action, OdDbAssocDependency* dimDep); OdResult addMoreObjectsToDeepCloneOverride(const OdDbAssocActionBody* thisBody, OdDbIdMapping& idMap, OdDbObjectIdArray& additionalObjectsToClone) const; //virtual OdResult setAndGetEdgeRefs(OdDbObjectId assocActionParam, OdGeCurve3d* geometry, OdGePoint3d ptPoint, OdDbObjectId parentActionId, OdDbEdgeRef& edgeRef); virtual OdResult resetEdgeRefs(OdDbAssocEdgeActionParamPtr pEdgeParam, OdGeCurve3d* geometry, /*OdGePoint3d ptPoint,*/ OdDbObjectId parentActionId, OdDbEdgeRef& edgeRef); virtual OdResult setDataToActionParam(OdGeCurve3d* geometry, OdDbObjectId snapPointParamId, OdGePoint3d& ptPoint, OdGePoint3d ptDimPoint, OdDbObjectId parentActionId/*, OdDbBlockReferencePtr pBlockRef, OdDbViewportPtr pViewport*/); static OdDbObjectId createOdDbAssocOSnapPointRefActionParam( const OdDbObjectId actionId, const OdDbObjectId source, const OdGePoint3d& ptPoint1, const OdDbAssocGeomDependencyPtr pGeomDependency1, const OdDbAssocGeomDependencyPtr pGeomDependency2, OdDbObjectId& anchorId, const PointPositionOnBlockLine isStartPoint, int index); static void CreateGeomDependencies(const OdDbFullSubentPath entPath, const OdDbObjectId actionId, const OdDbObjectId source, OdDbAssocGeomDependencyPtr& pGeomDependency1, OdDbAssocGeomDependencyPtr& pGeomDependency2, PointPositionOnBlockLine& isStartPoint); static OdDbObjectId getAssocDependencyForAction(const OdDbObjectId parentActionId); static OdDbObjectId GetLineIDByPoint(OdDbBlockReferencePtr bRef, OdGePoint3d ptPoint, PointPositionOnBlockLine& isStartPoint); /*!DOM*/ friend class OdDbImpAssocAction; static OdDbObjectId getIdForFirstWriteDependency(OdDbObjectIdArray depIDs); //enum AssocActionBodyTypes //{ // kUnDefined = 0, // kMleader, // kRotatedDim //}; //AssocActionBodyTypes m_ActionBodyType; //private: protected: OdUInt16 m_undefined2; OdDbObjectId m_annotationEntDepId; OdDbImpAssocParamBasedActionBody *m_paramBasedActionBody; }; ////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** \details This class represents the custom implementation of the action body based on AnnotationActionBody. Library: Source code provided. */ class DBCONSTRAINTS_EXPORT OdDbImpAssocRotatedDimActionBody : public OdDbImpAssocAnnotationActionBody { public: /** \details Constructor creates an instance of this class. */ OdDbImpAssocRotatedDimActionBody(); /** \details Destructor destroys an instance of this class. */ virtual ~OdDbImpAssocRotatedDimActionBody(); /** \details Reads the .dwg file data of this object. \param pFiler [in] Filer object from which data are read. \remarks Returns the filer status. */ virtual OdResult dwgInFields(OdDbDwgFiler* pFiler); /** \details Writes the .dwg file data of this object. \param pFiler [in] Pointer to the filer to which data are written. */ virtual void dwgOutFields(OdDbDwgFiler* pFiler) const; /** \details Reads the .dxf file data of this object. \param pFiler [in] Filer object from which data are read. \remarks Returns the filer status. */ virtual OdResult dxfInFields(OdDbDxfFiler* pFiler); /** \details Writes the .dxf file data of this object. \param pFiler [in] Pointer to the filer to which data are written. */ virtual void dxfOutFields(OdDbDxfFiler* pFiler) const; /** \details Returns a pointer to the array of parameters for writing. */ //const OdDbSmartCenterMarkParametersPtr parameters() const; //OdDbSmartCenterMarkParametersPtr& parameters(); virtual void composeForLoad(OdDbObject *pObject, OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo* pAuditInfo); /** \details This is the notification call of the corresponding evaluate() method of the parent class that owns this action body. */ virtual void evaluateOverride(OdDbObjectId parentActionId); /** \details Creates associative rotated dimensin: action, action body, dependencies etc. */ static OdResult createInstance( const OdDbFullSubentPathArray entPathArray, OdGePoint3dArray ptsSelected, OdDbObjectId& actionBodyId, OdString paramName = OD_T("Rotated")); static OdResult createInstance( const OdDbFullSubentPathArray& entPathArray, const OdGePoint3dArray& ptsSelected, OdDbObjectId& actionBodyId, const OdArray& snapModeArr, OdString paramName = OD_T("Rotated")); virtual OdStringArray compareWith(OdDbImpAssocActionBody *bodyIDToCompare, OdDb::DwgVersion filerVersion = OdDb::kDHL_CURRENT) const; /** \details Sets xline1 point reference action param Id. */ void setXline1PointRefActionParam(OdDbObjectId paramId) { m_xline1PointRefActionParamId = paramId; } /** \details Sets xline2 point reference action param Id. */ void setXline2PointRefActionParam(OdDbObjectId paramId) { m_xline2PointRefActionParamId = paramId; } protected: OdUInt16 m_undefinedAnnotationActionBody = 0; OdDbObjectId m_xline1PointRefActionParamId; OdDbObjectId m_xline2PointRefActionParamId; }; #include "TD_PackPop.h" #endif