# translation of a real value to a normalized value for the point type "position on curve"

## Recommended Posts

Dear forum members,
Is there an easy way to find the normalized value, that represent a certain real z-value, that I can use for the "Tp-value" when using the point type "position on curve"?

Thanks,
//Gustaf

##### Share on other sites

Hi Gustav,

you could create a point through the console with:

`point p(curve.fv(2,zVal))`

Instead of "curve" you'll have to choose your particular curve and zVal would be your z value. "2" corresponds to the z-axis (0=x, 1=y, 2=z).

##### Share on other sites

... if you use .ft instead of .fv you'd get the t-value instead...

##### Share on other sites
49 minutes ago, Mr. Heinrich von Zadow said:

Hi Gustav,

you could create a point through the console with:

```
point p(curve.fv(2,zVal))```

Instead of "curve" you'll have to choose your particular curve and zVal would be your z value. "2" corresponds to the z-axis (0=x, 1=y, 2=z).

Thank you Heinrich, I will try this and also the ft alternative that you suggested

//Gustaf

##### Share on other sites

Hi again Heinrich,
I tested what you suggested and the points were created, but the position was wrong. I attach an image so it becomes easier to explain what I want to do.

The point I have marked "1" is the point which has the z-value I want to use. The red cross marks the approximate position on the curve where I want the new point to be. The point in the bow which I have marked with "2" is where the point actually is positioned after creating the point with: point p(curve.fv(2,zVal)).

I also tested the command: point p(curve.ft(2, zVal)) but then the point was positioned really far aft (not visible on the screenshot).

I hope this helps to describe my problem.

Thanks again!

//Gustaf

##### Share on other sites
1 minute ago, Gustaf Magnander said:

Hi again Heinrich,
I tested what you suggested and the points were created, but the position was wrong. I attach an image so it becomes easier to explain what I want to do.

The point I have marked "1" is the point which has the z-value I want to use. The red cross marks the approximate position on the curve where I want the new point to be. The point in the bow which I have marked with "2" is where the point actually is positioned after creating the point with: point p(curve.fv(2,zVal)).

I also tested the command: point p(curve.ft(2, zVal)) but then the point was positioned really far aft (not visible on the screenshot).

I hope this helps to describe my problem.

Thanks again!

//Gustaf

I could also say that the b-spline in the center works as a control curve and controls the outer generic curve in the z-direction. The point on the b-spline which is marked with "1" thus also has the correct x-value. I control the generic outer curve in the xy-plane with a multisegmented curve (not visible in the screenshot).

##### Share on other sites

Hi Gustav,

in your case you would have to us p2:z as elevation for the fv command:

`point p1(curve.fv(2,p2:z))`

let me know if this explains it -- otherwise feel free to attach your particular example and I'll quickly modify it.

Cheers,
Heinrich

##### Share on other sites
6 minutes ago, Mr. Heinrich von Zadow said:

Hi Gustav,

in your case you would have to us p2:z as elevation for the fv command:

```
point p1(curve.fv(2,p2:z))```

let me know if this explains it -- otherwise feel free to attach your particular example and I'll quickly modify it.

Cheers,
Heinrich

Hi Heinrich,
I actually use :z to get the z-value, see attached screenshot.

##### Share on other sites

Hi Gustav,

well, that's the x-value 😉

See attached project...

Cheers,
Heinrich

##### Share on other sites
48 minutes ago, Mr. Heinrich von Zadow said:

Hi Gustav,

well, that's the x-value 😉

See attached project...

Cheers,
Heinrich

Yea, it was, 🙂
Thank you Heinrich!

##### Share on other sites
12 minutes ago, Gustaf Magnander said:

Yea, it was, 🙂
Thank you Heinrich!

actually Heinrich,
The x-value of the maxZ point was set as a discrete value. I want to automaticly retrieve this x-value based on the maxZ point, which change position if I vary the shape of the "knuckleRaiseCurve"  Thus, if I vary the shape of the "knuckleRaiseCurve" in the xz-plane the point maxZ automatically get the max z-value, but I want to automatically also retreive the correspoinding x-value, when maxZ position changes.

##### Share on other sites

Hi Gustaf (sorry for misspelling your name repeatedly!),

with .getmax(2,true) you can return the max value along the z-axis of a curve (the "true" will return the parameter position of that max value, instead of the value itself). This parameter can now be used again, to acces the position of the curve at that parameter with .getPos()

This should be what you need -- see attached project again for your specific example.

##### Share on other sites
1 hour ago, Mr. Heinrich von Zadow said:

Hi Gustaf (sorry for misspelling your name repeatedly!),

with .getmax(2,true) you can return the max value along the z-axis of a curve (the "true" will return the parameter position of that max value, instead of the value itself). This parameter can now be used again, to acces the position of the curve at that parameter with .getPos()

This should be what you need -- see attached project again for your specific example.

Hi Heinrich,
No worries!
Thank you, yes, I wanted to have the parameter position corresponding to the max z value. I will have a look in the project you fixed. Thanks again!

//Gustaf

## Create an account

Register a new account

×

• #### Activity

×
• Create New...