Skip to content
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* Update docs to include envelope

### Changed

### Removed
Expand Down
21 changes: 21 additions & 0 deletions docs/api/compas_tna.envelope.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
********************************************************************************
compas_tna.envelope
********************************************************************************

.. currentmodule:: compas_tna.envelope

Classes
=======

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

Envelope
BrepEnvelope
MeshEnvelope
ParametricEnvelope
PavillionVaultEnvelope
PointedVaultEnvelope
DomeEnvelope
CrossVaultEnvelope
1 change: 1 addition & 0 deletions docs/api/compas_tna.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ compas_tna

compas_tna.diagrams
compas_tna.equilibrium
compas_tna.envelope
compas_tna.loads
compas_tna.notebook
compas_tna.rhino
Expand Down
4 changes: 2 additions & 2 deletions src/compas_tna/envelope/meshenvelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,13 @@ def apply_selfweight_to_formdiagram(self, formdiagram: FormDiagram, normalize=Tr
if normalize and total_pz > 0:
scale_factor = total_selfweight / total_pz
if scale_factor != 1.0:
print(f"Scaled selfweight by factor: {scale_factor}")
print(f"Scaled selfweight by factor: {scale_factor:.3f}")

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

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

def apply_fill_weight_to_formdiagram(self, formdiagram: FormDiagram) -> None:
"""Apply fill weight to the nodes of a form diagram based on the fill surface and local thicknesses."""
Expand Down
4 changes: 2 additions & 2 deletions src/compas_tna/envelope/parametricenvelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ def apply_selfweight_to_formdiagram(self, formdiagram: FormDiagram, normalize=Tr
if normalize and total_pz > 0:
scale_factor = total_selfweight / total_pz
if scale_factor != 1.0:
print(f"Scaled selfweight by factor: {scale_factor}")
print(f"Scaled selfweight by factor: {scale_factor:.3f}")

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

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

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