Trying to flip curves based on their current direction/orientation to point group (node group).
Currently, I have trimmed curves that I’m trying to direct outwards, in other words so that the start point of each line segment is at it’s respective group point (node point).
The logic that I have been trying to use is to take all trimmed curves and their start points and ask: If the start point distance to the node point distance is = 0, then: True.
Then all the lines who’s start points is NOT = 0, then: False.
For which I could then use the True and False statements as a cull/dispatch path, allowing me to flip the curves that are false.
Issues:
How to sort lists so that True or False statements are in the same order as line-like curve lists
How to transfer True or False data to flip it’s respective curves
How can I ask: “Is start point distance to point group (node point) distance = 0” for each point group cluster?
Let me know if you think there is a better way to do this?
It’s easier if you use ‘Brep | Curve’ intersection (instead of ‘Trim with brep’—this will give you one point per each line intersecting with each sphere, then form a line from point A (sphere center) to points B (the obtained intersection points). Remember to graft the sphere points.
Although for reasons I dont understand, I needed to graft the node points and flatten the brep | curve points.
Also needed to group them so that lines from A to B would be drawn in proximity to the nodes. Initially, some lines went across the whole wireframe with this method.
Reversing the point inputs in both groups managed to solve the issue as well.
Im still thinking if there is a simpler solution to this, but I finally got it working this way.
Not really—upon grafting the points that make the spheres you create one branch per sphere. Then, after intersecting the spheres with the lines, you use ‘Trim Tree’ or ‘Shift Paths’ on the resulting intersection points (‘Points’ output of ‘brep | curve’ to get the point sets per sphere). You hit ‘flatten’ on this output instead—don’t do that. The number of sets (with multiple intersection points) corresponds to the number of spheres—so point A is your grafted points, and point B is your point sets. No need to group anything.
Try it out, tell us how it goes. Or, post your file as @Eef_Weenink suggests.