COMPAS Framework

repository·main·Indexed 18 days ago

https://github.com/compas-dev/compas

A Python-based framework for computational research in architecture, engineering, digital fabrication, and construction (AEFC). It features a core library for data serialization and color management, an extensible ecosystem of research-backed extensions, and specialized integrations for industry software including Rhino, Grasshopper, Blender, Abaqus, ANSYS, SOFISTIK, and ROS.

Tokens
51.3K
Snippets
182
Records
280
Agent score
63%

What's inside COMPAS

  1. Overview of compas.datastructures

    main
    The compas.datastructures package defines the core data structures of the COMPAS framework. These structures provide a standardized, structured way to store and access data on individual components of both topological and geometrical objects. The package includes specialized structures for graphs, meshes, volumetric meshes, cell networks, trees, and assemblies.
  2. Overview of compas.geometry

    main
    The compas.geometry package provides the core geometric functionality for the COMPAS framework. It includes classes for geometric primitives, transformations, NURBS curves and surfaces, shapes, polygons, polyhedrons, and boundary representations (B-reps), as well as various geometry processing algorithms.
  3. Overview of the core compas package

    main

    The compas package is the core of the COMPAS framework. It is environment-agnostic and can be used in any Python environment without requiring a CAD system. It provides fundamental functionality for:

    • Geometry processing
    • Data structures and topology
    • Numerical methods
    • Robotics
    • Plugin mechanisms
    • Remote Procedure Calls (RPC)

    Core sub-modules include compas.geometry, compas.datastructures, compas.scene, and compas.plugins.

  4. Overview of the COMPAS framework

    main

    COMPAS is an open-source, Python-based framework designed for computational research and collaboration in architecture, engineering, digital fabrication, and construction (AEFC).

    Key architectural components include:

    • Core Library: A general-purpose core written in pure Python.
    • Extensions: A collection of packages providing access to peer-reviewed research and external libraries (e.g., CGAL, libigl, Triangle).
    • Specialized Tools: Integration with industry software like Abaqus, ANSYS, SOFISTIK, and ROS.
    • Environment Support: Dedicated packages for Rhino, Grasshopper, and Blender, though it can run in any Python-supported environment.
  5. Overview of the compas.data package

    main

    The compas.data package provides the core infrastructure for data serialization within the COMPAS framework. It is designed to handle the conversion of complex data objects to and from serializable formats (like JSON) while supporting schema validation and structured data management. Key components include:

    • Base Data Classes: A foundation for creating data objects.
    • JSON Serialization: Custom encoders and decoders for handling COMPAS-specific types.
    • Schema Validation: Tools to ensure data integrity using various schema formats.
    • Serialization/Deserialization: High-level utilities for dumping and loading data.
  6. Use compas_rhino for Rhino integration

    main

    The compas_rhino package provides direct integration with Rhino. Use it to:

    • Read and write Rhino geometry.
    • Visualize COMPAS geometry and data structures in Rhino.
    • Perform basic user interaction within the Rhino environment.

    Key modules include compas_rhino.conversions, compas_rhino.geometry, and compas_rhino.scene.

  7. Use compas_ghpython for Grasshopper (GHPython) integration

    main

    The compas_ghpython package allows COMPAS to work within Rhino/Grasshopper via the GHPython component. Use it to:

    • Read and write Rhino geometry.
    • Visualize COMPAS geometry and data structures inside Grasshopper.

    Key modules include compas_ghpython.components and compas_ghpython.scene.

  8. Use compas_blender for Blender integration

    main

    The compas_blender package enables integration between COMPAS and Blender. Use it to:

    • Read and write Blender geometry.
    • Visualize COMPAS geometry and data structures within the Blender interface.
    • Perform basic user interaction within Blender.

    Key modules include compas_blender.conversions, compas_blender.geometry, and compas_blender.scene.

  9. Use the compas.colors package for color management

    main

    The compas.colors package provides classes to work with colors and color maps consistently across different color spaces. It is designed to ensure color consistency in computational geometry and visualization tasks within the COMPAS framework.

    Key classes include:

    • Color: Represents a single color.
    • ColorDict: A dictionary-like structure for managing collections of colors.
    • ColorMap: Defines how colors are mapped, typically used for continuous or discrete color scales.
  10. Convert between COMPAS and Blender data/objects

    main

    The compas_blender.conversions module provides a suite of functions to bridge the gap between COMPAS data structures and Blender objects. It supports conversions for meshes, curves, surfaces, point clouds, transformations, and materials.

    Common conversion directions include:

    • COMPAS to Blender: mesh_to_blender, meshobj_to_compas (for specific object types), pointcloud_to_blender, sphere_to_blender_mesh, polyline_to_blender_curve, transformation_to_blender, and color_to_blender_material.
    • Blender to COMPAS: bmesh_to_compas, mesh_to_compas, meshobj_to_compas, nurbscurve_to_blender_curve (and related NURBS types), and transformation_to_compas.
  11. Use compas.itertools for iterable object manipulation

    main
    The compas.itertools package provides a collection of utility functions designed to simplify working with iterable objects. It includes functions for mathematical transformations (like linspace and meshgrid), array-like manipulations (reshape, flatten), and sequence processing (pairwise, window).
  12. Convert between COMPAS and Rhino data/objects

    main
    The compas_rhino.conversions package provides a comprehensive suite of functions to translate geometric data and objects between the COMPAS framework and Rhino. This includes conversions for points, vectors, lines, curves (circles, ellipses, polylines), surfaces, meshes, solids (cones, cylinders, spheres, tori), and transformations.