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:

VB-Mcleads does not take in Arcradius Value


Recommended Posts

Hi, I wrote a VB program to automatically chain the contour with leadin and leadout values.

 

In the program, I give the values of the leadin and leadout values for both lines and arcs. After running & chaining a contour, I see, from the "Operation Manager", that it only takes in the values for lines and also Arcsweep, but no ArcRadius (which remain zero no matter what I do, even if I give a specific value like, Leadin.ArcRadius =.1).

 

Can anybody point out if there is something wrong in my program or there is a bug in VB that prevents it importing the ArcRadius value.

 

To test, make a chain on any lines or closed shape and check the result in "Operations Manager". When done. double-click the "Parameters", and then click "leadIn/Out" to see if there is value in "Radius" part (should be non-zero).

 

Thanks for helping

 

Kevin Qian

 

code:

'------------------------------------------------

'Apt_test

 

Call Main()

 

sub Main()

 

Dim tool_dia

Dim leadin

dim leadout

 

tool_dia=.3125

 

AskForChain("chain please")

 

Set leadin = New McLeads

leadin.Useline = 1 'Use a line For leading In/out

leadin.LineLength = tool_dia/2 'leadin length

leadin.LineTangent = 1 'Is the line Tangent Or Perpendicular?

leadin.LineRampHeight = 0 'Height of lead In/out Line (defining a ‘ramp’)

leadin.UseArc = 1 'Use an arc For leading In/out

leadin.ArcRadius=tool_dia/2 'Radius of lead In/out arc, **** NOT WORKING, ArcRadius does not take any value ****

leadin.ArcSweep = 1.57079633 'Angular sweep of lead In/out arc, 1.57079633 works out to be 90 degree

leadin.ArcHelixHeight = 0 'Height of lead In/out Arc (defining a helix

 

set leadout = new mcleads

leadout.UseLine = 1

leadout.LineLength = tool_dia/4

leadout.LineTangent = 1

leadout.LineRampheight = 0

leadout.UseArc = 1

leadout.ArcRadius=tool_dia/4 'Radius of lead In/out arc, **** NOT WORKING ****

leadout.ArcSweep = 1.57079633

leadout.ArcHelixHeight = 0

 

Call SetEntry(0,0,leadin) '1st zero for mid pt of contour, 2nd zero for overlap

Call SetExit(leadout)

Call MakeContour("",tool_dia,0,0,mctool_flat,mcCUTTER_COMP_LEFT,mcCUTTER_ROLL_SHARP,100)

 

end sub

 

'-------------------------------------------------------


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...