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:
I've removed all chooks in the chooks folder.
ftp://mastercam:[email protected]/Ma..._Jpg,gif,bmp's/
ftp://mastercam:[email protected]/Ma.../tolerance3.JPG
Yeah,I have VS2003 and VS2005,
I want to know which version of Viasual Studio I should use for compiling C-Hooks fo X2.
I'm testing my chooks under X2 beta now,
and I found some of them did not work.
(with messages 'the appropriate Mastercam .NET Support dll could not be found.' 'Unknown file type')
so, I compared the difference between them,
and it seems that chooks which using MCDialog class do not work.
and I converted all 'MCDialog' => 'CDialog'.
(and m_version thing..)
I know I should use X2 SDK,but it is not in my hand yet. just curious..
this is a part of my code,(that does rotate solid ent&boolean continuously)
I dont know how to undo solid operation, so I just saved backup files..
(to remove solid operation history,save solid entity as *.x_t file and load it again.. or use nohist.dll)
code:
ent e0,e1;
//select_ent or set sel bits
DB_LIST_ENT_PTR *bodyPtrs=new DB_LIST_ENT_PTR[2];
bodyPtrs[0]=e0.eptr;
bodyPtrs[1]=e1.eptr;
sld_new_boolean(1, 2, bodyPtrs, "boolean");
delete bodyPtrs;
if(!CFile_DoFileSave(file))
{
return (MC_NOERROR | MC_UNLOADAPP);
}
hi,
if you want to save all/selected entity,
you dont have to use get_ent() function.
code:
ent e;
DB_LIST_ENT_PTR dPtr, foundPtr;
MC_BOOL succf;
FILE *fp=NULL;
/**
* @par Purpose:
* Write the database to an open STL file
*
* @param[in] err_tol error tolerance value
* @param[in] f Pointer to the open STL file
* @param[in] fname Name of the open STL file
* @param[in] ent_idn Specific entity to output or if '0', output all, or if '-1', output only selected entities
* @param[in] ascii_data Set to TRUE if the data is to be written in ASCII text
* @param[in] silent Set to TRUE if no warnings, progress reports, or messages are to be presented to the user
*/
//all entity
fp = fopen("C:test.stl", "wt");
if(fp)
{
wr_stl(0.01, fp, "", 0, true, true);
fclose (fp);
}
//only selected
fp = fopen("C:test.stl", "wt");
if(fp)
{
wr_stl(0.01, fp, "", -1, true, true);
fclose (fp);
}
//specific entity by entity mask/selection mask/levels, etc..
fp = fopen("C:test.stl", "wt");
if(fp)
{
dPtr=db_start;
do
{
get_ent(&dPtr, &foundPtr, &e, ALIVE_BIT, SURF_ID|SOLID_ID, &succf );
if(succf&&e.eptr)
{
wr_stl(0.01, fp, "", e.ent_idn, true, true);
}
}
while(succf);
fclose (fp);
}
I've coded stl viewer chook and shader chook,
but I have not made english dialog yet.
and I dont know if our company is planning to sell my chook oversea yet...
Please wait for a while,
I'm on vacation for weeks
[ 08-12-2006, 03:36 AM: Message edited by: MasterShake_ ]
hello
I'm trying to rotate gview with chook.dll.
and I'm using set_gr_view() function,
but it fails if threre is no view with the same matrix.....
so, I have to create a new view by calling find_view_m() function.
I dont like to increase the view number ( 1,2,3,4,5... 99,100,102....)
Is there any function like ..
set_view_matrix(short v_no, matrix_33 v_mat);....?????
thanks
code:
MC_BOOL succf;
matrix_33 v_mat;
//
//find_view_m( v_mat, &v_no, true, &succf);
set_gr_view (v_mat);
//set_gview (v_no);
repaint_graphics();
however I've never used t value,
I think t value is range of 0.0 to 1.0.
If there is a spline like below, t value is..
just a guess.....
code:
0.0 0.5 1.0
endpoint1 +-------------<>-------------+ endpoint2
clicked point
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.