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

Getting coorindates of point from projection onto surface

Hi,

 

I used "ProjectCurve" to project a point onto a face. I am trying to get the coordinates of the projected point.

 

I recorded an NXOpen journal with c++, that utilizes NXOpen::Features:Smiley TonguerojectCurveBuilder to create a projection. When trying to access the point, here goes:

 

NXOpen::Features:Smiley TonguerojectCurve *projectCurve1(dynamic_cast<NXOpen::Features:Smiley TonguerojectCurve *>(workPart->Features()->FindObject("CPROJ(2)")));
NXOpen:Smiley Tongueoint *point1(dynamic_cast<NXOpen:Smiley Tongueoint *>(projectCurve1->FindObject("POINT 1")));

 

However I want to make the program flexible so that the program won't look for "CPROJ" or "POINT 1", but to get the projected point from the projectcurvebuilder that I just created. (Meaning no using FindObject)

 

How should I do that? How do I tell NXOpen to get features that are of ProjectCurve type?

 

Thanks!!!

2 REPLIES
Solution
Solution
Accepted by topic author ElaineT
‎05-09-2016 02:28 PM

Re: Getting coorindates of point from projection onto surface

When you call the "Commit" method of your ProjectCurveBuilder, it will return a ProjectCurve feature, which is what you should use instead of the one obtained from FindObject.

 

The "Getting Started with SNAP" document has a section that discusses the FindObject problem (in chapter 16). It might help you to read this. 

 

In NX/Open documents, replacing FindObject calls is sometimes known as the "jounrnal stickiness" problem. If you search the docs for this term, you might also find some useful info.

山田
yamada
Solution
Solution
Accepted by topic author ElaineT
‎05-09-2016 02:20 PM

Re: Getting coorindates of point from projection onto surface

From the ProjectCurveBuilder you can get the entities created which using vb is

Dim projectCurveBuilder1 As Features.ProjectCurveBuilder

...

Dim nXObject1 As NXObject

nXObject1 = projectCurveBuilder1.Commit()

Dim projpnt() As NXObject

projpnt = projectCurveBuilder1.GetFeature.GetEntities

 

It could be that you have point(s) and curve(s) in "projpnt" you then have to check whic is the point of interest.  If you have only created one point then it is projpnt(0).

 

Frank Swinkels