mod closure;
pub mod document;
pub mod evaluator;
pub mod io;
pub mod matcher;
mod profile;
pub mod recompute;
pub mod sketch;
pub mod sketch3;
mod solve;
#[cfg(test)]
mod test_support;
pub mod undo;

pub use bone_kernel::{
    AlongCurvePlacement, AxisRecipe, BooleanGap, BrepEdge, BrepError, BrepFace, BrepSolid,
    BrepVertex, ContourSelection, CsysAxisRef, CsysRecipe, CsysRotation, DatumError, DatumFeature,
    DatumGap, DatumGeometry, Direction2, DraftAngle, DraftDirection, DraftMagnitude,
    ExtrudeDirection, ExtrudeEndCondition, ExtrudeFeature, ExtrudeOperation, ExtrudeSense,
    FeatureScope, FromCondition, MergeResult, PlaneRecipe, PointRecipe, ProfileDefect,
    ProjectedCurve, ReferenceGeometry, ResolvedSweep, RevolveAngle, RevolveAxis, RevolveDirection2,
    RevolveEndCondition, RevolveFeature, SweepAlignment, SweepDirection, SweepFeature,
    SweepOrientation, SweepPath, SweepProfileKind, SweepTangency, SweepTwist, ThinWall,
    ThinWallDirection, TruckGap, TwistUnit,
};
pub use document::{
    BindSketchToFaceError, DatumFile, Document, DocumentHeader, DocumentParameters, ExtrudeFile,
    FeatureEdge, FeatureNode, FeatureTree, ImportedSolid, PrincipalPlane, RenameDatumError,
    RenameExtrudeError, RenameRevolveError, RenameSketchError, RenameSweepError, RevolveFile,
    SketchFile, SketchPlaneRef, SketchRegistry, SketchRegistryEntry, SweepFile, UnitsPreference,
    datum_filename, extrude_filename, revolve_filename, sketch_filename, sweep_filename,
};
pub use evaluator::{
    EvaluatedExtrude, EvaluatedFeature, EvaluatedSketch, ExtrudeError, evaluate_extrude,
    evaluate_extrude_reaching, evaluate_revolve_reaching, evaluate_sketch,
};
pub use io::{
    BlobHash, BlobKind, DocumentFolder, FolderError, FolderErrorKind, LabelSidecar, RonError,
    from_str, load, read_solid, read_tessellation, save, to_string, write_solid,
    write_tessellation,
};
pub use matcher::{
    ResolvedEdge, ResolvedEntity, ResolvedFace, ResolvedVertex, resolve, resolve_edge,
    resolve_face, resolve_vertex,
};
pub use recompute::{EvaluatedModel, RebuildBudget, RebuildCost, RebuildPass, RecomputeScope};
pub use sketch::{
    ArcData, CircleData, DimensionKind, DimensionRefs, DimensionValue, DimensionValueMismatch,
    EditOutcome, EntityRefs, LineData, PointData, RelationRefs, Sketch, SketchDimension,
    SketchEdit, SketchEditError, SketchEntity, SketchEntityKind, SketchParameter, SketchRelation,
    SketchVersion, SolverError,
};
pub use sketch3::{
    Arc3Data, Circle3Data, Edit3Outcome, Ellipse3Data, Entity3Refs, Line3Data, Mapping3,
    PierceUnresolved, Point3Data, ProjectedSketch, Relation3Refs, Sketch3, Sketch3DofReport,
    Sketch3Edit, Sketch3Entity, Sketch3EntityKind, Sketch3IntegrityError, Sketch3Relation,
    Sketch3Version, Spline3Data,
};
pub use solve::{DragError, SketchStatusReport};
pub use undo::UndoStack;

#[derive(Debug, thiserror::Error)]
pub enum DocumentError {
    #[error(transparent)]
    SketchEdit(#[from] SketchEditError),
    #[error(transparent)]
    Folder(#[from] FolderError),
    #[error(transparent)]
    Ron(#[from] RonError),
}

pub type Result<T, E = DocumentError> = core::result::Result<T, E>;
