/// <summary> /// DO NOT USE UNLESS YOU ARE CERTAIN ABOUT THE IMPLICATIONS. /// <para>This is an expert user function which should not be needed in most /// cases. This function is similar to a const_cast in C++ to allow an object /// to be made temporarily modifiable without causing RhinoCommon to convert /// the class from const to non-const by creating a duplicate.</para> /// /// <para>You must call this function with a true parameter, make your /// modifications, and then restore the const flag by calling this function /// again with a false parameter. If you have any questions, please /// contact McNeel developer support before using!</para> /// </summary> /// <param name="geometry">Some geometry.</param> /// <param name="makeNonConst">A boolean value.</param> public static void InPlaceConstCast(Rhino.Geometry.GeometryBase geometry, bool makeNonConst) { if (makeNonConst) { geometry.ApplyConstCast(); } else { geometry.RemoveConstCast(); } }