htmos6
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Store
eMastercam Wiki
Blogs
Gallery
Events
Posts posted by htmos6
-
-
I have been writing add-on in C-Hook for 4 months. Documentatin is really poor actually. I strongly suggest a Net-Hook one. You can easily find what functions, parameters you search directly by searching. For example if you search for the arc filter setting page in the sdk if you write Arc/ Filter it directly gives what you need to use. IF one more possibility you see, it will not be too hard to select which is the corresponding one. However, in C-Hook sdk it is like an impossible. I generally search short words or regular expression search. I learned C-Hook side, however still failing in such cases. lol.
-
I am interested in adjusting the tolerance distribution using the C-Hook. I’ve successfully extracted and modified the smoothing tolerance using the following code:
currentOperation->smoothing_3d.m_smoothTol = 0.00125;
However, I’m encountering difficulty modifying the total tolerance or cut tolerance. I’ve been able to access these through the Net-Hook, where the name is provided directly. Unfortunately, the same control is not available through the C-Hook. I am seeking guidance on how to gain control over both the “Cut Tolerance Percentage” and the “Total Tolerance” using the C-Hook.
Additionally, I came across the following code snippet in the SDK, which appears to be related to implementing
filter_tolerance
in the structureprm_srf_hmm
:struct prm_srf_hmm
{
...
double cut_tolerance; // the cut tolerance (add filter_tolerance to get total tolerance)
...}
;
However, it seems that the
filter_tolerance
has not been implemented anywhere. Can you provide assistance in determining if this snippet holds the solution to my requirement? -
-
Hello,
I've come across various issues related to modifying Bnci files, and I've successfully addressed many of them. However, I'm currently facing challenges when it comes to implementing these modifications into existing operations. Despite making changes in the Bnci file, the alterations appear as "dead sections" when I regenerate the Bnci file to validate my work.
My objective is to effectively apply these changes to operations. Specifically, when I generate the NC file, any feed rate modifications, such as adding new line and changing its feedrate to "5493," do not seem to reflect in the actual NC file. Successfully accomplishing this would allow me to simulate and verify my changes at the end.
For instance, I want to insert additional points between existing ones in the toolpath or modify the feed rates of existing points. Subsequently, I aim to simulate these changes to ensure the successful insertion of points. In the simulation tool, it should be easy to observe the updated values of x, y, z, and feed rate.
Part of my code given below. What is your suggestion to solve that issue?
Explanation of the code:
I copy bnci line which is a linear feed move type of operation. I change its feedrate. Then, I insert it after the existing original line. For the result, insertion is successful. However, changes cannot be seen if you generate NC file. Because of that, I cannot observe new feedrate values on the simulation too. However, changes can be seen as a "dead section" inside the Bnci file.
Is there any solution for that issue? Important issue in here is that I need to insert additional points between existing points.
Example :
Old Toolpath: A -- B -- C
New Toolpath: A -- A.i -- A.ii -- B -- B.i -- B.ii -- C
A.i, A.ii, B.i, B.ii are new points added between existing ones.for (auto const& opId : opIds)
{
CBnciReadWrite bnciWriter;
int numOfAddedLines = 0;
bool needToOverwrite = false;
auto currentOperation = TpMainOpMgr.GetMainOpList().OpByID(opId);
bnciWriter.ReadSection(currentOperation->op_idn, false);
auto bnciLines = bnciWriter.GetData();for (int index = 0; index < bnciLines.size(); index++){CBnciReadWrite::BnciLinePtr bnciLine = bnciLines[index];
switch (bnciLine->gcode){…………
case NCI_LINEAR: // 1 (mill nci – linear feed move)
{bnciLine->u.m1.feed = 6767; // Feed rateif (fpos == -9999){fpos = bnciWriter.RewriteLine(*bnciLine, true); // Feed rate is updated as 6767.00. Rewrite the line to Bnci.CBnciReadWrite::BnciLinePtr bnciLineSptr = CBnciReadWrite::MakeBnciSptr(*bnciLine); // Copy Bnci LinebnciLineSptr->u.m0.feed = 5493; // Change specific parameter of the Bnci line for testingbnciWriter.InsertAt(numOfAddedLines + index + 1, *bnciLineSptr); // Insert new line just after copied linenumOfAddedLines += 1;needToOverwrite = true;}break;}
………..
}
if (needToOverwrite)
{
int x = bnciWriter.RewriteSection(false, false, false);
this->m_opId = opId;
this->LoadOperation();
this->Regen(); // Regenerate current operstion
}}
Thank you everyone for their time and consideration.
Disable Support Arcs
in Mastercam C-Hook, NET-Hook and VBScript Development
Posted
Hello,
I would like to disable Arc support inside the control definition. Below code did not work for me. How can I achieve that?