1mod add_part;
28mod add_part_derived;
29mod drag_tool;
30mod draw;
31#[cfg(test)]
32mod draw_tests;
33pub mod editor;
34#[cfg(test)]
35mod editor_tests;
36#[cfg(any(test, feature = "examples"))]
37pub mod examples;
38mod explode;
39#[cfg(test)]
40mod frame_tests;
41mod icons;
42#[cfg(test)]
43mod joint_tests;
44pub mod joints;
45#[cfg(test)]
46mod kept_tests;
47pub mod mates;
48pub mod mechanism;
49mod motion;
50mod panel;
51mod part_pattern;
52pub mod placed;
53#[cfg(test)]
54mod program_tests;
55#[cfg(test)]
56mod regression_tests;
57pub mod residuals;
58#[cfg(test)]
59mod scale_tests;
60mod settle;
61pub mod solving;
62mod stl;
63#[cfg(any(test, feature = "testing"))]
64#[allow(clippy::expect_used, reason = "tests' helpers fail where a test would")]
65pub mod testing;
66pub mod urdf;
67
68use std::rc::Rc;
69
70use geop_core_editor::registry::Registry;
71use geop_core_math::geop_error::GeopResult;
72
73pub use add_part::{AddPart, AddPartArgs};
74pub use add_part_derived::{DerivedPart, DerivedPartArgs, MIRRORED, MirrorPart, MirrorPartArgs};
75pub use drag_tool::DragTool;
76pub use draw::AssemblyDrawer;
77pub use explode::{Direction, Explode, ExplodeArgs};
78pub use mates::{
79 Anchor, CouplingKind, Joint, JointKind, Kind, Limits, MOTIONS, Mate, MateKind, Motion, On,
80 Resolved, Transmission, foot_parameter, joint_parameter, mate, mate_name,
81};
82pub use mechanism::mates_resolved;
83pub use motion::{
84 Checked, Collision, Drive, MotionArgs, MotionCommand, MotionExport, MotionOptions, MotionPanel,
85 MotionState, StudyState,
86};
87pub use panel::{JointsCommand, JointsPanel, JointsState};
88pub use part_pattern::{PartPattern, PartPatternArgs};
89pub use placed::define_placed;
90pub use settle::Settler;
91pub use stl::{Stl, StlOptions};
92pub use urdf::Urdf;
93
94pub fn register(r: Registry) -> GeopResult<Registry> {
100 let settled = Rc::new(settle::Settled::default());
101 let r = r
102 .operation(AddPart)?
103 .operation(PartPattern)?
104 .operation(Explode)?
105 .operation(Drive)?
106 .operation(DerivedPart)?
107 .operation(MirrorPart)?
108 .exporter(Stl)?
109 .exporter(Urdf)?
110 .exporter(MotionExport)?
111 .drawer(AssemblyDrawer)?
112 .panel(JointsPanel::new(settled.clone()))?
113 .panel(MotionPanel::default())?
114 .tool(DragTool::INFO, DragTool::default())?
115 .idle_tool(DragTool::INFO.key)?
117 .settler(Settler { settled })?;
118 #[cfg(any(test, feature = "examples"))]
119 let r = r.examples(examples::set())?;
120 Ok(r)
121}