public override void OnSetAction() { base.TitleId = "Constr.Parametrics.Cylinder.Radius"; base.ActiveObject = shell.Clone(); if (useRadius) { radiusInput = new LengthInput("Parametrics.Cylinder.Radius"); radiusInput.GetLengthEvent += RadiusInput_GetLength; radiusInput.SetLengthEvent += RadiusInput_SetLength; radiusInput.Optional = diameter; base.SetInput(radiusInput); } else { diameterInput = new LengthInput("Parametrics.Cylinder.Diameter"); diameterInput.GetLengthEvent += DiameterInput_GetLength; diameterInput.SetLengthEvent += DiameterInput_SetLength; diameterInput.Optional = !diameter; base.SetInput(diameterInput); } base.OnSetAction(); validResult = false; }
public override void OnSetAction() { base.TitleId = "Constr.Parametrics.DistanceTo"; FeedBack.AddSelected(frontSide); FeedBack.AddSelected(backSide); base.ActiveObject = shell.Clone(); if (shell.Layer != null) { shell.Layer.Transparency = 128; } distanceInput = new LengthInput("DistanceTo.Distance"); distanceInput.GetLengthEvent += DistanceInput_GetLengthEvent; distanceInput.SetLengthEvent += DistanceInput_SetLengthEvent; modeInput = new MultipleChoiceInput("DistanceTo.Mode", "DistanceTo.Mode.Values", 0); modeInput.SetChoiceEvent += ModeInput_SetChoiceEvent; //modeInput.GetChoiceEvent += ModeInput_GetChoiceEvent; SetInput(distanceInput, modeInput); base.OnSetAction(); FeedBack.SelectOutline = false; validResult = false; }
public override void OnSetAction() { base.TitleId = "Constr.Parametrics.DistanceTo"; if (offsetFeedBack != null) { FeedBack.AddSelected(offsetFeedBack); } if (forwardFaces != null) { FeedBack.AddSelected(forwardFaces); } base.ActiveObject = shell.Clone(); if (shell.Layer != null) { shell.Layer.Transparency = 128; } List <InputObject> actionInputs = new List <InputObject>(); distance = point1 | point2; distanceInput = new LengthInput("DistanceTo.Distance"); distanceInput.GetLengthEvent += DistanceInput_GetLengthEvent; distanceInput.SetLengthEvent += DistanceInput_SetLengthEvent; actionInputs.Add(distanceInput); forwardFacesInput = new GeoObjectInput("DistanceTo.MoreForwardObjects"); forwardFacesInput.MultipleInput = true; forwardFacesInput.FacesOnly = true; forwardFacesInput.Optional = true; forwardFacesInput.MouseOverGeoObjectsEvent += new GeoObjectInput.MouseOverGeoObjectsDelegate(OnMouseOverForwardFaces); actionInputs.Add(forwardFacesInput); backwardFacesInput = new GeoObjectInput("DistanceTo.MoreBackwardObjects"); backwardFacesInput.MultipleInput = true; backwardFacesInput.FacesOnly = true; backwardFacesInput.Optional = true; backwardFacesInput.MouseOverGeoObjectsEvent += new GeoObjectInput.MouseOverGeoObjectsDelegate(OnMouseOverBackwardFaces); actionInputs.Add(backwardFacesInput); modeInput = new MultipleChoiceInput("DistanceTo.Mode", "DistanceTo.Mode.Values", 0); modeInput.SetChoiceEvent += ModeInput_SetChoiceEvent; actionInputs.Add(modeInput); //modeInput.GetChoiceEvent += ModeInput_GetChoiceEvent; SeparatorInput separator = new SeparatorInput("DistanceTo.AssociateParametric"); actionInputs.Add(separator); nameInput = new StringInput("DistanceTo.ParametricsName"); nameInput.SetStringEvent += NameInput_SetStringEvent; nameInput.GetStringEvent += NameInput_GetStringEvent; nameInput.Optional = true; actionInputs.Add(nameInput); SetInput(actionInputs.ToArray()); base.OnSetAction(); FeedBack.SelectOutline = false; validResult = false; }
public RemoveFillet(Shell shell, HashSet <Face> fillets) { // make a clone of the shell to work on and use the fillets of the cloned shell Dictionary <Edge, Edge> clonedEdges = new Dictionary <Edge, Edge>(); Dictionary <Vertex, Vertex> clonedVertices = new Dictionary <Vertex, Vertex>(); Dictionary <Face, Face> clonedFaces = new Dictionary <Face, Face>(); this.shell = shell.Clone(clonedEdges, clonedVertices, clonedFaces); this.fillets = new HashSet <Face>(); foreach (Face face in fillets) { this.fillets.Add(clonedFaces[face]); } }