Minor tweaks; and always go into the debugger after an oops().
[git-p4: depot-paths = "//depot/solvespace/": change = 1728]solver
parent
b480613763
commit
48132082ba
|
@ -649,6 +649,7 @@ void Entity::DrawOrGetDistance(int order) {
|
||||||
tail = SS.GW.projRight.ScaledBy(w/s).Plus(
|
tail = SS.GW.projRight.ScaledBy(w/s).Plus(
|
||||||
SS.GW.projUp. ScaledBy(h/s)).Plus(
|
SS.GW.projUp. ScaledBy(h/s)).Plus(
|
||||||
gn.ScaledBy(-4*w/s)).Minus(SS.GW.offset);
|
gn.ScaledBy(-4*w/s)).Minus(SS.GW.offset);
|
||||||
|
glLineWidth(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector v = (q.RotationN()).WithMagnitude(50/SS.GW.scale);
|
Vector v = (q.RotationN()).WithMagnitude(50/SS.GW.scale);
|
||||||
|
@ -660,6 +661,7 @@ void Entity::DrawOrGetDistance(int order) {
|
||||||
LineDrawOrGetDistance(tip,tip.Minus(v.RotatedAbout(axis, 0.6)));
|
LineDrawOrGetDistance(tip,tip.Minus(v.RotatedAbout(axis, 0.6)));
|
||||||
LineDrawOrGetDistance(tip,tip.Minus(v.RotatedAbout(axis,-0.6)));
|
LineDrawOrGetDistance(tip,tip.Minus(v.RotatedAbout(axis,-0.6)));
|
||||||
}
|
}
|
||||||
|
glLineWidth(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ void Group::MenuGroup(int id) {
|
||||||
g.type = EXTRUDE;
|
g.type = EXTRUDE;
|
||||||
g.opA = SS.GW.activeGroup;
|
g.opA = SS.GW.activeGroup;
|
||||||
g.wrkpl.entityB = SS.GW.activeWorkplane;
|
g.wrkpl.entityB = SS.GW.activeWorkplane;
|
||||||
g.subtype = EXTRUDE_TWO_SIDED;
|
g.subtype = EXTRUDE_ONE_SIDED;
|
||||||
g.name.strcpy("extrude");
|
g.name.strcpy("extrude");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// Debugging functions
|
// Debugging functions
|
||||||
#define oops() do { dbp("oops at line %d, file %s", __LINE__, __FILE__); \
|
#define oops() do { dbp("oops at line %d, file %s", __LINE__, __FILE__); \
|
||||||
if(0) *(char *)0 = 1; exit(-1); } while(0)
|
if(1) *(char *)0 = 1; exit(-1); } while(0)
|
||||||
#ifndef min
|
#ifndef min
|
||||||
#define min(x, y) ((x) < (y) ? (x) : (y))
|
#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -313,7 +313,7 @@ bool System::SolveLeastSquares(void) {
|
||||||
|
|
||||||
bool System::NewtonSolve(int tag) {
|
bool System::NewtonSolve(int tag) {
|
||||||
WriteJacobian(tag, tag);
|
WriteJacobian(tag, tag);
|
||||||
if(mat.m > mat.n) oops();
|
if(mat.m > mat.n) return false;
|
||||||
|
|
||||||
int iter = 0;
|
int iter = 0;
|
||||||
bool converged = false;
|
bool converged = false;
|
||||||
|
|
Loading…
Reference in New Issue