I have implemented using the displaypipe method to display, but I found that two modules cannot be displayed simultaneously. If they are separated, they can be displayed separately.
But what I need is to display both modules simultaneously
One of the methods is as follows:
public override void DrawViewportWires(IGH_PreviewArgs args)
{
Plane plane;
args.Viewport.GetFrustumFarPlane(out plane);
Color col = new Color();
for( int i = 0;i < _curves.Count;i++)
{
double ppu;
args.Viewport.GetWorldToScreenScale(pts[i], out ppu);
plane.Origin = pts[i];
if(grades[i] == 1)
col = Color.DarkBlue;
if(grades[i] == 2)
col = Color.FromArgb(51, 112, 204);
if(grades[i] == 3)
col = Color.Green;
if(grades[i] == 4)
col = Color.Yellow;
if(grades[i] == 5)
col = Color.Orange;
if(grades[i] == 6)
col = Color.DarkRed;
if(views)
{
args.Display.Draw3dText(grades[i].ToString(), Color.White, plane, 10 / ppu, "Arial", false, false, Rhino.DocObjects.TextHorizontalAlignment.Center, Rhino.DocObjects.TextVerticalAlignment.Bottom);
}
args.Display.DrawCurve(_curves[i], col, 2);
}
}
1 post - 1 participant

