Files
solidcraft/crates/kernel/src/step.rs
T
jyvikoandClaude Opus 5.5 3696bf259e Wave 187/509: kernel: STEP import and export on the schema 4 record and SMLib
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
2026-10-22 07:34:27 -04:00

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)
}