@@ -8,57 +8,33 @@ use crate::{coord, format::Selection, units::UnitLength};
88pub mod import {
99 use super :: * ;
1010
11- /// Options for exporting STL.
12- #[ derive( Clone , Debug , Eq , Hash , PartialEq , Serialize , Deserialize , JsonSchema , Display , FromStr ) ]
13- #[ display( "coords: {coords}, selection: {selection}, storage: {storage}, units: {units}" ) ]
14- #[ serde( rename = "StlExportOptions" ) ]
11+ /// Options for importing STL.
12+ #[ derive(
13+ Clone , Debug , Eq , Hash , PartialEq , Serialize , Deserialize , JsonSchema , Display , FromStr ,
14+ ) ]
15+ #[ display( "coords: {coords}, units: {units}" ) ]
16+ #[ serde( rename = "StlImportOptions" ) ]
1517 pub struct Options {
16- /// Co-ordinate system of output data.
18+ /// Co-ordinate system of input data.
1719 ///
1820 /// Defaults to the [KittyCAD co-ordinate system].
1921 ///
2022 /// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
2123 pub coords : coord:: System ,
22-
23- /// Export selection.
24- pub selection : Selection ,
25-
26- /// Export storage.
27- pub storage : Storage ,
28-
29- /// Export length unit.
30- ///
31- /// Defaults to meters.
32- pub units : UnitLength ,
24+ /// The units of the input data.
25+ /// This is very important for correct scaling and when calculating physics properties like
26+ /// mass, etc.
27+ pub units : crate :: units:: UnitLength ,
3328 }
3429
3530 impl Default for Options {
3631 fn default ( ) -> Self {
3732 Self {
3833 coords : * coord:: KITTYCAD ,
39- selection : Default :: default ( ) ,
40- storage : Default :: default ( ) ,
4134 units : UnitLength :: Meters ,
4235 }
4336 }
4437 }
45-
46- /// Export storage.
47- #[ derive(
48- Clone , Copy , Debug , Default , Deserialize , Display , Eq , FromStr , Hash , JsonSchema , PartialEq , Serialize ,
49- ) ]
50- #[ display( style = "snake_case" ) ]
51- #[ serde( rename = "StlStorage" , rename_all = "snake_case" ) ]
52- pub enum Storage {
53- /// Plaintext encoding.
54- Ascii ,
55-
56- /// Binary STL encoding.
57- ///
58- /// This is the default setting.
59- #[ default]
60- Binary ,
61- }
6238}
6339
6440/// Export models in STL format.
0 commit comments