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:

Duckman

Verified Members
  • Posts

    98
  • Joined

  • Last visited

    Never

Posts posted by Duckman

  1. in the CHOOK API, is there anything that will allow me to intersect a line with a spline? Intersect_ents says that it works with splines, but it never intersects when I use it. Any help greatly appreciated!

  2. I used chain_to_ctour_array and then cutter_comp_2d to offset my geometry, but I want to be able to work with the geometry as chains afterwards. Is there a way to convert a ctour array back into chains?

     

    ALternatively, is there another way to offset geometry by a certain amount via CHOOK programming?

     

    Thanks,

     

    Simon

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

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

  5. I've set min_fil_ang to 180, so there should be no arcs created...

     

    and thx a lot! you must've put a lot of work into trial and error! something which unfortunately i am running out of time to do!

     

    btw, how do you zero out the endpoints of a gt ent?

     

    [ 07-18-2002, 10:30 AM: Message edited by: Duckman ]

  6. for cutter_comp_2d, what is the purpose of

    cc_info[]? and how should such an array be constructed?

     

    thanks a million btw MATSSMan, i might actually be able to finish my project!

     

    i tried creating an empty array of cc_rec, and cutter_comp_2d seems to work...

     

    however, when i set compensation to 'R', the resulting ctour_rec is not a closed chain anymore! i.e., the starting and finishing point are different...any ideas why?

     

    Thanks again!

     

    [ 07-17-2002, 03:39 PM: Message edited by: Duckman ]

  7. Oh man! you can't be serious...my math isn't quite strong enough! ahhh!!! (or I'm too lazy hehe) This is pretty ridiculous...I've emailed mastercam support, but even they cannot give me an appropriate answer...

     

    hold on a sec...what function do you use to create toolpath? I am using ct_lin_mill, and this only accepts a p_2d to mill to...is there a way to create toolpath based on geometry instead of points?

     

    Thanks!~

     

    [ 07-16-2002, 12:26 PM: Message edited by: Duckman ]

  8. actually, the variable is cutter_orientation, but even after I set this to 'L' or 'R', I do not get any compensation...I've looked and looked, and by now I'm thinking it's more than a single variable that I have to set...but I'm still not sure how...

    thanks anyways though!

     

    I've also tried

     

    operation op;

    op_cc oc;

    oc.type = CC_COMPUTER;

    oc.direction = CC_LEFT;

    op.cc = oc;

    cur_op = op;

     

    but this doesn't work either...

     

    [ 07-16-2002, 09:43 AM: Message edited by: Duckman ]

  9. hehe Thanks James you understand me best!

     

    However, I cannot find a reference to cc_pos anywhere...I am thinking that it should not be a post processor variable though, but that it should be a flag that should be output to the NCI from my CHOOK...

     

    PDG, if you are around, please help!

  10. I have a bunch of lines that I am writing to an NCI file using ct_lin_mill, and I want cutter compensation to the left. I'd like the line to be written so that this is already taken into account, and G42 would not be necessary. ie, how do i set it so that the computer controls the compensation?

     

    Also, what is the difference between ct_lin_mill and ll_lin_move and wr_nci_3d_pt?

     

    Thanks!

     

    [ 07-05-2002, 04:19 PM: Message edited by: Duckman ]

  11. has anybody used the wr_nci_3d_pt() function? I can't seem to get it to output anything to the file. If anybody has successfully used this function, could you copy and paste a code fragment? Thanks!

  12. In my chook program, I have the following code

     

    FILE *f;

    boolean succf;

    f = fopen_hl ("C:Pocket", "output.txt", "w", &succf);

     

    if (!succf)

    AfxMessageBox("File open error", MB_OK);

    p_3d pt, pt2, pt3;

    pt[X] = 100;

    pt[Y] = 200;

    pt[Z] = 0;

    pt2[X] = 4;

    pt2[Y] = 5;

    pt2[Z] = 6;

    pt3[X] = 0;

    pt3[Y] = 0;

    pt3[Z] = 1;

    wr_sof(f, 1, true, &succf);

     

     

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_COOL_ON, &succf);

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_THREAD, &succf);

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_CUT, &succf);

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_POWER_ON, &succf);

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_POWER_OFF, &succf);

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_GSTOP, &succf);

    wr_nci_3d_pt(f, 0, pt, 10, CFLAG_RAPID_TO_PT, &succf);

     

    wr_five_axis(f, pt, pt2, 100, 12, 0, pt3, &succf);

    if (!succf)

    AfxMessageBox("File write", MB_OK);

    p_2d p2;

    p2[X] = 10;

    p2[Y] = 20;

    ct_lin_mill (f, 1, p2, 100, 3, false, CC_OFF, CFLAG_CUT, &succf);

    gr_lin_mill(f, 1, p2, 100, 0, 0, GREEN, false, false, 12, &succf);

    ct_z_move(f, 100, 20, &succf);

    FCLOSE(f);

     

    I don't get any errors, but nothing is ever written to the file. Any ideas why?

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