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:

exporting as an iges file


Jim Helberg
 Share

Recommended Posts

I have been working with Pete Rimkus on this very issue. We have been testing a Chook that Pete wrote to do this very process. There are still some problems with the Chook, so it is not quite ready yet. Pete mentioned that this feature will be incorporated into Mastercam some time in the future. Please don't bug Pete about this, he is working hard on it already (Thanks Pete!).

 

HTH,

Link to comment
Share on other sites

hi

can somebody try this?

smile.gif

http://ai-sols.sytes.net/download/SaveVisible.zip

 

code:

 extern "C" __declspec(dllexport) int m_main (int not_used)

{

AFX_MANAGE_STATE(AfxGetStaticModuleState());

 

MC_BOOL succf;

 

save_temp_db (&succf);

 

ent e;

DB_LIST_ENT_PTR dPtr, foundPtr;

 

MC_BOOL tp_ref_warn=false;

 

dPtr=db_start;

do

{

 

get_raw_ent(false,&dPtr, &foundPtr, &e , ALIVE_BIT , ALL_ENTITIES_MASK, &succf );

if(succf&&e.eptr)

{

if(!is_level_visible (e.level))

{

delete_ent(e.eptr,true,false,true,&tp_ref_warn,false);

}

 

}

}

while(succf);

 

 

// ::MessageBox (NULL, "This is the SaveVisible chook", "SaveVisible", MB_OK);

//char filename[MAX_PATH]="";

//strcpy(filename,geo_filename);

CString filen=geo_filename;

SaveFile(filen, FALSE);

 

 

restore_temp_db ();// strcpy(geo_filename,filename);

 

return MC_NOERROR|MC_UNLOADAPP;

}


Link to comment
Share on other sites

Ok, it seems that it does not work all of the time with different files. I can create a small MCX file with some simple geometry on a few levels and it works but, when I pull up a large MCX file with several levels and alot of geometry it does not work.

 

???

 

Let me work on this some more and see if I can find a pattern as to what is working and what is not.

Link to comment
Share on other sites

What does work is if you create geomtry and then use SaveVisable (as IGES). When I convert it back in the visable level and geometry is there.

 

What does not work is if you create geomerty, save it and then use SaveVisable (as IGES). When you convert it back in the level and discription is there but not the geometry.

 

I don't understand how saving the file would keep this from working.

Link to comment
Share on other sites

OK Tom,

I uploaded the new one again.

http://ai-sols.sytes.net/download/SaveVisible.zip

*changed

it also ignore blank entities.

 

hope this one works. biggrin.gif

 

 

*off topic* offtopic.gif

I also made a texture background chook. biggrin.gif

http://ai-sols.sytes.net/download/Texture.zip

you need a 512 * 512 pixel jpeg file, and save it as Texture.jpg.

 

flame.gif

Link to comment
Share on other sites

Takashi,

 

Just tried your SaveVisable c-hook, it did what I wanted on the test, so my initial test worked great. biggrin.gif I take small bits of geometry into Rhino from MCX2 to trim and this will eliminated the extra step of opening another MCX2 file and converting to an IGES. I keep playing with it and let you know how it progresses. Thanks again cheers.gifcheers.gifcheers.gif

Link to comment
Share on other sites

Hi,

 

Tom,

I have not figured out why it sometimes does not work for you yet.

 

Nils,

Is it working without any problem for you?

if so, it's ok.

 

I will update the chook if I find the way to fix Tom's problem.

and thank you for testing it. cheers.gif

 

 

what the curret SaveVisible chook does is as follows..

1. save the current database temporarily.

2. delete all teh invisible and blanked entities.

3. call normal save-as dialog function.

4. restore the database back.

 

code:

  extern "C" __declspec(dllexport) int m_main (int not_used)

{

AFX_MANAGE_STATE(AfxGetStaticModuleState());

MC_BOOL succf;

save_temp_db (&succf);

ent e;

DB_LIST_ENT_PTR dPtr, foundPtr;

 

MC_BOOL tp_ref_warn=false;

// toolpath_init (true,true,true,true,&succf);

dPtr=db_start;

do

{

get_raw_ent(false,&dPtr, &foundPtr, &e , 0 , ALL_ENTITIES_MASK, &succf );

if(succf&&e.eptr)

{

if(!is_level_visible (e.level))

{

delete_ent(e.eptr,true,false,true,&tp_ref_warn,false);

}

else if(e.sel&BLANK_BIT)

{

delete_ent(e.eptr,true,false,true,&tp_ref_warn,false);

}

}

}

while(succf);

rebuild_graphics();

 

CString filen=geo_filename;

SaveFile(filen, FALSE);

restore_temp_db ();

 

return MC_NOERROR|MC_UNLOADAPP;

}

Link to comment
Share on other sites

Colin,

 

it is not supposed to cover the geometry.

it is so colled a BUG.. biggrin.gif

 

http://ai-sols.sytes.net/download/Texture.zip

I've changed it a little.

can you try this?

Thanks smile.gif

 

Texture.ini will be created in the chooks folder.

 

Mode=1 is a default value, Mode=0 is turning off the texture.

 

[Texture]

//Mode:0-4

Mode=1

Debug=0

Link to comment
Share on other sites

Hi Takashi,

 

Still no luck on the texture Chook. I start Mastercam ok, then when I try and rotate dynamically, the graphic of the .jpg is displayed with the lower left hand corner of the picture at the screen center. When I pan/rotate/zoom my geometry, the picture stays fixed on the screen. I even tried using the Mastercam Default configuration settings without success.

 

Thanks,

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