| Article | 70002820 |
| Type | HowTo |
| Product | Engine |
| Date Added | 1/10/2026 12:00:00 AM |
| Fixed | 11.5.20 (1/15/2026 12:00:00 AM) |
| Submitted by | VectorDraw Team |
Summary
Improve the user action pan and rotate 3d scene performance in 3d rendering mode
Solution
The most heavy in 3d rendering of a drawing is the transparency(AlphaBlending) of the objects color
Generally the transparency needs the objects to be render twice
You can temporary disable it during the user pan and/or rotate 3d scene as follow
Also you can ignore the draw of specific figures during the pan and rotate3d actions
And also you can increase the TimerBreakForDraw value to a bigger one to avoid flickering (default value is 85 milliseconds)
doc.GlobalRenderProperties.TimerBreakForDraw = 120;
doc.FreezeEntityDrawEvents.Push(false);//needed if you need to override the OnDrawFigure event
doc.ActionStart += Doc_ActionStart;
doc.ActionFinish += Doc_ActionFinish;
private void Doc_ActionFinish([System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.IDispatch)] object sender, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.IDispatch)] object action)
{
if (action.GetType().FullName != "VectorDraw.Professional.ActionUtility.ActionPan" && action.GetType().FullName != "VectorDraw.Professional.ActionUtility.ActionDynamicRot") return;
doc.GlobalRenderProperties.IgnoreTransparency = false;
doc.OnDrawFigure -= Doc_OnDrawFigure;
doc.Invalidate();//refresh the screen with normal objects display
}
private void Doc_ActionStart([System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.IDispatch)] object sender, string actionName, ref bool cancel)
{
if (actionName != "BaseAction_ActionPan" && actionName != "BaseAction_ActionDynamicRot") return;
doc.GlobalRenderProperties.IgnoreTransparency = true;//ignore the transparency for faster redraw
doc.OnDrawFigure += Doc_OnDrawFigure;
}
private void Doc_OnDrawFigure(object sender, vdRender render, ref bool cancel)
{//disable the draw of text and dimensions and 2d polylines objects
if (render.IsWire2d) return;
if (render.IsCreatingList) return;
if (sender is vdPolyline || sender is vdText || sender is vdDimension)
{
cancel = true;//do not draw the figure
}
}
