Skip to content

Commit

Permalink
updated font, content
Browse files Browse the repository at this point in the history
  • Loading branch information
pan261 committed Oct 25, 2021
1 parent d7c7934 commit a2117c3
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 78 deletions.
146 changes: 71 additions & 75 deletions Autodesk_Setup_BIDC/setup-sheet.cps
Original file line number Diff line number Diff line change
Expand Up @@ -856,13 +856,7 @@ function presentTool(tool) {
var c1 = "<table class=\"info\">";
if (!tool.isJetTool()) {
c1 += makeRow(
makeColumn(
bold(localize("T") + toolFormat.format(tool.number)) + " " +
localize("D") + toolFormat.format(!tool.isTurningTool() ? tool.diameterOffset : tool.compensationOffset) + " " +
conditional(!tool.isTurningTool(), localize("L") + toolFormat.format(tool.lengthOffset))
)
);
c1 += makeRow(bold(localize("T") + toolFormat.format(tool.number)) + ": " + v(tool.description));
} else if (tool.isJetTool()) {
c1 += makeRow(makeColumn("&nbsp;")); // move 1 row down
}
Expand Down Expand Up @@ -890,7 +884,7 @@ function presentTool(tool) {
}
}
if (!tool.isJetTool()) {
c1 += makeRow(makeColumn(d(localize("Length") + ": ") + v(spatialFormat.format(tool.bodyLength) + getUnitSymbolAsString())));
c1 += makeRow(makeColumn(d(localize("Length Below Holder") + ": ") + v(spatialFormat.format(tool.bodyLength) + getUnitSymbolAsString())));
if (tool.numberOfFlutes > 0) {
c1 += makeRow(makeColumn(d(localize("Flutes") + ": ") + v(tool.numberOfFlutes)));
}
Expand Down Expand Up @@ -1028,9 +1022,11 @@ function presentTool(tool) {
if (tool.material) {
c1 += makeRow(makeColumn(d(localize("Material") + ": ") + v(getMaterialName(tool.material))));
}
if (tool.description) {
c1 += makeRow(makeColumn(d(localize("Description") + ": ") + v(tool.description)));
}
// if (tool.description) {
// c1 += makeRow(makeColumn(d(localize("Description") + ": ") + v(tool.description)));
// }

// Make more visible
if (tool.comment) {
c1 += makeRow(makeColumn(d(localize("Comment") + ": ") + v(tool.comment)));
}
Expand Down Expand Up @@ -1065,60 +1061,60 @@ function writeTools() {
var c1 = presentTool(tool);
c1 += "</table>";
var c2 = "<table class=\"info\">";
c2 += makeRow(makeColumn("&nbsp;")); // move 1 row down
if (zRanges[tool.number]) {
c2 += makeRow(makeColumn(d(localize("Minimum Z") + ": ") + v(spatialFormat.format(zRanges[tool.number].getMinimum()) + getUnitSymbolAsString())));
}

var maximumFeed = 0;
var maximumSpindleSpeed = 0;
var cuttingDistance = 0;
var rapidDistance = 0;
var cycleTime = 0;
for (var j = 0; j < getNumberOfSections(); ++j) {
var section = getSection(j);
if (!isProbeOperation(section)) {
if (section.getTool().number == tool.number) {
maximumFeed = Math.max(maximumFeed, section.getMaximumFeedrate());
if ((section.type == TYPE_MILLING) || (section.type == TYPE_TURNING)) {
if (maximumSpindleSpeed !== undefined) {
maximumSpindleSpeed = (section.type == TYPE_MILLING) ?
Math.max(maximumSpindleSpeed, section.getMaximumSpindleSpeed()) :
Math.max(maximumSpindleSpeed, section.getTool().getMaximumSpindleSpeed());
} else {
maximumSpindleSpeed = (section.type == TYPE_MILLING) ?
section.getMaximumSpindleSpeed() :
section.getTool().getMaximumSpindleSpeed();
}
}
cuttingDistance += section.getCuttingDistance();
rapidDistance += section.getRapidDistance();
cycleTime += section.getCycleTime();
}
}
}
if (getProperty("rapidFeed") > 0) {
cycleTime += rapidDistance / getProperty("rapidFeed") * 60;
}

c2 += makeRow(makeColumn(d(localize("Maximum Feed") + ": ") + v(feedFormat.format(maximumFeed) + getFeedSymbolAsString())));
if (maximumSpindleSpeed !== undefined) {
c2 += makeRow(makeColumn(d(localize("Maximum Spindle Speed") + ": ") + v(rpmFormat.format(maximumSpindleSpeed) + localize("rpm"))));
}
c2 += makeRow(makeColumn(d(localize("Cutting Distance") + ": ") + v(spatialFormat.format(cuttingDistance) + getUnitSymbolAsString())));
if (getProperty("showRapidDistance")) {
c2 += makeRow(makeColumn(d(localize("Rapid Distance") + ": ") + v(spatialFormat.format(rapidDistance) + getUnitSymbolAsString())));
}
var additional = "";
if ((getNumberOfSections() > 1) && getProperty("showPercentages")) {
if (totalCycleTime > 0) {
additional = "<div class=\"percentage\">(" + percentageFormat.format(cycleTime / totalCycleTime) + "%)</div>";
}
}
c2 += makeRow(makeColumn(d(localize("Estimated Cycle Time") + ": ") + v(formatCycleTime(cycleTime) + " " + additional)));
// c2 += "<tr class=\"thin\"><td width=\"6cm\">&nbsp;</td></tr>"; // fixed width
c2 += "</table>";
// var c2 = "<table class=\"info\">";
// c2 += makeRow(makeColumn("&nbsp;")); // move 1 row down
// if (zRanges[tool.number]) {
// c2 += makeRow(makeColumn(d(localize("Minimum Z") + ": ") + v(spatialFormat.format(zRanges[tool.number].getMinimum()) + getUnitSymbolAsString())));
// }

// var maximumFeed = 0;
// var maximumSpindleSpeed = 0;
// var cuttingDistance = 0;
// var rapidDistance = 0;
// var cycleTime = 0;
// for (var j = 0; j < getNumberOfSections(); ++j) {
// var section = getSection(j);
// if (!isProbeOperation(section)) {
// if (section.getTool().number == tool.number) {
// maximumFeed = Math.max(maximumFeed, section.getMaximumFeedrate());
// if ((section.type == TYPE_MILLING) || (section.type == TYPE_TURNING)) {
// if (maximumSpindleSpeed !== undefined) {
// maximumSpindleSpeed = (section.type == TYPE_MILLING) ?
// Math.max(maximumSpindleSpeed, section.getMaximumSpindleSpeed()) :
// Math.max(maximumSpindleSpeed, section.getTool().getMaximumSpindleSpeed());
// } else {
// maximumSpindleSpeed = (section.type == TYPE_MILLING) ?
// section.getMaximumSpindleSpeed() :
// section.getTool().getMaximumSpindleSpeed();
// }
// }
// cuttingDistance += section.getCuttingDistance();
// rapidDistance += section.getRapidDistance();
// cycleTime += section.getCycleTime();
// }
// }
// }
// if (getProperty("rapidFeed") > 0) {
// cycleTime += rapidDistance / getProperty("rapidFeed") * 60;
// }

// c2 += makeRow(makeColumn(d(localize("Maximum Feed") + ": ") + v(feedFormat.format(maximumFeed) + getFeedSymbolAsString())));
// if (maximumSpindleSpeed !== undefined) {
// c2 += makeRow(makeColumn(d(localize("Maximum Spindle Speed") + ": ") + v(rpmFormat.format(maximumSpindleSpeed) + localize("rpm"))));
// }
// c2 += makeRow(makeColumn(d(localize("Cutting Distance") + ": ") + v(spatialFormat.format(cuttingDistance) + getUnitSymbolAsString())));
// if (getProperty("showRapidDistance")) {
// c2 += makeRow(makeColumn(d(localize("Rapid Distance") + ": ") + v(spatialFormat.format(rapidDistance) + getUnitSymbolAsString())));
// }
// var additional = "";
// if ((getNumberOfSections() > 1) && getProperty("showPercentages")) {
// if (totalCycleTime > 0) {
// additional = "<div class=\"percentage\">(" + percentageFormat.format(cycleTime / totalCycleTime) + "%)</div>";
// }
// }
// c2 += makeRow(makeColumn(d(localize("Estimated Cycle Time") + ": ") + v(formatCycleTime(cycleTime) + " " + additional)));
// // c2 += "<tr class=\"thin\"><td width=\"6cm\">&nbsp;</td></tr>"; // fixed width
// c2 += "</table>";

var c3 = "<table class=\"info\">";
c3 += makeRow(makeColumn("&nbsp;")); // move 1 row down
Expand Down Expand Up @@ -1203,7 +1199,7 @@ function writeTools() {
write(
makeRow(
"<td valign=\"top\">" + c1 + "</td>" +
"<td valign=\"top\">" + c2 + "</td>" +
// "<td valign=\"top\">" + c2 + "</td>" +
"<td valign=\"top\">" + c3 + "</td>" +
"<td class=\"toolimage\" valign=\"center\" align=\"center\">" + c4 + "</td>",
"info"
Expand Down Expand Up @@ -1847,7 +1843,7 @@ function writeTotals() {

var c1 = "<table class=\"info\" cellspacing=\"0\">";
var tools = getToolTable();
c1 += makeRow(makeColumn(d(localize("Number Of Operations") + ": ") + v(getNumberOfSections())));
// c1 += makeRow(makeColumn(d(localize("Number Of Operations") + ": ") + v(getNumberOfSections())));
var text = "";
var gotTool = false;
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
Expand All @@ -1858,10 +1854,10 @@ function writeTotals() {
gotTool |= tool.number != 0;
text += bold(localize("T") + toolFormat.format(tool.number));
}
if ((section.type == TYPE_MILLING) || (section.type == TYPE_TURNING) || gotTool) {
c1 += makeRow(makeColumn(d(localize("Number Of Tools") + ": ") + v(tools.getNumberOfTools())));
c1 += makeRow(makeColumn(d(localize("Tools") + ": ") + vWrap(text)));
}
// if ((section.type == TYPE_MILLING) || (section.type == TYPE_TURNING) || gotTool) {
// c1 += makeRow(makeColumn(d(localize("Number Of Tools") + ": ") + v(tools.getNumberOfTools())));
// c1 += makeRow(makeColumn(d(localize("Tools") + ": ") + vWrap(text)));
// }
if (zRange) {
c1 += makeRow(makeColumn(d(localize("Maximum Z") + ": ") + v(spatialFormat.format(zRange.getMaximum()) + getUnitSymbolAsString())));
c1 += makeRow(makeColumn(d(localize("Minimum Z") + ": ") + v(spatialFormat.format(zRange.getMinimum()) + getUnitSymbolAsString())));
Expand All @@ -1870,10 +1866,10 @@ function writeTotals() {
if (maximumSpindleSpeed !== undefined) {
c1 += makeRow(makeColumn(d(localize("Maximum Spindle Speed") + ": ") + v(rpmFormat.format(maximumSpindleSpeed) + localize("rpm"))));
}
c1 += makeRow(makeColumn(d(localize("Cutting Distance") + ": ") + v(spatialFormat.format(cuttingDistance) + getUnitSymbolAsString())));
if (getProperty("showRapidDistance")) {
c1 += makeRow(makeColumn(d(localize("Rapid Distance") + ": ") + v(spatialFormat.format(rapidDistance) + getUnitSymbolAsString())));
}
// c1 += makeRow(makeColumn(d(localize("Cutting Distance") + ": ") + v(spatialFormat.format(cuttingDistance) + getUnitSymbolAsString())));
// if (getProperty("showRapidDistance")) {
// c1 += makeRow(makeColumn(d(localize("Rapid Distance") + ": ") + v(spatialFormat.format(rapidDistance) + getUnitSymbolAsString())));
// }
c1 += makeRow(makeColumn(d(localize("Estimated Cycle Time") + ": ") + v(formatCycleTime(cycleTime))));
c1 += "</table>";

Expand Down
6 changes: 3 additions & 3 deletions Autodesk_Setup_BIDC/setup-sheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
All rights reserved
*/

@import url("https://use.typekit.net/sgs7pgb.css");
/* @import url("https://use.typekit.net/sgs7pgb.css"); */

body {
background-color: #CFB991;
font-family: acumin-pro, 'Franklin Gothic', sans-serif;
font-family: 'Roboto', 'Franklin Gothic', sans-serif;
padding: 4rem;
}

Expand Down Expand Up @@ -77,7 +77,7 @@ table.info td {

.model img {
width: 100%;
max-width: 60rem;
max-width: 40rem;
}

.preview img {
Expand Down

0 comments on commit a2117c3

Please sign in to comment.