Cancel
Showing results for 
Search instead for 
Did you mean: 

Hole to slot

Pioneer
Pioneer

We have a running joke at work rev A is a hole, rev B is a bigger hole and rev C is a slot. Which inspired me to write the attached code. I would like a bit of help to make it more robust in what face it selects (ie hole/cylindrical face only) and also allow more options for slot direct other than just face normal. Also if anyone has other ways to improve this code please hack the code to suit

 
Regards,

Clayton McPherson
TC 10.1, NX 9.0.3.4 MP7
6 REPLIES

Re: Hole to slot

Honored Contributor
Honored Contributor

I like it; ingenious use of synchronous modeling. Thanks for sharing it.

 

I think that I can help with the face selection, but it probably won't be until next week sometime that I can dig into it.

Re: Hole to slot

Phenom
Phenom

Very interesting Journl, but as you have said, it's not robust. I've tried to create a 10 mm slot from a 2 mm hole, but doesn't function.

Thank you...

Using NX 11 / RuleDesigner PDM

Re: Hole to slot

Honored Contributor
Honored Contributor

Here is my first take on this. It limits selection to faces of a hole feature; also, it operates on all the faces of the hole feature. This means that it works on c'bore and c'sink holes, turning them into c'bore or c'sink slots. It has also been modified to exit more gracefully if/when the user presses cancel in one of the selection dialogs.

Re: Hole to slot

Pioneer
Pioneer

That works great cowski1, I've had another go at it myself and allowed datum planes to be selected as well as a face for the direction. I did a bit more debugging as well. I am now trying to get the hole feature to be part of the "Hole_To_Slot" feature group but it's not working, any ideas?

 

Regards,

Clayton McPherson
TC 10.1, NX 9.0.3.4 MP7

Re: Hole to slot

Honored Contributor
Honored Contributor

When you create a hole feature, there is the external feature that you see in the part navigator; but there is also an internal hole feature for each hole created. For example, if you start the hole feature and pick 4 points on a planar face of your model, a single hole feature will appear in the part navigator but all 4 individual holes will be highlighted when you select the feature in the feature tree. Internally, NX has created multiple hole features; one for each individual hole that you see and one to hold all the individual features.

 

My code uses the internal hole feature of the face that you pick to simplify the divide face code. You will want to use the "external" hole feature for the feature group, or modify my code to use the external feature from the start.

Re: Hole to slot

Pioneer
Pioneer

Ok a bit more complicated than I hoped but I managed to get it to work. Decided to only group the external holepackage if it had one hole. Finished code attached, thanks for the help.

Regards,

Clayton McPherson
TC 10.1, NX 9.0.3.4 MP7