[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
committed by
WandererFan
parent
c469601f95
commit
222a2520b1
@@ -82,9 +82,9 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
// when that functionality is provided, be added to the first visible layer, or may even a new
|
||||
// empty layer.
|
||||
Points[0].emplace_back(0., 0., 0.);
|
||||
coinMapping.PointIdToGeoId[0].push_back(-1);// root point
|
||||
coinMapping.PointIdToGeoId[0].push_back(-1); // root point
|
||||
coinMapping.PointIdToVertexId[0].push_back(
|
||||
-1);// VertexId is the reference used for point selection/preselection
|
||||
-1); // VertexId is the reference used for point selection/preselection
|
||||
|
||||
coinMapping.GeoElementId2SetId.emplace(std::piecewise_construct,
|
||||
std::forward_as_tuple(Sketcher::GeoElementId::RtPnt),
|
||||
@@ -149,7 +149,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
coinMapping.PointIdToVertexId[coinLayer].push_back(vertexCounter++);
|
||||
}
|
||||
|
||||
if (numberCurves > 0) {// insert the first segment of the curve into the map
|
||||
if (numberCurves > 0) { // insert the first segment of the curve into the map
|
||||
coinMapping.GeoElementId2SetId.emplace(
|
||||
std::piecewise_construct,
|
||||
std::forward_as_tuple(geoId, Sketcher::PointPos::none),
|
||||
@@ -172,7 +172,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
|
||||
auto coinLayer = geometryLayerParameters.getSafeCoinLayer(layerId);
|
||||
|
||||
if (type == Part::GeomPoint::getClassTypeId()) {// add a point
|
||||
if (type == Part::GeomPoint::getClassTypeId()) { // add a point
|
||||
convert<Part::GeomPoint,
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertSingle,
|
||||
EditModeGeometryCoinConverter::CurveMode::NoCurve,
|
||||
@@ -182,7 +182,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertSingle,
|
||||
0);
|
||||
}
|
||||
else if (type == Part::GeomLineSegment::getClassTypeId()) {// add a line
|
||||
else if (type == Part::GeomLineSegment::getClassTypeId()) { // add a line
|
||||
convert<Part::GeomLineSegment,
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertStartEnd,
|
||||
EditModeGeometryCoinConverter::CurveMode::StartEndPointsOnly,
|
||||
@@ -192,7 +192,8 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertStartEnd,
|
||||
1);
|
||||
}
|
||||
else if (type.isDerivedFrom(Part::GeomConic::getClassTypeId())) {// add a closed curve conic
|
||||
else if (type.isDerivedFrom(
|
||||
Part::GeomConic::getClassTypeId())) { // add a closed curve conic
|
||||
convert<Part::GeomConic,
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertMidOnly,
|
||||
EditModeGeometryCoinConverter::CurveMode::ClosedCurve,
|
||||
@@ -202,7 +203,8 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertMidOnly,
|
||||
1);
|
||||
}
|
||||
else if (type.isDerivedFrom(Part::GeomArcOfConic::getClassTypeId())) {// add an arc of conic
|
||||
else if (type.isDerivedFrom(
|
||||
Part::GeomArcOfConic::getClassTypeId())) { // add an arc of conic
|
||||
convert<Part::GeomArcOfConic,
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertStartEndMid,
|
||||
EditModeGeometryCoinConverter::CurveMode::OpenCurve,
|
||||
@@ -213,8 +215,8 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
1);
|
||||
arcGeoIds.push_back(GeoId);
|
||||
}
|
||||
else if (type == Part::GeomBSplineCurve::getClassTypeId()) {// add a bspline (a bounded
|
||||
// curve that is not a conic)
|
||||
else if (type == Part::GeomBSplineCurve::getClassTypeId()) { // add a bspline (a bounded
|
||||
// curve that is not a conic)
|
||||
convert<Part::GeomBSplineCurve,
|
||||
EditModeGeometryCoinConverter::PointsMode::InsertStartEnd,
|
||||
EditModeGeometryCoinConverter::CurveMode::OpenCurve,
|
||||
@@ -241,7 +243,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
int32_t* index = geometryLayerNodes.CurveSet[l]->numVertices.startEditing();
|
||||
SbVec3f* pverts = geometryLayerNodes.PointsCoordinate[l]->point.startEditing();
|
||||
|
||||
int i = 0;// setting up the line set
|
||||
int i = 0; // setting up the line set
|
||||
for (std::vector<Base::Vector3d>::const_iterator it = Coords[l].begin();
|
||||
it != Coords[l].end();
|
||||
++it, i++) {
|
||||
@@ -251,13 +253,13 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli
|
||||
* drawingParameters.zLowLines);
|
||||
}
|
||||
|
||||
i = 0;// setting up the indexes of the line set
|
||||
i = 0; // setting up the indexes of the line set
|
||||
for (std::vector<unsigned int>::const_iterator it = Index[l].begin(); it != Index[l].end();
|
||||
++it, i++) {
|
||||
index[i] = *it;
|
||||
}
|
||||
|
||||
i = 0;// setting up the point set
|
||||
i = 0; // setting up the point set
|
||||
for (std::vector<Base::Vector3d>::const_iterator it = Points[l].begin();
|
||||
it != Points[l].end();
|
||||
++it, i++) {
|
||||
@@ -340,7 +342,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom
|
||||
else if constexpr (curvemode == CurveMode::OpenCurve) {
|
||||
int numSegments = drawingParameters.curvedEdgeCountSegments;
|
||||
if constexpr (std::is_same<GeoType, Part::GeomBSplineCurve>::value) {
|
||||
numSegments *= (geo->countKnots() - 1);// one less segments than knots
|
||||
numSegments *= (geo->countKnots() - 1); // one less segments than knots
|
||||
}
|
||||
|
||||
double segment = (geo->getLastParameter() - geo->getFirstParameter()) / numSegments;
|
||||
@@ -399,7 +401,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom
|
||||
Base::Console().DeveloperError(
|
||||
"EditModeGeometryCoinConverter",
|
||||
"Curvature graph for B-Spline with GeoId=%d could not be calculated.\n",
|
||||
geoid);// TODO: Fix identification of curve.
|
||||
geoid); // TODO: Fix identification of curve.
|
||||
curvaturelist[i] = 0;
|
||||
}
|
||||
|
||||
@@ -417,7 +419,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom
|
||||
double temprepscale = 0;
|
||||
if (maxcurv > 0) {
|
||||
temprepscale = (0.5 * maxdisttocenterofmass)
|
||||
/ maxcurv;// just a factor to make a comb reasonably visible
|
||||
/ maxcurv; // just a factor to make a comb reasonably visible
|
||||
}
|
||||
|
||||
if (temprepscale > combrepscale) {
|
||||
|
||||
Reference in New Issue
Block a user