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:

arenner

Verified Members
  • Posts

    216
  • Joined

  • Last visited

Everything posted by arenner

  1. Ok. I'll look through my list and make sure everything's initialized.
  2. Hello. I am building a Chook in X MR2. I am using the File * pointer to call a blank STL file. Then I write the model's database to that file. When I run the Chook in the Mastercam.exe in Debugging mode with Microsoft Visual Studio .NET 2003 it works fine. I can go to my directory and see that the STL file is populated with my model in ASCII format. The problem occurs when I run the same Chook not in debug mode, but in regular mode. I get the crash pop up window that says I can email my crash to Mastercam. Any suggestions on what to do next? Is there a setting I have wrong?
  3. Thanks Mastershake. I did get a similar code to what I posted above to work. I also got your code to work, that is much simpler. I'm trying to learn how the section of your code e.ent_idn works. I am going to look through the help on it. I'm going to be writing some code to 1)select all entities on one level 2)select some entities on one level for a solid extrude, and 3) select entities on another level for my toolpath containment boundary. Thanks again for your input, any other information/help is appreciated.
  4. I tried using STL heal today and it didn't act the way I expected it to. I opened up a 2.6Mb STL file that was in binary format. When I ran the STL heal tool on it, I selected a chordal deviation of 0.01 I expected to significantly shrink the STL file size. Instead, I got a file that was 2.1Mb and when I opened it up, it didn't look like it had changed. So I went and tried a 0.1 chordal deviation, and it saved the exact same size file as when I used 0.01. Both were 2.1Mb. Then I knew that it wasn't using the chordal deviations I input. I'm guessing it is sticking with its 0.001 default value. Any thoughts?
  5. Yeah, I'll definitely send an email, thanks for the link. I didn't know that is what STLHeal does. Thanks for the info. I'll definitely need to filter out some of the STL complexity as I go.
  6. Hey Colin. Thanks a bunch for the suggestion. Unfortunately I've done that method for a string of 8-10 operations in a row. I have a set of roughing, then finishing operations. They all start with the round stock. The method you mention does work, but to a point. After a number of operations have been done on that STL it obviously becomes extremebly big. I ran a count program on it, and I got 70,000 triangles after 6 operations on the STL. As I'm sure you know, this operation is very tedious, and saving and transforming your STL is very repetitive. It makes a lot more sense to run these ops in one mcamx file. But it seems that the "All previous operations" option is limited. Unless I can get some more information on how to utilize it better. Thanks for your suggestions, please keep them coming
  7. Thanks, I thought it was interesting. I went ahead and dropped the file I'm working with on the FTP site. The file is in the mcx folder called "Rest_Rough_op1and2.mxc". For the first op you'll need to redirect the Rest Material to the file called "stock.stl" that I also dropped on the FTP site. You can either use this file or a cylinder to run a verify on it.
  8. I'm using the Rest Roughing tool for my first and second operations. For my first op I'm using Rest Roughing with the "Rest Material" tab set to compute the remaining stock from an STL I created that is simply the Round stock that I am machining on my mill (4th axis indexer). For my second op, I created a plane that is rotated about the x axis 135 deg. For this op I set Rest Roughing to compute the remaining stock from "All Previous Operations". I was hoping that it would take into account the previous operation's toolpaths, and the STL file I specified, but that was wishful thinking. It would work well if the "All Previous Operations" button took into account the "Stock Setup" option available in the Machine Group Properties. For ops 1 and 2 I set the Z depths from 1" to 0" in my coordinate system. The part is centered on the y and z axes. I am looking for some information on how Rest Roughing calculated my op 2 toolpaths. And I want to know if there is any way for my second op to take into account my first op's toolpaths and its STL stock file. I can make my .mcx file available on the FTP site if anyone wants to see it.
  9. I had another question that other Rest Roughing users might know how to answer. When I first create the Rest Roughing toolpath, I can select my STL to use as the "Rest Material". After I check out of the Rest Roughing parameters window for the first time I get the "Open STL" dialogue/browse window. Yet, if I go back to those parameters later, to select a different STL to use, I don't get the same dialogue/browse for an open STL window. Because this doesn't happen, I have to create another toolpath group.
  10. Thanks, but I tried that and it did the same thing. Today it didn't even show the tool moving in the verify screen even with the option checked. I was looking for any information as to how many triangles, or how big of an STL file the verify can handle. Maybe someone who's dealt with this before can chime in. It may be simply too much for the verify to handle, especially while also calculating the Rest Rough moves.
  11. I am running MR2. I am working on a 3 axis mill with 4th axis indexer. I ran 3 different mastercam files using Surface rough pocket, each file with a new orientation of the indexer. For the 4th operation I used the Rest rough tool that is new in MR2 at a 4th indexer angle. Next I switched to a smaller tool, to smooth out the part, again, I used Rest Roughing. For each mastercam file, I update the verified STL model as I go. Thus when I got to the Rest Roughing operations, I used the verified STL as my stock definition under the "Rest Material" section of Rest roughing. When I get to the 5th mastercam file, I try to verify it using the verified model from the last Op. About halfway through the virutal tool stops moving around the part showing where it is cutting. Then it finishes, but when I save it, the file does not exist, it saves 0Kb. I thought maybe the STl was too big, but at 3.7 Mb, is it really? Any other thoughts?
  12. I'm trying to write my STL without any user input. I have some code that I used with Xform_rotate. What it does is select all of the entities in the database, and rotates each of them. Instead of requiring the user to select the surfaces or bodies to write to the STL, I'd like to simply save all of them using "get_ent". Here is a sample of my code: while (bSuccf) { get_ent(&ptr, &e_ptr, &entity, ALIVE_BIT, P_ID|L_ID|A_ID|S_ID|SURF_ID|SOLID_ID|SPLINE_ID|N_ID|W_ID|D_ID, &bSuccf); count++; } count--; ptr = db_start; while (count > 0) { get_ent(&ptr, &e_ptr, &entity, ALIVE_BIT, P_ID|L_ID|A_ID|S_ID|SURF_ID|SOLID_ID|SPLINE_ID|N_ID|W_ID|D_ID, &bSuccf); if (bSuccf) { FILE * f=0; f = fopen("C:Program Filesmcamxchook_testsSave_STLblank.stl", "wt"); wr_stl(0.003, f, "", '0', true, true); fclose (f); e_ptr = NULL; } count--; } I may not be using get_ent correctly. I'm open to suggestions because this method does not work. Also, do I have to use DoFileOpen to first open the file I call blank.stl? To create it, I opened notepad and saved it with the .stl extension. Any help is appreciated.
  13. Thanks for the help MasterShake. It's cool to be working internationally. I put your function prototype in my code. I also was able to get MR2 installed last night. So one of those things allowed CFile_DoFileSave to work (after I switched my paths to CStrings). I was able to open a mastercam file and output an STL file. The file that was saved was in Binary formate. I"m wondering if there is anyway to specify any other parameters for saving. I need to save my STL in ASCII format. I'm thinking I'll have to use the wr_stl function. Thanks for getting me this far.
  14. I'm not running MR2 which must be the problem. In my MFile_CH.h file I do not see the CFile_DoFileSave function. Is there another method? Or a way to add this functionality?
  15. I tried using "CFile_DoFileSave" but got the error below: c:...main.cpp(65): error C3861: 'CFile_DoFileSave': identifier not found, even with argument-dependent lookup Is there a header file that I need to make this function work?
  16. Forgot to mention, I can make my code available to anyone who wants it, not much to it.
  17. Thanks for tutorial on the string class. I'll read through that to figure out it's benefits. I was able to open up the file that I wanted using DoFileOpen, with simply: char filen[]= "C:Program Filesmcamxchook_testsOpen_FileIGES_1.mcx"; It's great info, and I'm sure I'll need the more robus string class at some point soon.
  18. Thanks very much Jon. Thanks for the Tutorial link too. I figured it was a newbie mistake.
  19. Hello all. I think I'm making a newbie mistake. I'm trying to use the DoFileOpen function to open up a mastercam X file. I'm reading the help on it in Core/MFile_CH.h. It says that the variable it calls "filen" "MUST be complete path to file". So I wrote this: LPCTSTR filen = "C:Program Filesmcamxchook_testsOpen_FileIGES_1.mcx"; Then in main I wrote this: DoFileOpen(filen, merge, astext, checkUnits); While debugging it says there's a bad pointer: filen 0xcccccccc const char * As I said, I think I'm making a stupid newbie mistake. After searching online for uses of LPCTSTR, I just got more confused. Any help is appreciated. Thanks in advance.
  20. I'll keep working with it to see if I can find better results. I hope some of the Mastercam guys catch that at least two members could use a combination of the restmill and surface pocket tools. Seems to me that you could grab some of the restmill feature code and add it to the surface rough pocket feature.
  21. Thanks for the input Colin. I went ahead and tried it. In the Restmill parameters I selected the STL that I generated from the first OP. It took awhile to regenerate, but it finished. The problem with doing it this way is that the Restmill operation itself acts much like a surface contour tool. I noticed the problem when I verified the second operation. It goes around the drive surfaces very well, and even clears out the stock material that I specified. But it does this differently than surface rough pocket. As the tool cut around the surface it didn't immediately clear the stock to the edge for each step down. So as it got farther down the part, it started engaging too much of the side of the end mill. I think it'll either break the tool, or require drastically slower feeds. I guess this is for a wish list. I wish something similar to the "Restmaterials Parameters" tab under its parameters window, needs to be added to the Surface Rough Pocket window. So that for a surface rough pocket operation, I can specify the stock material. Any more input on how to modify what I'm doing to make it work is much appreciated. Thanks very much.
  22. Oh, didn't see that in the help file. I'll try that.
  23. I think it may be asking a lot, but I'd like to know if there's been anything done with an STL file as a toolpath containment boundary. For my work, I am using X, and don't quite yet have the solids option, but may get it soon. I am using round stock for all my parts and have a 3 axis mill with an indexer. I machine using the Surface Rough Pocket tool. I machine OP1 at 0 degrees. Then I rotate the part usually between 120 - 140 degrees and machine again. For now I simply set the Cut Depths to the top of the stock down to the center of stock. Then I make a rectangular toolpath containment boundary in the top view so that the end mill goes to the edge of the stock. I have successufly verified and saved my STL, and even used that to check the next operation (I rotate the STL to the next op's rotation). I have even used the STL as my Stock in my machine group properties. But there are two problems with this: 1. Air cutting from a rectangular toolpath boundary. 2. Air cutting where OP1 cut (since I don't rotate a full 180 degrees). I have searched the forum trying different methods like check surfaces, and wireframes, and nothing has quite worked for me. If I could specify my verified STL file as the containment boundary I would be in very good shape, and save a lot of time. I can upload images/mcx files/etc... onto the ftp if it helps explain my post.
  24. I just wanted to check again to see if anyone had a suggestion on saving an STL file from a mastercam file using either a Chook or VBScript.
  25. Again, thanks for the newbie readable explanations. I believe I correctly deciphered 'myfile' vs. 'in' and their separate locations. I also believe I got the function call done correctly in main. A big thanks for all your help. Hopefully the next newbie will find this link and save you guys some time. I'm working with Roger Martin on the debugger issue, because I think that is the last problem stopping me from getting this working. Thanks again.

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