.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/Meshes/Mesh2_2D.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_Meshes_Mesh2_2D.py: Mesh2_2D ======== Meshing a triangle. .. GENERATED FROM PYTHON SOURCE LINES 12-29 .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Meshes/images/sphx_glr_Mesh2_2D_001.png :alt: Mesh2 2D :srcset: /examples/Meshes/images/sphx_glr_Mesh2_2D_001.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v1.8.3/docs/examples/Meshes/images/sphx_glr_Mesh2_2D_001.vtksz .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Meshes/images/sphx_glr_Mesh2_2D_002.png :alt: Mesh2 2D :srcset: /examples/Meshes/images/sphx_glr_Mesh2_2D_002.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v1.8.3/docs/examples/Meshes/images/sphx_glr_Mesh2_2D_002.vtksz .. code-block:: Python :lineno-start: 13 from EasyFEA import Display, ElemType, PyVista from EasyFEA.Geoms import Points if __name__ == "__main__": Display.Clear() h = 180 N = 5 contour = Points([(0, 0), (h, 0), (0, h)], h / N) PyVista.Plot_Geoms(contour).show() # "TRI3", "TRI6", "TRI10", "TRI15" elemType = ElemType.TRI3 mesh = contour.Mesh_2D([], elemType) PyVista.Plot_Mesh(mesh).show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.304 seconds) .. _sphx_glr_download_examples_Meshes_Mesh2_2D.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: Mesh2_2D.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: Mesh2_2D.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: Mesh2_2D.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_