CPanel Class Reference
[Sail computations library]

#include <panel.h>

List of all members.

Public Member Functions

 CPanel ()
 CPanel (const CPanel &p)
CRect3d boundingRect () const
CPoint3d centroid () const
void addHems (const real &, const real &, const real &, const real &)
void add6Hems (const real &, const real &, const real &, const real &, const real &, const real &)
CPanel develop (enumDevelopAlign align) const
void placeLabel ()
CPanel reframe (enumAlign align) const
CPanel rotate (const CPoint3d &, const CMatrix &) const
 end add6Hems ////////////////////////////////////////
CPanel operator+ (const CVector3d &) const
CPaneloperator= (const CPanel &)

Public Attributes

CPanelLabel label
CSide left
CSide right
CSide top
CSide bottom
CSide cutLeft
CSide cutRight
CSide cutTop
CSide cutBottom
bool hasHems

Friends

ostream & operator<< (ostream &, const CPanel &)


Detailed Description

The CPanel describes a sail panel.

A panel has at least four sides: top, bottom, left and right. A developed panel also has four additional sides representing the edge of the cloth taking into account seam width and hems width.

Definition at line 142 of file panel.h.


Constructor & Destructor Documentation

CPanel::CPanel (  ) 

Default constructor

Definition at line 100 of file panel.cpp.

CPanel::CPanel ( const CPanel p  ) 

Copy constructor.

Definition at line 109 of file panel.cpp.


Member Function Documentation

CRect3d CPanel::boundingRect (  )  const

This routine returns the smallest 3D box that contains the panel.

Definition at line 118 of file panel.cpp.

References bottom, cutBottom, cutLeft, cutRight, cutTop, hasHems, left, CRect3d::max, CRect3d::min, right, and top.

CPoint3d CPanel::centroid (  )  const

This routine returns the arithmetic average of all the edge points of a panel.

Definition at line 161 of file panel.cpp.

References bottom, left, right, and top.

Referenced by placeLabel().

void CPanel::addHems ( const real &  lw,
const real &  tw,
const real &  rw,
const real &  bw 
)

Add the cloth for stitching to the 4 edges of the panel. This create the panel to be cut (outside the basic panel) lw = width to be added on left side tw = width to be added on top side rw = width to be added on right side bw = width to be added on bottom side

Author:
Robert Laine alias Sailcuter

Definition at line 432 of file panel.cpp.

References add6Hems().

void CPanel::add6Hems ( const real &  lolW,
const real &  hilW,
const real &  topW,
const real &  hirW,
const real &  lorW,
const real &  botW 
)

Add the cloth for stitching to the 6 edges of the panel. This create the panel to be cut (outside the basic panel) lolW, hilW = width to be added on lo-hi left side topW = width to be added on top side lorW, hirW = width to be added on lo-hi right side botW = width to be added on bottom side

Author:
Robert Laine alias Sailcuter

* compute basic edges vectors */

* copy the basic panel edge points to cut points as default */

* Move the basic bottom edge points to the cut line */

* Move the basic top edge points to the cut line */

* Move the basic left edge points to the cut line */

* Move the basic right edge points to the cut line */

* Rejoining the 4 corners of the cut panel */

lower left

lower right

upper left

upper right

Definition at line 447 of file panel.cpp.

References bottom, cutBottom, cutLeft, cutRight, cutTop, CSubSpace::getdim(), CSubSpace::getp(), hasHems, CSubSpace::intersect(), left, CSubSpace3d::line(), CVector::norm(), right, CMatrix::rot3d(), top, and CVector::unit().

Referenced by addHems().

CPanel CPanel::develop ( enumDevelopAlign  align  )  const

This routine returns the development of the panel. The developed panel will be horizontal with its upper or lower edge aligned to X axis depending on parameter "align"=ALIGN_TOP or ALIGN_BOTTOM

Author:
Robert Laine alias Sailcuter

establish origine at bottom point 0

establish the baseline as (top point1 - bottom point1)

develop left side of panel by triangulation

develop body of panel by zig-zag triangulation

develop right side of panel

re-align panel with top or bottom edge along X axis

frame the developed panel to be X>0 and Y>0

Definition at line 202 of file panel.cpp.

References bottom, hasHems, left, CVector::norm(), reframe(), right, CMatrix::rot3d(), rotate(), top, CVector3d::x(), and CVector3d::y().

void CPanel::placeLabel (  ) 

Place the label at the center of the panel

Definition at line 335 of file panel.cpp.

References centroid(), label, and CPanelLabel::origin.

CPanel CPanel::reframe ( enumAlign  align  )  const

Reframe a panel such that the most left/right/top/bottom point is at coordinate X or Y =0

Definition at line 344 of file panel.cpp.

References bottom, cutBottom, cutLeft, cutRight, hasHems, left, and right.

Referenced by develop().

CPanel CPanel::rotate ( const CPoint3d p,
const CMatrix m 
) const

end add6Hems ////////////////////////////////////////

Rotates a panel around a point. p = centre of rotation m = rotation matrix

Definition at line 812 of file panel.cpp.

References bottom, cutBottom, cutLeft, cutRight, cutTop, hasHems, label, left, right, CSide::rotate(), CPanelLabel::rotate(), and top.

Referenced by develop(), and CRigWorker::makeRig().

CPanel CPanel::operator+ ( const CVector3d transl  )  const

Performs a 3D translation of the panel by a given vector.

Definition at line 836 of file panel.cpp.

References bottom, cutBottom, cutLeft, cutRight, cutTop, hasHems, label, left, right, and top.

CPanel & CPanel::operator= ( const CPanel p  ) 

Performs an assignment.

Definition at line 859 of file panel.cpp.

References bottom, cutBottom, cutLeft, cutRight, cutTop, hasHems, label, left, right, and top.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ,
const CPanel  
) [friend]

Outputs a CPanel to a stream. exemple: cout << panel[i];

Definition at line 976 of file panel.cpp.


Member Data Documentation

do we have hems added to the panel edges?

Definition at line 170 of file panel.h.

Referenced by add6Hems(), boundingRect(), develop(), CSailPainter::draw(), CSailDoc::get(), operator+(), operator=(), CSailDoc::put(), reframe(), and rotate().


The documentation for this class was generated from the following files:

Generated on Sun Mar 22 21:38:32 2009 for Sailcut CAD by  doxygen 1.5.6