/// <summary> /// If Style==Wireframe, then the default decomposes the curve object into /// nurbs curve segments and calls the virtual DrawNurbsCurve for each segment. /// </summary> /// <param name="curve">A document curve object.</param> /// <param name="pipeline">The drawing pipeline.</param> protected virtual void DrawCurveObject(Pixel.Rhino.DocObjects.CurveObject curve, DisplayPipeline pipeline) { IntPtr pConstThis = ConstPointer(); IntPtr pConstCurve = curve.ConstPointer(); IntPtr pPipeline = pipeline.NonConstPointer(); UnsafeNativeMethods.CRhinoVisualAnalysisMode_DrawCurveObject(pConstThis, pConstCurve, pPipeline); }
static void OnDrawRhinoObjectProc(Guid am_id, IntPtr pConstRhinoObject, IntPtr pRhinoDisplayPipeline) { VisualAnalysisMode mode = FindLocal(am_id); if (mode != null) { var rhobj = Pixel.Rhino.DocObjects.RhinoObject.CreateRhinoObjectHelper(pConstRhinoObject); DisplayPipeline dp = new DisplayPipeline(pRhinoDisplayPipeline); try { Pixel.Rhino.DocObjects.BrepObject brep = rhobj as Pixel.Rhino.DocObjects.BrepObject; if (brep != null) { mode.DrawBrepObject(brep, dp); return; } Pixel.Rhino.DocObjects.CurveObject curve = rhobj as Pixel.Rhino.DocObjects.CurveObject; if (curve != null) { mode.DrawCurveObject(curve, dp); return; } Pixel.Rhino.DocObjects.MeshObject mesh = rhobj as Pixel.Rhino.DocObjects.MeshObject; if (mesh != null) { mode.DrawMeshObject(mesh, dp); return; } Pixel.Rhino.DocObjects.PointCloudObject pointcloud = rhobj as Pixel.Rhino.DocObjects.PointCloudObject; if (pointcloud != null) { mode.DrawPointCloudObject(pointcloud, dp); return; } Pixel.Rhino.DocObjects.PointObject pointobj = rhobj as Pixel.Rhino.DocObjects.PointObject; if (pointobj != null) { mode.DrawPointObject(pointobj, dp); return; } } catch (Exception) { } } }