getIsoCurve

getIsoCurve

MichaelT_123
Advisor Advisor
480 Views
3 Replies
Message 1 of 4

getIsoCurve

MichaelT_123
Advisor
Advisor

Hi TF360,

 

"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
returnValue = surfaceEvaluator_var.getIsoCurve(parameter, isUDirection)

The docs state:

isUDirectionboolean

A bool that indicates whether to extract the curve from the U or V direction

 

 

The description is ... well a little bit ambiguous ...

I deduce(d) that when  isUDirection=True, the function produces U-iso-slice.

Observation is different ..., particularly in the context of :

returnValue = surfaceEvaluator_var.parametricRange()

 

BoundingBox2DReturns the bounding box with the parameter extents, with the X value being the U range, and the Y value being the V range.

 

What is U range, ... value in the U direction or parameter range of U-iso-slice?

 

The clarification by the F360 expert(s) will be highly appreciated.

 

Regards

MichaelT

MichaelT
0 Likes
481 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor

I believe the API is correct. Here are the results of my test.

 

I created the surface below by drawing the curve shown and doing a 90 deg. revolve. I chose a revolve because, in that direction, the parameterization range should be between 0 and 2 pi for a complete revolution. It will be pi/2 in this case because it's a 90 deg. sweep. For a spline, the range is typically between 0 and 1.


isocurve1.png

 

At this point, it's arbitrary which directions Fusion chose for the U and V. For a revolution, it should be consistent, but the first time we look, we don't know. I used the line below to get the parametric range of the face.

 

bounds = eval.parametricRange()​

 

As returned by the bounds, the X (U) goes from 0 to 1, and the Y (V) goes from 0 to pi/2.

 

With that, I know the U direction is going in the direction of the curve, and the V direction is going in the direction of the revolve.

 

Now to see if the isoCurve method returns the curves we expect. When I use this to get the iso curve in the U direction at the 0 parameter point and check the return curve, I see it is a NurbsCurve3D.

 

isosU = eval.getIsoCurve(0,True)​

 

When I use this to get the iso curve in the V direction, I see the resulting curve is an Arc3D, which tells me this is the direction of the revolution. I'm sure if I checked the parametric range of the curves, the U curve would be 0 to 1, and the V curve would be 0 to pi/2.

 

isosV = eval.getIsoCurve(0,False) ​

 

So, it seems to me it is correctly returning a curve that runs in the U or V direction based on the value of the second argument.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 4

MichaelT_123
Advisor
Advisor

Hi Mr BrianEkins,

 

I have workout this predicament already … although struggling with the actual implementation of the mentioned functions … as I have had to bang myself in the head … checking if I was still there.

 

Are the docs clear enough … or are they inflicting some confusion on the discerning reader?

Iso-prefix, at least since Socrates's times, has a well-defined meaning.

It is synonymous with:

  • of equal values,
  • the same (in a certain aspect, as in chemistry)
  • repeating/process itself unchanged, keeping underlying property constant (isomer, iso thermal)
  • ….

Let’s decipher the line of code you presented in your example (or stated in docs).

isosU = eval.getIsoCurve(0,True)  or in more verbose form

isosU = eval.getIsoCurve(parameter=0,  isUDirection=True)

I translate it as follows …

get a curve laying on the surface eval with the same (iso) values for the parameter changing in UDirection.

In the example you presented, U progresses along the axis of the surface object with the parameter in the range <0,1>

 … so based on my comprehension ( and perhaps also Socrates's if he hasn’t been sentenced to death for using too much sarcasm in his narrations) … the code, as in the example, should produce an Arc3D curve.

 

Hence, your understanding, as well as the one conveyed by docs, is anisotropic to mine !!!

 

And the last question …

What will be the sentence!?

 

Regards

MichaelT

MichaelT
0 Likes
Message 4 of 4

BrianEkins
Mentor
Mentor

It's not just the API. Here's the result of the IsoCurve Analysis command when the display of the U curves is turned on.

BrianEkins_0-1679371718470.png

I didn't understand your thoughts about this, but for me, this makes sense. The U curves are the curves running in the U direction.

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com