.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/Meshes/Mesh7.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_Mesh7.py: Mesh7 ===== Meshing a 3D part in revolution. .. GENERATED FROM PYTHON SOURCE LINES 11-51 .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Meshes/images/sphx_glr_Mesh7_001.png :alt: Mesh7 :srcset: /examples/Meshes/images/sphx_glr_Mesh7_001.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v1.5.4/docs/examples/Meshes/images/sphx_glr_Mesh7_001.vtksz .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Meshes/images/sphx_glr_Mesh7_002.png :alt: Mesh7 :srcset: /examples/Meshes/images/sphx_glr_Mesh7_002.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v1.5.4/docs/examples/Meshes/images/sphx_glr_Mesh7_002.vtksz .. rst-class:: sphx-glr-script-out .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:909: PyVistaDeprecationWarning: ../../../../envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:909: Arguments 'pointa', 'pointb', 'center' must be passed as keyword arguments to function 'CircularArc'. From version 0.50, passing these as positional arguments will result in a TypeError. return pv.CircularArc( /home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:932: PyVistaDeprecationWarning: ../../../../envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:932: Arguments 'pointa', 'pointb', 'center' must be passed as keyword arguments to function 'CircularArc'. From version 0.50, passing these as positional arguments will result in a TypeError. arc1 = pv.CircularArc(geom.pt1.coord, geom.pt3.coord, geom.center.coord) /home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:933: PyVistaDeprecationWarning: ../../../../envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:933: Arguments 'pointa', 'pointb', 'center' must be passed as keyword arguments to function 'CircularArc'. From version 0.50, passing these as positional arguments will result in a TypeError. arc2 = pv.CircularArc( | .. code-block:: Python :lineno-start: 12 from EasyFEA import Display, ElemType, np, PyVista from EasyFEA.Geoms import Point, Points, Circle, Line if __name__ == "__main__": Display.Clear() width = 1 height = 2 radius = 1 meshSize = width / 5 pt1 = Point(radius, 0, r=width / 3) pt2 = Point(radius + width, 0, r=width / 3) pt3 = Point(radius + width, height, r=-width / 3) pt4 = Point(radius, height, r=-width / 3) contour = Points([pt1, pt2, pt3, pt4], meshSize) circle1 = Circle(Point(width / 2 + radius, height * 1 / 4), width / 3, width / 10) circle2 = Circle(Point(width / 2 + radius, height * 3 / 4), width / 3, width / 10) circle3 = Circle( Point(width / 2 + radius, height / 2), width / 3, width / 10, False ) inclusions = [circle1, circle2, circle3] axis = Line(Point(), Point(radius / 3, height)) axis.name = "rot axis" plotter = PyVista.Plot_Geoms([contour, *inclusions, axis]).show() angle = 360 * 4 / 6 perimeter = angle * np.pi / 180 * radius layers = [perimeter // meshSize] mesh = contour.Mesh_Revolve(inclusions, axis, angle, layers, ElemType.PRISM6) PyVista.Plot_Mesh(mesh).show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.812 seconds) .. _sphx_glr_download_examples_Meshes_Mesh7.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: Mesh7.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: Mesh7.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: Mesh7.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_