Hide menu
Loading...
Searching...
No Matches
cadex::Drawing::PiecewiseContour Class Reference

Describes drawing elements composed connected 2D curves. More...

#include <cadex/Drawing/Geometry.hxx>

Inheritance diagram for cadex::Drawing::PiecewiseContour:
cadex::Drawing::Geometry cadex::Drawing::Element cadex::BaseObject

Public Member Functions

 PiecewiseContour ()
 Constructor.
 
bool IsClosed () const
 Returns true if the contour is closed.
 
bool AddCurve (const Geom::Curve2d &theCurve)
 Adds a trimmed curve or a B-spline curve to the element.
 
size_t NumberOfCurves () const
 Returns the number of curves currently composing the element.
 
const Geom::Curve2dCurve (size_t theIndex) const
 Returns the specified curve of the element.
 
- Public Member Functions inherited from cadex::Drawing::Element
void SetUuid (const Uuid &theUuid)
 
cadex::Uuid Uuid () const
 
void Accept (ElementVisitor &theVisitor) const
 
- Public Member Functions inherited from cadex::BaseObject
size_t Id () const
 Return unique identifier of public object.
 
internal::BaseObjectImpl * Impl () const
 
bool IsNull () const
 
 operator bool () const
 
template<typename T >
bool IsOfType () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static bool CompareType (const BaseObject &theObject)
 
- Static Public Member Functions inherited from cadex::Drawing::Element
static bool CompareType (const BaseObject &theObject)
 

Additional Inherited Members

- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 
- Protected Member Functions inherited from cadex::Drawing::Geometry
 Geometry (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::Drawing::Element
 Element (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::BaseObject
 BaseObject (const ImplType &theImpl)
 

Detailed Description

Describes drawing elements composed connected 2D curves.

Restriction - can only contain Geom::Curve2d if it's trimmed (i.e., IsTrimmed() returns true) and Geom::BSplineCurve2d.

Member Function Documentation

◆ Curve()

const Geom::Curve2d & cadex::Drawing::PiecewiseContour::Curve ( size_t theIndex) const

Returns the specified curve of the element.

theIndex must be in the range [0; NumberOfCurves()-1]. Otherwise the behavior is undefined.