Advanced Modeling in MultiSurf 6.0
Advanced Modeling in MultiSurf 6.0
Advanced Modeling in MultiSurf 6.0
Surfaces ....................................................................................................................................................... 38
Foil Lofted Surfaces ................................................................................................................................. 38
B-Fit Surface ............................................................................................................................................ 41
B Surface .................................................................................................................................................. 43
NURBS Surface ....................................................................................................................................... 44
Projected Surface...................................................................................................................................... 47
Relative Surface ....................................................................................................................................... 48
Tabulated Surface..................................................................................................................................... 50
X-Spline Lofted Surface........................................................................................................................... 52
1
Using Solids ................................................................................................................................................. 56
Some applications..................................................................................................................................... 56
Discussion of tank and grid examples ...................................................................................................... 57
Formulas ..................................................................................................................................................... 74
Constants, variables and formulas ............................................................................................................ 74
Variables................................................................................................................................................... 75
Formulas................................................................................................................................................... 75
Basic syntax.............................................................................................................................................. 75
Expression ................................................................................................................................................ 75
Unit consistency ....................................................................................................................................... 77
Evaluation logic........................................................................................................................................ 77
Complete syntax ....................................................................................................................................... 78
Variables and formulas as parents ............................................................................................................ 78
2
P.O. Box 684 / 54 Herrick Rd.
Southwest Harbor, Maine 04679 U.S.A.
voice 207-244-4100
fax 207-244-4171
email [email protected]
website www.aerohydro.com
3
Advanced Modeling
Points
Blend Point
Characteristic data point1 ... pointN = component point names
weight1 … weightN = corresponding weights
type = 0, 1, or 2
Description The Blended Point is a weighted sum of one or more points. Each
coordinate of the blended point is the same weighted sum of the
component point coordinates:
X = w1 X1 + w2 X2 + ...... + wN XN
Y = w1 Y1 + w2 Y2 + ...... + wN YN
Z = w1 Z1 + w2 Z2 + ...... + wN ZN
type specifies how the weight values are used in the formulas:
type = 0 weights are used without wi = weighti
modification
type = 1 weights sum to 1(forced) wi = weighti EXCEPT weightN is ignored -- it
is replaced by 1 - (sum of the other weights)
type = 2 each weight is divided by wi = weighti / sum
the sum of all weights
When weights sum to 1, it is generally easier to predict the result of the
blend; when weights do not sum to one, the blend is more complex. For
most applications, you probably want the weights to sum to 1. Thus, to
construct the midpoint between two points, you could make a type-1
BlendPoint with weights of 0.5 and 0.5 . The weights used in the
formulas would be w1 = 0.5, w2 = 1 - 0.5 = 0.5 (in a type-1 BlendPoint
weightN is ignored and 1 minus the sum of the other weights is used).
You could also use a type-1 BlendPoint to construct the mirror point of
point1 across point2. You would use weights -1.0 and +2.0; the weights
used in the formulas would then be w1 = -1.0, w2 = 1 - (-1.0) = 2.0 .
Example 1 Blend Point2.ms2
This model has two, type-1 (weights sum to 1) BlendPoints: ‘p3’ and ‘ctr’.
'p3' (cyan) is used to make the fourth corner of the parallelogram; its
component points are ‘p0’, ‘p1’, and ‘p2’ (weights -1, +1, +1). Since ‘p3’
is a type-1 BlendPoint, the weights used in the formulas are: w1 = -1, w2
= +1, and wN = 1 - (-1 +1) = 1. You can drag RelPoints ‘p1’ and ‘p2’
around as you wish, but the figure formed by BCurve 'c0' is durably
parallel-sided.
4
Z
blended points Z
'p3'
'p2' 'p3'
'ctr'
'ctr'
X X
BLENDPT2.MS2 at Lat 0, Lon -90 orthographic: initial model (left); with ‘p2’
moved (right).
The second BlendPoint 'ctr' stays at the center of the figure; it is the
average of the four corners ‘p0’, ‘p1’, ‘p2’, and ‘p3’ (weights .25, .25, .25,
.25). Since ‘ctr’ is a type-1 BlendPoint, the weights used in the formulas
are: w1 = .25, w2 = .25, w3 = .25, and wN = 1 - (.25 + .25 + .25) = .25 .
Example 2 Blend Point3.ms2
This example uses three type-1 BlendPoints and one type-2 BlendPoint to
make the standard yacht designer’s “center of effort” calculation.
Z
4 blended points
'Mctr'
'Zctr'
'CE' 'Jctr'
5
Total 747 sq.ft.
A type-2 BlendPoint ‘CE’ makes the center of effort calculation; the three
sail areas are entered as the weights. Since ‘CE’ is type-2, the weights
used in the formulas are w1 = .3681, w2 = .3855, and w3 = .2463 (as shown
in the table above). You can read the absolute coordinates of the center of
effort ‘CE’ from the Edit/Attributes box or the status line.
[Variables and Formulas provide a way to represent this complete
relationship durably. The critical element is the AREA function.]
Other Examples See use of BlendPoint in Entity Description for ProcPtSurf - Example 1.
Intersection Point
An Intersection Point is located at the common intersection point of three
planes and/or surfaces. (Actually, it solves a considerably more general
intersection problem, as it allows offsets to be specified from any
combination of the 3 planes and/or surfaces.)
Characteristic Data Magnet/surface/plane/frame1
Magnet/surface/plane/frame2
Magnet/surface/plane/frame3
Offset1, Offset2, Offset3
Description If a magnet is specified in place of a surface, the magnet location is used
as a starting point in the search for an intersection point.
As usual, a frame can serve as a plane; in this case, the plane is the x-y
plane of the frame.
When the intersector is a surface, the offset is positive in the direction of
the positive normal (like an OffsetSurf). Bear in mind that such an offset
will be reversed if the surface's orientation attribute is reversed.
Planes have an orientation, too, though this has not so far been made a
visible characteristic of a plane, so you need to follow some rules if you
want to make use of an offset from a plane:
*X=0, *Y=0, *Z=0 -- A positive offset is in the positive coordinate
direction.
Plane2 -- A positive offset is in the direction from Point1 toward Point2
Plane3 -- A right-hand rule prevails; if you made a Frame3 from the
same three points, picked in the same order, positive offset is in the
direction of the positive z-axis.
OffsetPlane -- Orientation is the same as that of the parent plane.
Frame -- A positive offset is in the direction of the positive z-axis.
Associated errors
228 -- IntPoint has duplicate Parents; no solution.
In general, if the same object is used for two of the Parents, there is
no unique solution for the intersection.
6
229 -- IntPoint: Solution failed, equations are singular.
This usually indicates a badly posed intersection, for example: two of
the planes are parallel, or a surface coincides with a plane.
232 -- IntPoint: Failed to converge.
This can also result from a badly posed intersection. Bad starting
locations are another cause; use a magnet near the intersection, in place
of a surface.
Sample files
Intersection Point1.ms2. This has 4 IntPoints;:
ip0 is at the intersection of 3 planes.
ip1 is at the intersection of 2 planes and 1 surface.
ip2 is at the intersection of 1 plane and 2 surfaces.
ip3 is at the intersection of 3 surfaces.
Tabulated Point
7
below). Thus, the shape of the TABPOINT model can be controlled in
many ways by changing the contents of DEMOPTS.3DA.
The 4 TabPoints defining the bow master curve are named ‘P11’ - ‘P14’
(from top to bottom), those for the middle master curve ‘P21’ - ‘P24’ (top
to bottom), those for the stern master curve ‘P31’ - ‘P34’ (also top to
bottom). For all the TabPoints, filename is DEMOPTS, and frame/point is
the default ‘*’ which produces no shift or rotation of the points. point no.
for ‘P11’ is 1, for ‘P12’ is 2, for ‘P13’ is 3, for ‘P14’ is 4, for ‘P21’ is 5, for
‘P22’ is 6, etc.
Z
Y
all points are tabulated points
X
TABPOINT.MS2
Contents of DEMOPTS.3DA
0 0.000 0.000 3.600
1 1.367 0.000 0.602
1 2.324 0.000 -0.800
1 3.000 0.000 -0.900
0 15.000 4.815 2.560
1 15.000 5.046 0.628
1 15.000 3.603 -0.870
1 15.000 0.000 -1.175
0 30.000 3.500 2.760
1 30.000 3.500 1.320
1 30.000 2.500 0.120
1 30.000 0.000 0.120
See also TabCurve, TabSurf, WireFrame
Tangent Magnet
The TanMagnet (tangent magnet) entity type constructs a point on a
surface along the direction tangent to a snake. It is highly analogous to a
TanPoint in 3-D (a point along the 3-D tangent to a curve, at a place on
the curve specified by a bead). In the TanMagnet case, the tangency
direction is really in the 2-D u,v-parameter space of the surface.
TanMagnet is a key to constructing snakes that are tangent to each other
in both u,v parameter space and in 3-D.
8
A TanMagnet is a draggable point. The tangent direction is fixed by the
ring and snake parents, so only the u,v-offset (a single degree of
freedom) is controlled by dragging or nudging.
Characteristic data
Ring -- This designates both the snake to be tangent to, and the point
along the snake where the tangent direction is taken. The host surface of
the TanMagnet is the host surface of the ring (and therefore of the snake).
u,v-offset -- a distance in u,v parameter space from the ring parent. This
is a signed distance, positive along the positive tangent direction at ring.
Construction
The program evaluates the ring parent, obtaining the host snake and a t
parameter value. Then it makes a level-1 evaluation of the snake at this
parameter value, obtaining the host surface, a u,v location for the ring,
and the first derivative of the u,v location. It normalizes the first
derivative to obtain a unit vector U in u,v space. It multiplies U by the
u,v-offset and adds the resulting 2D vector to the ring's u,v coordinates,
to obtain the u,v coordinates of the TanMagnet.
Error conditions
(1) The ring can fail to evaluate, or the snake can fail to evaluate at this t
position (though this seems unlikely, if the ring is valid), or the surface
can fail to evaluate at this u,v location. These failures produce error 284
(parent failed).
(2) The first derivative of the snake can be zero, so the normalization fails
and a tangent direction can't be established. This produces a new error,
473.
9
blue). Breakpoints command reveals only 1 degree-2 breakpoint for 'n3',
at the location of 'r0'. This shows that an accurate tangency has been
achieved between its component snakes 'n1' and 'n2'.
XYZ Magnet
Characteristic Data
Type (1 to 3)
Surface or magnet
Frame
Point
Location1, Location 2
Description Type determines whether you are making the YZ, ZX, or XY variety
Type-1 locates the magnet by its Y and Z locations
Type-2 locates the magnet by its Z and X locations
Type-3 locates the magnet by its X and Y locations.
Note these designations are based on an “odd-man-out” rule:
Type-1 is the one that doesn’t use X
Type-2 is the one that doesn’t use Y
Type-3 is the one that doesn’t use Z
10
frame ‘*’ is the global coordinate system, in which case the coordinates
used are just
the global X, Y or Z. If you choose to measure offsets or location in
another Frame not aligned with the global coordinates, Location1 and
Location2 will be frame coordinates, x, y or z.
Point is an optional reference point. If you choose the default point ‘*’,
the Locations
will be measured from the origin of Frame. This creates the “absolute”
variety of
XYZMagnet. If you choose another point for Point, the Locations will be
relative to
that Point. This makes the “relative” variety of XYZMagnet.
Example Suppose you need to locate a point ‘m1’ on the deck surface, exactly 3.20
ft. from centerplane and 10.46 ft. aft of the forward reference station. The
most direct way to do that now is an XYZMagnet. Since X and Y are
specified, the type has to be 3. Use ‘*’ for both Frame and Point
(coordinates measured in the global coordinate system), and 10.46 and
3.20 for the Locations.
Suppose you need another point ‘m2’ on the deck, exactly 2.25 ft. aft of
‘m1’ and the same distance from the centerplane. The simplest way to do
this is an XYZMagnet, again type-3 since X and Y are specified, with
Frame = ‘*’, Point = ‘m1’, and Locations of 2.25 and 0.
Sample file: XYZ MAGNET.MS2
Proximity Points
Proximity Bead, Ring, Magnet
Characteristic Data
ProxBead
type (kind), 0|1 = minimum/maximum signed distance
type (kind), 0|1 = unconstrained/constrained
bead/curve
mirror/surface
ProxRing
11
type (kind), 0|1 = minimum/maximum signed distance
type (kind), 0|1 = unconstrained/constrained
ring/snake
mirror/surface
ProxMagnet
type (kind), 0|1 = minimum/maximum signed distance
type (kind), 0|1 = unconstrained/constrained
magnet/surface
mirror/surface
Description The ProxBead, ProxRing and ProxMagnet entity types solve the
following problems:
ProxBead (ProxRing):
(Type 0) Find the point on a curve (snake) that has the minimum
signed distance from a mirror/surface.
(Type 1) Find the point on a curve (snake) that has the maximum
signed distance from a mirror/surface.
ProxMagnet
(Type 0) Find the point on a surface that has the minimum signed
distance from a mirror/surface.
(Type 1) Find the point on a surface that has the maximum signed
distance from a mirror/surface.
Constrained/ Unconstrained
There is an issue of whether the ProxBead is constrained to the
interval [0,1], or is free to go onto the extensions of the curve;
similarly for a ProxMagnet, whether it can use the extension of the
surface. Both alternatives appear useful in different circumstances,
so both are provided by means of a second type: 0 for unconstrained,
1 for constrained.If a bead (ring, magnet) is given for the bead/curve
12
(ring/snake, magnet/surface), MultiSurf uses it for the starting
location, and searches for a nearby local minimum or maximum.
Otherwise, MultiSurf starts with a tabulation of the host curve
(snake, surface) and identifies the closest/farthest point in the table
as a startinglocation for the search.
Associated errors
(1) Failed to converge.
(2) No solution exists. This will be a fairly common occurrence; say,
from choosing the wrong type. On a sailboat hull (unconstrained),
the maximum Y point will exist and be well defined, but in general
there is no minimum Y -- the extended surface goes on to minus
infinity. The optimization will be trying to run to minus infinity, and
we have to detect that and stop it before the numbers get outrageous.
Sample files
ProxBead1.ms2 This model contains 4 ProxBeads hosted on a circle.
'e1' is at the closest point on the circle to Point 'p3', and 'e2' is the
point farthest away from 'p3'. 'e1' and 'e2' both use the circle as
parent, so do not specify a starting point. 'e3' is the point closest to
Point 'p4', and 'e4' is the point farthest away from Point 'p5'. 'e3' and
'e4' both use AbsBead 'e0' as a starting point.
13
MaxBeam.ms2 In this model a construction, using a Proximity Ring,
is set up to find a curve showing the maximum beam on a vessel’s
topsides. The Proximity Ring ‘Prox1’ draws out a Procedural Snake
caused by the action of moving its parent snake from sheer to chine.
The Parents of the Procedural Snake are the Proximity Ring and the
Ring ‘MovingPoint’, which is the parent of the ProxRing’s host UV
Snake.
14
gives you quick access to the Property Manager, where you can try a
different set of values.
When the BFitCurve is displayed, you can see where the control points
are by turning on the "polygon" (visibility = polygon) for the curve − the
control points are located where the polygon lines meet
If you would like MultiSurf to report information about the quality of fit,
select the BFitCurve and then choose Tools/ Clearance.
Example bfitcv1.ms2
This example is a cubic (type-3) B-spline curve fitted to one quadrant of
an ellipse basis curve. Since nc-specifier is 0, the program incremented the
number of control points until the tolerance (1E-4 = .0001) was met. The
fit was accomplished with 8 control points.
Z
The deviation of the fitted curve from the basis curve, as provided by Tools/
Clearance, is: rms = 6.80e-005.
Conic
Characteristic data center = point to locate center point of complete conic section (P)
point2 = point to locate end of primary axis (P2)
point3 = point to locate end of secondary axis (P3)
s0 = conic parameter (degrees) for the start (t = 0)
s1 = conic parameter (degrees) for the end (t = 1)
type = 1, 2, 3, or 4
type-1 = ellipse
type-2 = hyperbola, positive branch
type-3 = hyperbola, negative branch
type-4 = catenary
Description All types of conics are constructed by specifying the center (center), the
ends of the semimajor and semiminor axes (point2 and point3), and two
parameter values (s0 and s1). The conic curve always lies in the plane of
15
the three points. The end of the primary axis is at point2 (P2). A temporary
point Q is created for the end of the secondary axis by moving from P2
parallel to the primary axis as required to make the secondary axis
perpendicular to the primary axis. Thus the user is freed from locating
the three points such that P2-P-P3 is a right angle. The length of the
secondary axis is the distance of P3 from the primary axis, also the
distance from P to Q.
For a precise description of the conic curves we define the three vectors
using bold face letters:
a is the vector from P to P2 (primary axis)
b is the vector from P to Q (secondary axis)
c is the vector from the origin to P
a, b, and c are their magnitudes, respectively.
Ellipse (type-1)
For an ellipse, the primary axis can be either the semimajor or semiminor
axis, depending on the relative distances of P2 and Q from P. The full
ellipse passes through points P2 (at s = 0) and Q (at s = 90 deg.). The
equation for the ellipse (type-1) is:
x(t) = a cos s + b sin s + c
s = s0 * (1 - t) + s1 * t
The ellipse foci are at c +/- a SQR(1 - b2 / a2) .
Catenary (type-4)
Although not actually a conic section, the catenary is a related analytic
curve which is easily supported in the same context. Its equation is:
x(t) = a cosh s + b s + c
16
s = s0 * (1 - t) + s1 * t
(s in radians). If s0 and s1 are fairly small, the curve is very similar in
shape to the positive hyperbola.
The catenary is the equilibrium curve assumed by a hanging chain or
cable under its own weight, with the force of gravity acting in the -a
direction. It has engineering applications in the design of bridges and
arches.
For all types of Conic Sections, relabel is used to relabel the curve. The
program’s default relabel ‘∗’ produces the “natural” labeling, in which the
parameter t is linearly related as indicated in the formulas above.
Note that the parabola is also a conic section. It can be regarded as the
limiting case of either an ellipse or a hyperbola as the center moves to
infinity. Parabolas can be created in MultiSurf in two ways — any type-2
B-spline or C-spline curve with three control points is a parabola.
Example 1 conics.ms2 (ellipse and hyperbola)
Z
t=1 t=1
'minor'
'hyperbola_neg' 'hyperbola_pos'
= type-3 t=1 = type-2 conic section
conic section
'major'
X
'center'
t=0
'ellipse'
= type-1
t=0 conic t=0
section
All three of the conic sections in this example are formed using the same
control points and conic parameters:
‘center’ is the center point
‘major’ is point2, the end of the primary axis
‘minor’ is point3, the end of the secondary axis
s0, the conic parameter for the start (t = 0) of the curve is -90
s1, the conic parameter for the end (t = 1) of the curve is 90
‘ellipse’ is the type-1 conic section, ‘hyperbola_pos’ is the type-2 conic
section, and ‘hyperbola_neg’ is the type-3 conic section.
17
Example 2 catenary.ms2 (catenary)
‘catenary’ is a type-4 conic section formed by the following three control
points and two conic parameters:
‘center’ is the center point
‘contact’ is point2, the end of the primary axis
‘minor’ is point3, the end of the secondary axis
s0, the conic parameter for the start (t = 0) of the curve is 0
s1, the conic parameter for the end (t = 1) of the curve is 90
In this example, ‘bottom’ is a line depicting the bottom of the bay (or lake
or ...). ‘catenary’ is a type-4 conic; it is the portion of anchor chain not
resting on the bottom. ‘chain’ is a Line; it is the portion of anchor chain
that is resting on the bottom. ‘boat’ is a bead at the t=1 end of ‘catenary’.
Z
'boat'
at t=1
X
'catenary'
'chain'
'bottom'
'contact'
'anchor'
at t=0
'center' 'minor'
Expanded Curve
Characteristic data
Relabel
Type (-3 to -1, 1 to 3) -- Specifies which axis of the frame to use, and
which direction along that axis (+/-) corresponds to the positive t
direction.
Bead/curve -- Specifies the basis curve; if a bead, it also specifies a
particular point on the curve to end up at the frame origin.
Frame
Scale factor
Description An ExpdCurve (Expanded curve) is to a curve as a development
(flattening) is to a developable surface: It is a copy of the curve, rolled
18
out flat to make a straight line, with preservation of arc-length of all
elements.
Note that this construction implies that, in absence of a relabel, the
velocity profile of an ExpdCurve will be identical to that of its basis
curve.
One application is the layout of structural elements that will be formed
by bending straight tubes, shapes or extrusions into curves. In this case,
the 3-D basis curve should follow the neutral axis of the shape.
Sample files ExpdCurve1.ms2
This is the forward master curve of Demo.MS2, flattened into a vertical
line. Point 'p0' is used as the frame. The type is -3, therefore the positive-t
direction on the ExpdCurve is the negative z axis, i.e., downward. A
bead 'e0' at t = 0.257 specifies which point of the ExpdCurve should be at
the origin.
NURBS Curve
NURB curve
Y Y Y
NURBCRV1.MS2 in <x> view: initial model (left); ‘p2’ weight edited (middle and right).
19
‘midsection’ is a NURBCurve formed by three points ‘p1’, ‘p2’, and ‘p3’,
all of which have wt = 1 (left figure).
In the middle figure, the weight for ‘p2’ has been changed from 1 to 2,
pulling the curve deeper. In the right-hand figure, the weight for ‘p2’ has
been increased to 5, giving ‘midsection’ a tight bilge curve.
See also BCurve, NURBSnake, NURBSurf, KnotList, BSurf.
Radius Arc
type-1 The arc runs from point1 to point3, in the plane of the 3
points; type-1 is the shorter arc, with angle < 180 deg.
type-2 The arc runs from point1 to point3, in the plane of the 3
points; type-2 is the longer arc, with angle > 180 deg.
type-3 This arc rounds the corner formed at point2 by the directions
to point1 and point3. Its t=0 end is tangent to the line from
point1 to point2; its t=1 end is tangent to the line from point2
to point3.
For type-1 and type-2 RadiusArcs, note that in a given plane, there
are four possible arcs of a given radius between two points:
• type-1, positive radius
• type-1, negative radius
• type-2, positive radius
• type-2, negative radius
Z Z
'Type2_PosRadius'
'Type1_PosRadius' 'p3'
'p2' 'p2'
'p3' 'p1'
X X
'p1'
'Type1_NegRadius'
'Type2_NegRadius'
20
RadiusArc types 1 and 2: four possible arcs between two points.
'p1'
'e0'
Example 2 radiusarc3-polycurve2.ms2
Example 2: radiusarc3-polycurve2.ms2
This model is a hard-chine barge with raked ends. A type-3 RadiusArc is
used to form the 20-foot-radius curve in the chine.
‘radiusarc’ (bright green) is a type-3 RadiusArc made from ‘vert_rake’
(blue, a bead on ‘l2’), ‘long_rake’ (blue, a bead on ‘l0’), and ‘p2’ (cyan, a
ProjPoint of a point at the origin). ‘radiusarc’ is tangent to ‘l3’ (yellow) at
its t=0 end and to ‘l1’ (magenta) at its t=1 end.
‘chine’ (cyan) is a PolyCurve2 made from ‘l1’, ‘radiusarc’, and ‘l0’.
You can vary the longitudinal and vertical extents of the rake by
dragging ‘long_rake’ and vert_rake’ respectively. The RadiusArc adjusts
itself to maintain its specified radius of 20 ft and it remains tangent to the
lines ‘l1’ and ‘l3’.
21
Z
t=0 'vert_rake'
X 'l3'
RadiusArc
'p1' 'l1' t=1 'long_rake'
Y
For discussion of the PolyCurve2 in this model, see the end of the first
PolyCurve2 Entity Description example.
See also Arc
Tabulated Curve
22
polyline points; i.e., the first point is at t = 0; the second is at t = 1/nlinks,
the third is at 2/nlinks.... and the last is at t = 1.
Note: A TabCurve has less inherent smoothness than most native
MultiSurf curves. It is actually a polyline, like a type-1 BCurve. You
cannot subdivide a TabCurve to produce a smoother version of the same
curve.
a model identical to Y
the DEMO model. tabulated curves
However, in this case, 'c3', 'c2', and 'c1'
instead of generating
the master curves
itself, the model reads
them in from a file
DEMOMCS.3DA (see 'e1'
contents below).
Therefore, the shape
of the hull depends X
entirely on the
contents of that file. TABCURVE.MS2 at Lat -30, Lon 60.
The three TabCurves are named ‘c1’, ‘c2’, and ‘c3’. For each of them,
filename is DEMOMCS, and frame/point is the default ‘*’ which produces
no shift or rotation of the curves. polyline no. for ‘c1’ is 1, for ‘c2’ is 2, and
for ‘c3’ is 3.
The bead ‘e1’ is included to show that a TabCurve, like any other curve,
will support beads and other objects depending on curves.
Contents of DEMOMCS.3DA
0 0.000 0.000 3.600 pen=0 point (1st point) on 1st
polyline ‘c1’
11 0.511 0.000 2.493 1st of 10 records with nonzero pen
for 1st polyline; nlinks for ‘c1’ = 10
11 0.951 0.000 1.569
11 1.321 0.000 0.829
11 1.619 0.000 0.273
11 1.845 0.000 -0.099
11 2.045 0.000 -0.355
11 2.260 0.000 -0.564
11 2.491 0.000 -0.724
11 2.738 0.000 -0.836
11 3.000 0.000 -0.900
0 15.000 4.815 2.560 pen=0 point (1st point) on 2nd
polyline ‘c2’
11 15.000 4.869 1.835
11 15.000 4.847 1.204
11 15.000 4.749 0.667
23
11 15.000 4.575 0.226
11 15.000 4.325 -0.121
11 15.000 3.921 -0.403
11 15.000 3.286 -0.649
11 15.000 2.421 -0.860
11 15.000 1.326 -1.035
11 15.000 0.000 -1.175
0 30.000 3.500 2.760 pen=0 point (1st point) on 3rd
polyline ‘c3’
11 30.000 3.480 2.218
11 30.000 3.420 1.742
11 30.000 3.320 1.334
11 30.000 3.180 0.994
11 30.000 3.000 0.720
11 30.000 2.720 0.504
11 30.000 2.280 0.336
11 30.000 1.680 0.216
11 30.000 0.920 0.144
11 30.000 0.000 0.120
See also TabPoint, TabSurf, WireFrame
X-Curve
24
(4) At each end of an XCurve, you have explicit control over either the
slope or the curvature (bending moment) in two directions. To be
more specific, suppose we have a type-1 XCurve, i.e., oriented with
respect to the X-axis. At each end of this curve, you will explicitly
specify either the slopes Y’, Z’ or the moments Y”, Z”.
(5) An XCurve will not in general lie in a plane, even if all its control
points do. There are somewhat intricate constraints on the end
condition values that are required to make the curve lie in a plane.
(6) The Y and Z projections of a type-1 XCurve are completely
independent. That is, the Y-projection depends only on the Z-
coordinates and the Z’ or Z” end condition values, and vice versa.
type specifies the direction of orientation of the XCurve:
1 for X orientation
2 for Y orientation
3 for Z orientation
Note: this usage of type has nothing to do with “spline” type as used in
BCurve, CCurve entity specifications. XCurves are always cubic splines.
ecc is the end condition code for the two directions other than the
direction of orientation (specified by type):
0 = moment both ends
1 = slope at t=0 end, moment at t=1 end
2 = moment at t=0 end, slope at t=1 end
3 = slope at both ends
s/m1, s/m2, s/m3, s/m4 are the slope or moment at each end of the curve
for the two directions other than the direction of orientation (specified by
type):
While inclusion of the XCurve was motivated primarily by the desire for
full compatibility with FAIRLINE/2, it certainly has some other
worthwhile uses. For example... boat hull with straight frames...
cambered deck as ALoftSurf... accurately flat spray chines...
Example xcurve.ms2
This example is a candidate sheerline for an 8-meter sailing yacht. You’ll
probably want to use Edit/ Model File to follow the discussion. The
XCurve is type-1 (oriented to the x-axis), and has end condition code = 1
(slope at t=0 end, moment at t=1 end). It passes through the five points in
sequence. At t=0, the Y-slope (dY/dX) is 0.5, and the Z-slope (dZ/dX) is
25
-0.13. At t=1, the Y-moment (d2Y/dX2) is -.02, and the Z-moment
(d2Z/dX2) is .005.
Z
Y
type-1 X-spline curve
'p1'
'p2' t=0
'p3'
'p4'
'p5'
t=1
Arc Snake
26
The program’s default relabel produces the “natural” labeling, in which
the parameter t is uniformly distributed with respect to arc length or
angle, in the u-v parameter space.
Example arcsnake.ms2
‘garter’ (red), a type-3 arc snake, is shaped by the three magnets ‘m1’,
‘m2’, and ‘center’ (all cyan). ‘garter’ is a circle in the u-v parameter space
mapped onto a rectangle ‘patch’. This produces a true ellipse. If the
shape of ‘patch’ is changed, ‘garter’ will change its position in space but
will remain always on ‘patch’, in a corresponding position. ‘garter’ will
remain an ellipse as long as ‘patch’ remains a rectangle.
Z
'center'
type-3
arc snake
X u
0,0 u 0,0
'm1' 'm2'
t=0 and t=1
Foil Snake
27
• The last control point in a 4- or 5-point foil nominally closes the foil
(usually same point as point1).
type:
type-1 NACA 4-digit series; max camber at 40%
type-2 NACA 63 series with a=0.3 mean line
type-3 NACA 64 series with a=0.4 mean line
type-4 NACA 65 series with a=0.5 mean line
type-5 NACA 0010-34; max camber at 40%
types 101-255 user-defined foils
relabel is used to relabel the snake. The default relabel ‘∗’ produces a
labeling in which the parameter t is concentrated in the highly curved
leading edge area, in the u-v parameter space. Subdivision control may
be important if you are creating panels for a potential-flow code.
Notice The implementation of FSnake may be changed in a future version. We
have found FSnakes to be of marginal value because of the distortion of
the foil shape that occurs when the true foil outline is expressed in u, v
parameters and mapped onto the distorted mesh of u, v grid lines. We
now see the possibility of compensating for this distortion, producing a
much truer rendition of the foil.
The ProjSnake entity provides a way to overcome this problem: instead
of using an FSnake, use a ProjSnake made from an FCurve. For example,
in the FSNAKE2.MS2 example below, you could make an FCurve lying
in a horizontal plane such as Z = 0, then project it vertically onto the hull
surface.
Example fsnake2.ms2
‘hull’ is a C-lofted surface made from 5 master curves ‘MC1’ to ‘MC5’. u
= 0 is the sheerline, and v = 0 is ‘MC1’.
‘trailing_edge’, ‘side’, and ‘leading_edge’ are three magnets on ‘hull’.
‘trailing_edge’ and ‘leading_edge’ are located on the u = 1 edge of the
surface.
‘keel_root’ is a type-1 half-section foil curve, defined by the three
magnets and lying on ‘hull’.
28
v
Z 1,1
Y
half-section foil snake 0,0 'trailing_edge'
v
'leading_edge'
u u
0,0
'leading_edge'
t=1
'side'
X
Y
'trailing_edge'
t=0
X
Z
FSNAKE2.MS2 at Lat -30, Lon 50 (top) and Lat 90, Lon -90 (bottom).
Geodesic Snake
29
magnets, start and end, the type-2 BSnake is just the LineSnake from
magnet1 to magnet2. For many GeoSnake applications, especially those
with zero curvature, two magnets will be sufficient. If the resulting
GeoSnake fails to converge, you can add one or more intermediate
magnets to get a better starting configuration.
A GeoSnake can have zero (constant) geodesic curvature for its entire
length, or it can have a specified distribution of geodesic curvature.
curvature and graph are the controls:
curvature is a geodesic curvature value, units = 1/length. 0 curvature
makes an actual geodesic satisfying Geodesic conditions (1), (2) below.
graph modulates the geodesic curvature; i.e., multiplies the curvature
value. The default graph ‘*’ is interpreted as a constant, 1.
log-tolerance allows you to specify a tolerance for the convergence of the
iterative search MultiSurf uses to compute the GeoSnake. The value is
specified as the log (base 10) of tolerance (using a logarithm here allows
a wide dynamic range). Example: log-tolerance = -4 means tolerance = 10-4
= .0001. log-tolerance is provided as a control because practical accuracy
requirements for geodesics vary widely between applications.
Tolerance itself is the largest tolerable deviation of calculated geodesic
curvature from specified geodesic curvature, multiplied by the total arc
length of the GeoSnake (this makes it non-dimensional). Example: a
curve with 10-meter arc length and maximum curvature of 10-3/meter
(curvature x arc length = 10-4) could deviate from a straight line by no
more than 0.125 mm.
relabel is used to relabel the snake. The default relabel ‘*’ produces the
“natural” relabeling of the snake which is uniform with respect to arc
length.
Geodesic curvature Geodesic curvature is a pointwise scalar property of a curve lying in a
surface, determined as follows:
(1) At any point along the curve, construct the plane tangent to the
surface.
(2) Project the local portion of the curve normally onto the tangent
plane.
(3) Geodesic curvature is the curvature of the projection.
Geodesic A geodesic is a curve embedded in a surface, with a special property
which can be expressed in either of two mathematically equivalent ways:
(1) A geodesic has zero geodesic curvature throughout its length.
(2) A geodesic is the shortest curve in the surface joining its endpoints.
Failure to converge The typical way a GeoSnake fails to evaluate is “failure to converge.”
Features which can promote this problem are:
• coarse subdivisions of the host surface
• irregular mesh on the host surface
• lack of smoothness of the host surface
• passing through or close to a coordinate singularity
• starting path far from the geodesic path
• tight tolerance
30
Usage Geodesics have significant applications in manufacturing:
(1) Ribbands — they must lie along geodesic paths if they are to
conform to the hull surface between frames (see “Example”).
(2) Planked wooden boat construction — geodesic seams produce
straight planks.
(3) Cold-molded plywood construction — veneers have to lie along
geodesic paths. (Take a look at VENEERS.MS2 which shows a hull in
the process of veneer layout. After making the first veneer-edge
GeoSnake, we saved it as a component, then loaded it successively,
moving each new GeoSnake to its proper location by moving its
AbsRing control. Then we’d make DevSurfs (the veneers) between
adjacent pairs of GeoSnakes.)
(4) Sail making — geodesic seams are key to efficient use of cloth and
flat panel development. (Take a look at SAILSEAM.MS2 which
shows a jib in the process of being seamed; eventually, DevSurfs
would be created between each adjacent pair of seams.)
(5) Plate expansion — a mesh of geodesic triangles is key step in the
process.
(6) Compounding by line heating — using geodesics for heat lines
minimizes residual stress.
(7) Automated lamination — reinforcing tape has to be laid along
geodesic paths, or it wrinkles and buckles.
Example ribbands.ms2
Z
Y
u
'm1'
t=0
X
t=1
In this example, GeoSnakes are used to layout the paths for ribbands.
The use of geodesics makes ribbands that will naturally lie flat on the
frames and conform to the hull surface between frames.
‘m0’ is an AbsMagnet on the v = 0 edge of the hull; ‘m1’ is a RelMagnet
on the v = 1 edge of the hull (at du = 0, dv = 1 from ‘m0’). ‘n0’ is the
GeoSnake between ‘m0’ and ‘m1’.
To make the set of ribbands, we saved this first ribband as a component
(objects ‘m0’, ‘m1’, and ‘n0’; RIBBAND.MC2), then loaded the
component successively to make the other ribbands. Since we made the
initial ribband so that it can be moved by moving just the magnet ‘m0’, it
is easy to move each component ribband to its own position on the hull.
31
Note that where the hull has relatively high curvature at the turn of the
bilge, we had to play with the position of the control magnet to get the
geodesic we wanted. In this region, a small movement up or down of
‘m0’ makes a big difference in the geodesic path.
See also LineSnake
NURBS Snake
'csm1'
t v
u
'csm1' 0,0
'csm2'
t=0 and t=1
v 'csm2'
'csm7' wt=3
u 0,0
v
u
0,0
'csm2' wt=3 'csm7'
NURBSNK1.MS2 in Lat 0, Lon 60 orthographic view: initial model (top); with two weights edited
(bottom).
32
‘cabin_side’ is the side of a boat cabin. ‘portlight’ is a type-2 NURBSnake
formed by the seven magnets ‘csm1’ to ‘csm7’ which all lie on
‘cabin_side’ and all have wt = 1 (top figure). If the shape of ‘cabin_side’ is
modified, ‘portlight’ will change its position in space but will remain
always on ‘cabin_side’, in a corresponding position.
The lower figure shows the effect of increasing the weights of ‘csm2’ and
‘csm7’ to 3.
See also BCurve, NURBCurve, NURBSurf, KnotList, BSurf
PolySnake
Characteristic data snake1, snake2 .... snakeN = component snakes (t-orientation doesn’t
matter)
Description A PolySnake is a single curve made by joining two or more other snakes
(called the “component snakes”) end-to-end. The component snakes
must all lie in the same surface and be selected in the order in which they
are to be assembled.
It is anticipated that the end of snake1 is actually the same point as one of
the ends of snake2, etc. However, this is not enforced or checked. If you
specify snakes that do not share endpoints, the moving point will jump
discontinuously from the end of snake1 to the start of snake2 as the
parameter t passes t1 , etc. (see next paragraph).
relabel is used to relabel the snake. The program’s default relabel ‘∗’
produces the “natural” labeling, in which the parameter t is t1 at the end
of the first component snake, t2 at the end of the second component
snake, etc., in the u-v parameter space.
Example polysnk1.ms2
‘t_reversed’ (cyan) is the same subsnake we created in the second
example for the “SubSnake” entity description. ‘t_reversed’ begins (t = 0)
at ‘end1’ and ends (t = 1) at ‘end2’. ‘lsnake’ (yellow) is a line snake that
begins at magnet ‘M1’ and ends at magnet ‘M4’. Both ‘t_reversed’ and
‘lsnake’ lie in the surface ‘patch’. ‘end2’ (t = 1 for ‘t_reversed’) and ‘M1’ (t
= 0 for ‘lsnake’) are at the same position. ‘polysnake’ (magenta) is formed
by joining ‘t_reversed’ and ‘lsnake’. t = 0 for ‘polysnake’ is at ‘end1’, t =
.5 is at the end of ‘t_reversed’ (‘end2’), and t = 1 is at the end of ‘lsnake’
(‘M4’).
In the lower figure, the shape of ‘patch’ has been changed, but you can
see that ‘polysnake’ still lies in the surface.
33
'end1'
polysnake t=0
v 'M4'
'M4'
polysnake t=1 v 'end2'
& 'M1'
0,0
u
u 0,0
'end1'
0,0
u
0,0
u
POLYSNK1.MS2 at Lat -60, Lon 60: initial model (top); with ‘patch’ surface edited (bottom).
NUBFitCurve
Characteristic data Type
Knotlist
nc-specifier
Log-tolerance
Curve
34
Description Compared with a BFitCurve, the only thing new here is the Knotlist. There are 3
alternatives for this entry:
1. ‘*’ (the “default” knotlist) - This allows the fitting to use the best set
of nonuniform knots it can come up with.
2. ‘*UNIFORM’ - a new “predefined” knotlist, available in the System
Objects: this forces the fitting to use uniform knots, essentially
duplicating the function of BFitCurve.
3. You can choose a KnotList or KnotList2 object containing a suitable
specified list of knots.
As in the BFitCurve, for nc-specifier, there are two basic choices:
A nc-specifier can be a positive integer (greater than type), specifying a
definite number of control points to use for the fit.
B nc-specifier can be 0, which signifies “increase the number of control
points until tolerance is met”.
Since there are 3 alternatives for Knotlist and 2 alternatives for nc-
specifier, altogether there are 6 combinations which produce different
behaviors for the
NUBFitCurve entity:
1A. ‘*’ knotlist, combined with positive nc-specifier: The fitting will use
exactly nc-specifier control points, and will use the best non-uniform
knots it can generate.
1B. ‘*’ knotlist, combined with nc-specifier = 0: The fitting will increase
the number of control points (from type+1 up to the number of data
points), until tolerance is met. At each step, it will optimize the non-
uniform knotlist.
2A. ‘*UNIFORM’ knotlist, combined with positive nc-specifier: The
fitting will use exactly nc-specifier control points and uniform knots.
2B. ‘*UNIFORM’ knotlist, combined with nc-specifier = 0: The fitting will
increase the number of control points (from type+1 up to the number of
data points), until tolerance is met. At each step, it will use uniform
knots.
3A. KnotList object, combined with positive nc-specifier: The fitting will
use exactly nc-specifier control points, along with the specified KnotList.
In this case, there is a required relationship between nc-specifier, type,
and number of knots: the number of interior knots (i.e., knots which are
> 0 and < 1) = number of control points + type -1.
3B. KnotList object, combined with nc-specifier = 0: This case results in an error
condition; because of the relationship noted under (3A); the number of
control points is not free to escalate when the type and number of knots
are
both specified.
Tools/Clearance works with NUBFits (as with BFits); with a single
NUBFit object
35
selected, it reports the number of control points used and the goodness-
of-fit RMS
and worst-point statistics.
Tools/Special/Freeze Fit (and the BFreeze command) work with
NUBFits just as for
BFits. They will generate a NURBCurve and its control points (or
NURBSnake and
its control magnets) as freestanding MultiSurf objects. When the fit is
non-uniform, it
generates a KnotList in addition.
NUBFitSnake
The NUBFitSnake entity is very similar to the NUBFitCurve. Its parent
must be a snake, and the resulting approximation is in the u,v, space of
the supporting surface.
Its control points are u,v locations on the supporting surface. The
“tolerance” in logtolerance is a dimensionless value in u,v-space, rather
than a distance.
NUBFitSurf
The NUBFitSurf entity works similarly to NUBFitCurve, but it
approximates a surface.
Characteristic data
u-type
u-knotlist
ncu-specifier
v-type
v-knotlist
ncv-specifier
log-tolerance
Surface
Description The fittings in the u- and v-directions are relatively independent. As with
NUBFitCurve, there are 3 alternatives for each knotlist entry:
1. ‘*’ (the “default” knotlist) - This allows the fitting to use the best set
of nonuniform knots it can come up with.
2. ‘*UNIFORM’ - a new “predefined” knotlist, available in the System
Entities; this forces the fitting to use uniform knots, essentially
duplicating the function of BFitCurve.
3. You can choose a KnotList or KnotList2 object containing a suitable
specified list of knots, and two alternatives for each nc-specifier:
36
A. nc-specifier can be a positive integer (greater than type), specifying a
definite number of control points to use for the fit.
B. nc-specifier can be 0, which signifies “increase the number of control
points until tolerance is met”.
These can be used in any combination, except 3B. (nc-specifier = 0 can’t
be used in combination with a specified KnotList object, because of the
fixed number of knots.)
One common reason to use a NUBFitSurf prior to exporting IGES is to
control the characteristics and quality of NURBS approximation on a
surface-by-surface basis.
Another reason is to achieve exact matching along shared surface edges
in the exported file. For example, suppose we have ‘topside’ and
‘bottom’ surfaces on a single-chine hull, joining each other exactly along
the chine; suppose the u-direction is longitudinal and the v-direction is
transverse on each surface. If we just export the ‘topside’ and ‘bottom’
surfaces through IGES with a global tolerance, we are very likely to come
out with a different number of control points on the two exported
surfaces. For example, the ‘topside’ might meet the tolerance with 12 x 5
control points, while ‘bottom’ gets 10 x 7. Two NURBS curves with
different numbers of control points and different knots are identical only
under extremely unlikely conditions, so there will almost certainly be
gaps and overlaps between the two IGES surfaces that result.
However, if we first make two NUBFitSurfs ‘nub_topside’ and
‘nub_bottom’ using the following conditions:
• same ncu-specifier (say, 12 for this example)
• same knots for the u direction
• same number of u-divisions x u-subdivisions on the base surfaces
then we are guaranteed that the two fitted surfaces will join exactly
along their common edge. Since there is no further approximation in the
export of the NUBFitSurfs, the two exported surfaces will join exactly in
the IGES file, and in the receiving application.
37
Surfaces
Foil Lofted Surfaces
Characteristic data curve1 ... curveN = master curves (t-orientation doesn’t matter)
type = type of airfoil family, 1 to 5; types 101 - 255 reserved for user-
defined foils
relabel = name of a Relabel object or ‘*’ for default labeling
Description In the Foil-Lofted Surface, the lofting curves are Foil Curves. This means
the Foil-Lofted Surface passes through its first (trailing edge), third
(leading edge), and fourth or fifth (trailing edge; if present) master
curves, but in general not the others, which control the thickness and
camber much as the second and fourth (if present) control points of a
Foil Curve do.
Similarly to a Foil Curve, the number of master curves (3, 4, or 5)
controls whether you generate a half or full profile.
Half-section surface
With 3 master curves, you get one half of a symmetric foil-lofted surface,
with the parameter v running from 0 at the trailing edge to 1 at the
leading edge. curve2 controls the half-thickness of the symmetric foil; this
is the distance of curve2 from the ruled surface consisting of all the chord
lines joining the leading and trailing edges.
Full-section surface
With 4 or 5 master curves, you get a full-section foil-lofted surface — that
is, if curve1 and the last master curve coincide, or are the same curve.
When curve1 and the last master curve are not the same, you still get a
more-or-less foil-shaped surface, but the trailing edge is open.
5 master curves. This creates a full section surface:
• symmetric — when curve2 and curve4 are symmetrically placed
(mirror images) with respect to the chord line
• cambered — when curve2 and curve4 are NOT symmetrically placed
with respect to the chord line
curve2 and curve4 act together in determining the thickness and camber.
The full-section foil will be cambered if curve2 and curve4 are not
symmetrically placed with respect to the chord line.
4 master curves. This creates a symmetric full section. A 4-point foil
behaves just like a 5-point foil in which the 4th parent is the mirror
image of the 2nd parent across the chord line.
u,v parameters. The u parameter on the surface is the same as the t
parameter for the first master curve. The v parameter is the parameter
along the lofting foils, running from 0 at the trailing edge (upper surface)
38
to 0.5 at the leading edge, then to 1.0 at the trailing edge (lower surface).
The lofting foils are the u = constant lines.
39
type:
type-1 NACA 4-digit series; max camber at 40%
type-2 NACA 63 series with a=0.3 mean line
type-3 NACA 64 series with a=0.4 mean line
type-4 NACA 65 series with a=0.5 mean line
type-5 NACA 0010-34; max camber at 40%
types 101-255 user-defined foils
half-section
foil-lofted surface
'top'
v
X
0,0 'leading_edge'
'trailing_edge'
'top'
u
v 0,0
X
'leading_edge'
'trailing_edge'
40
camber/chord ratio, and the t-offset of RelBead ‘thickness’ is half the
thickness/chord ratio.)
'upper'
X 'thickness' Z
'trailing_edge'
'camber'
'lower'
'leading_edge'
FLOFT2.MS2
at Lat 30, Lon 60
Y (tickmarks turned off).
See also FCurve, FSnake
B-Fit Surface
Characteristic data utype, vtype = B-spline types for u and v directions: 1, 2, 3, etc.
ncu-specifier, ncv-specifier = integers; specify choices for number of control
points to use for fit (0 if free)
log-tolerance = log (base 10) of tolerance
surface = basis surface
Description A BFitSurf is a uniform B-spline surface, least-squares fitted to the
tabulated data of its basis surface. Its principal function is for exporting
surfaces to NURBS-based systems.
• you can see the NURBS approximation results right in MultiSurf,
prior to exporting IGES
• you can assure accurate joins between NURBS surfaces (by forcing
the same number of control points along adjoining surface edges)
• you can specify different tolerances for different surfaces
log-tolerance is the tolerance specified with a base-10 logarithm, e.g. -3 for
tolerance of 10-3. This notation permits a wide dynamic range. (Tolerance
itself is measured as the RMS (root-mean-squared) deviation of the fitted
surface from tabulated points of the basis surface.)
utype and vtype are the spline type for the u and v directions respectively:
1 = linear, 2 = quadratic, 3 = cubic, etc.
ncu-specifier and ncv-specifier are integer values which specify choices for
the number of control points to be used in the u- and v-directions. For
each specifier there are two choices:
41
When you specify a positive value (it must be greater than the
corresponding type), the program will use exactly this number of
control points for the fit.
When you specify zero, the program will start at type +1 control
points and cycle the number upward until it either achieves the
fit within the tolerance or reaches the limit of 128 control points.
If the BFitSurf does not meet the specified tolerance, the Error window
will pop up and let you know the problem. Clicking the <Edit> button
gives you quick access to the Edit dialog where you can try a different
set of values.
When the BFitSurf is displayed, you can see where the control points are
by turning on the "net" (visibility = net) for the surface − the control
points are located where the net lines meet.
If you would like MultiSurf to report information about the quality of fit,
select the BFitSurf and then choose Tools/ Clearance.
Example bfitsrf1.ms2
This is the demo model plus a BFitSurf. For the first run, we used the default values: u-type and v-type both
= 3, ncu-specifier and ncv-specifier both = 0 (which lets the program set the number of control points), and
log-tolerance = 0. The discrepancies between the XContours on the 2 surfaces visually shows that the fit is
not great (Fig. 2, left). Checking Tools/ Clearance with the BFitSurf selected, reports that MultiSurf used
ncu = 4 and ncv = 4 to achieve the fit.
Z
BFitSurf
Y
XContours on
CLoftSurf basis surface
X Fig. 1
With log-tolerance = -2 (the value it has in the final sample model file), the fit is better (Fig. 2, right).
Tools/ Clearance shows that MultiSurf used ncu = 6 and ncv = 4 to achieve this fit.
Fig. 2. Ship lines (body plan lifts) of 2 variations the BFitSurf: with log-
tolerance = 0.0 (left); with log-tolerance = -2 (right).
See also BFitCurve
42
B Surface
43
Z
Y
u 0,0
B-spline surface
X Z
control points
NURBS Surface
44
Z
Fig. 1
A NURBSurf and its net.
The edges are all rational B-spline curves using control points from the
four edges of the net:
v = 0 uses the first ncu control points
v = 1 uses the last ncu control points
wt1, wt2, etc. are the weights associated with each control point. If wt’s
are all 1 you get the plain vanilla B-spline Surface. Increasing wt on one
control point draws the surface (and the parameter lines) toward that
control point. In Figure 2, point ‘P32’ has been given a weight of 3, while
all others remain at 1. This pulls the surface (and the parameter lines)
toward point ‘P32’. Below the profile view, the body plan view compares
the X = 10 contour of the original, evenly-weighted model to that of the
model with ‘P32’ weight = 3.
knotlist1 and knotlist2 control knot spacing. If not default ‘∗’ (uniform
spacing) for each list, the knotlists should have (ncu - utype + 1) and (ncv
- vtype + 1) components respectively, and each list should begin with 0
and end with 1.
45
Z
NURB surface Y
'P32'
control points
X Z
X-contour at X=10
Fig. 2
A NURBSurf with the weight on one point (‘P32’) increased to 3.
Examples nurbs7a.ms2, nurbs7c.ms2.
‘hull’ is a NURBSurf formed by 28 points (‘P11’ to ‘P47’) with all weights
equal to 1. This is the same hull as in Figure 1 above, but to make that
figure, we used visibility = net plus u-constant and v-constant lines. The
u-direction B-splines are type-2 (quadratic) and the v-direction B-splines
are type-3 (cubic). The two default knotlists distribute the knots
uniformly in both the u and v directions. There are 4 control points in the
u-direction (and 7 in the v-direction).
Now let’s see what happens when we change knot spacing in the v-
direction. This means we need to add the definition of a knotlist to the
model. Since in the longitudinal direction on this hull surface we use
cubic splines (vtype = 3) with ncv = 7 columns of control points, then the
knotlist for the v-direction (which we named ‘knotsv’) needs 7 - 3 + 1 = 5
entries, for example { 0 .25 .5 .75 1 }.
This particular knotlist would actually produce uniform B-splines; i.e., it
would have the same effect as using the default ‘∗’ for knotlist2 in the
NURBSurf description (Fig. 3, top).
But using:
{ 0. .45 .50 .55 1.00 } would allow a region of high longitudinal
curvature near the middle (v = .5) of the hull
{ 0. .50 .50 .50 1.00 } would actually permit a slope discontinuity
(in this case, a crease or bend) to run around the hull at v = .5,
as in the model nurbs7c.ms2 (Fig. 3, bottom). Note that at most
type + 1 sequential knots can have identical values.
46
Y
v
u
X
0,0 u
uniform knot spacing
Y 3 knots at v=.5
v
u
X
0,0 u
non-uniform knot spacing
Projected Surface
47
Example projsurf.ms2
‘outboard’ (the basis surface) is the outboard surface for the starboard
hull of a planing catamaran design. It is like half of a conventional
V-bottom hull. ‘inb_plane’ is a plane defined by three points: ‘p11’ at the
top of ‘MC1’ (the point of the stem), ‘p13’ at the bottom of ‘MC1’, and
‘p33’ at the bottom of ‘MC3’. (Since its three control points are all at Y =
10, ‘inb_plane’ currently is the same as the YPlane at Y = 0.)
‘inboard’ (the projected surface) is the inboard surface for the starboard
catamaran hull, obtained by projecting ‘outboard’ onto ‘inb_plane.
‘inboard’ is flat and parallel to the Y = 0 plane (the centerplane), at Y =
10.
Note that we could create the port hull for this catamaran by turning on
Y-symmetry (Settings/ Model), as we did in the “MirrSurf” entity
description.
Y Z
'p11'
projected surface 0,0
v
basis surface
u
'p13'
'inb_plane'
X
'p33' 'inb_plane'
Z
'p11'
projected surface
basis surface
Y
'p13'
'p33'
Relative Surface
48
• one corner (point1) — Each point of the RelSurf is offset from the
corresponding point of the basis surface by a constant distance and
direction — the offset of point1 from the u=0, v=0 corner of the basis
surface. The u=0, v=0 corner of the RelSurf is at point1.
Note that a RelSurf using a constant offset is NOT the same as creating
an OffsetSurf (in which the offsets are applied perpendicularly to the
basis surface). The perpendicular distance between a RelSurf and its
basis surface would not in general be constant.
• each of the four corners (point1 to point4) — The surface is
stretched out to meet these four corner points. Intermediate points
are offset by amounts linearly related to their u, v coordinates.
The order of naming the four corner points is important. The corners are
identified as follows:
point1 is at u = 0, v = 0 point3 is at u = 1, v = 1
point2 is at u = 1, v = 0 point4 is at u = 0, v = 1
For most accurate results, give the RelSurf the same divisions as the basis
surface.
Example relsurf2.ms2
Z relative surface
0,0
u
'Q2'
v
'P13'
'Q3'
'Q4'
X
u 0,0
'r11
Y 'P23'
basis surface
‘patch’ is the basis surface for the relative surface ‘relsurf’. ‘Q1’, ‘Q2’,
‘Q3’, and ‘Q4’ are the four corners of ‘relsurf’. They are RelPoints offset
from the four corner points of ‘patch’. ‘r11’ is an AbsMagnet at the u = 1,
v = 1 corner of ‘patch’. The translation surface has no point object
defined at that corner, yet one is needed in order to define the offset of
the relative surface from that corner, hence the need for ‘r11’.
Note that in this example the surface divisions are not coordinated:
‘patch’ has 6x3 5x2, while ‘relsurf’ has 5x3 4x2 — we did this just to
make the two surfaces easier to identify in black-and-white figures.
See also OffsetSurf, RelCurve, RelSnake
49
Tabulated Surface
Characteristic data filename = filename of .PAT file
patch number = number of patch in file
frame/point = name of a frame or point object or ‘*’ for the default
Description filename is the filename of a .PAT file. If no extension is given, MultiSurf
assumes .PAT.
A .PAT file (see sample contents and notes in example below) is a special
case of a .3DA file, in which one or more rectangular meshes (patches) is
represented by a set of nv + 1 polylines, each having nu + 1 points.
Individual patches are separated by an extra record having zero pen. A
polyline of nu + 1 points consists of one pen = 0 record followed by nu
records with nonzero pen. u-divisions × u-subdivisions is required to be
equal to nu, and v-divisions × v-subdivisions is required to be equal to nv,
or a geometry error occurs.
patch no. is the number of the patch to be taken from the .PAT file: 1 for
the first, 2 for the second, etc.
frame/point is the name of a frame or point object or ‘*’ for the default:
When frame/point is a point, it specifies an insert origin, and point’s
coordinates are added to the surface coordinates. This results in
a shift (but no rotation).
When frame/point is a frame, the file coordinates are interpreted as
frame coordinates x,y,z. This generally results in a shift plus a
rotation.
When frame/point is the default ‘*’, there is no shift or rotation.
The u-direction of the TabSurf is in the direction of the polylines.
Note: A TabSurf has less inherent smoothness than most native
MultiSurf surfaces. A TabSurf is a faceted model of the original surface
and cannot be further subdivided inside MultiSurf.
Example tabsurf.ms2 (needs fillet.pat)
FILLET.PAT is a patch file (see partial contents below) made from a
model having three surfaces: two plane patches, with a fillet surface
between them. The TabSurf ‘s1’ is the first of these patches, ‘s2’ is the
second, and ‘s3’ is the third. The three patches use for insert location
(frame/point) the Point ‘p1’ (at X=0, Y=0, Z=1), which has the effect of
adding 1.0000 to the Z-coordinate of each point read from the file. Since
frame/point is a point, there is no rotation of the patches, just a 1-unit shift
in Z. Moving ‘p1’ would shift the insert location of the entire set of
TabSurfs, again without rotating them.
The magnet ‘m1’ is added to show that TabSurfs, like other surfaces, can
parent magnets.
50
Z
'p1'
'm1'
51
0 0.000 0.800 0.000 pen=0 point (1st point) on 5th polyline
10 0.200 0.800 0.000
10 0.400 0.800 0.000
10 0.600 0.800 0.000
10 0.800 0.800 0.000
10 1.000 0.800 0.000
0 0.000 1.000 0.000 pen=0 point (1st point) on 6th (and last)
polyline; v-divisions x v-subdivisions for
‘s1’ = 6; nv + 1 = 5 + 1 = 6
10 0.200 1.000 0.000
10 0.400 1.000 0.000
10 0.600 1.000 0.000
10 0.800 1.000 0.000
10 1.000 1.000 0.000
0 0.000 0.000 0.000 extra pen=0 record = end of patch
0 0.342 0.121 0.000 pen=0 (first) point of 1st polyline on
2nd patch (‘s2’)
11 0.360 0.186 0.000
...
See also TabPoint, TabCurve, WireFrame
Characteristic data curve1, curve2 ... curveN = master curves (t-orientation doesn’t matter)
type = direction of orientation of XLoftSurf
ecc = end condition code for the two directions other than the direction of
orientation (specified by type)
graph1, graph2, graph3, graph4 = names of BGraph objects or ‘*’ for
default graph = end condition data for the two directions other than the
direction of orientation (specified by type)
Description The XLoftSurf, like other lofted surfaces, is parented by two or more
master curves. For the XLoftSurf, the number of master curves is
arbitrary. The XLoftSurf is lofted with X-splines. Like the XCurve, the
XLoftSurf needs end condition data, which is supplied by the four
graphs.
type specifies the direction of orientation of the lofting X-splines:
1 for X orientation
2 for Y orientation
3 for Z orientation
Note: this usage of type has NOTHING to do with “spline” type as used
in BLoftSurf, CLoftSurf, etc. entity specifications. XLoftSurfs use cubic
splines.
ecc is the end condition code for the lofting X-splines, for the two
directions other than the direction of orientation (specified by type):
0 = moment at both edges
1 = slope at v=0 edge, moment at v=1 edge
52
2 = moment at v=0 edge, slope at v=1 edge
3 = slope at both edges
graph is the name of a BGraph object. The four BGraphs supply the end
condition data for the lofting X-splines, for the two directions other than
the direction of orientation (specified by type)
53
(2) change the master curves so they are farther apart at u = 0 (or 1)
Another way this error can be triggered is by dragging a magnet near or
beyond the u = 0 or u = 1 edge of an XLoftSurf, where master curves are
converging. As the program performs its search for the u,v coordinates
on the surface corresponding to the visual position of the cursor, the
surface might be evaluated at points outside the range u = 0 to u = 1. If
the error occurs while dragging a magnet, you can usually clear it by
choosing Edit/ Model File, then just <Ok> without making any changes.
Likewise, the error can occur during the solution for position of a
ProjMagnet, IntMagnet, ProjSnake, or IntSnake on an XLoftSurf. It is
especially important on an XLoftSurf to use a magnet to specify the
starting position of one of these objects. This helps a great deal to limit
the area that the program has to search in, reducing the chance that it
will look beyond the u = 0 or u = 1 edges.
Example defaultx.ms2
Z
Y
v 0,0
X-lofted surface
u
'xMCC'
'xMCA'
'xMCB'
X
54
Parametric Solids
All of the solids you can form with MultiSurf are defined with reference to a trio of parameters — u, v, and
w — each of which, has a nominal range of 0 to 1. The rule that defines the solid in terms of its basis
surfaces and/or curves is written in terms of these three parameters. You can think of every point of a solid
as being labeled with a particular trio of values for u, v, and w. Generation of the solid is a continuous
mapping of points in the unit cube to points in 3D space. We refer to the unit cube as the “u-v-w parameter
space” of the solid. It is a 3D space, each of whose points correspond to a point in the solid.
At any point in a parametric solid there is a direction (called the “u-direction”) in which u increases while v
and w are constant. Similarly there is a v-direction in which v increases while u and w are constant and a
w-direction in which w increases while u and v are constant. The only reason you usually need to be
conscious of which direction is which is when deciding how finely the solid should be subdivided in the
three directions for tabulation and display.
A parametric solid nominally has six faces and eight corners. The eight corners have (u,v,w) values of (0.,
0., 0.), (0., 1., 0.), (0., 0., 1.), (0., 1., 1.), (1., 0., 0.), (1., 1., 0.), (1., 0., 1.), and (1., 1., 1.). Some of the faces
can be degenerate surfaces, i.e. curves or even points.
The distribution of the parameter t along the curves used to build surfaces supporting a solid affect the
shape of the solid. In most cases, the “default” labeling works just fine. For a discussion about changing the
labeling, see Reference topic “Relabeling Curves and Snakes”.
For some applications and examples of using solids, including how to export 3D meshes, see Reference
topic “Using Solids”.
55
v-direction lines
0,0,0 w-direction lines
u w
u-direction lines
Note: The visibility options for solids do not “parallel” those for surfaces.
Solid display options show the u-direction lines (not the u= constant
lines), etc. These display lines run in the same direction as the orientation
marks for u, v, and w.
Orientation
Like surfaces, solids have an orientation attribute which can be either 0 (normal) or 1 (reversed). Solid
orientation is different from surface orientation — currently its only effect is to reverse the sign of volume
and weight.
Using Solids
Some applications
• Accurate weight analysis and CG for sailboat ballast (see RuledSolid
examples 1 and 2)
• Tank volumes (for an example, look at the model Tanks.ms2
• Exterior volume meshes for CFD analysis (for an example, look at
the model Exterior-Grid.ms2.
• Interior volume meshes for finite element analysis (for an example,
look at the model Interior-Grid.ms2.
56
Discussion of tank and grid examples
Tanks.ms2
This is a model for an integral tank that can be dropped into almost any hull with a single-surface bottom. It
starts with ‘p0’, which sets the positions of the planes forming the flat forward, top, and inboard surfaces,
and ‘p1’ which controls the length of the tank. The line ‘l0’ between these points is projected horizontally
and vertically onto ‘hull’. Each of the resulting ProjSnakes gets a ring at each end (‘r00’, ‘r01’, ‘r10’, and
‘r11’). Lines between the rings are projected onto ‘hull’, then a SubSurf ‘s4’ is made between the four
ProjSnakes.
To make the RuledSolid ‘fwd_tank’, we need two surfaces. One is the SubSurf ‘s4’ and the other is a
degenerate RuledSurf between the line ‘l0’ and itself.
Tools/ Mass Properties gives the tank volume = 7.68 cubic ft.
Tools/ Weight Schedule gives the weight (and c.g.) of its contents = 958 lbs including the port-side image.
Exterior-Grid.ms2
‘mesh1’ is a BLoftSolid forming a body-fitted 3D mesh for CFD analysis of flow past a streamlined body.
The ‘body’ (bright green) is a BLoftSurf made from elliptic cross-sections. The BLoftSolid has three
control surfaces: ‘body’, ‘middle’ (bright blue; an OffsetSurf), and ‘outer’ (dark red; a cylindrical outer-
boundary surface). Using an OffsetSurf for ‘middle’ ensures that the mesh is orthogonal to ‘body’. The
mesh is also relabeled in the w direction, creating thin cells at the ‘body’ surface for viscous flow analysis.
‘mesh1’ has 8x4x8x4x8x2 = 16,384 cells in each quadrant.
Interior-Grid.ms2
This model is a volume grid for finite-element analysis of a pulley wheel. (Turn on symmetry or View/
Render to see all the images.) ‘grid’ (gray; on Layer 2) is a RuledSolid between the inner and outer
RevSurfs (bright green; on Layer 1).
If you turn layers 1 and 2 off and take the <y> view, you can make many parametric variations by dragging
points ‘p0’, ‘p1’, ‘e0’, and ‘p3’. The analysis grid automatically adapts.
Solid Entities
Boundary Solid
A Boundary Solid is parented by six surrounding surfaces, analogous to
the way a Tangent Boundary Surface is parented by four surrounding
curves. If the surfaces meet accurately along their junctions, the
Boundary Solid will exactly fill the volume they bound. In the language
of grid generation, Boundary Solid implements "transfinite
interpolation" between its six bounding surfaces, although our
implementation, using three relabels as blending functions, is more
general than the standard method.
57
Characteristic Data u-graph
v-graph
w-graph
Bounding surfaces
Description Exactly six bounding surfaces are required in all cases. Some of the
surfaces can be degenerate, i.e., collapsed to a curve or a single point.
This allows the Boundary Solid to have the topology of a prism (one face
degenerated to a curve) or a pyramid (one face degenerated to a point),
for example.
The u,v,w directions of the Boundary Solid depend entirely on which
surface parent is first in the list of "Bounding surfaces". The first surface
parent becomes the w = 0 face, and its u and v parameter directions
become the u and v parameter directions for the solid. A non-degenerate
surface should be chosen for the first parent, otherwise the orientation of
the solid may be unstable, or it may not fill the volume enclosed by the
other bounding surfaces.
Associated errors
433. Boundary Solid: Wrong number of bounding surfaces (6 required).
Sample files
Boundary Solid1.ms2 is a simple rectangular block whose faces are 6
BSurfs.
Boundary Solid-Prism.ms2 is a prismatic block with a degenerate BSurf
's5' as one of its faces. If you move 's5' to the top of the list of parents, the
resulting solid does not fill the volume enclosed by the surface parents.
BlockSolid
A BlockSolid is a very simple solid requiring minimal parents. It is a
rectangular solid, oriented by a frame and otherwise supported by just
two points at two opposite corners.
Characteristic Data
58
Associated errors
None
Sample files
BlockSolid2.ms2 is the simplest example of a block. It uses the default
frame '*' , so its faces are parallel to the global coordinate system.
59
the solid runs along these B-splines; w = 0 is at the first supporting
surface and w = 1 at the last one.
Z
BLoftSolid
'blendctrsurf' X
'bsurfmiddle'
Y 0,0
u 0,0
w
'bsurfbottom' v 0,0
Bsolid
60
CopySolid
Associated errors
None
Sample files
CopySolid1.ms2 is an example of a CopySolid 'o1' made as a mirror
image of another solid 'o0', reflected in the X=0 plane. RPYFrame 'F0' is
located at MirrPoint 'p9', is left-handed (Orientation = 1) and has Pitch of
180 degrees, so its three axes are all parallel to the global X,Y,Z axes, but
the x-axis is reversed.
Ruled Solid
Characteristic data surface1 and surface2 = surface parents
relabel = name of Relabel object or ‘*’ for default labeling
Description The RuledSolid is a solid between two supporting surfaces. It is
generated by taking the point on each of the surfaces at each given u,v
and constructing the line (“ruling”) between. w is the parameter along
the line.
The supporting surfaces must have similar u,v orientation — the 0,0
corners need to be in a relatively similar place, and u and v must run in
similar directions (otherwise the solid could wind up with an
unexpected twist).
u and v for the solid run in the same directions as u and v for each
supporting surface. w is along the rulings. from surface1 to surface2.
relabel is used to control the labeling of the w-direction of the solid. The
default relabel ‘*’ produces linear labeling with respect to w.
Example 1 ruledsolidballast1.ms2
This is the outside lead ballast casting for a trapezoidal fin keel. The lead
line is adjustable by dragging rings 'r0', 'r1'. You can have the weight
schedule open and watch weight and C.G. change as you adjust the lead
line.
The lead line at the keel surface is an IntSnake. The SubSurf 's0' below
the leadline is projected to centerplane (ProjSurf 's1'), then 's0' and 's1' are
the parents for the RuledSolid.
61
X
RuledSolid
'ballast_center'
0,0,0
w
u
v
'ballast_outer'
Example 2 ruledsolidballast2.ms2
Example 2: ruledsolidballast2.ms2
This is a bulb keel using solids to get weight and C.G. of the fin and bulb
combination. ‘bulb_solid’ is a RuledSolid between the bulb surface and a
deliberately degenerate RuledSurf that lies along the bulb axis
(projection of ‘meridian’ on axis line). ‘keel_solid’ is a RuledSolid
between the fin surface and a ProjSurf on the centerplane. Note that
‘keel_solid’ has orientation = 1 to give it a positive volume and weight.
The missing lead where the fin passes through the bulb (we assume here
the fin goes all the way through the lead) is accounted for by
‘subtr_solid’. The weight schedule gives the correct weight and C.G. for
the combination.
'keel_solid'
'bulb_solid'
'subtr_solid'
62
u
'bulb_ctrline' 0,0,0 w
w v
u v
0,0,0 'keel_ctr'
'bulb'
'keel'
RuledSoilds
u
0,0,0 w
v
'subtr_ctr'
'subtract'
The three solids in RULEDSOLIDBALLAST2.MS2. The w parameter on the keel and the
subtraction solids are transverse lines from ‘keel’ and ‘subtract’, respectively, to the centerplane.
63
Each triangle has 3 edges -- lines connecting 2 nodes. Each edge can be
shared with at most one other triangle. An edge that is not shared with
another triangle is a boundary edge, and is part of the boundary of the
Triangle Mesh.
The triangles must be sufficiently connected by shared edges so you can
reach any triangle in the set from any other by stepping from one
triangle to the next, always crossing shared edges. For example, two
triangles sharing just a single node do not make a valid Triangle Mesh,
nor do two triangles that don't share any nodes.
Unlike a surface, which has an invisible extension outside the 0-to-1
parameter range, a Triangle Mesh has no extension; when you come to
the boundary, you're really at the boundary.
Recursive subdivision
Subdivision is an operation applied to a Triangle Mesh, that results in
another Triangle Mesh with 4 times the number of triangles. The nodes
for the subdivided mesh are derived from the original nodes by an
averaging or smoothing operation
In each stage of subdivision, a new node is generated near the middle of
each existing edge, and each original triangle is replaced by 4 triangles.
Recursive subdivision is the repeated application of the subdivision
operation. Any Triangle Mesh entity has a degree property that controls
its degree of recursive subdivision. degree is a non-negative whole
number. The default value is 0, which means "no subdivision". The
unsubdivided mesh is often referred to as the "coarse mesh".
Common data
Orientation. Any Triangle Mesh entity has a normal orientation
property with one of the two values: Normal and Reversed. This is very
similar to the orientation property of a surface; it just defines which
direction will be considered the positive normal.
64
Weight/unit area. A Triangle Mesh has a weight/unit area property that
is completely analogous to weight/unit area for a surface. It is multiplied
by the Triangle Mesh area for inclusion in the Weight Schedule.
Visibility options. The edges of component triangles can be made
visible or hidden.
Kind. A Triangle Mesh has a kind, which is not yet used for anything.
The only valid value for kind is 0.
Degree. The degree of subdivision, a nonnegative whole number.
Triangle Mesh
Description This is the most basic form of Triangle Mesh, where the nodes are
explicit point entities, and the connection into triangles is explicitly
specified.
65
Scale Factors, X, Y, and Z
Nodes = A list of real values which are node coordinates in groups of
three; each group of three is the x, y, z coordinates of one node.
Triangles = A list of integers which are node indices in groups of three;
each group of three is a triangle.
Breaks = A list of node indices that identify breakpoints and breaklines.
Description This is another basic way to represent a Triangle Mesh as a list of nodes
and a list of triangles. Rather than depending on point entities for its
nodes, a LtTriMesh is a self-contained single entity. This makes it
relatively compact. It is implemented primarily for purposes of
importing large triangle meshes from other systems.
Also see: Triangle Mesh; Light NURBS Surface
Example LtTriMesh1.ms2
This is the same example as TriMesh1.ms2, but cast in the form of a Light
Triangle Mesh. Frame coordinates for the five supporting points are in
the Nodes section. The Triangles section is the same as in TriMesh1.ms2 -
- node indices for 4 triangles.
66
Example SurfTriMesh1.ms2
‘patch’ (the basis surface) is a Translation Surface. Surface Triangle Mesh 'I0'
has nu = 8, nv = 4, and style = 0. It therefore divides 'patch' into 8 x 4 x 2 = 64
triangles. These are uniformly distributed in both u and v directions, because
'patch' has no degree-1 breaklines.
Copy TriMesh
Description Copy entities takes a parent of the same class (the parent entity); two
frames; and three scale factors. The two “environments” are two frames,
designated Frame0 (the “source” frame) and Frame1 (the “destination”
frame). The process of constructing the Copy object has three steps:
1 transform the basis object into frame coordinates in Frame0;
2 apply the three stretching factors to the x, y, z coordinates in Frame0;
3 create the Copy at those same x, y, z coordinates in Frame1.
All this sounds like a lot of Frames. Although Frames are versatile and
not hard to create, remember that any point can serve as a frame; its x, y,
z axes are parallel to the global X, Y, Z axes respectively. In practice,
some 90% of Copy entities will use points for one or both frame parents.
Also see: Copy Curve, Copy Surface
Example CopyTriMesh1.ms2
‘tm’ (the parent Triangle Mesh) is a 5-node, 4-triangle Triangle Mesh
entity similar to TriMesh1.ms2. 'I0' is a Copy Triangle Mesh made from
'tm', with the two points 'p3' and 'p6' as the two frames. 'I0' has an x-
scale factor of 0.5, so it is only half as wide in the X-direction as its
parent.
PolyTriMesh
Description The Poly Triangle Mesh entity type is two or more Triangle Mesh objects
assembled into a single Triangle Mesh. The component Triangle Meshes
currently need to have compatible triangulations, with nodes agreeing
within a tolerance specified by the log-tolerance parameter.
67
Also see: Poly Surface
Example PolyTriMesh1.ms2
Poly Triangle Mesh ‘I0’ is assembled from two parent Triangular
Meshes: 'tm1' (6 nodes, 4 triangles) and 'tm2' (9 nodes, 8 triangles). Since
the two parents share 3 point entities as their common nodes, the value
of Log-tolerance is not significant in this example.
Example TMBSnake2.ms2
This model has 7 Triangle Mesh Magnets supporting two Triangle Mesh
B-spline Snakes.
68
TMMagnet/TriMesh can be either a Triangle Mesh Magnet or Ring, or a
Triangle Mesh entity.
When TMMagnet/TriMesh is a magnet or ring, it serves two purposes:
(1) It specifies which Triangle Mesh the Triangle Mesh Projected Magnet
is to lie on -- the host Triangle Mesh of the magnet or ring.
(2) It gives a starting location for the iterative search for the projection
point. In the case of multiple intersections of the host Triangle Mesh with
the line of projection, the Triangle Mesh Projected Magnet will (usually)
be made at the intersection nearest to the starting location (in terms of
distance measured within the Triangle Mesh, not 3-D distance).
When TMMagnet/TriMesh is a Triangle Mesh, it specifies directly which
Triangle Mesh the Triangle Mesh Projected Magnet is to be hosted on. In
case of multiple intersections of the projection line, the starting location
for the search will be at triangle 1 of the host Triangle Mesh, and the
search will usually converge to the intersection closest to triangle 1.
Example TMProjMagnet1.ms2
Triangle Mesh Projected Magnet 'G1' (bright red) is the vertical
projection of Point 'P0' onto the Surface Triangle Mesh 'I0', using the
system plane *X=0 for the mirror.
Triangle Mesh Projected Magnet 'G2' (bright white) is the normal
projection of Point 'P0' onto the Surface Triangle Mesh 'I0', by using 'I0'
as the Mirror/TriMesh parent.
Example TMBSubSnake1.ms2
This model has four Triangle Mesh Rings (bright blue) marking locations
on two different Triangle Mesh B-spline Snakes (magenta) for the ends of
SubSnakes (yellow and bright cyan).
69
There is a class of Triangle Mesh Snakes representing curves embedded in a Triangle Mesh. These are
highly analogous to snakes on surfaces. There is a variety of possible ways to specify them, represented by
5 different entity types.
NOTE: Triangle Mesh snakes are curves, but for technical reasons in Surface Works 5.0 they can't serve as
curve parents for other entities (for example, as master curves for a surface).
70
Triangle Mesh Edge Snake
Description A Triangle Mesh Edge Snake is a curve that follows the boundary of a
Triangle Mesh, between two Triangle Mesh Magnets. The two magnets
must be hosted by the same Triangle Mesh entity; they must both lie on
the boundary; and if the Triangle Mesh has multiple boundaries, the two
magnets must be on the same boundary.
Two boundary magnets divide a boundary loop into two parts. Type
determines which of those parts becomes the Triangle Mesh Edge Snake.
Example TMEdgeSnake1.ms2
This model has two Triangle Mesh Edge Snake examples. The host
Triangle Mesh 'tm' is similar to the Trimesh1.ms2 example, but has a
subdivision degree of 2. The two Triangle Mesh magnets 'G0' and 'G1'
(bright red) lie on the boundary of 'tm'. Edge Snake 'N0' (magenta) goes
from 'G0' to 'G1' in the counterclockwise direction. Edge Snake 'N1'
(yellow) is made from the same two magnets, in the same order, but,
being type-1, goes in the clockwise direction.
71
The surface doing the cutting can be the actual plane, frame (its x,y-
plane) or surface specified by Mirror/Surface, if Point lies in that plane or
surface; or it can be a virtual cutting surface offset from Mirror/Surface
and passing through Point. (For details, see "Specifying the cutting
surface".)
The Type property is significant only when the intersection is a closed
curve. Then it is used to determine the clockwise/ counterclockwise
orientation of the Intersection Snake.
Example TMIntSnake1.ms2
'tm' is a Triangle Mesh similar to TriMesh1.ms2. The parents of Triangle
Mesh Intersection Snake 'N0' are:
Triangle Mesh Magnet 'G0' (red)
System plane *Y=0
Bead 'e0' (bright white)
'G0' specifies the host Triangle Mesh for the snake ('tm', host of 'G0'), and
selects which end of the cut will be the t = 0 end of the snake. The cut is
with a plane parallel to *Y=0, passing through 'e0'. (2-point Plane 'a0' is
included in the model to show the cutting plane. but is not directly
involved in the Intersection Snake.)
72
dropped normally to the Triangle Mesh. (Usually this is the closest point
on the Triangle Mesh.)
TMMagnet/TriMesh specifies the Triangle Mesh the Projected Snake is to
lie on. When TMMagnet/TriMesh is a Triangle Mesh magnet or ring, it
serves two purposes:
It specifies which Triangle Mesh the Projected Snake is to lie on: the
Triangle Mesh that is host to TMMagnet.
It provides a starting location on the Triangle Mesh for the iterative
search that locates the first point (the t=0 end) of the Projected Snake.
This is especially important in case of multiple intersections of the
Triangle Mesh with the projection line; then the location of TMMagnet
will help to select the correct one of two or more possible Projected
Snakes.
Whenever you create a Triangle Mesh Projected Snake, we recommend
you use a magnet or ring for the TMMagnet/TriMesh parent, locating it
reasonably near where the Projected Snake is to begin.
When TMMagnet/TriMesh is a Triangle Mesh, it specifies directly the host
triangle mesh for the Projected Snake. The search for the intersection
point at the t = 0 end of the snake will start at the first triangle of the
Triangle Mesh.
Example TMProjSnake2.ms2
‘tm’ is a dome-shaped Triangle Mesh entity with 7 nodes, 6 triangles,
and 2 degrees of subdivision. Curve is a B-spline Snake 'n0' (magenta)
drawn on the B-spline Surface 's0'. Triangle Mesh Projected Snake 'N0'
(yellow) is the vertical projection of 'n0' onto 'tm', using the system plane
*Z=0 as mirror. Triangle Mesh Magnet 'G1' (bright red) identifies the
host Triangle Mesh for the Projected Snake (its host, 'tm'), and provides a
starting location for the projection of its t = 0 end.
73
The Triangle Mesh SubSnake is hosted on the Triangle Mesh that is host
to its parent TMRings. The TMRings must all be on the same Triangle
Mesh snake (the parent snake). Predefined rings *0 and *1 can be used
for any of the TMRings, except at least one of the TMRings has to be an
actual bead or ring, in order to specify the parent snake.
Degree is the B-spline degree for the blending functions: 1 = linear, 2 =
quadratic, 3 = cubic, etc. As usual, if the number of parents N is less than
Degree+1, the splines are automatically demoted to degree N+1.
The Direction property is active only when the parent snake is periodic.
Then there are two possible ways to get from ring1 to ringN -- clockwise
and counterclockwise. When Direction is Normal, the subsnake will use
the part that goes around in the host snake's positive t direction; when
Direction is Reverse, it will use the other part.
Example TMBSubSnake1.ms2
This model has three example Triangle Mesh Subsnakes.
'N2' (yellow) is between Triangle Mesh Rings 'W0' and 'W1' (bright blue)
on Triangle Mesh B-spline Snake 'N0' (magenta).
'N3' (yellow) is between Triangle Mesh Rings 'W2' and 'W3' in the
Normal direction, i.e. its t parameter runs in the same direction as the
periodic parent snake, Triangle Mesh B-spline Snake 'N1' (magenta).
'N4' (bright cyan) is also between Triangle Mesh Rings 'W2' and 'W3', but
is in the Reverse direction, i.e. its t parameter runs counter to the t
parameter of the parent snake 'N1'.
Formulas
MultiSurf 5.x has a profound new capability for generation of parametric families of geometric models, in a
new class of real-valued objects: the Variable and Formula entity types. This is a complex topic, full of
new information and rich with new possibilities.
Constants
Constants are 1.23, -0.7, 12e-8, +98, etc. Although they have no units they are always considered
to carry the adequate unit needed at the particular location where they are used.
For instance in
Point P 1 1 / 1 2 3 ;
1, 2 and 3 are considered as having length units.
In
AbsMagnet M 1 1 / S 0.123 0.456 ;
74
the u and v parameter values 0.123 and 0.456 are considered to be unitless.
Variables
Please see the document “What’s New in MultiSurf 5.0” for complete Variable documentation.
Formulas
A formula expresses a computation from constants, variables and other formulas with operators
and functions; it carries units resulting from its expression.
Basic syntax
The simplest syntax for a formula is:
Formula name / { expression } ;
For instance
Formula c / { 177.69 } ;
Formula f / { x } ;
Formula s / { x + y } ;
Formula s / { x + 5 * y } ;
Expression
Operators
The expression of a formula can be made with the usual operators ‘+’ (addition), ‘-‘ (subtraction),
‘*’ (multiplication), ‘/’ division. Exponentiation is symbolized with ‘^’ and is evaluated right to left, i.e.
x^y^z is x^(y^z) and not (x^y)^z. Parentheses can be used to prioritize the evaluation.
Formula d / { b^2 – 4*a*c } ;
Formula P / { R*I^2 } ;
Formula V / { n * R * T / P } ;
Formula s / { (1-t^2)/(1+t^2) } ;
Functions
A set of mathematical functions and object accessors is available:
75
TAND 1, degree (unitless) Unitless Tangent
ATN 1, unitless Radian (unitless) Arc tangent
ATND 1, unitless Degree (unitless) Arc tangent
ATN2 2, both with same any units Radian (unitless) Arc tangent(y/x)
ATN2D 2, both with same any units Degree (unitless) Arc tangent(y/x)
LOG 1, unitless Unitless Natural logarithm
LOG10 1, unitless Unitless Decimal logarithm
EXP 1, unitless Unitless Exponential
SQRT 1, unit dimensions multiple of 2 Units dimensions of argument Square root
divided by 2.
ABS 1, any units Same units as argument Absolute value
ROUND 1, any units Same units as argument Rounding
MIN 2, both with same any units Same units as arguments Minimum
MAX 2, both with same any units Same units as arguments Maximum
TPOS 1, bead Unitless T parameter
UPOS 1, magnet Unitless U parameter
VPOS 1, magnet Unitless V parameter
XPOS 1, point Length X coordinate
YPOS 1, point Length Y coordinate
ZPOS 1, point Length Z coordinate
DIST 2, point, point Length Distance between points
CLEAR 2, point, graphic object Length Clearance
ANGLE 3: point, point, point Unitless (degree) Angle of three points
ARCLEN 3: curve, unitless, unitless Length Arc distance along curve
GRAPH 2: graph, unitless Unitless Evaluation of graph
FRAMEPOS 3: point, frame, index (1-3, for Length Coordinates in frame
x,y,z coordinate)
AREA 2; surface, use_sym (0 or 1) Area = L^2 Area of surface
VOLUME 2; solid, use_sym (0 or 1) Volume = L^3 Volume of solid
CENTROID 3; object, use_sym (0 or 1), index Length Coordinates of centroid
(1-3, for X,Y,Z coordinate)
IF 3: any units Same as units of selected If arg1 <=0, arg2, else arg3
argument
Examples
Formula I / { A * SIN( omega * t + phi ) } ;
76
Formula y / { SQRT( ABS( b^2 - 4 * a * c ) ) } ;
Unit consistency
Rules
Variables or formulas cannot appear anywhere inside a formula: unit consistency must be
observed. The units of the result of a formula must be specified and must match the units generated by the
expression. The rules are:
1. Only variables and formulas of same units can be added or subtracted.
2. Exponentiation of an expression with a rational exponent (this includes the SQRT function) is
only possible if the result has integral unit dimensions, e.g SQRT( x^2 + y^2 ) is valid,
(x^3)^(1/4)
3. Constants are considered to have the same units as the other operand in a sum and no units in
a product, e.g .in 1 – x, 1 is considered to have the same units as x. This is offered as a
facility: no physically meaningful formula has unit-less additive constants, since the formula
would become inconsistent in case of unit scaling.
4. Function arguments and results have unit dimensions as specified in the preceding chapter.
Unit mismatch is an error. Unit consistency is checked at parse time when possible (the unit dimensions of
x^y cannot be determined without knowing y’s value). It is however completely checked at evaluation time.
Examples
Point V1 1 1 / 1 2 3 ;
Point V2 1 1 / 4 5 6 ;
Formula V1dotV2 / { XPOS(V1)*XPOS(V2)
+YPOS(V1)*YPOS(V2)
+ZPOS(V1)*ZPOS(V2)
} L^2 ;
Evaluation logic
No simplification
Expressions are not simplified, therefore
Formula f / { x - x } ;
No optimization
No optimization is performed which would prevent parents from being evaluated, e.g. in
Formula f / { x * y } ;
77
y will be evaluated even if x is 0.
Complete syntax
‘Formula’ name { attr, } { ‘R:1’ } ‘/’ ‘{’ expr ‘}’ { units } ‘;’
Due to the fact that numeric constants are needed in formulas, and that MS2 syntax allows object
names such as 12, 4e3, etc., objects with such names will not be recognized inside the expression of a
formula, between { and }; these symbols will be considered as numeric constants instead. Likewise, objects
having the same name as a function (SIN, SQRT, XPOS...) will not be recognized.
Variable A / 10 L ;
Variable B / 5 L ;
Variable C / 30 L ;
Variable D / 25 L ;
Point P1 14 1 / 0 0 0 ;
Point P2 14 1 / A 0 0 ;
Point P3 14 1 / A B B ;
Point P4 14 1 / C B B ;
Point P5 14 1 / C 0 0 ;
Point P6 14 1 / D 0 0 ;
Variable k0 / 0.25 ;
Variable k1 / 0.75 ;
KnotList kl / { 0 k0 0.5 k1 1.0 } ;
Variable w0 / 1 ;
Variable w1 / 3 ;
NURBCurve spline0 11 5 64x1 / * 2 kl { P1 1 P2 w0 P3 w1 P4 1 P5 1 P6 w0 }
;
Note that since a variable is defined by three real numbers, these can be replaced by variables or
formulas: you can for instance have a variable with a variable range:
Variable min / 0 ;
Variable max / 24 ;
Variable x / 7 (min,max) ;
In this case the objects used as value and range bounds must all carry the same units (as always,
constant are assigned the units that match).
78
User interface
Figure 2 shows the properties for the newly created Formula ‘f1’. Note the Unit dimensions are
specified as “Length”. Figure 3 is the Expressions dialog. The DIST expression was chosen from the
“Functions” drop-down and the two points were added from the “Entities” drop-down. The expression was
completed, by adding the closed parenthesis from the dialog, or your keyboard.
When you are editing a real value in the data for any object, you can use an appropriately
dimensioned real object (Variable or Formula) instead of a constant. For example, creating or editing a
RadiusArc, one required data element is the Radius. When you select this item a constant or a real object
can be entered. Figure 4 shows a Radius Arc with the Radius field active and a radius of 1. To enter a
Formula, go to the Surfer View and choose the appropriate Formula. (Figure 5) Figure 6 shows Formula
‘f1’ as a parent, which has a value of 0.500.
Fig.2
Fig. 3
79
Fig. 4 Fig. 5
Fig. 6
80
Example Application
The following syntax generates the profile of an I-beam given four
parameters: Height, Width, FlgThk, WebThk (note how FlgThk, WebThk are
upper-bounded).
81