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

Method setMatrix

src/Base/PlacementPyImp.cpp:375–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375void PlacementPy::setMatrix(Py::Object arg)
376{
377 Py::Matrix mat;
378 if (!mat.accepts(arg.ptr())) {
379 throw Py::TypeError("Expect type Matrix");
380 }
381 try {
382 mat = arg;
383 getPlacementPtr()->fromMatrix(mat);
384 }
385 catch (const ValueError& e) {
386 throw Py::ValueError(e.what());
387 }
388}
389
390PyObject* PlacementPy::getCustomAttributes(const char* attr) const
391{

Callers

nothing calls this directly

Calls 4

fromMatrixMethod · 0.80
acceptsMethod · 0.45
ptrMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected