All: Reformat according to new standard

This commit is contained in:
pre-commit-ci[bot]
2025-11-11 13:49:01 +01:00
committed by Kacper Donat
parent eafd18dac0
commit 25c3ba7338
2390 changed files with 154630 additions and 115818 deletions

View File

@@ -31,9 +31,7 @@
namespace Mesh
{
const App::PropertyIntegerConstraint::Constraints intSampling = {0,
std::numeric_limits<int>::max(),
1};
const App::PropertyIntegerConstraint::Constraints intSampling = {0, std::numeric_limits<int>::max(), 1};
const App::PropertyLength::Constraints floatRange = {0.0, std::numeric_limits<float>::max(), 1.0};
} // namespace Mesh
@@ -61,7 +59,8 @@ short Sphere::mustExecute() const
App::DocumentObjectExecReturn* Sphere::execute()
{
std::unique_ptr<MeshObject> mesh(
MeshObject::createSphere((float)Radius.getValue(), Sampling.getValue()));
MeshObject::createSphere((float)Radius.getValue(), Sampling.getValue())
);
if (mesh) {
mesh->setPlacement(this->Placement.getValue());
Mesh.setValue(mesh->getKernel());
@@ -71,9 +70,7 @@ App::DocumentObjectExecReturn* Sphere::execute()
return new App::DocumentObjectExecReturn("Cannot create sphere", this);
}
void Sphere::handleChangedPropertyType(Base::XMLReader& reader,
const char* TypeName,
App::Property* prop)
void Sphere::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, App::Property* prop)
{
if (prop == &Radius && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) {
App::PropertyFloatConstraint r;
@@ -109,9 +106,13 @@ short Ellipsoid::mustExecute() const
App::DocumentObjectExecReturn* Ellipsoid::execute()
{
std::unique_ptr<MeshObject> mesh(MeshObject::createEllipsoid((float)Radius1.getValue(),
(float)Radius2.getValue(),
Sampling.getValue()));
std::unique_ptr<MeshObject> mesh(
MeshObject::createEllipsoid(
(float)Radius1.getValue(),
(float)Radius2.getValue(),
Sampling.getValue()
)
);
if (mesh) {
mesh->setPlacement(this->Placement.getValue());
Mesh.setValue(mesh->getKernel());
@@ -121,9 +122,11 @@ App::DocumentObjectExecReturn* Ellipsoid::execute()
return new App::DocumentObjectExecReturn("Cannot create ellipsoid", this);
}
void Ellipsoid::handleChangedPropertyType(Base::XMLReader& reader,
const char* TypeName,
App::Property* prop)
void Ellipsoid::handleChangedPropertyType(
Base::XMLReader& reader,
const char* TypeName,
App::Property* prop
)
{
if ((prop == &Radius1 || prop == &Radius2)
&& strcmp(TypeName, "App::PropertyFloatConstraint") == 0) {
@@ -164,11 +167,15 @@ short Cylinder::mustExecute() const
App::DocumentObjectExecReturn* Cylinder::execute()
{
std::unique_ptr<MeshObject> mesh(MeshObject::createCylinder((float)Radius.getValue(),
(float)Length.getValue(),
Closed.getValue(),
(float)EdgeLength.getValue(),
Sampling.getValue()));
std::unique_ptr<MeshObject> mesh(
MeshObject::createCylinder(
(float)Radius.getValue(),
(float)Length.getValue(),
Closed.getValue(),
(float)EdgeLength.getValue(),
Sampling.getValue()
)
);
if (mesh) {
mesh->setPlacement(this->Placement.getValue());
Mesh.setValue(mesh->getKernel());
@@ -178,9 +185,7 @@ App::DocumentObjectExecReturn* Cylinder::execute()
return new App::DocumentObjectExecReturn("Cannot create cylinder", this);
}
void Cylinder::handleChangedPropertyType(Base::XMLReader& reader,
const char* TypeName,
App::Property* prop)
void Cylinder::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, App::Property* prop)
{
if ((prop == &Radius || prop == &Length || prop == &EdgeLength)
&& strcmp(TypeName, "App::PropertyFloatConstraint") == 0) {
@@ -223,12 +228,16 @@ short Cone::mustExecute() const
App::DocumentObjectExecReturn* Cone::execute()
{
std::unique_ptr<MeshObject> mesh(MeshObject::createCone((float)Radius1.getValue(),
(float)Radius2.getValue(),
(float)Length.getValue(),
Closed.getValue(),
(float)EdgeLength.getValue(),
Sampling.getValue()));
std::unique_ptr<MeshObject> mesh(
MeshObject::createCone(
(float)Radius1.getValue(),
(float)Radius2.getValue(),
(float)Length.getValue(),
Closed.getValue(),
(float)EdgeLength.getValue(),
Sampling.getValue()
)
);
if (mesh) {
mesh->setPlacement(this->Placement.getValue());
Mesh.setValue(mesh->getKernel());
@@ -238,9 +247,7 @@ App::DocumentObjectExecReturn* Cone::execute()
return new App::DocumentObjectExecReturn("Cannot create cone", this);
}
void Cone::handleChangedPropertyType(Base::XMLReader& reader,
const char* TypeName,
App::Property* prop)
void Cone::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, App::Property* prop)
{
if ((prop == &Radius1 || prop == &Radius2 || prop == &Length || prop == &EdgeLength)
&& strcmp(TypeName, "App::PropertyFloatConstraint") == 0) {
@@ -277,9 +284,9 @@ short Torus::mustExecute() const
App::DocumentObjectExecReturn* Torus::execute()
{
std::unique_ptr<MeshObject> mesh(MeshObject::createTorus((float)Radius1.getValue(),
(float)Radius2.getValue(),
Sampling.getValue()));
std::unique_ptr<MeshObject> mesh(
MeshObject::createTorus((float)Radius1.getValue(), (float)Radius2.getValue(), Sampling.getValue())
);
if (mesh) {
mesh->setPlacement(this->Placement.getValue());
Mesh.setValue(mesh->getKernel());
@@ -289,9 +296,7 @@ App::DocumentObjectExecReturn* Torus::execute()
return new App::DocumentObjectExecReturn("Cannot create torus", this);
}
void Torus::handleChangedPropertyType(Base::XMLReader& reader,
const char* TypeName,
App::Property* prop)
void Torus::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, App::Property* prop)
{
if ((prop == &Radius1 || prop == &Radius2)
&& strcmp(TypeName, "App::PropertyFloatConstraint") == 0) {
@@ -328,9 +333,9 @@ short Cube::mustExecute() const
App::DocumentObjectExecReturn* Cube::execute()
{
std::unique_ptr<MeshObject> mesh(MeshObject::createCube((float)Length.getValue(),
(float)Width.getValue(),
(float)Height.getValue()));
std::unique_ptr<MeshObject> mesh(
MeshObject::createCube((float)Length.getValue(), (float)Width.getValue(), (float)Height.getValue())
);
if (mesh) {
mesh->setPlacement(this->Placement.getValue());
Mesh.setValue(mesh->getKernel());
@@ -340,9 +345,7 @@ App::DocumentObjectExecReturn* Cube::execute()
return new App::DocumentObjectExecReturn("Cannot create cube", this);
}
void Cube::handleChangedPropertyType(Base::XMLReader& reader,
const char* TypeName,
App::Property* prop)
void Cube::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, App::Property* prop)
{
if ((prop == &Length || prop == &Width || prop == &Height)
&& strcmp(TypeName, "App::PropertyFloatConstraint") == 0) {