app
SOLIDWORKS Bridge
Public Made by Adomby adom
Launch, model and quit SOLIDWORKS from any Adom container. Nothing is ever lost.
main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
{
"id": "cswa-05-tool-block-step1",
"title": "Official Tool Block, Step 1 (Q3): A 81, B 57, C 43",
"source": "https://www.solidworks.com/sites/default/files/2017-12/CSWASampleExam.pdf (Dassault CSWA Sample Exam, 2017 edition; archive http://web.archive.org/web/20251230104817/https://www.solidworks.com/sites/default/files/2017-12/CSWASampleExam.pdf)",
"official": true,
"units": "MMGS",
"origin": "the \u00d814 hole's centre; x right, y up, the profile on Front Plane extruded +Z (the exam says 'Part origin: Arbitrary' - mass only)",
"material": {
"name": "AISI 1020",
"densityKgM3": 7900
},
"recipe": "tools/cswa/SOURCES.md, Part 1: the R19 arc is tangent to the 10\u00b0 line that starts on the hole's centreline at (0, 18) and ends at the right lobe's corner P = (A-43, B-33); the flank runs (A-14, B-57) to (A-43, -33); R29 is centred where the flank (extended) meets y = -14; R5 is tangent to R29 and to y = -14; 45\u00b0 chamfers 7 x 7 (left corners) and 5 x 5 (right lobe).",
"variables": {
"A": 81,
"B": 57,
"C": 43
},
"derived": [
[
"xR",
"A-14"
],
[
"xRL",
"A-43"
],
[
"yRT",
"B-33"
],
[
"yRE",
"B-57"
],
[
"yB",
"-14"
],
[
"yV",
"-33"
],
[
"th",
"rad(10)"
],
[
"dx",
"cos(th)"
],
[
"dy",
"-sin(th)"
],
[
"nx",
"sin(th)"
],
[
"ny",
"cos(th)"
],
[
"ox",
"19*nx - xRL"
],
[
"oy",
"18 + 19*ny - yRT"
],
[
"bq",
"2*(ox*dx + oy*dy)"
],
[
"cq",
"ox^2 + oy^2 - 361"
],
[
"t",
"(-bq - sqrt(bq^2 - 4*cq))/2"
],
[
"Tx",
"t*dx"
],
[
"Ty",
"18 + t*dy"
],
[
"fs",
"(yB - yV)/(yRE - yV)"
],
[
"c29x",
"xRL + fs*(xR - xRL)"
],
[
"c29y",
"yB"
],
[
"xv",
"c29x - sqrt(29^2 - (c29y - yV)^2)"
],
[
"c5y",
"yB - 5"
],
[
"c5x",
"c29x - sqrt(34^2 - 25)"
],
[
"tpx",
"c5x + 5*(c29x - c5x)/34"
],
[
"tpy",
"c5y + 5*(c29y - c5y)/34"
],
[
"a29",
"(atan2(yV - c29y, xv - c29x) + atan2(tpy - c29y, tpx - c29x))/2"
],
[
"m29x",
"c29x + 29*cos(a29)"
],
[
"m29y",
"c29y + 29*sin(a29)"
],
[
"a5",
"(atan2(tpy - c5y, tpx - c5x) + pi/2)/2"
],
[
"m5x",
"c5x + 5*cos(a5)"
],
[
"m5y",
"c5y + 5*sin(a5)"
]
],
"expected": {
"massG": 939.54,
"tolerancePct": 1.0
},
"keyBasis": "the official key, option d (939.54 g); the recipe's profile area is 2765.79 mm\u00b2 (the reviewer's rebuild: 0.00 %)",
"needsOps": [],
"script": [
{
"op": "new_part"
},
{
"op": "sketch",
"plane": "Front Plane",
"entities": [
{
"line": {
"from": [
0,
18
],
"to": [
"=Tx",
"=Ty"
]
}
},
{
"tangentArc": {
"to": [
"=xRL",
"=yRT"
],
"radiusMm": 19
}
},
{
"polyline": {
"points": [
[
"=xRL",
"=yRT"
],
[
"=xR",
"=yRT"
],
[
"=xR",
"=yRE"
],
[
"=xRL",
"=yV"
],
[
"=xv",
"=yV"
]
]
}
},
{
"arc3": {
"start": [
"=xv",
"=yV"
],
"mid": [
"=m29x",
"=m29y"
],
"end": [
"=tpx",
"=tpy"
]
}
},
{
"arc3": {
"start": [
"=tpx",
"=tpy"
],
"mid": [
"=m5x",
"=m5y"
],
"end": [
"=c5x",
-14
]
}
},
{
"polyline": {
"points": [
[
"=c5x",
-14
],
[
-14,
-14
],
[
-14,
18
],
[
0,
18
]
]
}
},
{
"sketchChamfer": {
"at": [
-14,
18
],
"distanceMm": 7
}
},
{
"sketchChamfer": {
"at": [
-14,
-14
],
"distanceMm": 7
}
},
{
"sketchChamfer": {
"at": [
"=xR",
"=yRT"
],
"distanceMm": 5
}
},
{
"circle": {
"centerMm": [
0,
0
],
"diameterMm": 14
}
}
]
},
{
"op": "extrude",
"depthMm": "=C"
},
{
"op": "set_material",
"name": "AISI 1020",
"densityKgM3": 7900
}
]
}