/////////////////////////////////////////////////////////////////////////////// // 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 _IFC_ARBITRARY_PROFILE_CURVE_2D_VALIDATION_TASK_H #define _IFC_ARBITRARY_PROFILE_CURVE_2D_VALIDATION_TASK_H #include "IfcValidationExport.h" #include "daiExtentValidationTask.h" #include "daiValidationHealer.h" /** \details Contains declarations related to working with IFC files content. */ namespace OdIfc { /** \details Base validation task class for validating curves within IfcArbitraryProfileDef entities. This class provides common functionality for checking that profile curves are properly defined in 2D space and meet IFC specification requirements. */ class ArbitraryProfileCurve2dValidationTask : public OdDAI::ExtentValidationTask { ODRX_DECLARE_MEMBERS(ArbitraryProfileCurve2dValidationTask); public: /** \details Validates that curves within IfcArbitraryProfileDef entities are 2D and not 3D. Ensures profile curves conform to the IFC specification requirement for 2D geometry. \param pInstanceCtx [in] Context for instance validation. \param invalidParams [out] Parameters describing any validation failures found. \returns Logical result indicating validation success or failure. */ virtual OdDAI::Logical validate(OdDAI::InstanceValidationContext* pInstanceCtx, OdSharedPtr& invalidParams) override; }; typedef OdSmartPtr ArbitraryProfileCurve2dValidationTaskPtr; /** \details Validation task for IfcArbitraryOpenProfileDef entities. Validates that curves are 2D and not 3D within open profile definitions. */ class IFC_VALIDATION_EXPORT ArbitraryOpenProfileCurve2dValidationTask : public ArbitraryProfileCurve2dValidationTask { ODRX_VALIDATION_DECLARE_MEMBERS(ArbitraryOpenProfileCurve2dValidationTask); /** \details Default constructor. */ ArbitraryOpenProfileCurve2dValidationTask(); /** \details Returns a description of this validation task. \returns String description of the validation task. */ OdAnsiString description() const override; }; /** \details Validation task for IfcArbitraryClosedProfileDef entities. Validates that curves are 2D and not 3D within closed profile definitions. */ class IFC_VALIDATION_EXPORT ArbitraryClosedProfileCurve2dValidationTask : public ArbitraryProfileCurve2dValidationTask { ODRX_VALIDATION_DECLARE_MEMBERS(ArbitraryClosedProfileCurve2dValidationTask); /** \details Default constructor. */ ArbitraryClosedProfileCurve2dValidationTask(); /** \details Returns a description of this validation task. \returns String description of the validation task. */ OdAnsiString description() const override; }; /** \details Healer class for arbitrary profile curve validation issues. Fixes problems related to 2D/3D curve validation in IfcArbitraryProfileDef entities. */ class IFC_VALIDATION_EXPORT ArbitraryProfileCurve2dValidationHealer : public OdDAI::ValidationHealer { ODRX_DECLARE_MEMBERS(ArbitraryProfileCurve2dValidationHealer); public: /** \details Fixes problems with IfcArbitraryProfileDef curve validation. Attempts to heal issues where curves are incorrectly defined as 3D instead of 2D. \param model [in] A raw pointer to the OdDAI object identifiers of the entity instances. \returns Result of healing. Returns True if healing is successful. */ virtual OdDAI::Logical heal(OdDAI::Model* model, OdDAI::ValidationTask::InvalidValidationParamsBase* invalidParams); }; typedef OdSmartPtr ArbitraryProfileCurve2dValidationHealerPtr; } #endif // _IFC_ARBITRARY_PROFILE_CURVE_2D_VALIDATION_TASK_H