Find Concentric Circular Features on Different Components

Programming and macros
Jordan Brown
Posts: 26
Joined: Wed Jul 21, 2021 3:20 pm
Answers: 0
x 6
x 2

Find Concentric Circular Features on Different Components

Unread post by Jordan Brown »

Hello,

I am trying to come up with a way to find which features on different components are concentric in an assembly. For example: tapped hole in one part and cut-extrude in another. Any ideas on the best way to go about this?

My first thought was to select (via API) all of the temporary axes and then check if they are co-axial, but I can't find a way to select them all without selecting the feature first (which would be extremely slow). Unless someone knows how to do this then I need to use some other process.

Any ideas?
image.png
image.png (41.4 KiB) Viewed 950 times
User avatar
HerrTick
Posts: 207
Joined: Fri Mar 19, 2021 10:41 am
Answers: 1
x 32
x 307

Re: Find Concentric Circular Features on Different Components

Unread post by HerrTick »

Traverse faces of each component

For each face
-->is it cylindrical
-->get the axis
-->get axis vector (transform matrix)

Either compare each axis to a reference vector/axis, or collet them all and see what lines up.
Jordan Brown
Posts: 26
Joined: Wed Jul 21, 2021 3:20 pm
Answers: 0
x 6
x 2

Re: Find Concentric Circular Features on Different Components

Unread post by Jordan Brown »

Well, that sounds like an idea. I'll give it a try.

Thanks
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: Find Concentric Circular Features on Different Components

Unread post by Austin Schukar »

If you're getting a ton of cylindrical faces, you can check whether it's a hole or boss with this macro (CodeStack).
Austin
User avatar
gupta9665
Posts: 410
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 433
x 449

Re: Find Concentric Circular Features on Different Components

Unread post by gupta9665 »

Not API way but have you looked into Hole Alignment tool (Tools > Evaluate > Hole Alignment)
Deepak Gupta
SOLIDWORKS Consultant/Blogger
Post Reply