///////////////////////////////////////////////////////////////////////////////
// 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.
///////////////////////////////////////////////////////////////////////////////
// StepSurface.h: interface for wrappers over StepSurface and its subtypes.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _STEP_SURFACE_H_
#define _STEP_SURFACE_H_
#include "StepGeometricRepresentationItem.h"
#include "ModelerGeometry/StepModelerGeometry.h"
#include "Ge/GePlane.h"
#include "Ge/GeCylinder.h"
#include "Ge/GeSphere.h"
#include "Ge/GeTorus.h"
#include "Ge/GeCone.h"
namespace OdStep {
/** \details
A base class that implements storing and handling data about definition of a Step Surface.
*/
class STEPGEOM_EXPORT OdStepSurface : public OdStepGeometricRepresentationItem
{
ODRX_DECLARE_MEMBERS(OdStepSurface);
public:
/** \details
Retrieves an EntityId of underlying Ge surface.
\returns Value from the OdGe::EntityId enumeration representing an entity type.
*/
OdGe::EntityId entityId() const
{
ODA_ASSERT_ONCE(m_pSurface);
return m_pSurface ? m_pSurface->type() : OdGe::kInvalidEntity;
}
/** \details
Returns a copy of underlying Ge surface.
\returns A shared pointer to OdGeSurface instance representing copy of an underlying Ge surface.
*/
OdGeSurfacePtr getGeSurfaceCopy() const
{
ODA_ASSERT_ONCE(m_pSurface);
return m_pSurface ? OdGeSurfacePtr(m_pSurface->copy()) : nullptr;
}
/** \details
Returns a constant raw pointer to underlying Ge surface.
\returns Raw pointer to OdGeSurface instance representing an underlying Ge surface.
*/
const OdGeSurface* getGeSurface() const
{
ODA_ASSERT_ONCE(m_pSurface);
return m_pSurface.get();
}
/** \details
Draws the surface to the OdGiWorldDraw interface.
\param pWd [in] A raw pointer to the object for the entity-level vectorization.
\returns true if the surface was successfully drawn; otherwise, the method returns false.
*/
bool draw(OdGiWorldDraw* pWd) const override;
/** \details
Retrieves a visual representation of an underlying surface.
\returns An instance of the