app
Adom Step - File Viewer
Public Made by Adomby adom
Fusion 360-style viewer for STEP / STP files in a Hydrogen webview. Components outline, smart-pick measure (mm + mils + angle), hover-inspect HUD, and geometry-based pin / contact detection that handl
pub mod console;
pub mod eval;
pub mod frame;
pub mod health;
pub mod hide;
pub mod install;
pub mod isolate;
pub mod list_components;
pub mod measure;
pub mod open;
pub mod pins;
pub mod screenshot;
pub mod show;
pub mod show_all;
pub mod status;
pub mod stop;
pub mod view;
pub mod view_cube;
pub mod view_library;
use colored::Colorize;
pub fn ok(msg: impl AsRef<str>) {
println!("{} {}", "OK:".green().bold(), msg.as_ref());
}
pub fn err(msg: impl AsRef<str>) {
eprintln!("{} {}", "ERROR:".red().bold(), msg.as_ref());
}
pub fn hint(msg: impl AsRef<str>) {
eprintln!("{} {}", "Hint:".yellow().bold(), msg.as_ref());
}
pub const DEFAULT_PORT: u16 = 8851;
/// Service-step2glb base URL. Override at runtime with `STEP2GLB_SERVICE_API`.
pub const DEFAULT_STEP2GLB_URL: &str = "https://step2glb-gmdoncpxdwx0.adom.cloud";
pub fn step2glb_service_url() -> String {
std::env::var("STEP2GLB_SERVICE_API")
.unwrap_or_else(|_| DEFAULT_STEP2GLB_URL.to_string())
.trim_end_matches('/')
.to_string()
}