Submitted by DHuskic on Tue, 02/11/2014 - 10:47
Forums:
I am looking for a method to extract points(.001" spacing between points) from all visible faces in the work view and export them to a text file. If anyone has a journal that can extract points from a single face, that would give me a good place to start. I am attempting to put a journal together to analyze the complexity of machining for large parts. The direction I am leaning towards currently is extracting a point set from the faces and creating custom algorithms to analyze and find complex locations on these parts. Thanks in advanced for you time.

re: point set
I'd suggest looking into the UF_MODL_ask_face_props function. Given a U,V point on a face, it will return a point location, first and second derivatives, and radius of curvature of the face. The UF_MODL_ask_face_uv_minmax function can be used in conjunction to set limits as you iterate over the face of interest.
I can try to put together a quick demo journal if you are interested.
Point Set Journal
That sounds like what I need, I would be very interested in this demo journal.
DHuskic
Nx 9 VB
Selecting Faces From Top View
Is there a way to only select the faces I can see on a solid model from the "Top" view?
DHuskic
Nx 9 VB
re: select faces from top view
It will take a bit of work, but I'm 99% sure it can be done. My first inclination would be to use the UF_MODL_trace_a_ray function to iterate over the area returned by the bounding box function to get the face(s) of interest.
You can find some code at eng-tips that may give you a starting point, or at least some ideas:
http://www.eng-tips.com/viewthread.cfm?qid=350411
(Thanks Frank!)
re: point set journal
Here's some code that will hopefully get you started:
re: point set journal
Hi,
I need to do the exact same thing (extracting surface information) using journal in C++, which is new to me. Do all these commands have equivalent in C++? Any suggestion would be helpful. Is there any website like NX journaling where i can find C++ sample codes??
Thanks
Using C++
If you're new to all this, I recommend that you use VB or C# rather than C++. The .NET API and languages are much easier, which is why so many people use them.
new worksheet
Hi, thank you for the help! I have a small question.. Is it possible to get Face properties in new worksheet rather than new excel file?
Thanks.
re: new worksheet
The short answer is "yes it is possible". To do so, you will need to open the Excel file of interest, add a worksheet (if needed) and write the values to the worksheet rather than to a text file. If you search for "Excel" on this website, you will find several journals that show how to open Excel and write values to a worksheet.
Quicker function than AskFaceProps
Hello, I am looking for a quicker function than AskFaceProps, it gets bogged down a lot of u/v points on the face, and all I need returned is the x, y, and z values corresponding to that u/v point. I don't need all the extra data. Does anyone have any ideas?
DHuskic
Nx 9 VB
re: face points
The "point set" command allows you to create points on a face based on the U and V percentage. I don't know how the speed would compare to the AskFaceProps function...
re: UV points
There is a version of the CreatePoint method that allows you to create points on the UV parameters of a face. This would be more direct than using the "point set" command mentioned in my previous post.
The "point set" command might be advantageous if you are creating a large number of points; might need some testing to see which is better for your application.