# ParticleTraceUtils

class `cee.ug.``ParticleTraceUtils`()

  Helper functions for particle traces

Constructors

- `constructor`

Methods

- `computeGridPoints`
- `seedPointsFromPointsAndNormals`

## Constructors

`ParticleTraceUtils.``constructor`()

  Return type: | ParticleTraceUtils

## Methods

### static computeGridPoints

`ParticleTraceUtils.``computeGridPoints`(center, normal, numU, numV, groupSpacing)

  Arguments: | center (`Vec3Like`) – The center of the grid of generated points normal (`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.

  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.

  Returns: | An array of Vec3 points forming a grid as specified. The grid will contain numU*numV points.
  Return type: | [Vec3]

### static seedPointsFromPointsAndNormals

`ParticleTraceUtils.``seedPointsFromPointsAndNormals`(pointArr, normalArr, modelBoundingBox[, planeFilter])

  Arguments: | 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 (`BoundingBox`) – Model bounding box. Used to figure out how much to nudge the seed points to be inside the volume planeFilter (`Plane`) – optional If a plane is passed in this parameter, only centroids that are on or very close to this plane will be used.

  Compute seed points based on the centroids of the visible element surfaces of a part.

  Returns: | An array of Vec3 points.
  Return type: | [Vec3]

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...