From adcf67c593081fb111c5b2f7d342cb77cf55a4c1 Mon Sep 17 00:00:00 2001 From: MP Date: Tue, 3 Sep 2024 15:27:18 +0200 Subject: [PATCH] :bug: surface support motion displacement --- .../Loads/Loads/SurfaceSupportMotionDefine.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FemDesign.Grasshopper/Loads/Loads/SurfaceSupportMotionDefine.cs b/FemDesign.Grasshopper/Loads/Loads/SurfaceSupportMotionDefine.cs index 513ef290..2117ca48 100644 --- a/FemDesign.Grasshopper/Loads/Loads/SurfaceSupportMotionDefine.cs +++ b/FemDesign.Grasshopper/Loads/Loads/SurfaceSupportMotionDefine.cs @@ -71,6 +71,11 @@ protected override void SolveInstance(IGH_DataAccess DA) } } + if (displacements.Count != 1 && displacements.Count != 3) + { + throw new ArgumentException("`displacements` must contain 1 or 3 items."); + } + // Convert geometry FemDesign.Geometry.Region region = surface.FromRhino(); @@ -94,7 +99,7 @@ protected override void SolveInstance(IGH_DataAccess DA) } else if(loadLocationValues.Count == 1 || loadLocationValues.Count == 0) { - obj = FemDesign.Loads.SurfaceSupportMotion.Uniform(region, direction, loadCase, comment); + obj = FemDesign.Loads.SurfaceSupportMotion.Uniform(region, displacements[0].FromRhino(), loadCase, comment); }