)
INSTALL(FILES ${BLSURFPLUGIN_RESOURCES_FILES} DESTINATION ${SALOME_BLSURFPLUGIN_INSTALL_RES_DATA})
+INSTALL(FILES SalomeApp.xml RENAME SalomeAppSL.xml DESTINATION ${SALOME_BLSURFPLUGIN_INSTALL_RES_DATA})
#include <fenv.h>
#endif
+#include <memory>
+#include <functional>
+
using namespace std;
/* ==================================
/* retrieve mesh data (see meshgems/mesh.h) */
integer nv, ne, nt, nq, vtx[4], tag, nb_tag;
- integer *evedg, *evtri, *evquad, *tags_buff, type;
+ integer type;
real xyz[3];
mesh_get_vertex_count (msh, &nv);
mesh_get_edge_count (msh, &ne);
mesh_get_triangle_count (msh, &nt);
mesh_get_quadrangle_count(msh, &nq);
-
- evedg = (integer *)mesh_calloc_generic_buffer(msh);
- evtri = (integer *)mesh_calloc_generic_buffer(msh);
- evquad = (integer *)mesh_calloc_generic_buffer(msh);
- tags_buff = (integer*)mesh_calloc_generic_buffer(msh);
+
+ using deleted_unique_ptr = std::unique_ptr<integer,std::function<void(integer*)>>;
+
+ deleted_unique_ptr evedg_var((integer *)mesh_calloc_generic_buffer(msh), [](integer *ptr) { free(ptr); });
+ deleted_unique_ptr evtri_var((integer *)mesh_calloc_generic_buffer(msh), [](integer *ptr) { free(ptr); });
+ deleted_unique_ptr evquad_var((integer *)mesh_calloc_generic_buffer(msh), [](integer *ptr) { free(ptr); });
+ deleted_unique_ptr tags_buff_var((integer*)mesh_calloc_generic_buffer(msh), [](integer *ptr) { free(ptr); });
+
+ integer *evedg(evedg_var.get()),*evtri(evtri_var.get()),*evquad(evquad_var.get()),*tags_buff(tags_buff_var.get());
std::vector<const SMDS_MeshNode*> nodes(nv+1);
std::vector<bool> tags(nv+1);
#include <SMESHDS_Group.hxx>
#include <SMESHDS_Mesh.hxx>
+#include <SMESH_BoostTxtArchive.hxx>
#include <SMESH_Gen_i.hxx>
#include <SMESH_Group.hxx>
#include <SMESH_TryCatch.hxx>
#define MESHGEMS_VERSION_HEX (MESHGEMS_VERSION_MAJOR << 16 | MESHGEMS_VERSION_MINOR << 8 | MESHGEMS_VERSION_PATCH)
#include <boost/archive/text_oarchive.hpp>
-#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/set.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/string.hpp>
std::string buffer;
if ( SMESHDS_Hypothesis::LoadStringFromStream( load, buffer ))
{
- std::istringstream istream( buffer.data() );
- boost::archive::text_iarchive archive( istream );
SMESH_TRY;
- archive >> _hyperPatchEntriesList;
+ SMESHUtils::BoostTxtArchive( buffer ) >> _hyperPatchEntriesList;
SMESH_CATCH( SMESH::printErrorInDebugMode );
}
buffer.clear();
if ( SMESHDS_Hypothesis::LoadStringFromStream( load, buffer ))
{
- std::istringstream istream( buffer.data() );
- boost::archive::text_iarchive archive( istream );
SMESH_TRY;
- archive >> _enforcedMeshes;
+ SMESHUtils::BoostTxtArchive( buffer ) >> _enforcedMeshes;
SMESH_CATCH( SMESH::printErrorInDebugMode );
}
enforcedMeshes.push_back({ meshID, partID, partType, inEM.groupName.in() });
}
+ if ( GetImpl()->GetEnforcedMeshes() == enforcedMeshes )
+ return;
+
this->GetImpl()->SetEnforcedMeshes( enforcedMeshes );
// dump
pyDump << "'" << inEM.groupName.in() << "'";
else
pyDump << "''";
- pyDump << ")" << ( i + 1 < theMeshes.length() ? ", " : "])");
+ pyDump << ")" << ( i + 1 < theMeshes.length() ? ", " : "");
}
+ pyDump << "])";
}
//=============================================================================
if (string(theGroupName).empty())
SMESH::TPythonDump() << _this() << ".AddEnforcedVertex(" << x << ", " << y << ", " << z << ")";
else
- SMESH::TPythonDump() << _this() << ".AddEnforcedVertexWithGroup(" << theFaceEntry << ", " << x << ", " << y << ", " << z << ", \"" << theGroupName << "\")";
+ SMESH::TPythonDump() << _this() << ".AddEnforcedVertexWithGroup(" << x << ", " << y << ", " << z << ", \"" << theGroupName << "\")";
}
else {
if (string(theGroupName).empty())
<rect>
<x>0</x>
<y>0</y>
- <width>899</width>
- <height>532</height>
+ <width>902</width>
+ <height>390</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>4</height>
+ <height>0</height>
</size>
</property>
</spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>36</height>
+ <height>0</height>
</size>
</property>
</spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>23</height>
+ <height>0</height>
</size>
</property>
</spacer>
</layout>
</widget>
</item>
- <item row="1" column="0">
+ <item row="0" column="2">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>BLSURF_ELEMENT_TYPE</string>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>3</height>
+ <height>0</height>
</size>
</property>
</spacer>
</layout>
</widget>
</item>
- <item row="1" column="1">
+ <item row="1" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>BLSURF_MAIN_PARAMETERS</string>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>55</height>
+ <height>0</height>
</size>
</property>
</spacer>
</layout>
</widget>
</item>
- <item row="2" column="0">
+ <item row="1" column="1">
<widget class="QGroupBox" name="groupBox_5">
<property name="toolTip">
<string/>
</item>
</layout>
<zorder>label_7</zorder>
- <zorder>myVolumeGradation_2</zorder>
<zorder>myNbSurfaceProximityLayers</zorder>
<zorder>label_9</zorder>
<zorder>mySurfaceProximityRatio</zorder>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>15</height>
+ <height>0</height>
</size>
</property>
</spacer>
</layout>
</widget>
</item>
- <item row="2" column="1">
+ <item row="1" column="2">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>BLSURF_OTHER_PARAMETERS</string>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
+ <property name="sizeType">
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>3</height>
+ <height>0</height>
</size>
</property>
</spacer>
<buttongroups>
<buttongroup name="myButtonGroupElementType"/>
</buttongroups>
-</ui>
+</ui>
\ No newline at end of file