// The PostConstructor is called from within each constructor.DO NOT OVERRIDE THIS unless you know what you are doing.
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            subcomponents_.Add(new SubComponent_RFSrfcSupport_Assemble_GUI_OBSOLETE());
            subcomponents_.Add(new SubComponent_RFSrfcSupport_Disassemble_GUI_OBSOLETE());

            foreach (SubComponent item in subcomponents_)
            {
                item.registerEvaluationUnits(mngr);
            }
        }
Esempio n. 2
0
        // The PostConstructor is called from within each constructor.DO NOT OVERRIDE THIS unless you know what you are doing.
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            subcomponents_.Add(new SubComponent_RFMaterial_Assemble_GUI());
            subcomponents_.Add(new SubComponent_RFMaterial_Disassemble_GUI());

            foreach (SubComponent item in subcomponents_)
            {
                item.registerEvaluationUnits(mngr);
            }
        }
Esempio n. 3
0
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            subcomponents_.Add(new SubComponent_ExtrudeMembers_NURBS_GUI());
            subcomponents_.Add(new SubComponent_ExtrudeMembers_MESH_GUI());

            foreach (SubComponent item in subcomponents_)
            {
                item.registerEvaluationUnits(mngr);
                item.Parent_Component = (GH_DocumentObject)this;
            }
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Cross Section", "CroSec", "Creates a RFCroSec object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);


            evaluationUnit.RegisterInputParam(new Param_Number(), "AxialArea [m²]", "A", "AxialArea [m²]", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "ShearAreaY [m²]", "Ay", "ShearAreaY [m²]", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "ShearAreaZ [m²]", "Az", "ShearAreaZ [m²]", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "BendingMomentY [m⁴]", "Iy", "BendingMomentY [m⁴]", GH_ParamAccess.item);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "BendingMomentZ [m⁴]", "Iz", "BendingMomentZ [m⁴]", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "TorsionMoment [m⁴]", "Jt", "TorsionMoment [m⁴]", GH_ParamAccess.item);
            evaluationUnit.Inputs[5].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "Rotation Angle [°]", "β", "Rotation Angle [°]", GH_ParamAccess.item);
            evaluationUnit.Inputs[6].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "TemperatureLoadWidth [m]", "TempW", "TemperatureLoadWidth [m]", GH_ParamAccess.item);
            evaluationUnit.Inputs[7].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "TemperatureLoadDepth [m]", "TempD", "TemperatureLoadDepth [m]", GH_ParamAccess.item);
            evaluationUnit.Inputs[8].Parameter.Optional = true;

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Cross Section", "CroSec", "Cross Section object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[9].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[10].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[11].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "advanced");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 9; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(1, "modify");

            gH_ExtendableMenu2.Name = "Modify";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = 9; i < 9 + 3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Input for LCA", "LCA", "Get Model masses groupes by material for Life Cycle Analysis", Properties.Resources.RFEM_LCA);

            mngr.RegisterUnit(evaluationUnit);
            evaluationUnit.RegisterInputParam(new Param_String(), "Model Name", "Model Name", "Segment of the name of the RFEM Model to get information from", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            GH_ExtendableMenu gH_ExtendableMenu0 = new GH_ExtendableMenu(0, "Advanced");

            gH_ExtendableMenu0.Name = "Advanced";
            gH_ExtendableMenu0.Expand();
            gH_ExtendableMenu0.RegisterInputPlug(evaluationUnit.Inputs[0]);
            evaluationUnit.AddMenu(gH_ExtendableMenu0);
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Material", "Mat", "Creates a RFMaterial object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);


            evaluationUnit.RegisterInputParam(new Param_Number(), "Elasticity Modulus [N/m²]", "E", "Elasticity Modulus [N/m²]", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "Poisson Ratio", "Mu", "Poisson Ratio", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "Shear Modulus [N/m²]", "G", "Shear Modulus [N/m²]", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "Specific Weight [N/m³]", "W", "Specific Weight [N/m³]", GH_ParamAccess.item);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "Thermal Expansion [1/°]", "Alpha", "Thermal Expansion [1/°]", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Number(), "Partial Safety Factor", "Gamma", "Partial Safety Factor", GH_ParamAccess.item);
            evaluationUnit.Inputs[5].Parameter.Optional = true;


            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Material", "Mat", "Material object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[6].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[7].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[8].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "advanced");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 6; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(1, "modify");

            gH_ExtendableMenu2.Name = "Modify";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = 6; i < 6 + 3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Surface", "Srfc", "Creates a RFLine object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);

            evaluationUnit.RegisterInputParam(new Param_String(), "Boundary Line List", "Bound", "Boundary Line List", GH_ParamAccess.item);
            evaluationUnit.RegisterInputParam(new Param_String(), "Boundary Line List", "Bound", "Boundary Line List", GH_ParamAccess.item);
            evaluationUnit.RegisterInputParam(new Param_String(), "Boundary Line List", "Bound", "Boundary Line List", GH_ParamAccess.item);
            evaluationUnit.RegisterInputParam(new Param_String(), "Boundary Line List", "Bound", "Boundary Line List", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            //evaluationUnit.RegisterInputParam(new Param_String(), "Surface Type", "Type", UtilLibrary.DescriptionRFTypes(typeof(SurfaceGeometryType)), GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            //evaluationUnit.RegisterInputParam(new Param_Integer(), "Interpolated Points", "n", "Number of interpolated points for NURBS", GH_ParamAccess.item, new GH_Integer(4));
            //evaluationUnit.Inputs[2].Parameter.Optional = true;
            // evaluationUnit.RegisterInputParam(new Param_String(), "Thickness Type", "Th Type", UtilLibrary.DescriptionRFTypes(typeof(SurfaceThicknessType)), GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            //evaluationUnit.RegisterInputParam(new Param_String(), "Stiffness Type", "St Type", UtilLibrary.DescriptionRFTypes(typeof(SurfaceStiffnessType)), GH_ParamAccess.item);
            evaluationUnit.Inputs[3].Parameter.Optional = true;

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Surface", "Srfc", "Surface object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[5].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[6].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "advanced");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 4; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(1, "modify");

            gH_ExtendableMenu2.Name = "Modify";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = 4; i < 4 + 3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
Esempio n. 8
0
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Calculate", "Calculate", "Calculate RFEM Model.", Properties.Resources.Calculate);

            mngr.RegisterUnit(evaluationUnit);

            // Advanced
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Trigger", "Trigger", "Input to trigger the optimization", GH_ParamAccess.tree);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_String(), "Model Name", "Model Name", "Segment of the name of the RFEM Model to get information from", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            GH_ExtendableMenu gH_ExtendableMenu4 = new GH_ExtendableMenu(0, "Advanced");

            gH_ExtendableMenu4.Name = "Advanced";
            gH_ExtendableMenu4.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu4);
            gH_ExtendableMenu4.RegisterInputPlug(evaluationUnit.Inputs[0]);
            gH_ExtendableMenu4.RegisterInputPlug(evaluationUnit.Inputs[1]);
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Nodal Support", "NodSup", "Creates a RFSupportP object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);

            evaluationUnit.RegisterInputParam(new Param_String(), "Node List", "NodeList", "Node List", GH_ParamAccess.item);
            evaluationUnit.RegisterInputParam(new Param_String(), "Node List", "NodeList", "Node List", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            //evaluationUnit.RegisterInputParam(new Param_String(), "Rotation Sequence", "Seq", UtilLibrary.DescriptionRFTypes(typeof(RotationSequence)), GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Point(), "Rotation Angles", "Rot", "Euler Angles [rad]", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Nodal Support", "NodSup", "Support object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[5].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "advanced");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 3; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(1, "modify");

            gH_ExtendableMenu2.Name = "Modify";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = 3; i < 3 + 3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Opening", "Opening", "Creates a RFOpening object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);

            evaluationUnit.RegisterInputParam(new Param_String(), "Boundary Line List", "Bound", "Boundary Line List", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Integer(), "Interpolated Points", "n", "Number of interpolated points for NURBS", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;


            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Opening", "Op", "Opening object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "advanced");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 2; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(1, "modify");

            gH_ExtendableMenu2.Name = "Modify";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = 2; i < 2 + 3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
Esempio n. 11
0
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Line Hinge", "LineHinge", "Creates a RFLineHinge object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);

            evaluationUnit.RegisterInputParam(new Param_Integer(), "LineNo", "LineNo", "Line Index related to the Line Hinge", GH_ParamAccess.item);
            evaluationUnit.RegisterInputParam(new Param_Integer(), "LineNo", "LineNo", "Line Index related to the Line Hinge", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            //evaluationUnit.RegisterInputParam(new Param_String(), "Side", "Side", UtilLibrary.DescriptionRFTypes(typeof(HingeSideType)), GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Line Hinge", "LineHinge", "Line Hinge object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "advanced");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 2; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(1, "modify");

            gH_ExtendableMenu2.Name = "Modify";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = 2; i < 2 + 3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
Esempio n. 12
0
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Optimize Cross Sections", "Optimize CroSec", "Performs a Cross Section Optimization with the EC3 Module.", Properties.Resources.icon_OptimizeCS);

            mngr.RegisterUnit(evaluationUnit);


            // Advanced

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Trigger", "Trigger", "Input to trigger the optimization", GH_ParamAccess.tree);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_String(), "Model Name", "Model Name", "Segment of the name of the RFEM Model", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "Advanced Items");

            gH_ExtendableMenu.Name = "Advanced";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[0]);
            gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[1]);
        }
Esempio n. 13
0
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Assemble Node", "Node", "Creates a RFNode object to define new data or modify existing data " +
                                                               "in the RFEM model.");

            mngr.RegisterUnit(evaluationUnit);
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Node Coordinates [m]", "Node", "Node object from the RFEM model to modify", GH_ParamAccess.item);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Modify", "Modify", "Modify node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_Boolean(), "Delete", "Delete", "Delete node?", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu = new GH_ExtendableMenu(0, "modify");

            gH_ExtendableMenu.Name = "Modify";
            gH_ExtendableMenu.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu);
            for (int i = 0; i < 3; i++)
            {
                gH_ExtendableMenu.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Get Results", "Get Results", "Gets Results from the RFEM Model.", Properties.Resources.icon_GetResults);

            mngr.RegisterUnit(evaluationUnit);

            // Deformation

            evaluationUnit.RegisterInputParam(new Param_Number(), "Scale Factor", "Scale Factor", "Scale Factor applied to the deformed shape.", GH_ParamAccess.item, new GH_Number(1));
            evaluationUnit.Inputs[0].Parameter.Optional = true;

            evaluationUnit.RegisterOutputParam(new Param_Curve(), "Crv", "Curves", "Deformed shape of the linear elemnents of the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_Mesh(), "Msh", "Meshes", "Deformed shape of the surface elemnents of the RFEM Model.");

            //modelDataCount = evaluationUnit.Inputs.Count;

            GH_ExtendableMenu gH_ExtendableMenu0 = new GH_ExtendableMenu(0, "Deformation");

            gH_ExtendableMenu0.Name = "Deformation";
            gH_ExtendableMenu0.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu0);
            gH_ExtendableMenu0.RegisterInputPlug(evaluationUnit.Inputs[0]);
            gH_ExtendableMenu0.RegisterOutputPlug(evaluationUnit.Outputs[0]);
            gH_ExtendableMenu0.RegisterOutputPlug(evaluationUnit.Outputs[1]);
            //for (int i = 0; i < modelDataCount; i++)
            //{
            //    gH_ExtendableMenu0.RegisterInputPlug(evaluationUnit.Inputs[i]);
            //    gH_ExtendableMenu0.RegisterOutputPlug(evaluationUnit.Outputs[i]);
            //}


            // Load Cases and Combos

            GH_ExtendableMenu gH_ExtendableMenu1 = new GH_ExtendableMenu(1, "Load Cases and Combos");

            gH_ExtendableMenu1.Name = "Load Cases and Combos";
            gH_ExtendableMenu1.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu1);
            MenuPanel menuPanel = new MenuPanel(1, "panel_load");

            menuPanel.Header = "Set here the load case for display.\n";
            gH_ExtendableMenu1.AddControl(menuPanel);
            _loadDrop = new MenuDropDown(1, "dropdown_loads_1", "loading type");
            //_loadDrop.VisibleItemCount = 3;
            _loadDrop.ValueChanged += _loadDrop__valueChanged;
            _loadDrop.Header        = "Set here the loading type for display.\n";
            menuPanel.AddControl(_loadDrop);

            // Advanced

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Trigger", "Trigger", "Input to trigger the optimization", GH_ParamAccess.tree);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_String(), "Model Name", "Model Name", "Segment of the name of the RFEM Model to get information from", GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu3 = new GH_ExtendableMenu(3, "Advanced");

            gH_ExtendableMenu3.Name = "Advanced";
            gH_ExtendableMenu3.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu3);
            for (int i = 1; i < 1 + 2; i++)
            {
                gH_ExtendableMenu3.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }
Esempio n. 15
0
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Set Data", "Set Data", "Sets Data from the RFEM Model.", Properties.Resources.icon_SetData);

            mngr.RegisterUnit(evaluationUnit);

            // Model Data

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Nodes", "RF Nodes", "Nodes to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Lines", "RF Lines", "Lines to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Members", "RF Members", "Members to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Surfaces", "RF Surfaces", "Surfaces to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Openings", "RF Openings", "Openings to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[4].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Nodal Supports", "RF NodSup", "Nodal Supports to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[5].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Line Supports", "RF LineSup", "Line Supports to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[6].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Surface Supports", "RF SfcSup", "Surface Supports to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[7].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Member Hinges", "RF MemberHinges", "Member Hinges from  the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[8].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Line Hinges", "RF LineHinges", "Line Hinges from  the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[9].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Cross Sections", "RF CroSecs", "Cross Sections from in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[10].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Materials", "RF Mat", "Materials to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[11].Parameter.Optional = true;

            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Nodes", "RF Nodes", "Nodes from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Lines", "RF Lines", "Lines from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Members", "RF Members", "Members from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Surfaces", "RF Surfaces", "Surfaces from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Openings", "RF Openings", "Openings from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Nodal Supports", "RF NodSup", "Nodal Supports from in the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Line Supports", "RF LineSup", "Line Supports from in the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Surface Supports", "RF SrfcSup", "Surface Supports from in the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Member Hinges", "RF MemberHinges", "Member Hinges from in the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Line Hinges", "RF LineHinges", "Line Hinges from in the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Cross Sections", "RF CroSecs", "Cross Sections from in the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Materials", "RF Mat", "Materials from the RFEM Model.");

            modelDataCount = evaluationUnit.Inputs.Count;

            GH_ExtendableMenu gH_ExtendableMenu0 = new GH_ExtendableMenu(0, "Model Data");

            gH_ExtendableMenu0.Name = "Model Data";
            gH_ExtendableMenu0.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu0);
            for (int i = 0; i < modelDataCount; i++)
            {
                gH_ExtendableMenu0.RegisterInputPlug(evaluationUnit.Inputs[i]);
                gH_ExtendableMenu0.RegisterOutputPlug(evaluationUnit.Outputs[i]);
            }

            // Load Data
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Nodal Loads", "RF NLoads", "Nodal Loads to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount + 0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Line Loads", "RF LLoads", "Line Loads to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount + 1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Member Loads", "RF MLoads", "Member Loads to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount + 2].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Surface Loads", "RF SLoads", "Surface Loads to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount + 3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Free Polygon Loads", "RF PolyLoads", "Free Polygon Loads to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount + 4].Parameter.Optional = true;

            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Nodal Loads", "RF NLoads", "Nodal Loads from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Line Loads", "RF LLoads", "Line Loads from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Member Loads", "RF MLoads", "Member Loads from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Surface Loads", "RF SLoads", "Surface Loads from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Free Polygon Loads", "RF PolyLoads", "Free Polygon Loads to set in the RFEM Model.");

            modelDataCount2 = evaluationUnit.Inputs.Count;

            GH_ExtendableMenu gH_ExtendableMenu1 = new GH_ExtendableMenu(1, "Load Data");

            gH_ExtendableMenu1.Name = "Load Data";
            gH_ExtendableMenu1.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu1);
            for (int i = modelDataCount; i < modelDataCount2; i++)
            {
                gH_ExtendableMenu1.RegisterInputPlug(evaluationUnit.Inputs[i]);
                gH_ExtendableMenu1.RegisterOutputPlug(evaluationUnit.Outputs[i]);
            }

            // Load Cases and Combos

            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Load Cases", "RF LCases", "Load Cases to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount2 + 0].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Load Combos", "RF LCombos", "Load Combinations to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount2 + 1].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "RF Result Combos", "RF RCombos", "Result Combinations to set in the RFEM Model.", GH_ParamAccess.list);
            evaluationUnit.Inputs[modelDataCount2 + 2].Parameter.Optional = true;

            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Load Cases", "RF LCases", "Load Cases from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Load Combos", "RF LCombos", "Load Combinations from the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_RFEM(), "RF Result Combos", "RF RCombos", "Result Combinations from the RFEM Model.");

            modelDataCount3 = evaluationUnit.Inputs.Count;

            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(2, "Load Cases and Combos");

            gH_ExtendableMenu2.Name = "Load Cases and Combos";
            gH_ExtendableMenu2.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu2);
            for (int i = modelDataCount2; i < modelDataCount3; i++)
            {
                gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[i]);
                gH_ExtendableMenu2.RegisterOutputPlug(evaluationUnit.Outputs[i]);
            }

            // Advanced

            evaluationUnit.RegisterInputParam(new Param_String(), "Model Name", "Model Name", "Segment of the name of the RFEM Model to set data in", GH_ParamAccess.item);
            evaluationUnit.Inputs[modelDataCount3].Parameter.Optional = true;

            GH_ExtendableMenu gH_ExtendableMenu3 = new GH_ExtendableMenu(3, "Advanced");

            gH_ExtendableMenu3.Name = "Advanced";
            gH_ExtendableMenu3.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu3);
            gH_ExtendableMenu3.RegisterInputPlug(evaluationUnit.Inputs[modelDataCount3]);
        }
        protected override void RegisterEvaluationUnits(EvaluationUnitManager mngr)
        {
            EvaluationUnit evaluationUnit = new EvaluationUnit("Get Results", "Get Results", "Gets Results from the RFEM Model.", Properties.Resources.icon_GetResults);

            mngr.RegisterUnit(evaluationUnit);

            // Deformation

            evaluationUnit.RegisterInputParam(new Param_Number(), "Scale Factor", "Scale Factor", "Scale Factor applied to the deformed shape.", GH_ParamAccess.item, new GH_Number(1));
            evaluationUnit.Inputs[0].Parameter.Optional = true;

            evaluationUnit.RegisterOutputParam(new Param_Curve(), "Crv", "Curves", "Deformed shape of the linear elemnents of the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_Integer(), "Member No", "No", "Member Number related to deformed curve.");
            evaluationUnit.RegisterOutputParam(new Param_Mesh(), "Msh", "Meshes", "Deformed shape of the surface elemnents of the RFEM Model.");
            evaluationUnit.RegisterOutputParam(new Param_Integer(), "Surface No", "No", "Surface Number related to deformed mesh.");

            GH_ExtendableMenu gH_ExtendableMenu0 = new GH_ExtendableMenu(0, "Deformation");

            gH_ExtendableMenu0.Name = "Deformation";
            gH_ExtendableMenu0.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu0);
            gH_ExtendableMenu0.RegisterInputPlug(evaluationUnit.Inputs[0]);
            for (int i = 0; i < 4; i++)
            {
                gH_ExtendableMenu0.RegisterOutputPlug(evaluationUnit.Outputs[i]);
            }

            // Load Cases and Combos
            GH_ExtendableMenu gH_ExtendableMenu1 = new GH_ExtendableMenu(1, "Load Cases and Combos");

            gH_ExtendableMenu1.Name = "Load Cases and Combos";
            gH_ExtendableMenu1.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu1);
            MenuPanel menuPanel = new MenuPanel(1, "panel_load");

            menuPanel.Header = "Set here the load case for display.\n";
            MenuStaticText menuStaticText0 = new MenuStaticText();

            menuStaticText0.Text   = "Select Load Case or Combo";
            menuStaticText0.Header = "Load Case";
            menuPanel.AddControl(menuStaticText0);
            _loadDrop = new MenuDropDown(1, "dropdown_loads_1", "loading type");
            _loadDrop.ValueChanged += _loadDrop__valueChanged;
            _loadDrop.Header        = "Set here the loading type for display.\n";
            menuPanel.AddControl(_loadDrop);
            MenuStaticText menuStaticText1 = new MenuStaticText();

            menuStaticText1.Text   = "Select Result Type";
            menuStaticText1.Header = "Result Type";
            menuPanel.AddControl(menuStaticText1);
            _resulttypeDrop = new MenuDropDown(2, "dropdown_result_1", "result type");
            _resulttypeDrop.ValueChanged += _loadDrop__valueChanged2;
            _resulttypeDrop.Header        = "Set here the loading type for display.\n";
            menuPanel.AddControl(_resulttypeDrop);
            gH_ExtendableMenu1.AddControl(menuPanel);

            // Overwrite
            GH_ExtendableMenu gH_ExtendableMenu2 = new GH_ExtendableMenu(2, "Overwrite");

            gH_ExtendableMenu2.Name = "Overwrite";
            evaluationUnit.RegisterInputParam(new Param_String(), "Overwrite Load Case or Combo", "Load Case", "Overwrite selected load case or combo from the dropdown menu.", GH_ParamAccess.item);
            evaluationUnit.Inputs[1].Parameter.Optional = true;
            gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[1]);
            evaluationUnit.RegisterInputParam(new Param_Integer(), "Overwrite Result type", "Result Type", UtilLibrary.DescriptionRFTypes(typeof(ResultsValueType)), GH_ParamAccess.item);
            evaluationUnit.Inputs[2].Parameter.Optional = true;
            evaluationUnit.Inputs[2].EnumInput          = UtilLibrary.ListRFTypes(typeof(ResultsValueType));
            gH_ExtendableMenu2.RegisterInputPlug(evaluationUnit.Inputs[2]);
            evaluationUnit.AddMenu(gH_ExtendableMenu2);

            // Select results
            GH_ExtendableMenu gH_ExtendableMenu3 = new GH_ExtendableMenu(3, "Select Results");

            gH_ExtendableMenu3.Name = "Select Results";
            gH_ExtendableMenu3.Expand();
            evaluationUnit.AddMenu(gH_ExtendableMenu3);
            MenuPanel menuPanel2 = new MenuPanel(2, "panel_results");

            menuPanel2.Header = "Select output results.\n";

            _tagGrp               = new MenuRadioButtonGroup(0, "radiogrp_tags");
            _tagGrp.Direction     = MenuRadioButtonGroup.LayoutDirection.Vertical;
            _tagGrp.ValueChanged += _tagGrp__valueChanged;
            _tagGrp.MaxActive     = 1;
            _tagGrp.MinActive     = 1;
            buttonLocal           = new MenuRadioButton(0, "radio_local", "Local", MenuRadioButton.Alignment.Horizontal)
            {
                Name   = "Local",
                Active = true
            };
            buttonGlobal = new MenuRadioButton(1, "radio_global", "Global", MenuRadioButton.Alignment.Horizontal)
            {
                Name   = "Global",
                Active = false
            };
            _tagGrp.AddButton(buttonLocal);
            _tagGrp.AddButton(buttonGlobal);
            menuPanel2.AddControl(_tagGrp);

            _deformationsCheck = new MenuCheckBox(0, "deformations", "Deformation");
            _deformationsCheck.ValueChanged += _deformationsCheck__valueChanged;
            _deformationsCheck.Active        = true;
            _deformationsCheck.Header        = "Display deformed shape.";
            _memberForcesCheck = new MenuCheckBox(1, "check member forces", "Member Forces");
            _memberForcesCheck.ValueChanged   += _memberForcesCheck__valueChanged;
            _memberForcesCheck.Active          = true;
            _memberForcesCheck.Header          = "Add member forces to output results.";
            _surfaceForcesCheck                = new MenuCheckBox(2, "check surface forces", "Surface Forces");
            _surfaceForcesCheck.ValueChanged  += _surfaceForcesCheck__valueChanged;
            _surfaceForcesCheck.Active         = true;
            _surfaceForcesCheck.Header         = "Add surface forces to output results.";
            _nodalReactionsCheck               = new MenuCheckBox(3, "check nodal reactions", "Nodal Reactions");
            _nodalReactionsCheck.ValueChanged += _nodalReactionsCheck__valueChanged;
            _nodalReactionsCheck.Active        = true;
            _nodalReactionsCheck.Header        = "Add nodal reactions to output results.";
            _lineReactionsCheck                = new MenuCheckBox(4, "check line reactions", "Line Reactions");
            _lineReactionsCheck.ValueChanged  += _lineReactionsCheck__valueChanged;
            _lineReactionsCheck.Active         = true;
            _lineReactionsCheck.Header         = "Add line reactions to output results.";
            menuPanel2.AddControl(_deformationsCheck);
            menuPanel2.AddControl(_memberForcesCheck);
            menuPanel2.AddControl(_surfaceForcesCheck);
            menuPanel2.AddControl(_nodalReactionsCheck);
            menuPanel2.AddControl(_lineReactionsCheck);



            gH_ExtendableMenu3.AddControl(menuPanel2);

            // Advanced
            evaluationUnit.RegisterInputParam(new Param_RFEM(), "Trigger", "Trigger", "Input to trigger the optimization", GH_ParamAccess.tree);
            evaluationUnit.Inputs[3].Parameter.Optional = true;
            evaluationUnit.RegisterInputParam(new Param_String(), "Model Name", "Model Name", "Segment of the name of the RFEM Model to get information from", GH_ParamAccess.item);
            evaluationUnit.Inputs[4].Parameter.Optional = true;
            GH_ExtendableMenu gH_ExtendableMenu4 = new GH_ExtendableMenu(4, "Advanced");

            gH_ExtendableMenu4.Name = "Advanced";
            gH_ExtendableMenu4.Collapse();
            evaluationUnit.AddMenu(gH_ExtendableMenu4);
            for (int i = 3; i < 3 + 2; i++)
            {
                gH_ExtendableMenu4.RegisterInputPlug(evaluationUnit.Inputs[i]);
            }
        }