From d4f641ef5f8a763d3a5c411394be90998dd2ee09 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 27 Mar 2008 14:38:52 +0000 Subject: [PATCH] Join modifications from BR_Dev_For_4_0 tag V4_1_1. --- BLSURFPLUGIN_version.h.in | 34 ++ INSTALL | 8 +- .../unix/config_files/check_BLSURFPLUGIN.m4 | 6 +- adm_local/unix/make_commence.in | 4 +- adm_local/unix/make_common_starter.am | 54 ++ bin/VERSION | 2 +- build_configure | 1 + configure.in.base | 18 +- idl/BLSURFPlugin_Algorithm.idl | 3 + idl/Makefile.in | 2 +- resources/BLSURFPlugin.xml | 4 +- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 516 +++++++++++------- src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx | 7 +- src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx | 21 + src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx | 12 + .../BLSURFPlugin_Hypothesis_i.cxx | 31 ++ .../BLSURFPlugin_Hypothesis_i.hxx | 3 + src/BLSURFPlugin/Makefile.in | 3 +- src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx | 22 +- src/GUI/BLSURFPluginGUI_HypothesisCreator.h | 3 + src/GUI/BLSURFPlugin_msg_en.po | 17 +- src/GUI/Makefile.in | 6 +- 22 files changed, 539 insertions(+), 238 deletions(-) create mode 100644 BLSURFPLUGIN_version.h.in create mode 100644 adm_local/unix/make_common_starter.am diff --git a/BLSURFPLUGIN_version.h.in b/BLSURFPLUGIN_version.h.in new file mode 100644 index 0000000..ee5d1d4 --- /dev/null +++ b/BLSURFPLUGIN_version.h.in @@ -0,0 +1,34 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ +// +// File : BLSURFPLUGIN_version.h +// Author : Vadim SANDLER +// Module : SALOME + +#if !defined(__BLSURFPLUGIN_VERSION_H__) +#define __BLSURFPLUGIN_VERSION_H__ + +/* + BLSURFPLUGIN_VERSION is (major << 16) + (minor << 8) + patch. +*/ + +#define BLSURFPLUGIN_VERSION_STR "@VERSION@" +#define BLSURFPLUGIN_VERSION @XVERSION@ + +#endif // __BLSURFPLUGIN_VERSION_H__ diff --git a/INSTALL b/INSTALL index 31c3fda..b21c1f4 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ -This is the version 3.2.0 of BLSURFPLUGIN +This is the version 4.1.0 of BLSURFPLUGIN Compatible with : - - KERNEL 3.2.0 - - GUI 3.2.0 - - SMESH 3.2.0 + - KERNEL 4.1.0 + - GUI 4.1.0 + - SMESH 4.1.0 diff --git a/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 b/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 index 0af102f..dd551be 100644 --- a/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 +++ b/adm_local/unix/config_files/check_BLSURFPLUGIN.m4 @@ -40,7 +40,7 @@ if test "x$BLSURF_HOME" != "x"; then BLSURF_INCLUDES="-I$BLSURF_HOME/include" - BLSURF_LIBS="-L$BLSURF_HOME/lib -lBLSURF" + BLSURF_LIBS="-L$BLSURF_HOME/lib -lBLSurf" CPPFLAGS_old="$CPPFLAGS" CXXFLAGS_old="$CXXFLAGS" @@ -52,12 +52,12 @@ if test "x$BLSURF_HOME" != "x"; then AC_MSG_CHECKING(for BLSURF header file) - AC_CHECK_HEADER(blshare.h,BLSURF_ok=yes,BLSURF_ok=no) + AC_CHECK_HEADER(distene/api.h,BLSURF_ok=yes,BLSURF_ok=no) if test "x$BLSURF_ok" == "xyes"; then AC_MSG_CHECKING(for BLSURF library) - AC_TRY_COMPILE(#include "blshare.h", + AC_TRY_COMPILE(#include "distene/api.h", BLSURF_init(); ,BLSURF_ok=yes; $CXX -shared -o linopt.o -c diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index e2536f1..afa9ef5 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -203,12 +203,12 @@ LN_S=@LN_S@ prefix=@prefix@ exec_prefix=@exec_prefix@ bindir=@bindir@/salome -libdir=@libdir@/salome +libdir=@libdir@@LIB_LOCATION_SUFFIX@/salome # warning : if user give this path in configure we could have salome/salome :-( includedir=@includedir@/salome datadir=@datadir@/salome idldir=$(prefix)/idl/salome -sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules +sharedpydir=@libdir@@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules docdir=${prefix}/doc/salome diff --git a/adm_local/unix/make_common_starter.am b/adm_local/unix/make_common_starter.am new file mode 100644 index 0000000..5339413 --- /dev/null +++ b/adm_local/unix/make_common_starter.am @@ -0,0 +1,54 @@ +# +# ============================================================ +# This file defines the common definitions used in several +# Makefile. This file must be included, if needed, by the file +# Makefile.am. +# ============================================================ +# + +# Standard directory for installation +salomeincludedir = $(includedir)/@PACKAGE@ +libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/@PACKAGE@ +bindir = $(prefix)/bin/@PACKAGE@ +salomescriptdir = $(bindir) + +# Directory for installing idl files +salomeidldir = $(prefix)/idl/@PACKAGE@ + +# Directory for installing resource files +salomeresdir = $(prefix)/share/@PACKAGE@/resources/@MODULE_NAME@ + +# Directories for installing admin files +admlocaldir = $(prefix)/adm_local +admlocalunixdir = $(admlocaldir)/unix +admlocalm4dir = $(admlocaldir)/unix/config_files + +# Shared modules installation directory +sharedpkgpythondir =$(pkgpythondir)/shared_modules + +# Documentation directory +docdir = $(datadir)/doc/@PACKAGE@ + +# common rules + +# moc-files generation +%_moc.cxx: %.h + $(MOC) $< -o $@ + +# qm-files generation +%.qm: %.po + $(MSG2QM) $< $@ + +EXTRA_DIST=$(MOC_FILES:%_moc.cxx=%.h) $(nodist_salomeres_DATA:%.qm=%.po) + +mostlyclean-local: + rm -f @builddir@/*_moc.cxx + rm -f @builddir@/*.qm + +# tests +tests: unittest + +unittest: $(UNIT_TEST_PROG) + @if test "x$(UNIT_TEST_PROG)" != "x"; then \ + $(UNIT_TEST_PROG); \ + fi; diff --git a/bin/VERSION b/bin/VERSION index bd2d125..c6df2bf 100755 --- a/bin/VERSION +++ b/bin/VERSION @@ -1 +1 @@ -THIS IS SALOME - BLSURFPLUGIN VERSION: 3.2.0 +THIS IS SALOME - BLSURFPLUGIN VERSION: 4.1.0 diff --git a/build_configure b/build_configure index 8e183ab..249463d 100755 --- a/build_configure +++ b/build_configure @@ -235,6 +235,7 @@ else fi aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \ + -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED \ -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \ -I ${MED_ROOT_DIR}/adm_local/unix/config_files \ -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files \ diff --git a/configure.in.base b/configure.in.base index ec10256..2dd3674 100644 --- a/configure.in.base +++ b/configure.in.base @@ -16,7 +16,7 @@ # AC_INIT(src) -AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files) +AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files/DEPRECATED) AC_CANONICAL_HOST PACKAGE=salome @@ -140,14 +140,6 @@ echo CHECK_PYTHON -echo -echo --------------------------------------------- -echo BOOST Library -echo --------------------------------------------- -echo - -CHECK_BOOST - dnl echo dnl echo --------------------------------------------- dnl echo testing java @@ -241,6 +233,14 @@ echo CHECK_HDF5 +echo +echo --------------------------------------------- +echo BOOST Library +echo --------------------------------------------- +echo + +CHECK_BOOST + echo echo --------------------------------------------- echo Testing OpenCascade diff --git a/idl/BLSURFPlugin_Algorithm.idl b/idl/BLSURFPlugin_Algorithm.idl index ecc7516..062a409 100644 --- a/idl/BLSURFPlugin_Algorithm.idl +++ b/idl/BLSURFPlugin_Algorithm.idl @@ -44,6 +44,9 @@ module BLSURFPlugin */ interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis { + void SetTopology(in long value); + long GetTopology(); + void SetPhysicalMesh(in long value); long GetPhysicalMesh(); diff --git a/idl/Makefile.in b/idl/Makefile.in index 89d037a..d232a85 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -46,7 +46,7 @@ $(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%) # python wrap lib: pyidl -PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ +PYTHON_BUILD_SITE=$(top_builddir)/lib${LIB_LOCATION_SUFFIX}/python$(PYTHON_VERSION)/site-packages/@PACKAGE@ pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py) diff --git a/resources/BLSURFPlugin.xml b/resources/BLSURFPlugin.xml index 30bcd8f..f72a611 100644 --- a/resources/BLSURFPlugin.xml +++ b/resources/BLSURFPlugin.xml @@ -7,8 +7,8 @@ + server-lib="BLSURFEngine" + gui-lib="BLSURFPluginGUI"> #include -#include +extern "C"{ +#include +} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //============================================================================= /*! @@ -128,9 +146,24 @@ bool BLSURFPlugin_BLSURF::CheckHypothesis */ //============================================================================= -void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp) { +inline std::string to_string(double d) +{ + std::ostringstream o; + o << d; + return o.str(); +} + +inline std::string to_string(int i) +{ + std::ostringstream o; + o << i; + return o.str(); +} + +void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsurf_session_t *bls) { if (hyp) { MESSAGE("BLSURFPlugin_BLSURF::SetParameters"); + _topology = (int) hyp->GetTopology(); _physicalMesh = (int) hyp->GetPhysicalMesh(); _phySize = hyp->GetPhySize(); _geometricMesh = (int) hyp->GetGeometricMesh(); @@ -138,33 +171,40 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp) { _gradation = hyp->GetGradation(); _quadAllowed = hyp->GetQuadAllowed(); _decimesh = hyp->GetDecimesh(); - } + } else { + MESSAGE("BLSURFPlugin_BLSURF::SetParameters using defaults"); + _topology = BLSURFPlugin_Hypothesis::GetDefaultTopology(); + _physicalMesh = BLSURFPlugin_Hypothesis::GetDefaultPhysicalMesh(); + _phySize = BLSURFPlugin_Hypothesis::GetDefaultPhySize(); + _geometricMesh = BLSURFPlugin_Hypothesis::GetDefaultGeometricMesh(); + _angleMeshS = BLSURFPlugin_Hypothesis::GetDefaultAngleMeshS(); + _gradation = BLSURFPlugin_Hypothesis::GetDefaultGradation(); + _quadAllowed = BLSURFPlugin_Hypothesis::GetDefaultQuadAllowed(); + _decimesh = BLSURFPlugin_Hypothesis::GetDefaultDecimesh(); - bool BlsurfEnvFile = true; - - if ( BlsurfEnvFile ) { - TCollection_AsciiString SalomeExecDir; - - char * Dir = getenv("PWD"); - SalomeExecDir = Dir; - SalomeExecDir += "/blsurf.env"; - - ofstream theBlsurfEnv ( SalomeExecDir.ToCString() , ios::out); - theBlsurfEnv << "verb 10" << endl; - theBlsurfEnv << "hphy_flag " << _physicalMesh << endl; - theBlsurfEnv << "hphydef " << _phySize << endl; - theBlsurfEnv << "hgeo_flag " << _geometricMesh << endl; - theBlsurfEnv << "angle_meshs " << _angleMeshS << endl; - theBlsurfEnv << "gradation " << _gradation << endl; - theBlsurfEnv << "topo_points 1" << endl; - theBlsurfEnv << "topo_project 1" << endl; - theBlsurfEnv << "topo_curves 1" << endl; - theBlsurfEnv << "surforient 1" << endl; - theBlsurfEnv << "decim " << _decimesh << endl; - theBlsurfEnv.close(); } + + blsurf_set_param(bls, "topo_points", _topology > 0 ? "1" : "0"); + blsurf_set_param(bls, "topo_curves", _topology > 0 ? "1" : "0"); + blsurf_set_param(bls, "topo_project", _topology > 0 ? "1" : "0"); + blsurf_set_param(bls, "clean_boundary", _topology > 1 ? "1" : "0"); + blsurf_set_param(bls, "close_boundary", _topology > 1 ? "1" : "0"); + blsurf_set_param(bls, "hphy_flag", to_string(_physicalMesh).c_str()); + blsurf_set_param(bls, "hphydef", to_string(_phySize).c_str()); + blsurf_set_param(bls, "hgeo_flag", to_string(_geometricMesh).c_str()); + blsurf_set_param(bls, "angle_meshs", to_string(_angleMeshS).c_str()); + blsurf_set_param(bls, "angle_meshc", to_string(_angleMeshS).c_str()); + blsurf_set_param(bls, "gradation", to_string(_gradation).c_str()); + // blsurf_set_param(bls, "patch_independent", to_string(_decimesh).c_str()); + blsurf_set_param(bls, "patch_independent", _decimesh ? "1" : "0"); + blsurf_set_param(bls, "element", _quadAllowed ? "q1.0" : "p1"); + blsurf_set_param(bls, "verb", "10"); } +status_t curv_fun(real t, real *uv, real *dt, real *dtt, void *user_data); +status_t surf_fun(real *uv, real *xyz, real*du, real *dv, + real *duu, real *duv, real *dvv, void *user_data); + //============================================================================= /*! * @@ -173,8 +213,6 @@ void BLSURFPlugin_BLSURF::SetParameters(const BLSURFPlugin_Hypothesis* hyp) { bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) { - SetParameters(_hypothesis); - MESSAGE("BLSURFPlugin_BLSURF::Compute"); if (aShape.ShapeType() == TopAbs_COMPOUND) { @@ -184,208 +222,213 @@ bool BLSURFPlugin_BLSURF::Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape) cout << " the shape is UNKNOWN" << endl; }; - int i=0; - if (1) { - for (TopExp_Explorer expf(aShape, TopAbs_FACE); expf.More(); expf.Next()) { - const TopoDS_Shape& face = expf.Current(); - i++; - int j=0; - for (TopExp_Explorer expe(face, TopAbs_EDGE); expe.More(); expe.Next()) { - const TopoDS_Shape& edge = expe.Current(); - j++; - int k=0; - for (TopExp_Explorer expv(edge, TopAbs_VERTEX); expv.More(); expv.Next()) { - k++; - } - // cout << " face " << i << " and its edge " << j << " has " << k << " vertices" << endl; - } - // cout << " face " << i << " has " << j << " edges" << endl; + context_t *ctx = context_new(); + cad_t *c = cad_new(ctx); + + TopTools_IndexedMapOfShape fmap; + TopTools_IndexedMapOfShape emap; + TopTools_IndexedMapOfShape pmap; + vector curves; + vector surfaces; + + fmap.Clear(); + emap.Clear(); + pmap.Clear(); + surfaces.resize(0); + curves.resize(0); + + int iface = 0; + for (TopExp_Explorer face_iter(aShape,TopAbs_FACE);face_iter.More();face_iter.Next()) { + TopoDS_Face f=TopoDS::Face(face_iter.Current()); + if (fmap.FindIndex(f) > 0) + continue; + + fmap.Add(f); + iface++; + surfaces.push_back(BRep_Tool::Surface(f)); + cad_face_t *fce = cad_face_new(c, iface, surf_fun, surfaces.back()); + cad_face_set_tag(fce, iface); + if(f.Orientation() != TopAbs_FORWARD){ + cad_face_set_orientation(fce, CAD_ORIENTATION_REVERSED); + } else { + cad_face_set_orientation(fce, CAD_ORIENTATION_FORWARD); } - // cout << " total number of faces = " << i << endl; - } + + for (TopExp_Explorer edge_iter(f,TopAbs_EDGE);edge_iter.More();edge_iter.Next()) { + TopoDS_Edge e = TopoDS::Edge(edge_iter.Current()); + int ic = emap.FindIndex(e); + if (ic <= 0) + ic = emap.Add(e); + + double tmin,tmax; + curves.push_back(BRep_Tool::CurveOnSurface(e, f, tmin, tmax)); + cad_edge_t *edg = cad_edge_new(fce, ic, tmin, tmax, curv_fun, curves.back()); + cad_edge_set_tag(edg, ic); + cad_edge_set_property(edg, EDGE_PROPERTY_SOFT_REQUIRED); + + int npts = 0; + int ip1, ip2, *ip; + gp_Pnt2d e0 = curves.back()->Value(tmin); + gp_Pnt ee0 = surfaces.back()->Value(e0.X(), e0.Y()); + Standard_Real d1=0,d2=0; + for (TopExp_Explorer ex_edge(e ,TopAbs_VERTEX); ex_edge.More(); ex_edge.Next()) { + TopoDS_Vertex v = TopoDS::Vertex(ex_edge.Current()); + + ++npts; + if (npts == 1){ + ip = &ip1; + d1 = ee0.SquareDistance(BRep_Tool::Pnt(v)); + } else { + ip = &ip2; + d2 = ee0.SquareDistance(BRep_Tool::Pnt(v)); + } + *ip = pmap.FindIndex(v); + if(*ip <= 0) + *ip = pmap.Add(v); + } + if (npts != 2) { + // should not happen + cout << "An edge does not have 2 extremities." << endl; + } else { + if (d1 < d2) + cad_edge_set_extremities(edg, ip1, ip2); + else + cad_edge_set_extremities(edg, ip2, ip1); + } + } // for edge + } //for face + + - BL_SURF mesh; - blw_* blw; + + blsurf_session_t *bls = blsurf_session_new(ctx); + blsurf_data_set_cad(bls, c); + + SetParameters(_hypothesis, bls); cout << endl; cout << "Beginning of Surface Mesh generation" << endl; cout << endl; - if (!mesh.init(aShape)) - return(false); + + if (blsurf_compute_mesh(bls) != STATUS_OK){ + blsurf_session_delete(bls); + cad_delete(c); + context_delete(ctx); + + return false; + } + cout << endl; cout << "End of Surface Mesh generation" << endl; cout << endl; - mesh.get_blw(blw); - SMESHDS_Mesh* meshDS = aMesh.GetMeshDS(); + mesh_t *msh; + blsurf_data_get_mesh(bls, &msh); + if(!msh){ + blsurf_session_delete(bls); + cad_delete(c); + context_delete(ctx); + + return false; + } + + integer nv, ne, nt, nq, vtx[4], tag; + real xyz[3]; - if ( !_decimesh ) { - /* cf. export_mesh_all */ - int j, ip, ic, nptri, is, oriented, iF, nF, idom, ndom, v[5], verb; - double centre[3]; - char element[8]; + mesh_get_vertex_count(msh, &nv); + mesh_get_edge_count(msh, &ne); + mesh_get_triangle_count(msh, &nt); + mesh_get_quadrangle_count(msh, &nq); - verb = blw->env.verb; - blw->env.verb = 0; - assign_bls_mesh_num(blw); - blw->env.verb = verb; - FOR (j, 0, 2) { - centre[j] = (blw->bls_glo.xyzmin[j] + blw->bls_glo.xyzmax[j]) * 0.5; - cout << "centre[" << j << "] : " << centre[j] << endl; + SMESHDS_Mesh* meshDS = aMesh.GetMeshDS(); + SMDS_MeshNode** nodes = new SMDS_MeshNode*[nv+1]; + bool* tags = new bool[nv+1]; + + for(int iv=1;iv<=nv;iv++) { + mesh_get_vertex_coordinates(msh, iv, xyz); + mesh_get_vertex_tag(msh, iv, &tag); + nodes[iv] = meshDS->AddNode(xyz[0], xyz[1], xyz[2]); + // internal point are tagged to zero + if(tag){ + meshDS->SetNodeOnVertex(nodes[iv], TopoDS::Vertex(pmap(tag))); + tags[iv] = false; + } else { + tags[iv] = true; } + } - /* points sommets des edges et des triangles */ - nptri = blw->bls_mesh_num.number_of_nodes; - if (blw->env.verb >= 10) - fprintf(blw->out, "export_salome: surface mesh contains %d vertices\n", nptri); - SMDS_MeshNode** nodes = new SMDS_MeshNode*[nptri+1]; - j = 0; - FOR (ip, 1, nptri) { - if (blw->bls_glo.vertices_xyz[3*ip-3] == BLHUGE) { - if (++j <= 10) { - fprintf(blw->out, "export_salome: unconnected vertex %d\n", ip); - if (j == 10) fprintf(blw->out, "export_salome: ...\n"); - } - nodes[ip] = meshDS->AddNode(centre[0], centre[1], centre[2]); - } - else { - double floatVal = blw->bls_glo.vertices_xyz[3*ip-3]; - // cout << "j : " << j << " node nmuber : " << ip << " --> first coordinate = " << floatVal << " != " << BLHUGE << endl; - nodes[ip] = meshDS->AddNode(blw->bls_glo.vertices_xyz[3*ip-3], blw->bls_glo.vertices_xyz[3*ip-2], blw->bls_glo.vertices_xyz[3*ip-1]); - // cout << "nodes[" << ip << "] : " << blw->bls_glo.vertices_xyz[3*ip-3] << ", " - // << blw->bls_glo.vertices_xyz[3*ip-2] << ", " - // << blw->bls_glo.vertices_xyz[3*ip-1] << endl; - } - } + for(int it=1;it<=ne;it++) { + mesh_get_edge_vertices(msh, it, vtx); + SMDS_MeshEdge* edg = meshDS->AddEdge(nodes[vtx[0]], nodes[vtx[1]]); + mesh_get_edge_tag(msh, it, &tag); + + if (tags[vtx[0]]) { + meshDS->SetNodeOnEdge(nodes[vtx[0]], TopoDS::Edge(emap(tag))); + tags[vtx[0]] = false; + }; + if (tags[vtx[1]]) { + meshDS->SetNodeOnEdge(nodes[vtx[1]], TopoDS::Edge(emap(tag))); + tags[vtx[1]] = false; + }; + meshDS->SetMeshElementOnShape(edg, TopoDS::Edge(emap(tag))); + + } - /* edges */ - int nbEdges = C3D.number_of_curves; - cout << "Number Of Edges : " << nbEdges << endl; - FOR (ic, 1, C3D.number_of_curves) { - //TopoDS_Edge topo_edge = mesh.all_edges[ic-1]->topology; - int np = C3D.TC[ic].number_of_points; - cout << "Number Of Nodes for edge " << ic << " : " << np << endl; - FOR (ip, 1, np-1) { - meshDS->AddEdge(nodes[C3D.TC[ic].iglopc[ip]], nodes[C3D.TC[ic].iglopc[ip+1]]); - } - } + for(int it=1;it<=nt;it++) { + mesh_get_triangle_vertices(msh, it, vtx); + SMDS_MeshFace* tri = meshDS->AddFace(nodes[vtx[0]], nodes[vtx[1]], nodes[vtx[2]]); + mesh_get_triangle_tag(msh, it, &tag); + meshDS->SetMeshElementOnShape(tri, TopoDS::Face(fmap(tag))); + if (tags[vtx[0]]) { + meshDS->SetNodeOnFace(nodes[vtx[0]], TopoDS::Face(fmap(tag))); + tags[vtx[0]] = false; + }; + if (tags[vtx[1]]) { + meshDS->SetNodeOnFace(nodes[vtx[1]], TopoDS::Face(fmap(tag))); + tags[vtx[1]] = false; + }; + if (tags[vtx[2]]) { + meshDS->SetNodeOnFace(nodes[vtx[2]], TopoDS::Face(fmap(tag))); + tags[vtx[2]] = false; + }; + } - /* faces (triangles or quadrilaterals) */ - SMDS_MeshFace* face; - if (blw->bls_glo.number_of_patches <= 0) { - strcpy(element, "p1"); - } - else { - strcpy(element, TC2D[1].ms2d.element); - } - cout << endl; - cout << "Number_of_patches : " << blw->bls_glo.number_of_patches << endl; - cout << "Element : " << element << endl; - cout << "TC2D[1].ms2d.element : " << TC2D[1].ms2d.element << endl; - cout << endl; - if (STREQUAL(element, "p1")) { - if (blw->env.verb >= 10) - fprintf(blw->out, "export_salome: surface mesh contains %d triangles\n", blw->bls_mesh_num.ntri); - FOR (is, 1, blw->bls_glo.number_of_patches) { - TopoDS_Face topo_face = mesh.surfaces[is-1]->topology; - oriented = (TC2D[is].surforient >= 0); - // cout << endl; - // cout << "TC2D[is].surforient : " << TC2D[is].surforient << " --> oriented : " << oriented << endl; - nF = TC2D[is].ms2d.jmax_F; - ndom = TC2D[is].ms2d.ndom; - // cout << "nF : " << nF << endl; - // cout << "ndom : " << ndom << endl; - // cout << endl; - FOR (iF, 1, nF) { - idom = TC2D[is].ms2d.FRef[iF]; - if (!(1 <= idom && idom <= ndom)) - continue; - v[0] = TC2D[is].iglops[TC2D[is].ms2d.F[3*iF-3]]; - v[1] = TC2D[is].iglops[TC2D[is].ms2d.F[3*iF-2]]; - v[2] = TC2D[is].iglops[TC2D[is].ms2d.F[3*iF-1]]; - if (v[0]==v[1] || v[1]==v[2] || v[2]==v[0]) - continue; /* triangle degenere */ - // cout << "Triangle " << iF << " of face " << is; - if ( oriented) { - // cout << " doesn't need to be re-oriented" << endl; - face = meshDS->AddFace(nodes[v[2]], nodes[v[1]], nodes[v[0]]); - } - else { - // cout << " needs to be re-oriented" << endl; - face = meshDS->AddFace(nodes[v[0]], nodes[v[1]], nodes[v[2]]); - } - meshDS->SetMeshElementOnShape(face, topo_face); - } - } - } - delete nodes; + for(int it=1;it<=nq;it++) { + mesh_get_quadrangle_vertices(msh, it, vtx); + SMDS_MeshFace* quad = meshDS->AddFace(nodes[vtx[0]], nodes[vtx[1]], nodes[vtx[2]], nodes[vtx[3]]); + mesh_get_quadrangle_tag(msh, it, &tag); + meshDS->SetMeshElementOnShape(quad, TopoDS::Face(fmap(tag))); + if (tags[vtx[0]]) { + meshDS->SetNodeOnFace(nodes[vtx[0]], TopoDS::Face(fmap(tag))); + tags[vtx[0]] = false; + }; + if (tags[vtx[1]]) { + meshDS->SetNodeOnFace(nodes[vtx[1]], TopoDS::Face(fmap(tag))); + tags[vtx[1]] = false; + }; + if (tags[vtx[2]]) { + meshDS->SetNodeOnFace(nodes[vtx[2]], TopoDS::Face(fmap(tag))); + tags[vtx[2]] = false; + }; + if (tags[vtx[3]]) { + meshDS->SetNodeOnFace(nodes[vtx[3]], TopoDS::Face(fmap(tag))); + tags[vtx[3]] = false; + }; } - else { - cout << "decimesh is started" << endl; - system("decimesh"); - cout << "decimesh is finished" << endl; - - FILE* fic = fopen("x_h100.mesh", "r"); - char buf[200]; - do { - fscanf(fic, "%s\n", buf); - } - while (strcmp(buf, "Vertices")!=0); - int n_vtx; - fscanf(fic, "%d\n", &n_vtx); - cout << "number of vertices: " << n_vtx << endl; - - SMDS_MeshNode** nodes = new SMDS_MeshNode*[n_vtx+1]; - double coo_x, coo_y, coo_z; - for (int i=1; i<=n_vtx; i++) { - fscanf(fic, "%lf %lf %lf %*d\n", &coo_x, &coo_y, &coo_z); - nodes[i] = meshDS->AddNode(coo_x, coo_y, coo_z); - } - cout << "nodes are updated" << endl; - - fscanf(fic, "%*s\n"); - int n_tri, n1, n2, n3, iFace; - SMDS_MeshFace* face; - fscanf(fic, "%d\n", &n_tri); - cout << "number of triangles: " << n_tri << endl; - for (int i=0; iAddFace(nodes[n3], nodes[n2], nodes[n1]); - } - cout << "triangles are updated" << endl; - - char *keyWord; - fscanf(fic, "%s\n", keyWord); - cout << "keyWord : " << keyWord << endl; - int n_edges; - SMDS_MeshEdge* edge; - fscanf(fic, "%d\n", &n_edges); - cout << "number of edges: " << n_edges << endl; - for (int i=0; iAddEdge(nodes[n1], nodes[n2]); - //meshDS->SetMeshElementOnShape(edge, topo_edge); - } - cout << "edges are updated, and finished" << endl; - fscanf(fic, "%s\n", keyWord); cout << "keyWord : " << keyWord << endl; - fscanf(fic, "%s\n", keyWord); cout << "keyWord : " << keyWord << endl; - fscanf(fic, "%s\n", keyWord); cout << "keyWord : " << keyWord << endl; - fscanf(fic, "%s\n", keyWord); cout << "keyWord : " << keyWord << endl; - fscanf(fic, "%s\n", keyWord); cout << "keyWord : " << keyWord << endl; - fscanf(fic, "%s\n", keyWord); cout << "keyWord : " << keyWord << endl; + delete nodes; - int number = fscanf(fic, "%lf %lf %*lf\n", &coo_x, &coo_y); - cout << "coo_x : " << coo_x << endl; - cout << "coo_y : " << coo_y << endl; - cout << "number : " << number << endl; + /* release the mesh object */ + blsurf_data_regain_mesh(bls, msh); - fclose(fic); - } + /* clean up everything */ + blsurf_session_delete(bls); + cad_delete(c); + + context_delete(ctx); - bool b = mesh.end(); - return(b); + return true; } //============================================================================= @@ -431,3 +474,62 @@ istream & operator >> (istream & load, BLSURFPlugin_BLSURF & hyp) { return hyp.LoadFrom( load ); } + +status_t curv_fun(real t, real *uv, real *dt, real *dtt, void *user_data) +{ + const Geom2d_Curve*pargeo = (const Geom2d_Curve*) user_data; + + if (uv){ + gp_Pnt2d P; + P=pargeo->Value(t); + uv[0]=P.X(); uv[1]=P.Y(); + } + + if(dt) { + gp_Vec2d V1; + V1=pargeo->DN(t,1); + dt[0]=V1.X(); dt[1]=V1.Y(); + } + + if(dtt){ + gp_Vec2d V2; + V2=pargeo->DN(t,2); + dtt[0]=V2.X(); dtt[1]=V2.Y(); + } + + return 0; +} + +status_t surf_fun(real *uv, real *xyz, real*du, real *dv, + real *duu, real *duv, real *dvv, void *user_data) +{ + const Geom_Surface* geometry = (const Geom_Surface*) user_data; + + if(xyz){ + gp_Pnt P; + P=geometry->Value(uv[0],uv[1]); // S.D0(U,V,P); + xyz[0]=P.X(); xyz[1]=P.Y(); xyz[2]=P.Z(); + } + + if(du && dv){ + gp_Pnt P; + gp_Vec D1U,D1V; + + geometry->D1(uv[0],uv[1],P,D1U,D1V); + du[0]=D1U.X(); du[1]=D1U.Y(); du[2]=D1U.Z(); + dv[0]=D1V.X(); dv[1]=D1V.Y(); dv[2]=D1V.Z(); + } + + if(duu && duv && dvv){ + gp_Pnt P; + gp_Vec D1U,D1V; + gp_Vec D2U,D2V,D2UV; + + geometry->D2(uv[0],uv[1],P,D1U,D1V,D2U,D2V,D2UV); + duu[0]=D2U.X(); duu[1]=D2U.Y(); duu[2]=D2U.Z(); + duv[0]=D2UV.X(); duv[1]=D2UV.Y(); duv[2]=D2UV.Z(); + dvv[0]=D2V.X(); dvv[1]=D2V.Y(); dvv[2]=D2V.Z(); + } + + return 0; +} diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx index fbd9fd0..7ec8b22 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.hxx @@ -21,6 +21,7 @@ // // File : BLSURFPlugin_BLSURF.hxx // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA) +// & Aurelien ALLEAUME (DISTENE) // Date : 20/03/2006 // Project : SALOME //============================================================================= @@ -31,6 +32,9 @@ #include "SMESH_2D_Algo.hxx" #include "SMESH_Mesh.hxx" #include "Utils_SALOME_Exception.hxx" +extern "C"{ +#include "distene/api.h" +} class BLSURFPlugin_Hypothesis; @@ -44,7 +48,7 @@ class BLSURFPlugin_BLSURF: public SMESH_2D_Algo { const TopoDS_Shape& aShape, SMESH_Hypothesis::Hypothesis_Status& aStatus); - void SetParameters(const BLSURFPlugin_Hypothesis* hyp); + void SetParameters(const BLSURFPlugin_Hypothesis* hyp, blsurf_session_t *bls); virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape); @@ -57,6 +61,7 @@ class BLSURFPlugin_BLSURF: public SMESH_2D_Algo { const BLSURFPlugin_Hypothesis* _hypothesis; private: + int _topology; int _physicalMesh; double _phySize; int _geometricMesh; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx index df28210..02f5d0c 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx @@ -21,6 +21,7 @@ // // File : BLSURFPlugin_Hypothesis.cxx // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA) +// & Aurelien ALLEAUME (DISTENE) // Date : 28/03/2006 // Project : SALOME //============================================================================= @@ -37,6 +38,7 @@ using namespace std; BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId, SMESH_Gen * gen) : SMESH_Hypothesis(hypId, studyId, gen), + _topology(GetDefaultTopology()), _physicalMesh(GetDefaultPhysicalMesh()), _phySize(GetDefaultPhySize()), _geometricMesh(GetDefaultGeometricMesh()), @@ -49,6 +51,19 @@ BLSURFPlugin_Hypothesis::BLSURFPlugin_Hypothesis (int hypId, int studyId, _param_algo_dim = 2; } +//============================================================================= +/*! + * + */ +//============================================================================= +void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology) +{ + if (theTopology != _topology) { + _topology = theTopology; + NotifySubMeshesHypothesisModification(); + } +} + //============================================================================= /*! * @@ -263,6 +278,12 @@ bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* theMesh, return false; } +//============================================================================= +BLSURFPlugin_Hypothesis::Topology BLSURFPlugin_Hypothesis::GetDefaultTopology() +{ + return FromCAD; +} + //============================================================================= BLSURFPlugin_Hypothesis::PhysicalMesh BLSURFPlugin_Hypothesis::GetDefaultPhysicalMesh() { diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx index 89d1030..e0e0f3b 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx @@ -21,6 +21,7 @@ // // File : BLSURFPlugin_Hypothesis.hxx // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA) +// & Aurelien ALLEAUME (DISTENE) // Date : 27/03/2006 // Project : SALOME // $Header$ @@ -39,6 +40,12 @@ class BLSURFPlugin_Hypothesis: public SMESH_Hypothesis public: BLSURFPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen * gen); + enum Topology { + FromCAD, + Process, + Process2 + }; + enum PhysicalMesh { DefaultSize, PhysicalUserDefined @@ -49,6 +56,9 @@ public: UserDefined }; + void SetTopology(Topology theTopology); + Topology GetTopology() const { return _topology; } + void SetPhysicalMesh(PhysicalMesh thePhysicalMesh); PhysicalMesh GetPhysicalMesh() const { return _physicalMesh; } @@ -70,6 +80,7 @@ public: void SetDecimesh(bool theVal); bool GetDecimesh() const { return _decimesh; } + static Topology GetDefaultTopology(); static PhysicalMesh GetDefaultPhysicalMesh(); static double GetDefaultPhySize(); static GeometricMesh GetDefaultGeometricMesh(); @@ -93,6 +104,7 @@ public: virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape); private: + Topology _topology; PhysicalMesh _physicalMesh; double _phySize; GeometricMesh _geometricMesh; diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx index 873492b..32984aa 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx @@ -65,6 +65,37 @@ BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i() MESSAGE( "BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i" ); } +/*! + * BLSURFPlugin_Hypothesis_i::SetTopology + * + * Set topology + */ + +//============================================================================= +void BLSURFPlugin_Hypothesis_i::SetTopology (CORBA::Long theValue) +{ + // MESSAGE("BLSURFPlugin_Hypothesis_i::SetTopology"); + ASSERT(myBaseImpl); + this->GetImpl()->SetTopology((::BLSURFPlugin_Hypothesis::Topology)theValue); + SMESH::TPythonDump() << _this() << ".SetTopology( " << theValue << " )"; +} + +//============================================================================= +/*! + * BLSURFPlugin_Hypothesis_i::GetTopology + * + * Get Topology + */ +//============================================================================= +CORBA::Long BLSURFPlugin_Hypothesis_i::GetTopology() +{ + // MESSAGE("BLSURFPlugin_Hypothesis_i::GetTopology"); + ASSERT(myBaseImpl); + return this->GetImpl()->GetTopology(); +} + +//============================================================================= + //============================================================================= /*! * BLSURFPlugin_Hypothesis_i::SetPhysicalMesh diff --git a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx index 0f3c536..0df0f0d 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx +++ b/src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.hxx @@ -50,6 +50,9 @@ class BLSURFPlugin_Hypothesis_i: // Destructor virtual ~BLSURFPlugin_Hypothesis_i(); + void SetTopology(CORBA::Long theValue); + CORBA::Long GetTopology(); + void SetPhysicalMesh(CORBA::Long theValue); CORBA::Long GetPhysicalMesh(); diff --git a/src/BLSURFPlugin/Makefile.in b/src/BLSURFPlugin/Makefile.in index 8c179f4..d71f2d0 100644 --- a/src/BLSURFPlugin/Makefile.in +++ b/src/BLSURFPlugin/Makefile.in @@ -38,8 +38,7 @@ LIB_SRC = \ BLSURFPlugin_BLSURF_i.cxx \ BLSURFPlugin_Hypothesis.cxx \ BLSURFPlugin_Hypothesis_i.cxx \ - BLSURFPlugin_i.cxx \ - cad_occ.cxx + BLSURFPlugin_i.cxx LIB_SERVER_IDL = BLSURFPlugin_Algorithm.idl diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 5f3e0a9..3a41e48 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -47,6 +47,13 @@ #include #include +enum Topology { + FromCAD, + Process, + Process2 + }; + + enum PhysicalMesh { DefaultSize, @@ -96,6 +103,14 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() myName = new QLineEdit( GroupC1 ); } + new QLabel( tr( "BLSURF_TOPOLOGY" ), GroupC1 ); + myTopology = new QtxComboBox( GroupC1 ); + QStringList topologyTypes; + topologyTypes.append( QObject::tr( "BLSURF_TOPOLOGY_CAD" ) ); + topologyTypes.append( QObject::tr( "BLSURF_TOPOLOGY_PROCESS" ) ); + topologyTypes.append( QObject::tr( "BLSURF_TOPOLOGY_PROCESS2" ) ); + myTopology->insertStringList( topologyTypes ); + new QLabel( tr( "BLSURF_PHY_MESH" ), GroupC1 ); myPhysicalMesh = new QtxComboBox( GroupC1 ); QStringList physicalTypes; @@ -131,7 +146,7 @@ QFrame* BLSURFPluginGUI_HypothesisCreator::buildFrame() new QLabel( tr( "BLSURF_GRADATION" ), GroupC1 ); myGradation = new QtxDblSpinBox( GroupC1 ); myGradation->setMinValue( 1.1 ); - myGradation->setMaxValue( 1.5 ); + myGradation->setMaxValue( 2.5 ); myGradation->setLineStep( 0.1 ); // new QLabel( tr( "BLSURF_SEG_PER_RADIUS" ), GroupC1 ); @@ -159,6 +174,7 @@ void BLSURFPluginGUI_HypothesisCreator::retrieveParams() const if( myName ) myName->setText( data.myName ); + myTopology->setCurrentItem( data.myTopology ); myPhysicalMesh->setCurrentItem( data.myPhysicalMesh ); myPhySize->setValue( data.myPhySize ); myGeometricMesh->setCurrentItem( data.myGeometricMesh ); @@ -184,6 +200,7 @@ QString BLSURFPluginGUI_HypothesisCreator::storeParams() const storeParamsToHypo( data ); QString guiHyp; + guiHyp += tr("BLSURF_TOPOLOGY") + " = " + QString::number( data.myTopology ) + "; "; guiHyp += tr("BLSURF_PHY_MESH") + " = " + QString::number( data.myPhysicalMesh ) + "; "; guiHyp += tr("BLSURF_HPHYDEF") + " = " + QString::number( data.myPhySize ) + "; "; guiHyp += tr("BLSURF_GEOM_MESH") + " = " + QString::number( data.myGeometricMesh ) + "; "; @@ -205,6 +222,7 @@ bool BLSURFPluginGUI_HypothesisCreator::readParamsFromHypo( BlsurfHypothesisData HypothesisData* data = SMESH::GetHypothesisData( hypType() ); h_data.myName = isCreation() && data ? data->Label : ""; + h_data.myTopology = (int) h->GetTopology(); h_data.myPhysicalMesh = (int) h->GetPhysicalMesh(); h_data.myPhySize = h->GetPhySize(); h_data.myGeometricMesh = (int) h->GetGeometricMesh(); @@ -227,6 +245,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi if( isCreation() ) SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.latin1() ); + h->SetTopology( (int) h_data.myTopology ); h->SetPhysicalMesh( (int) h_data.myPhysicalMesh ); h->SetPhySize( h_data.myPhySize ); h->SetGeometricMesh( (int) h_data.myGeometricMesh ); @@ -251,6 +270,7 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi bool BLSURFPluginGUI_HypothesisCreator::readParamsFromWidgets( BlsurfHypothesisData& h_data ) const { h_data.myName = myName ? myName->text() : ""; + h_data.myTopology = myTopology->currentItem(); h_data.myPhysicalMesh = myPhysicalMesh->currentItem(); h_data.myPhySize = myPhySize->value(); h_data.myGeometricMesh = myGeometricMesh->currentItem(); diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h index 7a393ee..a5b596d 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.h +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.h @@ -22,6 +22,7 @@ // // File : BLSURFPluginGUI_HypothesisCreator.h // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA) +// & Aurelien ALLEAUME (DISTENE) // Module : BLSURFPlugin // $Header: @@ -37,6 +38,7 @@ class QLineEdit; typedef struct { + int myTopology; int myPhysicalMesh, myGeometricMesh; double myPhySize, myAngleMeshS, myGradation; bool myAllowQuadrangles, myDecimesh; @@ -79,6 +81,7 @@ private: private: QLineEdit* myName; + QtxComboBox* myTopology; QtxComboBox* myPhysicalMesh; QtxDblSpinBox* myPhySize; QtxComboBox* myGeometricMesh; diff --git a/src/GUI/BLSURFPlugin_msg_en.po b/src/GUI/BLSURFPlugin_msg_en.po index 0fe902b..9fd9f1d 100755 --- a/src/GUI/BLSURFPlugin_msg_en.po +++ b/src/GUI/BLSURFPlugin_msg_en.po @@ -23,6 +23,7 @@ // // File : BLSURFPlugin_msg_en.po // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA) +// & Aurelien ALLEAUME (DISTENE) // Date : 28/03/2006 // Project : SALOME //============================================================================= @@ -38,6 +39,18 @@ msgstr "" msgid "BLSURF_2D_HYPOTHESIS" msgstr "BLSURF 2D" +msgid "BLSURF_TOPOLOGY" +msgstr "Topology" + +msgid "BLSURF_TOPOLOGY_CAD" +msgstr "From CAD" + +msgid "BLSURF_TOPOLOGY_PROCESS" +msgstr "Pre-process" + +msgid "BLSURF_TOPOLOGY_PROCESS2" +msgstr "Pre-process++" + msgid "BLSURF_PHY_MESH" msgstr "Physical Mesh" @@ -66,10 +79,10 @@ msgid "BLSURF_GRADATION" msgstr "Gradation" msgid "BLSURF_DECIMESH" -msgstr "Decimesh" +msgstr "Patch independent" msgid "BLSURF_ALLOW_QUADRANGLES" -msgstr "Allow Quadrangles" +msgstr "Allow Quadrangles (Test)" msgid "BLSURF_2D_TITLE" msgstr "Hypothesis Construction" diff --git a/src/GUI/Makefile.in b/src/GUI/Makefile.in index 229ea57..885f073 100644 --- a/src/GUI/Makefile.in +++ b/src/GUI/Makefile.in @@ -66,8 +66,8 @@ CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) \ CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome \ -I${GEOM_ROOT_DIR}/include/salome -I${SMESH_ROOT_DIR}/include/salome -LDFLAGS += -lSMESH $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome \ - -L${GUI_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome \ - -L${SMESH_ROOT_DIR}/lib/salome +LDFLAGS += -lSMESH $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome \ + -L${GUI_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome -L${GEOM_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome \ + -L${SMESH_ROOT_DIR}/lib${LIB_LOCATION_SUFFIX}/salome @CONCLUDE@ -- 2.30.2