For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Zoom/Rotate after certain extent makes the graphics disappear

Ivy Monteiro's picture


I am new to occ development so any help related to my topic would be helpful. Working in .net c# platform. Recently upgraded OCC to 7.2.0.

Here is my class containing code for adding line:

      public class MyAnnotationManager
        private V3d_Viewer myViewer;
        private V3d_View myView;
        private AIS_InteractiveContext myAISContext;
        private Prs3d_Presentation prsPresentation;

        public MyAnnotationManager(V3d_View view, V3d_Viewer viewer, AIS_InteractiveContext context)
            this.myView = view;
            this.myViewer = viewer;
            this.myAISContext = context;

            Graphic3d_StructureManager structureManager = myAISContext.MainPrsMgr().StructureManager();
            this.prsPresentation = new Prs3d_Presentation(structureManager);

       public void AddLine(MathLine3D line, QuantityNameOfColor color,double width = 2, DisplayLineType displayLineType = DisplayLineType.Solid)
            Quantity_NameOfColor lineColor = (Quantity_NameOfColor)color;

            Graphic3d_AspectLine3d lineAspect = new Graphic3d_AspectLine3d();
            lineAspect.SetColor(new Quantity_Color(lineColor));

            if(displayLineType == DisplayLineType.Line_Dash)
            else if(displayLineType == DisplayLineType.Line_Dotted)
            Graphic3d_Group polyLineGroup = Prs3d_Root.CurrentGroup(prsPresentation);

            gp_Pnt pt1 = OCCConvertor.gp_Pnt(line.Start);
            gp_Pnt pt2 = OCCConvertor.gp_Pnt(line.End);

            Graphic3d_ArrayOfPolylines grLine = new Graphic3d_ArrayOfPolylines(2);





The line gets added perfectly fine. Colour, Width, dashed/dotted/solid all works perfect. The problem that I have here is when I zoom/ rotate in the canvas, at certain extent the line disappears.

Has anyone come across this problem? Any help would be appreciated.

Thank you,


Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.