Here is a curve, and I have found its middle point, how can I put a text near or on the point using C# script?
public override void DrawViewportWires(IGH_PreviewArgs args)
{args.Display.Draw3dText(t, c, pl, s, “Arial”, false, false,
TextHorizontalAlignment.Center, TextVerticalAlignment.Middle);
}
display3dtext.gh (5.3 KB)
DisplayPipeline好像不能直接实例化,可参考 DisplayPipeline.DrawArrow Method (Line, Color, Double, Double)的代码示例https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Display_DisplayPipeline_DrawArrow_1.htm。 做法是构造一个新类,用事件的方式将DrawForeground方法重写。我照着做了一个,供参考。
display3dtext312.gh (4.1 KB)
Thanks very much!