Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8b76a5b
temp dump
tomvanmele Jan 7, 2025
09ef3fc
remove ref to static path
tomvanmele Jan 8, 2025
d4a3297
remove irrelevant files
tomvanmele Jan 8, 2025
0a00f2b
add algorithms
tomvanmele Jan 8, 2025
de6e58c
add examples
tomvanmele Jan 8, 2025
dc9a125
update docs
tomvanmele Jan 8, 2025
c990f45
format
tomvanmele Jan 8, 2025
2e4eb3a
typo docs
tomvanmele Jan 8, 2025
db5c9ca
formatting
tomvanmele Jan 8, 2025
dedfaaa
intersphinx fixes
tomvanmele Jan 8, 2025
0efbab4
Merge branch 'main' into algox
tomvanmele Jan 8, 2025
70fb2c8
test stubs
tomvanmele Jan 8, 2025
8266dba
fast obb
tomvanmele Jan 8, 2025
2425a2b
fast sphere example
tomvanmele Jan 9, 2025
899124d
simplify depth allocation
tomvanmele Jan 9, 2025
8aed497
bvh tests
tomvanmele Jan 9, 2025
b396e07
format
tomvanmele Jan 9, 2025
e8f34a4
tests examples docs
tomvanmele Jan 9, 2025
78593f7
remove block model stuff for now
tomvanmele Jan 9, 2025
5e0889a
format
tomvanmele Jan 9, 2025
b45ad84
remove long running tests
tomvanmele Jan 9, 2025
f2486bf
add sphere intersection test
tomvanmele Jan 9, 2025
1823d11
found exclusion not needed
tomvanmele Jan 9, 2025
4fe9671
script for intersection draft tests
tomvanmele Jan 9, 2025
5df39f1
fix segment intersections and add sphere intersections
tomvanmele Jan 9, 2025
bb1cfbc
update bvh methods
tomvanmele Jan 9, 2025
1401377
start module for closest point and distance
tomvanmele Jan 9, 2025
e202ab4
add model method stubs
tomvanmele Jan 9, 2025
44239f2
Merge branch 'main' into algox
tomvanmele Jan 11, 2025
b62c2d3
update api
tomvanmele Jan 16, 2025
e91b258
remove temp files
tomvanmele Jan 16, 2025
faf4b07
add examples
tomvanmele Jan 16, 2025
d964f9c
clean up scripts
tomvanmele Jan 16, 2025
f3c25f3
basic tests
tomvanmele Jan 16, 2025
0306123
remove duplicates
tomvanmele Jan 16, 2025
1db762c
move element node
tomvanmele Jan 16, 2025
89b44fd
add bvh and kdtree
tomvanmele Jan 16, 2025
211738a
remove block object
tomvanmele Jan 16, 2025
b361428
remove block and fasteners
tomvanmele Jan 16, 2025
3a1cb54
clean up algos
tomvanmele Jan 16, 2025
9c1c565
add geometry module
tomvanmele Jan 16, 2025
9a97e03
stuff
tomvanmele Jan 16, 2025
4af09c1
ruff
tomvanmele Jan 16, 2025
dc72062
ruff
tomvanmele Jan 16, 2025
9086f1b
move bvh and kdtree to data structures
tomvanmele Jan 16, 2025
4c51f5f
update docs
tomvanmele Jan 16, 2025
a6c7cb8
clean up scene imports
tomvanmele Jan 16, 2025
448f971
fix elements.__all__
tomvanmele Jan 16, 2025
7923659
add stub for errors
tomvanmele Jan 16, 2025
238518c
add annotations to model test
tomvanmele Jan 16, 2025
f73176a
fix example imports
tomvanmele Jan 16, 2025
9341d67
fix doctest examples
tomvanmele Jan 16, 2025
41f4175
add contact algorithm
tomvanmele Jan 17, 2025
874cebe
remove specific elements
tomvanmele Jan 17, 2025
05390bd
redefine interactions
tomvanmele Jan 17, 2025
790ab47
update model and elements
tomvanmele Jan 17, 2025
265f605
remove tests temporarily
tomvanmele Jan 17, 2025
e8ad9a5
log (some of it)
tomvanmele Jan 17, 2025
5b51703
ruff
tomvanmele Jan 17, 2025
2124335
import fixes
tomvanmele Jan 17, 2025
ac19822
don't need a collision class
tomvanmele Jan 17, 2025
a465952
add point to reset
tomvanmele Jan 17, 2025
1a9b48f
remove comments
tomvanmele Jan 17, 2025
7af3ac2
F401
tomvanmele Jan 17, 2025
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
46 changes: 29 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Added a base `BlockModel`.
* Added reference to model `Element.model` to `Element`.
* Added `Element.modelgeometry` as the cached geometry of an element in model coordinates, taking into account the modifying effect of interactions with other elements.
* Added `Element.modeltransformation` as the cached transformation from element to model coordinates.
* Added `Element.compute_elementgeometry()`.
* Added `Element.compute_modelgeometry()` to replace `Element.compute_geometry()`.
* Added `Element.compute_modeltransformation()` to replace `Element.compute_worldtransformation()`.
* Added `compas_model.elements.ColumnHeadElement`.
* Added `compas_model.elements.ColumnHeadCrossElement`.
* Added `compas_model.elements.BeamFeature`.
* Added `compas_model.elements.BeamElement`.
* Added `compas_model.elements.BeamIProfileElement`.
* Added `compas_model.elements.BeamSquareElement`.
* Added `compas_model.elements.ColumnFeature`.
* Added `compas_model.elements.ColumnElement`.
* Added `compas_model.elements.ColumnRoundElement`.
* Added `compas_model.elements.ColumnSquareElement`.
* Added `compas_model.elements.FastenersFeature`.
* Added `compas_model.elements.FastenersElement`.
* Added `compas_model.elements.ScrewElement`.
* Added `Element.is_dirty`.
* Added `compas_model.geometry.minkowski_sum_xy` to compute the Minkowski sum A + B of two convex polygons in the XY plane.
* Added `compas_model.geometry.minkowski_difference_xy` as a convenience method to compute A + -B.
* Added `compas_model.geometry.is_collision_poly_poly_xy` to check for collisions between convex polygons in the XY plane.
* Added `compas_model.geometry.intersection_ray_triangle`.
* Added `compas_model.geometry.intersections_line_aabb`.
* Added `compas_model.geometry.intersections_line_box`.
* Added `compas_model.geometry.intersections_ray_aabb`.
* Added `compas_model.geometry.intersections_ray_box`.
* Added `compas_model.geometry.is_intersection_box_box`.
* Added `compas_model.geometry.is_intersection_line_aabb`.
* Added `compas_model.geometry.is_intersection_line_box`.
* Added `compas_model.geometry.is_intersection_ray_aabb`.
* Added `compas_model.geometry.is_intersection_ray_box`.
* Added `compas_model.geometry.is_intersection_segment_aabb`.
* Added `compas_model.geometry.is_intersection_segment_box`.
* Added `compas_model.geometry.pca_box` for fast OBB calculation.
* Added `compas_model.algorithms.mesh_mesh_contacts`.
* Added `compas_model.datastructures.BVH` extending the base compas tree data structure into a bounding volume hierarchy.
* Added `compas_model.datastructures.AABBNode` representing a node of the BVH using an axis-aligned bounding box.
* Added `compas_model.datastructures.OBBNode` representing a node of the BVH using an oriented bounding box.
* Added `compas_model.datastructures.KDTree` for nearest neighbour search among elements.
* Added `compas_model.models.bvh.ElementBVH`.
* Added `compas_model.models.bvh.ElementAABBNode`.
* Added `compas_model.models.bvh.ElementOBBNode`.

### Changed

* Changed `Element.graph_node` to `Element.graphnode`.
* Changed `Element.tree_node` to `Element.treenode`.
* Changed `blockmodel_interfaces` to use the bestfit frame shared by two aligned interfaces instead of the frame of first face of the pair.
* Changed notebook.scene `__all__` is moved to notebook folder for building documentation.

### Removed

* Removed model reference `ElementTree.model` from `ElementTree`.
* Removed `InterfaceElement` from elements.
* Removed `BlockModel`.
* Removed `BlockElement`.
* Removed `model_interfaces`.
* Removed `model_overlaps`.


## [0.4.5] 2024-12-11
Expand Down Expand Up @@ -124,7 +136,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Added `compas_model.materials.Material`.
* Added `compas_model.materials.Concrete`.
* Added `compas_model.materials.Timber` (stub imlementation).
* Added `compas_model.interactions.ContactInterface` based on `compas_assembly.datastructures.Interface`.
* Added `compas_model.interactions.ContactInteraction` based on `compas_assembly.datastructures.Interface`.
* Added `compas_model.algorithms.blockmodel_interfaces` for interface detection of "block models".
* Added `compas_model.elements.block.BlockGeometry` based on `compas_assembly.datastructures.Block`.
* Added `compas_model.analysis.cra_penalty_solve` as wrapper for `compas_cra.equilibrium.cra_penalty_solve`.
Expand Down
Binary file added docs/_images/bvh_aabb_intersections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/bvh_obb_intersections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ API Reference
:maxdepth: 1
:titlesonly:

api/compas_model.algorithms
api/compas_model.elements
api/compas_model.geometry
api/compas_model.interactions
api/compas_model.materials
api/compas_model.models
Expand Down
14 changes: 14 additions & 0 deletions docs/api/compas_model.algorithms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
********************************************************************************
compas_model.algorithms
********************************************************************************

.. currentmodule:: compas_model.algorithms

Functions
=========

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

mesh_mesh_contacts
17 changes: 17 additions & 0 deletions docs/api/compas_model.datastructures.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
********************************************************************************
compas_model.datastructures
********************************************************************************

.. currentmodule:: compas_model.datastructures

Classes
=======

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

AABBNode
BVH
KDTree
OBBNode
3 changes: 0 additions & 3 deletions docs/api/compas_model.elements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ Classes
:toctree: generated/
:nosignatures:

BlockElement
BlockFeature
BlockGeometry
Element
Feature
24 changes: 24 additions & 0 deletions docs/api/compas_model.geometry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
********************************************************************************
compas_model.geometry
********************************************************************************

.. currentmodule:: compas_model.geometry

Functions
=========

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

is_collision_poly_poly_xy
is_intersection_box_box
is_intersection_line_aabb
is_intersection_line_box
is_intersection_ray_aabb
is_intersection_ray_box
is_intersection_segment_aabb
is_intersection_segment_box
minkowski_difference_xy
minkowski_sum_xy
pca_box
15 changes: 2 additions & 13 deletions docs/api/compas_model.interactions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,12 @@ compas_model.interactions

.. currentmodule:: compas_model.interactions

This module provides classes for defining the type of interaction that exists between two elements.
The interaction type could determine, for example, how forces are transferred from one element to the other.
The interaction type could also determine whether an interaction is permanent or temporary;
for example, for designing construction sequences.
The different types of interactions will have to be interpreted by the context in which the model is used.

Interactions do not define the geometry of a joint or interface, but rather how the elements are connected.
In the case of a wood joint, for example, an interaction could define whether the joinery is dry, glued, or mechanical,
and what the properties of this connection are.


Classes
=======

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

Interaction
ContactInterface
Contact
Modifier
1 change: 1 addition & 0 deletions docs/api/compas_model.materials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ Classes

Material
Concrete
Steel
Timber
1 change: 0 additions & 1 deletion docs/api/compas_model.models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Classes
ElementTree
InteractionGraph
Model
BlockModel
1 change: 0 additions & 1 deletion docs/api/compas_model.notebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Classes
:toctree: generated/
:nosignatures:

ThreeBlockObject
ThreeModelObject
1 change: 0 additions & 1 deletion docs/api/compas_model.scene.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ Classes
:nosignatures:

ElementObject
BlockObject
ModelObject
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def setup(app):
"doc_path": "docs",
}

html_static_path = sphinx_compas2_theme.get_html_static_path() + ["_static"]
html_static_path = sphinx_compas2_theme.get_html_static_path()
html_css_files = []
html_extra_path = []
html_last_updated_fmt = ""
Expand Down
17 changes: 2 additions & 15 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,8 @@
Examples
********************************************************************************

Discrete Element Models
=======================

.. toctree::
:maxdepth: 1
:maxdepth: 3
:titlesonly:
:glob:

examples/dem/*


Timber Assemblies
=================

.. toctree::
:maxdepth: 1
:titlesonly:
:glob:
examples/algos/index
13 changes: 0 additions & 13 deletions docs/examples/__temp/element.py

This file was deleted.

32 changes: 0 additions & 32 deletions docs/examples/__temp/elements_beam.py

This file was deleted.

16 changes: 0 additions & 16 deletions docs/examples/__temp/elements_beam.rst

This file was deleted.

49 changes: 0 additions & 49 deletions docs/examples/__temp/elements_block.py

This file was deleted.

15 changes: 0 additions & 15 deletions docs/examples/__temp/elements_block.rst

This file was deleted.

Loading
Loading