📄 qhull_global.cxx
字号:
case 'n':
qh_option ("normals", NULL, NULL);
qh_appendprint (qh_PRINTnormals);
break;
case 'o':
qh_option ("offFile", NULL, NULL);
qh_appendprint (qh_PRINToff);
break;
case 'p':
qh_option ("points", NULL, NULL);
qh_appendprint (qh_PRINTpoints);
break;
case 's':
qh_option ("summary", NULL, NULL);
qh PRINTsummary= True;
break;
case 'v':
qh_option ("voronoi", NULL, NULL);
qh VORONOI= True;
qh DELAUNAY= True;
break;
case 'A':
if (!isdigit(*s) && *s != '.' && *s != '-')
fprintf(qh ferr, "qhull warning: no maximum cosine angle given for option 'An'. Ignored.\n");
else {
if (*s == '-') {
qh premerge_cos= -qh_strtod (s, &s);
qh_option ("Angle-premerge-", NULL, &qh premerge_cos);
qh PREmerge= True;
}else {
qh postmerge_cos= qh_strtod (s, &s);
qh_option ("Angle-postmerge", NULL, &qh postmerge_cos);
qh POSTmerge= True;
}
qh MERGING= True;
}
break;
case 'C':
if (!isdigit(*s) && *s != '.' && *s != '-')
fprintf(qh ferr, "qhull warning: no centrum radius given for option 'Cn'. Ignored.\n");
else {
if (*s == '-') {
qh premerge_centrum= -qh_strtod (s, &s);
qh_option ("Centrum-premerge-", NULL, &qh premerge_centrum);
qh PREmerge= True;
}else {
qh postmerge_centrum= qh_strtod (s, &s);
qh_option ("Centrum-postmerge", NULL, &qh postmerge_centrum);
qh POSTmerge= True;
}
qh MERGING= True;
}
break;
case 'E':
if (*s == '-')
fprintf(qh ferr, "qhull warning: negative maximum roundoff given for option 'An'. Ignored.\n");
else if (!isdigit(*s))
fprintf(qh ferr, "qhull warning: no maximum roundoff given for option 'En'. Ignored.\n");
else {
qh DISTround= qh_strtod (s, &s);
qh_option ("Distance-roundoff", NULL, &qh DISTround);
qh SETroundoff= True;
}
break;
case 'H':
start= s;
qh HALFspace= True;
qh_strtod (s, &t);
while (t > s) {
if (*t && !isspace (*t)) {
if (*t == ',')
t++;
else
ivp_message( "qhull warning: origin for Halfspace intersection should be 'Hn,n,n,...'\n");
}
s= t;
qh_strtod (s, &t);
}
if (start < t) {
if (!(qh feasible_string= (char*)p_calloc (t-start+1, 1))) {
fprintf(qh ferr, "qhull error: insufficient memory for 'Hn,n,n'\n");
qh_errexit(qh_ERRmem, NULL, NULL);
}
strncpy (qh feasible_string, start, t-start);
qh_option ("Halfspace-about", NULL, NULL);
qh_option (qh feasible_string, NULL, NULL);
}else
qh_option ("Halfspace", NULL, NULL);
break;
case 'R':
if (!isdigit(*s))
fprintf(qh ferr, "qhull warning: missing random perturbation for option 'Rn'. Ignored\n");
else {
qh RANDOMfactor= qh_strtod (s, &s);
qh_option ("Random_perturb", NULL, &qh RANDOMfactor);
qh RANDOMdist= True;
}
break;
case 'V':
if (!isdigit(*s) && *s != '-')
fprintf(qh ferr, "qhull warning: missing visible distance for option 'Vn'. Ignored\n");
else {
qh MINvisible= qh_strtod (s, &s);
qh_option ("Visible", NULL, &qh MINvisible);
}
break;
case 'U':
if (!isdigit(*s) && *s != '-')
fprintf(qh ferr, "qhull warning: missing coplanar distance for option 'Un'. Ignored\n");
else {
qh MAXcoplanar= qh_strtod (s, &s);
qh_option ("U-coplanar", NULL, &qh MAXcoplanar);
}
break;
case 'W':
if (*s == '-')
fprintf(qh ferr, "qhull warning: negative outside width for option 'Wn'. Ignored.\n");
else if (!isdigit(*s))
fprintf(qh ferr, "qhull warning: missing outside width for option 'Wn'. Ignored\n");
else {
qh MINoutside= qh_strtod (s, &s);
qh_option ("W-outside", NULL, &qh MINoutside);
qh APPROXhull= True;
}
break;
/************ sub menus ***************/
case 'F':
while (*s && !isspace(*s)) {
switch(*s++) {
case 'a':
qh_option ("Farea", NULL, NULL);
qh_appendprint (qh_PRINTarea);
qh GETarea= True;
break;
case 'A':
qh_option ("FArea-total", NULL, NULL);
qh GETarea= True;
break;
case 'c':
qh_option ("Fcoplanars", NULL, NULL);
qh_appendprint (qh_PRINTcoplanars);
break;
case 'C':
qh_option ("FCentrums", NULL, NULL);
qh_appendprint (qh_PRINTcentrums);
break;
case 'd':
qh_option ("Fd-cdd-in", NULL, NULL);
qh CDDinput= True;
break;
case 'D':
qh_option ("FD-cdd-out", NULL, NULL);
qh CDDoutput= True;
break;
case 'F':
qh_option ("FFacets-xridge", NULL, NULL);
qh_appendprint (qh_PRINTfacets_xridge);
break;
case 'i':
qh_option ("Finner", NULL, NULL);
qh_appendprint (qh_PRINTinner);
break;
case 'I':
qh_option ("FIds", NULL, NULL);
qh_appendprint (qh_PRINTids);
break;
case 'm':
qh_option ("Fmerges", NULL, NULL);
qh_appendprint (qh_PRINTmerges);
break;
case 'n':
qh_option ("Fneighbors", NULL, NULL);
qh_appendprint (qh_PRINTneighbors);
break;
case 'N':
qh_option ("FNeighbors-vertex", NULL, NULL);
qh_appendprint (qh_PRINTvneighbors);
break;
case 'o':
qh_option ("Fouter", NULL, NULL);
qh_appendprint (qh_PRINTouter);
break;
case 'O':
if (qh PRINToptions1st) {
qh_option ("FOptions", NULL, NULL);
qh_appendprint (qh_PRINToptions);
}else
qh PRINToptions1st= True;
break;
case 'p':
qh_option ("Fpoint-intersect", NULL, NULL);
qh_appendprint (qh_PRINTpointintersect);
break;
case 'P':
qh_option ("FPoint-nearest", NULL, NULL);
qh_appendprint (qh_PRINTpointnearest);
break;
case 'Q':
qh_option ("FQhull", NULL, NULL);
qh_appendprint (qh_PRINTqhull);
break;
case 's':
qh_option ("Fsummary", NULL, NULL);
qh_appendprint (qh_PRINTsummary);
break;
case 'S':
qh_option ("FSize", NULL, NULL);
qh_appendprint (qh_PRINTsize);
qh GETarea= True;
break;
case 't':
qh_option ("Ftriangles", NULL, NULL);
qh_appendprint (qh_PRINTtriangles);
break;
case 'v':
/* option set in qh_initqhull_globals */
qh_appendprint (qh_PRINTvertices);
break;
case 'V':
qh_option ("FVertex-average", NULL, NULL);
qh_appendprint (qh_PRINTaverage);
break;
case 'x':
qh_option ("Fxtremes", NULL, NULL);
qh_appendprint (qh_PRINTextremes);
break;
default:
s--;
ivp_message( "qhull warning: unknown 'F' output option %c, rest ignored\n", (int)s[0]);
while (*++s && !isspace(*s)){;};
break;
}
}
break;
case 'G':
isgeom= True;
qh_appendprint (qh_PRINTgeom);
while (*s && !isspace(*s)) {
switch(*s++) {
case 'a':
qh_option ("Gall-points", NULL, NULL);
qh PRINTdots= True;
break;
case 'c':
qh_option ("Gcentrums", NULL, NULL);
qh PRINTcentrums= True;
break;
case 'h':
qh_option ("Gintersections", NULL, NULL);
qh DOintersections= True;
break;
case 'i':
qh_option ("Ginner", NULL, NULL);
qh PRINTinner= True;
break;
case 'n':
qh_option ("Gno-planes", NULL, NULL);
qh PRINTnoplanes= True;
break;
case 'o':
qh_option ("Gouter", NULL, NULL);
qh PRINTouter= True;
break;
case 'p':
qh_option ("Gpoints", NULL, NULL);
qh PRINTcoplanar= True;
break;
case 'r':
qh_option ("Gridges", NULL, NULL);
qh PRINTridges= True;
break;
case 't':
qh_option ("Gtransparent", NULL, NULL);
qh PRINTtransparent= True;
break;
case 'v':
qh_option ("Gvertices", NULL, NULL);
qh PRINTspheres= True;
break;
case 'D':
if (!isdigit (*s))
ivp_message( "qhull input error: missing dimension for option 'GDn'\n");
else {
if (qh DROPdim >= 0)
ivp_message( "qhull warning: can only drop one dimension. Previous 'GD%d' ignored\n",
qh DROPdim);
qh DROPdim= qh_strtol (s, &s);
qh_option ("GDrop-dim", &qh DROPdim, NULL);
}
break;
default:
s--;
ivp_message( "qhull warning: unknown 'G' print option %c, rest ignored\n", (int)s[0]);
while (*++s && !isspace(*s)){;};
break;
}
}
break;
case 'P':
while (*s && !isspace(*s)) {
switch(*s++) {
case 'd': case 'D': /* see qh_initthresholds() */
key= s[-1];
i= qh_strtol (s, &s);
r= 0;
if (*s == ':') {
s++;
r= qh_strtod (s, &s);
}
if (key == 'd')
qh_option ("Pdrop-facets-dim-less", &i, &r);
else
qh_option ("PDrop-facets-dim-more", &i, &r);
break;
case 'g':
qh_option ("Pgood-facets", NULL, NULL);
qh PRINTgood= True;
break;
case 'G':
qh_option ("PGood-facet-neighbors", NULL, NULL);
qh PRINTneighbors= True;
break;
case 'o':
qh_option ("Poutput-forced", NULL, NULL);
qh FORCEoutput= True;
break;
case 'p':
qh_option ("Pprecision-ignore", NULL, NULL);
qh PRINTprecision= False;
break;
case 'A':
if (!isdigit (*s))
ivp_message( "qhull input error: missing facet count for keep area option 'PAn'\n");
else {
qh KEEParea= qh_strtol (s, &s);
qh_option ("PArea-keep", &qh KEEParea, NULL);
qh GETarea= True;
}
break;
case 'F':
if (!isdigit (*s))
ivp_message( "qhull input error: missing facet area for option 'PFn'\n");
else {
qh KEEPminArea= qh_strtod (s, &s);
qh_option ("PFacet-area-keep", NULL, &qh KEEPminArea);
qh GETarea= True;
}
break;
case 'M':
if (!isdigit (*s))
ivp_message( "qhull input error: missing merge count for option 'PMn'\n");
else {
qh KEEPmerge= qh_strtol (s, &s);
qh_option ("PMerge-keep", &qh KEEPmerge, NULL);
}
break;
default:
s--;
ivp_message( "qhull warning: unknown 'P' print option %c, rest ignored\n", (int)s[0]);
while (*++s && !isspace(*s));
break;
}
}
break;
case 'Q':
lastproject= -1;
while (*s && !isspace(*s)) {
switch(*s++) {
case 'b': case 'B': /* handled by qh_initthresholds */
key= s[-1];
if (key == 'b' && *s == 'B') {
s++;
r= qh_DEFAULTbox;
qh SCALEinput= True;
qh_option ("QbBound-unit-box", NULL, &r);
break;
}
if (key == 'b' && *s == 'b') {
s++;
qh SCALElast= True;
qh_option ("Qbbound-last", NULL, NULL);
break;
}
k= qh_strtol (s, &s);
r= 0.0;
wasproject= False;
if (*s == ':') {
s++;
if ((r= qh_strtod(s, &s)) == 0.0) {
t= s; /* need true dimension for memory allocation */
while (*t && !isspace(*t)) {
if (toupper(*t++) == 'B'
&& k == qh_strtol (t, &t)
&& *t++ == ':'
&& qh_strtod(t, &t) == 0.0) {
qh PROJECTinput++;
trace2((qh ferr, "qh_initflags: project dimension %d\n", k));
qh_option ("Qb-project-dim", &k, NULL);
wasproject= True;
lastproject= k;
break;
}
}
}
}
if (!wasproject) {
if (lastproject == k && r == 0.0)
lastproject= -1; /* doesn't catch all possible sequences */
else if (key == 'b') {
qh SCALEinput= True;
if (r == 0.0)
r= -qh_DEFAULTbox;
qh_option ("Qbound-dim-low", &k, &r);
}else {
qh SCALEinput= True;
if (r == 0.0)
r= qh_DEFAULTbox;
qh_option ("QBound-dim-high", &k, &r);
}
}
break;
case 'c':
qh_option ("Qcoplanar-keep", NULL, NULL);
qh KEEPcoplanar= True;
break;
case 'f':
qh_option ("Qfurthest-outside", NULL, NULL);
qh BESToutside= True;
break;
case 'g':
qh_option ("Qgood-facets-only", NULL, NULL);
qh ONLYgood= True;
break;
case 'i':
qh_option ("Qinterior-keep", NULL, NULL);
qh KEEPinside= True;
break;
case 'm':
qh_option ("Qmax-outside-only", NULL, NULL);
qh ONLYmax= True;
break;
case 'r':
qh_option ("Qrandom-outside", NULL, NULL);
qh RANDOMoutside= True;
break;
case 's':
qh_option ("Qsearch-initial-simplex", NULL, NULL);
qh ALLpoints= True;
break;
case 'u':
qh_option ("QupperDelaunay", NULL, NULL);
qh UPPERdelaunay= True;
break;
case 'v':
qh_option ("Qvertex-neighbors-convex", NULL, NULL);
qh TESTvneighbors= True;
break;
case 'x':
qh_option ("Qxact-merge", NULL, NULL);
qh MERGEexact= True;
qh MERGING= True;
break;
case 'z':
qh_option ("Qz-infinity-point", NULL, NULL);
qh ATinfinity= True;
break;
case '0':
qh_option ("Q0-no-premerge", NULL, NULL);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -