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

Represents a single sheet of a model drawing. More...

#include <cadex/Drawing/Sheet.hxx>

Inheritance diagram for cadex::Drawing::Sheet:
cadex::BaseObject

Classes

class  ViewIterator
 Iterates over views of a drawing sheet. More...
 

Public Types

enum class  PaperSizeType {
  UnknownPaperSize = 0 , A0 , A1 , A2 ,
  A3 , A4 , A , B ,
  C , D , E , UserDefinedPaperSize = 1000
}
 Represents supported paper sizes of drawing sheets. More...
 
enum class  OrientationType { Landscape , Portrait }
 Represents orientation of the drawing sheet. More...
 
- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 

Public Member Functions

 Sheet ()
 Constructor.
 
void SetUuid (const cadex::Uuid &theUuid)
 
cadex::Uuid Uuid () const
 
double Width () const
 Returns the width of the sheet.
 
double Height () const
 Returns the height of the sheet.
 
PaperSizeType PaperSize () const
 Returns the standard paper size of the sheet, if one was defined.
 
OrientationType Orientation () const
 Returns the orientation of the sheet.
 
void SetStandardSheetSize (PaperSizeType thePaperSize, OrientationType theOrientation)
 Sets the sheet size to one of the standard sizes.
 
void SetCustomSheetSize (double theWidth, double theHeight)
 Sets the custom sheet size with specified dimensions.
 
size_t NumberOfViews () const
 Returns the number of child views.
 
void AddView (const View &theView)
 Adds a view to the sheet.
 
- 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)
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::BaseObject
 BaseObject (const ImplType &theImpl)
 

Detailed Description

Represents a single sheet of a model drawing.

An object of this class mimics a physical sheet of paper, hence the size and orientation settings.

Normally a drawing sheet would have associated metadata, such as default scale, title block, etc. This information is represented with objects of DrawingView class.

Examples
exploring/drawings/Program.cs, and exploring/drawings/main.cxx.

Member Enumeration Documentation

◆ OrientationType

Represents orientation of the drawing sheet.

◆ PaperSizeType

Represents supported paper sizes of drawing sheets.

Constructor & Destructor Documentation

◆ Sheet()

cadex::Drawing::Sheet::Sheet ( )

Constructor.

Member Function Documentation

◆ AddView()

void cadex::Drawing::Sheet::AddView ( const View & theView)

Adds a view to the sheet.

◆ Height()

double cadex::Drawing::Sheet::Height ( ) const

Returns the height of the sheet.

The width and height of a sheet with a standard size depend on the orientation. Changing the orientation swaps width and height.

◆ NumberOfViews()

size_t cadex::Drawing::Sheet::NumberOfViews ( ) const

Returns the number of child views.

◆ Orientation()

Sheet::OrientationType cadex::Drawing::Sheet::Orientation ( ) const

Returns the orientation of the sheet.

◆ PaperSize()

Sheet::PaperSizeType cadex::Drawing::Sheet::PaperSize ( ) const

Returns the standard paper size of the sheet, if one was defined.

◆ SetCustomSheetSize()

void cadex::Drawing::Sheet::SetCustomSheetSize ( double theWidth,
double theHeight )

Sets the custom sheet size with specified dimensions.

◆ SetStandardSheetSize()

void cadex::Drawing::Sheet::SetStandardSheetSize ( PaperSizeType thePaperSize,
OrientationType theOrientation )

Sets the sheet size to one of the standard sizes.

◆ Width()

double cadex::Drawing::Sheet::Width ( ) const

Returns the width of the sheet.

The width and height of a sheet with a standard size depend on the orientation. Changing the orientation swaps width and height.