Thanks for the replies all. @GavinCrump @jacob.small @Draxl_Andreas @Nick_Boyts
I think I should explain in more detail what I want to achieve.
This is the length of the input curves. It has a very deep relationship with the value entered as a tolerance.
Curves with a length smaller than the entered tolerance value are deleted and a polycurve is created.
If you don’t enter anything, the join is performed without any curves being deleted because no curves are smaller than the default value of 0.001.
The same thing happens if you enter 0.1.
However, if you enter 1, there is one curve with a length less than 1, so that curve is deleted and joined.
Then, if you enter 1.3, two curves will be deleted,
Entering 1.6 will delete 4 curves.
…
You can see that only curves with a length smaller than the entered tolerance value are deleted, creating a polycurve with the original curve transformed.
However, the first issue is that I do not want to change this curve in the study I am working on.
To create a slightly non-stick curve, I deleted three short curves from the original curve using the script in the pink box.
Ignore the surface boundary curves in the original sat file.
Let’s assume that the current curve information is the original curve and run the polycurve node again.
With the default tolerance of 0.001, no polycurve is created and a null value is returned.
Now, what value should I enter as the tolerance input value?
It’s too inefficient to put all the numbers in one by one.
From above texts, it seems like it just needs to be a little smaller than the shortest value among the curves’ lengths.
Right! But…
A value smaller than the minimum value of the curve length was entered as the tolerance, but the resulting curve was reduced by one.
A value that is close to or smaller than the minimum length is correct, but depending on the value, it may create an undesirably closed curve and deform the curve.
[Polycurve.ByJoinedCurves] nodes are often used in my process of extracting edges on a curved multi-surface, offsetting, filleting, and project curves on the surface. However, due to this joinTolerance input problem, curve deformation or null value return makes the script doesn’t run smoothly. So I wanted to create a function that could automatically find the optimal tolerance input value.
I have attached related files
Thanks!
why tolerance values are important.dyn (47.5 KB)
polycurveTest.sat (135.9 KB)