private AISInteractiveObject UpdateShapeInteractive(Node node, TopoDSShape topoDsShape) { AISInteractiveObject interactiveShape; var haveInteractiveShape = ShapeList.TryGetValue(node.Index, out interactiveShape); if (haveInteractiveShape) { AISShape shape = interactiveShape.Convert <AISShape>(); if (shape != null) { shape.Set(topoDsShape); interactiveShape.Redisplay(false); } } else { interactiveShape = new AISShape(topoDsShape); ShapeList[node.Index] = interactiveShape; if (ShapeUtils.IsPlanarFace(topoDsShape)) { var drawer = interactiveShape.Attributes; var shadingAspect = drawer.ShadingAspect; var shadingAspectAspect = shadingAspect.Aspect; shadingAspectAspect.EdgeColor = (ShapeUtils.GetOccColor(Color.Black)); //shadingAspectAspect.SetEdgeWidth(1); shadingAspectAspect.SetEdgeOn(); } } return(interactiveShape); }
public override bool Execute() { var sourceBuilder = new NodeBuilder(Dependency[0].Reference); var targetBuilder = new NodeBuilder(Dependency[1].Reference); var profile = sourceBuilder.TransformedShape; var targetFace = targetBuilder.TransformedShape; Ensure.IsTrue(ShapeUtils.IsPlanarFace(targetFace)); var plane = ShapeUtils.ExtractPlaneFromFaceShape(targetFace); var referenceTransformation = Dependency[0].Reference.Get <TransformationInterpreter>().CurrTransform; var mirroredShape = profile.Located(new TopLocLocation(referenceTransformation)); var transformation = Parent.Set <TransformationInterpreter>(); // transformation.CurrTransform.SetMirror(plane.Position.Ax2); Shape = mirroredShape; return(Shape != null); }