Find all non-intersecting curves too close together

I’m making decorative panels to enamel upon. (Enamel is grains of glass that are melted and fused onto a metal surface.)

Those decorative panels have “wires” on them, which are solids that got created from underlying closed curves that got extruded.

Just because I can make a valid drawing that can be turned into a valid 3D resin print doesn’t mean it will be castable in metal or can be enameled. Sometimes the non-intersecting “wires” are just too close to one another. Air might be trapped between them when I cast or when I try to enamel if they are too close.

So, I would love to have a utility or commands that would identify two curves or solids that are too close. Obviously, if they intersect one another I’m not interested in the areas where they intersect. But if they get too close to one another more than “x” distance from that intersection, then I am.

Anyone have an idea of how to go about this or where to get started?

Hello - Clash should help (for the solids) - you get to enter the desired minimum clearance.


Thanks! I’ll look into it. At first glance, it can do some of what I need.

Clash is kind of nice, but it has some limitations.

First, it’s working with solids and not curves, which means I catch mistakes later instead of earlier.

Second, it can only check one solid at a time against all other solids. I would have to execute the command many, many times. (Technically it can check more than one at a time against solids that aren’t in the first set, but that’s useless for what I’m doing.) It’s not like Trim where the same object can be both the cutting and cut group. In theory I could put it into a script or macro so that limitation could be overcome.

Third, it doesn’t catch an object being too close to itself, i.e., if the object snakes back around and gets too close to itself.

Fourth, and this is troubling, I ran the command with object A in the first group and B in the second. It marked a spot as too close. There was only one. I then ran it with object B in the first group and object A in the second group. It also only marked one spot – BUT IT WAS A TOTALLY DIFFERENT spot! That’s scary from a quality control point of view.

Is there anything similar that works on curves?

Hello- please post and example here, or send to (with a link back here in your comments) and I’ll see if I can come up with something.


TestClash.3dm (80.6 KB)

Check out the leftmost two solids and reverse which one is first and second. I used 1.0 as the distance.

I see this, thanks.
RH-65044 Clash report inconsistent


Thanks! I have to say that McNeel customer service is top notch!

Until I find another solution, I’ve come up with one that will work for me. Not awesome enough to just up and tell me where the problems are but it will make it much easier to visually find them.

I’ve attached a file with duplicate sets of curves. The set on the left does not simplify the closed wire curves (which will be explained in a bit). The set on the right does simplify the closed wire curves.
In both sets the two Xs mark the spots that are different between the two. All the layers but the Drawing_Curves layer have been set to not visible. I suggest turning on the other layers as they are mentioned below. You might want to make some invisible again (or not).

The way I’ve been creating my designs is to either import an image and trace over the lines on it (using the free-form interpolate curve command) or vectorize an image using the Vectorize plug-in and correcting the curves it produces. This gives me a design drawing that I can scale and re-use in other products. I put all these curves on a layer named “Drawing_Curves”.

Then I created a macro that implements the offset command with the both sides setting enabled. The original line and the offset line are capped flat. These closed curves are moved to a layer named “Wire_Curves”. I then found that I had fewer downstream issues with the slicer if I trimmed these closed curves so that they did not overlap one another. Instead, I would get new, but fewer, closed curves where the old closed curves overlapped. A SelOpenCrv command would find any that I missed trimming properly. Once I only had closed curves again, I would extrude them into the solid “wires” that will be part of the cast design. The extrusions of the wire curves are placed on a layer named “Wire_Solids”.

I need some way to know where my solids will be too close together and the clash command won’t work for me at this point. (Or possibly ever.)

So, here’s what I’m thinking will work.

I’ll create a new layer called “Boundary_Curves”. I’ll offset the drawing curves at half the distance of the minimum safe casting distance between the solid wires, cap them rounded, and place those curves into the new layer.

Where the boundary curves overlap are possible areas of concern. If they overlap at an intersection between lines they may be a false positive result, i.e., of no concern. It just depends on the angle the two lines approach each other. But at least the overlapping areas will warn me.

I can even extrude the boundary curves into solids and do a boolean intersect. A select extrusion when other solid layers are locked will give me all the known overlaps this method can detect. I’ve created a layer with those intersects on it, “Overlaps”. It turns out that if the boundary curves intersect themselves, extruding them will trigger the Self-Intersecting Curve error, so a SelSelfIntersectingCrv command can find all of those problems.

This approach has a flaw in the way the boundary lines are drawn via the offset command when a line gets too close to itself. I’ve created a couple of points on the “Problem_Points” layer to mark the area I would have to find visually. With the wide boundaries I created the problem point area is pretty easy to find. With smaller boundaries it wouldn’t be as obvious.

I hope this is useful for others as well. I certainly hope there’s a better way to solve this problem but I’m still fairly new to the product and I haven’t found it. I’m going to put as much of it into a plugin or script as I can so that the bulk of this work can be automated. (Unless, of course, someone shows me a better way! :slight_smile: )
TestClashOnCurves.3dm (334.5 KB)

I think the best way to describe what I need is a “Proximity Alert”, but not just from one object to another, but from one object to itself.

In evaluating whether the places where the wire lines intersect one another, it’s the angle they approach one another at. If the angle is too small and too long I might get an air bubble trapped in it. That would be another thing to test for and if the intersection passed that test I could remove the corresponding intersection solid (assuming there’s a way to identify it as the corresponding one).