Blend Curve Pt (BlendCPt) by Script (C#)

script
blendcrv
#1

Hello,

is there a chance to access the function available in GH? Or can you show me how to exactly rebuild the curves coming out of this function? I need to automate this by a script.

Thanks and all the best,
Andreas

0 Likes

(Tom) #2

Hello,

it is self-implement by the developer. There is no RhinoCommon.
What he does is, he creates Blendcurves …

Curve blend = Curve.CreateBlendCurve(curveA, curveB, blendContinuity, bulgeFactorA, bulgeFactorB);

… and iteratively increase or decreases the factors involved, until he reaches point X (as close as possible).
Therefore he measures the distance between the point and the closest point on the blendcurve.

0 Likes

#3

Hello Tom,

thanks for the answer. That’s what I feared, so there is no chance to get the same outcome as from the GH function. Maybe some GH dev can reveal the optimization algorithm and the cancel conditions? I have to do it for 4 million curves, so there could be a performance issue.

0 Likes

(Tom) #4

You may ask where do I know this from? :slight_smile: Since its not nice to do such things, I won’t tell you how you can get such information, but it has something to do with a C# Decompiler…

0 Likes

#5

Sure it is always an option, but I try to avoid methods like that :wink:

0 Likes

(Tom) #6

why? Maybe its not a good idea to share information about decompiling (although its pretty easy for dot.net), but for solving a problem and learning this is a very valuable source and morally totally okay in my opinion.

0 Likes

#7

I decompiled, and in deed it is not even dotfuscated, but could not find the function. Any hints?

0 Likes

(Tom) #8

check curve components gha

1 Like

(Pfotiad0) #9

and (maybe) this as well

1 Like

#10

Thanks! Found and rebuild as an open C# component.

0 Likes