Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Probing an angle in Z to find the intersection


Mic6
 Share

Recommended Posts

Can you probe center position between the angle you have dimensions on and the other angle at the left side of the image? Just like finding the midpoint of two edges, if the angles are the same and since the probe is a ball it should find the center accurately providing your angles are accurate.

Link to comment
Share on other sites
  • 1 month later...

Mic6,

 

I thought I would share the solution with the community.

 

 

ZMacro.jpg

 

 

%

O6602(YZ CORNER FIND)

(-----------------------------)

( ADVANCED PROBE TECHNOLOGIES )

( By Mark Weber )

( VERSION 1.0 )

( 10-07-2010 )

(-----------------------------)

(-----------FOR HAAS----------)

(-----------------------------)

 

(------------------------------------)

(THIS MACRO WILL CALCULATE THE YZ )

(INTERSECT POINT OF THE TOP Z SURFACE)

(AND THE ANGLED SURFACE USING 3 PROBE)

(POINTS )

(------------------------------------)

(THE ORDER IN WHICH THE POINTS ARE )

(PROBED WILL DETERMINE WHETHER THE )

(CALCULATED CORNER WILL BE ON THE Y+ )

(SIDE OR THE Y- SIDE OF THE PART )

(------------------------------------)

(THE PROBE MUST BE POSITIONED ABOVE )

(THE PART AT A SAFE CLEARANCE PLANE )

(BEFORE CALLING THIS MACRO )

(------------------------------------)

(----------REQUIRED INPUTS-----------)

(------------------------------------)

 

(INCREMENTAL STANDOFF DISTANCE)

#660=1.0

 

(PROBE BALL RADIUS)

#699=#556

 

(ALL PTS X LOCATION)

#650=??.??? (X LOCATION

 

(PT1 YZ DATA)

#651=??.??? (Y LOCATION)

#652=??.??? (Z LOCATION)

 

(PT2 YZ DATA)

#653=??.??? (Y LOCATION)

#654=??.??? (Z LOCATION)

 

(PT3 YZ DATA)

#655=??.??? (Y LOCATION)

#656=??.??? (Z LOCATION)

G04 P5

 

(CHECK FOR Y+ OR Y- LOCATION)

#29=#653-#651

G04 P5

IF[#29LT0.]GOTO5

#30=1.

GOTO10

N5

#30=-1.

 

N10

(CALC START POINTS)

(PT1 START)

#661=#651(Y START)

#662=#652+#660(Z START)

(PT2 START)

#663=#653+[#660*#30](Y START)

#664=#654-#699(Z START)

(PT3 START)

#665=#655+[#660*#30](Y START)

#666=#656-#699(Z START)

 

N20

(PROBE 3 POINTS)

 

(POINT 1)

G65P9810 X#650 Y#661 F50.

G65P9810 Z#662

G65P9811 Z#652

(SAVE YZ DATA)

#10=#651(Y)

#11=#187(Z)

G04 P5

 

(POINT 2)

G65P9810 X#650 Y#663

G65P9810 Z#664

G65P9811 Y#653

(SAVE YZ DATA)

#12=#186(Y)

#13=#654(Z)

G04 P5

 

(POINT 3)

G65P9810 X#650 Y#665

G65P9810 Z#666

G65P9811 Y#655

(SAVE YZ DATA)

#14=#186(Y)

#15=#656(Z)

G04 P5

 

(RETRACT PROBE)

G65P9810 Z[#662+2.0]F100.

 

(NOW CALCULATE YZ INTERSECT PT)

 

(Z DELTA PT2 TO PT3)

#16=ABS[#13-#15]

(Y DELTA PT2 TO PT3)

#17=ABS[#12-#14]

G04 P5

(SLOPE)

#18=#17/#16

(ANGLE)

#21=ATAN[#17/#16]

(Z DELTA PT1 TO PT3)

#19=ABS[#11-#15]

G04 P5

(Y INTERSECT)

#680=#14-[#18*#19*#30]

G04 P5

(CALC COSINE ERROR)

#20=[#699/COS[#21]]-#699

G04 P5

(ADJUST FOR COSINE ERROR)

#681=#680-[#20*#30]

(Z INTERSECT)

#682=#11

 

(END OF MACRO)

M99

%

 

APT90

Advanced Probe Technologies

www.Advprobetech.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...