Using the power of repeatable workflows in nTop Platform, this article explains the inner workings of a custom block used to determine wall thicknesses of a chosen geometry.
- nTop Platform 2.23.7+
- Custom Blocks
- Repeatable Workflows
Download the custom block to follow along.
Starting with the input parameters of this custom block, an implicit model of the chosen geometry must be selected as the ObjectToMeasure. Additionally, a mesh of this model will be needed. Thus, the user must specify the feature size of the mesh as well as the number of points on the surface mesh which can be used to sample the wall thickness. In the case of this example, a 10 mm diameter sphere was chosen as the test object. The subsequent workflow should corroborate the thickness of the sphere (being 5 mm at all points).
Step 1 & 2: Random Points on a Mesh
The first step of this workflow is to create all the random points on the surface mesh of the object. 250 points have been set for this example. Additionally, the diagonal length of the bounding box enclosing this sphere was assigned as a variable. This variable will be used to create “rays”, from which lengths shall be calculated to be the wall thicknesses at each point on the mesh geometry.
Step 3: Locating "Rays"
The third step involves evaluating the field gradient at each point on the implicit body. The gradient is specified as an (x,y,z) vector at each of the 250 points. These gradients are mapped to each of the 250 points to create a point map, not before multiplying each vector by -1 (negating each vector, such that they point in the opposite direction). With the vectors pointing outward from the sphere surface, it is possible to create another set of 250 points forming a larger sphere, with these points being 25% greater in magnitude than the span of the initial bounding box. These additional 250 points will also be used to determine the wall thickness.
Step 4: Branched Lattices
The fourth step involves creating the rays, which are line segments (using the branched lattice workflow) between the outer points of greater magnitude, and the initial points on the mesh geometry. Trimming the rays to the space of the initial implicit body (being the sphere) will create 250 rays, with 500 vertices. The lengths of these 250 rays can now be used to determine the thickness of the solid geometry.
Step 5: Output Wall Thicknesses in a Point Map
As the final step of the custom block, a point map is created to map the start and end points of the trimmed lattice (which correspond to the two halves of the sphere) to the corresponding lengths of the trimmed rays. The heat map demonstrates that most points record a wall thickness of 10 mm, with a few points with a nearly negligible difference to the 10 mm wall thickness.
Importing this custom block into a new workflow, the input parameters from the inner workings of the custom block will be shown to the user. As can be seen, the thicknesses of the array at various points of interest are recorded in the point map. This scalar point map can be used for further field-driven analysis in nTop Platform or simply to inform the user about the thickness of their part prior to fabrication.