Code: Select all
sc = 1e4 import ConstraintSolver as CS ps = CS.ParameterStore() p1 = CS.G2D.ParaPoint(ps) p2 = CS.G2D.ParaPoint(ps) p2.x.Value = 3 * sc p2.y.Value = 4 * sc p1.update() p2.update() for p in p1.Parameters + p2.Parameters: p.OwnScale = sc c = CS.G2D.ConstraintDistance( p1 = p1, p2 = p2, store = ps, Label = "Constraint1" ) c.dist.Value = sc c.Weight = 1.0/sc c.update() c.NetError sys = CS.SubSystem() sys.addUnknown(p1.Parameters) sys.addUnknown(p2.Parameters) sys.addConstraint(c) vs = CS.ValueSet(CS.ParameterSubset(ps.allFree())) slv = CS.SketchSolver() slv.solveDogLeg(sys, vs)
Which means, the scaling is working as expected. So hopes are high, those faults related to meter and larger sized sketches can be finally solved. Now, fingers crossed, I ever get that far.