/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #include "DgConeProperties.h" //----------------------------------------------------------------------------------------------------------------------- // class: OdDgCone //----------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------- // property: ConeType //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeConeTypeProperty::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getConeType(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeConeTypeProperty::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setConeType(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: Center1 //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeCenter1Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getCenter1(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeCenter1Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setCenter1(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: Center2 //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeCenter2Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getCenter2(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeCenter2Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setCenter2(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: Radius1 //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeRadius1Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getRadius1(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeRadius1Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setRadius1(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: Radius2 //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeRadius2Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getRadius2(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeRadius2Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setRadius2(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: Rotation //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeRotationProperty::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getRotation(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeRotationProperty::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setRotation(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: Solid //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeSolidProperty::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->isSolid(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeSolidProperty::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setSolid(*rxvalue_cast(&value)); return eOk; } //----------------------------------------------------------------------------------------------------------------------- // property: HoleFlag //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeHoleFlagProperty::subGetValue(const OdRxObject* pO, OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; value = pObj->getHoleFlag(); return eOk; } //----------------------------------------------------------------------------------------------------------------------- OdResult OdDgConeHoleFlagProperty::subSetValue(OdRxObject* pO, const OdRxValue& value) const { OdDgConePtr pObj = OdDgCone::cast(pO); if (pObj.isNull()) return eNotApplicable; pObj->setHoleFlag(*rxvalue_cast(&value)); return eOk; } //-----------------------------------------------------------------------------------------------------------------------