Straight Skeleton 2d Offset (Alpha)¶
Functionality¶
This node is a python wrapper of function “Skeleton Offset 2d” of CGAL https://doc.cgal.org/latest/Straight_skeleton_2/index.html.
This package implements straight skeletons offset for two-dimensional polygons with holes.
Simple example:
More complex example:
Install dependency¶
To use node install additional library pySVCGAL in the Extra Nodes Section:
Inputs¶
Join mode. Preprocess source meshes. Split, Keep, Merge. Split - separate source meshes into independent islands and process them individually. Results boundaries can overlaps. Keep - If source meshes has several islands then they has influence. Merge - Combine all islands to influence all islands.
Shapes mode. Original, Exclude Holes, Invert Holes. Original - Process original meshes. Exclude holes - process only external boundaries. Invert Holes - process holes as islands, exclude external boundaries from process.
Offsets, Altitudes. Offsets - distance from contour in plane (one can use negative value). Altitudes - results heights in Z axis (one can use negative value).
If you do not connect any lists of floats values then this value will be used for every objects connected into this node:
Mask of objects - Mask hide objects. If element of boolean mask is True then object are hidden. If length of mask is more than length of objects then exceeded values will be omitted.
Parameters¶
Result Type. Contours or Faces. Contours - results are only edges. Faces - Results are faces with holes.
- Results Join Mode. Split, Keep, Merge.
Split - Separate all results into independent meshes. Keep - If some of objects has several independent meshes then they will be as one object on output. Merge - This node will merge all vertices, edjes, and faces into a single object. Results in merge mode can be overlapped.
Only Tests - If you have a hi poly mesh like imported SVG file one can save time and do not Skeletonize all meshes before fix all. You can connect viewer draw into the “Wrong Contours Verts” with red color or any color you prefer for errors to see any wrong contrours. Red dots are wrong contours.
Force z=0.0 - To force use meshes as planes
Verbose - Enabled - Show process messages in console while process meshes. Disabled - Hide any process messages.
Output sockets¶
Vertices, Edges, Faces - Results meshes.
Wrong Contour Verts - If source meshes can’t be processed then this socket will output vertices of that contours (ex. if meshes contours is self intersection)
Performance¶
If you have a low poly model then no problem - you can work with that model in real time:
If you try high poly like Besier 2D with many points and hi resolution (1) then better is to turn off (2) update sverchok nodes while editing objects and run process manually (3):
Examples¶
Boundary background contour:
Inner Offset
DEVELOPMENT¶
If you have skills for work with CGAL see: https://github.com/satabol/SVCGAL