+ Prefer prefix ++/-- operators for non-primitive types

This commit is contained in:
wmayer 2015-10-06 21:16:44 +02:00
parent 48bf07e622
commit f53a691bba
26 changed files with 123 additions and 122 deletions

View File

@ -358,7 +358,7 @@ protected:
inline Color ColorLegend::getColor (float fVal) const
{
std::deque<float>::const_iterator pI;
for (pI = _aclValues.begin(); pI != _aclValues.end(); pI++)
for (pI = _aclValues.begin(); pI != _aclValues.end(); ++pI)
{
if (fVal < *pI)
break;
@ -383,7 +383,7 @@ inline Color ColorLegend::getColor (float fVal) const
inline unsigned short ColorLegend::getColorIndex (float fVal) const
{
std::deque<float>::const_iterator pI;
for (pI = _aclValues.begin(); pI != _aclValues.end(); pI++)
for (pI = _aclValues.begin(); pI != _aclValues.end(); ++pI)
{
if (fVal < *pI)
break;

View File

@ -38,7 +38,7 @@ using namespace Base;
Factory::~Factory ()
{
for (std::map<const std::string, AbstractProducer*>::iterator pI = _mpcProducers.begin(); pI != _mpcProducers.end(); pI++)
for (std::map<const std::string, AbstractProducer*>::iterator pI = _mpcProducers.begin(); pI != _mpcProducers.end(); ++pI)
delete pI->second;
}
@ -67,7 +67,7 @@ std::list<std::string> Factory::CanProduce() const
{
std::list<std::string> lObjects;
for (std::map<const std::string, AbstractProducer*>::const_iterator pI = _mpcProducers.begin(); pI != _mpcProducers.end(); pI++)
for (std::map<const std::string, AbstractProducer*>::const_iterator pI = _mpcProducers.begin(); pI != _mpcProducers.end(); ++pI)
{
lObjects.push_back(pI->first);
}

View File

@ -864,7 +864,7 @@ void ParameterGrp::Clear(void)
// deleting the nodes
DOMNode* pcTemp;
for (std::vector<DOMNode*>::iterator It=vecNodes.begin();It!=vecNodes.end();It++) {
for (std::vector<DOMNode*>::iterator It=vecNodes.begin();It!=vecNodes.end();++It) {
pcTemp = _pGroupNode->removeChild(*It);
//delete pcTemp;
pcTemp->release();

View File

@ -398,7 +398,7 @@ void Polygon2D::Intersect (const Polygon2D &rclPolygon, std::list<Polygon2D> &rc
if (afIntersections.size() > 0) // intersections founded
{
for (std::set<double>::iterator pF = afIntersections.begin(); pF != afIntersections.end(); pF++)
for (std::set<double>::iterator pF = afIntersections.begin(); pF != afIntersections.end(); ++pF)
{
// intersection point
Vector2D clPtIS = clLine.FromPos(*pF);

View File

@ -76,7 +76,7 @@ void DlgMaterialPropertiesImp::on_ambientColor_changed()
float b = (float)col.blue()/255.0f;
App::Color ambient(r,g,b);
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();it++) {
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();++it) {
App::Property* prop = (*it)->getPropertyByName(material.c_str());
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyMaterial::getClassTypeId())) {
App::PropertyMaterial* ShapeMaterial = (App::PropertyMaterial*)prop;
@ -98,7 +98,7 @@ void DlgMaterialPropertiesImp::on_diffuseColor_changed()
float b = (float)col.blue()/255.0f;
App::Color diffuse(r,g,b);
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();it++) {
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();++it) {
App::Property* prop = (*it)->getPropertyByName(material.c_str());
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyMaterial::getClassTypeId())) {
App::PropertyMaterial* ShapeMaterial = (App::PropertyMaterial*)prop;
@ -120,7 +120,7 @@ void DlgMaterialPropertiesImp::on_emissiveColor_changed()
float b = (float)col.blue()/255.0f;
App::Color emissive(r,g,b);
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();it++) {
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();++it) {
App::Property* prop = (*it)->getPropertyByName(material.c_str());
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyMaterial::getClassTypeId())) {
App::PropertyMaterial* ShapeMaterial = (App::PropertyMaterial*)prop;
@ -142,7 +142,7 @@ void DlgMaterialPropertiesImp::on_specularColor_changed()
float b = (float)col.blue()/255.0f;
App::Color specular(r,g,b);
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();it++) {
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();++it) {
App::Property* prop = (*it)->getPropertyByName(material.c_str());
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyMaterial::getClassTypeId())) {
App::PropertyMaterial* ShapeMaterial = (App::PropertyMaterial*)prop;
@ -159,7 +159,7 @@ void DlgMaterialPropertiesImp::on_specularColor_changed()
void DlgMaterialPropertiesImp::on_shininess_valueChanged(int sh)
{
float shininess = (float)sh/100.0f;
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();it++) {
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();++it) {
App::Property* prop = (*it)->getPropertyByName(material.c_str());
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyMaterial::getClassTypeId())) {
App::PropertyMaterial* ShapeMaterial = (App::PropertyMaterial*)prop;
@ -177,7 +177,7 @@ void DlgMaterialPropertiesImp::setViewProviders(const std::vector<Gui::ViewProvi
{
Objects = Obj;
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();it++) {
for (std::vector<ViewProvider*>::iterator it= Objects.begin();it!=Objects.end();++it) {
App::Property* prop = (*it)->getPropertyByName(material.c_str());
if (prop && prop->getTypeId().isDerivedFrom(App::PropertyMaterial::getClassTypeId())) {
App::PropertyMaterial* ShapeMaterial = (App::PropertyMaterial*)prop;

View File

@ -150,7 +150,7 @@ bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::
bool bSol = false;
unsigned long ulInd = 0;
for (std::vector<unsigned long>::const_iterator pI = raulFacets.begin(); pI != raulFacets.end(); pI++) {
for (std::vector<unsigned long>::const_iterator pI = raulFacets.begin(); pI != raulFacets.end(); ++pI) {
MeshGeomFacet rclSFacet = _rclMesh.GetFacet(*pI);
if (rclSFacet.Foraminate(rclPt, rclDir, clRes) == true) {
if (bSol == false) {// erste Loesung
@ -182,7 +182,7 @@ bool MeshAlgorithm::RayNearestField (const Base::Vector3f &rclPt, const Base::Ve
bool bSol = false;
unsigned long ulInd = 0;
for (std::vector<unsigned long>::const_iterator pF = raulFacets.begin(); pF != raulFacets.end(); pF++) {
for (std::vector<unsigned long>::const_iterator pF = raulFacets.begin(); pF != raulFacets.end(); ++pF) {
if (_rclMesh.GetFacet(*pF).Foraminate(rclPt, rclDir, clRes/*, fMaxAngle*/) == true) {
if (bSol == false) { // erste Loesung
bSol = true;
@ -270,7 +270,7 @@ void MeshAlgorithm::GetMeshBorders (std::list<std::vector<Base::Vector3f> > &rcl
{
std::vector<unsigned long> aulAllFacets(_rclMesh.CountFacets());
unsigned long k = 0;
for (std::vector<unsigned long>::iterator pI = aulAllFacets.begin(); pI != aulAllFacets.end(); pI++)
for (std::vector<unsigned long>::iterator pI = aulAllFacets.begin(); pI != aulAllFacets.end(); ++pI)
*pI = k++;
GetFacetBorders(aulAllFacets, rclBorders);
@ -280,7 +280,7 @@ void MeshAlgorithm::GetMeshBorders (std::list<std::vector<unsigned long> > &rclB
{
std::vector<unsigned long> aulAllFacets(_rclMesh.CountFacets());
unsigned long k = 0;
for (std::vector<unsigned long>::iterator pI = aulAllFacets.begin(); pI != aulAllFacets.end(); pI++)
for (std::vector<unsigned long>::iterator pI = aulAllFacets.begin(); pI != aulAllFacets.end(); ++pI)
*pI = k++;
GetFacetBorders(aulAllFacets, rclBorders, true);
@ -798,19 +798,19 @@ void MeshAlgorithm::SetFacetsProperty(const std::vector<unsigned long> &raulInds
if (raulInds.size() != raulProps.size()) return;
std::vector<unsigned long>::const_iterator iP = raulProps.begin();
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); i++, iP++)
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); ++i, ++iP)
_rclMesh._aclFacetArray[*i].SetProperty(*iP);
}
void MeshAlgorithm::SetFacetsFlag (const std::vector<unsigned long> &raulInds, MeshFacet::TFlagType tF) const
{
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); i++)
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); ++i)
_rclMesh._aclFacetArray[*i].SetFlag(tF);
}
void MeshAlgorithm::SetPointsFlag (const std::vector<unsigned long> &raulInds, MeshPoint::TFlagType tF) const
{
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); i++)
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); ++i)
_rclMesh._aclPointArray[*i].SetFlag(tF);
}
@ -838,13 +838,13 @@ void MeshAlgorithm::GetPointsFlag (std::vector<unsigned long> &raulInds, MeshPoi
void MeshAlgorithm::ResetFacetsFlag (const std::vector<unsigned long> &raulInds, MeshFacet::TFlagType tF) const
{
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); i++)
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); ++i)
_rclMesh._aclFacetArray[*i].ResetFlag(tF);
}
void MeshAlgorithm::ResetPointsFlag (const std::vector<unsigned long> &raulInds, MeshPoint::TFlagType tF) const
{
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); i++)
for (std::vector<unsigned long>::const_iterator i = raulInds.begin(); i != raulInds.end(); ++i)
_rclMesh._aclPointArray[*i].ResetFlag(tF);
}
@ -1115,7 +1115,7 @@ void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewPr
Base::SequencerLauncher seq( "Check facets", aulAllElements.size() );
for (it = aulAllElements.begin(); it != aulAllElements.end(); it++)
for (it = aulAllElements.begin(); it != aulAllElements.end(); ++it)
{
bNoPointInside = true;
clGravityOfFacet.Set(0.0f, 0.0f, 0.0f);
@ -1231,7 +1231,7 @@ void MeshAlgorithm::SearchFacetsFromPolyline (const std::vector<Base::Vector3f>
return; // no polygon defined
std::set<unsigned long> aclFacets;
for (std::vector<Base::Vector3f>::const_iterator pV = rclPolyline.begin(); pV < (rclPolyline.end() - 1); pV++)
for (std::vector<Base::Vector3f>::const_iterator pV = rclPolyline.begin(); pV < (rclPolyline.end() - 1); ++pV)
{
const Base::Vector3f &rclP0 = *pV, &rclP1 = *(pV + 1);
@ -1262,7 +1262,7 @@ void MeshAlgorithm::CutBorderFacets (std::vector<unsigned long> &raclFacetIndice
std::vector<unsigned long> aclResult;
std::set<unsigned long> aclTmp(aclToDelete.begin(), aclToDelete.end());
for (std::vector<unsigned long>::iterator pI = raclFacetIndices.begin(); pI != raclFacetIndices.end(); pI++)
for (std::vector<unsigned long>::iterator pI = raclFacetIndices.begin(); pI != raclFacetIndices.end(); ++pI)
{
if (aclTmp.find(*pI) == aclTmp.end())
aclResult.push_back(*pI);
@ -1295,7 +1295,7 @@ void MeshAlgorithm::CheckBorderFacets (const std::vector<unsigned long> &raclFac
for (unsigned short usL = 0; usL < usLevel; usL++)
{
for (std::vector<unsigned long>::const_iterator pF = raclFacetIndices.begin(); pF != raclFacetIndices.end(); pF++)
for (std::vector<unsigned long>::const_iterator pF = raclFacetIndices.begin(); pF != raclFacetIndices.end(); ++pF)
{
for (int i = 0; i < 3; i++)
{
@ -1324,7 +1324,7 @@ void MeshAlgorithm::GetBorderPoints (const std::vector<unsigned long> &raclFacet
const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray;
for (std::vector<unsigned long>::const_iterator pF = raclFacetIndices.begin(); pF != raclFacetIndices.end(); pF++)
for (std::vector<unsigned long>::const_iterator pF = raclFacetIndices.begin(); pF != raclFacetIndices.end(); ++pF)
{
for (int i = 0; i < 3; i++)
{
@ -1424,7 +1424,7 @@ bool MeshAlgorithm::CutWithPlane (const Base::Vector3f &clBase, const Base::Vect
// alle Facets mit Ebene schneiden
std::list<std::pair<Base::Vector3f, Base::Vector3f> > clTempPoly; // Feld mit Schnittlinien (unsortiert, nicht verkettet)
for (std::vector<unsigned long>::iterator pF = aulFacets.begin(); pF != aulFacets.end(); pF++)
for (std::vector<unsigned long>::iterator pF = aulFacets.begin(); pF != aulFacets.end(); ++pF)
{
Base::Vector3f clE1, clE2;
const MeshGeomFacet clF(_rclMesh.GetFacet(*pF));
@ -1442,7 +1442,7 @@ bool MeshAlgorithm::CutWithPlane (const Base::Vector3f &clBase, const Base::Vect
ConnectLines(clTempPoly, tempList, fMinEps);
ConnectPolygons(tempList, clTempPoly);
for(std::list<std::pair<Base::Vector3f, Base::Vector3f> >::iterator iter = clTempPoly.begin(); iter != clTempPoly.end(); iter++)
for(std::list<std::pair<Base::Vector3f, Base::Vector3f> >::iterator iter = clTempPoly.begin(); iter != clTempPoly.end(); ++iter)
{
rclResultLines.push_front(*iter);
}
@ -1573,14 +1573,14 @@ bool MeshAlgorithm::ConnectPolygons(std::list<std::vector<Base::Vector3f> > &clP
std::list<std::pair<Base::Vector3f, Base::Vector3f> > &rclLines) const
{
for(std::list< std::vector<Base::Vector3f> >::iterator OutIter = clPolyList.begin(); OutIter != clPolyList.end() ; OutIter++)
for(std::list< std::vector<Base::Vector3f> >::iterator OutIter = clPolyList.begin(); OutIter != clPolyList.end(); ++OutIter)
{
std::pair<Base::Vector3f,Base::Vector3f> currentSort;
float fDist = Base::Distance(OutIter->front(),OutIter->back());
currentSort.first = OutIter->front();
currentSort.second = OutIter->back();
for(std::list< std::vector<Base::Vector3f> >::iterator InnerIter = clPolyList.begin(); InnerIter != clPolyList.end(); InnerIter++)
for(std::list< std::vector<Base::Vector3f> >::iterator InnerIter = clPolyList.begin(); InnerIter != clPolyList.end(); ++InnerIter)
{
if(OutIter == InnerIter) continue;
@ -1645,14 +1645,14 @@ void MeshAlgorithm::PointsFromFacetsIndices (const std::vector<unsigned long> &r
std::set<unsigned long> setPoints;
for (std::vector<unsigned long>::const_iterator itI = rvecIndices.begin(); itI != rvecIndices.end(); itI++)
for (std::vector<unsigned long>::const_iterator itI = rvecIndices.begin(); itI != rvecIndices.end(); ++itI)
{
for (int i = 0; i < 3; i++)
setPoints.insert(rclFAry[*itI]._aulPoints[i]);
}
rvecPoints.clear();
for (std::set<unsigned long>::iterator itP = setPoints.begin(); itP != setPoints.end(); itP++)
for (std::set<unsigned long>::iterator itP = setPoints.begin(); itP != setPoints.end(); ++itP)
rvecPoints.push_back(rclPAry[*itP]);
}

View File

@ -343,7 +343,7 @@ float PlaneFit::GetSignedStdDeviation() const
float ulPtCt = (float)CountPoints();
Base::Vector3f clGravity, clPt;
std::list<Base::Vector3f>::const_iterator cIt;
for (cIt = _vPoints.begin(); cIt != _vPoints.end(); cIt++)
for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt)
clGravity += *cIt;
clGravity *= (1.0f / ulPtCt);
@ -623,7 +623,7 @@ double SurfaceFit::PolynomFit()
Eigen::Matrix<double,6,1> x = Eigen::Matrix<double,6,1>::Zero();
#endif
for (std::list<Base::Vector3f>::const_iterator it = _vPoints.begin(); it != _vPoints.end(); it++) {
for (std::list<Base::Vector3f>::const_iterator it = _vPoints.begin(); it != _vPoints.end(); ++it) {
Base::Vector3d clPoint(it->x,it->y,it->z);
clPoint.TransformToCoordinateSystem(bs, ex, ey);
double dU = clPoint.x;

View File

@ -167,7 +167,7 @@ std::vector<unsigned long> MeshEvalDuplicatePoints::GetIndices() const
// get first item which adjacent element has the same vertex
vt = std::adjacent_find(vt, vertices.end(), pred);
if (vt < vertices.end()) {
vt++;
++vt;
aInds.push_back(*vt - rPoints.begin());
}
}
@ -200,12 +200,12 @@ bool MeshFixDuplicatePoints::Fixup()
if (next < vertices.end()) {
std::vector<VertexIterator>::iterator first = next;
unsigned long first_index = *first - rPoints.begin();
next++;
++next;
while (next < vertices.end() && pred(*first, *next)) {
unsigned long next_index = *next - rPoints.begin();
mapPointIndex[next_index] = first_index;
pointIndices.push_back(next_index);
next++;
++next;
}
}
}
@ -374,7 +374,7 @@ std::vector<unsigned long> MeshEvalDuplicateFacets::GetIndices() const
// get first item which adjacent element has the same face
ft = std::adjacent_find(ft, faces.end(), pred);
if (ft < faces.end()) {
ft++;
++ft;
aInds.push_back(*ft - rFacets.begin());
}
}
@ -566,7 +566,7 @@ unsigned long MeshFixDegeneratedFacets::RemoveEdgeTooSmall (float fMinEdgeLength
// remove points, fix indices
for (std::set<std::pair<unsigned long, unsigned long> >::iterator pI = aclPtDelList.begin();
pI != aclPtDelList.end(); pI++) {
pI != aclPtDelList.end(); ++pI) {
// one of the point pairs is already processed
if ((rclPAry[pI->first].IsFlag(MeshPoint::VISIT) == true) ||
(rclPAry[pI->second].IsFlag(MeshPoint::VISIT) == true))

View File

@ -289,7 +289,7 @@ bool MeshEvalSolid::Evaluate ()
{
std::vector<MeshGeomEdge> edges;
_rclMesh.GetEdges( edges );
for (std::vector<MeshGeomEdge>::iterator it = edges.begin(); it != edges.end(); it++)
for (std::vector<MeshGeomEdge>::iterator it = edges.begin(); it != edges.end(); ++it)
{
if (it->_bBorder)
return false;
@ -360,7 +360,7 @@ bool MeshEvalTopology::Evaluate ()
int count = 0;
std::vector<unsigned long> facets;
std::vector<Edge_Index>::iterator pE;
for (pE = edges.begin(); pE != edges.end(); pE++) {
for (pE = edges.begin(); pE != edges.end(); ++pE) {
if (p0 == pE->p0 && p1 == pE->p1) {
count++;
facets.push_back(pE->f);
@ -828,7 +828,7 @@ bool MeshEvalNeighbourhood::Evaluate ()
unsigned long f0 = ULONG_MAX, f1 = ULONG_MAX;
int count = 0;
std::vector<Edge_Index>::iterator pE;
for (pE = edges.begin(); pE != edges.end(); pE++) {
for (pE = edges.begin(); pE != edges.end(); ++pE) {
if (p0 == pE->p0 && p1 == pE->p1) {
f1 = pE->f;
count++;
@ -894,7 +894,7 @@ std::vector<unsigned long> MeshEvalNeighbourhood::GetIndices() const
unsigned long f0 = ULONG_MAX, f1 = ULONG_MAX;
int count = 0;
std::vector<Edge_Index>::iterator pE;
for (pE = edges.begin(); pE != edges.end(); pE++) {
for (pE = edges.begin(); pE != edges.end(); ++pE) {
if (p0 == pE->p0 && p1 == pE->p1) {
f1 = pE->f;
count++;
@ -968,7 +968,7 @@ void MeshKernel::RebuildNeighbours (unsigned long index)
unsigned long f0 = ULONG_MAX, f1 = ULONG_MAX;
int count = 0;
std::vector<Edge_Index>::iterator pE;
for (pE = edges.begin(); pE != edges.end(); pE++) {
for (pE = edges.begin(); pE != edges.end(); ++pE) {
if (p0 == pE->p0 && p1 == pE->p1) {
f1 = pE->f;
count++;

View File

@ -850,7 +850,7 @@ unsigned long MeshFacetGrid::SearchNearestFromPoint (const Base::Vector3f &rclPt
Inside(clBB, aulFacets, rclPt, fMaxSearchArea, true);
for (std::vector<unsigned long>::const_iterator pI = aulFacets.begin(); pI != aulFacets.end(); pI++)
for (std::vector<unsigned long>::const_iterator pI = aulFacets.begin(); pI != aulFacets.end(); ++pI)
{
float fDist;
@ -920,7 +920,7 @@ void MeshFacetGrid::SearchNearestFacetInGrid(unsigned long ulX, unsigned long ul
unsigned long &rulFacetInd) const
{
const std::set<unsigned long> &rclSet = _aulGrid[ulX][ulY][ulZ];
for (std::set<unsigned long>::const_iterator pI = rclSet.begin(); pI != rclSet.end(); pI++)
for (std::set<unsigned long>::const_iterator pI = rclSet.begin(); pI != rclSet.end(); ++pI)
{
float fDist = _pclMesh->GetFacet(*pI).DistanceToPoint(rclPt);
if (fDist < rfMinDist)

View File

@ -131,7 +131,7 @@ std::ostream& MeshInfo::DetailedEdgeInfo (std::ostream& rclStream) const
<< " P (" << std::setw(8) << rP1.x << ", "
<< std::setw(8) << rP1.y << ", "
<< std::setw(8) << rP1.z << "), B: " << (ct == 2 ? "n" : "y") << std::endl;
pEIter++;
++pEIter;
}
return rclStream;

View File

@ -74,11 +74,11 @@ public:
/// Increments the iterator. It points then to the next element if the
/// end is not reached.
const MeshFacetIterator& operator ++ (void)
{ _clIter++; return *this; }
{ ++_clIter; return *this; }
/// Decrements the iterator. It points then to the previous element if the beginning
/// is not reached.
const MeshFacetIterator& operator -- (void)
{ _clIter--; return *this; }
{ --_clIter; return *this; }
/// Increments the iterator by \a k positions.
const MeshFacetIterator& operator += (int k)
{ _clIter += k; return *this; }
@ -195,11 +195,11 @@ public:
/// Increments the iterator. It points then to the next element if the
/// end is not reached.
const MeshPointIterator& operator ++ (void)
{ _clIter++; return *this; }
{ ++_clIter; return *this; }
/// Decrements the iterator. It points then to the previous element if the beginning
/// is not reached.
const MeshPointIterator& operator -- (void)
{ _clIter--; return *this; }
{ --_clIter; return *this; }
/// Assignment.
inline MeshPointIterator& operator = (const MeshPointIterator &rpI);
/// Compares if this iterator points to a lower element than the other one.

View File

@ -73,7 +73,7 @@ MeshKernel& MeshKernel::operator = (const std::vector<MeshGeomFacet> &rclFAry)
MeshBuilder builder(*this);
builder.Initialize(rclFAry.size());
for (std::vector<MeshGeomFacet>::const_iterator it = rclFAry.begin(); it != rclFAry.end(); it++)
for (std::vector<MeshGeomFacet>::const_iterator it = rclFAry.begin(); it != rclFAry.end(); ++it)
builder.AddFacet(*it);
builder.Finish();
@ -133,7 +133,7 @@ void MeshKernel::AddFacet(const MeshGeomFacet &rclSFacet)
unsigned long ulP1 = clFacet._aulPoints[1];
unsigned long ulP2 = clFacet._aulPoints[2];
unsigned long ulCC = 0;
for (TMeshFacetArray::iterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); pF++, ulCC++) {
for (TMeshFacetArray::iterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); ++pF, ulCC++) {
for (int i=0; i<3;i++) {
unsigned long ulP = pF->_aulPoints[i];
unsigned long ulQ = pF->_aulPoints[(i+1)%3];
@ -181,7 +181,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet> &rclFAry)
this->_aclPointArray.ResetInvalid();
unsigned long k = CountFacets();
std::map<std::pair<unsigned long, unsigned long>, std::list<unsigned long> > edgeMap;
for (std::vector<MeshFacet>::const_iterator pF = rclFAry.begin(); pF != rclFAry.end(); pF++, k++) {
for (std::vector<MeshFacet>::const_iterator pF = rclFAry.begin(); pF != rclFAry.end(); ++pF, k++) {
// reset INVALID flag for all candidates
pF->ResetFlag(MeshFacet::INVALID);
for (int i=0; i<3; i++) {
@ -246,7 +246,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet> &rclFAry)
_aclFacetArray.reserve( _aclFacetArray.size() + countValid );
// now start inserting the facets to the data structure and set the correct neighbourhood as well
unsigned long startIndex = CountFacets();
for (std::vector<MeshFacet>::const_iterator pF = rclFAry.begin(); pF != rclFAry.end(); pF++) {
for (std::vector<MeshFacet>::const_iterator pF = rclFAry.begin(); pF != rclFAry.end(); ++pF) {
if (!pF->IsFlag(MeshFacet::INVALID)) {
_aclFacetArray.push_back(*pF);
pF->SetProperty(startIndex++);
@ -254,7 +254,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet> &rclFAry)
}
// resolve neighbours
for (pE = edgeMap.begin(); pE != edgeMap.end(); pE++)
for (pE = edgeMap.begin(); pE != edgeMap.end(); ++pE)
{
unsigned long ulP0 = pE->first.first;
unsigned long ulP1 = pE->first.second;
@ -451,7 +451,7 @@ void MeshKernel::DeleteFacets (const std::vector<unsigned long> &raulFacets)
_aclPointArray.SetProperty(0);
// number of referencing facets per point
for (MeshFacetArray::_TConstIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); pF++) {
for (MeshFacetArray::_TConstIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); ++pF) {
_aclPointArray[pF->_aulPoints[0]]._ulProp++;
_aclPointArray[pF->_aulPoints[1]]._ulProp++;
_aclPointArray[pF->_aulPoints[2]]._ulProp++;
@ -459,7 +459,7 @@ void MeshKernel::DeleteFacets (const std::vector<unsigned long> &raulFacets)
// invalidate facet and adjust number of point references
_aclFacetArray.ResetInvalid();
for (std::vector<unsigned long>::const_iterator pI = raulFacets.begin(); pI != raulFacets.end(); pI++) {
for (std::vector<unsigned long>::const_iterator pI = raulFacets.begin(); pI != raulFacets.end(); ++pI) {
MeshFacet &rclFacet = _aclFacetArray[*pI];
rclFacet.SetInvalid();
_aclPointArray[rclFacet._aulPoints[0]]._ulProp--;
@ -469,7 +469,7 @@ void MeshKernel::DeleteFacets (const std::vector<unsigned long> &raulFacets)
// invalidate all unreferenced points
_aclPointArray.ResetInvalid();
for (MeshPointArray::_TIterator pP = _aclPointArray.begin(); pP != _aclPointArray.end(); pP++) {
for (MeshPointArray::_TIterator pP = _aclPointArray.begin(); pP != _aclPointArray.end(); ++pP) {
if (pP->_ulProp == 0)
pP->SetInvalid();
}
@ -523,12 +523,12 @@ bool MeshKernel::DeletePoint (const MeshPointIterator &rclIter)
void MeshKernel::DeletePoints (const std::vector<unsigned long> &raulPoints)
{
_aclPointArray.ResetInvalid();
for (std::vector<unsigned long>::const_iterator pI = raulPoints.begin(); pI != raulPoints.end(); pI++)
for (std::vector<unsigned long>::const_iterator pI = raulPoints.begin(); pI != raulPoints.end(); ++pI)
_aclPointArray[*pI].SetInvalid();
// delete facets if at least one corner point is invalid
_aclPointArray.SetProperty(0);
for (MeshFacetArray::_TIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); pF++) {
for (MeshFacetArray::_TIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); ++pF) {
MeshPoint &rclP0 = _aclPointArray[pF->_aulPoints[0]];
MeshPoint &rclP1 = _aclPointArray[pF->_aulPoints[1]];
MeshPoint &rclP2 = _aclPointArray[pF->_aulPoints[2]];
@ -545,7 +545,7 @@ void MeshKernel::DeletePoints (const std::vector<unsigned long> &raulPoints)
}
// invalidate all unreferenced points to delete them
for (MeshPointArray::_TIterator pP = _aclPointArray.begin(); pP != _aclPointArray.end(); pP++) {
for (MeshPointArray::_TIterator pP = _aclPointArray.begin(); pP != _aclPointArray.end(); ++pP) {
if (pP->_ulProp == 0)
pP->SetInvalid();
}
@ -569,16 +569,16 @@ void MeshKernel::ErasePoint (unsigned long ulIndex, unsigned long ulFacetIndex,
if (pFIter->_aulPoints[i] == ulIndex)
return; // point still referenced ==> do not delete
}
pFIter++;
++pFIter;
}
pFIter++;
++pFIter;
while (pFIter < pFEnd) {
for (i = 0; i < 3; i++) {
if (pFIter->_aulPoints[i] == ulIndex)
return; // point still referenced ==> do not delete
}
pFIter++;
++pFIter;
}
@ -593,7 +593,7 @@ void MeshKernel::ErasePoint (unsigned long ulIndex, unsigned long ulFacetIndex,
if (pFIter->_aulPoints[i] > ulIndex)
pFIter->_aulPoints[i]--;
}
pFIter++;
++pFIter;
}
}
else // only invalidate
@ -652,7 +652,7 @@ void MeshKernel::RemoveInvalids ()
pDIter = aulDecrements.begin();
ulDec = 0;
pFEnd = _aclFacetArray.end();
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; pFIter++, pDIter++) {
for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter, ++pDIter) {
*pDIter = ulDec;
if (pFIter->IsValid() == false)
ulDec++;
@ -697,7 +697,7 @@ void MeshKernel::CutFacets(const MeshFacetGrid& rclGrid, const Base::ViewProjMet
MeshAlgorithm(*this).CheckFacets(rclGrid, pclProj, rclPoly, bCutInner, aulFacets );
for (std::vector<unsigned long>::iterator i = aulFacets.begin(); i != aulFacets.end(); i++)
for (std::vector<unsigned long>::iterator i = aulFacets.begin(); i != aulFacets.end(); ++i)
raclFacets.push_back(GetFacet(*i));
DeleteFacets(aulFacets);
@ -741,7 +741,7 @@ std::vector<unsigned long> MeshKernel::HasFacets (const MeshPointIterator &rclIt
break;
}
}
pFIter++;
++pFIter;
}
return aulBelongs;

View File

@ -146,7 +146,7 @@ void SetOperations::Do ()
std::vector<MeshGeomFacet> facets;
std::vector<MeshGeomFacet>::iterator itf;
for (itf = _facetsOf[0].begin(); itf != _facetsOf[0].end(); itf++)
for (itf = _facetsOf[0].begin(); itf != _facetsOf[0].end(); ++itf)
{
if (_operationType == Difference)
{ // toggle normal
@ -157,7 +157,7 @@ void SetOperations::Do ()
facets.push_back(*itf);
}
for (itf = _facetsOf[1].begin(); itf != _facetsOf[1].end(); itf++)
for (itf = _facetsOf[1].begin(); itf != _facetsOf[1].end(); ++itf)
{
facets.push_back(*itf);
}
@ -346,7 +346,7 @@ void SetOperations::TriangulateMesh (const MeshKernel &cutMesh, int side)
// project points to 2D plane
std::vector<Vector3f>::iterator it;
std::vector<Vector3f> vertices;
for (it = points.begin(); it != points.end(); it++)
for (it = points.begin(); it != points.end(); ++it)
{
Vector3f pv = *it;
pv.TransformToCoordinateSystem(base, dirX, dirY);
@ -447,7 +447,7 @@ void SetOperations::CollectFacets (int side, float mult)
MeshBuilder mb(mesh);
mb.Initialize(_newMeshFacets[side].size());
std::vector<MeshGeomFacet>::iterator it;
for (it = _newMeshFacets[side].begin(); it != _newMeshFacets[side].end(); it++)
for (it = _newMeshFacets[side].begin(); it != _newMeshFacets[side].end(); ++it)
{
//if (it->IsFlag(MeshFacet::MARKED))
//{

View File

@ -82,10 +82,10 @@ unsigned long MeshSearchNeighbours::NeighboursFromFacet (unsigned long ulFacetId
std::set<unsigned long> aclTmp;
aclTmp.swap(_aclOuter);
for (std::set<unsigned long>::iterator pI = aclTmp.begin(); pI != aclTmp.end(); pI++) {
for (std::set<unsigned long>::iterator pI = aclTmp.begin(); pI != aclTmp.end(); ++pI) {
const std::set<unsigned long> &rclISet = _clPt2Fa[*pI];
// search all facets hanging on this point
for (std::set<unsigned long>::const_iterator pJ = rclISet.begin(); pJ != rclISet.end(); pJ++) {
for (std::set<unsigned long>::const_iterator pJ = rclISet.begin(); pJ != rclISet.end(); ++pJ) {
const MeshFacet &rclF = f_beg[*pJ];
if (rclF.IsFlag(MeshFacet::MARKED) == false) {
@ -119,7 +119,7 @@ unsigned long MeshSearchNeighbours::NeighboursFromFacet (unsigned long ulFacetId
// copy points in result container
raclResultPoints.resize(_aclResult.size());
int i = 0;
for (std::set<unsigned long>::iterator pI = _aclResult.begin(); pI != _aclResult.end(); pI++, i++)
for (std::set<unsigned long>::iterator pI = _aclResult.begin(); pI != _aclResult.end(); ++pI, i++)
raclResultPoints[i] = _rclPAry[*pI];
if (bAddPoints == true) {
@ -175,10 +175,10 @@ unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (unsigned long u
std::set<unsigned long> aclTmp;
aclTmp.swap(_aclOuter);
for (std::set<unsigned long>::iterator pI = aclTmp.begin(); pI != aclTmp.end(); pI++) {
for (std::set<unsigned long>::iterator pI = aclTmp.begin(); pI != aclTmp.end(); ++pI) {
const std::set<unsigned long> &rclISet = _clPt2Fa[*pI];
// search all facets hanging on this point
for (std::set<unsigned long>::const_iterator pJ = rclISet.begin(); pJ != rclISet.end(); pJ++) {
for (std::set<unsigned long>::const_iterator pJ = rclISet.begin(); pJ != rclISet.end(); ++pJ) {
const MeshFacet &rclF = f_beg[*pJ];
if (rclF.IsFlag(MeshFacet::MARKED) == false) {
@ -193,7 +193,7 @@ unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (unsigned long u
}
// reset marked facets
for (std::vector<MeshFacetArray::_TConstIterator>::iterator pF = aclTestedFacet.begin(); pF != aclTestedFacet.end(); pF++)
for (std::vector<MeshFacetArray::_TConstIterator>::iterator pF = aclTestedFacet.begin(); pF != aclTestedFacet.end(); ++pF)
(*pF)->ResetFlag(MeshFacet::MARKED);
// copy points in result container
@ -201,7 +201,7 @@ unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (unsigned long u
std::copy(_aclPointsResult.begin(), _aclPointsResult.end(), raclResultPoints.begin());
// facet points
for (std::set<unsigned long>::iterator pI = _aclResult.begin(); pI != _aclResult.end(); pI++) {
for (std::set<unsigned long>::iterator pI = _aclResult.begin(); pI != _aclResult.end(); ++pI) {
if (InnerPoint(_rclPAry[*pI]) == true)
raclResultPoints.push_back(_rclPAry[*pI]);
}
@ -234,7 +234,7 @@ bool MeshSearchNeighbours::AccumulateNeighbours (const MeshFacet &rclF, unsigned
std::vector<Base::Vector3f> &rclT = _aclSampledFacets[ulFIdx];
std::vector<Base::Vector3f> clTmp;
clTmp.reserve(rclT.size());
for (std::vector<Base::Vector3f>::iterator pI = rclT.begin(); pI != rclT.end(); pI++) {
for (std::vector<Base::Vector3f>::iterator pI = rclT.begin(); pI != rclT.end(); ++pI) {
if (InnerPoint(*pI) == true)
clTmp.push_back(*pI);
}
@ -249,7 +249,7 @@ bool MeshSearchNeighbours::ExpandRadius (unsigned long ulMinPoints)
{
// add facets from current level
_aclResult.insert(_aclOuter.begin(), _aclOuter.end());
for (std::set<unsigned long>::iterator pI = _aclOuter.begin(); pI != _aclOuter.end(); pI++)
for (std::set<unsigned long>::iterator pI = _aclOuter.begin(); pI != _aclOuter.end(); ++pI)
_rclPAry[*pI].SetFlag(MeshPoint::MARKED);
if (_aclResult.size() < ulMinPoints) {
@ -287,10 +287,10 @@ unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (unsigned long ulFa
std::set<unsigned long> aclTmp;
aclTmp.swap(_aclOuter);
for (std::set<unsigned long>::iterator pI = aclTmp.begin(); pI != aclTmp.end(); pI++) {
for (std::set<unsigned long>::iterator pI = aclTmp.begin(); pI != aclTmp.end(); ++pI) {
const std::set<unsigned long> &rclISet = _clPt2Fa[*pI];
// search all facets hanging on this point
for (std::set<unsigned long>::const_iterator pJ = rclISet.begin(); pJ != rclISet.end(); pJ++) {
for (std::set<unsigned long>::const_iterator pJ = rclISet.begin(); pJ != rclISet.end(); ++pJ) {
const MeshFacet &rclF = f_beg[*pJ];
for (int i = 0; i < 3; i++) {
@ -315,13 +315,13 @@ unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (unsigned long ulFa
// reset marked facets, points
for (std::vector<MeshFacetArray::_TConstIterator>::iterator pF = aclTestedFacet.begin(); pF != aclTestedFacet.end(); pF++)
(*pF)->ResetFlag(MeshFacet::MARKED);
for (std::set<unsigned long>::iterator pR = _aclResult.begin(); pR != _aclResult.end(); pR++)
for (std::set<unsigned long>::iterator pR = _aclResult.begin(); pR != _aclResult.end(); ++pR)
_rclPAry[*pR].ResetFlag(MeshPoint::MARKED);
// copy points in result container
raclResultPoints.resize(_aclResult.size());
int i = 0;
for (std::set<unsigned long>::iterator pI = _aclResult.begin(); pI != _aclResult.end(); pI++, i++)
for (std::set<unsigned long>::iterator pI = _aclResult.begin(); pI != _aclResult.end(); ++pI, i++)
raclResultPoints[i] = _rclPAry[*pI];
// copy facets in result container

View File

@ -1427,7 +1427,7 @@ void MeshComponents::SearchForComponents(TMode tMode, std::vector<std::vector<un
// all facets
std::vector<unsigned long> aulAllFacets(_rclMesh.CountFacets());
unsigned long k = 0;
for (std::vector<unsigned long>::iterator pI = aulAllFacets.begin(); pI != aulAllFacets.end(); pI++)
for (std::vector<unsigned long>::iterator pI = aulAllFacets.begin(); pI != aulAllFacets.end(); ++pI)
*pI = k++;
SearchForComponents( tMode, aulAllFacets, aclT );

View File

@ -406,7 +406,7 @@ bool QuasiDelaunayTriangulator::Triangulate()
// For each internal edge get the adjacent facets. When doing an edge swap we must update
// this structure.
std::map<std::pair<unsigned long, unsigned long>, std::vector<unsigned long> > aEdge2Face;
for (std::vector<MeshFacet>::iterator pI = _facets.begin(); pI != _facets.end(); pI++) {
for (std::vector<MeshFacet>::iterator pI = _facets.begin(); pI != _facets.end(); ++pI) {
for (int i = 0; i < 3; i++) {
unsigned long ulPt0 = std::min<unsigned long>(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]);
unsigned long ulPt1 = std::max<unsigned long>(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]);
@ -567,7 +567,7 @@ bool DelaunayTriangulator::Triangulate()
std::vector<Wm4::Vector2d> akVertex;
akVertex.reserve(_points.size());
for (std::vector<Base::Vector3f>::iterator it = _points.begin(); it != _points.end(); it++) {
for (std::vector<Base::Vector3f>::iterator it = _points.begin(); it != _points.end(); ++it) {
akVertex.push_back(Wm4::Vector2d(it->x, it->y));
}

View File

@ -83,7 +83,7 @@ void MeshTrimming::CheckFacets(const MeshFacetGrid& rclGrid, std::vector<unsigne
Base::SequencerLauncher seq("Check facets for intersection...", aulAllElements.size());
for (it = aulAllElements.begin(); it != aulAllElements.end(); it++) {
for (it = aulAllElements.begin(); it != aulAllElements.end(); ++it) {
MeshGeomFacet clFacet = myMesh.GetFacet(*it);
if (HasIntersection(clFacet))
raulFacets.push_back(*it);
@ -723,7 +723,7 @@ void MeshTrimming::TrimFacets(const std::vector<unsigned long>& raulFacets, std:
int iSide;
Base::SequencerLauncher seq("trimming facets...", raulFacets.size());
for (std::vector<unsigned long>::const_iterator it=raulFacets.begin(); it!=raulFacets.end(); it++) {
for (std::vector<unsigned long>::const_iterator it=raulFacets.begin(); it!=raulFacets.end(); ++it) {
clIntsct.clear();
if (IsPolygonPointInFacet(*it, clP) == false) {
// facet must be trimmed

View File

@ -46,7 +46,7 @@ unsigned long MeshKernel::VisitNeighbourFacets (MeshFacetVisitor &rclFVisitor, u
// as long as free neighbours
while (clCurrentLevel.size() > 0) {
// visit all neighbours of the current level
for (clCurrIter = clCurrentLevel.begin(); clCurrIter < clCurrentLevel.end(); clCurrIter++) {
for (clCurrIter = clCurrentLevel.begin(); clCurrIter < clCurrentLevel.end(); ++clCurrIter) {
clCurrFacet = _aclFacetArray.begin() + *clCurrIter;
// visit all neighbours of the current level if not yet done
@ -96,11 +96,11 @@ unsigned long MeshKernel::VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rcl
while (aclCurrentLevel.size() > 0) {
// visit all neighbours of the current level
for (std::vector<unsigned long>::iterator pCurrFacet = aclCurrentLevel.begin(); pCurrFacet < aclCurrentLevel.end(); pCurrFacet++) {
for (std::vector<unsigned long>::iterator pCurrFacet = aclCurrentLevel.begin(); pCurrFacet < aclCurrentLevel.end(); ++pCurrFacet) {
for (int i = 0; i < 3; i++) {
const MeshFacet &rclFacet = raclFAry[*pCurrFacet];
const std::set<unsigned long>& raclNB = clRPF[rclFacet._aulPoints[i]];
for (std::set<unsigned long>::const_iterator pINb = raclNB.begin(); pINb != raclNB.end(); pINb++) {
for (std::set<unsigned long>::const_iterator pINb = raclNB.begin(); pINb != raclNB.end(); ++pINb) {
if (pFBegin[*pINb].IsFlag(MeshFacet::VISIT) == false) {
// only visit if VISIT Flag not set
ulVisited++;

View File

@ -204,9 +204,9 @@ SbBool SoSFMeshObject::readValue(SoInput *in)
for (std::vector<float>::iterator it = verts.begin();
it != verts.end();) {
Base::Vector3f p;
p.x = *it; it++;
p.y = *it; it++;
p.z = *it; it++;
p.x = *it; ++it;
p.y = *it; ++it;
p.z = *it; ++it;
rPoints.push_back(p);
}
@ -220,9 +220,9 @@ SbBool SoSFMeshObject::readValue(SoInput *in)
for (std::vector<int32_t>::iterator it = faces.begin();
it != faces.end();) {
MeshCore::MeshFacet f;
f._aulPoints[0] = *it; it++;
f._aulPoints[1] = *it; it++;
f._aulPoints[2] = *it; it++;
f._aulPoints[0] = *it; ++it;
f._aulPoints[1] = *it; ++it;
f._aulPoints[2] = *it; ++it;
rFacets.push_back(f);
}

View File

@ -297,7 +297,7 @@ PyObject* getGlyphContours(FT_Face FTFont, UNICHAR currchar, double PenPos, doub
BRepBuilderAPI_Transform BRepScale(xForm);
bool bCopy = true; // no effect?
for(std::vector<TopoDS_Wire>::iterator iWire=ctx.Wires.begin();iWire != ctx.Wires.end();iWire++) {
for(std::vector<TopoDS_Wire>::iterator iWire=ctx.Wires.begin();iWire != ctx.Wires.end();++iWire) {
BRepScale.Perform(*iWire,bCopy);
if (!BRepScale.IsDone()) {
ErrorMsg << "FT2FC OCC BRepScale failed \n";

View File

@ -67,7 +67,7 @@ void Edgecluster::Perform()
Standard_Integer nbEdges = 0;
Standard_Integer nbNonEdges = 0;
std::vector<TopoDS_Edge>::iterator aVectorIt;
for (aVectorIt = m_unsortededges.begin();aVectorIt != m_unsortededges.end();aVectorIt++)
for (aVectorIt = m_unsortededges.begin();aVectorIt != m_unsortededges.end();++aVectorIt)
{
if (IsValidEdge(*aVectorIt))
{
@ -85,18 +85,19 @@ void Edgecluster::Perform()
do
{
m_edges.clear();
//Lets start with a vertice that only has one edge (that means start or end point of the merged edges!)
//Lets start with a vertice that only has one edge (that means start or end point of the merged edges!)
tMapPntEdge::iterator iter;
bool closed = true;
for(iter=m_vertices.begin();iter!=m_vertices.end();iter++)
{
if (iter->second.size()==1)
{
closed = false;
break;
}
}
if(closed)iter = m_vertices.begin();
bool closed = true;
for(iter=m_vertices.begin();iter!=m_vertices.end();++iter)
{
if (iter->second.size()==1)
{
closed = false;
break;
}
}
if(closed)
iter = m_vertices.begin();
const gp_Pnt& firstPoint = iter->first;
gp_Pnt currentPoint = firstPoint;
Standard_Boolean toContinue;

View File

@ -212,7 +212,7 @@ void PropertyGreyValueList::removeIndices( const std::vector<unsigned long>& uIn
else if (index != *pos)
remainValue.push_back( *it );
else
pos++;
++pos;
}
setValues(remainValue);
@ -415,7 +415,7 @@ void PropertyNormalList::removeIndices( const std::vector<unsigned long>& uIndic
else if (index != *pos)
remainValue.push_back( *it );
else
pos++;
++pos;
}
setValues(remainValue);
@ -541,7 +541,7 @@ void PropertyCurvatureList::removeIndices( const std::vector<unsigned long>& uIn
else if (index != *pos)
remainValue.push_back( *it );
else
pos++;
++pos;
}
setValues(remainValue);

View File

@ -183,7 +183,7 @@ void PropertyPointKernel::removeIndices( const std::vector<unsigned long>& uIndi
else if (index != *pos)
kernel.push_back( *it );
else
pos++;
++pos;
}
setValue(kernel);

View File

@ -1086,7 +1086,7 @@ int System::solve(bool isFine, Algorithm alg, bool isRedundantsolving)
}
if (res == Success) {
for (std::set<Constraint *>::const_iterator constr=redundant.begin();
constr != redundant.end(); constr++){
constr != redundant.end(); ++constr){
//DeepSOIC: there used to be a comparison of signed error value to
//convergence, which makes no sense. Potentially I fixed bug, and
//chances are low I've broken anything.
@ -2004,7 +2004,7 @@ int System::diagnose(Algorithm alg)
int maxPopularity = 0;
Constraint *mostPopular = NULL;
for (std::map< Constraint *, SET_I >::const_iterator it=conflictingMap.begin();
it != conflictingMap.end(); it++) {
it != conflictingMap.end(); ++it) {
if (static_cast<int>(it->second.size()) > maxPopularity ||
(static_cast<int>(it->second.size()) == maxPopularity && mostPopular &&
it->first->getTag() > mostPopular->getTag())) {
@ -2015,7 +2015,7 @@ int System::diagnose(Algorithm alg)
if (maxPopularity > 0) {
skipped.insert(mostPopular);
for (SET_I::const_iterator it=conflictingMap[mostPopular].begin();
it != conflictingMap[mostPopular].end(); it++)
it != conflictingMap[mostPopular].end(); ++it)
satisfiedGroups.insert(*it);
}
}
@ -2051,7 +2051,7 @@ int System::diagnose(Algorithm alg)
if (res == Success) {
subSysTmp->applySolution();
for (std::set<Constraint *>::const_iterator constr=skipped.begin();
constr != skipped.end(); constr++) {
constr != skipped.end(); ++constr) {
double err = (*constr)->error();
if (err * err < convergenceRedundant)
redundant.insert(*constr);

View File

@ -72,7 +72,7 @@ void SubSystem::initialize(VEC_pD &params, MAP_pD_pD &reductionmap)
int i=0;
MAP_pD_I pindex;
for (VEC_pD::const_iterator itt=tmpplist.begin();
itt != tmpplist.end(); itt++) {
itt != tmpplist.end(); ++itt) {
MAP_pD_pD::const_iterator itr = reductionmap.find(*itt);
if (itr != reductionmap.end()) {
MAP_pD_I::const_iterator itp = pindex.find(itr->second);