Feat: UCS icon — animated XYZ axis tripod in viewport bottom-left corner
Screen-space UCS icon drawn on the existing selection canvas overlay. Axes are projected from world space so the icon rotates with the camera, always showing the correct X/Y/Z orientation relative to the drawing plane. Each axis has its canonical color (X=red, Y=green, Z=blue) with arrowheads. Icon visibility controlled by show_ucs_icon flag (default on); toggled by UCSICON ON/OFF command which also updates paper-space viewport entities. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e38aa6b611
commit
6a4813ce42
4 changed files with 129 additions and 6 deletions
|
|
@ -2552,6 +2552,8 @@ impl H7CAD {
|
|||
self.push_undo_snapshot(i, "UCSICON");
|
||||
let visible = sub != "OFF";
|
||||
let at_origin = sub == "ORIGIN";
|
||||
// Update model-space icon flag.
|
||||
self.show_ucs_icon = visible;
|
||||
let mut count = 0usize;
|
||||
for entity in self.tabs[i].scene.document.entities_mut() {
|
||||
if let acadrust::EntityType::Viewport(vp) = entity {
|
||||
|
|
@ -2564,7 +2566,7 @@ impl H7CAD {
|
|||
}
|
||||
self.tabs[i].dirty = true;
|
||||
self.command_line.push_output(&format!(
|
||||
"UCSICON {sub}: updated {count} viewport(s)."
|
||||
"UCSICON {sub}: updated {count} viewport(s) + model space."
|
||||
));
|
||||
}
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue