Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Feb 8, 2024
1 parent 92b0d14 commit 52caecc
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 7 deletions.
10 changes: 10 additions & 0 deletions docs/api/compas_tna.notebook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ compas_tna.notebook
********************************************************************************

.. currentmodule:: compas_tna.notebook

Classes
=======

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

scene.ThreeFormObject
scene.ThreeForceObject
10 changes: 10 additions & 0 deletions docs/api/compas_tna.rhino.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ compas_tna.rhino
********************************************************************************

.. currentmodule:: compas_tna.rhino

Classes
=======

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

scene.RhinoFormObject
scene.RhinoForceObject
10 changes: 10 additions & 0 deletions docs/api/compas_tna.scene.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ compas_tna.scene
********************************************************************************

.. currentmodule:: compas_tna.scene

Classes
=======

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

FormDiagramObject
ForceDiagramObject
30 changes: 23 additions & 7 deletions notebooks/000_formdiagram.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,23 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'compas.geometry.linalg'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[1], line 4\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpathlib\u001b[39;00m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas_tna\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdiagrams\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m FormDiagram\n\u001b[0;32m----> 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas_tna\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mequilibrium\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m relax_boundary_openings\n\u001b[1;32m 6\u001b[0m \u001b[38;5;66;03m# for visualisation of the result\u001b[39;00m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mcolors\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Color\n",
"File \u001b[0;32m~/Code/compas_tna/src/compas_tna/equilibrium/__init__.py:12\u001b[0m\n\u001b[1;32m 7\u001b[0m __all__ \u001b[38;5;241m=\u001b[39m [\n\u001b[1;32m 8\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mhorizontal_nodal\u001b[39m\u001b[38;5;124m\"\u001b[39m,\n\u001b[1;32m 9\u001b[0m ]\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m compas\u001b[38;5;241m.\u001b[39mIPY:\n\u001b[0;32m---> 12\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mrelaxation\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m relax_boundary_openings\n\u001b[1;32m 13\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mhorizontal_numpy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m horizontal_nodal_numpy\n\u001b[1;32m 14\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mhorizontal_numpy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m horizontal_numpy\n",
"File \u001b[0;32m~/Code/compas_tna/src/compas_tna/equilibrium/relaxation.py:3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtyping\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m List\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas_tna\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdiagrams\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m FormDiagram\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas_fd\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msolvers\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m fd_numpy\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrelax_boundary_openings\u001b[39m(form: FormDiagram, fixed: List[\u001b[38;5;28mint\u001b[39m]) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m FormDiagram:\n\u001b[1;32m 7\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Relax the FormDiagram to create a smooth starting geometry with inward curving unsupported boundaries.\u001b[39;00m\n\u001b[1;32m 8\u001b[0m \n\u001b[1;32m 9\u001b[0m \u001b[38;5;124;03m Parameters\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 21\u001b[0m \n\u001b[1;32m 22\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n",
"File \u001b[0;32m~/Code/compas_fd/src/compas_fd/solvers/__init__.py:1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfd_numpy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m fd_numpy\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfd_constrained_numpy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m fd_constrained_numpy\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mmesh_fd_numpy\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m mesh_fd_numpy\n",
"File \u001b[0;32m~/Code/compas_fd/src/compas_fd/solvers/fd_numpy.py:6\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mtyping\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m Optional\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mscipy\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msparse\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlinalg\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m spsolve\n\u001b[0;32m----> 6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mgeometry\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlinalg\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m normrow\n\u001b[1;32m 8\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mcompas_fd\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtypes\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m FloatNx3\n\u001b[1;32m 9\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mfd_numerical_data\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m FDNumericalData\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'compas.geometry.linalg'"
]
}
],
"source": [
"import compas\n",
"import pathlib\n",
Expand All @@ -41,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -60,7 +76,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -79,7 +95,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -100,7 +116,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -122,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -141,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 52caecc

Please sign in to comment.