@@ -10,6 +10,7 @@ use uuid::Uuid;
1010use crate :: impl_extern_type;
1111use crate :: {
1212 def_enum:: negative_one,
13+ id:: ModelingCmdId ,
1314 length_unit:: LengthUnit ,
1415 output:: ExtrusionFaceInfo ,
1516 units:: { self , UnitAngle } ,
@@ -2207,3 +2208,31 @@ impl From<BodiesUpdated> for BodiesCreated {
22072208fn one ( ) -> f32 {
22082209 1.0
22092210}
2211+
2212+ /// A debug-view of the segment of a curve.
2213+ #[ derive( Debug , Serialize , Deserialize , Clone , PartialEq , JsonSchema ) ]
2214+ pub struct CurveDebug {
2215+ /// Start point of segment.
2216+ pub start : Option < Point2d < f64 > > ,
2217+ /// End point of segment.
2218+ pub end : Option < Point2d < f64 > > ,
2219+ /// Center point of segment.
2220+ pub center : Option < Point2d < f64 > > ,
2221+ /// Point on the circle's radius
2222+ pub point : Option < Point2d < f64 > > ,
2223+ /// What kind of segment is it (line, arc, etc)
2224+ pub segment_type : CurveTypeDebug ,
2225+ /// ID for this segment.
2226+ pub id : ModelingCmdId ,
2227+ }
2228+
2229+ /// What type of curve is being viewed?
2230+ #[ derive( Debug , Serialize , Deserialize , Clone , PartialEq , JsonSchema ) ]
2231+ pub enum CurveTypeDebug {
2232+ /// Line with a start and end.
2233+ Line ,
2234+ /// Arc with a start, end and center.
2235+ ThreePointArc ,
2236+ /// Circle with a center and radius.
2237+ Circle ,
2238+ }
0 commit comments