forked from 1b-agent/opencadstudio-upstream
feat(input): lock the next point to a typed <angle
Typing <angle at a point prompt (e.g. <30) now fixes the direction of the next point from the last one until a point is placed: the cursor moves along that direction, and a bare number entered next is the distance along it. The angle is read in the drawing's angle base and direction and turned into the current UCS. Works from the command line and from scripts or the automation token input alike. Fixes #1464 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
29c0d1df9a
commit
0eec9c450f
28 files changed
+77
-1
No files matched your search
@@ -29,6 +29,10 @@ impl OpenCADStudio {
|
||||
&self,
|
||||
i: usize,
|
||||
) -> Option<(glam::DVec3, glam::DVec3)> {
|
||||
// A typed `<angle` locks the way from the last point.
|
||||
if let (Some(dir), Some(base)) = (self.angle_override, self.last_point) {
|
||||
return Some((base, dir));
|
||||
}
|
||||
// OTRACK already exposes its acquired world-space ray.
|
||||
if let Some((base, dir)) = self.otrack_active {
|
||||
return Some((base, dir));
|
||||
|
||||
Reference in new issue
Block a user