Hi team Karamba.
i have been trying to make shells elements with variable thickness using c#.
i have understood how i can make a buildershell using the factorypart, and can get a basic shell element that assembles and gets rendered in the shellview component.
what i am struggling with is how to generate a variable thickness crossSection.
When i try to make a crosssection with variable thickness i get an error from Karamba.Utilities.Utils.blowUp[T](List`1 l, DataTreeStructure tree)
could you give me a hint on how to proceed?
my code snippet is as follows:
the PolylinesToMesh script creates a mesh which goes through the vertices of the polylines, and has an equal number of vertices as the total vertices in all the polylines.
List<Polyline> divMidPolylines = new List<Polyline>();
_thicknesses = new List<double>();
_eccentricities = new List<double>();
for (int i = 0; i < MidPolylines.Count; i++)
{
double x = (double) i / (double) MidPolylines.Count;
Polyline midPoly = MidPolylines[i];
Polyline divPoly = Toolbox.DividePolyline(midPoly, _resolution, true);
divMidPolylines.Add(divPoly);
//calculate thicknesses
for (int j = 0; j < divPoly.Count; j++)
{
double height1 = BridgeToolbox.CalcVariableDim(x, _heights1);
double height2 = BridgeToolbox.CalcVariableDim(x, _heights2);
double thickness = (double) j / (double) divPoly.Count;
_thicknesses.Add(thickness);
_eccentricities.Add(0.0);
}//end loop along poly vertices
}//end loop along polylines
rhinoMesh = Toolbox.PolylinesToMesh(divMidPolylines);
//make Karamba Mesh3
Mesh3 karambaMesh3 = RhinoMeshToMesh3(ref rhinoMesh);
//make cross section
var materials = new List<FemMaterial>();
var crossSec = new CroSec_Shell("family", "name", "country", null, materials,_eccentricities , _thicknesses);
var factory = new Karamba.Factories.FactoryPart();
var karLogger = new Karamba.Utilities.MessageLogger();
var karambaMeshes = new List<Mesh3>(){karambaMesh3};
var identifiers = new List<string>(){"ident1"};
var crossSections = new List<Karamba.CrossSections.CroSec>(){crossSec};
bool bendingToggle = true;
var messageLogger = new Karamba.Utilities.MessageLogger();
double limitDist = 0.005;
List<Point3> resultingNodes;
List<BuilderShell> builderShells = factory.MeshToShell(karambaMeshes, identifiers, crossSections, bendingToggle, messageLogger, out resultingNodes, limitDist);
ShellElement = new Karamba.GHopper.Elements.GH_Element(builderShells[0]);
i hope you can help, thanks in advance.