Choreonoid Python Module (AssimpPlugin)
cnoid.AssimpPlugin
Choreonoid Assimp Utility module
- class cnoid.AssimpPlugin.AssimpSceneLoader
Bases:
pybind11_object
AssimpSceneLoader : loading mesh file as a scene for Util/SceneGraph in choreonoid using Assimp ( https://github.com/assimp/assimp )
- __init__(self: cnoid.AssimpPlugin.AssimpSceneLoader) None
- load(self: cnoid.AssimpPlugin.AssimpSceneLoader, arg0: str) cnoid.Util.SgNode
Loading a mesh file using Assimp ( https://github.com/assimp/assimp )
- Parameters:
filename (str) – Filename to be loaded
- Returns:
Root object of loaded mesh
- Return type:
cnoid.Util.SgGroup
- setCreaseAngle(self: cnoid.AssimpPlugin.AssimpSceneLoader, arg0: float) None
Setting creaseAngle
- Parameters:
angle (float) – Set creaseAngle
- setForceGenerateNormals(self: cnoid.AssimpPlugin.AssimpSceneLoader, arg0: bool) None
Setting flag for generating normals, even if the original mesh has normals
- Parameters:
on (boolean) – If True, forcing to generate normals
- setMessageSinkStdErr(self: cnoid.AssimpPlugin.AssimpSceneLoader) None
Setting MessageSkin to stderr. It is required to read error messages in console
- Parameters:
None –
- class cnoid.AssimpPlugin.AssimpSceneWriter
Bases:
pybind11_object
AssimpSceneWriter : Saving a scene for Util/SceneGraph in choreonoid as a mesh file using Assimp ( https://github.com/assimp/assimp )
- __init__(self: cnoid.AssimpPlugin.AssimpSceneWriter) None
- generatePrimitiveMesh(self: cnoid.AssimpPlugin.AssimpSceneWriter, arg0: bool) None
Setting for generating meshes for primitives
- Parameters:
on (boolean) – If True, this scene writer generates a mesh file including meshes converted from primitive type
- ignoreURDFPrimitive(self: cnoid.AssimpPlugin.AssimpSceneWriter, arg0: bool) None
Setting for ignoring primitives used in URDF
- Parameters:
on (boolean) – If True, this scene writer ignore primitive type in URDF(Box, Cylinder, Sphere)
- property outputType
Setting output type of saving mesh. If not set, output type is determined from filename. For saving mesh as ‘stl’, you shoud set outputType = ‘stlb’, if you want a stl binary file.
- Parameters:
output_type (str) – output type to be set
- Returns
str : Current output type
- setExpandVertices(self: cnoid.AssimpPlugin.AssimpSceneWriter, arg0: bool) None
Expanding vertices to represent that each vertices has a normal
- Parameters:
on (boolean) – If True, expanding vertices
- setMessageSinkStdErr(self: cnoid.AssimpPlugin.AssimpSceneWriter) None
Setting MessageSkin to stderr. It is required to read error messages in console
- Parameters:
None –
- setVerbose(self: cnoid.AssimpPlugin.AssimpSceneWriter, arg0: bool) None
Setting debug message level
- Parameters:
on (boolean) – Set debug message level
- writeScene(self: cnoid.AssimpPlugin.AssimpSceneWriter, arg0: str, arg1: cnoid.Util.SgNode) bool
Writing scene as a mesh file using Assimp ( https://github.com/assimp/assimp )
- Parameters:
filename (str) – Filename to be saved
node (cnoid.Util.SgNode) – An object of SceneGraph to be saved
- Returns:
If the process succeeds, True is returned.
- Return type:
boolean
- cnoid.AssimpPlugin.registerAssimpSceneLoader() None