From f02ef17e2492c939df5c452e18a09ca13593c993 Mon Sep 17 00:00:00 2001 From: Thomas Guillod Date: Mon, 20 Jan 2025 15:08:24 -0500 Subject: [PATCH] voxelization with quadrature (doc and examples) --- docs/format/file_geometry_stl.yaml | 9 +++------ examples/examples_stl/inductor_air/geometry.yaml | 1 - examples/examples_stl/inductor_core/geometry.yaml | 1 - examples/examples_stl/inductor_toroid/geometry.yaml | 1 - examples/examples_stl/transformer_air/geometry.yaml | 1 - examples/examples_stl/transformer_core/geometry.yaml | 1 - pypeec/data/schema_geometry_stl.yaml | 5 ----- 7 files changed, 3 insertions(+), 16 deletions(-) diff --git a/docs/format/file_geometry_stl.yaml b/docs/format/file_geometry_stl.yaml index cc7a2857..a2d778ad 100644 --- a/docs/format/file_geometry_stl.yaml +++ b/docs/format/file_geometry_stl.yaml @@ -14,21 +14,18 @@ # - check: boolean parameters for checking the STL mesh integrity # - if true, the STL mesh should represent a closed surface # - if false, the surface status of the STL mesh is not checked - # - tol: distance between the voxel boundaries and the voxelization test points - # - if non-zero, a clearance is respected between the test points and the voxel boundary - # - if equal to zero, test points can be located on the voxel boundary # - thr: threshold for the voxelization (in order to keep/exclude voxels) - # - the fraction of test points located inside the shape is computed for each voxel + # - the volume fraction located inside the STL mesh is computed for each voxel # - if the fraction is greater than the threshold, the voxel is added to the structure # - pts: number of test points used for the voxelization (for each voxel) # - if greater than one, several points are used (pts^3 points are created) - # - if one, a single test point is used (in the center the voxel) + # - if equal to one, a single test point is used (in the center the voxel) + # - the Gauss-Legendre quadrature is used to span the points "param": "d": [10.0e-3, 10.0e-3, 10.0e-3] "xyz_min": [-20e-3, -20e-3, -20e-3] "xyz_max": [+20e-3, +20e-3, +20e-3] "check": true - "tol": 1.0e-3 "thr": 0.5 "pts": 1 diff --git a/examples/examples_stl/inductor_air/geometry.yaml b/examples/examples_stl/inductor_air/geometry.yaml index da7b291d..0bbe3b38 100644 --- a/examples/examples_stl/inductor_air/geometry.yaml +++ b/examples/examples_stl/inductor_air/geometry.yaml @@ -13,7 +13,6 @@ "xyz_min": null "xyz_max": null "check": true - "tol": 1.0e-6 "thr": 0.5 "pts": 1 "domain_stl": diff --git a/examples/examples_stl/inductor_core/geometry.yaml b/examples/examples_stl/inductor_core/geometry.yaml index 28357f9e..f608b465 100644 --- a/examples/examples_stl/inductor_core/geometry.yaml +++ b/examples/examples_stl/inductor_core/geometry.yaml @@ -13,7 +13,6 @@ "xyz_min": null "xyz_max": null "check": true - "tol": 1.0e-6 "thr": 0.5 "pts": 1 "domain_stl": diff --git a/examples/examples_stl/inductor_toroid/geometry.yaml b/examples/examples_stl/inductor_toroid/geometry.yaml index db38a04f..58f80003 100644 --- a/examples/examples_stl/inductor_toroid/geometry.yaml +++ b/examples/examples_stl/inductor_toroid/geometry.yaml @@ -13,7 +13,6 @@ "xyz_min": null "xyz_max": null "check": true - "tol": 1.0e-6 "thr": 0.5 "pts": 1 "domain_stl": diff --git a/examples/examples_stl/transformer_air/geometry.yaml b/examples/examples_stl/transformer_air/geometry.yaml index 426f3f83..3b63cbfe 100644 --- a/examples/examples_stl/transformer_air/geometry.yaml +++ b/examples/examples_stl/transformer_air/geometry.yaml @@ -13,7 +13,6 @@ "xyz_min": null "xyz_max": null "check": true - "tol": 1.0e-6 "thr": 0.5 "pts": 1 "domain_stl": diff --git a/examples/examples_stl/transformer_core/geometry.yaml b/examples/examples_stl/transformer_core/geometry.yaml index b9edb2e7..a0a10012 100644 --- a/examples/examples_stl/transformer_core/geometry.yaml +++ b/examples/examples_stl/transformer_core/geometry.yaml @@ -13,7 +13,6 @@ "xyz_min": null "xyz_max": null "check": true - "tol": 1.0e-6 "thr": 0.5 "pts": 1 "domain_stl": diff --git a/pypeec/data/schema_geometry_stl.yaml b/pypeec/data/schema_geometry_stl.yaml index 27a59e22..b5e09806 100644 --- a/pypeec/data/schema_geometry_stl.yaml +++ b/pypeec/data/schema_geometry_stl.yaml @@ -10,7 +10,6 @@ - "xyz_min" - "xyz_max" - "check" - - "tol" - "thr" - "pts" "properties": @@ -40,10 +39,6 @@ "check": "type": "boolean" "minimum": 0 - - "tol": - "type": "number" - "minimum": 0 "thr": "type": "number" "minimum": 0