Does NOT intersect all. Geometry

image
This node works beautifully for two rectangles that intersect - it gives me the lines that intersect. (red lines 3 + 4 below)
image

However, I want the lines that do not sit on top of each other. (red lines 1 and 2)

Yes I could do explode and remove the same… or check the vectors etc… but that seems a bit contrived.

Is there an really easy way to do this / a node I’m missing?

You could measure the distance of the midpoint of each curve relative to the outer polycurve, any line with a distance > 0 is one of the inner, non-overlapping curves

2 Likes

Yeah! Nice idea. I think I may do that :slight_smile:
Pity there isn’t a NOT intersect node tho :frowning:

so… isn’t what does not intersect, exactly what your input is (-) subract whatever the node returns?
oh I see you already thought of that:
Yes I could do explode and remove the same
… I don’t think theres a straight forward way to do it with a single node at the moment, but it should be possible.

Geometry.Trim should work. Point is the center of the container.

3 Likes

I did that at first… But the rectangles change so I had some issues with the point.
I’ll try it like you’ve done it though, I did the point slightly differently - I did it in the centre of the bigger rectangle.

Works with that too, it seems
trim

3 Likes

Animated:
Remove Overlapping Curves

4 Likes

You guys are awesome. :star_struck:

You made me log into work at the weekend though as I wanted a sanity check :crazy_face:

So for this one… I only want the horizontal red but it’s giving me the one that intersects with the larger rectangle too.

And they definitely are on top of each other.

Seems like a bug

Repeat trim as a precaution

2 Likes

Do you get the same issue in your version of Dyno?

I’m using R21 and Dyno 2.6.1

Same results in the latest Sandbox too
You could report the issue

How do I do that?

Report it here

1 Like

Hello, can we chain methods from the same class?
As you chained rectangle and translate

Cordially
christian.stan

Usually, yes.
It isn’t always a best practice, as errors can be suppressed.

1 Like

Hello,

I tried with a function.
(Create front volumes, intersection, and low edges of common lines)

Function:

def curves_inside_polygon(Poly,Cur)
{
//Recup Point Poly
Po_Poly=Point.Z(Autodesk.Curve.EndPoint(Poly));
//Create Solide
a=Surface.Thicken(
Surface.ByPatch(Poly),1,false);
b=Surface.Thicken(
Surface.ByPatch(Cur),1,false);
//Soustract Solids
sou_a_b=Solid.Difference(a,b);
//Surfaces Intersects
Int=Autodesk.Geometry.IntersectAll(b,sou_a_b);
//Recup Points curves
Po=Autodesk.Curve.PointAtParameter(Int,0.5);
//Filter
mask=Point.Z(Po)==Po_Poly?true:false;
Inc=Dictionary.ValueAtKey(DSCore.List.FilterByBoolMask(Int,mask),"in");
return Inc;
};

Cordially
christian.stan