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.group = Group::HGROUP_REFERENCES;
|
||||||
r.workplane = Entity::FREE_IN_3D;
|
r.workplane = Entity::FREE_IN_3D;
|
||||||
|
|
||||||
r.name.strcpy("#XY");
|
|
||||||
r.h = Request::HREQUEST_REFERENCE_XY;
|
r.h = Request::HREQUEST_REFERENCE_XY;
|
||||||
request.Add(&r);
|
request.Add(&r);
|
||||||
|
|
||||||
r.name.strcpy("#YZ");
|
|
||||||
r.h = Request::HREQUEST_REFERENCE_YZ;
|
r.h = Request::HREQUEST_REFERENCE_YZ;
|
||||||
request.Add(&r);
|
request.Add(&r);
|
||||||
|
|
||||||
r.name.strcpy("#ZX");
|
|
||||||
r.h = Request::HREQUEST_REFERENCE_ZX;
|
r.h = Request::HREQUEST_REFERENCE_ZX;
|
||||||
request.Add(&r);
|
request.Add(&r);
|
||||||
|
|
||||||
|
@ -81,7 +78,6 @@ const SolveSpace::SaveTable SolveSpace::SAVED[] = {
|
||||||
{ 'r', "Request.type", 'd', &(SS.sv.r.type) },
|
{ 'r', "Request.type", 'd', &(SS.sv.r.type) },
|
||||||
{ 'r', "Request.workplane.v", 'x', &(SS.sv.r.workplane.v) },
|
{ 'r', "Request.workplane.v", 'x', &(SS.sv.r.workplane.v) },
|
||||||
{ 'r', "Request.group.v", 'x', &(SS.sv.r.group.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) },
|
{ 'r', "Request.construction", 'b', &(SS.sv.r.construction) },
|
||||||
|
|
||||||
{ 'e', "Entity.h.v", 'x', &(SS.sv.e.h.v) },
|
{ '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) {
|
char *Request::DescriptionString(void) {
|
||||||
static char ret[100];
|
char *s;
|
||||||
if(name.str[0]) {
|
if(h.v == Request::HREQUEST_REFERENCE_XY.v) {
|
||||||
sprintf(ret, "r%03x-%s", h.v, name.str);
|
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 {
|
} 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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
sketch.h
1
sketch.h
|
@ -199,7 +199,6 @@ public:
|
||||||
hEntity workplane; // or Entity::FREE_IN_3D
|
hEntity workplane; // or Entity::FREE_IN_3D
|
||||||
hGroup group;
|
hGroup group;
|
||||||
|
|
||||||
NameStr name;
|
|
||||||
bool construction;
|
bool construction;
|
||||||
|
|
||||||
static hParam AddParam(IdList<Param,hParam> *param, hParam hp);
|
static hParam AddParam(IdList<Param,hParam> *param, hParam hp);
|
||||||
|
|
Loading…
Reference in New Issue