Customizing OptiCroSec component

Dear experts,

I´m trying to customize the OptiCroSec component, e.g. using Th.II instead of ThI, following the Scripting Guide 2.2.0 example that can be found here.

However, I can´t find it in the GH C# editor despite since version 1.3.3 it seems available in the Karamba.Algorithms namespace. Simply swapping ThI by ThII in the code does not work either.

I´m using the latest Karamba3D for Rhino7 (v. downloaded from your website.

How would I use the Karamba3D API Reference? What am I doing wrong?

Dear @Vigardo,
I have just seen, that I forgot to add it to the toolkit - sorry for that. It will be there in the next service release of Karamba3D 2.2.0.
As a workaround you can call the static method Karamba.Algorithms.AnalyzeThII.solve:

/// Analyze a models deformation using second order theory.
/// in_model: the model to be analyzed.
/// lc_nii: name of load-case for determining the normal force for ThII effects.
///     If -1 then NII is taken as the maximum compressive normal force.
/// rtol: Upper limit for the ratio between initial and current residual forces.
/// max_iter. maximum number of iterations for finding NII.
/// nii_lt0: if true only compressive normal forces are considered as NII.
///     Stiffening of the system is thus avoided.
/// lc_max_disp: maximum displacement for each load case. List-structure: load-case/disp.
/// lc_gravity_force: resultant gravity force for each load-case. List-structure: load-case/gravity-    force.
/// lc_elastic_energy: internal elastic energy for each load-case. List-structure: load-case/energy.
/// model: analyzed model with displacements.
/// warning: warning regarding the solution process or "".
public static void solve(
           Model in_model,
           string lc_nii,
           double rtol,
           int max_iter,
           bool nii_lt0,
           out List<double> lc_max_disp,
           out List<double> lc_gravity_force,
           out List<double> lc_elastic_energy,
           out Model model,
           out string warning)

– Clemens

1 Like

Thanks Clemens, using your method solves the issue!

Karamba.Algorithms.AnalyzeThII.solve(model, "-1", rtol, maxit, false, out max_disp, out out_g, out out_comp, out model, out message);