.. role:: clio-static
   :class: clio-flag clio-flag-static


##################
ParticleTraceUtils
##################

.. js:class:: cee.ug.ParticleTraceUtils

   Helper functions for particle traces
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.ug.ParticleTraceUtils.constructor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~static cee.ug.ParticleTraceUtils.computeGridPoints`
   * :js:meth:`~static cee.ug.ParticleTraceUtils.seedPointsFromPointsAndNormals`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: cee.ug.ParticleTraceUtils.constructor

      .. rst-class:: sig-pretty-signature
      
         | ParticleTraceUtils(): :js:class:`ParticleTraceUtils <cee.ug.ParticleTraceUtils>`
      
      **Returns**\ : :js:class:`ParticleTraceUtils <cee.ug.ParticleTraceUtils>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: static cee.ug.ParticleTraceUtils.computeGridPoints

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | computeGridPoints(**center**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ , **normal**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ , **numU**\ : *number*\ , **numV**\ : *number*\ , **groupSpacing**\ : *number*\ ): :js:class:`Vec3 <cee.Vec3>`\ []
      
      Computes a grid of points based on the given point and normal and returns the array of points
      
      Useful for generating particle trace seed points. All grid points will be in the plane specified by the given center and normal, centered around the center.
      
      **Parameters**
      
      
         **center**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
            The center of the grid of generated points
      
      
         **normal**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
            The normal of the surface which the grid points will be on.
      
      
         **numU**\ : *number*
      
      
            Number of grid point in the U direction.
      
      
         **numV**\ : *number*
      
      
            Number of grid points in the V direction.
      
      
         **groupSpacing**\ : *number*
      
      
            The distance between each point in the grid.
      
      
      
      **Returns**\ : :js:class:`Vec3 <cee.Vec3>`\ []
      
      
         An array of Vec3 points forming a grid as specified. The grid will contain numU\*numV points.
      
      



.. js:method:: static cee.ug.ParticleTraceUtils.seedPointsFromPointsAndNormals

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | seedPointsFromPointsAndNormals(**pointArr**\ : *ArrayLike*\ , **normalArr**\ : *ArrayLike*\ , **modelBoundingBox**\ : :js:class:`BoundingBox <cee.BoundingBox>`\ , **planeFilter**\ : :js:class:`Plane <cee.Plane>`\ ): :js:class:`Vec3 <cee.Vec3>`\ []
      
      Compute seed points based on the centroids of the visible element surfaces of a part.
      
      **Parameters**
      
      
         **pointArr**\ : *ArrayLike*
      
      
            The result of a QueryPartSurfacePositions
      
      
         **normalArr**\ : *ArrayLike*
      
      
            Per point normals. The normal is used to nudge the seed point a bit in the opposite direction of the normal. This is to cater for the seed point being inside the volume and not outside due to numeric precision.
      
      
         **modelBoundingBox**\ : :js:class:`BoundingBox <cee.BoundingBox>`
      
      
            Model bounding box. Used to figure out how much to nudge the seed points to be inside the volume
      
      
         **planeFilter**\ : :js:class:`Plane <cee.Plane>`
      
      
            If a plane is passed in this parameter, only centroids that are on or very close to this plane will be used.
      
      
      
      **Returns**\ : :js:class:`Vec3 <cee.Vec3>`\ []
      
      
         An array of Vec3 points.
      
      




