Now requests don't have names anymore, because that didn't seem
useful. The description string is just the type of request. [git-p4: depot-paths = "//depot/solvespace/": change = 1770]solver
parent
236ee16da6
commit
5bbb27fd8e
4
file.cpp
4
file.cpp
|
@ -27,15 +27,12 @@ void SolveSpace::NewFile(void) {
|
|||
r.group = Group::HGROUP_REFERENCES;
|
||||
r.workplane = Entity::FREE_IN_3D;
|
||||
|
||||
r.name.strcpy("#XY");
|
||||
r.h = Request::HREQUEST_REFERENCE_XY;
|
||||
request.Add(&r);
|
||||
|
||||
r.name.strcpy("#YZ");
|
||||
r.h = Request::HREQUEST_REFERENCE_YZ;
|
||||
request.Add(&r);
|
||||
|
||||
r.name.strcpy("#ZX");
|
||||
r.h = Request::HREQUEST_REFERENCE_ZX;
|
||||
request.Add(&r);
|
||||
|
||||
|
@ -81,7 +78,6 @@ const SolveSpace::SaveTable SolveSpace::SAVED[] = {
|
|||
{ 'r', "Request.type", 'd', &(SS.sv.r.type) },
|
||||
{ 'r', "Request.workplane.v", 'x', &(SS.sv.r.workplane.v) },
|
||||
{ 'r', "Request.group.v", 'x', &(SS.sv.r.group.v) },
|
||||
{ 'r', "Request.name", 'N', &(SS.sv.r.name) },
|
||||
{ 'r', "Request.construction", 'b', &(SS.sv.r.construction) },
|
||||
|
||||
{ 'e', "Entity.h.v", 'x', &(SS.sv.e.h.v) },
|
||||
|
|
22
sketch.cpp
22
sketch.cpp
|
@ -945,12 +945,26 @@ void Request::Generate(IdList<Entity,hEntity> *entity,
|
|||
}
|
||||
|
||||
char *Request::DescriptionString(void) {
|
||||
static char ret[100];
|
||||
if(name.str[0]) {
|
||||
sprintf(ret, "r%03x-%s", h.v, name.str);
|
||||
char *s;
|
||||
if(h.v == Request::HREQUEST_REFERENCE_XY.v) {
|
||||
s = "#XY";
|
||||
} else if(h.v == Request::HREQUEST_REFERENCE_YZ.v) {
|
||||
s = "#YZ";
|
||||
} else if(h.v == Request::HREQUEST_REFERENCE_ZX.v) {
|
||||
s = "#ZX";
|
||||
} else {
|
||||
sprintf(ret, "r%03x-(unnamed)", h.v);
|
||||
switch(type) {
|
||||
case WORKPLANE: s = "workplane"; break;
|
||||
case DATUM_POINT: s = "datum-point"; break;
|
||||
case LINE_SEGMENT: s = "line-segment"; break;
|
||||
case CUBIC: s = "cubic-bezier"; break;
|
||||
case CIRCLE: s = "circle"; break;
|
||||
case ARC_OF_CIRCLE: s = "arc-of-circle"; break;
|
||||
default: s = "???"; break;
|
||||
}
|
||||
}
|
||||
static char ret[100];
|
||||
sprintf(ret, "r%03x-%s", h.v, s);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue