Denormalise BSpline?

Need help, or want to share a macro? Post here!
JonathanBelnoue
Posts: 6
Joined: Fri Jan 19, 2018 4:01 pm

Denormalise BSpline?

Postby JonathanBelnoue » Wed May 16, 2018 12:40 pm

Hello,

I am trying to do some sort of mapping of a flat surface onto a curved one. I have meshed and then fit a BSpline through the nodes of the curved surface in order to have one single surface representing the curved surface (i.e. eliminate any construction lines basically). This allowed to have one single set of coherent uv-parameter for my surface. Now my problem is that the uv parameters I have obtained are normalised and I therefore lose any sense of length. Any idea on how to demormalise them?

Many thanks.

Jonathan
User avatar
microelly2
Posts: 3545
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Denormalise BSpline?

Postby microelly2 » Wed May 16, 2018 1:11 pm

you can calculate the length of segments along uIso and vIso curves:

bs=Part.BSplineSurface()
...
ucurve=bs.uIso(uvalue)
distAB=ucurve.length(vValueA,vValueB)

A is bs.value(uvalue,vValueA)
B is bs.value(uvalue,vValueB)

this works fine to get the right positions all time

I use this for drawing on surfaces.
https://youtu.be/NBdxOjkDwRw
JonathanBelnoue
Posts: 6
Joined: Fri Jan 19, 2018 4:01 pm

Re: Denormalise BSpline?

Postby JonathanBelnoue » Wed May 16, 2018 1:36 pm

I see... It works a treat!

Thanks a lot!!!