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:

CHook - drawing to g-code


Recommended Posts

pt1[X] = 2.5000 pt1[Y] = 5.1260

pt2[X] = 2.4380 pt2[Y] = 5.2500

pt3[X] = 1.2500 pt3[Y] = 5.2500

pt4[X] = 0.0620 pt4[Y] = 5.2500

pt5[X] = 0.0000 pt5[Y] = 5.1260

pt1 to 2 and pt4 to 5 are 0.062radius 90deg arcs (0to90 and 90to180 respec.).

Pt2 to 3 and pt3 to 4 are equal length lines.

I can draw the above 4 entities.

I have managed to draw the above chain using only one CHAIN(chnAll) and one CHAIN_ENT (lastCe).

 

LastCe = NULL;

err = add_curve_to_chain(&entRtOCR, 0, TRUE, TEMP2_BIT, chnAll, &lastCe);

draw_chain_direction ( chnAll );

lastCe = last_chain_curve(chnAll);

err = add_curve_to_chain(&entRtLine, 0, TRUE, TEMP2_BIT, chnAll, &lastCe);

lastCe = last_chain_curve(chnAll);

err = add_curve_to_chain(&entLftLine, 0, TRUE, TEMP2_BIT, chnAll, &lastCe);

lastCe = last_chain_curve(chnAll);

err = add_curve_to_chain(&entLftOCR, 0, TRUE, TEMP2_BIT, chnAll, &lastCe);

draw_chain_direction ( chnAll );

draw_chain( chnAll, 11); //12=red, 11=lt blue, 10=green

draw_chain_sel( chnAll); //not exactly sure what this is doing

 

A call to chain_manager() sets succf to TRUE.

 

Does every entity in a complete chain need a CHAIN_ENT?

 

What I want to do is have the chook finish up and create g-code.

I’m not entirely sure what calls and the order using operation_manager(), tool_manager(), chain_manager() & nci_manager() I need to achieve that end.

Any suggestions would be welcome. I’ve read the C-Hooks FTP download which I used to accomplish the above.

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