Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation point coordinates of surf intersection by plane

Status
Not open for further replies.

NETGARA

New member
Jun 3, 2020
8
Hi,

I have a surface, I would like to make an intersection by a plane, with that intersection make 100 equidistant points and obtain their coordinates ..., this process would be repeated on several planes. I would appreciate if someone help me to do it by code, manually would take me a long time.

Thanks!
 
Replies continue below

Recommended for you

You have a surface which you intersect with a plane. The intersection produces a curve. on this curve you want to drop 100 points, and then export ( ?) the coordinates for the points.
Correct ?
The "intersection curve" and the "Point set" are very few clicks to do interactively, the export of the coordinates is more difficult to do in a pretty fashion.

Regards,
Tomas




 
NETGARA, do you want this as a blockstyler tool? The user gives the single face of the surface and the multiple planes.

The code then does the intersections of the face with each plane. Do you want point features for each of the 100 points or just a list of co-ords? or text file?

Can you share a test case?

Regards,

Paul
 
NETGARA,

here is some C# code to output a list of equidistant points along a given curve:

Code:
double scalarIncrement = (double)1 / (numberpts - 1);

		for (int ii = 0; ii < numberpts; ii++)
		{
			NXOpen.Scalar scalar = NXOpen.Session.GetSession().Parts.Work.Scalars.CreateScalar((ii * scalarIncrement), NXOpen.Scalar.DimensionalityType.None, NXOpen.SmartObject.UpdateOption.DontUpdate);
			
			NXOpen.Point point = NXOpen.Session.GetSession().Parts.Work.Points.CreatePoint(curve, scalar, NXOpen.SmartObject.UpdateOption.WithinModeling);
			
			NXOpen.Session.GetSession().ListingWindow.WriteLine((ii + 1) + " " + point.Coordinates.X + " " + point.Coordinates.Y + " " + point.Coordinates.Z);
		}

I've uploaded a class that performs what I understand to be your requirement also. Ctrl-U to run the .dll. See the attachment below.

Regards,
Paul

 
 https://files.engineering.com/getfile.aspx?folder=3590593d-2f97-4e73-8e96-fda261383b00&file=planes_100.dll

Hi Toost, I need 100 points per plane, but I have 200 planes, this process i need to do with many surfaces..., so do this manually takes a long time.

Hi Rx8uk, i try to ejecute .dll, but give me an error, anyway would be good code in vb.net, i have a little knowleadge with this language.

Thanks to both of you!
 
i am curious, May i ask the purpose of these points ?
( i just tested, when doing intersection curves, one can select multiple surfaces and multiple planes in one single feature. The point set , which can create 100 points in one click, needs 1 feature per 1 curve.)

Have you played around with the Point set feature and noticed the different spacing options ?
- you will most probably need to set the corresponding options in a program.


Regards,
Tomas

 
Netgara, I've recompiled and uploaded a .zip with a .dll and a .dlx. They need to be in the same location.

If you still get an error please capture it and let me know your set up.

vb.net isn't really my thing but I could share the C# if this works. Maybe someone could convert it?
 
 https://files.engineering.com/getfile.aspx?folder=406bcef8-8f2c-4660-bbcb-0a7d8ab13bd5&file=planes_100.zip
Hi Toost,
I`m working in design dept. with aerodinamic surfaces, the stress area needs many points by section, thats the reason.

The point feature only allows me to make points for each section, no? but i need to do many sections and get the coordinates of all this section.

Thanks!
 
NETGARA,

maybe you have an odd installation of NX? Can you try copying the following files to the same location as my .dll?

C:\Program Files\Siemens\NX 11.0\NXBIN\managed\NXOpen.dll , NXOpen.UF.dll , NXOpenUI.dll , NXOpen.Utilities.dll
 
Hi Rx8Uk,
I do it, but still not working. I have NX 11.0.2.7

May be is a configuration issue.

Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor