forked from 1b-agent/opencadstudio-upstream
feat(model): add exact solid modelling tools
This commit is contained in:
1 parent
fb2ea1e831
commit
06cd0ec6a9
51 files changed
+1487
-574
No files matched your search
+24
-6
@@ -1425,17 +1425,20 @@ pub enum CmdResult {
|
||||
/// Translation vector applied once to every selected point.
|
||||
delta: DVec3,
|
||||
},
|
||||
/// Create a Solid3D placeholder entity + associated MeshModel.
|
||||
/// `mesh_fn` is called with the entity's handle string to build the mesh.
|
||||
CommitSolid3D {
|
||||
mesh_fn: Box<dyn FnOnce(String) -> Option<crate::scene::model::mesh_model::MeshModel> + Send>,
|
||||
},
|
||||
/// Extrude the profile entity `handle` by `height` along Z.
|
||||
/// Extrude the profile entity `handle` along its plane normal.
|
||||
ExtrudeEntity {
|
||||
handle: Handle,
|
||||
height: f64,
|
||||
color: [f32; 4],
|
||||
},
|
||||
/// Pull a closed profile or a planar solid face by a signed distance.
|
||||
PresspullEntity {
|
||||
handle: Handle,
|
||||
pick: DVec3,
|
||||
distance: f64,
|
||||
drag: Option<DVec3>,
|
||||
color: [f32; 4],
|
||||
},
|
||||
/// Revolve the profile entity `handle` around the given axis by `angle_deg`.
|
||||
RevolveEntity {
|
||||
handle: Handle,
|
||||
@@ -1455,6 +1458,13 @@ pub enum CmdResult {
|
||||
handles: Vec<Handle>,
|
||||
color: [f32; 4],
|
||||
},
|
||||
/// Round or bevel the straight edge nearest `pick` on a solid.
|
||||
SolidEdgeBlend {
|
||||
handle: Handle,
|
||||
pick: DVec3,
|
||||
value: f64,
|
||||
fillet: bool,
|
||||
},
|
||||
/// INSERT landed on a block that has AttributeDefinitions.
|
||||
/// The host should look up the attdefs for `block_name` from the document
|
||||
/// and call `attreq_set_attdefs()` on the command, then loop on text input.
|
||||
@@ -1767,6 +1777,14 @@ pub trait CadCommand: Send {
|
||||
false
|
||||
}
|
||||
|
||||
/// Supply the mesh surface hit instead of the working-plane projection.
|
||||
fn entity_pick_uses_surface_point(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Supply the picked surface or profile direction when available.
|
||||
fn set_entity_pick_direction(&mut self, _direction: Option<DVec3>) {}
|
||||
|
||||
/// Render the entity under the cursor through the normal rollover
|
||||
/// highlight while this command is waiting for an entity pick.
|
||||
fn entity_pick_highlights_hover(&self) -> bool {
|
||||
|
||||
Reference in new issue
Block a user