fix bug in draft path array
put lnodes.normalize() inside try/except block replace hard-coded 1e-6 with Vector3d::epsilon() in VectorPy::normalize()
This commit is contained in:
committed by
wmayer
parent
712012678f
commit
41102edf67
@@ -451,7 +451,7 @@ PyObject* VectorPy::normalize(PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, ""))
|
||||
return 0;
|
||||
VectorPy::PointerType ptr = reinterpret_cast<VectorPy::PointerType>(_pcTwinPointer);
|
||||
if (ptr->Length() < 1.0e-6) {
|
||||
if (ptr->Length() < Vector3d::epsilon()) {
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError, "Cannot normalize null vector");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user