

.. _sphx_glr_examples_06_advanced:

.. _advanced:

Advanced topics
===============

Customizing tessellation, walking nested assemblies, and running
pyvista-cad in headless server environments.


.. raw:: html

  <div id='sg-tag-list' class='sphx-glr-tag-list'></div>


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="A generic mesh viewer draws the triangulation: with show_edges=True you see every facet edge, an artifact of the tessellation tolerance that means nothing to a CAD user. What a CAD user wants is the model&#x27;s topological edges (the B-rep feature curves) over smoothly shaded faces, exactly like a CAD application&#x27;s viewport.">

.. only:: html

  .. image:: /examples/06_advanced/images/thumb/sphx_glr_cad_friendly_plot_thumb.png
    :alt:

  :doc:`/examples/06_advanced/cad_friendly_plot`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">CAD-friendly plotting</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="OCCT&#x27;s BRepMesh_IncrementalMesh exposes a linear and angular deflection knob. Coarser deflection yields fewer triangles; finer deflection yields smoother curves. read_step, read_brep, read_fcstd, and the build123d / cadquery bridges all forward these knobs.">

.. only:: html

  .. image:: /examples/06_advanced/images/thumb/sphx_glr_custom_tessellation_thumb.png
    :alt:

  :doc:`/examples/06_advanced/custom_tessellation`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Custom tessellation deflection</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="IFC files arrive as deeply-nested pyvista.MultiBlock trees (building / storey / element). For some downstream analyses you want one mesh, with each cell tagged by its source element. Combine the tree and carry an element id onto cell data so downstream code can filter by element without walking the tree.">

.. only:: html

  .. image:: /examples/06_advanced/images/thumb/sphx_glr_ifc_to_unstructured_grid_thumb.png
    :alt:

  :doc:`/examples/06_advanced/ifc_to_unstructured_grid`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Collapse an IFC building into a single UnstructuredGrid</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="The cad accessor on MultiBlock provides three traversal helpers: walk yields (path, block) pairs, find filters by glob or metadata predicates, and flatten collapses the tree to a single-level container with path-named entries.">

.. only:: html

  .. image:: /examples/06_advanced/images/thumb/sphx_glr_multiblock_walk_thumb.png
    :alt:

  :doc:`/examples/06_advanced/multiblock_walk`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Walk a real STEP assembly</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/06_advanced/cad_friendly_plot
   /examples/06_advanced/custom_tessellation
   /examples/06_advanced/ifc_to_unstructured_grid
   /examples/06_advanced/multiblock_walk

