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:

Roger Martin from CNC Software

CNC Software
  • Posts

    2,870
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Roger Martin from CNC Software

  1. I would not bother trying uninstall/reinstall to “correct” this. That’s not going to help! It certainly sounds as if the AppLook setting has been altered. Yes – certain AppLook settings can remove the file path from the title bar. Determine which .workspace file is active. Go into your my mcamx9\CONFIG folder and open that .workspace file in a text editor. Up near the top of the file you should see the AppLook setting line. Note the current setting and change it to “11”. Save the file, start/restart X9 and see if the title bar behavior has changed.
  2. Peter, A .Z2G file is a .ZIP, so you can use any "ZIP" type program (WinZip, etc) to open and manipulate it. I actually assign the .Z2G extension to WinZip and then I can just double-click on them from within Windows .
  3. Lathe Rough between any two boundaries. Try this… I did this using X7, but I believe that it was the same in X4. Do an XForm - Offset Contour to create the rough stock boundary. Now when you go to chain a Lathe Rough toolpath, note the sequence – If prompts you to -> “Select the entry point or chain the inner boundary.” Select your finish boundary and end that chain. Now it prompts you to -> “Select the outer boundary or select the retraction point or select done.” Select your rough stock boundary. This will do Z axis roughing passes, without cutting to much air. If you want to “follow” the profile when removing this material you can do that using a Lathe Finish toolpath by setting the Finish stepover and the Number of finish passes. (On the Finish Parameters tab a page).
  4. I am not seeing an issue with the normal vectors in the STL file. Your sample IGES contains a cube, where… The vector on the “top” surface points “out” and the normal of all of the other sides point “in”. To test, delete all but the Top & Bottom surfaces. Export that data to an ascii STL file. Now flip the surface normal on the bottom surface and export this out to another STL file. Open both in an editor and you can see that the facet normal data in the original STL for both point +Z The 2nd facet normal in the other STL (where you flipped the bottom surface), now points –Z.
  5. To be able to debug a C-Hook project when using the Import/Export functionality for non-native file types. You need to copy some files from the "product" install over to the Resouces folder where the C-Hook SDK is installed. Example: The X7 "product" is installed here... D:\Program Files\mcamx7\resources Copy all of the files from the ^above^ "Product" Resources folder over to where the C-Hook SDK is installed. So that the x64\debug\Resources folder contains all the DLL files from the <mcamx7\resoources folder. The C-Hook SDK for X7 is installed here... D:\MASTERCAM\SDK\X7-MU1\x64\debug\Resources
  6. 1. DoFileOpen(file,false,false,0) function in X7 sdk always returns false when take .stp or .step files. In a RELEASE Build of a X7 C-Hook -> I use the DoFileOpen call on a .STP file and if that file exists and it is loaded, the return is TRUE. When dealing with the non-native Import/Export type files, Release/Debug build can make a difference. If you are running yor C-Hook in DEBUG, the required (Import/Export) McStep.DLL is not getting loaded and the file will not get imported and the result you'll get is -> FALSE. I am trying to recall how to setup X7 Debug so that you can "debug" with the SDK using the Import/Export types. 2.It works fine with .iges file. But the problem with taking in IGES file is, in mastercam x6 or x7 when calling the function wr_stl(0.001, stl_file, "", -1, true, true); to save as .stl file, it always gives flipped normals on a triangulated polygon mesh. I'm not sure what your procedure is here... taking IN and IGES, writing OUT an STL? I'd need to have some sample file(s) showning "what is wrong" and the steps to reproduce this. SDK <at> mastercam <dot> com
  7. * Does other lower versions CHooks behave differently for the same code? This may not work for versions earlier than X8. Maybe X7 (though I've not tried this specific code in X7), but certainly not earlier than that. The handling of Tools has been undergoing many changes. As you can see from the code snippet I posted, not using “tp_tool” and/or the “tool_manager”. * Is tool_manager deprecated? Not officially, but… I’d suggest that it’s time to start moving away from using it. There are the more “modern” ways of doing what you need without using it.
  8. What version of Mastercam? Always good information for us to know - especially when talking about "Tools". 1> I assume you show this tp_tool /op_tool_info to TlTool... construction method because you thought that you needed to have a tp_tool. Just instantiate the TlTool... type you need and then use its Set…() methods to load it up. 2> You want to get away from the old tool_manager method if possible. 3> You want to be ultimately thinking Tool “Assembly". /// <summary> Constructs a Tool Assembly and adds it to the active Machine Group's tool list. </summary> /// /// <param name="toolPtr"> A pointer to the Tool. </param> /// <param name="holderPtr"> A pointer to the Holder. </param> /// <param name="assemblyPtr"> [out] A pointer to the new Assembly. </param> /// /// <returns> true if it succeeds, false if it fails. </returns> bool AddToolAssembly (TlToolMillPtr toolPtr, TlHolderPtr holderPtr, TlAssemblyPtr &assemblyPtr) { // Construct a new (empty) Tool Assembly to stick the Tool and Holder into. TlAssemblyPtr tempPtr (new TlAssembly ()); // We must have a Machine Group to add to. auto pMachineGroup = OMgetActiveMachineGroup (); if (pMachineGroup == nullptr) { return false; } if (!tempPtr->SetMainTool (toolPtr)) { return false; } // Don't add an "empty" Holder. if (holderPtr->GetSegments ().size () > 0) { if (!tempPtr->SetMainHolder (holderPtr)) { return false; } } // This Assembly belongs in this Machine Group. tempPtr->SetMachineGroup (pMachineGroup->grp_idn); // Add this Assembly to the Machine Group's tool list. bool result = TpMainToolMgr.GetMainMillToolList ().AddMillAssembly (tempPtr); if (result) { // Set the out [out] parameter for return to the caller. assemblyPtr = tempPtr; // Double check that it all went well. (optional). result = assemblyPtr->GetID () != TlID::EmptyID; } return result; } /// <summary> Demonstrate making a Center Drill. </summary> /// /// <returns> true if it succeeds, false if it fails. </returns> bool MakeCenterDrill () { TlToolCenterDrill centerDrill; centerDrill.SetToolNumber (1234); centerDrill.SetDrillDiameter (2.5); centerDrill.SetDrillLength (3.5); centerDrill.SetShoulderAngle (63); centerDrill.SetShoulderLength (8); centerDrill.SetTipAngle (118); centerDrill.SetOverallLength (45); centerDrill.SetOverallDiameter (8); centerDrill.SetTaperLength (1); centerDrill.SetName ( "Sample Center Drill" ); //centerDrill.Set... etc, etc. // Construct a shared_ptr to this Center Drill Tool. TlToolCenterDrillPtr spTool (new TlToolCenterDrill (centerDrill)); // The Holder - "define" it if desired. // Note that this Holder is 'empty' and our AddToolAssembly function will NOT add it to the Assembly. // Mastercam will then give the Assembly the "default" Holder. - (which we all know and love). TlHolderPtr spHolder (new TlHolder ()); // Our AddToolAssembly function gives us back the new Assembly. TlAssemblyPtr spAssembly (new TlAssembly ()); return AddToolAssembly (spTool, spHolder, spAssembly); }
  9. What method are you using to create (get) this Chain? Is the user selecting it? Or are you using one of the auto search methods of gathering Chain(s)? In order for us to help (and not just guess) - > please supply some details.
  10. Where (how) are you setting the Chain(s) in the Operation? Do you .Commit the Operation after making this change in the Chain direction? contourOperation.SetChainArray(chains); contourOperation.Commit(); contourOperation.Regenerate();
  11. Creating Lathe tools would be very different than Mill type tools. A C-Hook would be the only way, as there is no support for Lathe in the NET-Hook API. I do not believe I even have any sample C-Hook code for creating Lathe tools. What version of Mastercam ?
  12. In X8/X9... mcamX#\Resources\MCMillRes.DLL Bitmap entry #25803
  13. There is no "user" facility for altering images on the toolpath dialogs. You would have to hack the BMP image in the appropriate Resource DLL. Actually not hard to do if you have a Resource Editor (Google: "resource ddl editor" ) tool and know where to find the image. Finding which *Res.DLL file it is in and which BMP entry in that file is the time consuming part. You could then alter the image. Make sure that you have a backup of the DLL that you're altering! No fun re-installing the entire product because you messed up a Resource DLL. ;( Also FYI - (I only know this because someone asked me this question 2+ yrs ago...) This one specific image is used for all of the "Custom Drill Cycles" (#9-20) Meaning that you cannot have a different image for Custom Cycle#11 than Custom Cycle #12
  14. Using Buffer Files you could save out what you want to an external file. Then you'd need to have logic in the Post to -> Check if that file exists and if so open (read) it. if (you find the data you needed in that file) skip asking the question else, ask the question. Note that this would be post processor-specific, it would have nothing to do with an "individual" part file being processed. Unless you got really creative about the data you're saving out and reading back in.
  15. cuttermen , That was a long time ago. There has never been a "folder with icons" that you can replace/modify that will change the icons used on the Toolpath Manager toolbar in Mastercam X#
  16. No, not "directly" via any current NET-Hook API method. You can get these data items, but not individual "product" options. Mastercam.Support.RegistryManager class methods -> GetSerialNumber() GetCurrentProduct() GetUserType() But... if you email me -> SDK <at> mastercam <dot> com, I can show you a simple way to do so in your NET-Hook.
  17. Mark, ALT-V has always displayed the version information of Mastercam and the Hasp# that Mastercam is running on. It has nothing to do with a specific (MCX) part file.
  18. Q. What version of Mastercam are you running? Though in this case it doesn't make a difference, for other situations it very will may. You cannot just “change the Post Processor”, as it’s meant to be part of the Machine Definition. The Mastercam.Posting.PostingManager is not going to help you here. That is from passing (3 strings) to/from a Post Processor. It has nothing to do with the “selection” of the Post. Ref: Mastercam.Support.MachineDefManager class -> the “CreateMachineGroup” methods… You can create a Machine Group; Either using the “default” Machine, or by specifying the name of the Machine Definition to use. There is not a method for replacing the Machine Definition in a Machine Group using a NET-Hook. Sounds like something to put on the NET-Hook API to-do list!
  19. The Operation Types supported by the NET-Hook API: TP_CONTOUR = 1 TP_DRILL = 2 TP_POCKET = 3 TP_CIRCMILL = 18 // version 8 TP_THDMILL = 100 // version 9 TP_FACE = 102 TP_SLOTMILL = 105 TP_HELIX_BORE = 106 TP_ROUT_MULTI_DRILL = 306
  20. Those alone should not really cause "other" issues
  21. I'd say you have a corrupt file. Associative entity are "database" (not geometric) entities and should not be showing up in the Levels list counts. These specific associative entities are "File" references to the (does not exist) -> C:\Users\Remote\Desktop\-11\1st_op.stl An entity (the Note/Label entity here which is marked as "blanked") should not be on Level #0 That we cannot see it may be that there is a Note with no Text? 0x10 < Note/Label 0x800 < Copious data 0x4000 < Associative entity Entity Type ID => 0x10 Level => 0 Entity Type ID => 0x800 Level => 1 Entity Type ID => 0x40000 Level => 1 Entity Type ID => 0x40000 Level => 1 Entity Type ID => 0x40000 Level => 2 Entity Type ID => 0x40000 Level => 2 Entity Type ID => 0x40000 Level => 4 Entity Type ID => 0x40000 Level => 4
  22. There was no difference in how a CHook got itself listed in Customize from X6 to X7 If you want you can send meyour X7 CHook DLL and its FT file to SDK (at) mastercam (dot) com
  23. I would think that is probably not going to help. If the X6 "product" starts up and runs, the components (Visual C++ 2010 Redistributable Package, etc) to run Mastercam are there. It appears that you have the CHook SDK's for X6, so you can match up the SDK to the Product version. Is the FT file for you C-Hook in the \CHook folder and is it correct? "Correct" -> the Resource IDs are correct, etc.
  24. Unfortunately a fairly useless error message -> The application was unable to start correctly (0xc15002) You should not need any "extra" files other than the Product install and the C-Hook SDK. A couple things... Is the version of the X6 C-Hook SDK and the X6 Product install the same? Same was what you had on your "old" system? Visual Studio - Is the same Version with the same Service Pack(s) installed? You can also try this -> MOVE all of the .FT files from the \CHooks folder to some other temp folder and see if that makes any (positive) difference.

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