I have a script in which I manage to create groups of curves. These groups of curves increase when I divide a region in several surfaces. When I increase the number of divisions increases the number of groups of curves. So far so logical.
My problem is given in the border between the groups of curves. The curves at the boundary of each group intersect each other. I need to eliminate the segments between them.
I have tried to apply directly a region difference between a group and another one and the problem is:
It takes a long time
I have to perform at least 5 times the region difference.
I think the best idea is to select only the curves that intersect at the boundary, and do the boolean only on those curves. I am trying to write the code but I end up doing a lot of operations and I can’t optimize the process.
I’m sorry but I didn’t explain myself well. I will try to explain myself better.
What I am looking for is that in the limits of the groups the intersections between the curves disappear. The method I used but it is extremely slow is to make region difference between the groups. It is slow and I have to repeat it several times
Example:
Group of curves 1 intersects group of curves 2.
Group of curves 1 cuts to group of curves 3.
I leave a picture of what it would be like before and as desired.
My problem is that I can’t find a way to make it faster. At the moment the only thing that I have achieved is to filter only the curves that intersect between them and to make the boolean later. What happens is that the process is repeated many times.
In a simplified way, I want to apply full-difference operations but only on the intersecting curves, which is just where the boundaries of the surfaces are.
The surfaces are those that I used to divide in groups the curves in another code. I have put them in case it served of something, if not it is not necessary to use them.
If you look at the picture you will see the process of what I am looking for. The blue lines belong to group 1 (red) and are the ones that in this case I want to eliminate. This in principle is easy using a region difference. My problem is that the operation takes a long time and that I have to do it on each boundary of each group.
Your images are more clear than your words. Wouldn’t it be much less trouble to create your pattern of curves to cover the entire area instead of breaking them into pieces corresponding to the surfaces?
You have managed to do it without using any boolean! That’s just the kind of process I was looking for. You end up extracting the surfaces, but I just needed the curves to keep working. I managed to do it using brep edges after project.
I still have a little problem. I try to offset the curves inward, but when I do it, some curves offset inward and some offset outward, it seems that each curve has a different direction. Do you know any way to make them have the same direction?
Thank you very much, I couldn’t solve this problem and it means a lot to me. And I’m sorry for not being able to express myself well. trim_2024_Jun15c_offset.gh (334.5 KB)
I always do that using a Circle as guide for Flip Curve, but as you can see, standard Offset Curve still fails sometimes. I don’t have Pufferfish, maybe that offset works better?