#include <panel.h>
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 |
| CPanel & | operator= (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 &) |
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.
| CRect3d CPanel::boundingRect | ( | ) | const |
| CPoint3d CPanel::centroid | ( | ) | const |
| 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
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
* 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
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 |
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().
| ostream& operator<< | ( | ostream & | , | |
| const CPanel & | ||||
| ) | [friend] |
panel's label
Definition at line 149 of file panel.h.
Referenced by CSailPainter::drawLabels(), operator+(), operator=(), placeLabel(), rotate(), and CSailCarlsonWriter::writePanelHeader().
panel's left side
Definition at line 152 of file panel.h.
Referenced by add6Hems(), boundingRect(), centroid(), CHullWorker::CHullWorker(), develop(), CSailPainter::draw(), CSailPainter::drawMarkers(), CSailDoc::get(), CHullWorker::makeHull(), CRigWorker::makeRig(), operator+(), operator=(), CSailDoc::put(), reframe(), rotate(), CSailDxfWriter3d::writePanel(), CSailDxfWriter2d::writePanel(), CSailCarlsonWriter::writePanel(), and CSailWorker::Zpanel().
panel's right side
Definition at line 154 of file panel.h.
Referenced by add6Hems(), boundingRect(), centroid(), CHullWorker::CHullWorker(), develop(), CSailPainter::draw(), CSailPainter::drawMarkers(), CSailDoc::get(), CHullWorker::makeHull(), CRigWorker::makeRig(), operator+(), operator=(), CSailDoc::put(), reframe(), rotate(), CSailDxfWriter3d::writePanel(), CSailDxfWriter2d::writePanel(), CSailCarlsonWriter::writePanel(), and CSailWorker::Zpanel().
panel's top side
Definition at line 156 of file panel.h.
Referenced by add6Hems(), boundingRect(), centroid(), CHullWorker::CHullWorker(), develop(), CSailPainter::draw(), CSailPainter::drawMarkers(), CSailDoc::get(), CHullWorker::makeHull(), CRigWorker::makeRig(), operator+(), operator=(), CSailDoc::put(), rotate(), CSailDxfWriter3d::writePanel(), CSailDxfWriter2d::writePanel(), CSailCarlsonWriter::writePanel(), and CSailWorker::Zpanel().
panel's bottom side
Definition at line 158 of file panel.h.
Referenced by add6Hems(), boundingRect(), centroid(), CHullWorker::CHullWorker(), develop(), CSailPainter::draw(), CSailPainter::drawMarkers(), CSailDoc::get(), CHullWorker::makeHull(), CRigWorker::makeRig(), operator+(), operator=(), CSailDoc::put(), reframe(), rotate(), CSailDxfWriter3d::writePanel(), CSailDxfWriter2d::writePanel(), CSailCarlsonWriter::writePanel(), and CSailWorker::Zpanel().
panel's cut left side
Definition at line 161 of file panel.h.
Referenced by add6Hems(), boundingRect(), CSailPainter::draw(), CSailDoc::get(), operator+(), operator=(), CSailDoc::put(), reframe(), rotate(), CSailDxfWriter2d::writePanel(), and CSailCarlsonWriter::writePanel().
panel's cut right side
Definition at line 163 of file panel.h.
Referenced by add6Hems(), boundingRect(), CSailPainter::draw(), CSailDoc::get(), operator+(), operator=(), CSailDoc::put(), reframe(), rotate(), CSailDxfWriter2d::writePanel(), and CSailCarlsonWriter::writePanel().
panel's cut top side
Definition at line 165 of file panel.h.
Referenced by add6Hems(), boundingRect(), CSailPainter::draw(), CSailDoc::get(), operator+(), operator=(), CSailDoc::put(), rotate(), CSailDxfWriter2d::writePanel(), and CSailCarlsonWriter::writePanel().
panel's cut bottom side
Definition at line 167 of file panel.h.
Referenced by add6Hems(), boundingRect(), CSailPainter::draw(), CSailDoc::get(), operator+(), operator=(), CSailDoc::put(), reframe(), rotate(), CSailDxfWriter2d::writePanel(), and CSailCarlsonWriter::writePanel().
| bool CPanel::hasHems |
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().
1.5.6