Exemplo n.º 1
0
    /// <summary>
    /// creates various frame sections and draws a few frames
    /// </summary>
    void drawIBeams()
    {
        mySectionController.SetCurrentFrameSection("Sec_Steel_I");
        drawFrame(new Vector3(1, 3, 4), new Vector3(1, 0, 4), buildingObjects.Frame);
        drawFrame(new Vector3(6, 3, 0), new Vector3(6, 0, 0), buildingObjects.Frame);
        drawFrame(new Vector3(6, 3, 4), new Vector3(6, 0, 4), buildingObjects.Frame);
        drawFrame(new Vector3(1, 3, 0), new Vector3(1, 0, 0), buildingObjects.Frame);

        //drawFrame(new Vector3(1, 3, 4), new Vector3(1, 3, 0), buildingObjects.Frame);
        drawFrame(new Vector3(6, 3, 4), new Vector3(1, 3, 4), buildingObjects.Frame);
        //drawFrame(new Vector3(6, 3, 0), new Vector3(6, 3, 4), buildingObjects.Frame);
        //drawFrame(new Vector3(1, 3, 0), new Vector3(6, 3, 0), buildingObjects.Frame);

        myConstructorController.createJointRestraint(new Vector3(1, 0, 4), 'f');
        myConstructorController.createJointRestraint(new Vector3(6, 0, 0), 'f');
        myConstructorController.createJointRestraint(new Vector3(6, 0, 4), 'f');
        myConstructorController.createJointRestraint(new Vector3(1, 0, 0), 'f');

        drawFrame(new Vector3(1, 3, 0), new Vector3(1, 3, 4), buildingObjects.Frame);
        drawFrame(new Vector3(0, 3, 0), new Vector3(0, 3, 4), buildingObjects.Frame);
        drawFrame(new Vector3(0, 3, 4), new Vector3(0, 3, 5), buildingObjects.Frame);
        drawFrame(new Vector3(0, 3, 5), new Vector3(1, 3, 6), buildingObjects.Frame);
        drawFrame(new Vector3(1, 3, 6), new Vector3(6, 3, 6), buildingObjects.Frame);

        drawFrame(new Vector3(2, 3, 4), new Vector3(2, 0, 4), buildingObjects.Frame);
        drawFrame(new Vector3(3, 3, 4), new Vector3(3, 0, 4), buildingObjects.Frame);
        drawFrame(new Vector3(4, 3, 4), new Vector3(4, 0, 4), buildingObjects.Frame);
        drawFrame(new Vector3(5, 3, 4), new Vector3(5, 0, 4), buildingObjects.Frame);

        myConstructorController.createJointRestraint(new Vector3(2, 0, 4), 'p');
        myConstructorController.createJointRestraint(new Vector3(3, 0, 4), 'p');
        myConstructorController.createJointRestraint(new Vector3(4, 0, 4), 'p');
        myConstructorController.createJointRestraint(new Vector3(5, 0, 4), 'p');
    }
Exemplo n.º 2
0
    public void createJoints()
    {
        getRestraintType();
        List <GridNode> nodes = mySelectionController.GetSelectedNodes();

        foreach (GridNode n in nodes)
        {
            Debug.Log("pos: " + n.getLocation());
            myConstructorController.createJointRestraint(n.getLocation(), type);
        }
    }
Exemplo n.º 3
0
    private void Update()
    {
        if (Input.GetKeyDown("d"))
        {
            Debug.Log("START DEBUG");
            drawGrid();
            populateDropdowns();
            Debug.Log("DEBUG Populated Dropdowns.");
            //testSections();
            mySectionController.SetCurrentFrameSection("Sec_Steel_I");
            Debug.Log("Current frame section: " + mySectionController.GetCurrentFrameSection().GetName());
            myConstructorController.setPoint(p4, buildingObjects.Frame);
            myConstructorController.setPoint(p5, buildingObjects.Frame);

            Debug.Log("DEBUG Tested Sections.");
            //testJoints();
            myConstructorController.createJointRestraint(p4, 'f');
            myConstructorController.createJointRestraint(p5, 'f');

            Debug.Log("DEBUG Tested Joints.");
            //testFrameDeletion();
            //Debug.Log("DEBUG Tested Frame Deletion.");
        }

        if (Input.GetKeyDown("r"))
        {
            frameName = "Frame_i=[" + p4.x + ":" + p4.z + ":" + p4.y + "]-j=[" + p5.x + ":" + p5.z + ":" + p5.y + "]";
            mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsSetupDeselectAllCasesAndCombosForOutput()");
            mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsSetupSetCaseSelectedForOutput(DEAD, true)");
            //mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsFrameJointForce(" + frameName + ", 0)");
            //mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: resultsFrameForce(" + frameName + ", 0)");
            mySapTranslatorIpcHandler.enqueueToOutputBuffer("VRE to SAPTranslator: customResultsGetFrameSpecialPointDispl(" + frameName + ")");
        }

        if (Input.GetKeyDown("v"))
        {
            myAnalysisController.visualizeDeformation(frameName, myAnalysisController.getLatestJointDisplResult());
        }
    }