private AISShape AddToContext(NodeBuilder builder, TopoDSShape sourceShape, gpTrsf mirrorTransform)
        {
            var shape    = new BRepBuilderAPITransform(sourceShape, mirrorTransform, true).Shape;
            var aisShape = new AISShape(shape);

            _context.Display(aisShape, false);
            _context.SetTransparency(aisShape, 0.8, false);
            ApplyColor(builder, aisShape);
            return(aisShape);
        }
示例#2
0
        private static void UpdateTransparency(AISInteractiveContext context, Node parent,
                                               AISInteractiveObject interactive)
        {
            // If the label has transparency information display the object with that transparency
            var value = 0.0;

            if (parent.Get <DrawingAttributesInterpreter>().HasTransparency)
            {
                value = parent.Get <DrawingAttributesInterpreter>().Transparency;
            }

            context.SetTransparency(interactive, value, false);
        }