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:

cutter_comp_2d()


Duckman
 Share

Recommended Posts

actually this is from a purely c++ programming perspective...but perhaps you are right and something is conflicting with my cutter diamter...thanks!

 

nope, i checked, I set the radius correctly, but the function still returns an error. It works fine for lines and arcs, but for a complete circle, the function fails. ANy ideas? Thanks!

 

[ 07-22-2002, 06:20 PM: Message edited by: Duckman ]

Link to comment
Share on other sites

Duckman,

 

I admire your persistence with the C++ programming. To answer your question about zeroing out a gt_ent:

Check out the 'C' memset command. It is very useful for zeroing out values in ANY structure or array with 1 line of code.

 

ex. for a gt_ent:

gt_ent g;

memset(&g, 0, sizeof(gt_ent));

 

As for offsetting a complete circle, I believe that Bertau is right, and you must break it into 2 pieces first in your program.

Link to comment
Share on other sites

This may not be the same problem, but I was getting the same error. I'm programming for Haas machines.

 

After a lot of head scratching I found the problems. They all (the problems) had to do with basic rules of using cutter comp.

 

1. Cutter comp. CAN'T be turned on in an ARC MOVE. This was the biggest headache. To fix it, I add a line in front of the Z move into the part before the arc. I add a line with a G91, G41 or G42, XO, YO, F300., this then turns on cutter comp. On the next line I put a G90 back in and I am running in cutter comp.

 

2. Cutter comp is being turned off prematurely. I remove the G40, and put on the line that has the G0 out of the part for Z. But, Cutter comp. does not work with a G0, so I change it to G1 and add an F300.

 

I don't know how to change posts, so this method works for me. It sometimes is a lot of work, but it is not dificult after you figure out what the problem was.

Link to comment
Share on other sites

Thanks MATSSMan for the confirmation and for the encouragement! It's definitely appreciated! I am not a strong c++ programmer, and I am completely new t MasterCAM, but I've learned a lot during these projects that I've been doing.

 

Thanks again! (Now I have to figure out how to break a circle in the ctour array and insert two arcs...Right now the circle is part of the ctour array, if I had to split it into two parts, would I have to copy the whole array to insert elements?) - ah, I realized that the circle is the only element in ctour since it constitutes the entire chain...splitting was more painless than expected!

 

Just wondering: for cutter_comp_2d, what is the purpose of do_self_inters?

 

Thanks!

 

[ 07-23-2002, 12:08 PM: Message edited by: Duckman ]

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