Skip to content

Commit 25d5628

Browse files
authored
Merge pull request #44 from ricardoavelino/envdocs
Envelope Docs
2 parents afa983c + 06414a4 commit 25d5628

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

CHANGELOG.md

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

1010
### Added
1111

12+
* Update docs to include envelope
13+
1214
### Changed
1315

1416
### Removed

docs/api/compas_tna.envelope.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
********************************************************************************
2+
compas_tna.envelope
3+
********************************************************************************
4+
5+
.. currentmodule:: compas_tna.envelope
6+
7+
Classes
8+
=======
9+
10+
.. autosummary::
11+
:toctree: generated/
12+
:nosignatures:
13+
14+
Envelope
15+
BrepEnvelope
16+
MeshEnvelope
17+
ParametricEnvelope
18+
PavillionVaultEnvelope
19+
PointedVaultEnvelope
20+
DomeEnvelope
21+
CrossVaultEnvelope

docs/api/compas_tna.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ compas_tna
1010

1111
compas_tna.diagrams
1212
compas_tna.equilibrium
13+
compas_tna.envelope
1314
compas_tna.loads
1415
compas_tna.notebook
1516
compas_tna.rhino

src/compas_tna/envelope/meshenvelope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,13 +539,13 @@ def apply_selfweight_to_formdiagram(self, formdiagram: FormDiagram, normalize=Tr
539539
if normalize and total_pz > 0:
540540
scale_factor = total_selfweight / total_pz
541541
if scale_factor != 1.0:
542-
print(f"Scaled selfweight by factor: {scale_factor}")
542+
print(f"Scaled selfweight by factor: {scale_factor:.3f}")
543543

544544
for vertex in formdiagram.vertices():
545545
pz = formdiagram.vertex_attribute(vertex, "pz")
546546
formdiagram.vertex_attribute(vertex, "pz", pz * scale_factor)
547547

548-
print(f"Selfweight applied to form diagram. Total load: {sum(abs(formdiagram.vertex_attribute(vertex, 'pz')) for vertex in formdiagram.vertices())}")
548+
print(f"Selfweight applied to form diagram. Total load: {sum(abs(formdiagram.vertex_attribute(vertex, 'pz')) for vertex in formdiagram.vertices()):.1f}")
549549

550550
def apply_fill_weight_to_formdiagram(self, formdiagram: FormDiagram) -> None:
551551
"""Apply fill weight to the nodes of a form diagram based on the fill surface and local thicknesses."""

src/compas_tna/envelope/parametricenvelope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ def apply_selfweight_to_formdiagram(self, formdiagram: FormDiagram, normalize=Tr
146146
if normalize and total_pz > 0:
147147
scale_factor = total_selfweight / total_pz
148148
if scale_factor != 1.0:
149-
print(f"Scaled selfweight by factor: {scale_factor}")
149+
print(f"Scaled selfweight by factor: {scale_factor:.3f}")
150150

151151
for vertex in formdiagram.vertices():
152152
pz = formdiagram.vertex_attribute(vertex, "pz")
153153
formdiagram.vertex_attribute(vertex, "pz", pz * scale_factor)
154154

155-
print(f"Selfweight applied to form diagram. Total load: {sum(abs(formdiagram.vertex_attribute(vertex, 'pz')) for vertex in formdiagram.vertices())}")
155+
print(f"Selfweight applied to form diagram. Total load: {sum(abs(formdiagram.vertex_attribute(vertex, 'pz')) for vertex in formdiagram.vertices()):.1f}")
156156

157157
def apply_bounds_to_formdiagram(self, formdiagram: FormDiagram) -> None:
158158
"""Apply envelope bounds to a form diagram based on the intrados and extrados surfaces.

0 commit comments

Comments
 (0)