/// <summary> /// Extrude the model entities `dimTags' by translation along (`dx', `dy', /// `dz'). Return extruded entities in `outDimTags'. If `numElements' is not /// empty, also extrude the mesh: the entries in `numElements' give the number /// of elements in each layer. If `height' is not empty, it provides the /// (cumulative) height of the different layers, normalized to 1. If `dx' == /// `dy' == `dz' == 0, the entities are extruded along their normal. /// </summary> public static void Extrude(ValueTuple <int, int>[] dimTags, double dx, double dy, double dz, out ValueTuple <int, int>[] outDimTags, int[] numElements = default, double[] heights = default, bool recombine = false) { var dimarray = dimTags.ToIntArray(); unsafe { int *ptrss; long outcount = 0; if (numElements == default) { numElements = new int[0]; } if (heights == default) { heights = new double[0]; } Gmsh_Warp.GmshModelGeoExtrude(dimarray, dimarray.LongLength, dx, dy, dz, &ptrss, ref outcount, numElements, numElements.LongLength, heights, heights.LongLength, Convert.ToInt32(recombine), ref Gmsh._staticreff); Gmsh.CheckException(MethodBase.GetCurrentMethod().MethodHandle); var outDimTagsint = UnsafeHelp.ToIntArray(ptrss, outcount); outDimTags = outDimTagsint.ToIntPair(); } }