Haas generic - Tool info before each operation

Haas generic - Tool info before each operation

CCarreiras
Mentor Mentor
726 Views
2 Replies
Message 1 of 3

Haas generic - Tool info before each operation

CCarreiras
Mentor
Mentor

Hi!

 

I made some minor changes in the haas generic.

I'd like to have some help to implement this change:

Basically, before each operation have some tool info. 

Thanks.

 

1.png

 

 

 

CCarreiras

EESignature

0 Likes
Accepted solutions (1)
727 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

In function onSection() replace this

 

if (hasParameter("operation-comment")) {
	var comment = getParameter("operation-comment");
	if (comment) {
		writeComment(comment);
	}
}

 

with this

 

writeComment("------------------------------");
if (hasParameter("operation-comment")) {
	var comment = getParameter("operation-comment");
	if (comment) {
		writeComment(comment);
	}
}
		
var comment = "T" + toolFormat.format(tool.number) + " " +
	"D=" + xyzFormat.format(tool.diameter) + " " +
	localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
	comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
}
comment += " - " + getToolTypeName(tool.type);
writeComment(comment);
writeComment("------------------------------");

 

Message 3 of 3

CCarreiras
Mentor
Mentor

Thank You, Mark!

 

Worked well!!

CCarreiras

EESignature

0 Likes