447 lines
40 KiB
HTML
447 lines
40 KiB
HTML
<html><head><title>Macro Half-Hull Model</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Macro Half-Hull Model</h1></div>
|
|
|
|
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><table class="fcinfobox wikitable ct" width="100%" style="float: right; width: 230px; margin-left: 10px;">
|
|
<tr>
|
|
<td class="ctTitle">
|
|
<h3><span class="mw-headline" id="Macro_Half-Hull_Model"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half_Hull_Model.png" class="image"><img alt="Macro Half Hull Model.png" src="32px-Macro_Half_Hull_Model.png" width="32" height="32" srcset="/wiki/images/thumb/4/44/Macro_Half_Hull_Model.png/48px-Macro_Half_Hull_Model.png 1.5x, /wiki/images/4/44/Macro_Half_Hull_Model.png 2x" /></a> Macro Half-Hull Model</span></h3>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Description
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven left macro-description">This macro generates both three dimensional half-hull and full-hull models from a series of 2D line drawings.
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Author
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven macro-author"><a href="https://www.freecadweb.org/wiki/index.php?title=User:Piffpoof" title="User:Piffpoof">Piffpoof</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Links
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven"><a href="Macros_recipes.html" title="Macros recipes">Macros recipes</a><br /><a href="How_to_install_macros.html" title="How to install macros">How to install macros</a><br /><a href="Customize_Toolbars.html" title="Customize Toolbars">How to customize toolbars</a>
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Version
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven macro-version">1.0
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">Date last modification
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctEven macro-date">2016-01-25
|
|
</td></tr>
|
|
<tr>
|
|
<th class="ctOdd">
|
|
</th></tr>
|
|
<tr>
|
|
<td class="ctToc"><br /><div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
|
|
<ul>
|
|
<li class="toclevel-1"><a href="#Macro_Half-Hull_Model"><span class="tocnumber">1</span> <span class="toctext">Macro Half-Hull Model</span></a></li>
|
|
<li class="toclevel-1 tocsection-1"><a href="#Background"><span class="tocnumber">2</span> <span class="toctext">Background</span></a></li>
|
|
<li class="toclevel-1 tocsection-2"><a href="#Description"><span class="tocnumber">3</span> <span class="toctext">Description</span></a></li>
|
|
<li class="toclevel-1 tocsection-3"><a href="#Installation"><span class="tocnumber">4</span> <span class="toctext">Installation</span></a></li>
|
|
<li class="toclevel-1 tocsection-4"><a href="#Usage"><span class="tocnumber">5</span> <span class="toctext">Usage</span></a>
|
|
<ul>
|
|
<li class="toclevel-2 tocsection-5"><a href="#Create_the_Stemline"><span class="tocnumber">5.1</span> <span class="toctext">Create the Stemline</span></a></li>
|
|
<li class="toclevel-2 tocsection-6"><a href="#Create_the_Cross-section_Sketch.28es.29"><span class="tocnumber">5.2</span> <span class="toctext">Create the Cross-section Sketch(es)</span></a></li>
|
|
<li class="toclevel-2 tocsection-7"><a href="#Create_the_Transom_Sketch_in_the_XY_Plane"><span class="tocnumber">5.3</span> <span class="toctext">Create the Transom Sketch in the XY Plane</span></a></li>
|
|
</ul>
|
|
</li>
|
|
<li class="toclevel-1 tocsection-8"><a href="#User_Interface"><span class="tocnumber">6</span> <span class="toctext">User Interface</span></a></li>
|
|
<li class="toclevel-1 tocsection-9"><a href="#Options"><span class="tocnumber">7</span> <span class="toctext">Options</span></a></li>
|
|
<li class="toclevel-1 tocsection-10"><a href="#Sample_Files"><span class="tocnumber">8</span> <span class="toctext">Sample Files</span></a></li>
|
|
<li class="toclevel-1 tocsection-11"><a href="#Remarks"><span class="tocnumber">9</span> <span class="toctext">Remarks</span></a></li>
|
|
<li class="toclevel-1 tocsection-12"><a href="#Known_Problems"><span class="tocnumber">10</span> <span class="toctext">Known Problems</span></a></li>
|
|
<li class="toclevel-1 tocsection-13"><a href="#Future_Possibilities"><span class="tocnumber">11</span> <span class="toctext">Future Possibilities</span></a></li>
|
|
<li class="toclevel-1 tocsection-14"><a href="#Glossary"><span class="tocnumber">12</span> <span class="toctext">Glossary</span></a></li>
|
|
<li class="toclevel-1 tocsection-15"><a href="#Links"><span class="tocnumber">13</span> <span class="toctext">Links</span></a></li>
|
|
<li class="toclevel-1 tocsection-16"><a href="#Script"><span class="tocnumber">14</span> <span class="toctext">Script</span></a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</td></tr>
|
|
</table>
|
|
<p><br />
|
|
</p><p>This macro makes simple models of the hulls of boats and ships. It is intended to aid people modeling or designing hulls by providing the hull surface in a straight forward and timely fashion so they can avoid the time consuming full process.
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelScreenBoatInABottle.jpg" class="image"><img alt="Macro Half-Hull ModelScreenBoatInABottle.jpg" src="Macro_Half-Hull_ModelScreenBoatInABottle.jpg" width="550" height="323" /></a>
|
|
</p>
|
|
<h2><span class="mw-headline" id="Background">Background</span></h2>
|
|
<p>Since antiquity boat builders have had to design boats and then realise them in a three dimensional environment where very few lines are straight, very few surfaces flat and no angles constant over a distance. Hull models were used to make to-scale models which could then be used to review the design or communicate concepts to other persons. The laws of hydrodynamics demand that any vessel passing through a liquid be symmetrical in the cross-section if it is to track (move in a straight line) accurately. Consequently building one side of the hull in the model was all that was necessary - if the half-hull was perfect then its mirror image would also be perfect. In latter years half-hulls became used for symbolic purposes such as plaques, and nautical art.
|
|
</p><p>This code came out of a project to build a model in FreeCAD of a 12.5 metre sailing boat. The builders no longer had drawings and the son of the original owner doubted there ever were full drawings. Consequently the hull dimensions had to be measured and then a model constructed within the software, Modern software packages like FreeCAD offer many beneficial features like symmetry constraints but when the final measurement is a model that is "easy on the eye", much "massaging" of models is required. This code was written to help automate that process.
|
|
</p><p>The initial purpose of this code was to provide a symmetrical hull which was malleable so it could be fitted to the 3D model being constructed. As the software progressed it was generalised so hopefully it would be of some use to persons:
|
|
</p>
|
|
<ul><li> boat designers producing boat diagrams which can be built from</li>
|
|
<li> boat builders who are trying to model what is described on their diagrams</li>
|
|
<li> model hull builders.</li></ul>
|
|
<p>Certainly commercial boat designers have all sorts of high end software to assist their work, this isn't supposed to replace that. Rather this is for the hobbyist or home builder to tinker around with.
|
|
</p><p>Nautical blueprints have a distinct history with respect to buildings and so are somewhat different in presentation. This is an example of a sailing boat which is more than a century old:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage0.jpg" class="image"><img alt="Macro Half-Hull ModelImage0.jpg" src="Macro_Half-Hull_ModelImage0.jpg" width="500" height="280" /></a>
|
|
</p><p>One of the end goals of this software is to use the Draft workbench to generate some of these diagrams using the model to generate the lines.
|
|
</p><p><b>Note on Units in FreeCAD:</b>
|
|
</p><p>At present there isn't really any units management system within FreeCAD, but obviously a boat builder or modeller will need an accurate dimensioning system. To use this macro, decide to set the FreeCAD grid size to what ever is appropriate for your work (e.g. mm, cm, inch, foot). FreeCAD is consistent, one FreeCAD unit will constantly equal to one FreeCAD unit. And if you have decided to have a FreeCAD unit equal a specific physical length, then your drawings will remain consistently dimensioned. At present there is work on a units system for FreeCAD so this situation may change soon.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Description">Description</span></h2>
|
|
<p>For this macro the hull shapes are defined by a minimum of 3 FreeCAD Sketches: one in the YZ plane, one or more in the XZ plane, one in the XY plane. Here is the minimum hull supported by this macro, it has only 3 Sketches:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage1.jpg" class="image"><img alt="Macro Half-Hull ModelImage1.jpg" src="Macro_Half-Hull_ModelImage1.jpg" width="500" height="384" /></a>
|
|
</p><p><b>Note</b>: in the above diagram we are looking directly at the stern, the bow is pointing away from the viewpoint.
|
|
</p><p>From front to back (bow to stern) the 3 Sketches are:
|
|
</p>
|
|
<table style="width: 500px" border="1">
|
|
<tr>
|
|
<td>stemline<br />
|
|
</td>
|
|
<td>YZ plane<br />
|
|
</td>
|
|
<td>red line in sketch<br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>cross-section<br />
|
|
</td>
|
|
<td>XZ plane<br />
|
|
</td>
|
|
<td>green line in Sketch<br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>transom<br />
|
|
</td>
|
|
<td>XY plane<br />
|
|
</td>
|
|
<td>blue line in Sketch<br />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<p><br />
|
|
Perhaps it is easier to see with 7 Sketches (one in YZ plane, one in XY plane and 5 in the XZ plane):
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage2.jpg" class="image"><img alt="Macro Half-Hull ModelImage2.jpg" src="Macro_Half-Hull_ModelImage2.jpg" width="500" height="323" /></a>
|
|
</p><p>With 5 Sketches in the XZ plane it is becoming easier to perceive the shape of the hull. The next 2 pictures show the Sketch lines superimposed on the model FreeCAD constructs,
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage3.jpg" class="image"><img alt="Macro Half-Hull ModelImage3.jpg" src="Macro_Half-Hull_ModelImage3.jpg" width="500" height="399" /></a>
|
|
</p><p>the second is the same model rotated 90 degrees so the bow is in the foreground:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage3a.jpg" class="image"><img alt="Macro Half-Hull ModelImage3a.jpg" src="Macro_Half-Hull_ModelImage3a.jpg" width="500" height="332" /></a>
|
|
</p><p>Some points to consider:
|
|
</p>
|
|
<ul><li> the Sketches are only for:
|
|
<ul><li> the stemline (or bow line) in the YZ plane (red in the above diagram);</li>
|
|
<li> the top of the transom in the XY plane (blue in the above diagram);</li>
|
|
<li> multiple cross-sections of the hull in the XZ plane (green in the above diagram)</li></ul></li>
|
|
<li> only the starboard side of the hull is drawn in the Sketches, the port side will be generated as a mirror image</li>
|
|
<li> each multiple-segment line must be in a separate Sketch</li>
|
|
<li> each Sketch must have the same number of line segments (which is 3 in the previous examples)</li>
|
|
<li> the more line segments in each Sketch, the closer the FreeCAD generated model will approximate a curved hull</li>
|
|
<li> there is no limit to the number of line segment in each Sketch, any number from one up</li>
|
|
<li> there is no limit to the number of Sketches in the XZ plane (i.e. cross-sections), any number from one up</li></ul>
|
|
<p>With enough Sketches the model generated may even approach:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage4.jpg" class="image"><img alt="Macro Half-Hull ModelImage4.jpg" src="Macro_Half-Hull_ModelImage4.jpg" width="500" height="175" /></a>
|
|
</p><p>The HalfHull macro generates 4 models:
|
|
</p>
|
|
<ul><li> starboard half-hull</li>
|
|
<li> port half-hull</li>
|
|
<li> complete hull</li>
|
|
<li> bulkheads for the complete hull, either with a flush deck or with a coachhouse</li></ul>
|
|
<p>These models are all output in the unified location space of FreeCAD so they can be fitted together - for example the bulkheads can be inserted into the complete hull seamlessly. This is a picture of bulkheads in a boat model during construction:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage5.jpg" class="image"><img alt="Macro Half-Hull ModelImage5.jpg" src="Macro_Half-Hull_ModelImage5.jpg" width="428" height="320" /></a>
|
|
</p><p>As well as the bulkheads generated by the macro (note that these bulkheads are for a coachhouse rather than a flush deck):
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage6.jpg" class="image"><img alt="Macro Half-Hull ModelImage6.jpg" src="Macro_Half-Hull_ModelImage6.jpg" width="465" height="325" /></a>
|
|
</p><p>The composite image below shows the main outputs from this software (the port side half-hull is actually not shown but it is the mirror of the starboard half-hull which is shown). The outputs are in clockwise order from the upper left corner:
|
|
</p>
|
|
<ul><li> starboard half-hull</li>
|
|
<li> complete hull</li>
|
|
<li> bulkheads (for flush deck, the bulkheads in the previous image were for a coachhouse deck)</li>
|
|
<li> the complete hull with the bulkheads inserted</li></ul>
|
|
<p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage7.jpg" class="image"><img alt="Macro Half-Hull ModelImage7.jpg" src="Macro_Half-Hull_ModelImage7.jpg" width="500" height="400" /></a>
|
|
</p><p>As novelty features, the macro will also optionally produce plaques for the half-hulls, and even a bottle for the complete hull:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage8.jpg" class="image"><img alt="Macro Half-Hull ModelImage8.jpg" src="Macro_Half-Hull_ModelImage8.jpg" width="500" height="136" /></a>
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelImage9.jpg" class="image"><img alt="Macro Half-Hull ModelImage9.jpg" src="Macro_Half-Hull_ModelImage9.jpg" width="500" height="335" /></a>
|
|
</p>
|
|
<h2><span class="mw-headline" id="Installation">Installation</span></h2>
|
|
<p>All the code for halfHullModel.FCMacro is in one macro. So installation is comprised of copying the code to the appropriate Macro directory and invoking the Build Utility from the Macro menu, the Python console or a toolbar button (the preferred method).
|
|
</p>
|
|
<ul><li> see <a href="How_to_install_macros.html" title="How to install macros">How to install macros</a> for information on how to install this macro code</li>
|
|
<li> see <a href="Customize_Toolbars.html" title="Customize Toolbars">Customize Toolbars</a> for information how to install as a button on a toolbar</li></ul>
|
|
<h2><span class="mw-headline" id="Usage">Usage</span></h2>
|
|
<p>The FreeCAD operations involved in generating the hull model are rather complex and numerous. Things like the direction a line is drawn can cause the FreeCAD construction of the hull to either abort or turn out like:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUsage1.jpg" class="image"><img alt="Macro Half-Hull ModelUsage1.jpg" src="Macro_Half-Hull_ModelUsage1.jpg" width="445" height="397" /></a>
|
|
</p><p>Consequently the steps below need to be followed closely. The macro does allow for certain data inconsistencies but generally if the data (i.e. the Sketches) are incorrect then the output will look like a cheese grater or the macro fill fail with an error.
|
|
</p><p>The following instructions refer to the quadrants of the XY graph, this refers to the 4 quarters of the XY graph and they are labelled as follows:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUsage2.jpg" class="image"><img alt="Macro Half-Hull ModelUsage2.jpg" src="Macro_Half-Hull_ModelUsage2.jpg" width="294" height="285" /></a>
|
|
</p><p><b>Create a New Document</b>
|
|
</p><p>The very first thing is to create a new document in FreeCAD <a href="https://www.freecadweb.org/wiki/index.php?title=File:Document-new.svg" class="image"><img alt="Document-new.svg" src="Document-new.svg" width="24" height="24" /></a>. This document will hold all the Sketches that make up your hull definition.
|
|
</p>
|
|
<h3><span class="mw-headline" id="Create_the_Stemline">Create the Stemline</span></h3>
|
|
<p>The first step is one of creating data for the hull model to be made from. The data is supplied in the form of Sketches within FreeCAD. After the hull model is generated, if changes are to be made then the Sketches are simply edited, and the second step of running the macro repeatedly.
|
|
</p>
|
|
<ol><li> create a new sketch <a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_NewSketch.svg" class="image"><img alt="Sketcher NewSketch.svg" src="Sketcher_NewSketch.svg" width="24" height="24" /></a>, in the YZ-Plane </li>
|
|
<li> start at origin (0,0) and draw upwards into Quadrant I<br /><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUsage3.jpg" class="image"><img alt="Macro Half-Hull ModelUsage3.jpg" src="Macro_Half-Hull_ModelUsage3.jpg" width="500" height="555" /></a></li>
|
|
<li> the bottom end of the stemline is at the origin (0,0) - this will be the point from where the placement of all the cross-sections and transom will be made</li>
|
|
<li> the number of line segments in this Sketch determines the number which will be required in each other Sketch</li>
|
|
<li> save sketch <a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_LeaveSketch.svg" class="image"><img alt="Sketcher LeaveSketch.svg" src="Sketcher_LeaveSketch.svg" width="24" height="24" /></a></li>
|
|
<li> for ease of identification it is probably worth naming the Sketch something like "stemline sketch"</li></ol>
|
|
<h3><span class="mw-headline" id="Create_the_Cross-section_Sketch.28es.29">Create the Cross-section Sketch(es)</span></h3>
|
|
<ol><li> create a new sketch <a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_NewSketch.svg" class="image"><img alt="Sketcher NewSketch.svg" src="Sketcher_NewSketch.svg" width="24" height="24" /></a>, in the XZ-Plane</li>
|
|
<li> the following dialog will appear:<br /><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelScreenSnapshot1.jpg" class="image"><img alt="Macro Half-Hull ModelScreenSnapshot1.jpg" src="Macro_Half-Hull_ModelScreenSnapshot1.jpg" width="239" height="250" /></a><br />The dialog is asking how far from the origin the Sketch should be placed. This will refer to how far the cross-section is from the bottom of the stemline (which was placed at (0,0)). The cross-sections can be equally spaced but need not be. The forward-most cross-section will be at Y=0 (i.e. the origin where the stemline bottom ends) or at Y<=0. The cross-sections will be at increasingly negative Y values until the transom is at the most negative Y value. In the example above, the cross-section Sketch will be placed 50 FreeCAD units from the origin on the negative Y axis.</li>
|
|
<li>start on the Y axis and draw upwards into Quadrant I<br />- the first (i.e. foremost) cross-section should start at origin (0,0) (or it will look odd as the stemline ends at 0,0) but other cross-sections need only start on the Y axis.<br /><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUsage3.jpg" class="image"><img alt="Macro Half-Hull ModelUsage3.jpg" src="Macro_Half-Hull_ModelUsage3.jpg" width="500" height="555" /></a></li>
|
|
<li>use the same number of line segments as in the Stemline Sketch</li>
|
|
<li> save sketch <a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_LeaveSketch.svg" class="image"><img alt="Sketcher LeaveSketch.svg" src="Sketcher_LeaveSketch.svg" width="24" height="24" /></a></li>
|
|
<li>repeat as this step necessary, it may be quicker to copy this sketch and then space the copies on the Y-axis, modifications may be made to the individual Sketches as required</li>
|
|
<li>for naming, it will make things easier to give some sort of sequence to the cross-sections, starting at the bow (i.e. the stemline) and increasing towards the stern (i.e. the transom)</li></ol>
|
|
<h3><span class="mw-headline" id="Create_the_Transom_Sketch_in_the_XY_Plane">Create the Transom Sketch in the XY Plane</span></h3>
|
|
<ol><li>create a new sketch <a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_NewSketch.svg" class="image"><img alt="Sketcher NewSketch.svg" src="Sketcher_NewSketch.svg" width="24" height="24" /></a>, in the XY-Plane</li>
|
|
<li>start on the Y axis between quadrant III and IV, and draw upwards into Quadrant IV so that the end point is coincident with the rightmost point of the lowest cross-section Sketch in the YZ-plane<br /><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUsage4.jpg" class="image"><img alt="Macro Half-Hull ModelUsage4.jpg" src="Macro_Half-Hull_ModelUsage4.jpg" width="500" height="315" /></a></li>
|
|
<li>use the same number of line segments as in the stemline Sketch</li>
|
|
<li> save sketch <a href="https://www.freecadweb.org/wiki/index.php?title=File:Sketcher_LeaveSketch.svg" class="image"><img alt="Sketcher LeaveSketch.svg" src="Sketcher_LeaveSketch.svg" width="24" height="24" /></a></li>
|
|
<li>for ease of identification it is probably worth naming the Sketch something like "transom sketch"</li></ol>
|
|
<p><b>Save the New Document</b>
|
|
</p><p>Now save the document <a href="https://www.freecadweb.org/wiki/index.php?title=File:Document-save.svg" class="image"><img alt="Document-save.svg" src="Document-save.svg" width="24" height="24" /></a> which contains the Sketches that will define the hull shape, giving it some name that is descriptive
|
|
</p><p>Once the Sketches have all been created and positioned, the document should look like this from the top view <a href="https://www.freecadweb.org/wiki/index.php?title=File:View-top.svg" class="image"><img alt="View-top.svg" src="View-top.svg" width="24" height="24" /></a>:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUsage5.jpg" class="image"><img alt="Macro Half-Hull ModelUsage5.jpg" src="Macro_Half-Hull_ModelUsage5.jpg" width="500" height="605" /></a>
|
|
</p><p>The principal limitations for constructing the model are:
|
|
</p>
|
|
<ul><li> the stemline bottom should end at (0,0)</li>
|
|
<li> the bottom centremost end of each cross-section should end at the Y axis - note that it can have any Z value</li></ul>
|
|
<p>This concludes the first step which is one of creating the data which the macro will use to create both half-hulls and complete-hulls. The second step is described in the following section which is titled User Interface
|
|
</p>
|
|
<h2><span class="mw-headline" id="User_Interface">User Interface</span></h2>
|
|
<p>In this step the macro will gather some information from the user and then process the input Sketches to generate the desired hull models. This is the only GUI image for the macro and is primarily configuration details for the production of the hull models from the Sketches:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelScreenSnapshot2.jpg" class="image"><img alt="Macro Half-Hull ModelScreenSnapshot2.jpg" src="Macro_Half-Hull_ModelScreenSnapshot2.jpg" width="500" height="361" /></a>
|
|
</p><p>The choices on the GUI window are:
|
|
</p>
|
|
<ul><li> Starboard half-hull<br />- checking this will cause the macro to produce a starboard half-hull model
|
|
<ul><li>Mounting plaque<br />- if checked the macro will mount the half-hull on a plaque
|
|
<ul><li>Allow space for keel<br />- if checked will cause the half hull to be mounted higher on the plaque than the centre position, this is so a separately generated keel could be placed below the hull</li></ul></li></ul></li>
|
|
<li> Port half-hull<br />- checking this will cause the macro to produce a port half-hull model
|
|
<ul><li> Mounting plaque<br />- if checked the macro will mount the half-hull on a plaque
|
|
<ul><li>Allow space for keel<br />- if checked will cause the half hull to be mounted higher on the plaque than the centre position, this is so a separately generated keel could be placed below the hull</li></ul></li></ul></li>
|
|
<li> Complete hull<br />- checking this will cause the macro to produce a complete model
|
|
<ul><li> Bottle for complete hull<br />- if checked the macro will place the complete hull inside a transparent bottle (complete with cork)
|
|
<ul><li>Allow space for keel<br />- if checked will cause the half hull to be positioned higher in the bottle than the centre position, this is so a separately generated keel could be placed below the hull</li></ul></li></ul></li>
|
|
<li> Bulkheads for flush deck<br />- checking this will cause the macro to produce bulkheads whose tops are level with the top of the hull, bulkheads will not be generated for the most forward 2 cross-sections or the aft-most 2 cross-sections</li>
|
|
<li> Bulkheads for coachhouse<br />- checking this will cause the macro to produce bulkheads whose tops are possibly above the top of the hull.
|
|
<ul><li> Bulkheads to skip at bow determines how many cross-sections will be left without a bulkhead at the bow</li>
|
|
<li> Bulkheads to skip at stern determines how many cross-sections will be left without a bulkhead at the stern</li></ul></li>
|
|
<li> The dimensions of the top of the bulkheads will be configured as per the following diagram:<br /><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelUi1.jpg" class="image"><img alt="Macro Half-Hull ModelUi1.jpg" src="Macro_Half-Hull_ModelUi1.jpg" width="500" height="336" /></a></li>
|
|
<li> Cancel button<br />- the execution is halted and the window closes</li>
|
|
<li> Re-Use Last File button<br />- the execution uses the data file AND SETTINGS from the the last run, any changes to settings are ignored</li>
|
|
<li> Select File button<br />- the standard Open File window is opened where the user can either select a file or Cancel and exit</li></ul>
|
|
<p>When the macro runs it takes configuring data from the user and then reads Sketcher sketches in the selected input file.
|
|
</p><p><b>Note</b>: As the macro works through the Sketches it prints out any exceptions as well as some milestones on the Report View. If you get unexpected results or some parts are missing, that is probably the first place to check.
|
|
</p>
|
|
<h2><span class="mw-headline" id="Options">Options</span></h2>
|
|
<p>There are various types of bows and sterns for boats, with sterns having much more variety than bows. Here are examples of transoms and bows from the real world alongside the similar macro output:
|
|
</p><p><b>Sheer Stern</b>
|
|
</p><p>Probably the most common stern, typical of all sizes of vessels from commercial ships through to rowing boats.
|
|
</p>
|
|
<table style="width: 500pix" border="0">
|
|
<tr>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption1.jpg" class="image"><img alt="Macro Half-Hull ModelOption1.jpg" src="Macro_Half-Hull_ModelOption1.jpg" width="200" height="150" /></a></td>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption2.jpg" class="image"><img alt="Macro Half-Hull ModelOption2.jpg" src="Macro_Half-Hull_ModelOption2.jpg" width="200" height="200" /></a></td>
|
|
</tr>
|
|
</table>
|
|
<ul><li> the XY transom should be as close to the aftmost cross-section as is possible.</li></ul>
|
|
<p><b>Sugar-Scoop Stern</b>
|
|
</p><p>Most likely to be found on a sailing yacht, it is a product of designing to maximise the length of the waterline to benefit from class rules for racing under sail.
|
|
</p>
|
|
<table style="width: 500pix" border="0">
|
|
<tr>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption3.jpg" class="image"><img alt="Macro Half-Hull ModelOption3.jpg" src="Macro_Half-Hull_ModelOption3.jpg" width="200" height="150" /></a></td>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption4.jpg" class="image"><img alt="Macro Half-Hull ModelOption4.jpg" src="Macro_Half-Hull_ModelOption4.jpg" width="200" height="200" /></a></td>
|
|
</tr>
|
|
</table>
|
|
<ul><li> place the aftmost 2 cross-sections as close as is feasible, then rotate the aftmost of the two through to an angle of 45 degrees (or whatever is called for) around the X-axis</li></ul>
|
|
<p><b>Canoe Stern</b>
|
|
</p><p>Found on all sizes of water craft, power and sail, pleasure and commercial.
|
|
</p>
|
|
<table style="width: 500pix" border="0">
|
|
<tr>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption5.jpg" class="image"><img alt="Macro Half-Hull ModelOption5.jpg" src="Macro_Half-Hull_ModelOption5.jpg" width="200" height="201" /></a></td>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption6.jpg" class="image"><img alt="Macro Half-Hull ModelOption6.jpg" src="Macro_Half-Hull_ModelOption6.jpg" width="200" height="152" /></a></td>
|
|
</tr>
|
|
</table>
|
|
<ul><li> place the aftmost 2 cross-sections as close as is feasible, then rotate the aftmost of the two through to an angle of 45 degrees around the X-axis</li></ul>
|
|
<p><b>Normal Bow</b>
|
|
</p><p>There is a lot less variety in bow shapes than with transoms:
|
|
</p>
|
|
<table style="width: 500pix" border="0">
|
|
<tr>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption7.jpg" class="image"><img alt="Macro Half-Hull ModelOption7.jpg" src="Macro_Half-Hull_ModelOption7.jpg" width="200" height="207" /></a></td>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption8.jpg" class="image"><img alt="Macro Half-Hull ModelOption8.jpg" src="Macro_Half-Hull_ModelOption8.jpg" width="200" height="183" /></a></td>
|
|
</tr>
|
|
</table>
|
|
<p><b>Trireme Bow</b>
|
|
</p><p>Although not seen very frequently in the last 2 millenia, this was once the definitive bow profile for war-making vessels:
|
|
</p>
|
|
<table style="width: 500pix" border="0">
|
|
<tr>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption9.jpg" class="image"><img alt="Macro Half-Hull ModelOption9.jpg" src="Macro_Half-Hull_ModelOption9.jpg" width="200" height="203" /></a></td>
|
|
<td><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelOption10.jpg" class="image"><img alt="Macro Half-Hull ModelOption10.jpg" src="Macro_Half-Hull_ModelOption10.jpg" width="200" height="142" /></a></td>
|
|
</tr>
|
|
</table>
|
|
<ul><li> in order for the bow to be correct the poly-line for the stemline needs to be drawn from the bottom to the top which will mean right to left in the Sketcher</li></ul>
|
|
<h2><span class="mw-headline" id="Sample_Files">Sample Files</span></h2>
|
|
<p>These files are samples of Sketch data to use with the macro, mainly they are the models for the screen snapshots in the Options section above. The files work with the Macro and so can be downloaded and played with to adapt to your specific requirements. The prefix of 5x3 (for example) means the model has 5 cross-sections and 3 line segments per cross-section (i.e. sketch)
|
|
</p><p>To use one of the example files, right-click on the file link and select Save File As... from the menu. The filename will be specified, choose the desired folder/directory to hold the example file.
|
|
</p>
|
|
<ul><li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/3x1.FCStd?raw=true%7C">3x1 hull</a> with the minimum number of Sketches (stemline, one cross-section, transom) with 1 line segment per Sketch <<<<< NOT CURRENTLY WORKING</li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/5x3%20bowNormal.FCStd?raw=true%7C">5x3 with normal bow</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/5x3%20bowTrireme.FCStd?raw=true%7C">5x3 with trireme bow</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/5x3%20sternCanoeStern.FCStd?raw=true%7C">5x3 with canoe stern</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/5x3%20sternSheerTransom.FCStd?raw=true%7C">5x3 with sheer transom stern</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/5x3%20sternSugarScoop.FCStd?raw=true%7C">5x3 with sugar scoop stern</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/5x5%20workboat.FCStd?raw=true%7C">5x5 workboat</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/7x5%20pirate.FCStd?raw=true%7C">7x5 pirate boat</a></li>
|
|
<li><a rel="nofollow" class="external text" href="https://github.com/FreeCAD/Examples/raw/master/Half_Hull_Macro_ExampleFiles/12x3%20halfHullS.FCStd?raw=true%7C">12x3 sailing yacht</a></li></ul>
|
|
<h2><span class="mw-headline" id="Remarks">Remarks</span></h2>
|
|
<ul><li> almost all the examples on this page are generated with only 3 line segments defining the side of the hull which gives a very faceted appearance, increasing the number of segments in each Sketch would generate a much smoother surface which would increase the realism</li>
|
|
<li> doesn't do keels, skegs or rudders, in other words, it doesn't do any of the wet area</li>
|
|
<li> doesn't do square bows like push-boats or towed barges</li>
|
|
<li> doesn't do submarines (although it will do the lower half of a submarine)</li></ul>
|
|
<h2><span class="mw-headline" id="Known_Problems">Known Problems</span></h2>
|
|
<p>The 'Ruled Surface' feature of FreeCAD is used to generate the hull sections from the Sketches. It can sometimes generate the wrong result and display a grater like surface instead of a smooth planar one. This will typically occur when the Sketches are rotated such as when a Sugar Scoop stern is modeled. Also angling a Sheer Transom stern can cause this. If it occurs then typically it will do so in either the half-hull models or the complete hull model - it never seems to occur in all three models for the same hull. Also it usually only happens at the extreme bow or stern. If it happens to section in the middle of the boat then most likely one of the Sketches was drawn in the wrong direction (i.e. either random sequence or top-down where as all lines should be drawn bottom-up)
|
|
</p><p>It can usually be removed by using the following steps:
|
|
</p>
|
|
<ul><li> in the Model tab of the Combo View, click on the faulty segment to select it, the faulty segment will show as highlighted on the display</li>
|
|
<li> select the Data tab on the bottom half of the Combo View, the lower part of the window will have a Label "Ruled Surface" with a single parameter 'Orientation'</li>
|
|
<li> there is a popup menu to the right which has the values 'Automatic', 'Forward', 'Reversed', it will initially be set to 'Automatic'</li>
|
|
<li> try one of the other settings (remembering the faulty segment must still be selected in the upper part of the Combo View) which will usually correct the problem</li></ul>
|
|
<p>The following screen snapshot shows the relevant portion of the screen:
|
|
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Macro_Half-Hull_ModelKnownProblems1.jpg" class="image"><img alt="Macro Half-Hull ModelKnownProblems1.jpg" src="Macro_Half-Hull_ModelKnownProblems1.jpg" width="500" height="404" /></a>
|
|
</p>
|
|
<h2><span class="mw-headline" id="Future_Possibilities">Future Possibilities</span></h2>
|
|
<ul><li> replace line segments of cross-sections with curved lines<br />- this is just at the idea stage but would give a much smoother surface in the vertical dimension, however the horizontal surface would still be faceted as it is now</li>
|
|
<li> integrate with Draft workbench to produce drawings from models<br />- an initial goal, but the feasibility has not been investigated</li>
|
|
<li> handle keels, skegs and rudders<br />- one work around for keels with the present system is to model the keel as a half-hull on it's own and then assemble it onto the bottom of the main hull; this would still do nothing for rudders and skegs though</li></ul>
|
|
<h2><span class="mw-headline" id="Glossary">Glossary</span></h2>
|
|
<p>As with any ancient and practiced trade, a rich and sometimes confusing vocabulary has developed around ships, boats and nautical practices. In describing this macro it is both awkward and inefficient to describe the process without using the correct and accurate terms. The obvious problem is that the average lay person will be unfamiliar with such terminology, hence this vocabulary:
|
|
</p>
|
|
<table style="width: 100%;" border="0">
|
|
<tr>
|
|
<td>aft
|
|
</td>
|
|
<td>the rear aspect of anything on a boat
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>chine</td>
|
|
<td style="height: 19.2px;">a planar facet of a hull, can be used to
|
|
approximate a curved surface or as a finished building technique</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align: top;">coachhouse
|
|
</td>
|
|
<td>the part of the central deck which is raised above the deck level - usually to accommodate increased headroom in the interior of the boat
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>flush deck
|
|
</td>
|
|
<td>a deck that runs smoothly from the top of one side of the hull to the other, the converse to a coachhouse deck
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>forward
|
|
</td>
|
|
<td>also 'fore'; the front aspect of anything on a boat
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>port
|
|
</td>
|
|
<td>lefthand side looking forward
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>starboard
|
|
</td>
|
|
<td>righthand side looking forward
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>stemline
|
|
</td>
|
|
<td>the sloped vertical edge which is the bow of a hull
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><br />
|
|
</td>
|
|
<td><br />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>transom
|
|
</td>
|
|
<td>the curved top edge of the stern face which can be flat or curved
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><span class="mw-headline" id="Links">Links</span></h2>
|
|
<ul><li> <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Half_hull_model_ship">Half Hull Model Ship</a> (Wikipedia)</li>
|
|
<li> <a rel="nofollow" class="external text" href="http://www.halfhullshipmodels.com/smf/discussions-of-half-hulls-and-ship-models/understanding-and-practising-half-hull-boat-modelling/?PHPSESSID=56fedd9f6fa2db453a77347f10d57b7f">Why Half Hulls</a> (Maritime Half Hull Ship Models and Nautical Art website)</li>
|
|
<li> <a rel="nofollow" class="external text" href="http://pages.swcp.com/usvmyg/design/design.htm">Traditional Model Yacht Design</a> (US Vintage Model Yacht Group)</li></ul>
|
|
<h2><span class="mw-headline" id="Script">Script</span></h2>
|
|
<p>This script is running bug free. But due to the large range of possible inputs it may fail for some inputs. If so please report it.
|
|
</p><p>The script is too long for the Wiki to display so it must be copied or downloaded from <a rel="nofollow" class="external text" href="http://pastebin.com/raw.php?i=tZMpUi6F">unabbreviated script on pastebin.com</a>
|
|
</p>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><div class="printfooter">
|
|
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Macro_Half-Hull_Model&oldid=241141">http://www.freecadweb.org/wiki/index.php?title=Macro_Half-Hull_Model&oldid=241141</a>"</div>
|
|
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
<div id="mw-navigation">
|
|
<h2>Navigation menu</h2>
|
|
|
|
</body></html> |