SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Regression tests: a cut short of a face keeps its skin, and the issue's pleats mirror and build at the far end (#1669) (#1730)
Erikas28d67fb5775d
diff --git a/crates/engine/tests/pleat_regressions.rs b/crates/engine/tests/pleat_regressions.rsnew file mode 100644index 0000000000..edff246f61--- /dev/null+++ b/crates/engine/tests/pleat_regressions.rs@@ -0,0 +1,144 @@+//! #1669: a window cut through a battery case's wall and a lofted pleat joined into it, mirrored+//! to the case's far end, and the same features built directly there.++use serde_json::{Value, json};+use solidcraft_engine::Session;++fn replay(script: &str) -> Session {+ let mut s = Session::default();+ let script: Value = serde_json::from_str(script).unwrap();+ s.run_script(&script).unwrap();+ s+}++fn volume(s: &Session, body: &str) -> f64 {+ s.model.state().body(body).map(|b| solidcraft_kernel::measure(&b.body).unwrap().volume).unwrap_or(0.0)+}++/// #1669: an Extrude Cut whose profile stops 0.25 mm short of the far face of a 3.75 mm wall+/// leaves that skin. The profile's edge was taken for one lying on the face (the space half a+/// growth step past it was empty) and grown through the skin, until #1310 asked the faces the+/// growth sweeps instead. A pleat window built so at the far end of a case opened, where its+/// mirror rightly left the skin.+#[test]+fn cut_stopping_short_of_a_face_leaves_the_skin() {+ let wall = |width: f64| {+ let s = replay(+ &json!({"commands": [+ {"command": "solid.box", "params": {"corner": [-100, 0, 0], "length": 200, "width": width, "height": 95, "body_name": "Wall"}},+ {"command": "sketch.create", "params": {"plane": "XY", "offset": -1}},+ {"command": "sketch.rectangle.two_point", "params": {"p0": [-24, -0.5], "p1": [24, 3.5]}},+ {"command": "sketch.finish", "params": {}},+ {"command": "solid.extrude", "params": {"distance": 91, "operation": "cut", "targets": ["Wall"]}}+ ]})+ .to_string(),+ );+ volume(&s, "Wall")+ };+ // 48 wide, 3.5 deep (of the wall's 3.75), 90 high.+ let want = 200.0 * 3.75 * 95.0 - 48.0 * 3.5 * 90.0;+ let v = wall(3.75);+ assert!((v - want).abs() < 1e-6 * want, "{v} vs {want}");+ // A profile ending on the far face still cuts clean through, as before.+ let want = 200.0 * 3.5 * 95.0 - 48.0 * 3.5 * 90.0;+ let v = wall(3.5);+ assert!((v - want).abs() < 1e-6 * want, "{v} vs {want}");+}++/// The features of `s` that failed, with their errors.+fn feature_errors(s: &Session) -> Vec<(String, String)> {+ s.model.results.iter().filter_map(|r| r.error.clone().map(|e| (r.name.clone(), e))).collect()+}++/// #1669: a window and a lofted pleat mirrored to the far end of a case shelled 3.5 mm. The+/// pleat's twisted faces were each meshed as two flat triangles (#1666), the joins were checked+/// against those meshes, and the mirror failed ("boolean Union: no result").+#[test]+fn mirrored_pleat_joins_into_a_thick_case_wall() {+ let s = replay(include_str!("../../../examples/regressions/battery_case_pleats.json"));+ let errors = feature_errors(&s);+ assert!(errors.is_empty(), "{errors:?}");+}++/// #1669: at 3 mm, the same window and pleat built directly at the far end of the finished case+/// (a cut and a loft of their own, the mirror suppressed) failed to join as well: the end rounds+/// they meet had folded faces (#1667).+#[test]+fn pleat_built_at_the_far_end_joins_the_finished_case() {+ let mut s = replay(include_str!("../../../examples/regressions/battery_case_pleats.json"));+ s.execute("parameters.change", &json!({"name": "wall", "expression": "3 mm"})).unwrap();+ let errors = feature_errors(&s);+ assert!(errors.is_empty(), "{errors:?}");+ // The case with the mirrored pleat, which the direct build must match.+ let mirrored = volume(&s, "Case");+ s.execute("timeline.suppress", &json!({"feature": "PleatFar", "suppressed": true})).unwrap();+ let before = volume(&s, "Case");+ // Mirrored about y = -99: y' = -198 - y.+ let far = |points: &[[f64; 2]]| points.iter().map(|[x, y]| json!([x, -198.0 - y])).collect::<Vec<_>>();+ let bottom = [+ [-26.0, 3.0],+ [-24.76384, 3.0],+ [-16.0568, 14.97217],+ [-8.0, 4.90117],+ [0.0, 14.90117],+ [8.0, 4.90117],+ [16.0568, 14.97217],+ [24.76384, 3.0],+ [26.0, 3.0],+ [26.0, 0.0],+ [23.23616, 0.0],+ [15.9432, 10.02783],+ [8.0, 0.09883],+ [0.0, 10.09883],+ [-8.0, 0.09883],+ [-15.9432, 10.02783],+ [-23.23616, 0.0],+ [-26.0, 0.0],+ ];+ let top = [+ [-26.0, 3.0],+ [-24.0, 3.0],+ [-16.0, 3.0],+ [-8.0, 3.0],+ [0.0, 3.0],+ [8.0, 3.0],+ [16.0, 3.0],+ [24.0, 3.0],+ [26.0, 3.0],+ [26.0, 0.0],+ [24.0, 0.0],+ [16.0, 0.0],+ [8.0, 0.0],+ [0.0, 0.0],+ [-8.0, 0.0],+ [-16.0, 0.0],+ [-24.0, 0.0],+ [-26.0, 0.0],+ ];+ let steps = json!([+ {"command": "sketch.create", "params": {"plane": "XY", "offset": "-clear", "name": "FarCutSketch"}},+ {"command": "sketch.rectangle.two_point", "params": {"p0": [-24, -197.5], "p1": [24, -201.5]}},+ {"command": "sketch.finish", "params": {}},+ {"command": "solid.extrude", "params": {"sketch": "FarCutSketch", "distance": "pleat_top + clear", "operation": "cut", "targets": ["Case"]}},+ {"command": "sketch.create", "params": {"plane": "XY", "name": "FarBottom"}},+ {"command": "sketch.line", "params": {"closed": true, "infer": false, "connect": false, "points": far(&bottom)}},+ {"command": "sketch.finish", "params": {}},+ {"command": "sketch.create", "params": {"plane": "XY", "offset": "pleat_top + 0.5 mm", "name": "FarTop"}},+ {"command": "sketch.line", "params": {"closed": true, "infer": false, "connect": false, "points": far(&top)}},+ {"command": "sketch.finish", "params": {}},+ {"command": "solid.loft", "params": {"sections": [{"sketch": "FarBottom"}, {"sketch": "FarTop"}], "operation": "join", "targets": ["Case"]}}+ ]);+ for c in steps.as_array().into_iter().flatten() {+ let (id, p) = (c["command"].as_str().unwrap_or_default(), &c["params"]);+ if let Err(e) = s.execute(id, p) {+ panic!("{id}: {e}");+ }+ }+ let errors = feature_errors(&s);+ assert!(errors.is_empty(), "{errors:?}");+ // The far pleat is the mirror's exact image, so the case comes out as with the mirror (and+ // larger than without it: the loft outweighs its window).+ let after = volume(&s, "Case");+ assert!(after > before, "{after} after the far pleat, {before} before");+ assert!((after - mirrored).abs() < 1e-6 * mirrored, "{after} built directly, {mirrored} mirrored");+}diff --git a/examples/regressions/battery_case_pleats.json b/examples/regressions/battery_case_pleats.jsonnew file mode 100644index 0000000000..f9b6171c1c--- /dev/null+++ b/examples/regressions/battery_case_pleats.json@@ -0,0 +1,39 @@+{+ "description": "A battery case shelled outward 3.5 mm, rounded R5 along its long edges and R1 round both ends (#1669). A window is cut through its front wall and a pleat lofted between an 18-point zig-zag and a flat band is joined into it; the window and the pleat are mirrored to the far end about a plane at half the length. The pleat's twisted ruled faces were meshed off their surfaces along their straight sides, so the meshes the joins are checked on misjudged them: the mirror failed with 'boolean Union: no result', and so did the same window and pleat built directly at the far end of the finished case at 3 mm.",+ "commands": [+ {"command": "parameters.add", "params": {"comment": "Battery flat top/bottom width", "expression": "290 mm", "name": "batt_w", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Side bulge past the top/bottom corners", "expression": "10 mm", "name": "batt_bulge", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Battery height", "expression": "92 mm", "name": "batt_h", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Height of the left side's widest point", "expression": "27 mm", "name": "peak_left", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Height of the right side's widest point", "expression": "batt_h - peak_left", "name": "peak_right", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Battery length", "expression": "198 mm", "name": "batt_len", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Connector tab width", "expression": "15 mm", "name": "tab_w", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Connector tab protrusion", "expression": "5.5 mm", "name": "tab_depth", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Ramp from tab back to the wall", "expression": "35 mm", "name": "ramp_len", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Blend radius ramp to wall", "expression": "80 mm", "name": "ramp_blend_wall", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Blend radius tab to ramp", "expression": "40 mm", "name": "ramp_blend_tab", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "TPU wall thickness", "expression": "3.5 mm", "name": "wall", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Fillet on the 4 long edges", "expression": "5 mm", "name": "r_big", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Fillet on all other edges", "expression": "1 mm", "name": "r_small", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Tool overshoot", "expression": "1 mm", "name": "clear", "unit": "mm"}},+ {"command": "parameters.add", "params": {"comment": "Height where the pleat fades out", "expression": "batt_h - 2 * r_small", "name": "pleat_top", "unit": "mm"}},+ {"command": "timeline.add", "params": {"feature": {"id": 1, "name": "BatteryProfile", "plane": {"plane": {"origin": [0.0, 0.0, 0.0], "x_dir": [1.0, 0.0, 0.0], "y_dir": [-0.0, 0.0, 1.0]}, "type": "custom"}, "sketch": {"constraints": [{"id": "k1", "l": 0, "type": "horizontal"}, {"id": "k2", "l": 3, "type": "horizontal"}, {"a": 3, "b": 6, "id": "k3", "type": "collinear"}, {"id": "k4", "l": 7, "p": 1, "q": 2, "type": "symmetric"}, {"id": "k5", "l": 7, "p": 4, "q": 5, "type": "symmetric"}, {"id": "k6", "l": 0, "param": "d1", "type": "length", "value": 290.0}, {"id": "k7", "l": 3, "param": "d2", "type": "length", "value": 290.0}, {"id": "k8", "p": 1, "param": "d3", "q": 5, "type": "distance_y", "value": 92.0}, {"id": "k9", "p": 2, "param": "d4", "q": 3, "type": "distance_x", "value": 10.0}, {"id": "k10", "p": 4, "param": "d5", "q": 3, "type": "distance_y", "value": 65.0}, {"id": "k11", "p": 5, "param": "d6", "q": 6, "type": "distance_x", "value": 10.0}, {"id": "k12", "p": 5, "param": "d7", "q": 6, "type": "distance_y", "value": 27.0}], "counters": {"j": 2, "k": 12, "l": 8, "p": 4}, "curves": [{"a": 1, "b": 2, "construction": false, "id": "l1", "type": "line"}, {"a": 2, "b": 3, "construction": false, "id": "l2", "type": "line"}, {"a": 3, "b": 4, "construction": false, "id": "l3", "type": "line"}, {"a": 4, "b": 5, "construction": false, "id": "l4", "type": "line"}, {"a": 5, "b": 6, "construction": false, "id": "l5", "type": "line"}, {"a": 6, "b": 1, "construction": false, "id": "l6", "type": "line"}, {"a": 7, "b": 8, "construction": true, "id": "l7", "link": "j1", "type": "line"}, {"a": 9, "b": 10, "construction": true, "id": "l8", "link": "j2", "type": "line"}], "links": [{"id": "j1", "kind": "project", "source": {"name": "x", "type": "sketch_axis"}}, {"id": "j2", "kind": "project", "source": {"name": "y", "type": "sketch_axis"}}], "points": [{"fixed": true, "id": "origin", "pos": [0.0, 0.0]}, {"fixed": false, "id": "l1.start", "pos": [-145.0, 92.0]}, {"fixed": false, "id": "l1.end", "pos": [145.0, 92.0]}, {"fixed": false, "id": "l2.end", "pos": [155.0, 65.0]}, {"fixed": false, "id": "l3.end", "pos": [145.0, 0.0]}, {"fixed": false, "id": "l4.end", "pos": [-145.0, 0.0]}, {"fixed": false, "id": "l5.end", "pos": [-155.0, 27.0]}, {"fixed": true, "id": "p1", "link": "j1", "pos": [-100.0, 0.0]}, {"fixed": true, "id": "p2", "link": "j1", "pos": [100.0, 0.0]}, {"fixed": true, "id": "p3", "link": "j2", "pos": [0.0, -100.0]}, {"fixed": true, "id": "p4", "link": "j2", "pos": [0.0, 100.0]}]}, "suppressed": false, "type": "sketch"}, "params": [{"expression": "batt_w", "name": "d1", "unit": "mm"}, {"expression": "batt_w", "name": "d2", "unit": "mm"}, {"expression": "batt_h", "name": "d3", "unit": "mm"}, {"expression": "batt_bulge", "name": "d4", "unit": "mm"}, {"expression": "peak_right", "name": "d5", "unit": "mm"}, {"expression": "batt_bulge", "name": "d6", "unit": "mm"}, {"expression": "peak_left", "name": "d7", "unit": "mm"}]}},+ {"command": "timeline.add", "params": {"feature": {"body_names": ["Battery"], "extent": {"convention": "total_distance", "direction": "positive", "distance": "batt_len + tab_depth + clear"}, "id": 2, "name": "BatteryStock", "operation": "new_body", "param_names": ["d8"], "profiles": {"type": "all"}, "sketch": 1, "suppressed": false, "type": "extrude"}}},+ {"command": "timeline.add", "params": {"feature": {"id": 3, "name": "PlanOutline", "param_names": ["d9"], "plane": {"base": {"name": "XY", "type": "origin"}, "distance": "-clear", "type": "offset"}, "sketch": {"constraints": [{"id": "k1", "l": 0, "type": "horizontal"}, {"id": "k2", "l": 1, "type": "vertical"}, {"id": "k3", "l": 2, "type": "horizontal"}, {"id": "k4", "l": 4, "type": "horizontal"}, {"id": "k5", "l": 5, "type": "vertical"}, {"id": "k6", "l": 6, "p": 1, "q": 2, "type": "symmetric"}, {"id": "k7", "l": 0, "param": "d10", "type": "length", "value": 320.0}, {"id": "k8", "p": 0, "param": "d11", "q": 1, "type": "distance_y", "value": 1.0}, {"id": "k9", "p": 0, "param": "d12", "q": 3, "type": "distance_y", "value": 198.0}, {"id": "k10", "p": 0, "param": "d13", "q": 5, "type": "distance_y", "value": 203.5}, {"id": "k11", "p": 0, "param": "d14", "q": 5, "type": "distance_x", "value": 130.0}, {"id": "k12", "p": 5, "param": "d15", "q": 4, "type": "distance_x", "value": 35.0}, {"c": 2, "id": "k13", "p": 4, "type": "point_on_curve"}, {"c": 3, "id": "k14", "p": 4, "type": "point_on_curve"}, {"a": 2, "b": 7, "id": "k15", "type": "tangent"}, {"a": 3, "b": 7, "id": "k16", "type": "tangent"}, {"c": 7, "id": "k17", "param": "d16", "type": "radius", "value": 80.0}, {"c": 3, "id": "k18", "p": 5, "type": "point_on_curve"}, {"c": 4, "id": "k19", "p": 5, "type": "point_on_curve"}, {"a": 3, "b": 8, "id": "k20", "type": "tangent"}, {"a": 4, "b": 8, "id": "k21", "type": "tangent"}, {"c": 8, "id": "k22", "param": "d17", "type": "radius", "value": 40.0}], "counters": {"a": 2, "corner": 2, "j": 1, "k": 22, "l": 7, "p": 6}, "curves": [{"a": 1, "b": 2, "construction": false, "id": "l1", "type": "line"}, {"a": 2, "b": 3, "construction": false, "id": "l2", "type": "line"}, {"a": 3, "b": 9, "construction": false, "id": "l3", "type": "line"}, {"a": 10, "b": 12, "construction": false, "id": "l4", "type": "line"}, {"a": 13, "b": 6, "construction": false, "id": "l5", "type": "line"}, {"a": 6, "b": 1, "construction": false, "id": "l6", "type": "line"}, {"a": 7, "b": 8, "construction": true, "id": "l7", "link": "j1", "type": "line"}, {"a": 9, "b": 10, "c": 11, "construction": false, "id": "a1", "type": "arc"}, {"a": 13, "b": 12, "c": 14, "construction": false, "id": "a2", "type": "arc"}], "links": [{"id": "j1", "kind": "project", "source": {"name": "y", "type": "sketch_axis"}}], "points": [{"fixed": true, "id": "origin", "pos": [0.0, 0.0]}, {"fixed": false, "id": "l1.start", "pos": [-160.0, 1.0]}, {"fixed": false, "id": "l1.end", "pos": [160.0, 1.0]}, {"fixed": false, "id": "l2.end", "pos": [160.0, -198.0]}, {"fixed": false, "id": "corner1", "pos": [-95.0, -198.0]}, {"fixed": false, "id": "corner2", "pos": [-130.0, -203.5]}, {"fixed": false, "id": "l5.end", "pos": [-160.0, -203.5]}, {"fixed": true, "id": "p1", "link": "j1", "pos": [0.0, -100.0]}, {"fixed": true, "id": "p2", "link": "j1", "pos": [0.0, 100.0]}, {"fixed": false, "id": "p3", "pos": [-88.75261852925456, -198.0]}, {"fixed": false, "id": "p4", "pos": [-101.17164524862525, -198.96982996764112]}, {"fixed": false, "id": "a1.center", "pos": [-88.75261852925458, -278.0]}, {"fixed": false, "id": "p5", "pos": [-126.91417737568737, -203.01508501617946]}, {"fixed": false, "id": "p6", "pos": [-133.12369073537272, -203.5]}, {"fixed": false, "id": "a2.center", "pos": [-133.12369073537272, -163.5]}]}, "suppressed": false, "type": "sketch"}, "params": [{"expression": "batt_w + 2 * batt_bulge + 10 * clear", "name": "d10", "unit": "mm"}, {"expression": "clear", "name": "d11", "unit": "mm"}, {"expression": "batt_len", "name": "d12", "unit": "mm"}, {"expression": "batt_len + tab_depth", "name": "d13", "unit": "mm"}, {"expression": "batt_w / 2 - tab_w", "name": "d14", "unit": "mm"}, {"expression": "ramp_len", "name": "d15", "unit": "mm"}, {"expression": "ramp_blend_wall", "name": "d16", "unit": "mm"}, {"expression": "ramp_blend_tab", "name": "d17", "unit": "mm"}]}},+ {"command": "timeline.add", "params": {"feature": {"extent": {"convention": "total_distance", "direction": "positive", "distance": "batt_h + 2 * clear"}, "id": 4, "name": "TabAndRamp", "operation": "intersect", "param_names": ["d18"], "profiles": {"type": "all"}, "sketch": 3, "suppressed": false, "targets": ["Battery"], "type": "extrude"}}},+ {"command": "timeline.add", "params": {"feature": {"bodies": ["Battery"], "body_names": ["Case"], "copy": true, "id": 5, "name": "CopyForCase", "param_names": ["d19", "d20", "d21"], "suppressed": false, "translate": ["0", "0", "0"], "type": "move"}}},+ {"command": "timeline.add", "params": {"feature": {"body": "Case", "direction": "outside", "face_names": ["F2:side:l4"], "faces": [[0.0, -100.0, 0.0]], "id": 6, "name": "CaseShell", "param_names": ["d22"], "suppressed": false, "thickness": "wall", "type": "shell"}}},+ {"command": "timeline.add", "params": {"feature": {"id": 7, "name": "PleatCutSketch", "param_names": ["d23"], "plane": {"base": {"name": "XY", "type": "origin"}, "distance": "-clear", "type": "offset"}, "sketch": {"constraints": [{"id": "k1", "l": 0, "type": "horizontal"}, {"id": "k2", "l": 2, "type": "horizontal"}, {"id": "k3", "l": 1, "type": "vertical"}, {"id": "k4", "l": 3, "type": "vertical"}], "counters": {"k": 4, "l": 4, "p": 4}, "curves": [{"a": 1, "b": 2, "construction": false, "id": "l1", "type": "line"}, {"a": 2, "b": 3, "construction": false, "id": "l2", "type": "line"}, {"a": 3, "b": 4, "construction": false, "id": "l3", "type": "line"}, {"a": 4, "b": 1, "construction": false, "id": "l4", "type": "line"}], "points": [{"fixed": true, "id": "origin", "pos": [0.0, 0.0]}, {"fixed": false, "id": "p1", "pos": [-24.0, -0.5]}, {"fixed": false, "id": "p2", "pos": [24.0, -0.5]}, {"fixed": false, "id": "p3", "pos": [24.0, 3.5]}, {"fixed": false, "id": "p4", "pos": [-24.0, 3.5]}]}, "suppressed": false, "type": "sketch"}}},+ {"command": "timeline.add", "params": {"feature": {"extent": {"convention": "total_distance", "direction": "positive", "distance": "pleat_top + clear"}, "id": 8, "name": "PleatCut", "operation": "cut", "param_names": ["d24"], "profiles": {"type": "all"}, "sketch": 7, "suppressed": false, "targets": ["Case"], "type": "extrude"}}},+ {"command": "timeline.add", "params": {"feature": {"id": 9, "name": "PleatBottom", "plane": {"name": "XY", "type": "origin"}, "sketch": {"constraints": [], "counters": {"l": 18}, "curves": [{"a": 1, "b": 2, "construction": false, "id": "l1", "type": "line"}, {"a": 2, "b": 3, "construction": false, "id": "l2", "type": "line"}, {"a": 3, "b": 4, "construction": false, "id": "l3", "type": "line"}, {"a": 4, "b": 5, "construction": false, "id": "l4", "type": "line"}, {"a": 5, "b": 6, "construction": false, "id": "l5", "type": "line"}, {"a": 6, "b": 7, "construction": false, "id": "l6", "type": "line"}, {"a": 7, "b": 8, "construction": false, "id": "l7", "type": "line"}, {"a": 8, "b": 9, "construction": false, "id": "l8", "type": "line"}, {"a": 9, "b": 10, "construction": false, "id": "l9", "type": "line"}, {"a": 10, "b": 11, "construction": false, "id": "l10", "type": "line"}, {"a": 11, "b": 12, "construction": false, "id": "l11", "type": "line"}, {"a": 12, "b": 13, "construction": false, "id": "l12", "type": "line"}, {"a": 13, "b": 14, "construction": false, "id": "l13", "type": "line"}, {"a": 14, "b": 15, "construction": false, "id": "l14", "type": "line"}, {"a": 15, "b": 16, "construction": false, "id": "l15", "type": "line"}, {"a": 16, "b": 17, "construction": false, "id": "l16", "type": "line"}, {"a": 17, "b": 18, "construction": false, "id": "l17", "type": "line"}, {"a": 18, "b": 1, "construction": false, "id": "l18", "type": "line"}], "points": [{"fixed": true, "id": "origin", "pos": [0.0, 0.0]}, {"fixed": false, "id": "l1.start", "pos": [-26.0, 3.0]}, {"fixed": false, "id": "l1.end", "pos": [-24.76384, 3.0]}, {"fixed": false, "id": "l2.end", "pos": [-16.0568, 14.97217]}, {"fixed": false, "id": "l3.end", "pos": [-8.0, 4.90117]}, {"fixed": false, "id": "l4.end", "pos": [0.0, 14.90117]}, {"fixed": false, "id": "l5.end", "pos": [8.0, 4.90117]}, {"fixed": false, "id": "l6.end", "pos": [16.0568, 14.97217]}, {"fixed": false, "id": "l7.end", "pos": [24.76384, 3.0]}, {"fixed": false, "id": "l8.end", "pos": [26.0, 3.0]}, {"fixed": false, "id": "l9.end", "pos": [26.0, 0.0]}, {"fixed": false, "id": "l10.end", "pos": [23.23616, 0.0]}, {"fixed": false, "id": "l11.end", "pos": [15.9432, 10.02783]}, {"fixed": false, "id": "l12.end", "pos": [8.0, 0.09883]}, {"fixed": false, "id": "l13.end", "pos": [0.0, 10.09883]}, {"fixed": false, "id": "l14.end", "pos": [-8.0, 0.09883]}, {"fixed": false, "id": "l15.end", "pos": [-15.9432, 10.02783]}, {"fixed": false, "id": "l16.end", "pos": [-23.23616, 0.0]}, {"fixed": false, "id": "l17.end", "pos": [-26.0, 0.0]}]}, "suppressed": false, "type": "sketch"}}},+ {"command": "timeline.add", "params": {"feature": {"id": 10, "name": "PleatTop", "param_names": ["d25"], "plane": {"base": {"name": "XY", "type": "origin"}, "distance": "pleat_top + 0.5 mm", "type": "offset"}, "sketch": {"constraints": [], "counters": {"l": 18}, "curves": [{"a": 1, "b": 2, "construction": false, "id": "l1", "type": "line"}, {"a": 2, "b": 3, "construction": false, "id": "l2", "type": "line"}, {"a": 3, "b": 4, "construction": false, "id": "l3", "type": "line"}, {"a": 4, "b": 5, "construction": false, "id": "l4", "type": "line"}, {"a": 5, "b": 6, "construction": false, "id": "l5", "type": "line"}, {"a": 6, "b": 7, "construction": false, "id": "l6", "type": "line"}, {"a": 7, "b": 8, "construction": false, "id": "l7", "type": "line"}, {"a": 8, "b": 9, "construction": false, "id": "l8", "type": "line"}, {"a": 9, "b": 10, "construction": false, "id": "l9", "type": "line"}, {"a": 10, "b": 11, "construction": false, "id": "l10", "type": "line"}, {"a": 11, "b": 12, "construction": false, "id": "l11", "type": "line"}, {"a": 12, "b": 13, "construction": false, "id": "l12", "type": "line"}, {"a": 13, "b": 14, "construction": false, "id": "l13", "type": "line"}, {"a": 14, "b": 15, "construction": false, "id": "l14", "type": "line"}, {"a": 15, "b": 16, "construction": false, "id": "l15", "type": "line"}, {"a": 16, "b": 17, "construction": false, "id": "l16", "type": "line"}, {"a": 17, "b": 18, "construction": false, "id": "l17", "type": "line"}, {"a": 18, "b": 1, "construction": false, "id": "l18", "type": "line"}], "points": [{"fixed": true, "id": "origin", "pos": [0.0, 0.0]}, {"fixed": false, "id": "l1.start", "pos": [-26.0, 3.0]}, {"fixed": false, "id": "l1.end", "pos": [-24.0, 3.0]}, {"fixed": false, "id": "l2.end", "pos": [-16.0, 3.0]}, {"fixed": false, "id": "l3.end", "pos": [-8.0, 3.0]}, {"fixed": false, "id": "l4.end", "pos": [0.0, 3.0]}, {"fixed": false, "id": "l5.end", "pos": [8.0, 3.0]}, {"fixed": false, "id": "l6.end", "pos": [16.0, 3.0]}, {"fixed": false, "id": "l7.end", "pos": [24.0, 3.0]}, {"fixed": false, "id": "l8.end", "pos": [26.0, 3.0]}, {"fixed": false, "id": "l9.end", "pos": [26.0, 0.0]}, {"fixed": false, "id": "l10.end", "pos": [24.0, 0.0]}, {"fixed": false, "id": "l11.end", "pos": [16.0, 0.0]}, {"fixed": false, "id": "l12.end", "pos": [8.0, 0.0]}, {"fixed": false, "id": "l13.end", "pos": [0.0, 0.0]}, {"fixed": false, "id": "l14.end", "pos": [-8.0, 0.0]}, {"fixed": false, "id": "l15.end", "pos": [-16.0, 0.0]}, {"fixed": false, "id": "l16.end", "pos": [-24.0, 0.0]}, {"fixed": false, "id": "l17.end", "pos": [-26.0, 0.0]}]}, "suppressed": false, "type": "sketch"}}},+ {"command": "timeline.add", "params": {"feature": {"id": 11, "name": "PleatNear", "operation": "join", "sections": [{"profiles": {"type": "all"}, "sketch": 9}, {"profiles": {"type": "all"}, "sketch": 10}], "suppressed": false, "targets": ["Case"], "type": "loft"}}},+ {"command": "timeline.add", "params": {"feature": {"id": 12, "name": "MidLength", "param_names": ["d26"], "plane": {"base": {"name": "XZ", "type": "origin"}, "distance": "-batt_len / 2", "type": "offset"}, "suppressed": false, "type": "construction_plane"}}},+ {"command": "timeline.add", "params": {"feature": {"features": ["PleatCut", "PleatNear"], "id": 13, "name": "PleatFar", "plane": {"name": "MidLength", "type": "construction"}, "suppressed": false, "type": "mirror"}}},+ {"command": "timeline.add", "params": {"feature": {"body": "Case", "edge_names": ["F2:side:[email protected]|F2:side:[email protected]", "F2:side:[email protected]|F2:side:[email protected]", "F2:side:[email protected]|F2:side:[email protected]", "F2:side:[email protected]|F2:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:side:[email protected]"], "edge_refs": [{"dir": [0.0, -1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, -1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, 1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, -1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, 1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, 1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, -1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.0, 1.0, 0.0], "max": [158.08338344416106, 14.97245064486031, 95.00000000000003], "min": [-158.0833834441611, -212.97245548710006, -0.0005980913533997968]}], "edges": [[-158.0834, -101.75, 26.6874], [-147.5738, -101.75, 95.0], [147.088, -99.0, 95.0], [158.0834, -99.0, 65.3126], [-155.0, -101.75, 27.0], [-145.0, -101.75, 92.0], [145.0, -99.0, 92.0], [155.0, -99.0, 65.0]], "id": 14, "name": "FilletBig", "param_names": ["d27"], "radius": "r_big", "suppressed": false, "type": "fillet"}}},+ {"command": "timeline.add", "params": {"feature": {"body": "Case", "edge_names": ["F2:side:[email protected]|F2:[email protected]", "F2:side:[email protected]|F2:[email protected]", "F2:side:[email protected]|F2:[email protected]", "F2:side:[email protected]|F2:[email protected]", "F2:side:[email protected]|F2:[email protected]"], "edge_refs": [{"dir": [0.34731435582359377, 0.0, -0.9377487607237037], "max": [157.9189160095873, 14.97245064486031, 95.00000000000003], "min": [-157.9189160095873, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.1520571842539413, 6.854850442197856e-18, -0.9883716976506173], "max": [157.9189160095873, 14.97245064486031, 95.00000000000003], "min": [-157.9189160095873, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.3473143558235947, 0.0, 0.9377487607237034], "max": [157.9189160095873, 14.97245064486031, 95.00000000000003], "min": [-157.9189160095873, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.15205718425394107, 6.990187846251234e-18, 0.9883716976506172], "max": [157.9189160095873, 14.97245064486031, 95.00000000000003], "min": [-157.9189160095873, -212.97245548710006, -0.0005980913533997968]}, {"dir": [1.0, -1.5479309295511088e-18, 0.0], "max": [157.9189160095873, 14.97245064486031, 95.00000000000003], "min": [-157.9189160095873, -212.97245548710006, -0.0005980913533997968]}], "edges": [[152.5857, 3.0, 80.1563], [153.0593, 3.0, 32.6563], [-153.1413, 3.0, 13.3437], [-152.8286, 3.0, 60.8437], [-80.0, 3.0, 95.0]], "id": 15, "name": "FilletFrontOuter", "param_names": ["d28"], "radius": "r_small", "suppressed": false, "type": "fillet"}}},+ {"command": "timeline.add", "params": {"feature": {"body": "Case", "edge_names": ["F2:side:[email protected]|F4:side:[email protected]", "F2:side:[email protected]|F4:side:[email protected]", "F2:side:[email protected]|F4:side:[email protected]", "F2:side:[email protected]|F4:side:[email protected]", "F2:side:[email protected]|F4:side:[email protected]"], "edge_refs": [{"dir": [-0.1520571842539413, 0.0, -0.9883716976506173], "max": [157.92605659069403, 14.97245064486031, 95.00000000000003], "min": [-157.92605659069406, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.34731435582359377, 0.0, -0.9377487607237037], "max": [157.92605659069403, 14.97245064486031, 95.00000000000003], "min": [-157.92605659069406, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.3473143558235947, 0.0, 0.9377487607237034], "max": [157.92605659069403, 14.97245064486031, 95.00000000000003], "min": [-157.92605659069406, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.15205718425394107, 0.0, 0.9883716976506172], "max": [157.92605659069403, 14.97245064486031, 95.00000000000003], "min": [-157.92605659069406, -212.97245548710006, -0.0005980913533997968]}, {"dir": [1.0, 2.4463450711209976e-16, 0.0], "max": [157.92605659069403, 14.97245064486031, 95.00000000000003], "min": [-157.92605659069406, -212.97245548710006, -0.0005980913533997968]}], "edges": [[153.0593, -201.0, 32.6563], [152.5857, -201.0, 80.1563], [-153.1413, -206.5, 13.3437], [-152.8286, -206.5, 60.8437], [50.0, -201.0, 95.0]], "id": 16, "name": "FilletRearOuter", "param_names": ["d29"], "radius": "r_small", "suppressed": false, "type": "fillet"}}},+ {"command": "timeline.add", "params": {"feature": {"body": "Case", "edge_names": ["F6:inner:F2:side:[email protected]|F6:inner:F2:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F2:[email protected]"], "edge_refs": [{"dir": [0.1520571842539411, 0.0, 0.988371697650617], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.34731435582359377, 0.0, 0.9377487607237037], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-1.0, 0.0, 0.0], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.15205718425394102, 0.0, -0.9883716976506172], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.3473143558235949, 0.0, -0.9377487607237033], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}], "edges": [[149.9014, 0.0, 31.8594], [150.3792, 0.0, 77.4761], [80.0, 0.0, 92.0], [-150.2276, 0.0, 58.0208], [-149.7749, 0.0, 12.8922]], "id": 17, "name": "FilletFrontInner", "param_names": ["d30"], "radius": "r_small", "suppressed": false, "type": "fillet"}}},+ {"command": "timeline.add", "params": {"feature": {"body": "Case", "edge_names": ["F6:inner:F2:side:[email protected]|F6:inner:F4:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F4:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F4:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F4:side:[email protected]", "F6:inner:F2:side:[email protected]|F6:inner:F4:side:[email protected]"], "edge_refs": [{"dir": [0.1520571842539411, 0.0, 0.988371697650617], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.34731435582359377, 0.0, 0.9377487607237037], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-1.0, -2.4685277687458984e-16, 0.0], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [-0.15205718425394102, 0.0, -0.9883716976506172], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}, {"dir": [0.347314355823594, 0.0, -0.9377487607237036], "max": [157.92605659097126, 14.97245064486031, 95.00000000000001], "min": [-157.9260565909712, -212.97245548710006, -0.0005980913533997968]}], "edges": [[149.9014, -198.0, 31.8594], [150.3792, -198.0, 77.4761], [80.0, -198.0, 92.0], [-150.2276, -203.5, 58.0208], [-149.7749, -203.5, 12.8922]], "id": 18, "name": "FilletRearInner", "param_names": ["d31"], "radius": "r_small", "suppressed": false, "type": "fillet"}}}+ ]+}