forked from 1b-agent/opencadstudio-upstream
Merge pull request #1246
This commit is contained in:
commit
293d0796fb
38 files changed
+4399
-487
No files matched your search
@@ -9,7 +9,7 @@ use cadkernel::space::{PlanarCurve, Plane, Vec3};
|
||||
use glam::DVec3;
|
||||
use rustc_hash::FxHashMap;
|
||||
|
||||
use crate::command::{CadCommand, CmdOption, CmdResult, WorkingPlane};
|
||||
use crate::command::{CadCommand, CmdOption, CmdResult, InputKind, WorkingPlane};
|
||||
use crate::entities::curve::{curve_points, entity_curve, ocs_plane};
|
||||
use crate::entities::lwpolyline::{is_revision_cloud, revision_cloud_from_curve};
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
@@ -666,6 +666,17 @@ impl CadCommand for RevCloudCommand {
|
||||
true
|
||||
}
|
||||
|
||||
fn input_kind(&self) -> InputKind {
|
||||
match self.stage {
|
||||
Stage::ArcLength | Stage::Style | Stage::Reverse(_) => InputKind::SingleToken,
|
||||
Stage::Create
|
||||
| Stage::Object
|
||||
| Stage::ModifySelect
|
||||
| Stage::ModifyDraw(_)
|
||||
| Stage::ModifyErase(_) => InputKind::Point,
|
||||
}
|
||||
}
|
||||
|
||||
fn point_step_accepts_keywords(&self) -> bool {
|
||||
matches!(self.stage, Stage::Create | Stage::ModifyDraw(_))
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use cadkernel::space::Plane;
|
||||
use glam::DVec3;
|
||||
use crate::t;
|
||||
|
||||
use crate::command::{CadCommand, CmdOption, CmdResult, WorkingPlane};
|
||||
use crate::command::{CadCommand, CmdOption, CmdResult, InputKind, WorkingPlane};
|
||||
use crate::modules::{IconKind, ModuleEvent, ToolDef};
|
||||
use crate::scene::model::wire_model::WireModel;
|
||||
|
||||
@@ -270,6 +270,15 @@ impl CadCommand for WipeoutCommand {
|
||||
)
|
||||
}
|
||||
|
||||
fn input_kind(&self) -> InputKind {
|
||||
match self.mode {
|
||||
WipeoutMode::Frames | WipeoutMode::ErasePolyline => InputKind::SingleToken,
|
||||
WipeoutMode::Draw | WipeoutMode::Polyline | WipeoutMode::Rectangular => {
|
||||
InputKind::Point
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn point_step_accepts_keywords(&self) -> bool {
|
||||
matches!(
|
||||
self.mode,
|
||||
|
||||
Reference in new issue
Block a user