c1d819f235
Record ownership transfers in the timeline so earlier Join/Cut membership, world placement, machining data and styles survive component moves, edits, independent copying, undo and reopening. Preserve pending positions in history snapshots and keep constructor transfers ordered during feature redefinition. Retain shallow sheet pockets and exact planar intersection islands through unfold/refold, with depth-aware flat previews and DXF export. Store explicit 3D wire coordinate spaces and migrate known legacy provenance without moving saved points or analytic fits. Infer unique eligible cylindrical Emboss targets, align Revolve manipulators with actual extent geometry, and discard obsolete preview errors after input correction. Certify constructed and immutable imported face styles using exact source metadata while preserving legacy face names. Upgrade designs to format10 with bounded validation and geometry-preserving legacy migration.
60 lines
2.0 KiB
Rust
60 lines
2.0 KiB
Rust
//! The SolveCraft document: user and model parameters, and a parametric timeline of features
|
|
//! (sketches, extrudes, revolves, fillets, primitives, combines…). Evaluating the timeline with
|
|
//! the kernel produces the model (bodies and solved sketches). Evaluation is incremental: a
|
|
//! feature is recomputed only when it, a parameter it uses, or an earlier feature changed.
|
|
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
|
#![forbid(unsafe_code)]
|
|
|
|
pub mod appearance;
|
|
mod assembly;
|
|
mod body_transfer;
|
|
mod body_transfer_sheet;
|
|
pub use body_transfer::{valid_transfer_matrix, validate_body_transfer};
|
|
pub mod canvas;
|
|
mod clipboard;
|
|
pub use clipboard::{clone_expression, remap_topology};
|
|
pub mod config;
|
|
pub mod construct;
|
|
mod document;
|
|
mod eval;
|
|
pub mod expr;
|
|
pub mod format;
|
|
pub mod joints;
|
|
pub mod motion;
|
|
pub mod naming;
|
|
mod params;
|
|
pub mod plastic;
|
|
pub mod project;
|
|
mod project3d;
|
|
pub use project3d::iso_grid;
|
|
pub mod sheet;
|
|
|
|
pub use assembly::{IDENTITY, Mat, Occurrence, apply_point, apply_vector, is_identity, map_point_expr, mat_inverse, mat_mul, rigid};
|
|
pub use document::*;
|
|
pub use eval::{
|
|
EdgeRef, FeatureResult, Model, ModelBody, ModelState, RevolveExtent, SolvedSketch, ThreadInfo, edge_names_for, edge_refs, object_height,
|
|
parse_metric_thread, pattern_matrices, revolve_extent, select_profiles, state_in_frame, state_in_frame_at, through_all_distance, world_state,
|
|
};
|
|
pub use params::{ParamRow, ParamUser, cycles};
|
|
pub use solvecraft_kernel as kernel;
|
|
pub use solvecraft_sketch as sketch;
|
|
|
|
#[derive(Debug, Clone, PartialEq, thiserror::Error)]
|
|
pub enum DocError {
|
|
#[error("expression: {0}")]
|
|
Expr(String),
|
|
#[error("{0}")]
|
|
Invalid(String),
|
|
#[error("unknown {0}")]
|
|
Unknown(String),
|
|
#[error(transparent)]
|
|
Sketch(#[from] solvecraft_sketch::SketchError),
|
|
#[error(transparent)]
|
|
Kernel(#[from] solvecraft_kernel::KernelError),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, DocError>;
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|