|
|
|
@ -18,7 +18,7 @@ mod relation;
@@ -18,7 +18,7 @@ mod relation;
|
|
|
|
|
|
|
|
|
|
fn main() { |
|
|
|
|
use entity::{Point, PointRef, Var}; |
|
|
|
|
use math::{Point2, eqn, Region2}; |
|
|
|
|
use math::{Point2, eqn, Region2, Rot2}; |
|
|
|
|
use relation::{Relation, ResolveResult}; |
|
|
|
|
|
|
|
|
|
env_logger::init(); |
|
|
|
@ -48,8 +48,9 @@ fn main() {
@@ -48,8 +48,9 @@ fn main() {
|
|
|
|
|
let c4 = relation::PointAngle::new_vertical(p1.clone(), p2.clone()); |
|
|
|
|
let c3 = relation::PointAngle::new_horizontal(p2.clone(), p3.clone()); |
|
|
|
|
let c2 = relation::AlignedDistance::new_vertical(p1.clone(), p2.clone(), 12.); |
|
|
|
|
let c5 = relation::PointAngle::new(p1.clone(), p3.clone(), Rot2::from_angle_deg(45.)); |
|
|
|
|
let mut relations: Vec<Box<dyn Relation>> = |
|
|
|
|
vec![/*Box::new(c1),*/ Box::new(c2), Box::new(c3), Box::new(c4)]; |
|
|
|
|
vec![/*Box::new(c1),*/ Box::new(c2), Box::new(c3), Box::new(c4), Box::new(c5)]; |
|
|
|
|
let mut constrained: Vec<Box<dyn Relation>> = Vec::new(); |
|
|
|
|
let mut any_underconstrained = true; |
|
|
|
|
let mut any_constrained = true; |
|
|
|
|