Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Creating Scalar or point without creating an 'real' object.

Valued Contributor
Valued Contributor

Frank,

 

I've only tried this in NX8.5 so far.  The values I get are 0, even for the vmax value (from your output these are all around 1). Out of interest what version did you run your code in?  I'll test in NX10 later today if I get a chance.

 

Thanks,

Re: Creating Scalar or point without creating an 'real' object.

Siemens Phenom Siemens Phenom
Siemens Phenom

> Note that the u limits is quite small.

 

Yes, that's to be expected. On a blend surface, the minU value will be roughly zero, and the maxU value will be roughly equal to the length of the blend measured in meters.

山田
yamada

Re: Creating Scalar or point without creating an 'real' object.

Siemens Phenom Siemens Phenom
Siemens Phenom

> At what version of NX is 'Snap.Geom.Surface.Bsurface.Position' available? 

 

It was introduced in NX10. This is fundamentally new code, that does computations in a way that's different from NX (though giving the same answers, I hope).

 

> Similarly I can't get face.Curvatures(u,v) to work either

 

Yes, that's new in NX11 (introduced as a result of your questions/troubles, partly). Nothing really new here. This function just calls existing NX/Open functions (like most of SNAP). So the only benefit is easier usage plus better documentation and example code.

山田
yamada

Re: Creating Scalar or point without creating an 'real' object.

Valued Contributor
Valued Contributor

Just to close the loop.

 

I found that as rightly pointed out I needed to use the ufs.Modl.AskFaceUvMinmax function.

 

using:

 Dim minmaxUV(3) As Double

 ufs.Modl.AskFaceUvMinmax(my_face.Tag, minmaxUV)

      Dim minU As Double = minmaxUV(0)
      Dim maxU As Double = minmaxUV(1)
      Dim minV As Double = minmaxUV(2)
      Dim maxV As Double = minmaxUV(3)
       
        params(0) = minU + params(0) * (maxU - minU)
        params(1) = minV + params(1) * (maxV - minV)

 

 

This cured all of the issues I was having with getting values from the

ufs.Modl.EvaluateFace function. 

By using Evaluateface I reduced the runtime in the order of 66%

I also don't need to worry about the cleanup that I needed to do with scalars and points

 

 

Thankyou for everyone's help on this