diff --git a/Common/Options.cpp b/Common/Options.cpp index e050437943421874e714ddb9913c3ef4943501d5..a19976e71c9319d06b73485d415f6714d369dd78 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -2753,7 +2753,7 @@ double opt_general_options_save(OPT_ARGS_NUM) #if defined(HAVE_FLTK) if(FlGui::available() && (action & GMSH_GUI)) FlGui::instance()->options->general.butt[9]->value - (CTX::instance()->optionsSave); + (CTX::instance()->optionsSave ? 1 : 0); #endif return CTX::instance()->optionsSave; } diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp index 162722383564440741892e65f1881753404ba24c..9e29a31d9ee1daec09dc6dc5775499fd737cd0a4 100644 --- a/Geo/MElement.cpp +++ b/Geo/MElement.cpp @@ -18,7 +18,6 @@ #include "MPyramid.h" #include "MElementCut.h" #include "GEntity.h" -//#include "GFace.h" ?? #include "StringUtils.h" #include "Numeric.h" #include "Context.h" diff --git a/Geo/OCCEdge.cpp b/Geo/OCCEdge.cpp index f366b5d30e28ad023421b306f5c4f70c6c815eeb..e45571e93107f917381f5eec907c7adb75fac229 100644 --- a/Geo/OCCEdge.cpp +++ b/Geo/OCCEdge.cpp @@ -94,21 +94,19 @@ SPoint2 OCCEdge::reparamOnFace(const GFace *face, double epar, int dir) const const double dx = p1.x()-p2.x(); const double dy = p1.y()-p2.y(); const double dz = p1.z()-p2.z(); - if(sqrt(dx * dx + dy * dy + dz * dz) > 1.e-2 * CTX::instance()->lc && 0){ - // return reparamOnFace(face, epar,-1); - Msg::Warning("Reparam on face partially failed for curve %d surface %d at point %g", + if(sqrt(dx * dx + dy * dy + dz * dz) > 1.e-2 * CTX::instance()->lc){ + Msg::Warning("Reparam on face was inaccurate for curve %d on surface %d at point %g", tag(), face->tag(), epar); Msg::Warning("On the face %d local (%g %g) global (%g %g %g)", face->tag(), u, v, p2.x(), p2.y(), p2.z()); Msg::Warning("On the edge %d local (%g) global (%g %g %g)", tag(), epar, p1.x(), p1.y(), p1.z()); - // GPoint ppp = face->closestPoint(SPoint3(p1.x(), p1.y(), p1.z())); - // return SPoint2(ppp.u(), ppp.v()); } return SPoint2(u, v); } -GPoint OCCEdge::closestPoint(const SPoint3 &qp, double ¶m) const{ +GPoint OCCEdge::closestPoint(const SPoint3 &qp, double ¶m) const +{ gp_Pnt pnt(qp.x(), qp.y(), qp.z()); GeomAPI_ProjectPointOnCurve proj(pnt, curve, s0, s1); @@ -119,8 +117,6 @@ GPoint OCCEdge::closestPoint(const SPoint3 &qp, double ¶m) const{ param = proj.LowerDistanceParameter(); - // Msg::Info("projection lower distance parameters %g %g",pp[0],pp[1]); - if(param < s0 || param > s1){ Msg::Error("Point projection is out of edge bounds"); return GPoint(0, 0); @@ -128,10 +124,8 @@ GPoint OCCEdge::closestPoint(const SPoint3 &qp, double ¶m) const{ pnt = proj.NearestPoint(); return GPoint(pnt.X(), pnt.Y(), pnt.Z(), this, param); - } - // True if the edge is a seam for the given face bool OCCEdge::isSeam(const GFace *face) const { @@ -296,10 +290,11 @@ void OCCEdge::writeGEO(FILE *fp) else GEdge::writeGEO(fp); } + // sometimes, we ask to replace the ending points of the curve // in gluing operations for example -void OCCEdge::replaceEndingPointsInternals(GVertex *g0, GVertex *g1){ - +void OCCEdge::replaceEndingPointsInternals(GVertex *g0, GVertex *g1) +{ TopoDS_Vertex aV1 = *((TopoDS_Vertex*)v0->getNativePtr()); TopoDS_Vertex aV2 = *((TopoDS_Vertex*)v1->getNativePtr()); TopoDS_Vertex aVR1 = *((TopoDS_Vertex*)g0->getNativePtr()); @@ -353,5 +348,4 @@ void OCCEdge::replaceEndingPointsInternals(GVertex *g0, GVertex *g1){ } - #endif diff --git a/Geo/OCCFace.cpp b/Geo/OCCFace.cpp index f10e6ab5819f5b515f78be9d494a03405085acb6..fdbdedea78f9fee43aa9c0ebf276a0348d03722e 100644 --- a/Geo/OCCFace.cpp +++ b/Geo/OCCFace.cpp @@ -235,6 +235,7 @@ double OCCFace::curvatureMax(const SPoint2 ¶m) const return std::max(fabs(prop.MinCurvature()), fabs(prop.MaxCurvature())); } + double OCCFace::curvatures(const SPoint2 ¶m, SVector3 *dirMax, SVector3 *dirMin, @@ -340,7 +341,8 @@ bool OCCFace::buildSTLTriangulation(bool force) Bnd_Box aBox; BRepBndLib::Add(s, aBox); - BRepMesh_FastDiscret aMesher(0.1, 0.5, aBox, Standard_False, Standard_False, Standard_True, Standard_False); + BRepMesh_FastDiscret aMesher(0.1, 0.5, aBox, Standard_False, Standard_False, + Standard_True, Standard_False); aMesher.Add(s); #if !((OCC_VERSION_MAJOR == 6) && (OCC_VERSION_MINOR < 5)) aMesher.Process(s); @@ -537,5 +539,4 @@ bool OCCFace::isSphere (double &radius, SPoint3 ¢er) const } } - #endif diff --git a/demos/primitives.pos b/demos/primitives.pos index 2a291b6c20c27def267aacae70f0847e0780e15d..ec45ea14a9d6c2976bba81368b20e7c01128b9c2 100644 --- a/demos/primitives.pos +++ b/demos/primitives.pos @@ -9,7 +9,7 @@ View "Primitives"{ T3(x,y--,z,0){"Scalar, vector and tensor points"}; SP(x,y--,z){1}; VP(x,y--,z){1,0,0}; - TP(x,y--,z){1,0,0,0,0,0,0,0,0}; + TP(x,y--,z){1,0,0,0,2,0,0,0,1}; T3(x,y--,z,0){"Scalar, vector and tensor lines"}; SL(x,y--,z, x+.5,y,z){1,2}; diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt index fa065f134fc3ef87355daf11edc707221c460d2f..496d36df09d305b65170aacbbf8dd4b25aa50dcf 100644 --- a/doc/VERSIONS.txt +++ b/doc/VERSIONS.txt @@ -1,3 +1,14 @@ +2.6.0 (): new tensor field visualization modes (eigenvectors, +ellipsoid, etc.); added support for interpolation schemes in .msh +file; added support for MED3 format; rescale viewport around visible +entities (shift+1:1 in GUI); unified post-processing field export; new +experimental stereo+camera visu mode; new DelQuad and Auto 2D meshing +algorithms; experimental BAMG & MMG3D support for anisotropic mesh +generation; new OCC cut&merge faces algorithm imported from Salome; +new ability to connect extruded meshes to tetrahedral grids using +pyramids; Abaqus (INP) mesh export; various bug fixes and +improvements. + 2.5.0 (Oct 15, 2010): new compound geometrical entities (for remeshing and/or trans-patch meshing); improved mesh reclassification tool; new client/server visualization mode; new ability to watch a pattern of @@ -26,7 +37,7 @@ improvements all over the place. 2.3.1 (Mar 18, 2009): removed GSL dependency (Gmsh now simply uses Blas and Lapack); new per-window visibility; added support for composite window printing and background images; fixed string option -affectation in parser; fixed surface mesh orientation for Open Cascade +affectation in parser; fixed surface mesh orientation for Open CASCADE models; fixed random triangle orientations in Delaunay and Frontal algorithms.