{ "cells": [ { "cell_type": "markdown", "id": "f2a6fe29", "metadata": {}, "source": [ "# Modeling: Visualization of the design tree on terminal\n", "\n", "A user can visualize its model object tree easily by using the ``tree_print()`` method\n", "available on the ``Design`` and ``Component`` objects. This method prints the tree\n", "structure of the model in the terminal.\n", "\n", "## Perform required imports\n", "\n", "For the following example, you need to import these modules:" ] }, { "cell_type": "code", "execution_count": 1, "id": "75cc4d0f", "metadata": { "execution": { "iopub.execute_input": "2024-10-31T14:36:27.474713Z", "iopub.status.busy": "2024-10-31T14:36:27.474713Z", "iopub.status.idle": "2024-10-31T14:36:29.965021Z", "shell.execute_reply": "2024-10-31T14:36:29.965021Z" } }, "outputs": [], "source": [ "from pint import Quantity\n", "\n", "from ansys.geometry.core import launch_modeler\n", "from ansys.geometry.core.math.constants import UNITVECTOR3D_X, UNITVECTOR3D_Y\n", "from ansys.geometry.core.math.point import Point2D, Point3D\n", "from ansys.geometry.core.misc.units import UNITS\n", "from ansys.geometry.core.sketch.sketch import Sketch" ] }, { "cell_type": "markdown", "id": "f2ada0ac", "metadata": {}, "source": [ "## Create a design\n", "\n", "The following code creates a simple design for demonstration purposes. The design consists of\n", "several cylinders extruded. The interesting part is visualizing the corresponding design tree." ] }, { "cell_type": "code", "execution_count": 2, "id": "cabec571", "metadata": { "execution": { "iopub.execute_input": "2024-10-31T14:36:29.965021Z", "iopub.status.busy": "2024-10-31T14:36:29.965021Z", "iopub.status.idle": "2024-10-31T14:36:33.016920Z", "shell.execute_reply": "2024-10-31T14:36:33.016920Z" } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a53c8f39e43044e5b111b4e2866cab17", "version_major": 2, "version_minor": 0 }, "text/plain": [ "EmbeddableWidget(value='" } } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 5 }