turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Siemens PLM Community
- NX Customization and Programming
- NX Programming & Customization Forum
- Finding co-axial holes

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 07:13 AM

Hello everyone!

Let's assume we have Part 1 and Part 2, both have holes. Is it possible in NX Open to pick a hole in Part 1 and find if there is any hole in Part 2 that is co-axial to it?

Does easy way exist? Or maybe it is possible, but only with the complex code?

34 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 08:04 AM

* Get the direction of the "template hole"

* Get every other direction and compare it to the "template direction.

You have to consider that the modeling tolerance can be important here. Vector arithmetic could be helpful here. The direction vector could be read from the hole feature.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 08:46 AM - edited 12-14-2015 03:46 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 09:30 AM

Are you only concerned about the vector direction of the hole axis, or are you also concerned about location - that is, whether the holes are aligned such that a bolt could go through both holes at the same time?

Are the parts components in an assembly, or two stand-alone piece parts?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 09:43 AM

If they are co-axial, you would need to text both the axis vectors & the "point" used to define where it is.

Note the points may be different in space, but the one point would have to lie on the vector determined by the other point & axis vector

Also make sure you get the point/axis data in the csys of the ASSEMBLY, not the component.

Production:NX10.0.3.5 MP5 + patch/TC11.2

I'd rather be e-steemed than e-diseaseled

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 10:10 AM

Get the two centerline vectors. Determine if they are parallel:

- If the cross product between them is 0.
- Normalize them and compute the dot product. If it is 1, they are parallel

To determine if they are colinear, check to see if the distance from one of the endpoints of one vector lies on the other vector:

http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html

All of the vector tools you need can be found in the classes:

- NXOpen.VectorArithmetic.Vector3
- NXOpen.UF.UFVec3

Actually, NXOpen.UF.UFVec3.IsEqual() may do what you want in one shot. The documentation is not very good so I'm not sure what is meant by "equal" (length, direction, etc.)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 10:40 AM

*Are you only concerned about the vector direction of the hole axis, or are you also concerned about location - that is, whether the holes are aligned such that a bolt could go through both holes at the same time?*

Yes, I am concerned about location too.

*Are the parts components in an assembly, or two stand-alone piece parts?*

Components in an aseembly.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 01:37 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-10-2015 02:22 PM - edited 12-10-2015 02:24 PM

Somewhat, but far from being exactly that job. And not using Java.

But the video suggests that the solution does exist, and that's encouraging.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-11-2015 02:11 AM

Try to use DFMPro that have your control.

Thank you...

Using NX 11 / RuleDesigner PDM

Using NX 11 / RuleDesigner PDM

Follow Siemens PLM Software

© 2017 Siemens Product Lifecycle Management Software Inc