1 commits, squashed; the originals stay reachable from tag archive/merge-main-develop.
- ab8bc6625 jyviko: kernel: STEP import and export on the schema 4 record and SMLib
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
12 lines
558 B
Rust
12 lines
558 B
Rust
use crate::Result;
|
|
use crate::body::Body;
|
|
|
|
/// STEP (ISO 10303-21, AP242) text for the given bodies as one part (`Body1`…, with the
|
|
/// bodies' colours).
|
|
pub fn step_export(bodies: &[&Body], system: &str) -> Result<String> {
|
|
let list: Vec<crate::ExportBody> =
|
|
bodies.iter().enumerate().map(|(i, b)| crate::ExportBody { name: format!("Body{}", i + 1), body: b, color: b.color() }).collect();
|
|
let header = crate::StepHeader { organization: system.to_string(), ..Default::default() };
|
|
crate::step_out::step_export_bodies(&list, &header)
|
|
}
|