forked from 1b-agent/fieldcraft-upstream
Sample: crank-mirror, the crank arm meshed from a half and mirrored
file.sample crank-mirror partitions the crank arm on its symmetry plane, sweeps one half all-hex (hex20) and mirrors it into one conforming mesh, then defines the crank-arm model. Samples may now run preparing commands (datums, partitions) before their script sees the bodies. Its test checks the halves alike and joined, every element valid and the sets on both halves; the heavy test solves it: sigma_xx at the root -62.43 / +62.43 MPa against M/Z = 62.5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
a84a8339ae
commit
860707efa6
7 files changed
+134
-5
No files matched your search
@@ -97,6 +97,9 @@ fn open_sample(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
if let Some(recipe) = sample.design {
|
||||
opened.design = Some(Arc::new(open_design(&fieldcraft_geometry::script_design(recipe)?)?));
|
||||
}
|
||||
if let Some(prepare) = sample.prepare {
|
||||
opened.run_script(&prepare())?;
|
||||
}
|
||||
let bodies = opened.design.as_ref().map_or(&[][..], |d| d.bodies.as_slice());
|
||||
let script = (sample.script)(bodies);
|
||||
opened.run_script(&script)?;
|
||||
|
||||
@@ -895,6 +895,7 @@ pub const SAMPLE: &[Field] = &[choice(
|
||||
("heated-bracket", "Heated bracket"),
|
||||
("bracket-hex", "Hex-meshed bracket"),
|
||||
("crank-arm", "Bicycle crank arm"),
|
||||
("crank-mirror", "Mirrored crank arm"),
|
||||
],
|
||||
)
|
||||
.req()
|
||||
|
||||
Reference in new issue
Block a user