Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 59 additions & 8 deletions modeling-cmds/openapi/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -8466,6 +8466,21 @@
"units"
]
},
{
"description": "KittyCAD render packet format for browser-side rendering.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"render_packet"
]
}
},
"required": [
"type"
]
},
{
"description": "ISO 10303-21 (STEP) format.",
"type": "object",
Expand Down Expand Up @@ -8733,6 +8748,46 @@
"type"
]
},
{
"description": "A general exact curve segment. Start at the current path \"pen\" and end at the final control point. In the first pass this is used for non-rational open-uniform spline curves.",
"type": "object",
"properties": {
"degree": {
"description": "Degree of the curve.",
"type": "integer",
"format": "uint32",
"minimum": 0
},
"points": {
"description": "Ordered control points for the curve. The final 3D point becomes the new path \"pen\" position.",
"type": "array",
"items": {
"$ref": "#/components/schemas/Point4d"
}
},
"rational": {
"description": "Whether to use the homogeneous `w` component as a rational weight.",
"type": "boolean"
},
"relative": {
"description": "Whether or not this curve is a relative offset",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"curve"
]
}
},
"required": [
"degree",
"points",
"rational",
"relative",
"type"
]
},
{
"description": "Adds a tangent arc from current pen position with the given radius and angle.",
"type": "object",
Expand Down Expand Up @@ -9093,20 +9148,16 @@
"type": "object",
"properties": {
"w": {
"type": "number",
"format": "float"
"$ref": "#/components/schemas/LengthUnit"
},
"x": {
"type": "number",
"format": "float"
"$ref": "#/components/schemas/LengthUnit"
},
"y": {
"type": "number",
"format": "float"
"$ref": "#/components/schemas/LengthUnit"
},
"z": {
"type": "number",
"format": "float"
"$ref": "#/components/schemas/LengthUnit"
}
},
"required": [
Expand Down
4 changes: 2 additions & 2 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,7 @@ define_modeling_cmd_enum! {
///
/// Most successful unions come from solids who's faces do not overlap
/// aka non-coplanar.
///
///
/// Failure cases:
/// * A common failure is unsupported coincident faces try to be unioned.
///
Expand Down Expand Up @@ -2491,7 +2491,7 @@ define_modeling_cmd_enum! {
/// aka non-coplanar.
///
/// Prefer one `tool` over multiple when calling this feature.
///
///
/// Failure cases:
/// * A common failure is unsupported coplanar faces try to be unioned.
///
Expand Down
5 changes: 5 additions & 0 deletions modeling-cmds/src/format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub mod gltf;
pub mod obj;
/// The PLY Polygon File Format.
pub mod ply;
/// KittyCAD render packet format for browser-side rendering.
pub mod render_packet;
/// ISO 10303-21 (STEP) format.
pub mod step;
/// **ST**ereo**L**ithography format.
Expand Down Expand Up @@ -57,6 +59,8 @@ pub enum OutputFormat3d {
Obj(obj::export::Options),
/// The PLY Polygon File Format.
Ply(ply::export::Options),
/// KittyCAD render packet format for browser-side rendering.
RenderPacket(render_packet::export::Options),
/// ISO 10303-21 (STEP) format.
Step(step::export::Options),
/// **ST**ereo**L**ithography format.
Expand Down Expand Up @@ -214,6 +218,7 @@ impl From<OutputFormat3d> for FileExportFormat {
OutputFormat3d::Gltf(_) => Self::Gltf,
OutputFormat3d::Obj(_) => Self::Obj,
OutputFormat3d::Ply(_) => Self::Ply,
OutputFormat3d::RenderPacket(_) => Self::Glb,
OutputFormat3d::Step(_) => Self::Step,
OutputFormat3d::Stl(_) => Self::Stl,
}
Expand Down
Loading