public class CustomConduit : DisplayConduit { private List<Curve> curves; private Color…
- User
public class CustomConduit : DisplayConduit { private List _curves; private Color _color; private int _thickness; private int _pattern;
public CustomConduit(List<Curve> curves, Color color, int thickness, int pattern) { _curves = curves; _color = color; _thickness = thickness; _pattern = pattern; } protected override void DrawOverlay(DrawEventArgs e) { List<Line> tempLines = new List<Line>(); foreach (var curve in _curves) { tempLines.Add(new Line(curve.PointAtStart, curve.PointAtEnd)); } //e.Display.DrawPatternedCurve(curve, _color, _thickness, _pattern); foreach (var line in tempLines) { e.Display.DrawPatternedLine(line,_color,_pattern,_thickness); } }} public static void CustomShowGeometry(List curves, bool disposeDisplay, int thickness, int pattern) { var conduit = new CustomConduit(curves, Color.Crimson, thickness, pattern); conduit.Enabled = true;
if (disposeDisplay) { // Optionally disable the conduit when done conduit.Enabled = false; }}
I did modify the code to this. but even when disposeDisplay is true the preview wont turned off
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.