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:

chain_manager and chook toolpath question


Recommended Posts

h.. hello..

 

1st question is about chaining in chook.

 

I'm trying to get chains from an operation by using chain_manager function,

but it seems not working... confused.gif

 

 

banghead.gif there is a few sample code and documentaion about chaining in chook bonk.gif

 

 

code:

	operation_manager (&op, OPMGR_GET_FIRST_LIST, &e_ptr, &succf);

 

while(succf)

{

if(op.opcode==TP_CONTOUR&&op.db.select_flag)

{

 

memset (&cmi, 0, sizeof (chain_manager_info));

cmi.op_idn = op.op_idn;

cmi.mode = CHNMGR_GET;

cmi.bnd_n_start = 1;

cmi.bnd_n_end = 1;

 

chain_manager (&cmi, 0, &succf);

if (cmi.chns != NULL)

{

offset_2d_contour(cmi.chns,'L',1,true,10.0,3,true);

}

 

}

operation_manager (&op, OPMGR_GET_NEXT_LIST, &e_ptr, &succf);

}


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 

another question is about adding a chook toolpath.. flame.gif

 

I tried this code and something is added in operation manager..

 

and it says engrave operation.. confused.gif

 

 

code:

 	boolean succf;

nci_bin n;

long fpos;

operation op;

db_ptr_type e_ptr;

memset(&op,0,sizeof(operation));

op.opcode=TP_CHOOK;

//operation_manager (&op, OPMGR_INIT, &e_ptr, &succf);

strcpy(op.comment, "comment!");

strcpy(op.u.chook.opmgr_txt,"chook toolpath!!");

strcpy(op.u.chook.chook_name,"chookpath.dll");

strcpy(op.u.chook.opmgr_prm,"opmgr_prm");

strcpy(op.u.chook.opmgr_tool,"opmgr_tool");

strcpy(op.u.chook.opmgr_geom,"opmgr_geom");

strcpy(op.u.chook.opmgr_nciL,"opmgr_nciL");

strcpy(op.u.chook.opmgr_nciR,"opmgr_nciR");

strcpy(op.u.chook.regen_nci,"regen_nci");

//add geometory and tool around here???

 

operation_manager (&op, OPMGR_INIT_ADD, &e_ptr, &succf);

 

 

//call nci_manager to write nci_bin???

code:

 extern "C" void CH_ENTRY opmgr_prm(long *ptrs)

{

 

}

extern "C" void CH_ENTRY opmgr_tool(long *ptrs)

{

 

}

extern "C" void CH_ENTRY opmgr_geom(long *ptrs)

{

 

}

extern "C" void CH_ENTRY opmgr_nciL(long *ptrs)

{

 

}

extern "C" void CH_ENTRY nciR(long *ptrs)

{

 

}

extern "C" void CH_ENTRY regen_nci(long *ptrs)

{

 

}

any comments and suggestions,sample codes are welcome wink.gif

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