public DSOptimizeWindow(Design design, DSOptimizerComponent component) { MyComponent = component; InitializeComponent(); this.StepperTab.Content = new StepperWindow(new StepperVM(design, component)); this.RadicalWindow = new RadicalWindow(new RadicalVM(design, component)); this.RadicalTab.Content = this.RadicalWindow; }
public Constraint(DSOptimizerComponent mycomponent, ConstraintType constraintType, int constraintindex, double limit = 0, bool active = true) { MyComponent = mycomponent; this.ConstraintIndex = constraintindex; this.MyType = constraintType; this.LimitValue = limit; this.IsActive = active; }
public Design(DSOptimizerComponent component) { //Access the component this.MyComponent = component; this.Variables = new List <IVariable>(); this.Geometries = new List <IDesignGeometry>(); this.Constraints = new List <Constraint>(); // ADD VARIABLES //Sliders foreach (IGH_Param param in component.Params.Input[2].Sources) { this.Variables.Add(new SliderVariable(param)); } //Curves for (int i = 0; i < component.Params.Input[3].Sources.Count; i++) { IGH_Param param = component.Params.Input[3].Sources[i]; NurbsSurface surf = component.SrfVariables[i]; Geometries.Add(new DesignSurface(param, surf)); } //Surfaces for (int i = 0; i < component.Params.Input[4].Sources.Count; i++) { IGH_Param param = component.Params.Input[4].Sources[i]; NurbsCurve surf = component.CrvVariables[i]; this.Geometries.Add(new DesignCurve(param, surf)); } // ADD CONSTRAINTS for (int i = 0; i < component.Constraints.Count; i++) { this.Constraints.Add(new Constraint(component, ConstraintType.morethan, i)); } }