minor adaption

This commit is contained in:
Joachim Schoeberl 2011-01-20 19:58:57 +00:00
parent dc845bcd2c
commit 0e5e2c7883
2 changed files with 18 additions and 24 deletions

View File

@ -59,29 +59,26 @@ namespace netgen
if (strcmp (command, "get") == 0) if (strcmp (command, "get") == 0)
{ {
if (!geometry) if (geometry)
{ {
Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); char buf[20];
return TCL_ERROR; Point3d pmin = geometry->BoundingBox ().PMin();
Point3d pmax = geometry->BoundingBox ().PMax();
sprintf (buf, "%5.1lf", pmin.X());
Tcl_SetVar (interp, "::geooptions.minx", buf, 0);
sprintf (buf, "%5.1lf", pmin.Y());
Tcl_SetVar (interp, "::geooptions.miny", buf, 0);
sprintf (buf, "%5.1lf", pmin.Z());
Tcl_SetVar (interp, "::geooptions.minz", buf, 0);
sprintf (buf, "%5.1lf", pmax.X());
Tcl_SetVar (interp, "::geooptions.maxx", buf, 0);
sprintf (buf, "%5.1lf", pmax.Y());
Tcl_SetVar (interp, "::geooptions.maxy", buf, 0);
sprintf (buf, "%5.1lf", pmax.Z());
Tcl_SetVar (interp, "::geooptions.maxz", buf, 0);
} }
char buf[20];
Point3d pmin = geometry->BoundingBox ().PMin();
Point3d pmax = geometry->BoundingBox ().PMax();
sprintf (buf, "%5.1lf", pmin.X());
Tcl_SetVar (interp, "::geooptions.minx", buf, 0);
sprintf (buf, "%5.1lf", pmin.Y());
Tcl_SetVar (interp, "::geooptions.miny", buf, 0);
sprintf (buf, "%5.1lf", pmin.Z());
Tcl_SetVar (interp, "::geooptions.minz", buf, 0);
sprintf (buf, "%5.1lf", pmax.X());
Tcl_SetVar (interp, "::geooptions.maxx", buf, 0);
sprintf (buf, "%5.1lf", pmax.Y());
Tcl_SetVar (interp, "::geooptions.maxy", buf, 0);
sprintf (buf, "%5.1lf", pmax.Z());
Tcl_SetVar (interp, "::geooptions.maxz", buf, 0);
} }
else if (strcmp (command, "set") == 0) else if (strcmp (command, "set") == 0)
{ {

View File

@ -38,9 +38,6 @@ private:
/// point coordinates /// point coordinates
T_POINTS points; T_POINTS points;
/// type of element, set in calcsurfacesofnode
// Array<ELEMENTTYPE> eltyps;
/// line-segments at edges /// line-segments at edges
Array<Segment> segments; Array<Segment> segments;
/// surface elements, 2d-inner elements /// surface elements, 2d-inner elements