[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2023-09-12 13:03:02 +00:00
committed by WandererFan
parent a207d11fa4
commit e92ed45df9
435 changed files with 2669 additions and 2645 deletions

View File

@@ -100,7 +100,7 @@ public:
&Module::removeSvgTags,
"string = removeSvgTags(string) -- Removes the opening and closing svg tags\n"
"and other metatags from a svg code, making it embeddable");
initialize("This module is the Drawing module.");// register with Python
initialize("This module is the Drawing module."); // register with Python
}
virtual ~Module()
@@ -381,4 +381,4 @@ PyObject* initModule()
return Base::Interpreter().addModule(new Module);
}
}// namespace Drawing
} // namespace Drawing

View File

@@ -216,9 +216,9 @@ void SVGOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out)
// arc of circle
else {
// See also https://developer.mozilla.org/en/SVG/Tutorial/Paths
char xar = '0'; // x-axis-rotation
char las = (l - f > D_PI) ? '1' : '0';// large-arc-flag
char swp = (a < 0) ? '1' : '0';// sweep-flag, i.e. clockwise (0) or counter-clockwise (1)
char xar = '0'; // x-axis-rotation
char las = (l - f > D_PI) ? '1' : '0'; // large-arc-flag
char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1)
out << "<path d=\"M" << s.X() << " " << s.Y() << " A" << r << " " << r << " " << xar << " "
<< las << " " << swp << " " << e.X() << " " << e.Y() << "\" />";
}
@@ -263,8 +263,8 @@ void SVGOutput::printEllipse(const BRepAdaptor_Curve& c, int id, std::ostream& o
}
// arc of ellipse
else {
char las = (l - f > D_PI) ? '1' : '0';// large-arc-flag
char swp = (a < 0) ? '1' : '0';// sweep-flag, i.e. clockwise (0) or counter-clockwise (1)
char las = (l - f > D_PI) ? '1' : '0'; // large-arc-flag
char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1)
out << "<path d=\"M" << s.X() << " " << s.Y() << " A" << r1 << " " << r2 << " " << angle
<< " " << las << " " << swp << " " << e.X() << " " << e.Y() << "\" />" << std::endl;
}
@@ -492,20 +492,20 @@ void DXFOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out)
//<< p.Y() << "\" r =\"" << r << "\" />";
out << 0 << endl;
out << "CIRCLE" << endl;
out << 8 << endl; // Group code for layer name
out << "sheet_layer" << endl;// Layer number
out << 8 << endl; // Group code for layer name
out << "sheet_layer" << endl; // Layer number
out << "100" << endl;
out << "AcDbEntity" << endl;
out << "100" << endl;
out << "AcDbCircle" << endl;
out << 10 << endl; // Centre X
out << p.X() << endl;// X in WCS coordinates
out << 10 << endl; // Centre X
out << p.X() << endl; // X in WCS coordinates
out << 20 << endl;
out << p.Y() << endl;// Y in WCS coordinates
out << p.Y() << endl; // Y in WCS coordinates
out << 30 << endl;
out << 0 << endl; // Z in WCS coordinates-leaving flat
out << 40 << endl;//
out << r << endl; // Radius
out << 0 << endl; // Z in WCS coordinates-leaving flat
out << 40 << endl; //
out << r << endl; // Radius
}
@@ -535,26 +535,26 @@ void DXFOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out)
}
out << 0 << endl;
out << "ARC" << endl;
out << 8 << endl; // Group code for layer name
out << "sheet_layer" << endl;// Layer number
out << 8 << endl; // Group code for layer name
out << "sheet_layer" << endl; // Layer number
out << "100" << endl;
out << "AcDbEntity" << endl;
out << "100" << endl;
out << "AcDbCircle" << endl;
out << 10 << endl; // Centre X
out << p.X() << endl;// X in WCS coordinates
out << 10 << endl; // Centre X
out << p.X() << endl; // X in WCS coordinates
out << 20 << endl;
out << p.Y() << endl;// Y in WCS coordinates
out << p.Y() << endl; // Y in WCS coordinates
out << 30 << endl;
out << 0 << endl; // Z in WCS coordinates
out << 40 << endl;//
out << r << endl; // Radius
out << 0 << endl; // Z in WCS coordinates
out << 40 << endl; //
out << r << endl; // Radius
out << "100" << endl;
out << "AcDbArc" << endl;
out << 50 << endl;
out << start_angle << endl;// Start angle
out << start_angle << endl; // Start angle
out << 51 << endl;
out << end_angle << endl;// End angle
out << end_angle << endl; // End angle
}
}
@@ -606,35 +606,35 @@ void DXFOutput::printEllipse(const BRepAdaptor_Curve& c, int /*id*/, std::ostrea
}
out << 0 << endl;
out << "ELLIPSE" << endl;
out << 8 << endl; // Group code for layer name
out << "sheet_layer" << endl;// Layer number
out << 8 << endl; // Group code for layer name
out << "sheet_layer" << endl; // Layer number
out << "100" << endl;
out << "AcDbEntity" << endl;
out << "100" << endl;
out << "AcDbEllipse" << endl;
out << 10 << endl; // Centre X
out << p.X() << endl;// X in WCS coordinates
out << 10 << endl; // Centre X
out << p.X() << endl; // X in WCS coordinates
out << 20 << endl;
out << p.Y() << endl;// Y in WCS coordinates
out << p.Y() << endl; // Y in WCS coordinates
out << 30 << endl;
out << 0 << endl; // Z in WCS coordinates
out << 11 << endl; //
out << major_x << endl;// Major X
out << 0 << endl; // Z in WCS coordinates
out << 11 << endl; //
out << major_x << endl; // Major X
out << 21 << endl;
out << major_y << endl;// Major Y
out << major_y << endl; // Major Y
out << 31 << endl;
out << 0 << endl; // Major Z
out << 40 << endl; //
out << ratio << endl;// Ratio
out << 0 << endl; // Major Z
out << 40 << endl; //
out << ratio << endl; // Ratio
out << 41 << endl;
out << start_angle << endl;// Start angle
out << start_angle << endl; // Start angle
out << 42 << endl;
out << end_angle << endl;// End angle
out << end_angle << endl; // End angle
}
void DXFOutput::printBSpline(const BRepAdaptor_Curve& c,
int id,
std::ostream& out)// Not even close yet- DF
std::ostream& out) // Not even close yet- DF
{
try {
std::stringstream str;
@@ -674,14 +674,14 @@ void DXFOutput::printBSpline(const BRepAdaptor_Curve& c,
str << 0 << endl
<< "SPLINE" << endl
<< 8 << endl // Group code for layer name
<< "sheet_layer" << endl// Layer name
<< 8 << endl // Group code for layer name
<< "sheet_layer" << endl // Layer name
<< "100" << endl
<< "AcDbEntity" << endl
<< "100" << endl
<< "AcDbSpline" << endl
<< 70 << endl
<< spline->IsRational() * 4 << endl// flags
<< spline->IsRational() * 4 << endl // flags
<< 71 << endl
<< spline->Degree() << endl
<< 72 << endl
@@ -689,7 +689,7 @@ void DXFOutput::printBSpline(const BRepAdaptor_Curve& c,
<< 73 << endl
<< poles.Length() << endl
<< 74 << endl
<< 0 << endl;// fitpoints
<< 0 << endl; // fitpoints
for (int i = knotsequence.Lower(); i <= knotsequence.Upper(); i++) {
str << 40 << endl << knotsequence(i) << endl;
@@ -729,22 +729,22 @@ void DXFOutput::printGeneric(const BRepAdaptor_Curve& c, int /*id*/, std::ostrea
out << "0" << endl;
out << "LINE" << endl;
out << "8" << endl; // Group code for layer name
out << "sheet_layer" << endl;// Layer name
out << "8" << endl; // Group code for layer name
out << "sheet_layer" << endl; // Layer name
out << "100" << endl;
out << "AcDbEntity" << endl;
out << "100" << endl;
out << "AcDbLine" << endl;
out << "10" << endl; // Start point of line
out << PS.X() << endl;// X in WCS coordinates
out << "10" << endl; // Start point of line
out << PS.X() << endl; // X in WCS coordinates
out << "20" << endl;
out << PS.Y() << endl;// Y in WCS coordinates
out << PS.Y() << endl; // Y in WCS coordinates
out << "30" << endl;
out << "0" << endl; // Z in WCS coordinates
out << "11" << endl; // End point of line
out << PE.X() << endl;// X in WCS coordinates
out << "0" << endl; // Z in WCS coordinates
out << "11" << endl; // End point of line
out << PE.X() << endl; // X in WCS coordinates
out << "21" << endl;
out << PE.Y() << endl;// Y in WCS coordinates
out << PE.Y() << endl; // Y in WCS coordinates
out << "31" << endl;
out << "0" << endl;// Z in WCS coordinates
out << "0" << endl; // Z in WCS coordinates
}

View File

@@ -72,6 +72,6 @@ private:
void printGeneric(const BRepAdaptor_Curve&, int id, std::ostream&);
};
}// namespace Drawing
} // namespace Drawing
#endif// DRAWING_EXPORT_H
#endif // DRAWING_EXPORT_H

View File

@@ -67,7 +67,7 @@ protected:
};
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -115,7 +115,7 @@ void FeaturePage::onChanged(const App::Property* prop)
void FeaturePage::onDocumentRestored()
{
// Needs to be tmp. set because otherwise the custom text gets overridden (#0002064)
this->StatusBits.set(App::Restore);// the 'Restore' flag
this->StatusBits.set(App::Restore); // the 'Restore' flag
Base::FileInfo templateInfo(Template.getValue());
if (!templateInfo.exists()) {
@@ -133,7 +133,7 @@ void FeaturePage::onDocumentRestored()
Template.setValue(path);
}
this->StatusBits.reset(App::Restore);// the 'Restore' flag
this->StatusBits.reset(App::Restore); // the 'Restore' flag
}
App::DocumentObjectExecReturn* FeaturePage::execute(void)

View File

@@ -70,7 +70,7 @@ private:
};
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -63,7 +63,7 @@ public:
//@}
};
}// namespace Drawing
} // namespace Drawing
#endif// DRAWING_FEATUREPROJECTION
#endif // DRAWING_FEATUREPROJECTION

View File

@@ -113,4 +113,4 @@ const char* Drawing::FeatureViewPython::getViewProviderName(void) const
// explicit template instantiation
template class DrawingExport FeaturePythonT<Drawing::FeatureView>;
}// namespace App
} // namespace App

View File

@@ -64,7 +64,7 @@ protected:
using FeatureViewPython = App::FeaturePythonT<FeatureView>;
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -98,4 +98,4 @@ const char* Drawing::FeatureViewAnnotationPython::getViewProviderName(void) cons
// explicit template instantiation
template class DrawingExport FeaturePythonT<Drawing::FeatureViewAnnotation>;
}// namespace App
} // namespace App

View File

@@ -64,7 +64,7 @@ public:
using FeatureViewAnnotationPython = App::FeaturePythonT<FeatureViewAnnotation>;
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -155,4 +155,4 @@ const char* Drawing::FeatureViewPartPython::getViewProviderName(void) const
// explicit template instantiation
template class DrawingExport FeaturePythonT<Drawing::FeatureViewPart>;
}// namespace App
} // namespace App

View File

@@ -72,7 +72,7 @@ private:
using FeatureViewPartPython = App::FeaturePythonT<FeatureViewPart>;
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -63,7 +63,7 @@ public:
}
};
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -146,4 +146,4 @@ const char* Drawing::FeatureViewSymbolPython::getViewProviderName(void) const
// explicit template instantiation
template class DrawingExport FeaturePythonT<Drawing::FeatureViewSymbol>;
}// namespace App
} // namespace App

View File

@@ -66,7 +66,7 @@ protected:
using FeatureViewSymbolPython = App::FeaturePythonT<FeatureViewSymbol>;
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -52,7 +52,7 @@ public:
};
}// namespace Drawing
} // namespace Drawing
#endif

View File

@@ -72,5 +72,5 @@
#include <BRepAdaptor_HCurve.hxx>
#endif
#endif// _PreComp_
#endif // _PreComp_
#endif

View File

@@ -87,16 +87,16 @@ void ProjectionAlgos::execute(void)
// extracting the result sets:
HLRBRep_HLRToShape shapes(brep_hlr);
V = build3dCurves(shapes.VCompound()); // hard edge visibly
V1 = build3dCurves(shapes.Rg1LineVCompound());// Smoth edges visibly
VN = build3dCurves(shapes.RgNLineVCompound());// contour edges visibly
VO = build3dCurves(shapes.OutLineVCompound());// contours apparents visibly
VI = build3dCurves(shapes.IsoLineVCompound());// isoparamtriques visibly
H = build3dCurves(shapes.HCompound()); // hard edge invisibly
H1 = build3dCurves(shapes.Rg1LineHCompound());// Smoth edges invisibly
HN = build3dCurves(shapes.RgNLineHCompound());// contour edges invisibly
HO = build3dCurves(shapes.OutLineHCompound());// contours apparents invisibly
HI = build3dCurves(shapes.IsoLineHCompound());// isoparamtriques invisibly
V = build3dCurves(shapes.VCompound()); // hard edge visibly
V1 = build3dCurves(shapes.Rg1LineVCompound()); // Smoth edges visibly
VN = build3dCurves(shapes.RgNLineVCompound()); // contour edges visibly
VO = build3dCurves(shapes.OutLineVCompound()); // contours apparents visibly
VI = build3dCurves(shapes.IsoLineVCompound()); // isoparamtriques visibly
H = build3dCurves(shapes.HCompound()); // hard edge invisibly
H1 = build3dCurves(shapes.Rg1LineHCompound()); // Smoth edges invisibly
HN = build3dCurves(shapes.RgNLineHCompound()); // contour edges invisibly
HO = build3dCurves(shapes.OutLineHCompound()); // contours apparents invisibly
HI = build3dCurves(shapes.IsoLineHCompound()); // isoparamtriques invisibly
}
string ProjectionAlgos::getSVG(ExtractionType type,

View File

@@ -63,25 +63,25 @@ public:
XmlAttributes H0_style = XmlAttributes(),
XmlAttributes H1_style = XmlAttributes());
std::string
getDXF(ExtractionType type, double scale, double tolerance);// added by Dan Falck 2011/09/25
getDXF(ExtractionType type, double scale, double tolerance); // added by Dan Falck 2011/09/25
const TopoDS_Shape& Input;
const Base::Vector3d& Direction;
TopoDS_Shape V; // hard edge visibly
TopoDS_Shape V1;// Smoth edges visibly
TopoDS_Shape VN;// contour edges visibly
TopoDS_Shape VO;// contours apparents visibly
TopoDS_Shape VI;// isoparamtriques visibly
TopoDS_Shape H; // hard edge invisibly
TopoDS_Shape H1;// Smoth edges invisibly
TopoDS_Shape HN;// contour edges invisibly
TopoDS_Shape HO;// contours apparents invisibly
TopoDS_Shape HI;// isoparamtriques invisibly
TopoDS_Shape V; // hard edge visibly
TopoDS_Shape V1; // Smoth edges visibly
TopoDS_Shape VN; // contour edges visibly
TopoDS_Shape VO; // contours apparents visibly
TopoDS_Shape VI; // isoparamtriques visibly
TopoDS_Shape H; // hard edge invisibly
TopoDS_Shape H1; // Smoth edges invisibly
TopoDS_Shape HN; // contour edges invisibly
TopoDS_Shape HO; // contours apparents invisibly
TopoDS_Shape HI; // isoparamtriques invisibly
};
}// namespace Drawing
} // namespace Drawing
#endif