forked from 1b-agent/opencadstudio-upstream
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:
1 parent
a39c7b8f71
commit
63a74b19a9
63 files changed
+12193
-49
No files matched your search
+11
-1
@@ -422,9 +422,19 @@ pub fn entity_with_lwpolyline_world_xy(entity: &EntityType) -> EntityType {
|
||||
}
|
||||
}
|
||||
|
||||
/// Fixed world-space tessellation angle used for on-screen wire points.
|
||||
///
|
||||
/// Finer than the kernel's own `DEFAULT_ANGLE` (7.5°, 48 segments per turn):
|
||||
/// 3° gives 120 segments per full turn, so a typical circle at typical zoom
|
||||
/// no longer shows its polygon joints. Still a fixed world-space angle rather
|
||||
/// than one adaptive to view scale, so an aggressively zoomed-in view can
|
||||
/// still reveal facets — it raises the zoom threshold rather than removing
|
||||
/// the ceiling.
|
||||
const DISPLAY_ANGLE: f64 = std::f64::consts::PI / 60.0;
|
||||
|
||||
/// World-space wire points sampled by the kernel's angular policy.
|
||||
pub fn curve_points(curve: &PlanarCurve) -> Vec<[f64; 3]> {
|
||||
curve.tessellate_angle(cadkernel::tessellation::DEFAULT_ANGLE)
|
||||
curve.tessellate_angle(DISPLAY_ANGLE)
|
||||
}
|
||||
|
||||
/// The snap candidates an entity's curve offers, in the two channels the
|
||||
|
||||
Reference in new issue
Block a user