{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Plotting of 3D wedges\n\nPlot the 3D geometry of wedges and end-spacers\n\nDownload Input files\n\n* :download:`dipole_2d.data <../../../../../examples/input_files/dipole_3d.data>`\n* :download:`dipole_2d.post.xml <../../../../../examples/input_files/dipole_3d.post.xml>`\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Setting up\nStandard Loading of input, Parsing and Initializing RoxiePlotOutputs object\n\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from roxieapi.output.plots import RoxiePlotOutputs\n\nplots = RoxiePlotOutputs(\n \"../input_files/dipole_3d.post.xml\", \"../input_files/dipole_3d.data\"\n)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Creating plot object and plotting\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "plotter = plots.plots3d._create_plot()\nspacers = plots.plots3d.get_endspacer_geometry(plots.output.plots3D[0], 1, 1)\nplotter.add_mesh(spacers)\nplotter.show()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create output file\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "plotter = plots.plots3d._create_plot()\nplotter.add_mesh(spacers)\nplotter.export_html(\"export_wedges_3d.html\")\n\n# Save vtk file\nspacers.save(\"spacers.vtm\")\nplotter.show()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.9.20" } }, "nbformat": 4, "nbformat_minor": 0 }