public Curve[] Explode() { IntPtr const_ptr_parent = IntPtr.Zero; IntPtr const_ptr_this = IntPtr.Zero; IntPtr const_ptr_this_dimstyle = IntPtr.Zero; TextObject parent = _GetConstObjectParent() as TextObject; if (null != parent) { const_ptr_parent = parent.ConstPointer(); } else { const_ptr_this = ConstPointer(); //const_ptr_this_dimstyle = ConstPointerForDimStyle(); } var dimstyle = DimensionStyle; if (null == parent) { const_ptr_this_dimstyle = dimstyle.ConstPointer(); } Runtime.InteropWrappers.SimpleArrayCurvePointer curves = new Runtime.InteropWrappers.SimpleArrayCurvePointer(); IntPtr ptr_curves = curves.NonConstPointer(); UnsafeNativeMethods.RHC_RhinoGetTextOutlines(const_ptr_parent, const_ptr_this, const_ptr_this_dimstyle, ptr_curves); GC.KeepAlive(dimstyle); // GC_KeepAlive: Nov. 1, 2018 GC.KeepAlive(parent); // GC_KeepAlive: Nov. 1, 2018 return(curves.ToNonConstArray()); }
public Curve[] CreateCurves(DimensionStyle dimstyle, bool bAllowOpen, double smallCapsScale = 1.0, double spacing = 0.0) { IntPtr const_ptr_parent = IntPtr.Zero; IntPtr const_ptr_this = IntPtr.Zero; TextObject parent = _GetConstObjectParent() as TextObject; if (null != parent) { const_ptr_parent = parent.ConstPointer(); } else { const_ptr_this = ConstPointer(); } Runtime.InteropWrappers.SimpleArrayCurvePointer curves = new Runtime.InteropWrappers.SimpleArrayCurvePointer(); IntPtr ptr_curves = curves.NonConstPointer(); var const_ptr_dimstyle = dimstyle.ConstPointer(); UnsafeNativeMethods.RHC_RhinoGetPlanarCurvesFromText(const_ptr_parent, const_ptr_this, const_ptr_dimstyle, !bAllowOpen, smallCapsScale, spacing, ptr_curves); return(curves.ToNonConstArray()); }
public Extrusion[] CreateExtrusions(DimensionStyle dimstyle, double height, double smallCapsScale = 1.0, double spacing = 0.0) { IntPtr const_ptr_parent = IntPtr.Zero; IntPtr const_ptr_this = IntPtr.Zero; TextObject parent = _GetConstObjectParent() as TextObject; if (null != parent) { const_ptr_parent = parent.ConstPointer(); } else { const_ptr_this = ConstPointer(); } Runtime.InteropWrappers.SimpleArrayExtrusionPointer extrusions = new Runtime.InteropWrappers.SimpleArrayExtrusionPointer(); IntPtr ptr_extrusions = extrusions.NonConstPointer(); var const_ptr_dimstyle = dimstyle.ConstPointer(); UnsafeNativeMethods.RHC_RhinoGetExtrusionsFromText(const_ptr_parent, const_ptr_this, const_ptr_dimstyle, smallCapsScale, height, spacing, ptr_extrusions); return(extrusions.ToNonConstArray()); }
public Brep[] CreateSurfaces(DimensionStyle dimstyle, double smallCapsScale = 1.0, double spacing = 0.0) { IntPtr const_ptr_parent = IntPtr.Zero; IntPtr const_ptr_this = IntPtr.Zero; TextObject parent = _GetConstObjectParent() as TextObject; if (null != parent) { const_ptr_parent = parent.ConstPointer(); } else { const_ptr_this = ConstPointer(); } Runtime.InteropWrappers.SimpleArrayBrepPointer breps = new Runtime.InteropWrappers.SimpleArrayBrepPointer(); IntPtr ptr_breps = breps.NonConstPointer(); var const_ptr_dimstyle = dimstyle.ConstPointer(); UnsafeNativeMethods.RHC_RhinoGetPlanarBrepsFromText(const_ptr_parent, const_ptr_this, const_ptr_dimstyle, smallCapsScale, spacing, ptr_breps); return(breps.ToNonConstArray()); }