: _face(),
_attractorShape(),
_attEntry(),
- _gridU(0),
- _gridV(0),
_vectU(),
_vectV(),
_DMap(),
_known(),
_trial(),
+ _type(-1),
+ _gridU(0),
+ _gridV(0),
_u1 (0.),
_u2 (0.),
_v1 (0.),
_endSize(-1),
_actionRadius(-1),
_constantRadius(-1),
- _type(-1),
_isMapBuilt(false),
_isEmpty(true){ MESSAGE("construction of a void attractor"); }
: _face(),
_attractorShape(),
_attEntry(attEntry),
- _gridU(),
- _gridV(),
_vectU(),
_vectV(),
_DMap(),
_known(),
_trial(),
+ _type(0),
+ _gridU(),
+ _gridV(),
_u1 (0.),
_u2 (0.),
_v1 (0.),
_endSize(-1),
_actionRadius(-1),
_constantRadius(-1),
- _type(0),
_isMapBuilt(false),
_isEmpty(false)
{
gp_Pnt2d P2;
double first;
double last;
- int i,j,i0,j0;
+ int i,i0,j0;
Trial_Pnt TPnt(3,0);
Handle(Geom2d_Curve) aCurve2d;
Handle(Geom_Curve) aCurve3d = BRep_Tool::Curve (anEdge, first, last);
return _startSize + ( 0.5 * (attrDist - _constantRadius + abs(attrDist - _constantRadius)) ) ;
break;
}
+ return -1;
}
MESSAGE("building the map");
int i, j, k, n;
- int count = 0;
+ //int count = 0;
int ip, jp, kp, np;
int i0, j0;
gp_Pnt P;
#include <fenv.h>
#endif
+using namespace std;
+
/* ==================================
* =========== PYTHON ==============
* ==================================*/
//=============================================================================
void BLSURFPlugin_Hypothesis::SetInternalEnforcedVertexAllFacesGroup(BLSURFPlugin_Hypothesis::TEnfGroupName theGroupName) {
- if (string(theGroupName) != string(_enforcedInternalVerticesAllFacesGroup)) {
+ if (std::string(theGroupName) != std::string(_enforcedInternalVerticesAllFacesGroup)) {
_enforcedInternalVerticesAllFacesGroup = theGroupName;
NotifySubMeshesHypothesisModification();
}
//function : AddPreCadFacesPeriodicity
//=======================================================================
void BLSURFPlugin_Hypothesis::AddPreCadFacesPeriodicity(TEntry theFace1Entry, TEntry theFace2Entry,
- vector<string> &theSourceVerticesEntries, vector<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,
- vector<string> &theSourceVerticesEntries, vector<string> &theTargetVerticesEntries) {
+ std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries) {
TPreCadPeriodicity preCadEdgesPeriodicity;
preCadEdgesPeriodicity.shape1Entry = theEdge1Entry;
isOK = static_cast<bool>(load >> val);
if (isOK)
// former parameter: get min value
- _angleMesh = min(val,_angleMesh);
+ _angleMesh = std::min(val,_angleMesh);
else
load.clear(std::ios::badbit | load.rdstate());
isOK = static_cast<bool>(load >> val);
if (isOK)
// former parameter: get min value
- _minSize = min(val,_minSize);
+ _minSize = std::min(val,_minSize);
else
load.clear(std::ios::badbit | load.rdstate());
isOK = static_cast<bool>(load >> val);
if (isOK)
// former parameter: get max value
- _maxSize = max(val,_maxSize);
+ _maxSize = std::max(val,_maxSize);
else
load.clear(std::ios::badbit | load.rdstate());
#include <cstring>
#include <boost/regex.hpp>
+using namespace std;
+
//=============================================================================
/*!
* BLSURFPlugin_Hypothesis_i::BLSURFPlugin_Hypothesis_i
void BLSURFPlugin_Hypothesis_i::SetOptionValues(const BLSURFPlugin::string_array& options)
throw (SALOME::SALOME_Exception) {
ASSERT(myBaseImpl);
- for (int i = 0; i < options.length(); ++i) {
+ for (CORBA::ULong i = 0; i < options.length(); ++i) {
string name_value_type = options[i].in();
if(name_value_type.empty())
continue;
- int colonPos = name_value_type.find(':');
+ size_t colonPos = name_value_type.find(':');
string name, value;
bool custom = false;
if (colonPos == string::npos) // ':' not found
void BLSURFPlugin_Hypothesis_i::SetPreCADOptionValues(const BLSURFPlugin::string_array& options)
throw (SALOME::SALOME_Exception) {
ASSERT(myBaseImpl);
- for (int i = 0; i < options.length(); ++i) {
+ for ( CORBA::ULong i = 0; i < options.length(); ++i) {
string name_value_type = options[i].in();
if(name_value_type.empty())
continue;
- int colonPos = name_value_type.find(':');
+ size_t colonPos = name_value_type.find(':');
string name, value;
bool custom = false;
if (colonPos == string::npos) // ':' not found
void BLSURFPlugin_Hypothesis_i::SetSizeMapEntries(const BLSURFPlugin::string_array& sizeMaps)
throw (SALOME::SALOME_Exception) {
ASSERT(myBaseImpl);
- for (int i = 0; i < sizeMaps.length(); ++i) {
+ for ( CORBA::ULong i = 0; i < sizeMaps.length(); ++i) {
string entry_sizemap = sizeMaps[i].in();
- int colonPos = entry_sizemap.find('|');
+ size_t colonPos = entry_sizemap.find('|');
string entry, sizemap;
if (colonPos == string::npos) // '|' separator not found
entry = entry_sizemap;
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
coords->length(currentEnfVertex->coords.size());
- for (int i=0;i<coords->length();i++)
+ for (CORBA::ULong i=0;i<coords->length();i++)
coords[i] = currentEnfVertex->coords[i];
enfVertex->coords = coords;
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
coords->length(currentEnfVertex->coords.size());
- for (int ind = 0; ind < coords->length(); ind++)
+ for (CORBA::ULong ind = 0; ind < coords->length(); ind++)
coords[ind] = currentEnfVertex->coords[ind];
enfVertex->coords = coords;
// Group name
for (int j = 0; it_coords != _coordsList.end(); ++it_coords, ++j) {
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
coords->length((*it_coords).size());
- for (int i=0;i<coords->length();i++)
+ for (CORBA::ULong i=0;i<coords->length();i++)
coords[i] = (*it_coords)[i];
coordsList[j] = coords;
MESSAGE("Coords #" << j << ": " << coords[0] << ", " << coords[1] << ", " << coords[2]);
BLSURFPlugin::TCoordsEnfVertexElement_var mapElement = new BLSURFPlugin::TCoordsEnfVertexElement();
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
coords->length(it_coords->first.size());
- for (int ind=0;ind<coords->length();ind++)
+ for (CORBA::ULong ind=0;ind<coords->length();ind++)
coords[ind] = it_coords->first[ind];
mapElement->coords = coords;
MESSAGE("Coords: " << mapElement->coords[0] << ", " << mapElement->coords[1] << ", " << mapElement->coords[2]);
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords2 = new BLSURFPlugin::TEnfVertexCoords();
coords2->length(currentEnfVertex->coords.size());
- for (int ind=0;ind<coords2->length();ind++)
+ for (CORBA::ULong ind=0;ind<coords2->length();ind++)
coords2[ind] = currentEnfVertex->coords[ind];
enfVertex->coords = coords2;
// Group name
// Coords
BLSURFPlugin::TEnfVertexCoords_var coords = new BLSURFPlugin::TEnfVertexCoords();
coords->length(currentEnfVertex->coords.size());
- for (int ind=0;ind<coords->length();ind++)
+ for (CORBA::ULong ind=0;ind<coords->length();ind++)
coords[ind] = currentEnfVertex->coords[ind];
enfVertex->coords = coords;
// Group name
void CheckShapeType(GEOM::GEOM_Object_ptr shape, GEOM::shape_type theShapeType);
void CheckShapeTypes(GEOM::GEOM_Object_ptr shape, std::vector<GEOM::shape_type> theShapeTypes);
std::string PublishIfNeeded(GEOM::GEOM_Object_ptr shape, GEOM::shape_type theShapeType, std::string prefix);
- std::string FormatVerticesEntries(vector<string> &theSourceVerticesEntries, vector<string> &theTargetVerticesEntries);
+ std::string FormatVerticesEntries(std::vector<std::string> &theSourceVerticesEntries, std::vector<std::string> &theTargetVerticesEntries);
};
#include <stdexcept>
#include <algorithm>
+using namespace std;
enum {
STD_TAB = 0,
myPeriodicityTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
myPeriodicityTreeWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
- int periodicityVisibleColumns = 2;
+ size_t periodicityVisibleColumns = 2;
for (size_t column = 0; column < periodicityVisibleColumns; ++column) {
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
myPeriodicityTreeWidget->header()->setResizeMode(column,QHeaderView::Interactive);
int P2Ssel = myPeriodicityP2SourceWdg->NbObjects();
int P3Ssel = myPeriodicityP3SourceWdg->NbObjects();
int P1Tsel = myPeriodicityP1TargetWdg->NbObjects();
- int P2Tsel = myPeriodicityP2TargetWdg->NbObjects();
+ //int P2Tsel = myPeriodicityP2TargetWdg->NbObjects();
int P3Tsel = myPeriodicityP3TargetWdg->NbObjects();
if (P1Ssel!=1 || P2Ssel!=1 || P3Ssel!=1 || P1Tsel!=1 || P3Tsel!=1 || P3Tsel!=1)
const QString entry = i.key();
const QString sizeMap = i.value();
string shapeName = myGeomToolSelected->getNameFromEntry(entry.toStdString());
- int row = mySizeMapTable->topLevelItemCount();
+ //int row = mySizeMapTable->topLevelItemCount();
QTreeWidgetItem* item = new QTreeWidgetItem();
mySizeMapTable->addTopLevelItem( item );
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled );
QString fullSizeMaps;
QStringList fullSizeMapList;
GeomSelectionTools* myGeomToolSelected = that->getGeomSelectionTool();
- for ( int i = 0;i<mySizeMaps->length(); ++i ) {
+ for ( CORBA::ULong i = 0;i<mySizeMaps->length(); ++i ) {
fullSizeMaps = mySizeMaps[i].in();
// MESSAGE("fullSizeMaps: " << fullSizeMaps.toStdString());
fullSizeMapList = fullSizeMaps.split( "|", QString::KeepEmptyParts );
BLSURFPlugin::BLSURFPlugin_Hypothesis_var h =
BLSURFPlugin::BLSURFPlugin_Hypothesis::_narrow( initParamsHypothesis());
- BLSURFPluginGUI_HypothesisCreator* that = (BLSURFPluginGUI_HypothesisCreator*)this;
-
TopAbs_ShapeEnum shapeType;
string entry, attEntry, faceName, attName;
entry = (string) aFace->GetStudyEntry();