///////////////////////////////////////////////////////////////////////////////
// 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.
///////////////////////////////////////////////////////////////////////////////
// StepGeometricRepresentationItemMD.h: interface for the OdStepGeometricRepresentationItemMD class.
//
//////////////////////////////////////////////////////////////////////
#ifndef _STEP_GEOMETRICREPRESENTATIONITEMMD_H_
#define _STEP_GEOMETRICREPRESENTATIONITEMMD_H_
#include "StepGeometricRepresentationItem.h"
#include "ModelerGeometry/StepModelerGeometry.h"
namespace OdStep {
class STEPGEOM_EXPORT OdStepGeometricRepresentationItemMD : public OdStepGeometricRepresentationItem
{
ODRX_DECLARE_MEMBERS(OdStepGeometricRepresentationItemMD);
virtual void compose();
protected:
OdStepModelerGeometryPtr m_pModeler;
OdStepGeometricRepresentationItemMD();
public:
/** \details
Gets a modeler related to this instance.
\returns
Smart pointer to an associated modeler.
*/
OdStepModelerGeometryPtr getModeler();
/** \details
Detaches an associated modeler related to this instance.
\returns
Smart pointer to a modeler.
*/
OdStepModelerGeometryPtr detachModeler();
/** \details
Draws the representation item to the OdGiWorldDraw interface.
\param pWd [in] A raw pointer to the object for the entity-level vectorization.
\returns true if the representation item was successfully drawn; otherwise, the method returns false.
*/
bool draw(OdGiWorldDraw* pWd) const;
/** \details
Transforms the representation item by a 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
Retrieves the current geometrical extents of the representation item.
\param ext [out] A placeholder for the current geometry extents object to be returned to a calling subroutine.
\returns eOk if the current extents are successfully returned; otherwise, the method returns an appropriate error code.
\remarks The method accepts an instance of the OdGeExtents3d class,
fills it with the data about the model's extents, and returns it to a calling subroutine.
*/
OdResult getGeomExtents(OdGeExtents3d& ext) const;
/** \details
Retrieves the body container.
\returns An instance of the OdBodyVariant class that represents the body container.
*/
OdDAI::OdBodyVariant bodyContainer() const override;
/** \details
Sets the values of the representation item's sub-entity traits.
\param traits [out] A raw pointer to the traits to be filled and returned to a calling subroutine.
\returns The result of the value setting.
*/
OdUInt32 subSetAttributes(OdGiDrawableTraits* traits) const override;
//only for internal use, flag should be set before composing process starts (if it needs)
//only for solid modeler
//DOM-IGNORE-BEGIN
static void setDataAsMdBody(bool asMdBody);
static bool dataAsMdBody();
//DOM-IGNORE-END
};
SMARTPTR(OdStepGeometricRepresentationItemMD);
}
#endif // _STEP_GEOMETRICREPRESENTATIONITEMMD_H_