You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Domain: explicit kwargs for create/solve/build; expand docs. Export: add find_unionable_pairs and union_tubes_balanced with progress bar; defer remesh to final step.
<p>Create patches for the domain. This is the first step in building the implicit function.</p>
257
257
<divclass="api-method-params">
258
258
<h4>Parameters</h4>
259
259
<ul>
260
-
<li><code>**kwargs</code>: Parameters passed to the allocation algorithm</li>
260
+
<li><code>min_patch_size</code> (int, default=10): Minimum number of points required to form a patch.</li>
261
+
<li><code>max_patch_size</code> (int, default=20): Target maximum number of points per patch (nearest-neighbor window).</li>
262
+
<li><code>overlap</code> (float, default=0.2): Fraction [0, 1] controlling allowed overlap of points between patches.</li>
263
+
<li><code>feature_angle</code> (float, default=30): Maximum angle in degrees between point-wise normal vectors for inclusion in the same patch (used only when normals are provided).</li>
<li><code>resolution</code> (int, default=25): Grid resolution for boundary extraction.</li>
291
+
<li><code>skip_boundary</code> (bool, default=False): If true, only assemble fast-evaluation structures and skip boundary and interior mesh generation.</li>
282
292
</ul>
283
293
</div>
284
294
</div>
@@ -479,6 +489,34 @@ <h3>Creating a Domain from STL File</h3>
<predata-copy><codeclass="language-python">import pyvista as pv
495
+
from svv.domain.domain import Domain
496
+
497
+
mesh = pv.read('vessel.stl')
498
+
domain = Domain(mesh)
499
+
500
+
# Tune patch allocation for dense data with noisy normals
501
+
domain.create(
502
+
min_patch_size=8, # allow smaller patches in sparse areas
503
+
max_patch_size=32, # include more neighbors in dense regions
504
+
overlap=0.35, # increase overlap for smoother blending
505
+
feature_angle=45 # be more tolerant to normal variation/noise
506
+
)
507
+
domain.solve()
508
+
domain.build(resolution=30)</code></pre>
509
+
<divclass="callout tip">
510
+
<strong>When to adjust defaults:</strong>
511
+
<ul>
512
+
<li><em>Dense point clouds:</em> increase <code>max_patch_size</code> to capture local context and reduce edge artifacts.</li>
513
+
<li><em>Sparse/heterogeneous sampling:</em> decrease <code>min_patch_size</code> so isolated regions still form patches.</li>
514
+
<li><em>Noisy or inconsistent normals:</em> raise <code>feature_angle</code> to admit neighbors with larger normal differences; lower it to preserve sharp features.</li>
515
+
<li><em>Smoother blends vs. speed:</em> higher <code>overlap</code> yields smoother transitions across patches but increases compute.</li>
516
+
</ul>
517
+
</div>
518
+
</div>
519
+
482
520
<divclass="api-example">
483
521
<h3>Boolean Operations on Domains</h3>
484
522
<predata-copy><codeclass="language-python"># Create two domains
0 commit comments