Skip to content

Commit fabfcce

Browse files
committed
Use packageRelative in Demo
1 parent 20333fe commit fabfcce

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

Sources/Demo/bolts.stl

-27.7 MB
Binary file not shown.

Sources/Demo/main.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ struct Repertoire: Shape3D {
6666
}
6767
}
6868

69-
await Project(options: .format3D(.stl)) {
69+
await Project(packageRelative: "Models") {
70+
Environment {
71+
$0.segmentation = .adaptive(minAngle: 5°, minSize: 0.5)
72+
}
73+
7074
await Model("bolts") {
7175
Repertoire(contents: bolts)
7276
}

Sources/Demo/nutsAndWashers.stl

-10.5 MB
Binary file not shown.

Sources/Helical/Nut/Nut.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ public struct Nut: Shape3D {
2727
let minorDiameter = thread.minorDiameter + tolerance
2828
shape
2929
.subtracting {
30-
Screw(thread: thread, length: shape.threadedDepth)
30+
let offset = 1e-3
31+
Screw(thread: thread, length: shape.threadedDepth + 2 * offset)
32+
.translated(z: -offset)
3133

3234
if let (depth, length) = leadIns.leading?.resolved(for: thread) {
3335
Cylinder(bottomDiameter: minorDiameter + 2 * depth, topDiameter: minorDiameter, height: length)

0 commit comments

Comments
 (0)