Determine if circle collected is an outer or inner

Post Reply
kylemjones1989
Getting Started
Getting Started
Posts: 3
Joined: Fri Apr 27, 2018 4:27 pm

Determine if circle collected is an outer or inner

Post by kylemjones1989 » Fri Apr 27, 2018 4:56 pm

Hello,

I would like to determine the bonus to be applied for positional tolerance purposes. There are multiple circles that are being looked at in my code and they vary between outer and inner circles. Is there a function that can determine whether a circle is an outer or inner?

Thanks,
Kyle

mcasey
Frequent User
Frequent User
Posts: 35
Joined: Sat Jan 18, 2014 3:16 am

Re: Determine if circle collected is an outer or inner

Post by mcasey » Sat May 12, 2018 10:35 am

I don't know the exact nature of your program and I'm still pretty new to VB scripting but my first thought would be to have the code look at the directional vectors. If you imagine a 4 point circle and go around clockwise starting at 12 o'clock the IJK vectors will all flip between positive and negative based on whether it is an inner or outer circle (see photos). Have your program touch all the circles in one of these locations - for example what is point 1 in the photos and then have the code read the I component. if it is 1 it is outer and if it is -1 it is inner. There may be a more sophisticated way that I'm not aware of, but based on my limited knowledge that is how I would approach this issue. Hope that helps.
Inner_IJK.PNG
Outer_IJK.PNG
You do not have the required permissions to view the files attached to this post.

kylemjones1989
Getting Started
Getting Started
Posts: 3
Joined: Fri Apr 27, 2018 4:27 pm

Re: Determine if circle collected is an outer or inner

Post by kylemjones1989 » Tue May 15, 2018 2:26 pm

Thank you very much mcasey. I figured out a workaround to this problem by having the user input whether the circle was an inner or an outer in the code. The code is in another post: viewtopic.php?f=31&t=2159. But I think your solution will work as well and thereby limit the amount of input required by the user. Just need to figure out how to pull the ijk vector directions with VB code. I will update the code if I can get it to work with your method.

Best,
Kyle

Post Reply