[Mesh Python] Mesh.show() returns python object, update documentation for Mesh.show(), Part.show(), and Points.show()

This commit is contained in:
mwganson
2025-01-25 13:14:32 -06:00
committed by Chris Hennes
parent 89f307b7a2
commit 2225e7c32f
3 changed files with 5 additions and 5 deletions

View File

@@ -82,7 +82,7 @@ public:
add_varargs_method("show",
&Module::show,
"show(shape,[string]) -- Add the mesh to the active document or create "
"one if no document exists.");
"one if no document exists. Returns document object.");
add_varargs_method("createBox", &Module::createBox, "Create a solid mesh box");
add_varargs_method("createPlane", &Module::createPlane, "Create a mesh XY plane normal +Z");
add_varargs_method("createSphere", &Module::createSphere, "Create a tessellated sphere");
@@ -311,8 +311,7 @@ private:
}
// copy the data
pcFeature->Mesh.setValue(*mo);
return Py::None();
return Py::asObject(pcFeature->getPyObject());
}
Py::Object createBox(const Py::Tuple& args)
{

View File

@@ -425,7 +425,8 @@ public:
"read(string) -- Load the file and return the shape."
);
add_varargs_method("show",&Module::show,
"show(shape,[string]) -- Add the shape to the active document or create one if no document exists."
"show(shape,[string]) -- Add the shape to the active document or create one if no document exists.\n"
"Returns document object."
);
add_varargs_method("getFacets",&Module::getFacets,
"getFacets(shape): simplified mesh generation"

View File

@@ -55,7 +55,7 @@ public:
add_varargs_method("show",
&Module::show,
"show(points,[string]) -- Add the points to the active document or "
"create one if no document exists.");
"create one if no document exists. Returns document object.");
initialize("This module is the Points module."); // register with Python
}