forgecad 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AdminPage-DwYHz72L.js → AdminPage-DcCnj0qo.js} +1 -1
- package/dist/assets/{BenchmarkPage-a9_f-1US.js → BenchmarkPage-BVEpJSVk.js} +1 -1
- package/dist/assets/{BlogPage-DodHpvmf.js → BlogPage-DHaGP50_.js} +1 -1
- package/dist/assets/{DocsPage-B5LePEuj.js → DocsPage-CDoxHkz8.js} +33 -2
- package/dist/assets/{EditorApp-QXsAISLR.js → EditorApp-BJ0Dloyh.js} +174 -35
- package/dist/assets/{EmbedViewer-DdEHGUMU.js → EmbedViewer-CRKZbY0y.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-yhhOodbf.js → LandingPageProofDriven-BxHkYRE7.js} +1 -1
- package/dist/assets/{LegalPage-5RbKRGYK.js → LegalPage-B-u6FrVv.js} +1 -1
- package/dist/assets/{PricingPage-E3Rma7aV.js → PricingPage-CzpZ6-Ce.js} +1 -1
- package/dist/assets/{SettingsPage-BJZcM97j.js → SettingsPage-CIZSSAd0.js} +1 -1
- package/dist/assets/{app-CE3sYcV7.css → app-CjsbDlb7.css} +143 -0
- package/dist/assets/{app-DSYrDg0V.js → app-DaTMg3nH.js} +612 -120
- package/dist/assets/cli/{render-ZMHR9HkV.js → render-DPf4AYJK.js} +38 -16
- package/dist/assets/{evalWorker-DbNs7Dkp.js → evalWorker-CjZZWRWW.js} +1428 -1038
- package/dist/assets/{jointPose-DO6mnXn_.js → jointPose-DzQOViQH.js} +1 -1
- package/dist/assets/{manifold-BGlQBBH9.js → manifold-BYlzU521.js} +1 -1
- package/dist/assets/{manifold-fy2MV7K1.js → manifold-DgXo0T5P.js} +2 -2
- package/dist/assets/{manifold-BU-tJwQh.js → manifold-K1SkarlQ.js} +1 -1
- package/dist/assets/{reportWorker-DO6hcQbh.js → reportWorker-B9nWwSrB.js} +1402 -1012
- package/dist/assets/{scalar-sampling-budget-o90NSNmF.js → scalar-sampling-budget-prBw_s8t.js} +2139 -1749
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs-raw/CLI.md +18 -3
- package/dist/docs-raw/generated/assembly.md +70 -5
- package/dist/docs-raw/generated/concepts.md +16 -2
- package/dist/docs-raw/generated/core.md +9 -2
- package/dist/docs-raw/generated/lib.md +1 -1
- package/dist/docs-raw/generated/output.md +14 -43
- package/dist/docs-raw/generated/runtime-names.md +4 -4
- package/dist/docs-raw/guides/simready-quickstart.md +171 -0
- package/dist/docs-raw/simulation-workflow.md +273 -0
- package/dist/index.html +2 -2
- package/dist/sitemap.xml +25 -13
- package/dist-cli/{check-compiler-JTVBITCR.js → check-compiler-II7NLPAB.js} +1 -1
- package/dist-cli/{check-query-propagation-3FFLSMVN.js → check-query-propagation-7462TR3R.js} +1 -1
- package/dist-cli/{chunk-OAN5T4XD.js → chunk-UWTJCGXF.js} +1455 -722
- package/dist-cli/forgecad.js +2994 -529
- package/dist-skill/CONTEXT.md +94 -55
- package/dist-skill/docs/API/core/concepts.md +1 -1
- package/dist-skill/docs/CLI.md +18 -3
- package/dist-skill/docs/generated/assembly.md +66 -5
- package/dist-skill/docs/generated/core.md +9 -2
- package/dist-skill/docs/generated/lib.md +1 -1
- package/dist-skill/docs/generated/output.md +14 -43
- package/dist-skill/docs/generated/runtime-names.md +4 -4
- package/examples/robotics/README.md +46 -0
- package/examples/robotics/scout-cam-rover-simready/README.md +119 -0
- package/examples/robotics/scout-cam-rover-simready/lib/dims.js +140 -0
- package/examples/robotics/scout-cam-rover-simready/main.forge.js +343 -0
- package/examples/robotics/scout-cam-rover-simready/parts/body.forge.js +304 -0
- package/examples/robotics/scout-cam-rover-simready/parts/chassis.forge.js +320 -0
- package/examples/robotics/scout-cam-rover-simready/parts/hardware.forge.js +21 -0
- package/examples/robotics/scout-cam-rover-simready/parts/turret.forge.js +70 -0
- package/examples/robotics/scout-cam-rover-simready/parts/wheel.forge.js +116 -0
- package/examples/robotics/simready-asset-crate.forge.js +79 -0
- package/examples/robotics/simready-diff-drive-rover.forge.js +141 -0
- package/examples/robotics/simready-parallel-gripper.forge.js +102 -0
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const aluminum = Sim.material("6061 aluminum", {
|
|
2
|
+
densityKgM3: 2700,
|
|
3
|
+
staticFriction: 0.45,
|
|
4
|
+
dynamicFriction: 0.35,
|
|
5
|
+
restitution: 0.05,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const rubber = Sim.material("rubber tire", {
|
|
9
|
+
densityKgM3: 1100,
|
|
10
|
+
staticFriction: 0.9,
|
|
11
|
+
dynamicFriction: 0.75,
|
|
12
|
+
restitution: 0.12,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const darkPolymer = Sim.material("filled nylon", {
|
|
16
|
+
densityKgM3: 1250,
|
|
17
|
+
staticFriction: 0.42,
|
|
18
|
+
dynamicFriction: 0.32,
|
|
19
|
+
restitution: 0.04,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
function wheel(axisY) {
|
|
23
|
+
const tireCore = cylinder(26, 34, undefined, 64).color("#171a1d").material({ roughness: 0.9 });
|
|
24
|
+
const treadBlocks = circularPattern(box(9, 5, 30).translate(0, 35, 0), 18).color("#24282c").material({ roughness: 0.95 });
|
|
25
|
+
const outerHub = cylinder(30, 14, undefined, 48).color("#a9b5bc").material({ metalness: 0.35, roughness: 0.42 });
|
|
26
|
+
const hubCap = cylinder(34, 7, undefined, 32).color("#3e4a52").material({ metalness: 0.25, roughness: 0.5 });
|
|
27
|
+
|
|
28
|
+
return group(
|
|
29
|
+
{ name: "Tire", shape: tireCore },
|
|
30
|
+
{ name: "Tread", shape: treadBlocks },
|
|
31
|
+
{ name: "Hub", shape: outerHub },
|
|
32
|
+
{ name: "Cap", shape: hubCap },
|
|
33
|
+
)
|
|
34
|
+
.rotateX(90)
|
|
35
|
+
.withConnectors({
|
|
36
|
+
bore: connector({ origin: [0, 0, 0], axis: [0, axisY, 0], up: [0, 0, 1], kind: "revolute" }),
|
|
37
|
+
tread: connector({ origin: [0, 0, -36], axis: [0, 0, -1], up: [1, 0, 0] }),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const chassis = group(
|
|
42
|
+
{ name: "Lower Pan", shape: box(228, 118, 26).translate(0, 0, 22).color("#46545d").material({ metalness: 0.18, roughness: 0.48 }) },
|
|
43
|
+
{ name: "Upper Deck", shape: box(164, 88, 16).translate(8, 0, 46).color("#62727b").material({ metalness: 0.22, roughness: 0.44 }) },
|
|
44
|
+
{ name: "Front Bumper", shape: box(18, 124, 20).translate(122, 0, 26).color("#262d33").material({ roughness: 0.72 }) },
|
|
45
|
+
{ name: "Rear Bumper", shape: box(14, 116, 16).translate(-122, 0, 24).color("#2d353b").material({ roughness: 0.7 }) },
|
|
46
|
+
{ name: "Left Rocker Guard", shape: box(194, 9, 16).translate(0, 68, 24).color("#252c31").material({ roughness: 0.72 }) },
|
|
47
|
+
{ name: "Right Rocker Guard", shape: box(194, 9, 16).translate(0, -68, 24).color("#252c31").material({ roughness: 0.72 }) },
|
|
48
|
+
{ name: "Sensor Mast", shape: cylinder(34, 5, undefined, 24).translate(58, 0, 72).color("#1c242b").material({ roughness: 0.58 }) },
|
|
49
|
+
{ name: "Lidar", shape: cylinder(16, 22, undefined, 48).translate(58, 0, 98).color("#c7d0d6").material({ metalness: 0.1, roughness: 0.35 }) },
|
|
50
|
+
{ name: "Camera Bar", shape: box(8, 52, 12).translate(129, 0, 44).color("#161b20").material({ roughness: 0.6 }) },
|
|
51
|
+
)
|
|
52
|
+
.withConnectors({
|
|
53
|
+
left_front_axle: connector({ origin: [72, 82, 30], axis: [0, 1, 0], up: [0, 0, 1], kind: "revolute" }),
|
|
54
|
+
left_rear_axle: connector({ origin: [-72, 82, 30], axis: [0, 1, 0], up: [0, 0, 1], kind: "revolute" }),
|
|
55
|
+
right_front_axle: connector({ origin: [72, -82, 30], axis: [0, -1, 0], up: [0, 0, 1], kind: "revolute" }),
|
|
56
|
+
right_rear_axle: connector({ origin: [-72, -82, 30], axis: [0, -1, 0], up: [0, 0, 1], kind: "revolute" }),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const leftWheel = wheel(-1);
|
|
60
|
+
const rightWheel = wheel(1);
|
|
61
|
+
|
|
62
|
+
const rover = assembly("SimReady Diff Drive Rover")
|
|
63
|
+
.addPart("Chassis", chassis, {
|
|
64
|
+
sim: Sim.body({
|
|
65
|
+
massKg: 4.2,
|
|
66
|
+
material: aluminum,
|
|
67
|
+
collider: Sim.collider.convexHull(),
|
|
68
|
+
}),
|
|
69
|
+
})
|
|
70
|
+
.addPart("Left Front Wheel", leftWheel, {
|
|
71
|
+
sim: Sim.body({
|
|
72
|
+
massKg: 0.32,
|
|
73
|
+
material: rubber,
|
|
74
|
+
collider: Sim.collider.convexHull(),
|
|
75
|
+
contacts: { tread: Sim.contact.wheelSurface("tread") },
|
|
76
|
+
}),
|
|
77
|
+
})
|
|
78
|
+
.addPart("Left Rear Wheel", leftWheel, {
|
|
79
|
+
sim: Sim.body({
|
|
80
|
+
massKg: 0.32,
|
|
81
|
+
material: rubber,
|
|
82
|
+
collider: Sim.collider.convexHull(),
|
|
83
|
+
contacts: { tread: Sim.contact.wheelSurface("tread") },
|
|
84
|
+
}),
|
|
85
|
+
})
|
|
86
|
+
.addPart("Right Front Wheel", rightWheel, {
|
|
87
|
+
sim: Sim.body({
|
|
88
|
+
massKg: 0.32,
|
|
89
|
+
material: rubber,
|
|
90
|
+
collider: Sim.collider.convexHull(),
|
|
91
|
+
contacts: { tread: Sim.contact.wheelSurface("tread") },
|
|
92
|
+
}),
|
|
93
|
+
})
|
|
94
|
+
.addPart("Right Rear Wheel", rightWheel, {
|
|
95
|
+
sim: Sim.body({
|
|
96
|
+
massKg: 0.32,
|
|
97
|
+
material: rubber,
|
|
98
|
+
collider: Sim.collider.convexHull(),
|
|
99
|
+
contacts: { tread: Sim.contact.wheelSurface("tread") },
|
|
100
|
+
}),
|
|
101
|
+
})
|
|
102
|
+
.connect("Chassis.left_front_axle", "Left Front Wheel.bore", {
|
|
103
|
+
as: "leftFrontWheel",
|
|
104
|
+
type: "revolute",
|
|
105
|
+
drive: Sim.drive.velocity({ maxTorqueNm: 1.8, maxSpeedRpm: 220, damping: 0.02, friction: 0.01 }),
|
|
106
|
+
})
|
|
107
|
+
.connect("Chassis.left_rear_axle", "Left Rear Wheel.bore", {
|
|
108
|
+
as: "leftRearWheel",
|
|
109
|
+
type: "revolute",
|
|
110
|
+
drive: Sim.drive.velocity({ maxTorqueNm: 1.8, maxSpeedRpm: 220, damping: 0.02, friction: 0.01 }),
|
|
111
|
+
})
|
|
112
|
+
.connect("Chassis.right_front_axle", "Right Front Wheel.bore", {
|
|
113
|
+
as: "rightFrontWheel",
|
|
114
|
+
type: "revolute",
|
|
115
|
+
drive: Sim.drive.velocity({ maxTorqueNm: 1.8, maxSpeedRpm: 220, damping: 0.02, friction: 0.01 }),
|
|
116
|
+
})
|
|
117
|
+
.connect("Chassis.right_rear_axle", "Right Rear Wheel.bore", {
|
|
118
|
+
as: "rightRearWheel",
|
|
119
|
+
type: "revolute",
|
|
120
|
+
drive: Sim.drive.velocity({ maxTorqueNm: 1.8, maxSpeedRpm: 220, damping: 0.02, friction: 0.01 }),
|
|
121
|
+
})
|
|
122
|
+
.withSimulation({
|
|
123
|
+
rootPart: "Chassis",
|
|
124
|
+
profile: Sim.profile.robotBodyRunnable(),
|
|
125
|
+
controllers: [
|
|
126
|
+
Sim.controller.diffDrive({
|
|
127
|
+
leftJoints: ["leftFrontWheel", "leftRearWheel"],
|
|
128
|
+
rightJoints: ["rightFrontWheel", "rightRearWheel"],
|
|
129
|
+
wheelRadiusMm: 34,
|
|
130
|
+
wheelSeparationMm: 164,
|
|
131
|
+
}),
|
|
132
|
+
],
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
verify.that("rover has five physical bodies", () => rover.describe().parts.length === 5);
|
|
136
|
+
verify.that("rover has four driven wheel joints", () => rover.describe().joints.length === 4);
|
|
137
|
+
verify.that("rover keeps wheel contact metadata on every wheel", () => {
|
|
138
|
+
return rover.describe().parts.filter((part) => part.sim?.contacts?.tread).length === 4;
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
return rover;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
const aluminum = Sim.material("anodized aluminum", {
|
|
2
|
+
densityKgM3: 2700,
|
|
3
|
+
staticFriction: 0.44,
|
|
4
|
+
dynamicFriction: 0.32,
|
|
5
|
+
restitution: 0.04,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const urethane = Sim.material("urethane pad", {
|
|
9
|
+
densityKgM3: 1250,
|
|
10
|
+
staticFriction: 0.95,
|
|
11
|
+
dynamicFriction: 0.8,
|
|
12
|
+
restitution: 0.08,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const palm = group(
|
|
16
|
+
{ name: "Palm Body", shape: box(36, 72, 24).translate(-28, 0, 8).color("#596872").material({ metalness: 0.2, roughness: 0.42 }) },
|
|
17
|
+
{ name: "Top Cover", shape: box(44, 64, 5).translate(-28, 0, 23).color("#75858e").material({ metalness: 0.18, roughness: 0.38 }) },
|
|
18
|
+
{ name: "Front Slide Rail", shape: cylinder(74, 3.2, undefined, 24).pointAlong([0, 1, 0]).translate(0, 0, 13).color("#c2c9cc").material({ metalness: 0.55, roughness: 0.32 }) },
|
|
19
|
+
{ name: "Rear Slide Rail", shape: cylinder(74, 3.2, undefined, 24).pointAlong([0, 1, 0]).translate(-38, 0, 13).color("#c2c9cc").material({ metalness: 0.55, roughness: 0.32 }) },
|
|
20
|
+
{ name: "Lead Screw", shape: cylinder(80, 2.2, undefined, 20).pointAlong([0, 1, 0]).translate(-19, 0, 5).color("#2f363b").material({ metalness: 0.4, roughness: 0.38 }) },
|
|
21
|
+
{ name: "Motor Cap", shape: cylinder(16, 11, undefined, 36).pointAlong([0, 1, 0]).translate(-28, -46, 8).color("#222a2f").material({ roughness: 0.56 }) },
|
|
22
|
+
)
|
|
23
|
+
.withConnectors({
|
|
24
|
+
left_slide: connector({ origin: [0, 27, 13], axis: [0, 1, 0], up: [0, 0, 1], kind: "prismatic", min: 0, max: 18 }),
|
|
25
|
+
right_slide: connector({ origin: [0, -27, 13], axis: [0, -1, 0], up: [0, 0, 1], kind: "prismatic", min: 0, max: 18 }),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
function finger(axisY, color) {
|
|
29
|
+
const carriage = box(28, 15, 16).translate(-14, 0, 0).color("#39464e").material({ metalness: 0.12, roughness: 0.48 });
|
|
30
|
+
const upperFinger = box(78, 8, 9).translate(38, 0, 5).color(color).material({ metalness: 0.08, roughness: 0.44 });
|
|
31
|
+
const lowerFinger = box(62, 7, 8).translate(48, 0, -13).color(color).material({ metalness: 0.08, roughness: 0.48 });
|
|
32
|
+
const frontBridge = box(9, 8, 24).translate(76, 0, -4).color(color).material({ metalness: 0.08, roughness: 0.46 });
|
|
33
|
+
const pad = box(30, 3, 16).translate(60, -axisY * 6, -8).color("#20252a").material({ roughness: 0.9 });
|
|
34
|
+
const padRibA = box(26, 1, 2).translate(60, -axisY * 8, -13).color("#121619").material({ roughness: 0.95 });
|
|
35
|
+
const padRibB = box(26, 1, 2).translate(60, -axisY * 8, -8).color("#121619").material({ roughness: 0.95 });
|
|
36
|
+
const padRibC = box(26, 1, 2).translate(60, -axisY * 8, -3).color("#121619").material({ roughness: 0.95 });
|
|
37
|
+
|
|
38
|
+
return group(
|
|
39
|
+
{ name: "Carriage", shape: carriage },
|
|
40
|
+
{ name: "Upper Finger", shape: upperFinger },
|
|
41
|
+
{ name: "Lower Finger", shape: lowerFinger },
|
|
42
|
+
{ name: "Front Bridge", shape: frontBridge },
|
|
43
|
+
{ name: "Pad", shape: pad },
|
|
44
|
+
{ name: "Pad Rib A", shape: padRibA },
|
|
45
|
+
{ name: "Pad Rib B", shape: padRibB },
|
|
46
|
+
{ name: "Pad Rib C", shape: padRibC },
|
|
47
|
+
).withConnectors({
|
|
48
|
+
slide: connector({ origin: [0, 0, 0], axis: [0, -axisY, 0], up: [0, 0, 1], kind: "prismatic", min: 0, max: 18 }),
|
|
49
|
+
pad: connector({ origin: [60, -axisY * 8, -8], axis: [0, -axisY, 0], up: [0, 0, 1] }),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const gripper = assembly("SimReady Parallel Gripper")
|
|
54
|
+
.addPart("Palm", palm, {
|
|
55
|
+
sim: Sim.body({
|
|
56
|
+
massKg: 0.42,
|
|
57
|
+
material: aluminum,
|
|
58
|
+
collider: Sim.collider.boundingBox(),
|
|
59
|
+
}),
|
|
60
|
+
})
|
|
61
|
+
.addPart("Left Finger", finger(1, "#d66b4f"), {
|
|
62
|
+
sim: Sim.body({
|
|
63
|
+
massKg: 0.11,
|
|
64
|
+
material: urethane,
|
|
65
|
+
collider: Sim.collider.convexHull(),
|
|
66
|
+
contacts: { pad: Sim.contact.gripperSurface("pad") },
|
|
67
|
+
}),
|
|
68
|
+
})
|
|
69
|
+
.addPart("Right Finger", finger(-1, "#d66b4f"), {
|
|
70
|
+
sim: Sim.body({
|
|
71
|
+
massKg: 0.11,
|
|
72
|
+
material: urethane,
|
|
73
|
+
collider: Sim.collider.convexHull(),
|
|
74
|
+
contacts: { pad: Sim.contact.gripperSurface("pad") },
|
|
75
|
+
}),
|
|
76
|
+
})
|
|
77
|
+
.connect("Palm.left_slide", "Left Finger.slide", {
|
|
78
|
+
as: "leftFingerOpen",
|
|
79
|
+
type: "prismatic",
|
|
80
|
+
min: 0,
|
|
81
|
+
max: 18,
|
|
82
|
+
drive: Sim.drive.passive({ damping: 0.04, friction: 0.02 }),
|
|
83
|
+
})
|
|
84
|
+
.connect("Palm.right_slide", "Right Finger.slide", {
|
|
85
|
+
as: "rightFingerOpen",
|
|
86
|
+
type: "prismatic",
|
|
87
|
+
min: 0,
|
|
88
|
+
max: 18,
|
|
89
|
+
drive: Sim.drive.passive({ damping: 0.04, friction: 0.02 }),
|
|
90
|
+
})
|
|
91
|
+
.withSimulation({
|
|
92
|
+
rootPart: "Palm",
|
|
93
|
+
profile: Sim.profile.robotBodyRunnable(),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
verify.that("gripper exposes grasp surfaces", () => {
|
|
97
|
+
const parts = gripper.describe().parts;
|
|
98
|
+
return parts.filter((part) => part.sim?.contacts?.pad).length === 2;
|
|
99
|
+
});
|
|
100
|
+
verify.that("gripper has a compact three-body simulation contract", () => gripper.describe().parts.length === 3);
|
|
101
|
+
|
|
102
|
+
return gripper;
|
package/package.json
CHANGED