/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2019, 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-2019 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 OdDbImpAssocSurfacesParameters_INCLUDED_ #define OdDbImpAssocSurfacesParameters_INCLUDED_ /*!DOM*/ #include "DbEntity.h" #include "DbAssocArrayItem.h" #include "DbImpAssocArrayParameters.h" #include "DbAssocSurfacesParameters.h" #include "TD_PackPush.h" /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class DBCONSTRAINTS_EXPORT OdDbImpAssocLoftParameters : public OdDbImpAssocArrayParameters { public: /// /// The type of a profile in creating a lofted surface. /// /// enum ProfileType { /// /// First profile of cross section, can be a point or curve/subentity edge /// /// kStartCrossSection = 0x01, /// /// Last profile of cross section, can be a point or curve/subentity edge /// /// kEndCrossSection = 0x02, /// /// First profile of guide curves /// /// kStartGuide = 0x04, /// /// Last profile of guide curves /// /// kEndGuide = 0x08 }; /** \details Constructor creates an instance of this class. */ OdDbImpAssocLoftParameters( short continuity = 1, double bulge = 0.5 ); /** \details Destructor destroys an instance of this class. */ virtual ~OdDbImpAssocLoftParameters() {}; /// /// Get continuity of a specific profile of the resulting lofted surface /// /// the same parameter can be accessed through class OdDbAssocAction by calling method /// getValueParam with name "kContinuityParamName" and corresponding index as following: /// /// kStartCrossSection : "0". /// kEndCrossSection : number of cross sections - 1. /// kStartGuide : number of cross sections. /// kEndGuide : number of cross sections + number of guide curves - 1. /// /// Specify which profile to get continuity. /// Returned continuity, can be 0(G0), 1(G1), 2(G2). /// Expression of the parameter, empty string if no expression is being used. /// The id of the expression evaluator that is used to parse the expression, empty string if no expression is being used /// OdResult. /// //OdResult getContinuity(ProfileType type, int &continuity, OdString& expression /*= OdString()*/, // OdString& evaluatorId /*= OdString()*/) const; /// /// Set continuity of a specific profile of the resulting lofted surface /// /// the same parameter can be set through class OdDbAssocAction by calling method /// setValueParam with name "kContinuityParamName" and corresponding index as following: /// /// kStartCrossSection : "0". /// kEndCrossSection : number of cross sections - 1. /// kStartGuide : number of cross sections. /// kEndGuide : number of cross sections + number of guide curves - 1. /// /// Specify which profile to set continuity. /// New continuity value, can be 0(G0), 1(G1), 2(G2). /// Expression of the parameter, if the value is controlled by other parameters /// The id of the expression evaluator that is used to parse the expression, if an expression is used. /// OdResult. /// OdResult setContinuity(ProfileType type, short continuity, const OdString& expression /* = OdString()*/, const OdString& evaluatorId /*= OdString()*/, OdString& pErrorMessage); /// /// Get bulge factor of a specific profile of the resulting lofted surface /// /// the same parameter can be accessed through class OdDbAssocAction by calling method /// getValueParam with name "kBulgeParamName" and corresponding index as following: /// /// kStartCrossSection : "0". /// kEndCrossSection : number of cross sections - 1. /// kStartGuide : number of cross sections. /// kEndGuide : number of cross sections + number of guide curves - 1. /// /// Specify which profile to get bulge. /// Returned bulge. /// Expression of the parameter, empty string if no expression is being used. /// The id of the expression evaluator that is used to parse the expression, empty string if no expression is being used /// OdResult. /// //OdResult getBulge(ProfileType type, double &bulge, OdString& expression /*= OdString()*/, // OdString& evaluatorId /*= OdString()*/) const; /// /// Set bulge factor of a specific profile of the resulting lofted surface /// /// the same parameter can be set through class OdDbAssocAction by calling method /// setValueParam with name "kBulgeParamName" and corresponding index as following: /// /// kStartCrossSection : "0". /// kEndCrossSection : number of cross sections - 1. /// kStartGuide : number of cross sections. /// kEndGuide : number of cross sections + number of guide curves - 1. /// /// Specify which profile to set bulge. /// New bulge value. /// Expression of the parameter, if the value is controlled by other parameters /// The id of the expression evaluator that is used to parse the expression, if an expression is used. /// OdResult. /// OdResult setBulge(ProfileType type, double bulge, const OdString& expression/* = OdString()*/, const OdString& evaluatorId /*= OdString()*/, OdString& pErrorMessage); /** \details Gets an array of items. */ virtual OdResult getItems(OdArray& items); virtual OdGeMatrix3d CalculateDefaultMatrix(const OdDbItemLocator &locator); virtual OdDbItemLocator getCanonicalForm(const OdDbItemLocator& locator) const; OdResult setOwner(class OdDbAssocActionBody* pOwner); void setInputVariables(const OdDbObjectIdArray& sourceEntites, short continuity, double bulge); protected: virtual OdResult GetItemByLocator(const OdDbItemLocator &locator, OdDbAssocArrayItemPtr &pItem) const; class OdDbAssocActionBody* m_pOwner; }; #include "TD_PackPop.h" #endif #pragma once