Crate kittycad_modeling_cmds
source ·Expand description
KittyCAD’s Modeling API lets you design 3D models.
Re-exports§
pub use ok_response::output;
Modules§
- Base64 data that encodes to url safe base64, but can decode from multiple base64 implementations to account for various clients and libraries. Compatible with serde and JsonSchema.
- Various coordinate systems.
- Definition of each modeling command.
- Import and export types.
- Modeling command IDs, used to associated requests and responses. Also used to construct commands which refer to previous commands.
- A length unit is a type that converts a length value from one unit to another. In the case of the engine we will always convert to millimeters, since that is what the engine uses.
- When a modeling command is successful, these responses could be returned.
- Types that are shared between various modeling commands, like Point3d.
- Units of measurement.
Structs§
- Camera drag ended
- Camera drag continued.
- Camera drag started.
- Get the center of mass of entities in the scene or the default scene.
- Closes a path, converting it to a 2D solid.
- Get control points of the given curve.
- Find the start and end of a curve.
- Get type of the given curve.
- Get the plane for sketch mode.
- Disable sketch mode, from the default camera.
- Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.
- Focus the default camera upon an object in the scene.
- Change what the default camera is looking at.
- Change what the default camera is looking at.
- Use orthographic projection.
- Use perspective projection.
- Adjust zoom of the default camera.
- Get the density of entities in the scene or the default scene.
- Enter edit mode
- Exit edit mode
- Sketch on some entity (e.g. a plane, a face).
- Create a circular pattern using this entity (currently only valid for 3D solids).
- Fade entity in or out.
- What are all UUIDs of this entity’s children?
- What is the UUID of this entity’s n-th child?
- What is the distance between these two entities?
- How many children does the entity have?
- What is this entity’s parent?
- Create a linear pattern using this entity (currently only valid for 3D solids).
- Set opacity of the entity.
- Export the scene to a file.
- Extend a path by adding a new segment which starts at the path’s “pen”. If no “pen” location has been set before (via
MovePen
), then the pen is at the origin. - Command for extruding a solid.
- What type of entity is this?
- Get the plane for sketch mode.
- Stop dragging the mouse.
- Continue dragging the mouse.
- Start dragging the mouse.
- Changes the current highlighted entity to these entities.
- Changes the current highlighted entity to whichever one is at the given window coordinate. If there’s no entity at this location, clears the highlight.
- File to import into the current model. If you are sending binary data for a file, be sure to send the WebSocketRequest as binary/bson, not text/json.
- Import files to the current model.
- Add a gizmo showing the axes.
- Make a new plane
- Get the mass of entities in the scene or the default scene.
- Send a mouse click event Updates modified/selected entities.
- Send a mouse move event
- Move the path’s “pen”.
- Create a new annotation
- Bring an object to the front of the scene
- Set the material properties of an object
- Hide or show an object
- Obtain curve ids for vertex ids
- Query the given path.
- Obtain vertex ids for a path
- Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.
- Set the color of a plane.
- Reconfigure the stream.
- Remove scene objects.
- Adds one or more entities (by UUID) to the selection.
- Clear the selection
- Find all IDs of selected entities
- Removes one or more entities (by UUID) from the selection.
- Replaces current selection with these entities (by UUID).
- Modifies the selection by simulating a “mouse click” at the given x,y window coordinate Returns ID of whatever was selected.
- Send object to front or back.
- Set the units of the scene. For all following commands, the units will be interpreted as the given units.
- What kind of entities can be selected?
- When you select some entity with the current tool, what should happen to the entity?
- Set the current tool.
- Disable sketch mode. If you are sketching on a face, be sure to not disable sketch mode until you have extruded. Otherwise, your object will not be fused with the face.
- Enable sketch mode on the given plane. If you want to sketch on a face, use
enable_sketch_mode
instead. - Add a hole to a Solid2d object before extruding it.
- Fillets the given edge with the specified radius.
- Gets all faces which use the given edge.
- Gets all edges which are opposite the given edge, across all possible faces.
- Get a concise description of all of an extrusion’s faces.
- Gets the next adjacent edge for the given edge, along the given face.
- Gets the edge opposite the given edge, along the given face.
- Gets the previous adjacent edge for the given edge, along the given face.
- Start a new path.
- Get the surface area of entities in the scene or the default scene.
- Take a snapshot of the current view.
- Update an annotation
- Get the volume of entities in the scene or the default scene.
Enums§
- Enum containing the variety of image formats snapshots may be exported to.
- Commands that the KittyCAD engine can execute.
Traits§
- Anything that can be a ModelingCmd output.
- Some modeling command executed on the KittyCAD engine.