sketch.segment.node.create

Syntax

p := sketch.segment.node.create(sp,v<,bi>)
p := sketch.segment.node.create(sp,f<,bi>)

Create a node at position v. If a number f is given instead of a vector, the position is taken along the default extrusion direction, i.e., (0, 0, f). By default, a new segment is automatically generated by connecting this node with an end of a previously created path or with the last isolated node.

If a node already exists at (or very near) the position, no node is created and the existing node is returned. If the position falls on an existing segment, that segment is split at the position and the new node is returned.

Returns:

p - pointer to the node at the position (new or existing)

Arguments:

sp - sketch set pointer

v - position (2D or 3D vector), or

f - position along the extrusion direction

bi - indicates if a segment should be created or not. If this value is not set, the default value (true) is used indicating that a segment will be created. If bi is set to false, an isolated node will be created which will not be connected to any segment. However, if the node falls on an existing segment, the segment will be split, and the node will be connected to the original ends of the segment. This parameter is optional.