Curve.Offset+ to nodal version

Hi All,

I’m trying to convert the Springs.Curve.Offset+ Node back to a nodal version but it doesn’t seem to work.

Ideas?

Curve.Offset to nodal version.dyn (19.2 KB)

Can you show the extracted node contents in context with the rest of your script? (So in place of the Springs node)

The group at the bottom is my attempt to convert the Spring node:

Is it just because you have 2 Geometry.DistanceTo? Try taking out one and leaving it as only mypoints as the other, with geometry empty.

Thanks @kennyb6
What you suggested works in this case. I had tried initially what you just suggested with multiple lines and it didn’t work.

I used the below topic as an example:

Offset property lines - v2.dyn (17.1 KB)

Hmm. The only other difference would be the hierarchy in the code block for { -d, d}
I am pretty new to code so I don’t have a full understanding of how hierarchy would affect a list of lines but it might help. Try in the code block,

d1 = { -d, d};
d1<1>;

and use d1<1> as the input for distance.

Thanks but It didn’t work

To get a valid function object, you need to feed in a geometry object (point, line, etc) into the “other” input of the DistanceTo node. Right now you have two DistanceTo nodes and you’re feeding in a list of distances into the second one, which doesn’t help much :slight_smile:

image

1 Like

Thanks @Dimitar_Venkov

That’s what I tried to do initially but it doesn’t work with multiple lines:

What am I doing wrong?

As a workaround, Is there any reason you are not creating a Polycurve from the perimeter curves then offsetting? (As this “Normalizes” curve direction for offset)

@Ewan_Opie

I was using the example in this post. Curves have different offset value.

What I’m trying to understand is why it doesn’t work outside of the custom node.

If you’re using multiple pick points, I’m not sure the same method will work. But you could try the following approach instead:

It doesn’t work outside of the custom node, because the custom node has a specifically defined input type (singleton) and acts as its own function that automatically gets replicated based on the input.

2 Likes

Would this work with 4 different offset (one per curve)?

I tried to connect but I get an error:

image

Can the behaviour you described be replicated outside the custom node?