Beispiel #1
0
        private void ShowTrihedron()
        {
            _view.TriedronErase();

            // Build an XYZ axis trihedron and add it to Ocaf
            var coords = gp.XOY;

            coords.Location = new gpPnt(0, 0, 0);
            var axis = new GeomAxis2Placement(coords);
            //var trihedron = new AISTrihedron(axis);
            //trihedron.SetSize(15);
            //var aisDrawer = trihedron.Attributes();
            //var datumAspect = aisDrawer.DatumAspect();
            //var firstAxisAspect = datumAspect.FirstAxisAspect();
            //firstAxisAspect.SetColor(new QuantityColor(QuantityNameOfColor.Quantity_NOC_RED));
            //firstAxisAspect.SetWidth(2);
            //var secondAxisAspect = datumAspect.SecondAxisAspect();
            //secondAxisAspect.SetColor(new QuantityColor(QuantityNameOfColor.Quantity_NOC_GREEN));
            //secondAxisAspect.SetWidth(2);
            //var thirdAxisAspect = datumAspect.ThirdAxisAspect();
            //thirdAxisAspect.SetColor(new QuantityColor(QuantityNameOfColor.Quantity_NOC_BLUE1));
            //thirdAxisAspect.SetWidth(2);
            //trihedron.UnsetSelectionMode();

            //_context.Display(trihedron, false);

            var trihedron = new CustomTrihedron(axis, _context);

            trihedron.SetAxisLength(5);
            trihedron.Show();
        }
        //--------------------------------------------------------------------------------------------------

        void _ShowTriedron(bool visible)
        {
            if (visible)
            {
                V3dView.TriedronDisplay(Aspect_TypeOfTriedronPosition.Aspect_TOTP_LEFT_LOWER, Quantity_NameOfColor.Quantity_NOC_ALICEBLUE.ToColor(), 0.1, V3d_TypeOfVisualization.V3d_ZBUFFER);
            }
            else
            {
                V3dView.TriedronErase();
            }
        }