Zaffin_D
Verified Members-
Posts
374 -
Joined
-
Days Won
1
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Everything posted by Zaffin_D
-
The posted file gets split in two files .NC files
Zaffin_D replied to bogusmill's topic in Industrial Forum
You have a different nc file name set for some operations. Select all operations and right click in the operations manager. Then from the context menu, Edit selected operations > Change NC file name... -
Why no use smc_shared_dir$ to do this? Seems easier. sbufname4$ = smc_shared_dir$ + "buffer4.txt"
-
Bridgeport DX32 Post Processor
Zaffin_D replied to Kampfzentrum's topic in Post Processor Development Forum
I think at this point it's best that you contact your Mastercam reseller. Thanks, Jeff -
Bridgeport DX32 Post Processor
Zaffin_D replied to Kampfzentrum's topic in Post Processor Development Forum
Is your maintenance current? If not, you will not be able to download posts from the tech exchange. -
Bridgeport DX32 Post Processor
Zaffin_D replied to Kampfzentrum's topic in Post Processor Development Forum
Only thing I can think of is that you're not linked on mastercam.com. That link was direct to the 2019 DX32 post, in case that's the issue head to https://community.mastercam.com/TechExchange, sign in, and search for "DX32". -
The system clock (metric 2) is usually not a good way to test preformance.
-
Just about 5 minutes for a Ryzen 5 2600x.
-
Bridgeport DX32 Post Processor
Zaffin_D replied to Kampfzentrum's topic in Post Processor Development Forum
There's a DX32 post on Mastercam's tech exchange. -
There isn't one. It is available in ToolNetApi.dll, so you can get the value in your posted code using a NET-Hook.
-
Doesn't look like it.
-
Have you contacted your reseller?
-
Try setting them up in a string select table, like below. tool_rad : 0 sDA : "DA" sDB : "DB" sDC : "DC" stool_rad : "" #Target string fstrsel sDA tool_rad stool_rad 3 -1 The change your ptoff post block to the below. ptoff #Tool radial offset if tloffno$ = 10001 | tloffno$ = 10002 | tloffno$ = 10003 | tloffno$ = t$, [ if tloffno$ = 10001 | tloffno$ = t$, tool_rad = 0 if tloffno$ = 10002, tool_rad = 1 if tloffno$ = 10003, tool_rad = 2 stool_rad if op_id$ <> prv_op_id$, result = force(tool_rad, tool_rad) ] else, *tloffno$ !tloffno$ You'll also have to add the force line (shown below) to the psof$ postblock result = force(tool_rad, tool_rad)
-
In MP strings are non modal so the literal string will always be output. This also applies to strings that are in a variable, for example sg56. Adding the force leader (*) to sg56 is redundant, it will always be output. Strings that require modality are usually set up in a string select table.
-
Determining Total Number of Operations
Zaffin_D replied to ad1187's topic in Post Processor Development Forum
If you are interested in a NET-Hook solution the below code may help. public override MCamReturn Run(int param) { var postArgs = PostingManager.PostProcessorArguments; var postArguments = (PostProcessorArgumentsType)postArgs; var opID = postArguments.Argument1; if(!int.TryParse(opID, out var operationID)) { return MCamReturn.ErrorOccurred; } var returnArgs = PostingManager.PostProcessorArguments; var returnArguments = (PostProcessorArgumentsType)returnArgs; if (AllOpsPosted(operationID)) { returnArguments.Argument1 = "1 "; } else { returnArguments.Argument1 = "0 "; } PostingManager.PostProcessorArguments = returnArguments; return MCamReturn.NoErrors; } private bool AllOpsPosted(int operationID) { var currentOperation = SearchManager.GetOperation(operationID); var allOperations = SearchManager.GetOperations(currentOperation.GroupNumber); foreach (var operation in allOperations) { if (!operation.Selected) { return false; } } return true; } Below is a sample post that shows how you would call the NET-Hook. fs2 4 1 0 1 0 pheader$ "(--- Start of File ---)", e$ *e$ psof$ "(--- Start of File ---)", e$ *e$ pAllOpsPosted(op_id$) if (allOpsPosted), [ "All operations posted", e$ ] else, [ "Subset of operations posted", e$ ] *e$ peof$ "(--- End of File ---)", e$ fmt "" 4 opID dllReturn : 0 allOpsPosted : no$ sdq : '"' sspace : " " snoArgument : "noArg" sDLLArgs : "" sallOpsPostedDLL : "AllOpsPosted.dll" pAllOpsPosted(opID) sDLLArgs = sdq + drs_str(2, opID) + sdq + sspace + sdq + snoArgument + sdq + sspace + sdq + snoArgument + sdq dllReturn = dll(sallOpsPostedDLL, sDLLArgs) allOpsPosted = rparsngl(spost_arg_0$, 1) -
Some sort of bug in 2019 post concerning scandic letters.
Zaffin_D replied to pullo's topic in Industrial Forum
You should send this in to CNC's post department. Starting with 2019 the posts are encoded as UTF-8, and it seems like your charters are getting re-encoded. I'm positive they want to investigate this issue. -
Determining Total Number of Operations
Zaffin_D replied to ad1187's topic in Post Processor Development Forum
I think that check only works if the first op and last op in the machine group are posted. Let's say we have 5 op's in a machine group; that check would work if ops 1, 3 and 5 were posted, but wouldn't if ops 1, 2 and 3 were posted. -
Some sort of bug in 2019 post concerning scandic letters.
Zaffin_D replied to pullo's topic in Industrial Forum
Is the file being encoded as UTF-8 in your editor? -
Determining Total Number of Operations
Zaffin_D replied to ad1187's topic in Post Processor Development Forum
I'm pretty sure you'll need to call a NET-hook from your post in order to do this. Posting in Mastercam only generates the NCI and related data for the selected operations. -
If you (or anyone else) is still interested in this, I've uploaded an example project to GitHub. It's not a NET-hook, but it could be converted to one with a little massaging.
-
I don't doubt that it's working, but CNC doesn't recommend it's use in mill, router, or lathe posts.
-
Using scalex$, scaley$, and scalez$ is only safe in wire posts.
-
If you use lines, the below method may be helpful. I'm not a programmer, so there is definitely a better way to do this. public bool ProcessLinesOnLevel(int level) { var selectLines = new GeometryMask { Lines = true }; var selectAll = new SelectionMask { All = true }; // Get all lines on a given level var selectedGeometry = SearchManager.GetGeometry(selectLines, selectAll, level); // Make sure there are lines to process if (selectedGeometry.Count() > 0) { // Iterate through each entity foreach (var entity in selectedGeometry) { // Cast the entity to LineGeometry var line = (LineGeometry)entity; // Create instances of Vector3D for the start and end points var startPoint = new Vector3D(line.EndPoint1.x, line.EndPoint1.y, line.EndPoint1.z); var endPoint = new Vector3D(line.EndPoint2.x, line.EndPoint2.y, line.EndPoint2.z); // Calculate the vector var vector = Vector3D.Subtract(startPoint, endPoint); // Normalize/Unitize the vector vector.Normalize(); // Write the values to a list of strings for output later lineData.Add($"{Math.Round(startPoint.X, 8)};{Math.Round(startPoint.Y, 8)};{Math.Round(startPoint.Z, 8)};" + $"{Math.Round(vector.X, 8)};{Math.Round(vector.Y, 8)};{Math.Round(vector.Z,8)};"); } return true; } else { return false; } } That gets you the XYZ position and the unitized vector of a given line. I think you would have to convert that vector into Euler angles then convert the Euler angles to quaternions. Converting the unit vector to Euler angles is simple. It appears that converting Euler angles to quaternions is simple, though I've never done it; I may try tonight for fun.
-
I would try the engrave toolpath.
-
Change Axis prefix with transform op.
Zaffin_D replied to huskermcdoogle's topic in Post Processor Development Forum
Have you tried setting the axis address rather than using the nwadrs function? Should be able to set it in pheader$, something like below? pheader$ if not(isTransform), str_pri_axis = "A1" else, str_pri_axis = "A2"
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.