feat(input): relative coordinate entry (@/#) and DYN default — #26
Koordinat girişi artık göreli/mutlak ayrımını destekliyor: - `@x,y[,z]` → son girilen noktaya göreli (UCS eksenlerinde döndürülür) - `#x,y[,z]` → her zaman mutlak (DYN durumundan bağımsız) - ön ek yok → DYN açıksa göreli, kapalıysa mutlak İlk noktada referans olmadığından göreli giriş mutlağa düşer. Çözülen WCS noktası last_point olarak saklanıyor, böylece ardışık göreli girişler zincirleniyor. parse_coord artık (Vec3, CoordKind) döndürüyor; relative offset için ucs_rotate_vec eklendi (origin translation olmadan UCS rotasyonu). UCS ORIGIN komutu prefix'i yok sayıp mutlak kalıyor. Ayrıca ViewCube snap refactor'undan kalan kullanılmayan kod temizlendi: angle_close, active_viewport_yaw_pitch, CubeRegion::snap_angles. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
451239c4f9
commit
874226bd43
5 changed files with 77 additions and 81 deletions
|
|
@ -3256,8 +3256,10 @@ impl OpenCADStudio {
|
|||
// UCS ORIGIN x,y,z — shift the active UCS origin, keep axes
|
||||
"ORIGIN" | "O" => {
|
||||
let coord_str = parts.get(2).copied().unwrap_or("");
|
||||
if let Some(pt) = super::helpers::parse_coord(coord_str) {
|
||||
// `pt` is in current UCS space; convert to WCS
|
||||
if let Some((pt, _)) = super::helpers::parse_coord(coord_str) {
|
||||
// `pt` is in current UCS space; convert to WCS.
|
||||
// The @/# relative-coordinate prefix is ignored
|
||||
// here — a UCS origin is always absolute.
|
||||
let wcs_origin = if let Some(ref ucs) = self.tabs[i].active_ucs {
|
||||
ucs_to_wcs(pt, ucs)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue