/////////////////////////////////////////////////////////////////////////////// // 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 _STEP_CURVE_H_ #define _STEP_CURVE_H_ #include "Ge/GePolyline3d.h" #include "Ge/GeCircArc3d.h" #include "Ge/GeEllipArc3d.h" #include "Ge/GeLineSeg3d.h" #include "Ge/GeCompositeCurve3d.h" //#include "ModelerGeometry/StepModelerUtils.h" #include "Entities/StepGeometricRepresentationItemMD.h" namespace OdStep { /** \details A base class that implements storing and handling data about definition of a Step Curve. */ class STEPGEOM_EXPORT OdStepCurve : public OdStepGeometricRepresentationItem { ODRX_DECLARE_MEMBERS(OdStepCurve); public: /** \details Retrieves an EntityId of underlying Ge curve. \returns Value from the OdGe::EntityId enumeration representing an entity type. */ OdGe::EntityId entityId() const { ODA_ASSERT_ONCE(m_pCurve); return m_pCurve ? m_pCurve->type() : OdGe::kInvalidEntity; } /** \details Returns a copy of underlying Ge curve. \returns Raw pointer to OdGeCurve3d instance representing copy of an underlying Ge curve. */ virtual OdGeCurve3d* getGeCurveCopy() const { ODA_ASSERT_ONCE(m_pCurve); return m_pCurve ? static_cast(m_pCurve->copy()) : nullptr; } /** \details Returns a constant raw pointer to underlying Ge curve. \returns Raw pointer to OdGeCurve3d instance representing an underlying Ge curve. */ const OdGeCurve3d* getGeCurve() const { ODA_ASSERT_ONCE(m_pCurve); return m_pCurve.get(); } /** \details Transforms the STEP curve by the specified transformation matrix. \param transform [in] A transformation matrix object. \returns eOk if the transformation operation succeeds; otherwise, the method returns an appropriate error code. */ OdResult transformBy(const OdGeMatrix3d &transform) override; /** \details Checks whether the curve is three-dimensional. \returns true if the curve is three-dimensional; otherwise the method returns false. */ inline virtual bool is3d() const { return m_is3d; } /** \details Defines whether the curve is three-dimensional. \param val [in] Flag that specifies whether the curve is three-dimensional. */ inline void setIs3d(bool val) { m_is3d = val; } protected: OdGeMatrix3d m_transform; OdGeCurve3dPtr m_pCurve; void getMatrix(OdDAI::ApplicationInstancePtr pPosition, OdGeMatrix3d& matr); private: bool m_is3d; }; /** \details A data type that represents a smart pointer to an OdStepCurve object. */ typedef OdSmartPtr OdStepCurvePtr; } // namespace #endif // _STEP_CURVE_H_