Skip to content

Commit

Permalink
Merge pull request #22 from Bechtel-Innovation-Design-Center/Development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
will1742 authored Sep 7, 2021
2 parents 9014f27 + 9ab3d39 commit cd2b705
Show file tree
Hide file tree
Showing 9 changed files with 2,771 additions and 454 deletions.
1,923 changes: 1,923 additions & 0 deletions Autodesk_Setup_BIDC/setup-sheet.cps

Large diffs are not rendered by default.

184 changes: 184 additions & 0 deletions Autodesk_Setup_BIDC/setup-sheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
/**
Copyright (C) 2012-2018 by Autodesk, Inc.
http://www.autodesk.com
All rights reserved
*/

body {
background-color: White;
font-family: Arial, Helvetica, sans-serif;
}

h1 {
font-size: 15pt;
text-align: center;
}

h2 {
font-size: 13pt;
}

h3 {
font-size: 11pt;
}

h3.section {
text-decoration: underline;
}

table {
border: none;
border-spacing: 0;
}

table.jobhead {
width: 18cm;
}

table.job, table.sheet {
width: 18cm;
border: thin solid Gray;
}

th {
background-color: #e0e0e0;
border-bottom: 1px solid Gray;
}

tr.space td {
border-bottom: 1px solid Gray;
height: 1px;
font-size: 1px;
}

table.info {
padding-top: 0.1cm;
}

table.info td {
padding-left: 0.1cm;
}

.job td {
padding: 0.1cm 0.1cm 0.1cm 0.1cm;
}

.model img {
width: 12cm;
border: 2px solid Black;
}

.preview img {
border: 2px solid Black;
}

tr {
border: 1 solid Black;
page-break-inside: avoid;
padding-top: 30px;
padding-bottom: 20px;
white-space: nowrap;
}

.even td {
background-color: White;
}

.odd td {
background-color: #f0f0f0;
}

.jobhead td {
font-size: 12pt;
vertical-align: top;
}

td {
font-size: 9pt;
vertical-align: top;
}

.toolimage {
vertical-align: middle;
}

td.image {
text-align: right;
}

.notes {
white-space: normal;
}

pre {
padding-left: 0.5cm;
font-size: 8pt;
}

p {
white-space: nowrap;
font-size: 12pt;
text-indent: 1cm;
display: block;
}

.jobhead td .description {
display: inline;
font-variant: small-caps;
}

td .description {
font-size: 8pt;
display: inline;
font-variant: small-caps;
}

.value {
display: inline;
font-family: Geneva, sans-serif;
color: #606060;
}

td .percentage {
display: inline;
font-size: 7pt;
}

.longtext {
white-space: normal;
}

img.logo {
height: 0.75cm;
vertical-align: middle;
margin-right: 1em;
}

.footer {
font-size: 9pt;
color: Silver;
text-align: center;
}

line {
stroke-width: 1px;
vector-effect:non-scaling-stroke;
}

path.holder {
stroke-width: 0.5px;
vector-effect: non-scaling-stroke;
}

path.cutter {
stroke-width: 1px;
vector-effect:non-scaling-stroke;
}

path.holderIE {
stroke-width: 0; // non-scaling not worker
}

path.cutterIE {
stroke-width: 0; // non-scaling not worker
}
96 changes: 93 additions & 3 deletions Flow_Waterjet_BIDC/Bechtel Waterjet.cps
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ maximumCircularSweep = toRad(90);
allowHelicalMoves = false;
allowedCircularPlanes = 1 << PLANE_XY; // allow only XY circular motion

var maximumLineLength = 80; // the maximum number of charaters allowed in a line

// formatVersion:
// version 6 should be user selectable, but now use version 5
// version 5 does not have z moves, so it will be safer for inexperienced users
Expand Down Expand Up @@ -64,11 +66,15 @@ properties = {
{title: "V5", id: "5"},
{title: "V6", id: "6"}
],
value: "5",
value: "6",
scope: "post"
}
};

staticProperties = {
postVersion: "BIDC-FWJ.G9.A21"
};

// use fixed width instead
var xyzFormat = createFormat({decimals:4, trim:false});
var integerFormat = createFormat({decimals:0});
Expand All @@ -95,6 +101,14 @@ function writeBlock() {
writeWords(arguments);
}

function formatComment(comment) {
return "// " + comment;
}

function writeComment(text) {
writeln(formatComment(text.substr(0, maximumLineLength - 2)));
}

var FIELD = " ";

/** Make sure fields are aligned. */
Expand All @@ -106,6 +120,17 @@ function f(text) {
return FIELD.substr(0, 10 - length) + text;
}

var commentField = "// ";

/** Make sure fields are aligned. */
function commentf(text) {
var length = text.length;
if (length > 10) {
return text;
}
return commentField.substr(0, 10 - length) + text;
}

/** Make sure fields are aligned. */
function fi(text, size) {
var length = text.length;
Expand Down Expand Up @@ -193,6 +218,13 @@ function onSection() {
return;
}

if (hasParameter("operation-comment")) {
var comment = getParameter("operation-comment");
writeln("");
writeComment(comment);
} else {
writeln("");
}
var initialPosition = getFramePosition(currentSection.getInitialPosition());
onExpandedRapid(initialPosition.x, initialPosition.y, initialPosition.z);
}
Expand All @@ -213,6 +245,25 @@ function writeLinear(x, y, z, feed, column7) {

if (flag || forceOutput) {
if (useVersion6) {
switch (writeLinear.caller.name) {
case "onRapid":
writeComment("Rapid");
break;
case "onLinear":
writeComment("Linear");
break;
case "finishArcs":
writeComment("Arc Completion");
break;
}
writeBlock(
commentf("X"), ",",
f("Y"), ",",
f("Z"), ",",
fi("L", 2), ",",
fi("Feed", 5), ",",
fi("C", 2), ",",
fi("?", 2));
writeBlock(
f(xyzFormat.format(x)), ",",
f(xyzFormat.format(y)), ",",
Expand All @@ -223,6 +274,18 @@ function writeLinear(x, y, z, feed, column7) {
fi(integerFormat.format(column7), 2) // TAG: seen -2..2 - unknown
);
} else {
switch (writeLinear.caller.name) {
case "onRapid":
writeComment("Rapid");
break;
case "onLinear":
writeComment("Linear");
break;
case "finishArcs":
writeComment("Arc Completion");
break;
}
writeBlock(commentf("X"), ",", f("Y"), ",", fi("L", 2), ",", fi("Feed", 5), ",", fi("C", 2))
writeBlock(
f(xyzFormat.format(x)), ",",
f(xyzFormat.format(y)), ",",
Expand Down Expand Up @@ -278,6 +341,18 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {
}
var p = getCurrentPosition();
if (useVersion6) {
writeComment("Circular");
writeBlock(
commentf("X"), ",",
f("Y"), ",",
f("Z"), ",",
fi("CW", 2), ",",
fi("Feed", 5), ",",
fi("C", 2), ",",
fi("?", 2), ",",
f("CX"), ",",
f("CY"), ",",
f("CZ"));
writeBlock(
f(xyzFormat.format(p.x)), ",",
f(xyzFormat.format(p.y)), ",",
Expand All @@ -291,6 +366,7 @@ function onCircular(clockwise, cx, cy, cz, x, y, z, feed) {
f(xyzFormat.format(0)) // PLANE_XY only
);
} else {
writeComment("Circular");
writeBlock(
f(xyzFormat.format(p.x)), ",",
f(xyzFormat.format(p.y)), ",",
Expand Down Expand Up @@ -361,11 +437,25 @@ function onClose() {
if (isRedirecting()) {
var mainProgram = getRedirectionBuffer(); // TAG: no need for redirection
closeRedirection();
writeln("// This file was created by FlowMaster(R), which is proprietary to Flow International Corporation. " + lineCounter + " " + arcCounter);
if (programName) {
var programId;
try {
programId = getAsInt(programName);
} catch (e) {
error(localize("Program name must be a number."));
return;
}
}
writeComment("O" + programId);
writeComment("Career Account Username: " + getGlobalParameter("username"));
writeComment("Filename: " + getGlobalParameter("document-path"));
writeComment("Date: " + getGlobalParameter("generated-at"));
writeComment("Post Version: " + staticProperties.postVersion);
// writeln("// This file was created by FlowMaster(R), which is proprietary to Flow International Corporation. " + lineCounter + " " + arcCounter);
if (useVersion6) {
writeln("VER 6.00");
}
writeln("// Created by Autodesk HSM");
// writeln("// Created by Autodesk HSM");
if (programComment) {
writeln("// " + programComment);
}
Expand Down
Loading

0 comments on commit cd2b705

Please sign in to comment.