NodeIcon 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

SHIFT + LMB

on selected spline to continue drawing

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 main JSON formats:

Named Splines of Points on Triangles:

main storage format for splines as named arrays of positions on triangles

Splines of Points on Triangles:

main storage format for splines as an array of arrays of positions on triangles (Doesn’t save spline names)

Named Splines of 3D-Points:

main storage format for splines as named arrays of 3D-points

Splines of 3D-Points:

main storage format for splines as an array of arrays of 3D-points (Doesn’t save spline names)

If you need to import/export spline control points as normal points (for example, to import into SelectPoints node), you can use the following JSON formats:

Splines as Named Control Points on Triangles:

a format that allows you to import and export splines as a set of named positions on triangles

Splines as Named Control 3D-Points:

a format that allows you to import and export splines as a set of named 3D-points

Single Spline as Control Points on Triangles:

a format that allows you to import and export selected spline as array of positions on triangles (Doesn’t save spline name)

Single Spline as Control 3D-Points:

a format that allows you to import and export selected spline as array of 3D-points (Doesn’t save spline name)

Spline control points can be represented in JSON in one of two main formats:

Point on Triangle

In JSON form it is presented as an array of three numbers:

[2, 0.5, 0.2]

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

Using this format for storing points, you can transfer splines/points from one model to another if their topology is the same.

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

In JSON it is presented as a dictionary of three numbers:

{"x":2.0, "y":1.7, "z":0.5}

Each point is represented with 3 numbers:

  • X coordinate of the point

  • Y coordinate of the point

  • Z coordinate of the point

Tip

Using this format for storing points, you can transfer splines/points from one model to another if their shape is the same.