MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / getHiddenVertexes

Method getHiddenVertexes

src/Mod/TechDraw/App/DrawViewPartPyImp.cpp:138–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138PyObject* DrawViewPartPy::getHiddenVertexes(PyObject *args)
139{
140 PyObject* conventionalCoords = Py_False; // false for gui display (+Y down), true for calculations (+Y up)
141 //NOLINTNEXTLINE
142 if (!PyArg_ParseTuple(args, "|O!", &PyBool_Type, &conventionalCoords)) {
143 throw Py::ValueError("Expected '[conventionalCoords=True/False] or None' ");
144 }
145
146 DrawViewPart* dvp = getDrawViewPartPtr();
147 Py::List pVertexList;
148 auto vertsAll = dvp->getVertexGeometry();
149 for (auto& vert: vertsAll) {
150 if (!vert->getHlrVisible()) {
151 Base::Vector3d vertPoint = vert->point();
152 if (PyBool_Check(conventionalCoords) && conventionalCoords == Py_True) {
153 vertPoint = DU::invertY(vertPoint);
154 }
155 PyObject* pVertex = new Base::VectorPy(new Base::Vector3d(vertPoint));
156 pVertexList.append(Py::asObject(pVertex));
157 }
158 }
159
160 return Py::new_reference_to(pVertexList);
161}
162
163
164PyObject* DrawViewPartPy::requestPaint(PyObject *args)

Callers

nothing calls this directly

Calls 4

new_reference_toFunction · 0.85
getVertexGeometryMethod · 0.80
pointMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected