[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
a207d11fa4
commit
e92ed45df9
@@ -34,7 +34,7 @@
|
||||
|
||||
using namespace Sketcher;
|
||||
|
||||
PyObject* ConstraintPy::PyMake(struct _typeobject*, PyObject*, PyObject*)// Python wrapper
|
||||
PyObject* ConstraintPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper
|
||||
{
|
||||
// create a new instance of ConstraintPy and the Twin object
|
||||
return new ConstraintPy(new Constraint);
|
||||
@@ -129,7 +129,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
}
|
||||
}
|
||||
// ConstraintType, GeoIndex, Value
|
||||
if (PyNumber_Check(index_or_value)) {// can be float or int
|
||||
if (PyNumber_Check(index_or_value)) { // can be float or int
|
||||
Value = PyFloat_AsDouble(index_or_value);
|
||||
bool valid = false;
|
||||
if (strcmp("Distance", ConstraintType) == 0) {
|
||||
@@ -228,7 +228,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
}
|
||||
// ConstraintType, GeoIndex1, GeoIndex2, Value
|
||||
// ConstraintType, GeoIndex, PosIndex, Value
|
||||
if (PyNumber_Check(index_or_value)) {// can be float or int
|
||||
if (PyNumber_Check(index_or_value)) { // can be float or int
|
||||
SecondIndex = any_index;
|
||||
Value = PyFloat_AsDouble(index_or_value);
|
||||
if (strcmp("Angle", ConstraintType) == 0) {
|
||||
@@ -321,8 +321,9 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
this->getConstraintPtr()->ThirdPos = static_cast<Sketcher::PointPos>(intArg4);
|
||||
return 0;
|
||||
}
|
||||
else if (strstr(ConstraintType, "InternalAlignment")) {// InteralAlignment with
|
||||
// InternalElementIndex argument
|
||||
else if (strstr(ConstraintType,
|
||||
"InternalAlignment")) { // InteralAlignment with
|
||||
// InternalElementIndex argument
|
||||
this->getConstraintPtr()->Type = InternalAlignment;
|
||||
|
||||
valid = true;
|
||||
@@ -355,7 +356,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
}
|
||||
}
|
||||
// ConstraintType, GeoIndex1, PosIndex1, GeoIndex2, Value
|
||||
if (PyNumber_Check(oNumArg4)) {// can be float or int
|
||||
if (PyNumber_Check(oNumArg4)) { // can be float or int
|
||||
Value = PyFloat_AsDouble(oNumArg4);
|
||||
if (strcmp("Distance", ConstraintType) == 0) {
|
||||
this->getConstraintPtr()->Type = Distance;
|
||||
@@ -391,7 +392,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
}
|
||||
}
|
||||
// ConstraintType, GeoIndex1, PosIndex1, GeoIndex2, PosIndex2, Value
|
||||
if (PyNumber_Check(oNumArg5)) {// can be float or int
|
||||
if (PyNumber_Check(oNumArg5)) { // can be float or int
|
||||
Value = PyFloat_AsDouble(oNumArg5);
|
||||
bool valid = false;
|
||||
if (strcmp("Distance", ConstraintType) == 0) {
|
||||
@@ -429,7 +430,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
// valid = true;//non-standard assignment
|
||||
this->getConstraintPtr()->First = intArg1;
|
||||
this->getConstraintPtr()->FirstPos = Sketcher::PointPos::none;
|
||||
this->getConstraintPtr()->Second = intArg2;// let's goof up all the terminology =)
|
||||
this->getConstraintPtr()->Second = intArg2; // let's goof up all the terminology =)
|
||||
this->getConstraintPtr()->SecondPos = Sketcher::PointPos::none;
|
||||
this->getConstraintPtr()->Third = intArg3;
|
||||
this->getConstraintPtr()->ThirdPos = static_cast<Sketcher::PointPos>(intArg4);
|
||||
@@ -471,7 +472,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (PyNumber_Check(index_or_value)) {// can be float or int
|
||||
if (PyNumber_Check(index_or_value)) { // can be float or int
|
||||
Value = PyFloat_AsDouble(index_or_value);
|
||||
if (strcmp("SnellsLaw", ConstraintType) == 0) {
|
||||
this->getConstraintPtr()->Type = SnellsLaw;
|
||||
|
||||
Reference in New Issue
Block a user