diff --git a/libsrc/csg/csgpkg.cpp b/libsrc/csg/csgpkg.cpp index 5f9f9730..daeeba5d 100644 --- a/libsrc/csg/csgpkg.cpp +++ b/libsrc/csg/csgpkg.cpp @@ -59,29 +59,26 @@ namespace netgen if (strcmp (command, "get") == 0) { - if (!geometry) + if (geometry) { - Tcl_SetResult (interp, err_needscsgeometry, TCL_STATIC); - return TCL_ERROR; + 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); } - - 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) { diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index b1d5578d..1cc404ad 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -38,9 +38,6 @@ private: /// point coordinates T_POINTS points; - /// type of element, set in calcsurfacesofnode - // Array eltyps; - /// line-segments at edges Array segments; /// surface elements, 2d-inner elements