Little changes, more pwls in a circle, and make "same orientation"
constraints work mod 180 degrees, so that it snaps to however the workplane was drawn (more vertical vs. more horizontal). [git-p4: depot-paths = "//depot/solvespace/": change = 1714]solver
parent
10240cc1df
commit
4eed7693be
|
@ -564,7 +564,15 @@ void Constraint::Generate(IdList<Equation,hEquation> *l) {
|
|||
|
||||
AddEq(l, VectorsParallel(0, an, bn), 0);
|
||||
AddEq(l, VectorsParallel(1, an, bn), 1);
|
||||
AddEq(l, au.Dot(bv), 2);
|
||||
Expr *d1 = au.Dot(bv);
|
||||
Expr *d2 = au.Dot(bu);
|
||||
// Allow either orientation for the coordinate system, depending
|
||||
// on how it was drawn.
|
||||
if(fabs(d1->Eval()) < fabs(d2->Eval())) {
|
||||
AddEq(l, d1, 2);
|
||||
} else {
|
||||
AddEq(l, d2, 2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -558,7 +558,7 @@ void Entity::DrawOrGetDistance(int order) {
|
|||
Vector center = SS.GetEntity(point[0])->PointGetNum();
|
||||
Vector u = q.RotationU(), v = q.RotationV();
|
||||
|
||||
int i, c = 20;
|
||||
int i, c = 40;
|
||||
Vector prev = u.ScaledBy(r).Plus(center);
|
||||
for(i = 1; i <= c; i++) {
|
||||
double phi = (2*PI*i)/c;
|
||||
|
|
|
@ -39,7 +39,8 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = {
|
|||
{ 1, "Dimensions in &Millimeters", MNU_UNITS_MM, 0, mView },
|
||||
|
||||
{ 0, "&Group", 0, 0, NULL },
|
||||
{ 1, "New &Drawing Group\tShift+Ctrl+D", MNU_GROUP_DRAWING, 'D'|S|C,mGrp },
|
||||
{ 1, "New &Drawing in 3d\tShift+Ctrl+D", MNU_GROUP_3D, 'D'|S|C, mGrp },
|
||||
{ 1, "New Drawing in Workplane\tShift+Ctrl+W",MNU_GROUP_WRKPL, 'W'|S|C, mGrp },
|
||||
{ 1, NULL, 0, NULL },
|
||||
{ 1, "New Step and Repeat &Translating", 0, 0, NULL },
|
||||
{ 1, "New Step and Repeat &Rotating", 0, 0, NULL },
|
||||
|
|
|
@ -43,6 +43,7 @@ class SEdgeList {
|
|||
public:
|
||||
SList<SEdge> l;
|
||||
|
||||
void InsertEdgeBreaking(SEdge *e);
|
||||
bool AssemblePolygon(SPolygon *dest, SEdge *errorAt);
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ void Group::MenuGroup(int id) {
|
|||
g.visible = true;
|
||||
|
||||
switch(id) {
|
||||
case GraphicsWindow::MNU_GROUP_DRAWING:
|
||||
case GraphicsWindow::MNU_GROUP_3D:
|
||||
g.type = DRAWING;
|
||||
g.name.strcpy("drawing");
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue