The aim of this exercise is to create an automation program to add section lines to a design according to the arrangement of control points. The section lines are to be more densely located around areas with greater curvature and more spaced around less curved areas.
When opening a Maxsurf design in Hydromax, there is an option for using the Maxsurf section lines instead of evenly spaced section lines for its calculations. The advantage of this is that extra section lines can be added around areas with sudden change in section, such as around bow thrusters and bulbous bows.
§ Start by creating 50 evenly spaced section lines, between the aft most and forward most control point.
§ To test for sudden changes in shape, find the 3 dimensional distance to the next nearest control point, compared to the two dimensional distance. If the difference is above a certain multiple (Ö2 gives 45 degrees), then add a section line either side of the control points.

Figure 13 Two and Three Dimensional Distances
§ Test if there is a Sectionline already present within a tolerance of where the new line will go. If there is, do not add it, or move it else where
§ Hydromax can handle a Maximum of 200 section lines, therefore you need to test that the number of lines created is less than this.
Hints:
Instead of placing the Section line inbetween the control points, it is better to place a point either side of the control points. This way, Hydromax will have a definite location either side of the sudden change where it knows that the hull will pass through.