Hi, I currently have two CAD files, and they are all layer organized well. I would like to implement tween curve component morph curves from one CAD file to the other.
My overall goal is to SMOOTHLY morph one group of curves from CAD_A file to the curves from CAD_B.
but as method above, they are not only translate but also rotate. It’s hard to write a code to identify the proper pairs.
Also, sorting might just be one of the solution approach. Though I am not so sure, if there’s some other library(OpenCV) for visual recognize I could use, that will be great.
If they would be branched by scissor pair it should be an easy task.
I would “branch” them manually if there is just the amount as on your screencapture.
Thank you for this approach. I can see the potential behind this one. Since I have some other curves from CAD_A and CAD_B need to morph, I am still seeking for rather general approach to this topic. The partition list divide to the 2 way is clever, but I am afraid it will not suitable for the other matching CAD curve situation.
For say, I also need to consider about the size of the detail drawing like this part.
Knowing the correspond points are definitely a good progress for me, but for the detail part curve, I still need a way to match them, in order to use tween curve component.
Good thing to use tween curve in this case, might be I want the detail drawing in the same size but the if the rod part length changed it gradually change accordingly.
blue: rod part
red: detail parts
That’s what I concern.
The cleanest data might be the sorted 1140 curves, which match perfectly with the 1140 curves from the other group, so that I can use tween curve to morph them right away.
Thank you for your reply. I agree with you, but it’s just a piece of drawings about the whole CAD file. There’re around 10000 curves in totally. Since it’s so detailed, I couldn’t select it cleverly just by clicking. That’s why I thought I need a sorting approach for my problem.
But still, your opinion is right to the point. Appreciate it. Thanks.
don’t know if the following is a real step forward (a bit confused for sure…)
shape in brep on the pipes generated on the axis of the rods might be one way to rebuild a tree where each branch has only the elements of a given rod
→ group marked “1”
at this point I thought an oriented bounding for each group of lines could do the trick, in such a way to create a new fake axis that travels in a non perfectly non-longitudinal way along each group (in such a way it would be easier to sort what is on the left and what is on the right of each fake-axis)
original curves are then sorted along curve using this fake axis:
the tweening each curve with its relative, and also the flipped version of its relative (I thought I could then cull them based on final length, because artifacts would have a very different length from the original) … but the final -unculled- tween is still weird in some points
Thank you so much. That’s what I wanted. Sorry for not being clear about my intentions. Yes, morphing smoothly using tween curves was what I meant.
Thank you, Mr. Inno and Mr.Martin. Appreciate it.
Some relative topics I’ve been thinking about these days is Point-set registration - Wikipedia. I think the current solution is only suitable for this specific CAD, which is already did a great job(HUGH THANKS), but I am wondering if anyone have done this in Grasshopper before.
Given two group of unsorted points(location).
Probably with some picture recognition for some aided reference points, make the point-set pair match. If there’re relevant topics, experience, libraries, or algorithms ever been implement in GH or .NET, I would like to dive in a bit deeper. Thanks