Skip to content

Commit 95dc732

Browse files
authored
Merge pull request #40 from ricardoavelino/envelope
Add Envelope Class to manage constrained optimization
2 parents 9c47178 + 4df4003 commit 95dc732

10 files changed

Lines changed: 2983 additions & 19 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12+
* Added `Envelope` base class for masonry structure boundaries with intrados, extrados, and middle meshes
13+
* Added especialized `MeshEnvelope`, `ParametricEnvelope`, and `BrepEnvelope` to deal with different evelope inputs.
14+
* Added direct parametric envelope creation methods inheriting from `ParametricEnvelope` class:
15+
* `CrossVaultEnvelope` - Creates cross vault envelopes with configurable spans and thickness
16+
* `DomeEnvelope` - Creates dome envelopes with configurable radius, center, and oculus
17+
* `PavillionVaultEnvelope` - Creates pavillion vault envelopes with spring angle support
18+
* `PointedVaultEnvelope` - Creates pointed vault envelopes with height control parameters
19+
* The infrastructure around these classes has been updated to enable assigning constraints to the form diagrams.
1220
* Added comprehensive form diagram creation methods to `FormDiagram` class:
1321
* `create_cross()` - Creates cross discretisation with orthogonal arrangement and quad diagonals
1422
* `create_fan()` - Creates fan discretisation with straight lines to corners
@@ -25,30 +33,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2533
* Added corner detection functionality:
2634
* `corner_vertices()` - Identifies corner vertices on boundary with configurable angle threshold
2735
* Added comprehensive mesh creation functions in `diagram_rectangular.py`:
28-
* `create_cross_mesh()` - Creates cross pattern meshes
29-
* `create_fan_mesh()` - Creates fan pattern meshes
30-
* `create_parametric_fan_mesh()` - Creates parametric fan meshes with lambda interpolation
31-
* `create_cross_with_diagonal_mesh()` - Creates cross meshes with diagonals
32-
* `create_ortho_mesh()` - Creates orthogonal grid meshes
3336
* Added circular mesh creation functions in `diagram_circular.py`:
34-
* `create_circular_radial_mesh()` - Creates circular radial meshes
35-
* `create_circular_radial_spaced_mesh()` - Creates hemispherically spaced circular meshes
36-
* `create_circular_spiral_mesh()` - Creates circular spiral meshes
3737
* Added arch mesh creation functions in `diagram_arch.py`:
38-
* `create_arch_linear_mesh()` - Creates arch meshes with semicircular projection
39-
* `create_arch_linear_equally_spaced_mesh()` - Creates arch meshes with equally spaced nodes
4038

4139
### Changed
4240

43-
* Refactored parameter passing from `xy_span=[[x0, x1], [y0, y1]]` to `x_span=(x0, x1), y_span=(y0, y1)` for better API consistency
44-
* Changed `center` parameter from list to tuple in circular diagram functions for immutability and consistency
45-
* Updated function signatures to use single-line format for Black compatibility
46-
* Improved code formatting and linting across all diagram generation files
47-
* Fixed various spelling errors and documentation formatting issues
48-
* Renamed `create_delta_form()` to `create_cross_with_diagonal()` for better clarity
49-
* Updated support assignment to use `is_support` attribute instead of deprecated `is_fixed`
50-
* Removed deprecated `form.parameters` usage from all form creation methods
51-
5241
### Removed
5342

5443

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from .envelope import Envelope
2+
from .brepenvelope import BrepEnvelope
3+
from .meshenvelope import MeshEnvelope
4+
from .parametricenvelope import ParametricEnvelope
5+
6+
from .crossvault import CrossVaultEnvelope
7+
from .dome import DomeEnvelope
8+
from .pavillionvault import PavillionVaultEnvelope
9+
from .pointedvault import PointedVaultEnvelope
10+
11+
__all__ = [
12+
"Envelope",
13+
"BrepEnvelope",
14+
"MeshEnvelope",
15+
"ParametricEnvelope",
16+
"PavillionVaultEnvelope",
17+
"PointedVaultEnvelope",
18+
"DomeEnvelope",
19+
"CrossVaultEnvelope",
20+
]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from compas.geometry import Brep
2+
from compas_tna.envelope import Envelope
3+
4+
5+
class BrepEnvelope(Envelope):
6+
"""An Envelope defined by a BRep at intrados, extrados, and middle."""
7+
8+
def __init__(self, intrados: Brep = None, extrados: Brep = None, middle: Brep = None, **kwargs):
9+
super().__init__(**kwargs)
10+
self.intrados = intrados
11+
self.extrados = extrados
12+
self.middle = middle

0 commit comments

Comments
 (0)