| 111 | } |
| 112 | |
| 113 | PyObject* DrawViewPartPy::getVisibleVertexes(PyObject *args) |
| 114 | { |
| 115 | PyObject* conventionalCoords = Py_False; // false for gui display (+Y down), true for calculations (+Y up) |
| 116 | //NOLINTNEXTLINE |
| 117 | if (!PyArg_ParseTuple(args, "|O!", &PyBool_Type, &conventionalCoords)) { |
| 118 | throw Py::ValueError("Expected '[conventionalCoords=True/False] or None' "); |
| 119 | } |
| 120 | |
| 121 | DrawViewPart* dvp = getDrawViewPartPtr(); |
| 122 | Py::List pVertexList; |
| 123 | auto vertsAll = dvp->getVertexGeometry(); |
| 124 | for (auto& vert: vertsAll) { |
| 125 | if (vert->getHlrVisible()) { |
| 126 | Base::Vector3d vertPoint = vert->point(); |
| 127 | if (PyBool_Check(conventionalCoords) && conventionalCoords == Py_True) { |
| 128 | vertPoint = DU::invertY(vertPoint); |
| 129 | } |
| 130 | PyObject* pVertex = new Base::VectorPy(new Base::Vector3d(vertPoint)); |
| 131 | pVertexList.append(Py::asObject(pVertex)); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | return Py::new_reference_to(pVertexList); |
| 136 | } |
| 137 | |
| 138 | PyObject* DrawViewPartPy::getHiddenVertexes(PyObject *args) |
| 139 | { |
nothing calls this directly
no test coverage detected