#include <sailworker.h>

Definition at line 47 of file sailworker.h.
| CSailWorker::CSailWorker | ( | const CSailDef & | s | ) |
The constructor does some preliminary calculations to set internal variables.
VC++ 6 pre-SP3 bug if we pass the result of a square root directly, see : MS knowledgebase 217164).
Define foot vector of sail edge.
Define gaff vector of sail edge.
Define fleech vector of sail edge.
Define luff vector of sail edge.
Define mitre vector bisecting foot-leech angle.
Define the unitary vectors perpendicular to foot edge, rotated anti-clockwise.
Define the unitary vectors perpendicular to gaff edge, rotated anti-clockwise.
Define the unitary vectors perpendicular to leech edge, rotated anti-clockwise.
Define the unitary vectors perpendicular to luff edge, rotated anti-clockwise.
Define useful straight lines of edges and mitre.
Define point at intersection of mitre and luff.
Definition at line 35 of file sailworker.cpp.
References clew, EdgeIntersect(), CSailDef::footL, footLine, footV, footVP, CSailDef::foreI, CSailDef::foreJ, CSailDef::gaffDeg, CSailDef::gaffL, gaffLine, gaffV, gaffVP, head, CSailDef::leechL, leechLine, leechV, leechVP, CSubSpace3d::line(), CSailDef::luffL, luffLine, luffV, luffVP, mitreLine, mitreLuffPt, mitreV, peak, CSailDef::rake, CMatrix::rot3d(), CSailDef::sailType, tack, CSailDef::tackX, CSailDef::tackY, CVector::unit(), CVector3d::x(), and CVector3d::y().
| real CSailWorker::Area | ( | ) |
The area of the sail.
Routine for computing the area of the sail taking into account the luff and leech round.
Definition at line 3367 of file sailworker.cpp.
References CVector3d::cross(), CSailDef::footL, footV, CSailDef::gaffL, gaffV, CSailDef::leechL, leechV, CSailDef::luffL, CSailDef::luffR, luffV, and CVector::norm().
Referenced by CFormSailDef::compute().
| real CSailWorker::Diagonal | ( | ) |
The head to clew diagonal length.
Routine for computing the diagonal length from head to clew.
Definition at line 3382 of file sailworker.cpp.
Referenced by CFormSailDef::compute().
| real CSailWorker::IRCwidth | ( | const real & | HL | ) |
The computation of the width as per IRC rule.
Routine for computing the width of the sail at a given relative height on the leech in accordance with IRC rule.
compute the leech edge length LL
Definition at line 3394 of file sailworker.cpp.
References clew, EdgeIntersect(), LeechLength(), leechV, leechVP, luffVP, and Zpoint().
Referenced by CFormSailDef::slotCompute().
| real CSailWorker::SailWidth | ( | const real & | HL | ) |
The computation of the sail width at any height.
Routine for computing the width of the sail at a given relative height on the luff and the leech.
Definition at line 3448 of file sailworker.cpp.
References clew, EdgeIntersect(), LeechLength(), leechV, leechVP, LuffLength(), luffV, luffVP, tack, and Zpoint().
Referenced by CFormSailDef::slotCompute().
| real CSailWorker::LeechLength | ( | const real & | h | ) |
The length of the leech measured along its curved edge.
Routine for computing the actual length of the leech edge up to a given relative heigth on straight leech line.
Definition at line 3555 of file sailworker.cpp.
References clew, EdgeIntersect(), leechV, leechVP, and Zpoint().
Referenced by IRCwidth(), and SailWidth().
| real CSailWorker::LuffLength | ( | const real & | h | ) |
The length of the luff measured along its curved edge.
Routine for computing the actual length of the luff edge up to a given relative heigth on straight luff line.
Definition at line 3582 of file sailworker.cpp.
References EdgeIntersect(), luffV, luffVP, tack, and Zpoint().
Referenced by SailWidth().
| real CSailWorker::SailLP | ( | ) |
The maximum width of the sail perpendicular to the luff.
Routine for computing the perpendicular width of the sail from clew to luff, measured perpendicular to the luff.
Definition at line 3523 of file sailworker.cpp.
References clew, EdgeIntersect(), luffVP, CVector3d::z(), and Zpoint().
Referenced by CFormSailDef::slotCompute().
| CPanelGroup CSailWorker::makeSail | ( | ) | const |
Make a Sail from its definition.
Definition at line 119 of file sailworker.cpp.
| CPanelGroup CSailWorker::makeSail | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const |
Make a Sail from its definition. This is the main routine of all the sail layout work The output is a 3D sail, its display and development versions.
Definition at line 131 of file sailworker.cpp.
References Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), CPanelGroup::placeLabels(), CPanelGroup::plotLabels(), CSailDef::sailCut, CSailDef::sailID, CSailDef::sailType, and CPanelGroup::title.
| CPanelGroup CSailWorker::Layout0 | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Cross cut and Horizontal cut layout of sail's panels.
Creates a Cross cut or horizontal cut sail.
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Lay the panels starting from the foot, going upward to the peak
Go over all the points of current panel and calculate their Z
Develop the current panel
Compute and store the deviation of top edge of the developed panel and straighten this top edge except if this is the top panel
Add the seam and hems allowance
Reposition the developed panel such that the lowest point is Y=0 AND most left point is X=0.
Loop FOR next panel
Create the displays version of the developed sail
Definition at line 192 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), CSailDef::footHemW, footLine, gaffLine, CSubSpace::getdim(), CSubSpace::getp(), head, CRect3d::height(), CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, leechVP, CSubSpace3d::line(), luffLine, luffV, peak, CMatrix::rot3d(), CPanelGroup::rotate(), CSailDef::sailCut, CSailDef::seamW, tack, CVector::unit(), CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPanelGroup CSailWorker::LayoutTwist | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Twist cut layout of sail's panels.
Creates a twist foot cut sail.
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Start laying the panels from foot upward to the peak
Definition at line 564 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), CSailDef::footHemW, footVP, gaffLine, CSubSpace::getdim(), CSubSpace::getp(), head, CRect3d::height(), CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, leechVP, CSubSpace3d::line(), luffLine, luffV, peak, CMatrix::rot3d(), CPanelGroup::rotate(), CSailDef::seamW, tack, CVector::unit(), CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPanelGroup CSailWorker::LayoutVertical | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Vertical cut layout of sail's panels.
Creates a VERTICAL cut sail.
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Lay the panels parallel to the leech, from the leech toward the tack
Definition at line 902 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), CSailDef::footHemW, footLine, gaffLine, gaffV, head, CRect3d::height(), CSailDef::hemsW, CSailDef::leechHemW, leechV, leechVP, CSubSpace3d::line(), luffLine, peak, CMatrix::rot3d(), CSailDef::seamW, tack, CVector::unit(), CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPanelGroup CSailWorker::LayoutRadial | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Radial cut layout of sail's panels.
Creates a radial cut sail.
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Lay the panels from the top section downward to the foot section.
Definition at line 1524 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), CSailDef::footHemW, footLine, footV, gaffLine, gaffV, gaffVP, CSubSpace::getp(), head, CRect3d::height(), CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, CSubSpace3d::line(), luffV, CRect3d::max, CSailDef::nbGores, CSailDef::nbLuffGores, CSailDef::nbSections, peak, CSailDef::seamW, tack, CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPanelGroup CSailWorker::LayoutMitre | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Mitre cut layout of sail's panels perpendicular to leech and foot.
Creates a mitre cut sail with panels perpendicular to Leech and Foot.
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Mitre Hem Width is set at twice the Seam Width.
First Cut the foot panels perpendicular to the foot, starting at the clew and moving toward the tack.
Then lay the leech panels perpendicular to the leech, starting from clew and moving upwards to the peak.
Definition at line 2485 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), CSailDef::footHemW, footLine, footV, footVP, gaffLine, CSubSpace::getdim(), CSubSpace::getp(), head, CRect3d::height(), CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, leechVP, CSubSpace3d::line(), luffLine, luffV, MitreIntersect(), mitreLine, mitreLuffPt, mitreV, peak, CMatrix::rot3d(), CSailDef::seamW, tack, CVector::unit(), CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPanelGroup CSailWorker::LayoutMitre2 | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Mitre 2 cut layout of sail's panels parralel to foot and leech.
Creates a Mitre 2 cut sail with panels Parallel to Leech & Foot.
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Mitre Hem Width is set at twice the Seam Width.
Start by laying the foot panels parallel to the foot, from the foot upward toward the mitre
Then continue by laying the leech panels parallel to the leech, from the leech toward the luff intersection with the mitre.
Definition at line 2950 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), CSailDef::footHemW, footV, footVP, gaffLine, gaffV, CSubSpace::getdim(), CSubSpace::getp(), head, CRect3d::height(), CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, leechVP, CSubSpace3d::line(), luffLine, MitreIntersect(), mitreLine, mitreLuffPt, mitreV, peak, CMatrix::rot3d(), CSailDef::seamW, tack, CVector::unit(), CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPanelGroup CSailWorker::LayoutTriRadial | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Tri Radial cut layout of sail's panels.
Creates a triradial cut sail. //// NOT USED ////
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Lay the panels from top section downward
Definition at line 2027 of file sailworker.cpp.
References CPanelGroup::boundingRect(), clew, CSailDef::clothW, EdgeIntersect(), footV, footVP, gaffLine, gaffV, gaffVP, CSubSpace::getp(), head, CRect3d::height(), CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, CSubSpace3d::line(), luffV, CRect3d::max, CSailDef::nbGores, CSailDef::nbSections, peak, CSailDef::seamW, tack, CVector3d::x(), CVector3d::y(), and Zpanel().
| CPanelGroup CSailWorker::LayoutWing | ( | CPanelGroup & | flatsail, | |
| CPanelGroup & | dispsail | |||
| ) | const [protected] |
The Wing cut layout of sail's panels.
Creates a WING with horizontal cut layout. The panels are layed parrallel to the central line of the wing (horizontal cut)
| flatsail | the CPanelGroup object that will hold the developed sail | |
| dispsail | the CPanelGroup object that will hold the display version of the developed sail |
Position the seams starting from the centre of the wing (foot)
Create the symetrical panels
Prepare the displays version of the developed sail
Definition at line 1154 of file sailworker.cpp.
References clew, CSailDef::clothW, CSailDef::dihedralDeg, EdgeIntersect(), CSailDef::footHemW, footLine, gaffLine, CSubSpace::getdim(), CSubSpace::getp(), head, CSailDef::hemsW, CSubSpace::intersect(), CSailDef::leechHemW, leechV, leechVP, CSubSpace3d::line(), luffLine, luffV, peak, CMatrix::rot3d(), CPanelGroup::rotate(), CSailDef::seamW, tack, CVector::unit(), CVector3d::x(), CVector3d::y(), and Zpanel().
Referenced by makeSail().
| CPoint3d CSailWorker::EdgeIntersect | ( | const enumEdgeType & | Edge, | |
| const CPoint3d & | pt1, | |||
| const CVector3d & | v1 | |||
| ) | const [protected] |
The intersection of a line defined by a point and a vector with an edge.
Routine used for computing the point position on a sail curved edge. Return a 3D point which is the intersection of the vector v1 passing by pt1 point inside sail area with the Edge curve.
Definition at line 3649 of file sailworker.cpp.
References clew, CSubSpace::getdim(), CSubSpace::getp(), head, CSubSpace::intersect(), CSubSpace3d::line(), CSailDef::luffR, CSailDef::luffRP, CVector::norm(), peak, CMatrix::rot3d(), tack, and CVector::unit().
Referenced by AftIntersect(), CSailWorker(), FwdIntersect(), IRCwidth(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), LeechLength(), LuffLength(), SailLP(), and SailWidth().
The horizontal intersection with forward edge.
Routine used for computing the forward end of the cord of the profile. Return a 3d point which is the forward intersection of the horizontal line passing by p1 with either foot, luff or gaff.
Definition at line 3607 of file sailworker.cpp.
References EdgeIntersect(), head, peak, tack, CVector3d::x(), CVector3d::y(), and CVector3d::z().
Referenced by Zpoint().
The horizontal intersection with aft edge.
Routine used for computing the cord of the profiles. Return a 3d point which is the aft intersection of the horizontal line passing by p1 with the leech. If the point p1 is above or below the leech segment then the aft intersection is forced to be on the vertical of the corresponding peak or clew.
Definition at line 3335 of file sailworker.cpp.
References clew, EdgeIntersect(), peak, CVector3d::x(), CVector3d::y(), and CVector3d::z().
Referenced by Zpoint().
| CPoint3d CSailWorker::MitreIntersect | ( | const CPoint3d & | pt1, | |
| const CVector3d & | v1 | |||
| ) | const [protected] |
The intersection of a line defined by a point and a vector with the mitre line.
Routine used for computing the intersection with mitre line. Return a 3d point which is the intersection of the vector v1 passing by pt1 point with the mitre line.
Definition at line 3776 of file sailworker.cpp.
References clew, CSubSpace::getdim(), CSubSpace::getp(), CSubSpace::intersect(), CSubSpace3d::line(), mitreLine, and CVector::norm().
Referenced by LayoutMitre(), and LayoutMitre2().
The depth of the sail at a point.
Routine used for computing the Z of a point of the sail. Return a 3D point which is the input point p1 with its Z modified.
Definition at line 3807 of file sailworker.cpp.
References AftIntersect(), clew, FwdIntersect(), head, CSailMould::interpol(), leechV, CSailDef::mould, peak, CSailDef::sheetDeg, tack, CSailDef::twistDeg, CVector3d::x(), CVector3d::y(), CVector3d::z(), and CProfile::z().
Referenced by IRCwidth(), LeechLength(), LuffLength(), SailLP(), SailWidth(), and Zpanel().
The depth of the sail at all points of a panel.
Routine used for computing the Z of all the points of a panel. Returns a CPanel with all its points Z's modified.
Definition at line 3874 of file sailworker.cpp.
References CPanel::bottom, CPanel::left, CPanel::right, CPanel::top, and Zpoint().
Referenced by Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), and LayoutWing().
The Tack 3D point.
Definition at line 71 of file sailworker.h.
Referenced by CSailWorker(), EdgeIntersect(), FwdIntersect(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), LuffLength(), SailWidth(), CFormSailDef::slotCompute(), and Zpoint().
The Head 3D point.
Definition at line 73 of file sailworker.h.
Referenced by CSailWorker(), Diagonal(), EdgeIntersect(), FwdIntersect(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), CFormSailDef::slotCompute(), and Zpoint().
The Peak 3D point.
Definition at line 75 of file sailworker.h.
Referenced by AftIntersect(), CSailWorker(), EdgeIntersect(), FwdIntersect(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), CFormSailDef::slotCompute(), and Zpoint().
The Clew 3D point.
Definition at line 77 of file sailworker.h.
Referenced by AftIntersect(), CSailWorker(), Diagonal(), EdgeIntersect(), IRCwidth(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), LeechLength(), MitreIntersect(), SailLP(), SailWidth(), CFormSailDef::slotCompute(), and Zpoint().
enumEdgeType CSailWorker::Edge [protected] |
The type of sail Edge for an intersection.
Definition at line 98 of file sailworker.h.
CPoint3d CSailWorker::mitreLuffPt [protected] |
The mitre intersection point with luff.
Definition at line 109 of file sailworker.h.
Referenced by CSailWorker(), LayoutMitre(), and LayoutMitre2().
CVector3d CSailWorker::footV [protected] |
Foot vector.
Definition at line 117 of file sailworker.h.
Referenced by Area(), CSailWorker(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), and LayoutTriRadial().
CVector3d CSailWorker::footVP [protected] |
Unitary vector perpendicular to foot.
Definition at line 119 of file sailworker.h.
Referenced by CSailWorker(), LayoutMitre(), LayoutMitre2(), LayoutTriRadial(), and LayoutTwist().
CVector3d CSailWorker::gaffV [protected] |
Gaff vector.
Definition at line 121 of file sailworker.h.
Referenced by Area(), CSailWorker(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), and LayoutVertical().
CVector3d CSailWorker::gaffVP [protected] |
Unitary vector perpendicular to gaff.
Definition at line 123 of file sailworker.h.
Referenced by CSailWorker(), LayoutRadial(), and LayoutTriRadial().
CVector3d CSailWorker::leechV [protected] |
Leech vector.
Definition at line 125 of file sailworker.h.
Referenced by Area(), CSailWorker(), IRCwidth(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), LayoutWing(), LeechLength(), SailWidth(), and Zpoint().
CVector3d CSailWorker::leechVP [protected] |
Unitary vector perpendicular to leech.
Definition at line 127 of file sailworker.h.
Referenced by CSailWorker(), IRCwidth(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutTwist(), LayoutVertical(), LayoutWing(), LeechLength(), and SailWidth().
CVector3d CSailWorker::luffV [protected] |
Luff vector.
Definition at line 129 of file sailworker.h.
Referenced by Area(), CSailWorker(), Layout0(), LayoutMitre(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutWing(), LuffLength(), and SailWidth().
CVector3d CSailWorker::luffVP [protected] |
Unitary vector perpendicular to luff.
Definition at line 131 of file sailworker.h.
Referenced by CSailWorker(), IRCwidth(), LuffLength(), SailLP(), and SailWidth().
CVector3d CSailWorker::mitreV [protected] |
Mitre vector.
Definition at line 133 of file sailworker.h.
Referenced by CSailWorker(), LayoutMitre(), and LayoutMitre2().
CSubSpace CSailWorker::footLine [protected] |
The foot straight 3D line.
Definition at line 136 of file sailworker.h.
Referenced by CSailWorker(), Layout0(), LayoutMitre(), LayoutRadial(), LayoutVertical(), and LayoutWing().
CSubSpace CSailWorker::gaffLine [protected] |
The gaff straight 3D line.
Definition at line 138 of file sailworker.h.
Referenced by CSailWorker(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutRadial(), LayoutTriRadial(), LayoutTwist(), LayoutVertical(), and LayoutWing().
CSubSpace CSailWorker::leechLine [protected] |
The leech straight 3D line.
Definition at line 140 of file sailworker.h.
Referenced by CSailWorker().
CSubSpace CSailWorker::luffLine [protected] |
The luff straight 3D line.
Definition at line 142 of file sailworker.h.
Referenced by CSailWorker(), Layout0(), LayoutMitre(), LayoutMitre2(), LayoutTwist(), LayoutVertical(), and LayoutWing().
CSubSpace CSailWorker::mitreLine [protected] |
The mitre straight 3D line.
Definition at line 144 of file sailworker.h.
Referenced by CSailWorker(), LayoutMitre(), LayoutMitre2(), and MitreIntersect().
1.5.6