|
AMCAX Kernel 1.0.0.0
|
This tutorial provides detailed configuration methods for various local size fields in mesh generation to control the size of generated meshes.
| Class | Key | Required | Value Range | Default | Description |
|---|---|---|---|---|---|
| LocalSizeField | BGField | Yes | Integer [1, inf] | 1 | The Tag value of the local size field, used as the background size field |
| LocalSizeField | AutomaticField | No | Automatically calculates global mesh size based on curvature and narrow regions | ||
| AutomaticField | CurvatureFactor | No | [0, inf] | 0.5 | Determines if curvature-based sizing is enabled. Smaller values result in smaller sizes (denser mesh) in high-curvature regions |
| AutomaticField | NarrowRegionResolution2D | No | [0, inf] | 1 | Determines if sizing is calculated based on 2D narrow regions (self-intersections). Value represents number of mesh layers in narrow regions - higher values mean denser mesh |
| AutomaticField | NarrowRegionResolution3D | No | [0, inf] | 1 | Determines if sizing is calculated based on 3D narrow regions (between surfaces). Value represents number of mesh layers in narrow regions - higher values mean denser mesh |
| AutomaticField | GrowthRate | Yes | [1, inf] | 1.4 | Allowed growth rate between adjacent size transitions |
| AutomaticField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag (must not duplicate other Tags) |
| LocalSizeField | MinField | No | Integer [1, inf] | Takes the minimum size from all input size fields | |
| MinField | SelectedFieldTags | Yes | [1, 2, 3...] | - | Input the Tags of size fields to take minimum size from (must exist) |
| MinField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | MaxField | No | Takes the maximum size from all input size fields | ||
| MaxField | SelectedFieldTags | Yes | [1, 2, 3...] | - | Input the Tags of size fields to take maximum size from (must exist) |
| MaxField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | BallField | No | Specifies size values within a defined sphere | ||
| BallField | Center | Yes | Any 3D coordinates | - | Sphere center coordinates (three floating-point numbers) |
| BallField | Radius | Yes | [0, inf] | 0.0 | Sphere radius |
| BallField | InterLocSize | Yes | [0, inf] | 0.0 | Size value inside the sphere |
| BallField | OutLocSize | No | [0, inf] | 0.0 | Size value outside the sphere |
| BallField | Thickness | No | [0, inf] | 0.0 | Sphere boundary transition layer - size in this layer is interpolated between InterLocSize and OutLocSize. Setting Thickness requires OutLocSize |
| BallField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | BoxField | No | Specifies size values within a defined box (determined by min/max points) | ||
| BoxField | MinPoint | Yes | Any 3D coordinates | - | Box minimum point |
| BoxField | MaxPoint | Yes | Any 3D coordinates | - | Box maximum point |
| BoxField | InterLocSize | Yes | [0, inf] | 0.0 | Size value inside the box |
| BoxField | OutLocSize | No | [0, inf] | 0.0 | Size value outside the box |
| BoxField | Thickness | No | [0, inf] | 0.0 | Box boundary transition layer (similar to BallField). Setting Thickness requires OutLocSize |
| BoxField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | CylinderField | No | Specifies size values within a defined cylinder | ||
| CylinderField | Center | Yes | Any 3D coordinates | - | Cylinder center coordinates (three floating-point numbers) |
| CylinderField | Axis | Yes | Any 3D non-zero vector | - | Cylinder axis (three floating-point numbers) |
| CylinderField | Radius | Yes | [0, inf] | 0.0 | Cylinder radius |
| CylinderField | InterLocSize | Yes | [0, inf] | 0.0 | Size value inside the cylinder |
| CylinderField | OutLocSize | No | [0, inf] | 0.0 | Size value outside the cylinder |
| CylinderField | Thickness | No | [0, inf] | 0.0 | Cylinder boundary transition layer (similar to BallField). Setting Thickness requires OutLocSize |
| CylinderField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | DistanceField | No | Uses distance to input geometry (points, edges, faces, solids) as size, typically used with ThresholdField | ||
| DistanceField | SelectedVertexTags | No | [1, 2, 3...] | - | Input point Tags |
| DistanceField | SelectedEdgeTags | No | [1, 2, 3...] | - | Input edge Tags |
| DistanceField | SelectedFaceTags | No | [1, 2, 3...] | - | Input face Tags |
| DistanceField | SelectedSolidTags | No | [1, 2, 3...] | - | Input solid Tags |
| DistanceField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | ThresholdField | No | Interpolates new sizes between MinDist and MaxDist based on input field's calculated sizes | ||
| ThresholdField | MinDist | Yes | [0, inf] | 0.0 | Minimum size threshold |
| ThresholdField | MaxDist | Yes | [0, inf] | 0.0 | Maximum size threshold |
| ThresholdField | MaxSize | Yes | [0, inf] | 0.0 | Returns MaxSize if input field's calculated size exceeds MinDist |
| ThresholdField | MinSize | Yes | [0, inf] | 0.0 | Returns MinSize if input field's calculated size is less than MinDist |
| ThresholdField | SelectedFieldTag | Yes | Integer [1, inf] | 1 | Input size field Tag (typically DistanceField) |
| ThresholdField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
| LocalSizeField | RestrictField | No | Only calculates sizes on input geometry (points, edges, faces, solids) using the input size field | ||
| RestrictField | IsBoundary | No | [true, false] | true | Whether to calculate sizes on the boundary of input geometry |
| RestrictField | SelectedVertexTags | No | [1, 2, 3...] | - | Input point Tags |
| RestrictField | SelectedEdgeTags | No | [1, 2, 3...] | - | Input edge Tags |
| RestrictField | SelectedFaceTags | No | [1, 2, 3...] | - | Input face Tags |
| RestrictField | SelectedSolidTags | No | [1, 2, 3...] | - | Input solid Tags |
| RestrictField | SelectedFieldTag | Yes | Integer [1, inf] | 1 | Input size field Tag |
| RestrictField | Tag | Yes | Integer [1, inf] | 1 | Current size field's Tag |
The JSON file above provides the configuration methods for each size field. In practical use, you can set the corresponding size field according to your needs or change the value of BGField in the JSON file to use different size fields. Next, we will set different values for BGField in the JSON file to use different size fields.
Set "BGField": 1. In this case, BGField is the Tag parameter of AutomaticField, so AutomaticField will be used.
If coupling with other size fields is needed, set MinField or MaxField as the background field. Input the Tag of AutomaticField and other size fields to be coupled into MinField or MaxField.
The result is as follows:
Set "BGField": 2. In this case, BGField is the Tag parameter of MinField, so MinField will be used.
For any point, the size is calculated from all input fields, and the minimum size is returned.The result is as follows:
Set "BGField": 3. In this case, BGField is the Tag parameter of MaxField, so MaxField will be used.
For any point, the size is calculated from all input fields, and the maximum size is returned. The result is as follows:
Set "BGField": 4. In this case, BGField is the Tag parameter of BallField, so BallField will be used.
Thickness and OutLocSize are optional.The result is as follows:
Set "BGField": 6. In this case, BGField is the Tag parameter of BoxField, so BoxField will be used.
Thickness and OutLocSize are optional.
The result is as follows:
Set "BGField": 7. In this case, BGField is the Tag parameter of CylinderField, so CylinderField will be used.
Thickness and OutLocSize are optional.
The result is as follows:
Set "BGField": 8. In this case, BGField is the Tag parameter of DistanceField, so DistanceField will be used.
The distance is used as the mesh size. Therefore, when the distance is smaller than the global minsize, minsize is used. When the distance is larger than the global maxsize, maxsize is used. Some geometries can be omitted.
The result is as follows:
Set "BGField": 9. In this case, BGField is the Tag parameter of ThresholdField, so ThresholdField will be used.
This is typically used in combination with DistanceField (i.e., specifying DistanceField as the selected size field in ThresholdField).
If the distance or size value ls of the lookup point is < MinDist, MinSize (from the threshold field) is returned.
If the distance or size value ls of the lookup point is > MaxDist, MaxSize (from the threshold field) is returned.
If the distance or size value ls of the lookup point is between MinDist and MaxDist, a new size is interpolated based on MinSize and MaxSize.
The result is as follows:
Set "BGField": 10. In this case, BGField is the Tag parameter of RestrictField, so RestrictField will be used.
The result is as follows:
Click here example03 to get the complete source code for the mesh size control example. Everyone can download it as needed.