_vectU(),
_vectV(),
_DMap(),
- _known(),
- _trial(),
- _type(0),
- _gridU(),
- _gridV(),
- _u1 (0.),
- _u2 (0.),
- _v1 (0.),
- _v2 (0.),
- _startSize(-1),
- _endSize(-1),
- _actionRadius(-1),
- _constantRadius(-1),
- _isMapBuilt(false),
- _isEmpty(false)
+ _known(),
+ _trial(),
+ _type(0),
+ _gridU(),
+ _gridV(),
+ _u1 (0.),
+ _u2 (0.),
+ _v1 (0.),
+ _v2 (0.),
+ _startSize(-1),
+ _endSize(-1),
+ _actionRadius(-1),
+ _constantRadius(-1),
+ _isMapBuilt(false),
+ _isEmpty(false)
{
_face = Face;
_attractorShape = Attractor;
-
+
init();
}
-bool BLSURFPlugin_Attractor::init(){
+bool BLSURFPlugin_Attractor::init()
+{
Standard_Real u0,v0;
int i,j,i0,j0 ;
_known.clear();
return true;
}
}
-
+
// Calculation of the bounds of the face
ShapeAnalysis::GetFaceUVBounds(_face,_u1,_u2,_v1,_v2);
for (j=0; j<=_gridV; j++){
_vectV.push_back(_v1+j*(_v2-_v1)/_gridV) ;
}
-
+
// Initialization of _DMap and _known
std::vector<double> temp(_gridV+1,std::numeric_limits<double>::infinity()); // Set distance of all "far" points to Infinity
for (i=0; i<=_gridU; i++){
gp_Pnt P = BRep_Tool::Pnt(aVertex);
GeomAPI_ProjectPointOnSurf projector( P, aSurf );
projector.LowerDistanceParameters(u0,v0);
- i0 = floor ( (u0 - _u1) * _gridU / (_u2 - _u1) + 0.5 );
- j0 = floor ( (v0 - _v1) * _gridV / (_v2 - _v1) + 0.5 );
+ i0 = int( floor ( (u0 - _u1) * _gridU / (_u2 - _u1) + 0.5 ));
+ j0 = int( floor ( (v0 - _v1) * _gridV / (_v2 - _v1) + 0.5 ));
TPnt[0]=0.; // Set the distance of the starting point to 0.
- TPnt[1]=i0;
- TPnt[2]=j0;
+ TPnt[1]=double( i0 );
+ TPnt[2]=double( j0 );
_DMap[i0][j0] = 0.;
_trial.insert(TPnt); // Move starting point to _trial
}
// check that i and j are inside the bounds of the grid to avoid out of bounds errors
// in affectation of the grid's vectors
-void BLSURFPlugin_Attractor::avoidOutOfBounds(int& i, int& j){
+void BLSURFPlugin_Attractor::avoidOutOfBounds(int& i, int& j)
+{
if (i > _gridU)
i = _gridU;
if (i < 0)
j = 0;
}
-void BLSURFPlugin_Attractor::edgeInit(Handle(Geom_Surface) theSurf, const TopoDS_Edge& anEdge){
+void BLSURFPlugin_Attractor::edgeInit(Handle(Geom_Surface) theSurf, const TopoDS_Edge& anEdge)
+{
gp_Pnt2d P2;
double first;
double last;
int N = 1200;
for (i=0; i<=N; i++){
P2 = aCurve2d->Value(first + i * (last-first) / N);
- i0 = floor( (P2.X() - _u1) * _gridU / (_u2 - _u1) + 0.5 );
- j0 = floor( (P2.Y() - _v1) * _gridV / (_v2 - _v1) + 0.5 );
+ i0 = int(floor( (P2.X() - _u1) * _gridU / (_u2 - _u1) + 0.5 ));
+ j0 = int(floor( (P2.Y() - _v1) * _gridV / (_v2 - _v1) + 0.5 ));
// Avoid out of bounds errors when the ends of the edge are outside the face
avoidOutOfBounds(i0, j0);
}
-void BLSURFPlugin_Attractor::SetParameters(double Start_Size, double End_Size, double Action_Radius, double Constant_Radius){
+void BLSURFPlugin_Attractor::SetParameters(double Start_Size, double End_Size, double Action_Radius, double Constant_Radius)
+{
_startSize = Start_Size;
_endSize = End_Size;
_actionRadius = Action_Radius;
return _attractorPnt.Distance( _plane->Value( u, v ));
}
-double BLSURFPlugin_Attractor::_distanceFromMap(double u, double v){
-
+double BLSURFPlugin_Attractor::_distanceFromMap(double u, double v)
+{
// MG-CADSurf seems to perform a linear interpolation so it's sufficient to give it a non-continuous distance map
- int i = floor ( (u - _u1) * _gridU / (_u2 - _u1) + 0.5 );
- int j = floor ( (v - _v1) * _gridV / (_v2 - _v1) + 0.5 );
+ int i = int(floor ( (u - _u1) * _gridU / (_u2 - _u1) + 0.5 ));
+ int j = int(floor ( (v - _v1) * _gridV / (_v2 - _v1) + 0.5 ));
// Avoid out of bounds errors in _DMap
avoidOutOfBounds(i, j);
}
-void BLSURFPlugin_Attractor::BuildMap() {
-
+void BLSURFPlugin_Attractor::BuildMap()
+{
MESSAGE("building the map");
- int i, j, k, n;
+ int i, j, k, n;
//int count = 0;
int ip, jp, kp, np;
int i0, j0;
// While there are points in "Trial" (representing a kind of advancing front), loop on them -----------------------------------------------------------
while (_trial.size() > 0 ) {
min = _trial.begin(); // Get trial point with min distance from start
- i0 = (*min)[1];
- j0 = (*min)[2];
+ i0 = int( (*min)[1] );
+ j0 = int( (*min)[2] );
// Avoid out of bounds errors in _known affectations
avoidOutOfBounds(i0, j0);
_known[i0][j0] = true; // Move it to "Known"
_trial.erase(min); // Remove it from "Trial"
// Loop on neighbours of the trial min --------------------------------------------------------------------------------------------------------------
- for (i=i0 - 1 ; i <= i0 + 1 ; i++){
- if (!aSurf->IsUPeriodic()){ // Periodic conditions in U
+ for (i=i0 - 1 ; i <= i0 + 1 ; i++){
+ if (!aSurf->IsUPeriodic()){ // Periodic conditions in U
if (i > _gridU ){
break; }
else if (i < 0){
i++; }
}
ip = (i + _gridU + 1) % (_gridU+1); // We get a periodic index :
- for (j=j0 - 1 ; j <= j0 + 1 ; j++){ // ip=modulo(i,N+2) so that i=-1->ip=N; i=0 -> ip=0 ; ... ; i=N+1 -> ip=0;
- if (!aSurf->IsVPeriodic()){ // Periodic conditions in V .
+ for (j=j0 - 1 ; j <= j0 + 1 ; j++){ // ip=modulo(i,N+2) so that i=-1->ip=N; i=0 -> ip=0 ; ... ; i=N+1 -> ip=0;
+ if (!aSurf->IsVPeriodic()){ // Periodic conditions in V .
if (j > _gridV ){
break; }
else if (j < 0){
}
}
jp = (j + _gridV + 1) % (_gridV+1);
-
+
if (!_known[ip][jp]){ // If the distance is not known yet
aSurf->D1(_vectU[ip],_vectV[jp],P,D1U,D1V); // Calculate the metric tensor at (i,j)
- // G(i,j) = | ||dS/du||**2 * |
+ // G(i,j) = | ||dS/du||**2 * |
// | <dS/du,dS/dv> ||dS/dv||**2 |
- Guu = D1U.X()*D1U.X() + D1U.Y()*D1U.Y() + D1U.Z()*D1U.Z(); // Guu = ||dS/du||**2
- Gvv = D1V.X()*D1V.X() + D1V.Y()*D1V.Y() + D1V.Z()*D1V.Z(); // Gvv = ||dS/dv||**2
- Guv = D1U.X()*D1V.X() + D1U.Y()*D1V.Y() + D1U.Z()*D1V.Z(); // Guv = Gvu = < dS/du,dS/dv >
- D_Ref = _DMap[ip][jp]; // Set a ref. distance of the point to its value in _DMap
+ Guu = D1U.X()*D1U.X() + D1U.Y()*D1U.Y() + D1U.Z()*D1U.Z(); // Guu = ||dS/du||**2
+ Gvv = D1V.X()*D1V.X() + D1V.Y()*D1V.Y() + D1V.Z()*D1V.Z(); // Gvv = ||dS/dv||**2
+ Guv = D1U.X()*D1V.X() + D1U.Y()*D1V.Y() + D1U.Z()*D1V.Z(); // Guv = Gvu = < dS/du,dS/dv >
+ D_Ref = _DMap[ip][jp]; // Set a ref. distance of the point to its value in _DMap
TPnt[0] = D_Ref; // (may be infinite or uncertain)
TPnt[1] = ip;
TPnt[2] = jp;
Dist_changed = false;
-
+
// Loop on neighbours to calculate the min distance from them ---------------------------------------------------------------------------------
for (k=i - 1 ; k <= i + 1 ; k++){
- if (!aSurf->IsUPeriodic()){ // Periodic conditions in U
+ if (!aSurf->IsUPeriodic()){ // Periodic conditions in U
if(k > _gridU ){
break;
}
k++; }
}
kp = (k + _gridU + 1) % (_gridU+1); // periodic index
- for (n=j - 1 ; n <= j + 1 ; n++){
- if (!aSurf->IsVPeriodic()){ // Periodic conditions in V
- if(n > _gridV){
+ for (n=j - 1 ; n <= j + 1 ; n++){
+ if (!aSurf->IsVPeriodic()){ // Periodic conditions in V
+ if(n > _gridV){
break;
}
else if (n < 0){
n++; }
}
- np = (n + _gridV + 1) % (_gridV+1);
+ np = (n + _gridV + 1) % (_gridV+1);
if (_known[kp][np]){ // If the distance of the neighbour is known
// Calculate the distance from (k,n)
du = (k-i) * (_u2 - _u1) / _gridU;
}
}
} // End of the loop on neighbours --------------------------------------------------------------------------------------------------------------
-
- if (Dist_changed) { // If distance has been updated, update _trial
+
+ if (Dist_changed) { // If distance has been updated, update _trial
found=_trial.find(TPnt);
if (found != _trial.end()){
_trial.erase(found); // Erase the point if it was already in _trial
//double tol = (( u2node.rbegin()->first - u2node.begin()->first ) / 20.) / u2node.size();
Standard_Real f,l;
BRep_Tool::Range( TopoDS::Edge( shape ), f,l );
- double tol = (( l - f ) / 10.) / u2node.size(); // 10. - adjusted for #17262
+ double tol = (( l - f ) / 10.) / double( u2node.size() ); // 10. - adjusted for #17262
std::multimap< double, const SMDS_MeshNode* >::iterator un2, un1;
for ( un2 = u2node.begin(), un1 = un2++; un2 != u2node.end(); un1 = un2++ )
if ( !n2nIt->second ) {
n->GetXYZ( xyz );
gp_XY uv = tmpHelper.GetNodeUV( _proxyFace, n );
- n2nIt->second = helper.AddNode( xyz[0], xyz[1], xyz[2], uv.X(), uv.Y() );
+ n2nIt->second = helper.AddNode( xyz[0], xyz[1], xyz[2], /*id=*/0, uv.X(), uv.Y() );
}
nodes[ nbN ] = n2nIt->second;
}
tmin = nodeDataVec.front().param;
tmax = nodeDataVec.back().param;
- existingPhySize += nodeData->Length() / ( nodeDataVec.size() - 1 );
+ existingPhySize += nodeData->Length() / double( nodeDataVec.size() - 1 );
}
else
{
if ( nodeData )
{
const std::vector<UVPtStruct>& nodeDataVec = nodeData->GetUVPtStruct();
- const int nbNodes = nodeDataVec.size();
+ const int nbNodes = (int) nodeDataVec.size();
dcad_edge_discretization_t *dedge;
dcad_get_edge_discretization(dcad, edg, &dedge);
{
// If no source points, call periodicity without transformation function
meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL;
- status = cad_add_face_multiple_periodicity_with_transformation_function(c, theFace1_ids_c, theFace1_ids.size(),
- theFace2_ids_c, theFace2_ids.size(), periodicity_transformation, NULL);
+ status = cad_add_face_multiple_periodicity_with_transformation_function
+ (c, theFace1_ids_c, (meshgems_integer) theFace1_ids.size(), theFace2_ids_c,
+ (meshgems_integer) theFace2_ids.size(), periodicity_transformation, NULL);
if(status != STATUS_OK)
cout << "cad_add_face_multiple_periodicity_with_transformation_function failed with error code " << status << "\n";
}
// get the transformation vertices
double* theSourceVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords[0];
double* theTargetVerticesCoords_c = &_preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords[0];
- int nbSourceVertices = _preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
- int nbTargetVertices = _preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
+ int nbSourceVertices = (int)_preCadFacesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
+ int nbTargetVertices = (int)_preCadFacesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
- status = cad_add_face_multiple_periodicity_with_transformation_function_by_points(c, theFace1_ids_c, theFace1_ids.size(),
- theFace2_ids_c, theFace2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
+ status = cad_add_face_multiple_periodicity_with_transformation_function_by_points
+ (c, theFace1_ids_c, (meshgems_integer) theFace1_ids.size(), theFace2_ids_c,
+ (meshgems_integer) theFace2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
if(status != STATUS_OK)
cout << "cad_add_face_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n";
}
{
// If no source points, call periodicity without transformation function
meshgems_cad_periodicity_transformation_t periodicity_transformation = NULL;
- status = cad_add_edge_multiple_periodicity_with_transformation_function(c, theEdge1_ids_c, theEdge1_ids.size(),
- theEdge2_ids_c, theEdge2_ids.size(), periodicity_transformation, NULL);
+ status = cad_add_edge_multiple_periodicity_with_transformation_function
+ (c, theEdge1_ids_c, (meshgems_integer) theEdge1_ids.size(), theEdge2_ids_c,
+ (meshgems_integer) theEdge2_ids.size(), periodicity_transformation, NULL);
if(status != STATUS_OK)
cout << "cad_add_edge_multiple_periodicity_with_transformation_function failed with error code " << status << "\n";
}
// get the transformation vertices
double* theSourceVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords[0];
double* theTargetVerticesCoords_c = &_preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords[0];
- int nbSourceVertices = _preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
- int nbTargetVertices = _preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
+ int nbSourceVertices = (int) _preCadEdgesIDsPeriodicityVector[i].theSourceVerticesCoords.size()/3;
+ int nbTargetVertices = (int) _preCadEdgesIDsPeriodicityVector[i].theTargetVerticesCoords.size()/3;
- status = cad_add_edge_multiple_periodicity_with_transformation_function_by_points(c, theEdge1_ids_c, theEdge1_ids.size(),
- theEdge2_ids_c, theEdge2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
+ status = cad_add_edge_multiple_periodicity_with_transformation_function_by_points
+ (c, theEdge1_ids_c, (meshgems_integer) theEdge1_ids.size(), theEdge2_ids_c,
+ (meshgems_integer) theEdge2_ids.size(), theSourceVerticesCoords_c, nbSourceVertices, theTargetVerticesCoords_c, nbTargetVertices);
if(status != STATUS_OK)
cout << "cad_add_edge_multiple_periodicity_with_transformation_function_by_points failed with error code " << status << "\n";
}
context_t *ctx = context_new();
if (!ctx) return error("Pb in context_new()");
+ if ( aMesh.NbNodes() > std::numeric_limits< meshgems_integer >::max() ||
+ aMesh.NbFaces() > std::numeric_limits< meshgems_integer >::max() )
+ return error("Too large input mesh");
+
BLSURF_Cleaner cleaner( ctx );
message_cb_user_data mcud;
// Fill an input mesh
mesh_t * msh = meshgems_mesh_new_in_memory( ctx );
- if ( !msh ) return error("Pb. in meshgems_mesh_new_in_memory()");
+ if ( !msh ) return error("Pb. in meshgems_mesh_new_in_memory()");
// mark nodes used by 2D elements
SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
const SMDS_MeshNode* n = nodeIt->next();
n->setIsMarked( n->NbInverseElements( SMDSAbs_Face ));
}
- meshgems_mesh_set_vertex_count( msh, meshDS->NbNodes() );
+ meshgems_mesh_set_vertex_count( msh, (meshgems_integer) meshDS->NbNodes() );
// set node coordinates
if ( meshDS->NbNodes() != meshDS->MaxNodeID() )
}
// set nodes of faces
- meshgems_mesh_set_triangle_count ( msh, meshDS->GetMeshInfo().NbTriangles() );
- meshgems_mesh_set_quadrangle_count( msh, meshDS->GetMeshInfo().NbQuadrangles() );
+ meshgems_mesh_set_triangle_count ( msh, (meshgems_integer) meshDS->GetMeshInfo().NbTriangles() );
+ meshgems_mesh_set_quadrangle_count( msh, (meshgems_integer) meshDS->GetMeshInfo().NbQuadrangles() );
meshgems_integer nodeIDs[4];
meshgems_integer iT = 1, iQ = 1;
SMDS_FaceIteratorPtr faceIt = meshDS->facesIterator();
if ( nbNodes > 4 || face->IsPoly() ) continue;
for ( i = 0; i < nbNodes; ++i )
- nodeIDs[i] = face->GetNode( i )->GetID();
+ nodeIDs[i] = (meshgems_integer) face->GetNode( i )->GetID();
if ( nbNodes == 3 )
meshgems_mesh_set_triangle_vertices ( msh, iT++, nodeIDs );
else
{
meshgems_mesh_get_vertex_coordinates( omsh, i, xyz );
SMDS_MeshNode* n = meshDS->AddNode( xyz[0], xyz[1], xyz[2] );
- nodeID = n->GetID();
+ nodeID = (meshgems_integer) n->GetID();
meshgems_mesh_set_vertex_tag( omsh, i, &nodeID ); // save mapping of IDs in MG and SALOME meshes
}
err.find("periodicity") != string::npos )
{
// remove ^A from the tail
- int len = strlen( desc );
+ size_t len = strlen( desc );
while (len > 0 && desc[len-1] != '\n')
len--;
mcud->_error->append( desc, len );
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh) {
+void BLSURFPlugin_Hypothesis::SetPhysicalMesh(PhysicalMesh thePhysicalMesh)
+{
if (thePhysicalMesh != _physicalMesh) {
_physicalMesh = thePhysicalMesh;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh) {
+void BLSURFPlugin_Hypothesis::SetGeometricMesh(GeometricMesh theGeometricMesh)
+{
if (theGeometricMesh != _geometricMesh) {
_geometricMesh = theGeometricMesh;
// switch (_geometricMesh) {
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetPhySize(double theVal, bool isRelative) {
+void BLSURFPlugin_Hypothesis::SetPhySize(double theVal, bool isRelative)
+{
if ((theVal != _phySize) || (isRelative != _phySizeRel)) {
_phySizeRel = isRelative;
if (theVal == 0) {
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetMinSize(double theMinSize, bool isRelative) {
+void BLSURFPlugin_Hypothesis::SetMinSize(double theMinSize, bool isRelative)
+{
if ((theMinSize != _minSize) || (isRelative != _minSizeRel)) {
_minSizeRel = isRelative;
_minSize = theMinSize;
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetMaxSize(double theMaxSize, bool isRelative) {
+void BLSURFPlugin_Hypothesis::SetMaxSize(double theMaxSize, bool isRelative)
+{
if ((theMaxSize != _maxSize) || (isRelative != _maxSizeRel)) {
_maxSizeRel = isRelative;
_maxSize = theMaxSize;
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetUseGradation(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetUseGradation(bool theVal)
+{
if (theVal != _useGradation) {
_useGradation = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetGradation(double theVal) {
+void BLSURFPlugin_Hypothesis::SetGradation(double theVal)
+{
_useGradation = ( theVal > 0 );
if (theVal != _gradation) {
_gradation = theVal;
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetUseVolumeGradation(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetUseVolumeGradation(bool theVal)
+{
if (theVal != _useVolumeGradation) {
_useVolumeGradation = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal) {
+void BLSURFPlugin_Hypothesis::SetVolumeGradation(double theVal)
+{
_useVolumeGradation = ( theVal > 0 );
if (theVal != _volumeGradation) {
_volumeGradation = theVal;
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetElementType(ElementType theElementType) {
+void BLSURFPlugin_Hypothesis::SetElementType(ElementType theElementType)
+{
if (theElementType != _elementType) {
_elementType = theElementType;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetAngleMesh(double theVal) {
+void BLSURFPlugin_Hypothesis::SetAngleMesh(double theVal)
+{
if (theVal != _angleMesh) {
_angleMesh = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetChordalError(double theDistance) {
+void BLSURFPlugin_Hypothesis::SetChordalError(double theDistance)
+{
if (theDistance != _chordalError) {
_chordalError = theDistance;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetAnisotropic(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetAnisotropic(bool theVal)
+{
if (theVal != _anisotropic) {
_anisotropic = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetAnisotropicRatio(double theVal) {
+void BLSURFPlugin_Hypothesis::SetAnisotropicRatio(double theVal)
+{
if (theVal != _anisotropicRatio) {
_anisotropicRatio = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetRemoveTinyEdges(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetRemoveTinyEdges(bool theVal)
+{
if (theVal != _removeTinyEdges) {
_removeTinyEdges = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetTinyEdgeLength(double theVal) {
+void BLSURFPlugin_Hypothesis::SetTinyEdgeLength(double theVal)
+{
if (theVal != _tinyEdgeLength) {
_tinyEdgeLength = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetOptimiseTinyEdges(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetOptimiseTinyEdges(bool theVal)
+{
if (theVal != _optimiseTinyEdges) {
_optimiseTinyEdges = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetTinyEdgeOptimisationLength(double theVal) {
+void BLSURFPlugin_Hypothesis::SetTinyEdgeOptimisationLength(double theVal)
+{
if (theVal != _tinyEdgeOptimisationLength) {
_tinyEdgeOptimisationLength = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersection(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersection(bool theVal)
+{
if (theVal != _correctSurfaceIntersec) {
_correctSurfaceIntersec = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersectionMaxCost(double theVal) {
+void BLSURFPlugin_Hypothesis::SetCorrectSurfaceIntersectionMaxCost(double theVal)
+{
if (theVal != _corrSurfaceIntersCost) {
_corrSurfaceIntersCost = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetBadElementRemoval(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetBadElementRemoval(bool theVal)
+{
if (theVal != _badElementRemoval) {
_badElementRemoval = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetBadElementAspectRatio(double theVal) {
+void BLSURFPlugin_Hypothesis::SetBadElementAspectRatio(double theVal)
+{
if (theVal != _badElementAspectRatio) {
_badElementAspectRatio = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetOptimizeMesh(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetOptimizeMesh(bool theVal)
+{
if (theVal != _optimizeMesh) {
_optimizeMesh = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetQuadraticMesh(bool theVal) {
+void BLSURFPlugin_Hypothesis::SetQuadraticMesh(bool theVal)
+{
if (theVal != _quadraticMesh) {
_quadraticMesh = theVal;
NotifySubMeshesHypothesisModification();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology) {
+void BLSURFPlugin_Hypothesis::SetTopology(Topology theTopology)
+{
if (theTopology != _topology) {
_topology = theTopology;
NotifySubMeshesHypothesisModification();
_hyperPatchList[ *iPatch ].clear();
}
if ( iPatches.size() > 1 )
- for ( int j = _hyperPatchList.size()-1; j > 0; --j )
+ for ( int j = (int) _hyperPatchList.size()-1; j > 0; --j )
if ( _hyperPatchList[j].empty() )
_hyperPatchList.erase( _hyperPatchList.begin() + j );
}
for ( size_t i = 0; i < hpl.size(); ++i )
if ( hpl[i].count( faceTag ))
{
- if ( iPatch ) *iPatch = i;
+ if ( iPatch ) *iPatch = (int) i;
return *( hpl[i].begin() );
}
}
// strip white spaces
while (ptr[0] == ' ')
ptr++;
- int i = strlen(ptr);
+ size_t i = strlen(ptr);
while (i != 0 && ptr[i - 1] == ' ')
i--;
// check value type
// strip white spaces
while (ptr[0] == ' ')
ptr++;
- int i = strlen(ptr);
+ size_t i = strlen(ptr);
while (i != 0 && ptr[i - 1] == ' ')
i--;
// check value type
BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByFace(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetAllEnforcedVerticesByFace() : GetDefaultFaceEntryEnfVertexListMap();
}
}
BLSURFPlugin_Hypothesis::TEnfVertexList BLSURFPlugin_Hypothesis::GetAllEnforcedVertices(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetAllEnforcedVertices() : GetDefaultEnfVertexList();
}
BLSURFPlugin_Hypothesis::TFaceEntryCoordsListMap BLSURFPlugin_Hypothesis::GetAllCoordsByFace(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetAllCoordsByFace() : GetDefaultFaceEntryCoordsListMap();
}
BLSURFPlugin_Hypothesis::TCoordsEnfVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByCoords(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetAllEnforcedVerticesByCoords() : GetDefaultCoordsEnfVertexMap();
}
BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexEntryListMap BLSURFPlugin_Hypothesis::GetAllEnfVertexEntriesByFace(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetAllEnfVertexEntriesByFace() : GetDefaultFaceEntryEnfVertexEntryListMap();
}
BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap BLSURFPlugin_Hypothesis::GetAllEnforcedVerticesByEnfVertexEntry(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetAllEnforcedVerticesByEnfVertexEntry() : GetDefaultEnfVertexEntryEnfVertexMap();
}
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFaces(bool toEnforceInternalVertices) {
+void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFaces(bool toEnforceInternalVertices)
+{
if (toEnforceInternalVertices != _enforcedInternalVerticesAllFaces) {
_enforcedInternalVerticesAllFaces = toEnforceInternalVertices;
if (toEnforceInternalVertices)
//=============================================================================
-void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFacesGroup(BLSURFPlugin_Hypothesis::TEnfGroupName theGroupName) {
+void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFacesGroup(BLSURFPlugin_Hypothesis::TEnfGroupName theGroupName)
+{
if (std::string(theGroupName) != std::string(_enforcedInternalVerticesAllFacesGroup)) {
_enforcedInternalVerticesAllFacesGroup = theGroupName;
NotifySubMeshesHypothesisModification();
//=============================================================================
BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector BLSURFPlugin_Hypothesis::GetPreCadFacesPeriodicityVector(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetPreCadFacesPeriodicityVector() : GetDefaultPreCadFacesPeriodicityVector();
}
//=============================================================================
BLSURFPlugin_Hypothesis::TPreCadPeriodicityVector BLSURFPlugin_Hypothesis::GetPreCadEdgesPeriodicityVector(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetPreCadEdgesPeriodicityVector() : GetDefaultPreCadEdgesPeriodicityVector();
}
//=============================================================================
BLSURFPlugin_Hypothesis::TFacesPeriodicityVector BLSURFPlugin_Hypothesis::GetFacesPeriodicityVector(
- const BLSURFPlugin_Hypothesis* hyp) {
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetFacesPeriodicityVector() : GetDefaultFacesPeriodicityVector();
}
//=============================================================================
BLSURFPlugin_Hypothesis::TEdgesPeriodicityVector BLSURFPlugin_Hypothesis::GetEdgesPeriodicityVector(
- const BLSURFPlugin_Hypothesis* hyp){
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetEdgesPeriodicityVector() : GetDefaultEdgesPeriodicityVector();
}
//=============================================================================
BLSURFPlugin_Hypothesis::TVerticesPeriodicityVector BLSURFPlugin_Hypothesis::GetVerticesPeriodicityVector(
- const BLSURFPlugin_Hypothesis* hyp){
+ const BLSURFPlugin_Hypothesis* hyp)
+{
return hyp ? hyp->_GetVerticesPeriodicityVector() : GetDefaultVerticesPeriodicityVector();
}
//=======================================================================
//function : ClearAllEnforcedVertices
//=======================================================================
-void BLSURFPlugin_Hypothesis::ClearPreCadPeriodicityVectors() {
+void BLSURFPlugin_Hypothesis::ClearPreCadPeriodicityVectors()
+{
_preCadFacesPeriodicityVector.clear();
_preCadEdgesPeriodicityVector.clear();
NotifySubMeshesHypothesisModification();
//function : AddPreCadFacesPeriodicity
//=======================================================================
void BLSURFPlugin_Hypothesis::AddPreCadFacesPeriodicity(TEntry theFace1Entry, TEntry theFace2Entry,
- std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries) {
+ std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries)
+{
TPreCadPeriodicity preCadFacesPeriodicity;
preCadFacesPeriodicity.shape1Entry = theFace1Entry;
//function : AddPreCadEdgesPeriodicity
//=======================================================================
void BLSURFPlugin_Hypothesis::AddPreCadEdgesPeriodicity(TEntry theEdge1Entry, TEntry theEdge2Entry,
- std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries) {
-
+ std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries)
+{
TPreCadPeriodicity preCadEdgesPeriodicity;
preCadEdgesPeriodicity.shape1Entry = theEdge1Entry;
preCadEdgesPeriodicity.shape2Entry = theEdge2Entry;
return save;
}
-void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save){
-
+void BLSURFPlugin_Hypothesis::SaveFacesPeriodicity(std::ostream & save)
+{
TFacesPeriodicityVector::const_iterator it_faces_periodicity = _facesPeriodicityVector.begin();
if (it_faces_periodicity != _facesPeriodicityVector.end()) {
save << " " << "__FACES_PERIODICITY_BEGIN__";
}
}
-void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save){
-
+void BLSURFPlugin_Hypothesis::SaveEdgesPeriodicity(std::ostream & save)
+{
TEdgesPeriodicityVector::const_iterator it_edges_periodicity = _edgesPeriodicityVector.begin();
if (it_edges_periodicity != _edgesPeriodicityVector.end()) {
save << " " << "__EDGES_PERIODICITY_BEGIN__";
}
}
-void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save){
-
+void BLSURFPlugin_Hypothesis::SaveVerticesPeriodicity(std::ostream & save)
+{
TVerticesPeriodicityVector::const_iterator it_vertices_periodicity = _verticesPeriodicityVector.begin();
if (it_vertices_periodicity != _verticesPeriodicityVector.end()) {
save << " " << "__VERTICES_PERIODICITY_BEGIN__";
}
}
-void BLSURFPlugin_Hypothesis::SavePreCADPeriodicity(std::ostream & save, const char* shapeType) {
+void BLSURFPlugin_Hypothesis::SavePreCADPeriodicity(std::ostream & save, const char* shapeType)
+{
TPreCadPeriodicityVector precad_periodicity;
if ( shapeType && strcmp( shapeType, "FACES" ) == 0 )
precad_periodicity = _preCadFacesPeriodicityVector;
) {
std::string & value = _option2value[optName];
value = optValue;
- int len = value.size();
+ int len = (int) value.size();
// continue reading until "%#" encountered
while (value[len - 1] != '#' || value[len - 2] != '%') {
isOK = static_cast<bool>(load >> optValue);
if (isOK) {
value += " ";
value += optValue;
- len = value.size();
+ len = (int) value.size();
} else {
break;
}
}
if (isOK) {
std::string& value = optValue;
- int len = value.size();
+ int len = (int) value.size();
// continue reading until "%#" encountered
while (value[len - 1] != '#' || value[len - 2] != '%') {
isOK = static_cast<bool>(load >> optValue);
if (isOK) {
value += " ";
value += optValue;
- len = value.size();
+ len = (int) value.size();
} else {
break;
}
if (isOK) {
std::string & value = _preCADoption2value[optName];
value = optValue;
- int len = value.size();
+ int len = (int) value.size();
// continue reading until "%#" encountered
while (value[len - 1] != '#' || value[len - 2] != '%') {
isOK = static_cast<bool>(load >> optValue);
if (isOK) {
value += " ";
value += optValue;
- len = value.size();
+ len = (int) value.size();
} else {
break;
}
if (isOK) {
std::string & value2 = _sizeMap[smEntry];
value2 = smValue;
- int len2 = value2.size();
+ int len2 = (int) value2.size();
// continue reading until "%#" encountered
while (value2[len2 - 1] != '#' || value2[len2 - 2] != '%') {
isOK = static_cast<bool>(load >> smValue);
if (isOK) {
value2 += " ";
value2 += smValue;
- len2 = value2.size();
+ len2 = (int) value2.size();
} else {
break;
}
if (isOK) {
std::string & value3 = _attractors[atEntry];
value3 = atValue;
- int len3 = value3.size();
+ int len3 = (int) value3.size();
// continue reading until "%#" encountered
while (value3[len3 - 1] != '#' || value3[len3 - 2] != '%') {
isOK = static_cast<bool>(load >> atValue);
if (isOK) {
value3 += " ";
value3 += atValue;
- len3 = value3.size();
+ len3 = (int) value3.size();
} else {
break;
}
return load;
}
-void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load){
-
+void BLSURFPlugin_Hypothesis::LoadFacesPeriodicity(std::istream & load)
+{
bool isOK = true;
std::string periodicitySeparator;
}
-void BLSURFPlugin_Hypothesis::LoadEdgesPeriodicity(std::istream & load){
-
+void BLSURFPlugin_Hypothesis::LoadEdgesPeriodicity(std::istream & load)
+{
bool isOK = true;
std::string periodicitySeparator;
}
}
-void BLSURFPlugin_Hypothesis::LoadPreCADPeriodicity(std::istream & load, const char* shapeType) {
-
+void BLSURFPlugin_Hypothesis::LoadPreCADPeriodicity(std::istream & load, const char* shapeType)
+{
bool isOK = true;
std::string periodicitySeparator;
*/
//================================================================================
-bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, const TopoDS_Shape& /*theShape*/) {
+bool BLSURFPlugin_Hypothesis::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/, const TopoDS_Shape& /*theShape*/)
+{
return false;
}
*/
//================================================================================
-double BLSURFPlugin_Hypothesis::GetDefaultPhySize(double diagonal, double bbSegmentation) {
+double BLSURFPlugin_Hypothesis::GetDefaultPhySize(double diagonal, double bbSegmentation)
+{
if (bbSegmentation != 0 && diagonal != 0)
return diagonal / bbSegmentation ;
return 10;
*/
//================================================================================
-double BLSURFPlugin_Hypothesis::GetDefaultMinSize(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultMinSize(double diagonal)
+{
if (diagonal != 0)
return diagonal / 1000.0 ;
return undefinedDouble();
*/
//================================================================================
-double BLSURFPlugin_Hypothesis::GetDefaultMaxSize(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultMaxSize(double diagonal)
+{
if (diagonal != 0)
return diagonal / 5.0 ;
return undefinedDouble();
*/
//================================================================================
-double BLSURFPlugin_Hypothesis::GetDefaultChordalError(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultChordalError(double diagonal)
+{
if (diagonal != 0)
return diagonal;
return undefinedDouble();
*/
//================================================================================
-double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeLength(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeLength(double diagonal)
+{
if (diagonal != 0)
return diagonal * 1e-6 ;
return undefinedDouble();
*/
//================================================================================
-double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeOptimisationLength(double diagonal) {
+double BLSURFPlugin_Hypothesis::GetDefaultTinyEdgeOptimisationLength(double diagonal)
+{
if (diagonal != 0)
return diagonal * 1e-6 ;
return undefinedDouble();
if ( isOk ) *isOk = true;
for ( size_t i = 0; i <= s.size(); ++i )
- s[i] = tolower( s[i] );
+ s[i] = (char) tolower( s[i] );
if ( s == "1" || s == "true" || s == "active" || s == "yes" )
return true;
CORBA::Short BLSURFPlugin_Hypothesis_i::GetNbSurfaceProximityLayers()
{
- return this->GetImpl()->GetNbSurfaceProximityLayers();
+ return (CORBA::Short) this->GetImpl()->GetNbSurfaceProximityLayers();
}
//=============================================================================
CORBA::Short BLSURFPlugin_Hypothesis_i::GetNbVolumeProximityLayers()
{
- return this->GetImpl()->GetNbVolumeProximityLayers();
+ return (CORBA::Short) this->GetImpl()->GetNbVolumeProximityLayers();
}
//=============================================================================
::BLSURFPlugin_Hypothesis::THyperPatchList patchList( hpl.length() );
SMESH_Comment hplDump;
hplDump << "[";
- for ( size_t i = 0; i < patchList.size(); ++i )
+ for ( CORBA::ULong i = 0; i < patchList.size(); ++i )
{
hplDump << "[ ";
BLSURFPlugin::THyperPatch tags = hpl[ i ];
::BLSURFPlugin_Hypothesis::THyperPatchEntriesList patchList( hpe.length() );
SMESH_Comment hpeDump;
hpeDump << "[";
- for ( size_t i = 0; i < patchList.size(); ++i )
+ for ( CORBA::ULong i = 0; i < patchList.size(); ++i )
{
hpeDump << "[ ";
const BLSURFPlugin::THyperPatchEntries& entryList = hpe[ i ];
{
BLSURFPlugin::THyperPatchEntriesList patchList;
patchList.length( hpsl.length() );
- for ( size_t i = 0; i < hpsl.length(); ++i )
+ for ( CORBA::ULong i = 0; i < hpsl.length(); ++i )
{
const GEOM::ListOfGO& shapeList = hpsl[ i ];
BLSURFPlugin::THyperPatchEntries& entryList = patchList[ i ];
GetImpl()->SetHyperPatchIDsByEntry( S, entryToShape );
}
}
- resHpl->length( hpl.size() );
+ resHpl->length((CORBA::ULong) hpl.size() );
::BLSURFPlugin_Hypothesis::THyperPatchList::const_iterator hpIt = hpl.begin();
for ( int i = 0; hpIt != hpl.end(); ++hpIt, ++i )
{
const ::BLSURFPlugin_Hypothesis::THyperPatchTags& hp = *hpIt;
BLSURFPlugin::THyperPatch& resHp = (*resHpl)[ i ];
- resHp.length( hp.size() );
+ resHp.length((CORBA::ULong) hp.size() );
::BLSURFPlugin_Hypothesis::THyperPatchTags::const_iterator tag = hp.begin();
for ( int j = 0; tag != hp.end(); ++tag, ++j )
{
const ::BLSURFPlugin_Hypothesis::THyperPatchEntriesList& hpel = GetImpl()->GetHyperPatchEntries();
BLSURFPlugin::THyperPatchEntriesList* resHpl = new BLSURFPlugin::THyperPatchEntriesList();
- resHpl->length( hpel.size() );
+ resHpl->length((CORBA::ULong) hpel.size() );
::BLSURFPlugin_Hypothesis::THyperPatchEntriesList::const_iterator hpIt = hpel.begin();
for ( int i = 0; hpIt != hpel.end(); ++hpIt, ++i )
{
const ::BLSURFPlugin_Hypothesis::THyperPatchEntries& hp = *hpIt;
BLSURFPlugin::THyperPatchEntries& resHp = (*resHpl)[ i ];
- resHp.length( hp.size() );
+ resHp.length((CORBA::ULong) hp.size() );
::BLSURFPlugin_Hypothesis::THyperPatchEntries::const_iterator entry = hp.begin();
for ( int j = 0; entry != hp.end(); ++entry, ++j )
SetVolumeProximityRatio( GetImpl()->ToDbl( optionValue ));
else if ( name == "prox_nb_layer" )
- SetNbVolumeProximityLayers( GetImpl()->ToInt( optionValue ));
+ SetNbVolumeProximityLayers((CORBA::Short) GetImpl()->ToInt( optionValue ));
// advanced options (for backward compatibility)
BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
const ::BLSURFPlugin_Hypothesis::TOptionValues & opts = this->GetImpl()->GetOptionValues();
- result->length(opts.size());
+ result->length((CORBA::ULong) opts.size());
int i=0;
bool isDefault;
BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
const ::BLSURFPlugin_Hypothesis::TOptionValues & opts = this->GetImpl()->GetPreCADOptionValues();
- result->length(opts.size());
+ result->length((CORBA::ULong) opts.size());
int i=0;
bool isDefault;
BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
const ::BLSURFPlugin_Hypothesis::TOptionValues & custom_opts = this->GetImpl()->GetCustomOptionValues();
- result->length(custom_opts.size());
+ result->length((CORBA::ULong) custom_opts.size());
int i=0;
::BLSURFPlugin_Hypothesis::TOptionValues::const_iterator opIt = custom_opts.begin();
SetVolumeProximityRatio( GetImpl()->ToDbl( optionValue ));
else if ( name == "prox_nb_layer" )
- SetNbVolumeProximityLayers( GetImpl()->ToInt( optionValue ));
+ SetNbVolumeProximityLayers( (CORBA::Short) GetImpl()->ToInt( optionValue ));
}
bool valueChanged = (this->GetImpl()->GetOption(optionName) != optionValue);
if (valueChanged) {
BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
const ::BLSURFPlugin_Hypothesis::TSizeMap sizeMaps = this->GetImpl()->_GetSizeMapEntries();
- result->length(sizeMaps.size());
+ result->length((CORBA::ULong) sizeMaps.size());
::BLSURFPlugin_Hypothesis::TSizeMap::const_iterator smIt = sizeMaps.begin();
for (int i = 0; smIt != sizeMaps.end(); ++smIt, ++i) {
BLSURFPlugin::string_array_var result = new BLSURFPlugin::string_array();
const ::BLSURFPlugin_Hypothesis::TSizeMap attractors = this->GetImpl()->_GetAttractorEntries();
- result->length(attractors.size());
+ result->length((CORBA::ULong) attractors.size());
::BLSURFPlugin_Hypothesis::TSizeMap::const_iterator atIt = attractors.begin();
for (int i = 0; atIt != attractors.end(); ++atIt, ++i) {
BLSURFPlugin::TAttParamsMap_var result = new BLSURFPlugin::TAttParamsMap();
const ::BLSURFPlugin_Hypothesis::TAttractorMap attractors= this->GetImpl()->_GetClassAttractorEntries();
- result->length( attractors.size() );
+ result->length((CORBA::ULong) attractors.size() );
::BLSURFPlugin_Hypothesis::TAttractorMap::const_iterator atIt = attractors.begin();
for ( int i = 0 ; atIt != attractors.end(); ++atIt, ++i ) {
const ::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap faceEntryEnfVertexListMap =
this->GetImpl()->_GetAllEnforcedVerticesByFace();
- resultMap->length(faceEntryEnfVertexListMap.size());
+ resultMap->length((CORBA::ULong) faceEntryEnfVertexListMap.size());
::BLSURFPlugin_Hypothesis::TEnfVertexList _enfVertexList;
::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexListMap::const_iterator it_entry = faceEntryEnfVertexListMap.begin();
_enfVertexList = it_entry->second;
BLSURFPlugin::TEnfVertexList_var enfVertexList = new BLSURFPlugin::TEnfVertexList();
- enfVertexList->length(_enfVertexList.size());
+ enfVertexList->length((CORBA::ULong) _enfVertexList.size());
::BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator it_enfVertex = _enfVertexList.begin();
::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
- coords->length(currentEnfVertex->coords.size());
+ coords->length((CORBA::ULong) currentEnfVertex->coords.size());
for (CORBA::ULong i=0;i<coords->length();i++)
coords[i] = currentEnfVertex->coords[i];
enfVertex->coords = coords;
// Face entry list
BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
- faceEntryList->length(currentEnfVertex->faceEntries.size());
+ faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
ASSERT(myBaseImpl);
BLSURFPlugin::TEnfVertexList_var resultMap = new BLSURFPlugin::TEnfVertexList();
const ::BLSURFPlugin_Hypothesis::TEnfVertexList enfVertexList = this->GetImpl()->_GetAllEnforcedVertices();
- resultMap->length(enfVertexList.size());
+ resultMap->length((CORBA::ULong) enfVertexList.size());
::BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator evlIt = enfVertexList.begin();
::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
enfVertex->geomEntry = CORBA::string_dup(currentEnfVertex->geomEntry.c_str());
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
- coords->length(currentEnfVertex->coords.size());
+ coords->length((CORBA::ULong) currentEnfVertex->coords.size());
for (CORBA::ULong ind = 0; ind < coords->length(); ind++)
coords[ind] = currentEnfVertex->coords[ind];
enfVertex->coords = coords;
enfVertex->grpName = CORBA::string_dup(currentEnfVertex->grpName.c_str());
// Face entry list
BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
- faceEntryList->length(currentEnfVertex->faceEntries.size());
+ faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
BLSURFPlugin::TFaceEntryCoordsListMap_var resultMap = new BLSURFPlugin::TFaceEntryCoordsListMap();
const ::BLSURFPlugin_Hypothesis::TFaceEntryCoordsListMap entryCoordsListMap = this->GetImpl()->_GetAllCoordsByFace();
- resultMap->length(entryCoordsListMap.size());
+ resultMap->length((CORBA::ULong) entryCoordsListMap.size());
::BLSURFPlugin_Hypothesis::TEnfVertexCoordsList _coordsList;
::BLSURFPlugin_Hypothesis::TFaceEntryCoordsListMap::const_iterator it_entry = entryCoordsListMap.begin();
_coordsList = it_entry->second;
BLSURFPlugin::TEnfVertexCoordsList_var coordsList = new BLSURFPlugin::TEnfVertexCoordsList();
- coordsList->length(_coordsList.size());
+ coordsList->length((CORBA::ULong) _coordsList.size());
::BLSURFPlugin_Hypothesis::TEnfVertexCoordsList::const_iterator it_coords = _coordsList.begin();
for (int j = 0; it_coords != _coordsList.end(); ++it_coords, ++j) {
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
- coords->length((*it_coords).size());
+ coords->length((CORBA::ULong) (*it_coords).size());
for (CORBA::ULong i=0;i<coords->length();i++)
coords[i] = (*it_coords)[i];
coordsList[j] = coords;
BLSURFPlugin::TCoordsEnfVertexMap_var resultMap = new BLSURFPlugin::TCoordsEnfVertexMap();
const ::BLSURFPlugin_Hypothesis::TCoordsEnfVertexMap coordsEnfVertexMap =
this->GetImpl()->_GetAllEnforcedVerticesByCoords();
- resultMap->length(coordsEnfVertexMap.size());
+ resultMap->length((CORBA::ULong) coordsEnfVertexMap.size());
::BLSURFPlugin_Hypothesis::TCoordsEnfVertexMap::const_iterator it_coords = coordsEnfVertexMap.begin();
::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
currentEnfVertex = (it_coords->second);
BLSURFPlugin::TCoordsEnfVertexElement_var mapElement = new BLSURFPlugin::TCoordsEnfVertexElement();
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
- coords->length(it_coords->first.size());
+ coords->length((CORBA::ULong) it_coords->first.size());
for (CORBA::ULong ind=0;ind<coords->length();ind++)
coords[ind] = it_coords->first[ind];
mapElement->coords = coords;
enfVertex->geomEntry = CORBA::string_dup(currentEnfVertex->geomEntry.c_str());
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords2 = new BLSURFPlugin::TEnfVertexCoords();
- coords2->length(currentEnfVertex->coords.size());
+ coords2->length((CORBA::ULong) currentEnfVertex->coords.size());
for (CORBA::ULong ind=0;ind<coords2->length();ind++)
coords2[ind] = currentEnfVertex->coords[ind];
enfVertex->coords = coords2;
enfVertex->grpName = CORBA::string_dup(currentEnfVertex->grpName.c_str());
// Face entry list
BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
- faceEntryList->length(currentEnfVertex->faceEntries.size());
+ faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
const ::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexEntryListMap entryEnfVertexEntryListMap =
this->GetImpl()->_GetAllEnfVertexEntriesByFace();
- resultMap->length(entryEnfVertexEntryListMap.size());
+ resultMap->length((CORBA::ULong) entryEnfVertexEntryListMap.size());
::BLSURFPlugin_Hypothesis::TEntryList _enfVertexEntryList;
::BLSURFPlugin_Hypothesis::TFaceEntryEnfVertexEntryListMap::const_iterator it_entry =
_enfVertexEntryList = it_entry->second;
BLSURFPlugin::TEntryList_var enfVertexEntryList = new BLSURFPlugin::TEntryList();
- enfVertexEntryList->length(_enfVertexEntryList.size());
+ enfVertexEntryList->length((CORBA::ULong) _enfVertexEntryList.size());
::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_enfVertexEntry = _enfVertexEntryList.begin();
for (int j = 0; it_enfVertexEntry != _enfVertexEntryList.end(); ++it_enfVertexEntry, ++j) {
BLSURFPlugin::TEnfVertexEntryEnfVertexMap_var resultMap = new BLSURFPlugin::TEnfVertexEntryEnfVertexMap();
const ::BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap enfVertexEntryEnfVertexMap =
this->GetImpl()->_GetAllEnforcedVerticesByEnfVertexEntry();
- resultMap->length(enfVertexEntryEnfVertexMap.size());
+ resultMap->length((CORBA::ULong) enfVertexEntryEnfVertexMap.size());
::BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap::const_iterator it_enfVertexEntry = enfVertexEntryEnfVertexMap.begin();
::BLSURFPlugin_Hypothesis::TEnfVertex *currentEnfVertex;
enfVertex->geomEntry = CORBA::string_dup(currentEnfVertex->geomEntry.c_str());
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
- coords->length(currentEnfVertex->coords.size());
+ coords->length((CORBA::ULong) currentEnfVertex->coords.size());
for (CORBA::ULong ind=0;ind<coords->length();ind++)
coords[ind] = currentEnfVertex->coords[ind];
enfVertex->coords = coords;
enfVertex->grpName = CORBA::string_dup(currentEnfVertex->grpName.c_str());
// Face entry list
BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
- faceEntryList->length(currentEnfVertex->faceEntries.size());
+ faceEntryList->length((CORBA::ULong) currentEnfVertex->faceEntries.size());
::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = currentEnfVertex->faceEntries.begin();
for (int ind = 0; it_entry != currentEnfVertex->faceEntries.end();++it_entry, ++ind)
faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
try {
BLSURFPlugin::TEnfVertexList_var vertexList = new BLSURFPlugin::TEnfVertexList();
::BLSURFPlugin_Hypothesis::TEnfVertexList _vList = this->GetImpl()->GetEnfVertexList(entry);
- vertexList->length(_vList.size());
+ vertexList->length((CORBA::ULong) _vList.size());
::BLSURFPlugin_Hypothesis::TEnfVertexList::const_iterator evlIt = _vList.begin();
for (int i = 0; evlIt != _vList.end(); ++evlIt, ++i) {
::BLSURFPlugin_Hypothesis::TEnfVertex *_enfVertex = (*evlIt);
enfVertex->geomEntry = CORBA::string_dup(_enfVertex->geomEntry.c_str());
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
- coords->length(_enfVertex->coords.size());
+ coords->length((CORBA::ULong) _enfVertex->coords.size());
for ( CORBA::ULong ind = 0; ind < coords->length(); ind++ )
coords[ind] = _enfVertex->coords[ind];
enfVertex->coords = coords;
enfVertex->grpName = CORBA::string_dup(_enfVertex->grpName.c_str());
// Face entry list
BLSURFPlugin::TEntryList_var faceEntryList = new BLSURFPlugin::TEntryList();
- faceEntryList->length(_enfVertex->faceEntries.size());
+ faceEntryList->length((CORBA::ULong) _enfVertex->faceEntries.size());
::BLSURFPlugin_Hypothesis::TEntryList::const_iterator it_entry = _enfVertex->faceEntries.begin();
for (int ind = 0; it_entry != _enfVertex->faceEntries.end();++it_entry, ++ind)
faceEntryList[ind] = CORBA::string_dup((*it_entry).c_str());
if (i < theShapeTypes.size()-1 )
typesTxt << ", ";
}
- if (!ok){
+ if (!ok)
+ {
std::stringstream msg;
msg << "shape type is not in" << typesTxt.str();
THROW_SALOME_CORBA_EXCEPTION(msg.str().c_str(), SALOME::BAD_PARAM);
{
BLSURFPlugin::TPeriodicityList_var periodicityList = new BLSURFPlugin::TPeriodicityList();
- periodicityList->length(preCadPeriodicityVector.size());
+ periodicityList->length((CORBA::ULong) preCadPeriodicityVector.size());
- for (size_t i = 0; i<preCadPeriodicityVector.size(); i++)
+ for ( CORBA::ULong i = 0; i<preCadPeriodicityVector.size(); i++)
{
::BLSURFPlugin_Hypothesis::TPreCadPeriodicity preCadPeriodicityVector_i = preCadPeriodicityVector[i];
BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList();
if (! preCadPeriodicityVector_i.theSourceVerticesEntries.empty())
{
- sourceVertices->length(preCadPeriodicityVector_i.theSourceVerticesEntries.size());
- for (size_t j=0; j<preCadPeriodicityVector_i.theSourceVerticesEntries.size(); j++)
+ sourceVertices->length((CORBA::ULong) preCadPeriodicityVector_i.theSourceVerticesEntries.size());
+ for (CORBA::ULong j=0; j<preCadPeriodicityVector_i.theSourceVerticesEntries.size(); j++)
sourceVertices[j]=CORBA::string_dup(preCadPeriodicityVector_i.theSourceVerticesEntries[j].c_str());
}
BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList();
if (! preCadPeriodicityVector_i.theTargetVerticesEntries.empty())
{
- targetVertices->length(preCadPeriodicityVector_i.theTargetVerticesEntries.size());
- for (size_t j=0; j<preCadPeriodicityVector_i.theTargetVerticesEntries.size(); j++)
+ targetVertices->length((CORBA::ULong) preCadPeriodicityVector_i.theTargetVerticesEntries.size());
+ for (CORBA::ULong j=0; j<preCadPeriodicityVector_i.theTargetVerticesEntries.size(); j++)
targetVertices[j]=CORBA::string_dup(preCadPeriodicityVector_i.theTargetVerticesEntries[j].c_str());
}
string prefix3 = "Source_vertex_";
BLSURFPlugin::TEntryList_var theSourceVerticesEntries = new BLSURFPlugin::TEntryList();
- theSourceVerticesEntries->length(theLength);
+ theSourceVerticesEntries->length((CORBA::ULong) theLength);
GEOM::GEOM_Object_ptr theVtx_i;
string theEntry_i;
- for (size_t ind = 0; ind < theLength; ind++) {
+ for (CORBA::ULong ind = 0; ind < theLength; ind++) {
theVtx_i = theSourceVertices[ind];
theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix3);
theSourceVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
string prefix4 = "Target_vertex_";
BLSURFPlugin::TEntryList_var theTargetVerticesEntries = new BLSURFPlugin::TEntryList();
- theTargetVerticesEntries->length(theLength);
- for (size_t ind = 0; ind < theLength; ind++) {
+ theTargetVerticesEntries->length((CORBA::ULong) theLength);
+ for ( CORBA::ULong ind = 0; ind < theLength; ind++) {
theVtx_i = theTargetVertices[ind];
theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix4);
theTargetVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
// Convert BLSURFPlugin::TEntryList to vector<string>
vector<string> theSourceVerticesEntries, theTargetVerticesEntries;
- for (size_t ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
+ for ( CORBA::ULong ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
theSourceVerticesEntries.push_back(theSourceVerticesEntriesCorba[ind].in());
theTargetVerticesEntries.push_back(theTargetVerticesEntriesCorba[ind].in());
}
string prefix3 = "Source_vertex_";
BLSURFPlugin::TEntryList_var theSourceVerticesEntries = new BLSURFPlugin::TEntryList();
- theSourceVerticesEntries->length(theLength);
+ theSourceVerticesEntries->length((CORBA::ULong) theLength);
GEOM::GEOM_Object_ptr theVtx_i;
string theEntry_i;
- for (size_t ind = 0; ind < theLength; ind++) {
+ for (CORBA::ULong ind = 0; ind < theLength; ind++) {
theVtx_i = theSourceVertices[ind];
theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix3);
theSourceVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
string prefix4 = "Target_vertex_";
BLSURFPlugin::TEntryList_var theTargetVerticesEntries = new BLSURFPlugin::TEntryList();
- theTargetVerticesEntries->length(theLength);
- for (size_t ind = 0; ind < theLength; ind++) {
+ theTargetVerticesEntries->length((CORBA::ULong) theLength);
+ for (CORBA::ULong ind = 0; ind < theLength; ind++) {
theVtx_i = theTargetVertices[ind];
theEntry_i = PublishIfNeeded(theVtx_i, GEOM::VERTEX, prefix4);
theTargetVerticesEntries[ind] = CORBA::string_dup(theEntry_i.c_str());
// Convert BLSURFPlugin::TEntryList to vector<string>
vector<string> theSourceVerticesEntries, theTargetVerticesEntries;
- for (size_t ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
+ for (CORBA::ULong ind = 0; ind < theSourceVerticesEntriesCorba.length(); ind++) {
theSourceVerticesEntries.push_back(theSourceVerticesEntriesCorba[ind].in());
theTargetVerticesEntries.push_back(theTargetVerticesEntriesCorba[ind].in());
}
myPeriodicityTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
myPeriodicityTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
- size_t periodicityVisibleColumns = 2;
- for (size_t column = 0; column < periodicityVisibleColumns; ++column) {
+ int periodicityVisibleColumns = 2;
+ for (int column = 0; column < periodicityVisibleColumns; ++column) {
myPeriodicityTreeWidget->header()->setSectionResizeMode(column,QHeaderView::Interactive);
myPeriodicityTreeWidget->resizeColumnToContents(column);
}
This method updates the tooltip of a modified item. The QLineEdit widgets content
is synchronized with the coordinates of the enforced vertex clicked in the tree widget.
*/
-void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetItem* item, int /*column*/) {
+void BLSURFPluginGUI_HypothesisCreator::updateEnforcedVertexValues(QTreeWidgetItem* item, int /*column*/)
+{
QVariant vertexName = item->data(ENF_VER_NAME_COLUMN, Qt::EditRole);
QVariant x = item->data(ENF_VER_X_COLUMN, Qt::EditRole);
QVariant y = item->data(ENF_VER_Y_COLUMN, Qt::EditRole);
}
}
-void BLSURFPluginGUI_HypothesisCreator::onSelectEnforcedVertex() {
- int nbSelEnfVertex = myEnfVertexWdg->NbObjects();
+void BLSURFPluginGUI_HypothesisCreator::onSelectEnforcedVertex()
+{
+ size_t nbSelEnfVertex = myEnfVertexWdg->NbObjects();
clearEnforcedVertexWidgets();
if (nbSelEnfVertex == 1)
{
This method synchronizes the QLineEdit/SMESHGUI_SpinBox widgets content with the coordinates
of the enforced vertex clicked in the tree widget.
*/
-void BLSURFPluginGUI_HypothesisCreator::synchronizeCoords() {
+void BLSURFPluginGUI_HypothesisCreator::synchronizeCoords()
+{
clearEnforcedVertexWidgets();
QList<QTreeWidgetItem *> items = myEnforcedTreeWidget->selectedItems();
if (! items.isEmpty() && items.size() == 1) {
/** BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(entry, shapeName, useInternalVertices)
This method adds a face containing enforced vertices in the tree widget.
*/
-QTreeWidgetItem* BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(std::string theFaceEntry, std::string theFaceName) {
+QTreeWidgetItem* BLSURFPluginGUI_HypothesisCreator::addEnforcedFace(std::string theFaceEntry, std::string theFaceName)
+{
// Find theFaceEntry item
QList<QTreeWidgetItem* > theItemList = myEnforcedTreeWidget->findItems(QString(theFaceEntry.c_str()),Qt::MatchExactly,ENF_VER_FACE_ENTRY_COLUMN);
QTreeWidgetItem* theItem;
myEnforcedTreeWidget->resizeColumnToContents(column);
// Vertex selection
- int selEnfVertex = myEnfVertexWdg->NbObjects();
+ size_t selEnfVertex = myEnfVertexWdg->NbObjects();
bool coordsEmpty = (myXCoord->text().isEmpty()) || (myYCoord->text().isEmpty()) || (myZCoord->text().isEmpty());
if ((selEnfVertex == 0) && coordsEmpty)
CORBA::Double x,y,z;
x = y = z = 0.;
- for (int j = 0 ; j < selEnfVertex ; j++)
+ for (size_t j = 0 ; j < selEnfVertex ; j++)
{
myEnfVertex = myEnfVertexWdg->GetObject< GEOM::GEOM_Object >(j);
if (myEnfVertex->GetShapeType() == GEOM::VERTEX) {
/** BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex()
This method is called when a item is removed from the enforced vertices tree widget
*/
-void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex() {
+void BLSURFPluginGUI_HypothesisCreator::onRemoveEnforcedVertex()
+{
QList<QTreeWidgetItem *> selectedItems = myEnforcedTreeWidget->selectedItems();
QList<QTreeWidgetItem *> selectedVertices;
QSet<QTreeWidgetItem *> selectedEntries;
/** BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity()
This method is called when a item is added into the periodicity table widget
*/
-void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity() {
-
+void BLSURFPluginGUI_HypothesisCreator::onAddPeriodicity()
+{
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
that->getGeomSelectionTool()->selectionMgr()->clearFilters();
// Source-Target selection
- int selSource = myPeriodicitySourceFaceWdg->NbObjects();
- int selTarget = myPeriodicityTargetFaceWdg->NbObjects();
+ size_t selSource = myPeriodicitySourceFaceWdg->NbObjects();
+ size_t selTarget = myPeriodicityTargetFaceWdg->NbObjects();
if (selSource == 0 || selTarget == 0)
return;
// Vertices selection
if (myPeriodicityGroupBox2->isChecked())
{
- int P1Ssel = myPeriodicityP1SourceWdg->NbObjects();
- int P2Ssel = myPeriodicityP2SourceWdg->NbObjects();
- int P3Ssel = myPeriodicityP3SourceWdg->NbObjects();
- int P1Tsel = myPeriodicityP1TargetWdg->NbObjects();
- //int P2Tsel = myPeriodicityP2TargetWdg->NbObjects();
- int P3Tsel = myPeriodicityP3TargetWdg->NbObjects();
+ size_t P1Ssel = myPeriodicityP1SourceWdg->NbObjects();
+ size_t P2Ssel = myPeriodicityP2SourceWdg->NbObjects();
+ size_t P3Ssel = myPeriodicityP3SourceWdg->NbObjects();
+ size_t P1Tsel = myPeriodicityP1TargetWdg->NbObjects();
+ //size_t P2Tsel = myPeriodicityP2TargetWdg->NbObjects();
+ size_t P3Tsel = myPeriodicityP3TargetWdg->NbObjects();
if (P1Ssel!=1 || P2Ssel!=1 || P3Ssel!=1 || P1Tsel!=1 || P3Tsel!=1 || P3Tsel!=1)
{
item->setFlags( Qt::ItemIsSelectable |Qt::ItemIsEnabled );
- size_t k=0;
+ int k=0;
for (anIt = myPeriodicitySelectionWidgets.begin(); anIt != myPeriodicitySelectionWidgets.end(); anIt++, k++)
{
StdMeshersGUI_ObjectReferenceParamWdg * w1 = ( StdMeshersGUI_ObjectReferenceParamWdg* ) ( *anIt );
/** BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity()
This method is called when a item is removed from the periodicity tree widget
*/
-void BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity() {
+void BLSURFPluginGUI_HypothesisCreator::onRemovePeriodicity()
+{
QList<QTreeWidgetItem *> selectedItems = myPeriodicityTreeWidget->selectedItems();
QTreeWidgetItem* item;
{
QString shapeName, shapeEntry;
CORBA::Object_var shape;
- size_t k=0;
+ int k=0;
ListOfWidgets::const_iterator anIt = myPeriodicitySelectionWidgets.begin();
for (; anIt != myPeriodicitySelectionWidgets.end(); anIt++, k++)
{
{
string shapeEntry = periodicity_i[k];
string shapeName = myGeomToolSelected->getNameFromEntry(shapeEntry);
- item->setData(k, Qt::EditRole, shapeName.c_str() );
- item->setData(k, Qt::UserRole, shapeEntry.c_str() );
+ item->setData((int) k, Qt::EditRole, shapeName.c_str() );
+ item->setData((int) k, Qt::UserRole, shapeEntry.c_str() );
}
}
fullSizeMapList = fullSizeMaps.split( "|", QString::KeepEmptyParts );
if ( fullSizeMapList.count() > 1 ) {
string fullSizeMap = fullSizeMapList[1].toStdString();
- int pos = fullSizeMap.find("return")+7;
+ size_t pos = fullSizeMap.find("return")+7;
QString sizeMap;
try {
sizeMap = QString::fromStdString(fullSizeMap.substr(pos, fullSizeMap.size()-pos));
BLSURFPlugin::TPeriodicityList_var preCadFacePeriodicityVector, bool onFace) const
{
- for (size_t i=0; i<preCadFacePeriodicityVector->length(); i++ )
+ for (CORBA::ULong i=0; i<preCadFacePeriodicityVector->length(); i++ )
{
TPreCadPeriodicity periodicity_i(PERIODICITY_NB_COLUMN);
periodicity_i[PERIODICITY_OBJ_SOURCE_COLUMN] = preCadFacePeriodicityVector[i].shape1Entry.in();
if ( h->GetVolumeGradation() != h_data.myVolumeGradation )
h->SetVolumeGradation( h_data.myVolumeGradation <= 0 ? -1 : h_data.myVolumeGradation );
- h->SetSurfaceProximity ( h_data.myUseSurfaceProximity );
- h->SetNbSurfaceProximityLayers( h_data.myNbSurfaceProximityLayers );
+ h->SetSurfaceProximity ((CORBA::Short) h_data.myUseSurfaceProximity );
+ h->SetNbSurfaceProximityLayers((CORBA::Short) h_data.myNbSurfaceProximityLayers );
h->SetSurfaceProximityRatio ( h_data.mySurfaceProximityRatio );
- h->SetVolumeProximity ( h_data.myUseVolumeProximity );
- h->SetNbVolumeProximityLayers ( h_data.myNbVolumeProximityLayers );
+ h->SetVolumeProximity ((CORBA::Short) h_data.myUseVolumeProximity );
+ h->SetNbVolumeProximityLayers ((CORBA::Short) h_data.myNbVolumeProximityLayers );
h->SetVolumeProximityRatio ( h_data.myVolumeProximityRatio );
if ( h->GetElementType() != h_data.myElementType )
h->SetQuadraticMesh( h_data.myQuadraticMesh );
if ( h->GetVerbosity() != h_data.myVerbosity )
- h->SetVerbosity( h_data.myVerbosity );
+ h->SetVerbosity((CORBA::Short) h_data.myVerbosity );
// if ( h->GetTopology() != h_data.myTopology )
// h->SetTopology( (int) h_data.myTopology );
// if ( h->GetPreCADMergeEdges() != h_data.myPreCADMergeEdges )
}
void BLSURFPluginGUI_HypothesisCreator::onSmpItemClicked(QTreeWidgetItem * item, int col)
-{
+{
BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
if (col == SMP_SIZEMAP_COLUMN) {
QString entry = item->data( SMP_ENTRY_COLUMN, Qt::EditRole ).toString();
const TAttractorVec& attVec = myATTMap[entry];
if ( !attVec.empty() )
{
- int iAtt = 0;
+ size_t iAtt = 0;
if ( !childEntry.isEmpty() )
for ( size_t i = 0; i < attVec.size(); ++i )
if ( childEntry == attVec[i].attEntry.c_str() )
double myAnisotropicRatio, myTinyEdgeLength, myTinyEdgeOptimisLength, myBadElementAspectRatio, myCorrectSurfaceIntersectionMaxCost;
bool myOptimizeMesh, myQuadraticMesh;
bool mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces;
- long myElementType;
+ int myElementType;
bool myUseSurfaceProximity;
int myNbSurfaceProximityLayers;
double mySurfaceProximityRatio;