1
$\begingroup$

I just want to create a dashed curve by splitting it at every N'th point.

I use a simple function to find all multiples of four and transfer them to the Split Edges node. But for some reason, Blender trims not only every 4'th index, but also its neighbor!

I think Blender interpolates boolean values for the curve (you can see that in the viewer node), that's why the right index affects its neighbors. But if you use the Map Range node to get rid of the gradient, nothing will happen (you can disable this node in the node group and see - nothing will happen)

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ Split Edges splits, as the name suggests: Edges. Therefore, the selection also refers to the domain Edge. An edge also has two ends/points, so you also get two splits instead of a single one. However, you could first use Modulo (Math node) to remove the intermediate points of the curve, and then convert to a mesh and apply Split Edges. $\endgroup$
    – quellenform
    Commented Jan 25, 2023 at 23:10

3 Answers 3

3
$\begingroup$

I guess what you want is a curve divided into regular segments. How many segments each of those parts has, is up to you. This is the easiest answer I could think of. You take a curve, resample it into as many segments as you want. Convert it to mesh, split the edges. This generates single edge polygons. Now convert back to splines and add a Trim node. Trim the start or end to widen the gaps. Resample again to add as many sub-segments as needed. This gets you a straight line. Straight Line Example For a curved line, you modify this setup like this. Insert a Capture Attribute after the Curve line, set the type to Float and the domain to Point. Feed a Spline Parameter node into the value. This ensures that all the points of this line are normalized between zero and one. Now add another curved line (I'm going with a circle in my example) and Sample it by the Factor captured attribute. Use the Position vector field to drive the points of the Curve Line. There you have it. Raise the first Resample count to add segments. Raise or lower the second Resample to smooth the sub-segments.

Curved Line Example

And this is how you create a dot-dash line. Use the same method as above to match it along the circle or any other curved line.

enter image description here

$\endgroup$
1
$\begingroup$

As quellenform said,

Split Edge Node refers to the domain Edge ,

as I just applied an Extrude Node and then just deleted top of that extruded mesh captured before to get the origin of edge path. Crutch but working.. I guess that's our burden: converting 2d element to 3d to modify it. Yeah, and Modulo node works just fine enter image description here

$\endgroup$
1
$\begingroup$

I'm just trying to clarify here what I meant in the comment....

If you set the Math node to Modulo, you can capture every Nth point and use it directly as selection for the node Delete Geometry.

All intermediate points will be removed and only the points where you want to get splits will be left.

The rest is then just a game of converting Curve to Mesh > Split Edges > Mesh to Curve as you did before.

enter image description here


(Blender 3.2+)

$\endgroup$
2
  • $\begingroup$ Unfortunately, this method will not allow you to make very small gaps unless you sample the curve very often, so Split Edge Node it the only option. But with extrude it works fine, thank you! $\endgroup$
    – Bicukow
    Commented Jan 26, 2023 at 13:30
  • $\begingroup$ @Bicukow Please be so kind and let me understand this better: With this method, you can insert a gap at every nth point ...even extremely small distances. What exactly do you mean? $\endgroup$
    – quellenform
    Commented Jan 26, 2023 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .