/////////////////////////////////////////////////////////////////////////////// // 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_MODELERUTILS_H_ #define _STEP_MODELERUTILS_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "StepCommon.h" #include "StepBuildOptions.h" #include "Ge/GeLine3d.h" #include "Ge/GeCircArc3d.h" #include "Ge/GeLineSeg2d.h" #include "Ge/GeNurbCurve3d.h" #include "StepSimpleTypes.h" //DOM-IGNORE-BEGIN class OdAPFile; namespace OdStep { class OdStepSweptDiskSolid; class OdStepGeomCache; namespace ModelerUtils { enum StepPointMarkerSymbol { kAsterisk, kCircle, kDot, kPlus, kSquare, kTriangle, kX }; // Primitives STEPGEOM_EXPORT bool stepCartesianPoint(OdDAI::ApplicationInstance* pInst, OdGePoint3d& point); STEPGEOM_EXPORT bool stepDirection(OdDAI::ApplicationInstance* pInst, OdGeVector3d& vector); STEPGEOM_EXPORT bool stepCartesianPoint2d(OdDAI::ApplicationInstance* pInst, OdGePoint2d& point); STEPGEOM_EXPORT bool stepDirection2d(OdDAI::ApplicationInstance* pInst, OdGeVector2d& vector); // Placement STEPGEOM_EXPORT bool stepAxis2Placement2d(OdDAI::ApplicationInstance* pInst, OdGeMatrix2d& matrix); STEPGEOM_EXPORT bool stepAxis2Placement3d(OdDAI::ApplicationInstance* pInst, OdGeMatrix3d& matrix); STEPGEOM_EXPORT bool stepCartesianTransformationOperator2d(OdDAI::ApplicationInstance* pInst, OdGeMatrix2d& matrix, double& scale); STEPGEOM_EXPORT bool stepCartesianTransformationOperator3d(OdDAI::ApplicationInstance* pInst, OdGeMatrix3d& matrix, double& scale); STEPGEOM_EXPORT bool stepVector(OdDAI::ApplicationInstance* pInst, OdGeVector3d& vector); STEPGEOM_EXPORT bool stepTransformation3d(OdDAI::ApplicationInstance* pInst, OdGeMatrix3d& matrix); STEPGEOM_EXPORT bool stepVector2d(OdDAI::ApplicationInstance* pInst, OdGeVector2d& vector); // Additional STEPGEOM_EXPORT bool stepColourRgb(OdDAI::ApplicationInstance* pInst, OdCmEntityColor& color); STEPGEOM_EXPORT bool stepDraughtingPreDefinedColour(OdDAI::ApplicationInstance* pInst, OdCmEntityColor& color); /** \details \param startPoint [out] Point of intersection of path and profile plane. Optional. */ STEPGEOM_EXPORT OdResult getSweepData(OdStep::OdStepSweptDiskSolid* pSolid, OdArray >& profileArray, OdGeCurve3dPtr& pPath, OdGePoint3d* pStartPoint = NULL, bool forceNurbs = true); STEPGEOM_EXPORT OdGeVector3d tangentVectorAtStart(const OdGeCurve3d* pPath, OdGePoint3d* pStartPoint = NULL); STEPGEOM_EXPORT OdGeMatrix3d matrix2dTo3d(const OdGeMatrix2d& matrix); STEPGEOM_EXPORT OdResult offsetOrigin(OdAnsiString param, const OdGeVector3d& dir, const OdDAI::ApplicationInstancePtr& m_pEntInst, OdGePoint3d& origin); STEPGEOM_EXPORT OdResult trimByParams(OdGeCurve3dPtr& m_pCurve, bool agreement, double u2, double u1); //drawing STEPGEOM_EXPORT bool stepDrawPoint(OdGiWorldDraw* pWd, OdDAI::ApplicationInstance* pPoint); STEPGEOM_EXPORT bool stepDrawAxis2Placement3d(OdGiWorldDraw* pWd, OdDAI::ApplicationInstance* pMatrix, bool redefineColors = true); //layer search //TODO: move and use this function only in OdStepRepresentationItem::setAttributes, when groups will be added to visualize STEPGEOM_EXPORT OdDAIObjectId setLayer(const OdDAIObjectId& id, OdAPFile* pFile, OdGiSubEntityTraits* pTraits); STEPGEOM_EXPORT bool getToleranceValues(OdDAI::ApplicationInstance* pInst, const OdAnsiString& attrName, OdGeInterval& interval); STEPGEOM_EXPORT OdGeMatrix3d calculateTransformation(const OdDAIObjectId& contextId, OdAPFile* pFile); STEPGEOM_EXPORT void addTransformation(const OdDAIObjectId& transformObjectId, OdStepGeomCache* pCache, const OdGeMatrix3d& transformation); } } namespace OdCis2 { namespace ModelerUtils { STEPGEOM_EXPORT bool getCoordSys(OdDAI::ApplicationInstance* pInst, OdGeMatrix3d& matrix); STEPGEOM_EXPORT bool getNodePoint(OdDAI::ApplicationInstance* pInst, OdGePoint3d& point); STEPGEOM_EXPORT bool getMeasureWithUnit(OdDAI::ApplicationInstance* pInst, const OdAnsiString& attrName, double& value); } } //DOM-IGNORE-END #endif // _STEP_MODELERUTILS_H_