@@ -125,6 +125,38 @@ define_modeling_cmd_enum! {
125
125
pub opposite: Opposite <LengthUnit >,
126
126
}
127
127
128
+ fn default_twist_extrude_section_interval( ) -> Angle {
129
+ Angle :: from_degrees( 15.0 )
130
+ }
131
+
132
+ /// Command for twist extruding a solid 2d.
133
+ #[ derive(
134
+ Debug , Clone , PartialEq , Serialize , Deserialize , JsonSchema , ModelingCmdVariant ,
135
+ ) ]
136
+ #[ cfg_attr( feature = "ts-rs" , derive( ts_rs:: TS ) ) ]
137
+ #[ cfg_attr( feature = "ts-rs" , ts( export_to = "ModelingCmd.ts" ) ) ]
138
+ pub struct TwistExtrude {
139
+ /// Which sketch to extrude.
140
+ /// Must be a closed 2D solid.
141
+ pub target: ModelingCmdId ,
142
+ /// How far off the plane to extrude
143
+ pub distance: LengthUnit ,
144
+ /// Which IDs should the new faces have?
145
+ /// If this isn't given, the engine will generate IDs.
146
+ #[ serde( default ) ]
147
+ pub faces: Option <ExtrudedFaceInfo >,
148
+ /// Center to twist about (relative to 2D sketch)
149
+ #[ serde( default ) ]
150
+ pub center_2d: Point2d <f64 >,
151
+ /// Total rotation of the section
152
+ pub total_rotation_angle: Angle ,
153
+ ///Angle step interval (converted to whole number degrees and bounded between 4° and 90°)
154
+ #[ serde( default = "default_twist_extrude_section_interval" ) ]
155
+ pub angle_step_size: Angle ,
156
+ ///The twisted surface loft tolerance
157
+ pub tolerance: LengthUnit ,
158
+ }
159
+
128
160
/// Extrude the object along a path.
129
161
#[ derive(
130
162
Clone , Debug , PartialEq , Deserialize , JsonSchema , Serialize , ModelingCmdVariant ,
0 commit comments