/// <summary> /// Extrude the model entities `dimTags' by rotation of `angle' radians around /// the axis of revolution defined by the point (`x', `y', `z') and the /// direction (`ax', `ay', `az'). The angle should be strictly smaller than /// Pi. 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. /// </summary> public static void Revolve(ValueTuple <int, int>[] dimTags, double x, double y, double z, double ax, double ay, double az, double angle, 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.GmshModelGeoRevolve(dimarray, dimarray.LongLength, x, y, z, ax, ay, az, angle, &ptrss, ref outcount, numElements, numElements.LongLength, heights, heights.LongLength, Convert.ToInt32(recombine), ref Gmsh._staticreff); Gmsh.CheckException(MethodBase.GetCurrentMethod().MethodHandle); var outDimTagsint = new int[outcount]; Marshal.Copy(new IntPtr(ptrss), outDimTagsint, 0, outDimTagsint.Length); outDimTags = outDimTagsint.ToIntPair(); } }