forked from 1b-agent/fieldcraft-upstream
mesh: hex extrusion of a quad section up to a target surface (#400)
Each source node follows its own path (a direction or the section normal) to the target, found by Newton on the target's tangent plane; layers are graded by a bias; side faces, when given, hold the boundary nodes of every layer (alternating projections at the target), and interior nodes take the boundary-residual correction. Source nodes are kept, so a section taken from a neighbouring mesh conforms with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
d6b336538a
commit
600b2ff633
4 files changed
+761
-1
No files matched your search
@@ -518,7 +518,7 @@ impl Affine {
|
||||
|
||||
/// Inverse-distance (Shepard, power 4) weights of the ring nodes at `p`, normalized: the
|
||||
/// residual correction at `p` is their weighted sum of the ring's residuals.
|
||||
fn shepard_weights(p: [f64; 2], ring: &[[f64; 2]]) -> Vec<(usize, f64)> {
|
||||
pub(super) fn shepard_weights(p: [f64; 2], ring: &[[f64; 2]]) -> Vec<(usize, f64)> {
|
||||
let mut w: Vec<(usize, f64)> = Vec::with_capacity(ring.len());
|
||||
for (k, s) in ring.iter().enumerate() {
|
||||
let d2 = (p[0] - s[0]).powi(2) + (p[1] - s[1]).powi(2);
|
||||
|
||||
Reference in new issue
Block a user