pub struct SketchDiagnostics {
pub dof: i64,
pub rank: i64,
pub unknowns: i64,
pub equations: i64,
pub redundant: i64,
pub status: String,
pub conflicting: bool,
pub conflicting_constraints: Vec<String>,
pub point_mobility: BTreeMap<String, String>,
pub geometry_mobility: BTreeMap<String, String>,
}Expand description
The solver’s read-only constraint diagnostics: degrees of freedom, over/under
status, and per-point / per-geometry mobility (movable vs locked) derived from
the constraint-Jacobian null space. Keys in the mobility maps are id_key
strings.
Fields§
§dof: i64§rank: i64§unknowns: i64§equations: i64§redundant: i64§status: String§conflicting: bool§conflicting_constraints: Vec<String>The constraints the solver named as mutually unsatisfiable, as id_key
strings. When the constraint rows are linearly dependent this is the group
a left null-space certificate implicates, NOT merely whichever constraint
relaxation happened to leave violated last; a contradiction whose rows stay
independent admits no such certificate, and the group is then every
constraint the solve came to rest still violating. Empty exactly when
conflicting is clear — the solver drops the flag
rather than raise it with nothing to point at.
point_mobility: BTreeMap<String, String>id_key -> "movable" | "locked" per point (BTreeMap for a deterministic,
solver-matching key order).
geometry_mobility: BTreeMap<String, String>Implementations§
Source§impl SketchDiagnostics
impl SketchDiagnostics
Sourcepub fn constraint_conflicting(&self, id: &Value) -> bool
pub fn constraint_conflicting(&self, id: &Value) -> bool
Whether id names a constraint in the conflicting group (matched via
id_key, so a numeric 4 and a string "4" agree with the solver).
Source§impl SketchDiagnostics
impl SketchDiagnostics
Sourcepub fn point_movable(&self, id: &Value) -> Option<bool>
pub fn point_movable(&self, id: &Value) -> Option<bool>
Some(true) movable, Some(false) locked, None if the solver gave no
mobility for this point id.
Sourcepub fn geometry_movable(&self, id: &Value) -> Option<bool>
pub fn geometry_movable(&self, id: &Value) -> Option<bool>
Some(true) movable, Some(false) locked, None if unknown.
Trait Implementations§
Source§impl Clone for SketchDiagnostics
impl Clone for SketchDiagnostics
Source§fn clone(&self) -> SketchDiagnostics
fn clone(&self) -> SketchDiagnostics
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SketchDiagnostics
impl Debug for SketchDiagnostics
Source§impl Default for SketchDiagnostics
impl Default for SketchDiagnostics
Source§fn default() -> SketchDiagnostics
fn default() -> SketchDiagnostics
Source§impl<'de> Deserialize<'de> for SketchDiagnostics
impl<'de> Deserialize<'de> for SketchDiagnostics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SketchDiagnostics
impl PartialEq for SketchDiagnostics
Source§impl Serialize for SketchDiagnostics
impl Serialize for SketchDiagnostics
impl StructuralPartialEq for SketchDiagnostics
Auto Trait Implementations§
impl Freeze for SketchDiagnostics
impl RefUnwindSafe for SketchDiagnostics
impl Send for SketchDiagnostics
impl Sync for SketchDiagnostics
impl Unpin for SketchDiagnostics
impl UnsafeUnpin for SketchDiagnostics
impl UnwindSafe for SketchDiagnostics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more