Sketcher: apply std::ranges
This commit is contained in:
@@ -332,14 +332,12 @@ Sketcher::GeoElementId GeoListModel<T>::getGeoElementIdFromVertexId(int vertexId
|
||||
template<typename T>
|
||||
int GeoListModel<T>::getVertexIdFromGeoElementId(const Sketcher::GeoElementId& geoelementId) const
|
||||
{
|
||||
if (!indexInit) { // lazy initialised
|
||||
rebuildVertexIndex();
|
||||
if (!indexInit) {
|
||||
rebuildVertexIndex(); // lazy initialised
|
||||
}
|
||||
|
||||
auto found =
|
||||
std::find(VertexId2GeoElementId.begin(), VertexId2GeoElementId.end(), geoelementId);
|
||||
|
||||
if (found != VertexId2GeoElementId.end()) {
|
||||
if (const auto found = std::ranges::find(VertexId2GeoElementId, geoelementId);
|
||||
found != VertexId2GeoElementId.end()) {
|
||||
return std::distance(found, VertexId2GeoElementId.begin());
|
||||
}
|
||||
|
||||
|
||||
@@ -361,9 +361,7 @@ void Sketch::fixParametersAndDiagnose(std::vector<double*>& params_to_block)
|
||||
{
|
||||
if (!params_to_block.empty()) { // only there are parameters to fix
|
||||
for (auto p : params_to_block) {
|
||||
auto findparam = std::find(Parameters.begin(), Parameters.end(), p);
|
||||
|
||||
if (findparam != Parameters.end()) {
|
||||
if (auto findparam = std::ranges::find(Parameters, p); findparam != Parameters.end()) {
|
||||
FixParameters.push_back(*findparam);
|
||||
Parameters.erase(findparam);
|
||||
}
|
||||
@@ -419,15 +417,11 @@ bool Sketch::analyseBlockedConstraintDependentParameters(
|
||||
|
||||
double* thisparam = *std::next(groups[i].begin(), j);
|
||||
|
||||
auto element = param2geoelement.find(thisparam);
|
||||
if (auto element = param2geoelement.find(thisparam);
|
||||
element != param2geoelement.end()) {
|
||||
|
||||
if (element != param2geoelement.end()) {
|
||||
|
||||
auto blockable = std::find(blockedGeoIds.begin(),
|
||||
blockedGeoIds.end(),
|
||||
std::get<0>(element->second));
|
||||
|
||||
if (blockable != blockedGeoIds.end()) {
|
||||
if (auto blockable = std::ranges::find(blockedGeoIds, std::get<0>(element->second));
|
||||
blockable != blockedGeoIds.end()) {
|
||||
// This dependent parameter group contains at least one parameter that should be
|
||||
// blocked, so added to the blockable list.
|
||||
prop_groups[i].blockable_params_in_group.push_back(thisparam);
|
||||
@@ -442,7 +436,7 @@ bool Sketch::analyseBlockedConstraintDependentParameters(
|
||||
for (size_t j = prop_groups[i].blockable_params_in_group.size(); j-- > 0;) {
|
||||
// check if parameter is already satisfying one group
|
||||
double* thisparam = prop_groups[i].blockable_params_in_group[j];
|
||||
auto pos = std::find(params_to_block.begin(), params_to_block.end(), thisparam);
|
||||
auto pos = std::ranges::find(params_to_block, thisparam);
|
||||
|
||||
if (pos == params_to_block.end()) { // not found, so add
|
||||
params_to_block.push_back(thisparam);
|
||||
@@ -2959,7 +2953,7 @@ int Sketch::addTangentLineAtBSplineKnotConstraint(int checkedlinegeoId,
|
||||
|
||||
size_t knotindex = b.knots.size();
|
||||
|
||||
auto knotIt = std::find(b.knotpointGeoids.begin(), b.knotpointGeoids.end(), checkedknotgeoid);
|
||||
const auto knotIt = std::ranges::find(b.knotpointGeoids, checkedknotgeoid);
|
||||
|
||||
knotindex = std::distance(b.knotpointGeoids.begin(), knotIt);
|
||||
|
||||
@@ -3012,7 +3006,7 @@ int Sketch::addTangentLineEndpointAtBSplineKnotConstraint(int checkedlinegeoId,
|
||||
|
||||
size_t knotindex = b.knots.size();
|
||||
|
||||
auto knotIt = std::find(b.knotpointGeoids.begin(), b.knotpointGeoids.end(), checkedknotgeoid);
|
||||
auto knotIt = std::ranges::find(b.knotpointGeoids, checkedknotgeoid);
|
||||
|
||||
knotindex = std::distance(b.knotpointGeoids.begin(), knotIt);
|
||||
|
||||
@@ -4570,9 +4564,7 @@ bool Sketch::updateNonDrivingConstraints()
|
||||
rad = a.rad;
|
||||
}
|
||||
|
||||
auto pos = std::find(FixParameters.begin(), FixParameters.end(), rad);
|
||||
|
||||
if (pos != FixParameters.end()) {
|
||||
if (auto pos = std::ranges::find(FixParameters, rad); pos != FixParameters.end()) {
|
||||
(*it).constr->setValue(*((*it).value));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1846,7 +1846,7 @@ int SketchObject::delGeometries(InputIt first, InputIt last)
|
||||
// if a GeoId has internal geometry, it must delete internal geometries too
|
||||
for (auto c : Constraints.getValues()) {
|
||||
if (c->Type == InternalAlignment) {
|
||||
auto pos = std::find(sGeoIds.begin(), sGeoIds.end(), c->Second);
|
||||
auto pos = std::ranges::find(sGeoIds, c->Second);
|
||||
|
||||
if (pos != sGeoIds.end()) {
|
||||
sGeoIds.push_back(c->First);
|
||||
@@ -1854,7 +1854,7 @@ int SketchObject::delGeometries(InputIt first, InputIt last)
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(sGeoIds.begin(), sGeoIds.end());
|
||||
std::ranges::sort(sGeoIds);
|
||||
// eliminate duplicates
|
||||
auto newend = std::unique(sGeoIds.begin(), sGeoIds.end());
|
||||
sGeoIds.resize(std::distance(sGeoIds.begin(), newend));
|
||||
@@ -1866,7 +1866,7 @@ int SketchObject::delGeometriesExclusiveList(const std::vector<int>& GeoIds)
|
||||
{
|
||||
std::vector<int> sGeoIds(GeoIds);
|
||||
|
||||
std::sort(sGeoIds.begin(), sGeoIds.end());
|
||||
std::ranges::sort(sGeoIds);
|
||||
if (sGeoIds.empty())
|
||||
return 0;
|
||||
|
||||
@@ -4925,7 +4925,7 @@ std::vector<Part::Geometry*> SketchObject::getSymmetric(const std::vector<int>&
|
||||
}
|
||||
}
|
||||
// Return true if definedGeo is in geoIdList, false otherwise
|
||||
return std::find(geoIdList.begin(), geoIdList.end(), definedGeo) != geoIdList.end();
|
||||
return std::ranges::find(geoIdList, definedGeo) != geoIdList.end();
|
||||
}
|
||||
// Return true if not internal aligned, indicating it should always be copied
|
||||
return true;
|
||||
@@ -5358,8 +5358,7 @@ int SketchObject::addCopy(const std::vector<int>& geoIdList, const Base::Vector3
|
||||
}
|
||||
}
|
||||
|
||||
if (std::find(newgeoIdList.begin(), newgeoIdList.end(), definedGeo)
|
||||
== newgeoIdList.end()) {
|
||||
if (std::ranges::find(newgeoIdList, definedGeo) == newgeoIdList.end()) {
|
||||
// the first element setting the reference is an internal alignment
|
||||
// geometry, wherein the geometry it defines is not part of the copy
|
||||
// operation.
|
||||
@@ -5414,7 +5413,7 @@ int SketchObject::addCopy(const std::vector<int>& geoIdList, const Base::Vector3
|
||||
}
|
||||
}
|
||||
|
||||
if (std::find(newgeoIdList.begin(), newgeoIdList.end(), definedGeo)
|
||||
if (std::ranges::find(newgeoIdList, definedGeo)
|
||||
== newgeoIdList.end()) {
|
||||
// we should not copy internal alignment geometry, unless the element they
|
||||
// define is also mirrored
|
||||
@@ -7184,7 +7183,7 @@ bool SketchObject::modifyBSplineKnotMultiplicity(int GeoId, int knotIndex, int m
|
||||
indexInNew[Sketcher::BSplineKnotPoint].reserve(knots.size());
|
||||
|
||||
for (const auto& pole : poles) {
|
||||
const auto it = std::find(newPoles.begin(), newPoles.end(), pole);
|
||||
const auto it = std::ranges::find(newPoles, pole);
|
||||
indexInNew[Sketcher::BSplineControlPoint].emplace_back(it - newPoles.begin());
|
||||
}
|
||||
std::replace(indexInNew[Sketcher::BSplineControlPoint].begin(),
|
||||
@@ -7193,7 +7192,7 @@ bool SketchObject::modifyBSplineKnotMultiplicity(int GeoId, int knotIndex, int m
|
||||
-1);
|
||||
|
||||
for (const auto& knot : knots) {
|
||||
const auto it = std::find(newKnots.begin(), newKnots.end(), knot);
|
||||
const auto it = std::ranges::find(newKnots, knot);
|
||||
indexInNew[Sketcher::BSplineKnotPoint].emplace_back(it - newKnots.begin());
|
||||
}
|
||||
std::replace(indexInNew[Sketcher::BSplineKnotPoint].begin(),
|
||||
@@ -7319,7 +7318,7 @@ bool SketchObject::insertBSplineKnot(int GeoId, double param, int multiplicity)
|
||||
std::vector<int> poleIndexInNew(poles.size(), -1);
|
||||
|
||||
for (size_t j = 0; j < poles.size(); j++) {
|
||||
const auto it = std::find(newPoles.begin(), newPoles.end(), poles[j]);
|
||||
const auto it = std::ranges::find(newPoles, poles[j]);
|
||||
poleIndexInNew[j] = it - newPoles.begin();
|
||||
}
|
||||
std::replace(poleIndexInNew.begin(), poleIndexInNew.end(), int(newPoles.size()), -1);
|
||||
@@ -7329,7 +7328,7 @@ bool SketchObject::insertBSplineKnot(int GeoId, double param, int multiplicity)
|
||||
std::vector<int> knotIndexInNew(knots.size(), -1);
|
||||
|
||||
for (size_t j = 0; j < knots.size(); j++) {
|
||||
const auto it = std::find(newKnots.begin(), newKnots.end(), knots[j]);
|
||||
const auto it = std::ranges::find(newKnots, knots[j]);
|
||||
knotIndexInNew[j] = it - newKnots.begin();
|
||||
}
|
||||
std::replace(knotIndexInNew.begin(), knotIndexInNew.end(), int(newKnots.size()), -1);
|
||||
|
||||
@@ -574,7 +574,7 @@ int System::addConstraint(Constraint* constr)
|
||||
void System::removeConstraint(Constraint* constr)
|
||||
{
|
||||
std::vector<Constraint*>::iterator it;
|
||||
it = std::find(clist.begin(), clist.end(), constr);
|
||||
it = std::ranges::find(clist, constr);
|
||||
if (it == clist.end()) {
|
||||
return;
|
||||
}
|
||||
@@ -589,7 +589,7 @@ void System::removeConstraint(Constraint* constr)
|
||||
for (VEC_pD::const_iterator param = constr_params.begin(); param != constr_params.end();
|
||||
++param) {
|
||||
std::vector<Constraint*>& constraints = p2c[*param];
|
||||
it = std::find(constraints.begin(), constraints.end(), constr);
|
||||
it = std::ranges::find(constraints, constr);
|
||||
constraints.erase(it);
|
||||
}
|
||||
c2p.erase(constr);
|
||||
@@ -2588,7 +2588,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
|
||||
int ips = 0;
|
||||
for (VEC_pD::iterator it = plistout.begin(); it != plistout.end(); ++it, ++ips) {
|
||||
VEC_pD::iterator p = std::find(plist.begin(), plist.end(), (*it));
|
||||
VEC_pD::iterator p = std::ranges::find(plist, (*it));
|
||||
size_t p_index = std::distance(plist.begin(), p);
|
||||
|
||||
if (p_index == plist.size()) {
|
||||
@@ -2605,14 +2605,13 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
|
||||
switch ((*it)->getTypeId()) {
|
||||
case Equal: { // 2
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -2630,8 +2629,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -2656,16 +2654,15 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case Difference: { // 3
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -2683,8 +2680,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -2702,8 +2698,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -2730,11 +2725,11 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case P2PDistance: { // 5
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -2742,8 +2737,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i5 = std::distance(plist.begin(), p5);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -2761,8 +2755,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -2780,8 +2773,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -2799,8 +2791,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -2818,8 +2809,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -2862,11 +2852,11 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case P2PAngle: { // 5
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -2874,8 +2864,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i5 = std::distance(plist.begin(), p5);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -2893,8 +2882,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -2912,8 +2900,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -2931,8 +2918,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -2950,8 +2936,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -2994,13 +2979,13 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case P2LDistance: { // 7
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::find(plist.begin(), plist.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::ranges::find(plist, (*it)->pvec[6]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -3010,8 +2995,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i7 = std::distance(plist.begin(), p7);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -3029,8 +3013,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -3048,8 +3031,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -3067,8 +3049,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -3086,8 +3067,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -3105,8 +3085,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -3124,8 +3103,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb7 = false;
|
||||
VEC_pD::iterator np7 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator np7 = std::ranges::find(clist_params_, (*it)->pvec[6]);
|
||||
size_t ni7 = std::distance(clist_params_.begin(), np7);
|
||||
|
||||
if (i7 == plist.size()) {
|
||||
@@ -3175,12 +3153,12 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case PointOnLine: { // 6
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -3189,8 +3167,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i6 = std::distance(plist.begin(), p6);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -3208,8 +3185,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -3227,8 +3203,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -3246,8 +3221,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -3265,8 +3239,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -3284,8 +3257,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -3331,12 +3303,12 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case PointOnPerpBisector: { // 6
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -3345,8 +3317,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i6 = std::distance(plist.begin(), p6);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -3364,8 +3335,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -3383,8 +3353,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -3402,8 +3371,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -3421,8 +3389,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -3440,8 +3407,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -3487,14 +3453,14 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case Parallel: { // 8
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::find(plist.begin(), plist.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::find(plist.begin(), plist.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::ranges::find(plist, (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::ranges::find(plist, (*it)->pvec[7]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -3505,8 +3471,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i8 = std::distance(plist.begin(), p8);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -3524,8 +3489,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -3543,8 +3507,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -3562,8 +3525,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -3581,8 +3543,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -3600,8 +3561,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -3619,8 +3579,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb7 = false;
|
||||
VEC_pD::iterator np7 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator np7 = std::ranges::find(clist_params_, (*it)->pvec[6]);
|
||||
size_t ni7 = std::distance(clist_params_.begin(), np7);
|
||||
|
||||
if (i7 == plist.size()) {
|
||||
@@ -3638,8 +3597,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb8 = false;
|
||||
VEC_pD::iterator np8 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator np8 = std::ranges::find(clist_params_, (*it)->pvec[7]);
|
||||
size_t ni8 = std::distance(clist_params_.begin(), np8);
|
||||
|
||||
if (i8 == plist.size()) {
|
||||
@@ -3692,14 +3650,14 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case Perpendicular: { // 8
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::find(plist.begin(), plist.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::find(plist.begin(), plist.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::ranges::find(plist, (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::ranges::find(plist, (*it)->pvec[7]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -3710,8 +3668,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i8 = std::distance(plist.begin(), p8);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -3729,8 +3686,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -3748,8 +3704,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -3767,8 +3722,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -3786,8 +3740,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -3805,8 +3758,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -3824,8 +3776,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb7 = false;
|
||||
VEC_pD::iterator np7 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator np7 = std::ranges::find(clist_params_, (*it)->pvec[6]);
|
||||
size_t ni7 = std::distance(clist_params_.begin(), np7);
|
||||
|
||||
if (i7 == plist.size()) {
|
||||
@@ -3843,8 +3794,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb8 = false;
|
||||
VEC_pD::iterator np8 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator np8 = std::ranges::find(clist_params_, (*it)->pvec[7]);
|
||||
size_t ni8 = std::distance(clist_params_.begin(), np8);
|
||||
|
||||
if (i8 == plist.size()) {
|
||||
@@ -3897,15 +3847,15 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case L2LAngle: { // 9
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::find(plist.begin(), plist.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::find(plist.begin(), plist.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator p9 = std::find(plist.begin(), plist.end(), (*it)->pvec[8]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::ranges::find(plist, (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::ranges::find(plist, (*it)->pvec[7]);
|
||||
VEC_pD::iterator p9 = std::ranges::find(plist, (*it)->pvec[8]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -3917,8 +3867,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i9 = std::distance(plist.begin(), p9);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -3936,8 +3885,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -3955,8 +3903,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -3974,8 +3921,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -3993,8 +3939,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -4012,8 +3957,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -4031,8 +3975,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb7 = false;
|
||||
VEC_pD::iterator np7 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator np7 = std::ranges::find(clist_params_, (*it)->pvec[6]);
|
||||
size_t ni7 = std::distance(clist_params_.begin(), np7);
|
||||
|
||||
if (i7 == plist.size()) {
|
||||
@@ -4050,8 +3993,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb8 = false;
|
||||
VEC_pD::iterator np8 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator np8 = std::ranges::find(clist_params_, (*it)->pvec[7]);
|
||||
size_t ni8 = std::distance(clist_params_.begin(), np8);
|
||||
|
||||
if (i8 == plist.size()) {
|
||||
@@ -4069,8 +4011,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb9 = false;
|
||||
VEC_pD::iterator np9 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[8]);
|
||||
VEC_pD::iterator np9 = std::ranges::find(clist_params_, (*it)->pvec[8]);
|
||||
size_t ni9 = std::distance(clist_params_.begin(), np9);
|
||||
|
||||
if (i9 == plist.size()) {
|
||||
@@ -4126,14 +4067,14 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case MidpointOnLine: { // 8
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::find(plist.begin(), plist.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::find(plist.begin(), plist.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::ranges::find(plist, (*it)->pvec[6]);
|
||||
VEC_pD::iterator p8 = std::ranges::find(plist, (*it)->pvec[7]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -4144,8 +4085,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i8 = std::distance(plist.begin(), p8);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -4163,8 +4103,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -4182,8 +4121,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -4201,8 +4139,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -4220,8 +4157,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -4239,8 +4175,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -4258,8 +4193,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb7 = false;
|
||||
VEC_pD::iterator np7 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator np7 = std::ranges::find(clist_params_, (*it)->pvec[6]);
|
||||
size_t ni7 = std::distance(clist_params_.begin(), np7);
|
||||
|
||||
if (i7 == plist.size()) {
|
||||
@@ -4277,8 +4211,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb8 = false;
|
||||
VEC_pD::iterator np8 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[7]);
|
||||
VEC_pD::iterator np8 = std::ranges::find(clist_params_, (*it)->pvec[7]);
|
||||
size_t ni8 = std::distance(clist_params_.begin(), np8);
|
||||
|
||||
if (i8 == plist.size()) {
|
||||
@@ -4331,12 +4264,12 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case TangentCircumf: { // 6
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -4345,8 +4278,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i6 = std::distance(plist.begin(), p6);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -4364,8 +4296,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -4383,8 +4314,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -4402,8 +4332,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -4421,8 +4350,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -4440,8 +4368,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -4491,13 +4418,13 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
break;
|
||||
}
|
||||
case PointOnEllipse: { // 7
|
||||
VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::find(plist.begin(), plist.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::find(plist.begin(), plist.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::find(plist.begin(), plist.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::find(plist.begin(), plist.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator p1 = std::ranges::find(plist, (*it)->pvec[0]);
|
||||
VEC_pD::iterator p2 = std::ranges::find(plist, (*it)->pvec[1]);
|
||||
VEC_pD::iterator p3 = std::ranges::find(plist, (*it)->pvec[2]);
|
||||
VEC_pD::iterator p4 = std::ranges::find(plist, (*it)->pvec[3]);
|
||||
VEC_pD::iterator p5 = std::ranges::find(plist, (*it)->pvec[4]);
|
||||
VEC_pD::iterator p6 = std::ranges::find(plist, (*it)->pvec[5]);
|
||||
VEC_pD::iterator p7 = std::ranges::find(plist, (*it)->pvec[6]);
|
||||
size_t i1 = std::distance(plist.begin(), p1);
|
||||
size_t i2 = std::distance(plist.begin(), p2);
|
||||
size_t i3 = std::distance(plist.begin(), p3);
|
||||
@@ -4507,8 +4434,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
size_t i7 = std::distance(plist.begin(), p7);
|
||||
|
||||
bool npb1 = false;
|
||||
VEC_pD::iterator np1 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[0]);
|
||||
VEC_pD::iterator np1 = std::ranges::find(clist_params_, (*it)->pvec[0]);
|
||||
size_t ni1 = std::distance(clist_params_.begin(), np1);
|
||||
|
||||
if (i1 == plist.size()) {
|
||||
@@ -4526,8 +4452,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb2 = false;
|
||||
VEC_pD::iterator np2 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[1]);
|
||||
VEC_pD::iterator np2 = std::ranges::find(clist_params_, (*it)->pvec[1]);
|
||||
size_t ni2 = std::distance(clist_params_.begin(), np2);
|
||||
|
||||
if (i2 == plist.size()) {
|
||||
@@ -4545,8 +4470,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb3 = false;
|
||||
VEC_pD::iterator np3 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[2]);
|
||||
VEC_pD::iterator np3 = std::ranges::find(clist_params_, (*it)->pvec[2]);
|
||||
size_t ni3 = std::distance(clist_params_.begin(), np3);
|
||||
|
||||
if (i3 == plist.size()) {
|
||||
@@ -4564,8 +4488,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb4 = false;
|
||||
VEC_pD::iterator np4 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[3]);
|
||||
VEC_pD::iterator np4 = std::ranges::find(clist_params_, (*it)->pvec[3]);
|
||||
size_t ni4 = std::distance(clist_params_.begin(), np4);
|
||||
|
||||
if (i4 == plist.size()) {
|
||||
@@ -4583,8 +4506,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb5 = false;
|
||||
VEC_pD::iterator np5 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[4]);
|
||||
VEC_pD::iterator np5 = std::ranges::find(clist_params_, (*it)->pvec[4]);
|
||||
size_t ni5 = std::distance(clist_params_.begin(), np5);
|
||||
|
||||
if (i5 == plist.size()) {
|
||||
@@ -4602,8 +4524,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb6 = false;
|
||||
VEC_pD::iterator np6 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[5]);
|
||||
VEC_pD::iterator np6 = std::ranges::find(clist_params_, (*it)->pvec[5]);
|
||||
size_t ni6 = std::distance(clist_params_.begin(), np6);
|
||||
|
||||
if (i6 == plist.size()) {
|
||||
@@ -4621,8 +4542,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving)
|
||||
}
|
||||
|
||||
bool npb7 = false;
|
||||
VEC_pD::iterator np7 =
|
||||
std::find(clist_params_.begin(), clist_params_.end(), (*it)->pvec[6]);
|
||||
VEC_pD::iterator np7 = std::ranges::find(clist_params_, (*it)->pvec[6]);
|
||||
size_t ni7 = std::distance(clist_params_.begin(), np7);
|
||||
|
||||
if (i7 == plist.size()) {
|
||||
|
||||
@@ -607,16 +607,15 @@ void CmdSketcherMapSketch::activated(int iMsg)
|
||||
* in its own outlist, so we remove it from the dialog list proactively
|
||||
* rather than wait and generate an error after the fact.
|
||||
*/
|
||||
auto newEnd = std::remove_if(sketches.begin(), sketches.end(),
|
||||
const auto newEnd = std::ranges::remove_if(sketches,
|
||||
[&selectedSketches, &sketchInSelection](App::DocumentObject* obj) {
|
||||
Part::Part2DObject* sketch = dynamic_cast<Part::Part2DObject*>(obj);
|
||||
if (sketch && std::find(selectedSketches.begin(),
|
||||
selectedSketches.end(), sketch) != selectedSketches.end()) {
|
||||
if (const auto sketch = dynamic_cast<Part::Part2DObject*>(obj);
|
||||
sketch && std::ranges::find(selectedSketches, sketch) != selectedSketches.end()) {
|
||||
sketchInSelection = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}).begin();
|
||||
sketches.erase(newEnd, sketches.end());
|
||||
|
||||
if (sketches.empty()) {
|
||||
@@ -665,8 +664,8 @@ void CmdSketcherMapSketch::activated(int iMsg)
|
||||
throw Base::ValueError(
|
||||
"Unexpected null pointer in CmdSketcherMapSketch::activated");
|
||||
}
|
||||
std::vector<App::DocumentObject*> input = part->getOutListRecursive();
|
||||
if (std::find(input.begin(), input.end(), sketch) != input.end()) {
|
||||
if (std::vector<App::DocumentObject*> input = part->getOutListRecursive();
|
||||
std::ranges::find(input, sketch) != input.end()) {
|
||||
throw ExceptionWrongInput(
|
||||
QT_TR_NOOP("Some of the selected objects depend on the sketch to be mapped. "
|
||||
"Circular dependencies are not allowed."));
|
||||
@@ -685,9 +684,9 @@ void CmdSketcherMapSketch::activated(int iMsg)
|
||||
bool bAttach = true;
|
||||
bool bCurIncompatible = false;
|
||||
// * find out the modes that are compatible with selection.
|
||||
eMapMode curMapMode = eMapMode(sketch->MapMode.getValue());
|
||||
const auto curMapMode = eMapMode(sketch->MapMode.getValue());
|
||||
// * Test if current mode is OK.
|
||||
if (std::find(validModes.begin(), validModes.end(), curMapMode) == validModes.end())
|
||||
if (std::ranges::find(validModes, curMapMode) == validModes.end())
|
||||
bCurIncompatible = true;
|
||||
|
||||
// * fill in the dialog
|
||||
|
||||
@@ -112,14 +112,14 @@ std::vector<int> getListOfSelectedGeoIds(bool forceInternalSelection)
|
||||
}
|
||||
|
||||
if (forceInternalSelection) {
|
||||
size_t loopSize = listOfGeoIds.size();
|
||||
const size_t loopSize = listOfGeoIds.size();
|
||||
for (size_t i = 0; i < loopSize; i++) {
|
||||
const Part::Geometry* geo = Obj->getGeometry(listOfGeoIds[i]);
|
||||
if (isEllipse(*geo) || isArcOfEllipse(*geo) || isArcOfHyperbola(*geo) || isArcOfParabola(*geo) || isBSplineCurve(*geo)) {
|
||||
const std::vector<Sketcher::Constraint*>& constraints = Obj->Constraints.getValues();
|
||||
for (auto constr : constraints) {
|
||||
for (const auto constr : constraints) {
|
||||
if (constr->Type == InternalAlignment && constr->Second == listOfGeoIds[i]) {
|
||||
if (std::find(listOfGeoIds.begin(), listOfGeoIds.end(), constr->First) == listOfGeoIds.end()) {
|
||||
if (std::ranges::find(listOfGeoIds, constr->First) == listOfGeoIds.end()) {
|
||||
// If the value is not found, add it to the vector
|
||||
listOfGeoIds.push_back(constr->First);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ bool copySelectionToClipboard(Sketcher::SketchObject* obj) {
|
||||
for (auto constr : obj->Constraints.getValues()) {
|
||||
|
||||
auto isSelectedGeoOrAxis = [](const std::vector<int>& vec, int value) {
|
||||
return (std::find(vec.begin(), vec.end(), value) != vec.end())
|
||||
return (std::ranges::find(vec, value) != vec.end())
|
||||
|| value == GeoEnum::GeoUndef || value == GeoEnum::RtPnt
|
||||
|| value == GeoEnum::VAxis || value == GeoEnum::HAxis;
|
||||
};
|
||||
|
||||
@@ -570,13 +570,12 @@ void EditModeCoinManager::drawEditMarkers(const std::vector<Base::Vector2d>& Edi
|
||||
|
||||
auto supportedsizes = Gui::Inventor::MarkerBitmaps::getSupportedSizes("CIRCLE_LINE");
|
||||
|
||||
auto defaultmarker =
|
||||
std::find(supportedsizes.begin(), supportedsizes.end(), drawingParameters.markerSize);
|
||||
const auto defaultmarker = std::ranges::find(supportedsizes, drawingParameters.markerSize);
|
||||
|
||||
if (defaultmarker != supportedsizes.end()) {
|
||||
auto validAugmentationLevels = std::distance(defaultmarker, supportedsizes.end());
|
||||
|
||||
if (augmentationlevel >= validAugmentationLevels) {
|
||||
if (const auto validAugmentationLevels = std::distance(defaultmarker, supportedsizes.end());
|
||||
augmentationlevel >= validAugmentationLevels) {
|
||||
augmentationlevel = validAugmentationLevels - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -525,10 +525,9 @@ struct CoinMapping
|
||||
{
|
||||
|
||||
for (size_t l = 0; l < PointIdToVertexId.size(); l++) {
|
||||
auto indexit =
|
||||
std::find(PointIdToVertexId[l].begin(), PointIdToVertexId[l].end(), vertexId);
|
||||
|
||||
if (indexit != PointIdToVertexId[l].end()) {
|
||||
if (auto indexit = std::ranges::find(PointIdToVertexId[l], vertexId);
|
||||
indexit != PointIdToVertexId[l].end()) {
|
||||
return MultiFieldId(std::distance(PointIdToVertexId[l].begin(), indexit), l);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,8 +87,7 @@ TaskDlgEditSketch::~TaskDlgEditSketch()
|
||||
{
|
||||
// to make sure to delete the advanced solver panel
|
||||
// it must be part to the 'Content' array
|
||||
std::vector<QWidget*>::iterator it = std::find(Content.begin(), Content.end(), SolverAdvanced);
|
||||
if (it == Content.end()) {
|
||||
if (const auto it = std::ranges::find(Content, SolverAdvanced); it == Content.end()) {
|
||||
Content.push_back(SolverAdvanced);
|
||||
}
|
||||
|
||||
|
||||
@@ -1103,7 +1103,7 @@ void TaskSketcherConstraints::changeFilteredVisibility(bool show, ActionTarget t
|
||||
processItem = !item->isHidden();
|
||||
}
|
||||
else if (target == ActionTarget::Selected) {
|
||||
if (std::find(selecteditems.begin(), selecteditems.end(), item) != selecteditems.end())
|
||||
if (std::ranges::find(selecteditems, item) != selecteditems.end())
|
||||
processItem = true;
|
||||
}
|
||||
|
||||
@@ -1653,13 +1653,10 @@ bool TaskSketcherConstraints::isConstraintFiltered(QListWidgetItem* item)
|
||||
|
||||
// Then we re-filter based on selected/associated if such mode selected.
|
||||
if (visible && specialFilterMode == SpecialFilterType::Selected) {
|
||||
visible = (std::find(selectionFilter.begin(), selectionFilter.end(), it->ConstraintNbr)
|
||||
!= selectionFilter.end());
|
||||
visible = (std::ranges::find(selectionFilter, it->ConstraintNbr) != selectionFilter.end());
|
||||
}
|
||||
else if (visible && specialFilterMode == SpecialFilterType::Associated) {
|
||||
visible = (std::find(associatedConstraintsFilter.begin(),
|
||||
associatedConstraintsFilter.end(),
|
||||
it->ConstraintNbr)
|
||||
visible = (std::ranges::find(associatedConstraintsFilter, it->ConstraintNbr)
|
||||
!= associatedConstraintsFilter.end());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1275,7 +1275,7 @@ void ViewProviderSketch::toggleWireSelelection(int clickedGeoId)
|
||||
while (partHasBeenAdded) {
|
||||
partHasBeenAdded = false;
|
||||
for (int geoId = 0; geoId <= obj->getHighestCurveIndex(); geoId++) {
|
||||
if (geoId == clickedGeoId || std::find(connectedEdges.begin(), connectedEdges.end(), geoId) != connectedEdges.end()) {
|
||||
if (geoId == clickedGeoId || std::ranges::find(connectedEdges, geoId) != connectedEdges.end()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2711,10 +2711,9 @@ void ViewProviderSketch::scaleBSplinePoleCirclesAndUpdateSolverAndSketchObjectGe
|
||||
|
||||
for (auto ic : getSketchObject()->Constraints.getValues()) {
|
||||
if (ic->Type == Weight) {
|
||||
auto pos = std::find(
|
||||
polegeoids.begin(), polegeoids.end(), ic->First);
|
||||
|
||||
if (pos != polegeoids.end()) {
|
||||
if (auto pos = std::ranges::find(polegeoids, ic->First);
|
||||
pos != polegeoids.end()) {
|
||||
vradius = ic->getValue() * scalefactor;
|
||||
break;// one is enough, otherwise it would not be
|
||||
// non-rational
|
||||
|
||||
Reference in New Issue
Block a user