From 2f47b190ac8285560ce86eafe885cc5124cb7705 Mon Sep 17 00:00:00 2001 From: Theophile Terraz <theophile.terraz@inrae.fr> Date: Wed, 20 Dec 2023 17:56:43 +0100 Subject: [PATCH] improve interpolation --- src/Meshing/Mage.py | 10 +++++++--- src/Model/Geometry/Reach.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Meshing/Mage.py b/src/Meshing/Mage.py index 5fa2516e..43d5cdb6 100644 --- a/src/Meshing/Mage.py +++ b/src/Meshing/Mage.py @@ -181,7 +181,8 @@ class MeshingWithMage(AMeshingTool): ns, npts_max = self.get_reach_stat() - self.complete_cross_section() + gl = reach.compute_guidelines() + self.complete_cross_section(gl[0]) self.interpolate_cross_section(ns, step) self.export_to_m(m_file) @@ -212,8 +213,11 @@ class MeshingWithMage(AMeshingTool): return ns, npts_max - def complete_cross_section(self): - self.st_to_m_compl(0, ' ', ' ') + def complete_cross_section(self, gl=[]): + gl1 = ["un"]+list(gl) + gl2 = list(gl)+["np"] + for l in zip(gl1, gl2): + self.st_to_m_compl(0, l[0], l[1]) def interpolate_cross_section(self, ns, step: float): self.interpolate_profils_pas_transversal( diff --git a/src/Model/Geometry/Reach.py b/src/Model/Geometry/Reach.py index f7c7e485..663f3be0 100644 --- a/src/Model/Geometry/Reach.py +++ b/src/Model/Geometry/Reach.py @@ -374,7 +374,7 @@ class Reach(SQLSubModel): Returns: Tuple of complete and incomplete guidelines name. """ - # Get all point contains into a guideline + # Get all point contained into a guideline named_points = [profile.named_points() for profile in self.profiles] points_name = list( map( -- GitLab