{ "cells": [ { "cell_type": "markdown", "id": "7018919f5cb888bf", "metadata": {}, "source": [ "# Sections in ADA\n", "Below are just some of the sections available in ADA.\n", "It is also possible to create custom sections using the `ada.Section` class directly." ] }, { "cell_type": "code", "execution_count": 1, "id": "initial_id", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:34.647049Z", "iopub.status.busy": "2025-05-27T11:33:34.646889Z", "iopub.status.idle": "2025-05-27T11:33:35.138618Z", "shell.execute_reply": "2025-05-27T11:33:35.138127Z" } }, "outputs": [], "source": [ "import ada" ] }, { "cell_type": "code", "execution_count": 2, "id": "589b26cfe6c8a37f", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:35.140559Z", "iopub.status.busy": "2025-05-27T11:33:35.140172Z", "iopub.status.idle": "2025-05-27T11:33:35.142755Z", "shell.execute_reply": "2025-05-27T11:33:35.142345Z" } }, "outputs": [], "source": [ "sections = []" ] }, { "cell_type": "code", "execution_count": 3, "id": "c7f1cb6493e448d", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:35.144168Z", "iopub.status.busy": "2025-05-27T11:33:35.144013Z", "iopub.status.idle": "2025-05-27T11:33:35.920129Z", "shell.execute_reply": "2025-05-27T11:33:35.919695Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\n", "
\n", "
Section Properties

Ax: 5.1881E-03
Ix: 2.0246E-07
Iy: 7.9990E-05
Iz: 6.0271E-06
Iyz: 0.0000E+00
Wxmin: 1.8922E-05
Wymin: 5.3327E-04
Wzmin: 8.0361E-05
Sy: 1.0665E-03
Sz: 6.1943E-05
Shary: 2.0822E-03
Sharz: 5.3250E-04
Shceny: 0.0000E+00
Shcenz: -2.7756E-17
\n", "
\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "Section(IPE300, BaseTypes.IPROFILE, h: 0.3, w_btn: 0.15, w_top: 0.15, t_fbtn: 0.0107, t_ftop: 0.0107, t_w: 0.0071)" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "section = ada.Section.from_str(\"IPE300\")\n", "sections.append(section)\n", "section" ] }, { "cell_type": "code", "execution_count": 4, "id": "5e75e5b634d4907c", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:35.921631Z", "iopub.status.busy": "2025-05-27T11:33:35.921451Z", "iopub.status.idle": "2025-05-27T11:33:35.945956Z", "shell.execute_reply": "2025-05-27T11:33:35.945547Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\n", "
\n", "
Section Properties

Ax: 1.8960E-01
Ix: 1.2427E-01
Iy: 2.4349E-01
Iz: 4.9580E-02
Iyz: 0.0000E+00
Wxmin: 1.4716E-01
Wymin: 1.6233E-01
Wzmin: 8.2634E-02
Sy: 9.6678E-02
Sz: 4.5492E-02
Shary: 4.3595E-02
Sharz: 1.0074E-01
Shceny: 0.0000E+00
Shcenz: 0.0000E+00
\n", "
\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "Section(BG3000x1200x20x30, BaseTypes.BOX, h: 3.0, w_btn: 1.2, w_top: 1.2, t_fbtn: 0.03, t_ftop: 0.03, t_w: 0.02)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "section = ada.Section.from_str(\"BG3000x1200x20x30\")\n", "sections.append(section)\n", "section" ] }, { "cell_type": "code", "execution_count": 5, "id": "0531773b-26dd-42c5-8fb4-cf81a4667888", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:35.947406Z", "iopub.status.busy": "2025-05-27T11:33:35.947223Z", "iopub.status.idle": "2025-05-27T11:33:35.969027Z", "shell.execute_reply": "2025-05-27T11:33:35.968655Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\n", "
\n", "
Section Properties

Ax: 1.3080E-01
Ix: 3.8272E-05
Iy: 2.0114E-01
Iz: 8.6420E-03
Iyz: 0.0000E+00
Wxmin: 1.2757E-03
Wymin: 1.3409E-01
Wzmin: 1.4403E-02
Sy: 3.3523E-01
Sz: 1.0947E-02
Shary: 4.7366E-02
Sharz: 1.2000E-02
Shceny: 0.0000E+00
Shcenz: -2.2204E-16
\n", "
\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "Section(IG3000x1200x20x30, BaseTypes.IPROFILE, h: 3.0, w_btn: 1.2, w_top: 1.2, t_fbtn: 0.03, t_ftop: 0.03, t_w: 0.02)" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "section = ada.Section.from_str(\"IG3000x1200x20x30\")\n", "sections.append(section)\n", "section" ] }, { "cell_type": "code", "execution_count": 6, "id": "48d73f25-da46-4783-9056-91ded0938949", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:35.970487Z", "iopub.status.busy": "2025-05-27T11:33:35.970295Z", "iopub.status.idle": "2025-05-27T11:33:35.992428Z", "shell.execute_reply": "2025-05-27T11:33:35.992018Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
\n", "
\n", "
\n", "
Section Properties

Ax: 9.5400E-02
Ix: 2.4466E-05
Iy: 9.4100E-02
Iz: 4.3220E-03
Iyz: 0.0000E+00
Wxmin: 8.1553E-04
Wymin: 4.5879E-02
Wzmin: 7.2033E-03
Sy: 1.5683E-01
Sz: 5.5485E-03
Shary: 4.6737E-02
Sharz: 1.2000E-02
Shceny: 0.0000E+00
Shcenz: 9.3395E-01
\n", "
\n", " " ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "Section(TG3000x1200x20x30, BaseTypes.TPROFILE, h: 3.0, w_btn: 0.02, w_top: 1.2, t_fbtn: 0.03, t_ftop: 0.03, t_w: 0.02)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "section = ada.Section.from_str(\"TG3000x1200x20x30\")\n", "sections.append(section)\n", "section" ] }, { "cell_type": "code", "execution_count": 7, "id": "c6b924090066f480", "metadata": { "execution": { "iopub.execute_input": "2025-05-27T11:33:35.993924Z", "iopub.status.busy": "2025-05-27T11:33:35.993618Z", "iopub.status.idle": "2025-05-27T11:33:37.171019Z", "shell.execute_reply": "2025-05-27T11:33:37.170467Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Note: API not available due to missing dependencies: geometry.add_door_representation - No module named 'mathutils'\n", "Note: API not available due to missing dependencies: geometry.add_railing_representation - No module named 'mathutils'\n", "Note: API not available due to missing dependencies: geometry.add_representation - No module named 'bpy'\n", "Note: API not available due to missing dependencies: geometry.add_window_representation - No module named 'mathutils'\n", "Note: API not available due to missing dependencies: grid.create_axis_curve - No module named 'mathutils'\n", "Sync Complete. Added 4 objects and 0 spatial elements. Modified 0 objects. Deleted 0 objects\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "beams = []\n", "for i, sec in enumerate(sections):\n", " ypos = i * 3\n", " bm = ada.Beam(f\"bm_{sec.name}\", (0, ypos, 0), (5, ypos, 0), sec=sec)\n", " beams.append(bm)\n", "\n", "a = ada.Assembly() / beams\n", "a.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.9" } }, "nbformat": 4, "nbformat_minor": 5 }