Contour 2D¶
Functionality¶
This node creates one or many contours at specified distance.
It is fed by sets of vertices and edges.
Every set of vertices needs to share the Z coordinate in order to create a valid contour.
Inputs¶
This node has the following inputs, all of them can accept one or many different values:
Distance - distance to vertex.
Nº Vertices - Number of vertices per vertex
Verts_in - origin vertices.
Edgs_in - edges (pairs of integers).
Parameters¶
Parameter |
Type |
Default |
Description |
---|---|---|---|
Mode |
Menu |
Constant |
Constant: Constant distances on each perimeter. Weighted: Different distances per vertex. |
Remove Doubles |
Float |
1.0 |
Remove doubled vertices under this distance. |
Distance |
Float |
1.0 |
Distance to vertex. |
Nº Vertices |
Float |
1.0 |
Number of vertices per vertex. |
Verts_in |
Vector |
(0.0,0.0,0.0) |
Origin vectors. |
Edges_in |
Int tuples |
[] |
Connection between vertices |
In the N-Panel |
|||
Mask Tolerance |
Float |
1.0e-5 |
Tolerance on masking (for low Nº Vertices or small values) |
Inters. Mode |
Menu |
Circular |
Circular: Intersection based on circles (Slower). Polygonal: Intersection based on polygons (Faster). |
List Match |
Menu |
Long Cycle |
Long Repeat: After shortest list repeat last value. Long Cycle: After shortest list got to first last value. |
Remove Caps |
Boolean |
False |
Remove arcs in the vertices with only one edge. |
Outputs¶
This node has the following outputs:
Vertices
Edges
Examples of usage¶
Number-> List Input
Scene-> Objects In Lite
Viz-> Viewer Draw
When you input different distances: In constant mode independent contours will be created (one per distance) In Weighted mode will apply each distance to a vertex creating independent contours when there are more distances than vertices
Generator-> Line
Range Float: Number-> Number Range
Matrix-> Matrix In
List->List Struct-> List Repeater
Viz-> Viewer Draw
Text-> Stethoscope
When you input different objects independent contours will be created:
Modifiers->Modifier Change-> Mesh Join
Scene-> Objects In Lite
Viz-> Viewer Draw
With the intersection mode on “Circular” the intersection points will be placed as if we were using perfect circles. This will change the edges angles, but the distance between the intersection point and the original points will be maintained. On “Polygonal” the edges angles are preserved but the distance to original vertex will depend on the number of vertices.
Generator-> Line
Matrix-> Matrix In
Viz-> Viewer Draw
Integrated list match function can lead to different results:
Generator-> Line
Number-> List Input
Range Float: Number-> Number Range
Matrix-> Matrix In
Viz-> Viewer Draw
Different ranges can be used to create a complex contour.
Generator-> NGon
Modifiers->Modifier Change-> Smooth Vertices
Modifiers->Modifier Change-> Triangulate Mesh
Modifiers->Modifier Make-> UV Connection
Number-> A Number
Range Float: Number-> Number Range
Vector-> Vector In
ADD: Vector-> Vector Math
Vector-> Vector Interpolation
List->List Main-> List Join
List->List Struct-> List Flip
List->List Struct-> List Split
Viz-> Viewer Draw
When using text meshes it can get very slow but also interesting
Transform-> Matrix Apply (verts)
Analyzer-> Mesh Filter
Analyzer-> Mesh Filter
Number-> A Number
ADD: Number-> Scalar Math
Range Float: Number-> Number Range
Matrix-> Matrix In
List->List Main-> List Join
Scene-> Objects In Lite
Viz-> Curve Viewer
Viz-> Viewer Draw
Notes¶
This implementation can get very slow when working with hundreds of inputs and different distances, handle it with patience.
If the node does not create a closed contour try increasing the vertices number or rising the mask tolerance slowly
This is the pull request where this node was added https://github.com/nortikin/sverchok/pull/2001