Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scene object refactoring #1209

Merged
merged 26 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added `compas.geometry.Torus.to_brep()`.
* Added `compas.brep.Brep.from_iges()`.
* Added `compas.brep.Brep.to_iges()`.
* Added `compas.scene.Scene`.

### Changed

Expand All @@ -24,7 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Changed `compas.geometry.NurbsSurface.u_isocurve` to `isocurve_u`.
* Changed `compas.geometry.NurbsSurface.v_isocurve` to `isocurve_v`.
* Changed `compas.brep.Brep.from_step_file` to `from_step`.
* * Moved `compas.brep` to `compas.geometry.brep`.
* Moved `compas.brep` to `compas.geometry.brep`.
* `Artists` classes are renamed to `SceneObject` classes and now under `compas.scene`, `compas_rhino.scene`, `compas_ghpython.scene`, `compas_blender.scene`.


### Removed
Expand All @@ -37,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added `Frame.axes`
* Added `compas.datastructures.TreeNode` and `compas.datastructures.Tree` classes.
* Added `EllipseArtist` to `compas_rhino` and `compas_ghpython`.
* Added `compas.scene.Scene`.

### Changed

Expand Down
46 changes: 0 additions & 46 deletions docs/reference/compas.artists.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/reference/compas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ and can be used independently of CAD systems in any environment that supports Py
:titlesonly:
:caption: compas

compas.artists
compas.colors
compas.data
compas.datastructures
Expand All @@ -20,4 +19,5 @@ and can be used independently of CAD systems in any environment that supports Py
compas.numerical
compas.plugins
compas.rpc
compas.scene
compas.topology
46 changes: 46 additions & 0 deletions docs/reference/compas.scene.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

********************************************************************************
compas.scene
********************************************************************************

.. currentmodule:: compas.scene

.. rst-class:: lead


This package defines scene objects for visualising COMPAS objects.
Every object type is paired with a corresponding scene object type that is capable of visualizing the data of the object.
The scene objects are implemented as pluggables, and automatically switch between plugins depending on the contexct in which they are used.


Classes
=======

.. autosummary::
:toctree: generated/
:nosignatures:

SceneObject
DataSceneObjectNotRegisteredError
GeometryObject
MeshObject
NetworkObject
NoSceneObjectContextError
VolMeshObject


Pluggables
==========

Pluggables are functions that don't have an actual implementation, but receive an implementation from a plugin.

.. autosummary::
:toctree: generated/
:nosignatures:

clear
redraw
register_scene_objects



47 changes: 0 additions & 47 deletions docs/reference/compas_blender.artists.rst

This file was deleted.

3 changes: 2 additions & 1 deletion docs/reference/compas_blender.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ COMPAS geometry and data structures in Blender, and for basic user inter interac
:titlesonly:
:caption: compas_blender

compas_blender.artists
compas_blender.conversions
compas_blender.geometry
compas_blender.scene

47 changes: 47 additions & 0 deletions docs/reference/compas_blender.scene.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

********************************************************************************
compas_blender.scene
********************************************************************************

.. currentmodule:: compas_blender.scene

.. rst-class:: lead


This package provides scene object plugins for visualising COMPAS objects in Blender.
When working in Blender, :class:`compas.scene.SceneObject` will automatically use the corresponding Blender scene object for each COMPAS object type.


Classes
=======
BoxObject


.. autosummary::
:toctree: generated/
:nosignatures:

BlenderSceneObject
BoxObject
CapsuleObject
CircleObject
ConeObject
CurveObject
CylinderObject
FrameObject
LineObject
MeshObject
NetworkObject
PointObject
PointcloudObject
PolygonObject
PolyhedronObject
PolylineObject
SphereObject
SurfaceObject
TorusObject
VectorObject
VolMeshObject



47 changes: 0 additions & 47 deletions docs/reference/compas_ghpython.artists.rst

This file was deleted.

3 changes: 2 additions & 1 deletion docs/reference/compas_ghpython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ COMPAS geometry and data structures in Rhino, through GHPython.
:titlesonly:
:caption: compas_ghpython

compas_ghpython.artists
compas_ghpython.components
compas_ghpython.scene

47 changes: 47 additions & 0 deletions docs/reference/compas_ghpython.scene.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

********************************************************************************
compas_ghpython.scene
********************************************************************************

.. currentmodule:: compas_ghpython.scene

.. rst-class:: lead


This package provides scene object plugins for visualising COMPAS objects in Grasshopper.
When working in GH Python components, :class:`compas.scene.SceneObject` will automatically use the corresponding GHPython scene object for each COMPAS object type.


Classes
=======



.. autosummary::
:toctree: generated/
:nosignatures:

BoxObject
CapsuleObject
CircleObject
ConeObject
CurveObject
CylinderObject
EllipseObject
FrameObject
GHObject
LineObject
MeshObject
NetworkObject
PointObject
PolygonObject
PolyhedronObject
PolylineObject
SphereObject
SurfaceObject
TorusObject
VectorObject
VolMeshObject



49 changes: 0 additions & 49 deletions docs/reference/compas_rhino.artists.rst

This file was deleted.

Loading
Loading