Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

[API Usage Java]askUvPointsContainment

int[] askUvPointsContainment(int nUvs, double uParms,double vParms,Tag faceEid).

The documents say uParms and vParms is a Array of u parameters of 2D points,but double type cant represent an array in java .

8 REPLIES

Re: [API Usage Java]askUvPointsContainment

The documentation isn't clear, but they probably mean you need to pass in an array of double value types for the U and V parameters.

Re: [API Usage Java]askUvPointsContainment

Thank you.

I tried pass an double array ,it can't compile or run . and i tried just give a double for uv parameter, but the return value is wrong.

Solution
Solution
Accepted by topic author zssng
‎11-02-2016 08:23 PM

Re: [API Usage Java]askUvPointsContainment

Actually the original C function takes two pointers to double arrays:

int UF_MODL_ask_uv_points_containment
(
int n_uvs,
double * u_parms,
double * v_parms,
tag_t face_eid,
int * pts_status
)

As Java does not have pointers as such, I'm not sure how you'd call this...

Maybe ask GTAC for help in this case... 

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: [API Usage Java]askUvPointsContainment

I agree with @Inch that it should be reported to GTAC; they can show us the proper usage, or it may be a bug. I tried to write some VB code for it and got an error "NXException: data is not correct". When I use an array, the compiler complains that it must be a double; when I use a double, I get the error mentioned previously.

Re: [API Usage Java]askUvPointsContainment

 

Yes, Cowski and Graham are correct, this should be reported to GTAC.  It looks like the original C function was not wrapped properly for use in the .Net or Java NXOpen kits.  GTAC will convert your IR to a Problem Report so that the development team can work to resolve it.

 

Thanks!

 

Re: [API Usage Java]askUvPointsContainment

Thank you all.

I use createpoint  function and a loop to generate mass points instead. the

PointSetBuilder

Api  can create a set of points on a face,but it's function 

getCommittedObjects

 seems always return nothing too.

BTW,i don't know how to contact GTAC.Maybe you guys could help me .

Re: [API Usage Java]askUvPointsContainment

Start with this page:

 

http://www.plm.automation.siemens.com/en_us/support/gtac/

 

Near the upper left corner, expand the drop-down menu that says "Contact Support".  Under that, there is a link for "GTAC Operating Hours and Phone Menu".  I am in North America, so when I go to that page, I see the information that is appropriate locally; I suspect it might be different depending on where you are connecting from.  If you don't see local information, there is a link under the picture on the right side for "GTAC Global Support Telephone Numbers".

 

If you report a problem that requires a software fix, then once it is fixed, GTAC will alert you, so you know what version contains the fix.

 

Thanks!

Re: [API Usage Java]askUvPointsContainment

PointSetBuilder inherits from FeatureBuilder and creates a Feature. Commit() returns a NXObject and GetCommittedObjects() returns an array of NXObjects.

 

To get the Feature, use the CommitFeature() method, which returns the Feature, or the GetFeature() method.