{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "# My first TopologicPy notebook\n",
        "Select **Python (TopologicPy)** as the kernel. Run the three code cells in order.\n",
        "See the Syntopy installation guide for the full instructions."
      ],
      "id": "introduction"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "import os\n",
        "os.environ[\"TOPOLOGICPY_CORE_BACKEND\"] = \"pythonocc\"\n",
        "\n",
        "import sys\n",
        "from importlib.metadata import version\n",
        "from topologicpy.Core import Core\n",
        "\n",
        "print(\"Python:\", sys.executable)\n",
        "print(\"TopologicPy:\", version(\"topologicpy\"))\n",
        "print(\"Geometry engine:\", type(Core.Backend()).__name__)"
      ],
      "id": "check-environment"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "from topologicpy.Cell import Cell\n",
        "\n",
        "box = Cell.Prism(width=2, length=2, height=2)\n",
        "print(\"Volume:\", Cell.Volume(box))"
      ],
      "id": "create-box"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {},
      "outputs": [],
      "source": [
        "from topologicpy.Plotly import Plotly\n",
        "\n",
        "data = Plotly.DataByTopology(box)\n",
        "figure = Plotly.FigureByData(data)\n",
        "figure.show()"
      ],
      "id": "display-box"
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python (TopologicPy)",
      "language": "python",
      "name": "topologicpy"
    },
    "language_info": {
      "name": "python",
      "version": "3.12"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}
