Next Previous Contents

## 5. NURBS Modeling Tools

This section describes NURBS curve and surface related modeling tools, which you can find in the `"Tools"` menu of the main window.

## 5.1 The Closed BSpline Tool

A Closed B-Spline

- Arguments: Number of control points (i).
- Operation: This tool creates a closed cubic B-Spline curve with i+3 control points in the XY plane. The control points are arranged in a circle of radius 1 centered around the origin. This gives the curve a circular appearance (see image above) but it is not a true circle: If few control points are used, the radius of the circular curve is clearly smaller than 1. Furthermore, the parameterisation and curvature of the closed B-Spline are not exactly as one would expect from a circle. However, you can use the NURBCircle tool (see below) to create a true circle instead.
- Note: i must be atleast 3. The first three control points of the new curve will be identical to the last three. Additionally, the curve will be marked as closed, and the generation of multiple points will be enabled, so that point edit actions know that they may need to move two points. See also section Multiple Points.

## 5.2 The NURBCircle Tool

A NURBS Circle

- Arguments: None.
- Operation: The NURBCircle tool creates a full circular NURBS curve of radius 1 in the XY plane located at the origin.
- Note: The NURBS curve created by the NURBCircle tool is rational (uses weights). This means, editing the curve (e.g. moving control points) may lead to unpredicted results (the curve does not behave exactly as wished). Use a closed B-Spline created with the Closed BSpline Tool (see above) if you want to edit the curve further. You can use this circle to easily create a NURBS-torus by moving the circle along X and then revolving it. The amount of movement determines the radius of the torus, whereas the radius of the circle determines the thickness.

## 5.3 The NURBCircleArc Tool

- Arguments: angle of the arc in degrees
- Operation: The NURBCircle tool creates a circular NURBS curve arc of radius 1, with the specified angle, in the XY plane, located at the origin.
- Note: The NURBS curve created by the NURBCircleArc tool is rational (uses weights). This means, editing the curve (e.g. moving control points) may lead to unpredicted results (the curve does not behave exactly as wished).

## 5.4 The TrimRect Tool

- Arguments: None
- Operation: The TrimRect tool creates a two-dimensional piecewise linear NURBS curve of rectangular shape in the XY plane, that fits in the (u,v) parameter space of a NURBS patch, for use as trim curve.
- Note: To fit the curve to the parameter space of a NURBS patch, the NURBS patch object should be selected or the current level should be inside the NURBS patch. If no NURBS patch object is selected and the current level is not inside a NURBS patch, a curve with the coordinates (-1,-1), (-1,1), (1,1), and (1,-1) will be created instead. See section Trim Curves for a more detailed discussion of trim curves and how to use this rectangular curve.

## 5.5 The NURBSphere Tool

- Arguments: None.
- Operation: The NURBSphere tool creates a half circle NURBS curve and revolves it about the Y axis thus forming a sphere of radius 1.
- Note: The NURBS curve is deleted afterwards.

## 5.6 The NURBSphere2 Tool

- Arguments: None.
- Operation: The NURBSphere tool creates a Cobb-NURBSphere, consisting of 6 NURBPatches.
- Note: The NURBPatches are of high order (5).

## 5.7 The Revolve Tool

- Arguments: The revolve tool takes the selected objects from the selection.
- Operation: The tool creates a Revolve object, and moves the selected objects to it.
- Note: See section Revolve Object for more information regarding the revolve object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.8 The Extrude Tool

- Arguments: The extrude tool takes the selected objects from the selection.
- Operation: The tool creates an Extrude object, and moves the selected objects to it.
- Note: See section Extrude Object for more information regarding the extrude object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.9 The Sweep Tool

- Arguments: The sweep tool takes the selected objects from the selection.
- Operation: The tool creates a Sweep object, and moves the selected objects to it.
- Note: See section Sweep Object for more information regarding the sweep object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.10 The Cap Tool

- Arguments: The cap tool takes the selected objects from the selection.
- Operation: The tool creates a Cap object, and moves the selected objects to it.
- Note: See section Cap Object for more information regarding the cap object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.11 The Birail1 Tool

- Arguments: The birail1 tool takes the selected objects from the selection.
- Operation: The tool creates a Birail1 object, and moves the selected objects to it.
- Note: See section Birail1 Object for more information regarding the birail1 object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.12 The Birail2 Tool

- Arguments: The birail2 tool takes the selected objects from the selection.
- Operation: The tool creates a Birail2 object, and moves the selected objects to it.
- Note: See section Birail2 Object for more information regarding the birail2 object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.13 The Gordon Tool

- Arguments: The gordon tool takes the selected objects from the selection.
- Operation: The tool creates a Gordon object, and moves the selected objects to it.
- Note: See section Gordon Object for more information regarding the gordon object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.14 The Skin Tool

- Arguments: The skin tool takes the selected objects from the selection.
- Operation: The tool creates a Skin object, and moves the selected objects to it.
- Note: See section Skin Object for more information regarding the skin object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.15 The Revert Tool

- Arguments: The revert tool takes all NURBS curves and ICurves from the selection.
- Operation: The direction of the selected NURBS curves will be reversed.
- Note: The direction of a NURBCurve is shown as a small arrow at the end of the curve.

## 5.16 The Concat Tool

- Arguments: The concat tool takes two NURBS curves from the selection.
- Operation: The selected NURBS curves will be concatenated and a new third curve will be created.
- Note: If one of the curves has weights, the resulting curve will have weights too. If the knot type of the first curve is custom, it will be converted to NURB, otherwise the knot type of the new curve will be that of the first selected curve. Due to those changes of the knot values the resulting curve might differ from the original curves. See also section ConcatNC Object. The original NURBS curves will not be deleted by this tool.

## 5.17 The Split Tool

Left: original curve, Right: resulting split curves for t=0.5

- Arguments: The split curves tool takes a single NURBS curve from the selection and additionally requests a parametric value.
- Operation: The selected NURBS curve will be split into two new NURBS curves at the designated parametric value. The splitting process involves application of knot insertion, so that both new curves will get a custom knot vector.
- Note: The original selected NURBS curve will be changed and form the first of the two new curves, so you may want to keep a copy of it somewhere.

## 5.18 The Elevate Tool

Successive Application of Elevate Tool (Order 3 (left), 4 (middle), 5 (right))

- Arguments: The elevate tool takes a number of NURBS curves from the selection and additionally requests an integer value.
- Operation: The order of the selected NURBS curves will be raised by the specified integer value without changing the shape of the curve.
- Note: If the knot vector of the curve is not clamped, it will be clamped automatically. The knot type of the curve will be changed to custom. New control points will be added and the position of old control points may be changed in the progress.

## 5.19 The Refine Tool

Successive Application of Refine Tool

- Arguments: The refine tool takes a number of NURBS curves from the selection.
- Operation: The knot vectors of the selected NURBS curves will be refined by inserting a knot in the middle of each inner knot interval without changing the shape of the curve.
- Note: Because a new knot is inserted in the middle of each interval, knot vectors of type NURB and B-Spline will not change in type. See the image above for an example of a successive refinement of a simple NURBS curve. Note that the shape of the curve does not change, but the position of certain control points does. If you want to refine a curve with new control points and not change the position of existing control points, use the NCAttribute property GUI instead (simply increase the length of the curve by oldlength-1).

## 5.20 The Clamp Tool

Left: original curve, Right: clamped curve

- Arguments: The clamp tool takes a number of NURBS curves from the selection.
- Operation: The knot vectors of the selected NURBS curves will be changed using knot insertion so that the first and the last knot have a multiplicity equal to the order of the curve, without changing the shape of the curve. The curve will interpolate the first and the last control point afterwards. The knot type of the curve will be changed to custom.

## 5.21 The Insert Knot Tool

Left: original curve, Right: a knot has been inserted 1 time at t=0.5

- Arguments: The insert knot tool takes a number of NURBS curves from the selection and requests two additional values, a parametric value t and an integer value i.
- Operation: The specified knot (t) will be inserted i times into the knot vector of the selected curves, without changing the shape of the curve(s). The knot type of the curve will be changed to custom.

## 5.22 The Plot Curvature Tool

Curvature Plot (top) of simple NURBS curve (bottom)

- Arguments: The plot curvature tool takes a number of NURBS curves from the selection and requests three additional values: the number of data points, the width value and the height value.
- Operation: A new NURBS curve, depicting the curvature of the selected NURBS curve, will be created for each of the selected NURBS curves. The curvature plots will have a length defined by the number of data points and will be scaled to the specified width and by the specified height value. See also the image above.

## 5.23 The Shift Closed B-Spline Tool

- Arguments: The shift closed B-Spline tool takes a number of NURBS curves, that should be closed B-Splines, from the selection and requests one additional integer parameter.
- Operation: The control points of the curve(s) will be shifted, so that the second control point will be the first after this operation. The shifting process will be repeated according to the parameter value given. Eventually selected points will still be selected after this operation.

## 5.24 The To XY Tool

- Arguments: The To XY tool takes a number of NURBS curves from the selection. The NURBS curves should be planar.
- Operation: The control points of the curve(s) will be rotated, so that they are in the XY plane of the respective object space defined by the NURBS curve object(s). Additionally, the rotation attributes of the NURBS curve object(s) will be changed so that the curve does not change its orientation with regard to other objects or the world space.

## 5.25 The Make Compatible Tool

- Arguments: The Make Compatible tool takes a number of NURBS curves from the selection.
- Operation: The curves will be made compatible, so that they are of the same order and defined on the same knot vector afterwards.

## 5.26 The Collapse Points Tool

- Arguments: The collapse tool expects a selected NURBS curve and a number of selected (tagged) control points (see section Selecting Points for information on how to select (tag) control points).
- Operation: The selected control points will be made a single multiple point, all points will get the coordinate values of the last tagged point.

## 5.27 The Explode Points Tool

- Arguments: The explode tool expects a selected NURBS curve and a number of selected (tagged) multiple points (see section Selecting Points for information on how to select (tag) control points).
- Operation: The points forming the selected multiple points will be made to simple points again and may be edited separately.
- Note that even though you might have exploded some multiple points Ayam will re-create them on several occasions like reading of a scene, inserting/deleting points, and applying the NURBCurveAttrib property if they still have identical coordinate values. In other words, you should immediately edit the control points after exploding!

## 5.28 The Swap UV Tool

- Arguments: The swap uv tool takes a number of NURBS patches or BPatch or PatchMesh objects from the selection.
- Operation: The u and v dimension of the selected objects will be swapped without changing the shape of the patches.

## 5.29 The Elevate UV Tool

- Arguments: The elevate uv tool takes a number of NURBS patches from the selection and additionally requests two integer values.
- Operation: The order of the selected NURBS patches will be raised by the specified integer values without changing the shape of the patches.
- Note: If the knot vector of the patch is not clamped, it will be clamped automatically. The knot type of the patch will be changed to custom. New control points will be added and the position of old control points may be changed in the progress.

## 5.30 The Revert U Tool

- Arguments: The revert u tool takes a number of NURBS patches or BPatch or PatchMesh objects from the selection.
- Operation: The control point arrays of the selected objects will be reversed in the u dimension (width).

## 5.31 The Revert V Tool

- Arguments: The revert v tool takes a number of NURBS patches or BPatch or PatchMesh objects from the selection.
- Operation: The control point arrays of the selected objects will be reversed in the v dimension (height).

## 5.32 The Split to Curves Tool

- Arguments: The split to curves tool takes a single NURBS patch from the selection.
- Operation: The selected NURBS patch will be split into NURBS curves, along direction u or v.
- Note: The NURBS patch is not deleted afterwards.

## 5.33 The Build from Curves Tool

- Arguments: The build from curves tool takes a number of NURBS curves from the selection.
- Operation: The selected NURBS curves will be parsed, all curves that are of equal length or longer than the first selected curve will be used to form a new NURBS patch of the following dimensions: Width: length of the first selected curve, Height: number of used curves. Other parameters (Knot-Type_U, Knots_U etc.) are taken from the first curve.
- Note: The NURBS curves are not deleted afterwards.

## 5.34 The Extract NC Tool

- Arguments: The Extract NC tool takes the selected objects from the selection.
- Operation: The tool creates a ExtrNC object, and moves the selected objects to it.
- Note: See section ExtrNC Object for more information regarding the ExtrNC object. This tool uses the object clipboard to move the objects so that the original clipboard contents are lost when this tool finishes.

## 5.35 The Tesselation Tool

- Arguments: The tesselation tool takes all NURBS patches from the selection.
- Operation: A modal dialog box (see image above) will pop up, that allows to select a tesselation method via a drop-down menu and tune the corresponding tesselation parameter using a slider and an entry widget. The initial parameter values will be derived from the TP tag of the first of the selected objects (if it has such a tag). The selected NURBS patches will be tesselated with the chosen parameters. The PolyMesh objects created by the tesselation will immediately be displayed in all view windows instead of the original NURBS patches. If the preference option `"LazyNotify"` is enabled, updates of the tesselation that normally occur while dragging the slider will be deferred until the mouse button is released. If the `"Ok"` button is pressed to close the tesselation tool, all selected NURBS patch objects will be replaced by their tesselated counterparts; if `"Cancel"` is used, all NURBS patch objects remain unchanged. If the check box `"SaveToTag"` is activated, closing the tesselation tool using `"Cancel"` will also add a `"TP"` tag containing the currently selected method and parameter value to all selected NURBS patch objects.
- Note: The tesselation tool will block all other parts of Ayam while it is running.

Next Previous Contents