SelectPointsWithSplines
SelectPointsWithSplines lets you to draw precise splines on a model, remove and rename them. It also allows loading and saving splines to a file. The output of the node are a named points on the geometry triangles, which are obtained from the drawn splines that are sampled to points using sampling parameters.
You can merge two sets of named points using a MergePoints node.
Two sets of named points can be combined into PointCorrespondences
using a PointsToPointPairs node.
Editor
SelectPointsWithSplines node has a visual editor that allows adding, removing, editing, and renaming splines.
In idle state:
LMB |
on geometry to start drawing a new spline |
ALT + LMB |
on existing spline to start drawing a new spline |
SHIFT + LMB |
on spline to select it |
LMB |
on spline and drag to edit |
CTRL + LMB |
to delete spline point |
D |
to switch between drawing splines and showing result points modes |
When drawing a spline:
LMB |
on geometry to add point to spline |
LMB |
on spline and drag to edit |
CTRL + LMB |
to delete spline point |
SHIFT + LMB |
on geometry to add shortest path to spline |
RMB / ENTER |
to finish spline |
LMB outside geometry |
to finish spline |
ESC |
to cancel spline drawing |
Splines positions are stored as set of control points relative to a mesh triangles in which the control points are located so the same splines is suitable for different models with the same topology.
Tip
If model has topological or X/Y/Z symmetry you can use Symmetry parameter to draw or edit symmetrical splines simultaneously.
Inputs
- Geometry
Geometry
An input geometry
Output
NamedPointsOnTriangle
Sampled points on geometry triangles from drawn splines
Parameters
- Snap to Vertices:
if set, when drawing or changing spline control points they will be placed at the nearest vertex of the geometry
- Symmetry:
- No Symmetry
draw and edit one spline at a time
- Topological
draw and edit two splines by topological symmetry at a time
- X
draw and edit two splines by X-axis symmetry at a time
- Y
draw and edit two splines by Y-axis symmetry at a time
- Z
draw and edit two splines by Z-axis symmetry at a time
- Mirror:
creates a symmetric spline for the current selection if the geometry has topological symmetry
- Reverse:
reverses the order of control points of the selected spline
- Delete:
deletes the selected spline
- Resample Control Points:
resamples the control points of the selected spline
- Point Sampling Mode:
- Fixed Number per Spline
uses Num Points per Spline parameter and samples result points per spline
- Fixed Number per Segment
uses Num Points per Segment parameter and samples result points per spline segment
- Num Points per Spline:
defines a number of resulted sampled points per spline, if Fixed Number per Segment is selected this parameter will be ignored
- Num Points per Segment:
defines a number of resulted sampled points per spline segment, if Fixed Number per Spline is selected this parameter will be ignored
- Show:
- Splines
enables editing splines mode
- Result Points
enables showing resulted sampled points mode
- Show Labels:
if set, splines and resulted sampled points names are displayed in the visual editor
- Spline Base Name:
a base name for a newly created spline
- Spline Padding:
defines a minimal number of digits that will be used in the name of a newly created spline
- Spline-Point Separator:
a separator that will be placed between spline name and point index in a resulted sampled points
- Auto Point Padding:
if set, automatically computes optimal Point Padding per spline
- Point Padding:
defines a minimal number of digits that will be used in the names of a resulted sampled points, if Auto Point Padding is set this parameter will be ignored
- Splines:
a widget that allows you to see all the splines you have drawn and select them
- Rename All Splines:
renames all the splines according to specified base name and padding.
- Delete All Splines:
deletes all the splines
- Rename:
renames the selected spline
- Import:
loads splines control points from a file
- Export:
saves splines control points into a file
File Formats
Splines can be imported/exported in the following JSON formats:
Point On Triangle
The control points of a splines are represented in the following JSON format:
[ [0, 0.3, 0.5], [1, 0.0, 1.0], [2 0.5, 0.2] ]
This line stores three control points of one spline. Each point is represented with 3 numbers:
index of the triangle containing the point
the first barycentric coordinate of the point inside the triangle
the second barycentric coordinate of the point inside the triangle
Tip
If a model contains polygons with more than 3 vertices Wrap implicitly stores a triangulated version of the model. Wrap uses naive fan triangulation with the fan origin at the first vertex of the polygon.
Tip
Barycentric coordinates is a way to encode point position inside a triangle with two numbers U and V. If a triangle has 3 vertices with 3D coordinates A, B and C, barycentric coordinates U and V defines a point in 3D which position is calculated like:
P = A * U + B * V + C * (1 - U - V)
3D-Point
This JSON format stores control points of a splines as coordinates in 3D space.
[ {"x":-4.0,"y":-2.0,"z":-1.0}, {"x":2.0,"y":1.2,"z":5.0}, {"x":2.0,"y":1.7,"z":0.5} ]
This line stores three control points of one spline. Each point is represented with 3 numbers:
X coordinate of the point
Y coordinate of the point
Z coordinate of the point