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

Method getSelectionPy

src/App/MeasureManager.cpp:136–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135
136Py::Tuple MeasureManager::getSelectionPy(const App::MeasureSelection& selection)
137{
138 // Convert selection to python list
139 Py::Tuple selectionPy(selection.size());
140
141 int i = 0;
142 for (auto it : selection) {
143
144 Py::Dict sel;
145 sel.setItem("object", Py::asObject(it.object.getObject()->getPyObject()));
146 sel.setItem("subName", Py::String(it.object.getSubName()));
147 sel.setItem("pickedPoint", Py::asObject(new Base::VectorPy(it.pickedPoint)));
148
149 selectionPy.setItem(i, sel);
150
151 i++;
152 }
153 return selectionPy;
154}
155
156
157std::vector<MeasureType*> MeasureManager::getValidMeasureTypes(App::MeasureSelection selection,

Callers

nothing calls this directly

Calls 5

StringClass · 0.70
sizeMethod · 0.45
getPyObjectMethod · 0.45
getObjectMethod · 0.45
getSubNameMethod · 0.45

Tested by

no test coverage detected