Add persistent sketch-constraint system (ocs_gcs port) and named-parameters handoff docs

Ports FreeCAD's planegcs 2D geometric constraint solver to Rust as a new
crates/ocs_gcs workspace member, and wires it into the document/scene model
as a persistent SketchConstraintSet: Coincident, Horizontal/Vertical,
Parallel/Perpendicular, Equal, Tangent, Distance, Angle and Radius
constraints that re-solve live (including mid-drag, not just on release),
render glyphs and a DOF badge, flag conflicts with a one-click resolver
pill, and round-trip through save/load via an XRecord blob.

Also includes docs/command_reference.md (a statically generated reference
of every registered command and its prompt sequence) and
docs/named_parameters_design.md + docs/backlog.md, which hand off the next
queued feature (a named-parameter/expression table) and consolidate every
deliberate scope-down and open gap found along the way, so a fresh session
has a complete starting point.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Felix RiestraandClaude Sonnet 5 committed 2026-09-08 22:19:23 +02:00
1 parent a39c7b8f71
commit 63a74b19a9
63 files changed
+12193 -49

No files matched your search

+32
View File
@@ -3,6 +3,29 @@
#[cfg(windows)]
use std::path::Path;
/// `YYYYMMDD_HHMMSS` in local time, for `OCS_BUILD_STAMP` — shown in the
/// window title and (via `packaging/build_macos_signed.sh`) the macOS
/// bundle name, so a rebuilt-and-reinstalled dev build is visibly distinct
/// from whatever was running before it, independent of the (per-week, not
/// per-build) `OCS_APP_VERSION`. Shells out rather than adding a date/time
/// crate purely for this cosmetic build-script string.
fn build_stamp() -> String {
#[cfg(windows)]
let output = std::process::Command::new("powershell")
.args(["-NoProfile", "-Command", "Get-Date -Format yyyyMMdd_HHmmss"])
.output();
#[cfg(not(windows))]
let output = std::process::Command::new("date").args(["+%Y%m%d_%H%M%S"]).output();
output
.ok()
.filter(|o| o.status.success())
.and_then(|o| String::from_utf8(o.stdout).ok())
.map(|s| s.trim().to_string())
.filter(|s| !s.is_empty())
.unwrap_or_else(|| "unknown".to_string())
}
fn main() {
let version = std::env::var("CARGO_PKG_VERSION").expect("Cargo package version");
let parts: Vec<&str> = version.split('.').collect();
@@ -20,6 +43,15 @@ fn main() {
println!("cargo:rerun-if-changed=.git/{reference}");
}
}
// `OCS_BUILD_STAMP` must reflect the actual compile time, not just when
// git state changes, so window-title/bundle-name builds run in
// succession (the normal edit-rebuild-reinstall loop, no commit in
// between) are still distinguishable. Once *any* rerun-if directive is
// emitted, Cargo stops auto-rerunning on ordinary source edits, so a
// path that can never exist forces a rerun every time regardless of the
// other (git-state-gated) directives above.
println!("cargo:rerun-if-changed=__ocs_force_build_rs_rerun__");
println!("cargo:rustc-env=OCS_BUILD_STAMP={}", build_stamp());
let revision = std::process::Command::new("git")
.args(["rev-parse", "--short=12", "HEAD"])
.output()