{"id":21060,"library":"compas","title":"COMPAS","description":"COMPAS is an open-source, Python-based framework for computational design and digital fabrication. It provides data structures, algorithms, and utilities for geometry processing, topology optimization, and robotic assembly. Current version 2.15.1 supports Python >=3.9, with a stable release cadence.","status":"active","version":"2.15.1","language":"python","source_language":"en","source_url":"https://github.com/compas-dev/compas","tags":["computational-design","digital-fabrication","geometry","topology-optimization","robotics"],"install":[{"cmd":"pip install compas","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Core numeric and array operations.","package":"numpy","optional":false},{"reason":"Advanced algorithms for optimization, geometry, and statistics.","package":"scipy","optional":true},{"reason":"Visualization and plotting.","package":"matplotlib","optional":true},{"reason":"Interactive 3D viewer (separate package).","package":"compas_view2","optional":true}],"imports":[{"note":"Box is a geometry primitive, not a datastructure.","wrong":"from compas.datastructures import Box","symbol":"Box","correct":"from compas.geometry import Box"},{"note":"Network is in compas.datastructures.","wrong":"from compas import Network","symbol":"Network","correct":"from compas.datastructures import Network"},{"note":"Function moved to compas.geometry in recent versions.","wrong":"from compas.topology import trimesh_remesh","symbol":"trimesh_remesh","correct":"from compas.geometry import trimesh_remesh"}],"quickstart":{"code":"from compas.geometry import Box\nfrom compas_view2.app import App\n\nbox = Box(1, 2, 3)\nviewer = App()\nviewer.add(box)\nviewer.show()","lang":"python","description":"Creates a 3D box and visualizes it using COMPAS View2."},"warnings":[{"fix":"pip install compas_cgal","message":"COMPAS depends on a C++ backend (compas_cgal) for some geometry operations; must be installed separately.","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Use compas_view2 instead.","message":"The compas_rhino package is deprecated and replaced by compas_view2 for Rhino integration.","severity":"deprecated","affected_versions":">=2.13"},{"fix":"Update imports to compas.geometry.","message":"In version 2.x, many geometry functions moved from compas.topology to compas.geometry. Old imports may still work but raise deprecation warnings.","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Access coordinates via .x, .y, .z (not .xy).","message":"The Point class attribute names changed: 'x','y','z' are now 'xy','yz','zx' for coordinate arrays.","severity":"breaking","affected_versions":">=2.15"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install compas_view2","cause":"Missing optional viewer package.","error":"ModuleNotFoundError: No module named 'compas_view2'"},{"fix":"from compas.geometry import Box","cause":"Incorrect import path for Box.","error":"ImportError: cannot import name 'Box' from 'compas.datastructures'"},{"fix":"Use box.x, box.y, box.z instead of box.xy.","cause":"Outdated attribute access pattern.","error":"AttributeError: 'Box' object has no attribute 'xy'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}