{"id":21563,"library":"meshcat-shapes","title":"meshcat-shapes","description":"Useful shapes to decorate MeshCat scenes. Current version 1.0.0, stable. Release cadence is irregular.","status":"active","version":"1.0.0","language":"python","source_language":"en","source_url":"https://github.com/stephane-caron/meshcat-shapes","tags":["meshcat","visualization","shapes","3d","geometry"],"install":[{"cmd":"pip install meshcat-shapes","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for scene interaction and visualization","package":"meshcat","optional":false}],"imports":[{"note":"Namespace used to be part of meshcat, now separate package","wrong":"import meshcat.shapes","symbol":"MeshcatShape","correct":"import meshcat_shapes"},{"note":"","wrong":null,"symbol":"frame","correct":"from meshcat_shapes import frame"},{"note":"","wrong":null,"symbol":"point","correct":"from meshcat_shapes import point"},{"note":"Added in v0.3.0","wrong":null,"symbol":"textarea","correct":"from meshcat_shapes import textarea"}],"quickstart":{"code":"import meshcat\nimport meshcat_shapes\n\nvis = meshcat.Visualizer()\nvis.open()\n\n# Draw a 3-axis frame at origin\nmeshcat_shapes.frame(vis, \"world/frame\", opacity=1.0)\n\n# Draw a point\nmeshcat_shapes.point(vis, \"world/point\", radius=0.05, color=0xff0000)\n\n# Draw a text area\nmeshcat_shapes.textarea(vis, \"world/text\", \"Hello, MeshCat!\", width=0.5, height=0.2)","lang":"python","description":"Creates a MeshCat visualizer and adds a frame, a point, and a text area."},"warnings":[{"fix":"Upgrade Python to 3.9 or later.","message":"In v1.0.0, the minimum Python version was bumped to 3.9. Older Python versions (3.7, 3.8) are no longer supported.","severity":"breaking","affected_versions":">0.3.0,<1.0.0"},{"fix":"Use 'import meshcat_shapes' or 'from meshcat_shapes import ...'.","message":"The package name was previously part of the meshcat namespace. Ensure you import 'meshcat_shapes', not 'meshcat.shapes'.","severity":"deprecated","affected_versions":"all"},{"fix":"Use ASCII characters only for text content.","message":"The 'textarea' shape requires the 'meshcat' visualizer to be open and supports only basic ASCII text (no Unicode).","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Add all shapes before calling vis.close() or similar finalization.","message":"All shapes must be added before the visualizer is closed or the scene is finalized. Adding after closing may not render.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install with 'pip install meshcat-shapes' and import as 'import meshcat_shapes'.","cause":"Incorrect import path; meshcat-shapes is a separate package.","error":"ModuleNotFoundError: No module named 'meshcat.shapes'"},{"fix":"Upgrade: 'pip install --upgrade meshcat-shapes' and check 'from meshcat_shapes import frame'.","cause":"The 'frame' function might have been removed or renamed in an older version. Ensure you have the latest version (v1.0.0) installed.","error":"AttributeError: module 'meshcat_shapes' has no attribute 'frame'"},{"fix":"Remove 'fontsize'. Use 'width' and 'height' to adjust the text area dimensions.","cause":"The 'textarea' function does not accept a 'fontsize' parameter; only 'width' and 'height' control size.","error":"TypeError: textarea() got an unexpected keyword argument 'fontsize'"},{"fix":"Provide a positive radius value (e.g., radius=0.05).","cause":"Calling 'point()' with radius <= 0.","error":"ValueError: Radius must be positive"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}