// Use this for initialization
 void Start()
 {
     if (!string.IsNullOrEmpty(P_GUID))
     {
         P = model.getParameterByGUID(P_GUID);
     }
 }
Beispiel #2
0
        public override void connectionBrokenWith(AXParameter p)
        {
            base.connectionBrokenWith(p);

            if (P_Input != null)
            {
                P_Input.polyTree = null;
                P_Input.paths    = null;
            }

            switch (p.Name)
            {
            case "P_Corner":
                cornerSrc_po    = null;
                P_Output.meshes = null;
                break;

            case "Plan":
                planSrc_po      = null;
                P_Output.meshes = null;
                break;

            case "Section":
                sectionSrc_po   = null;
                P_Output.meshes = null;
                break;
            }
        }
Beispiel #3
0
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            //Debug.Log("Repeater::pollInputParmetersAndSetUpLocalReferences " + parametricObject.Name + " parametersHaveBeenPolled="+parametersHaveBeenPolled);

            base.pollInputParmetersAndSetUpLocalReferences();

            P_Node = parametricObject.getParameter("Node Shape");
            P_Cell = parametricObject.getParameter("Cell Shape");


            // JITTER
            P_JitterTranslation = parametricObject.getParameter("Jitter Translation");
            P_JitterRotation    = parametricObject.getParameter("Jitter Rotation");
            P_JitterScale       = parametricObject.getParameter("Jitter Scale");

            // REPEATERS
            P_RepeaterU = parametricObject.getParameter("RepeaterU");
            P_RepeaterV = parametricObject.getParameter("RepeaterV");


            zAxis_p = parametricObject.getParameter("zAxis");
            progressiveRotation_p = parametricObject.getParameter("Progressive Rotation");



            setupRepeaters();

            pollControlValuesFromParmeters();
        }
Beispiel #4
0
        public override void parameterWasModified(AXParameter p)
        {
            switch (p.Name)
            {
            case "uScale":
                if (P_Unified_Scaling.boolval)
                {
                    parametricObject.floatValue("vScale", parametricObject.floatValue("uScale"));
                }
                break;

            case "vScale":
                if (P_Unified_Scaling.boolval)
                {
                    parametricObject.floatValue("uScale", parametricObject.floatValue("vScale"));
                }
                break;
            }

            if (parametricObject.axMat.mat != null)
            {
                //Debug.Log("Mat.mainTextureScale.x="+Mat.name + " : " + Mat.mainTextureScale);
                //tex.scale.x /= Mat.mainTextureScale.x;
                //tex.scale.y /= Mat.mainTextureScale.y;
            }
        }
Beispiel #5
0
        // INIT EXTRUDE GENERATOR
        public override void init_parametricObject()
        {
            // Parameters
            base.init_parametricObject();

            parametricObject.addParameter(new AXParameter(AXParameter.DataType.MaterialTool, AXParameter.ParameterType.Input, "Material"));

            AXParameter p = null;

            p = parametricObject.addParameter(AXParameter.DataType.Float, AXParameter.ParameterType.GeometryControl, "SizeX", 1f, 0f, 5000f);
            p.sizeBindingAxis = Axis.X;

            p = parametricObject.addParameter(AXParameter.DataType.Float, AXParameter.ParameterType.GeometryControl, "SizeY", 1f, 0f, 5000f);
            p.sizeBindingAxis = Axis.Y;

            p = parametricObject.addParameter(AXParameter.DataType.Float, AXParameter.ParameterType.GeometryControl, "SizeZ", 1f, 0f, 5000f);
            p.sizeBindingAxis = Axis.Z;


            parametricObject.addParameter(AXParameter.DataType.Bool, "Front", true);
            parametricObject.addParameter(AXParameter.DataType.Bool, "Back", true);

            parametricObject.addParameter(AXParameter.DataType.Bool, "Left", true);
            parametricObject.addParameter(AXParameter.DataType.Bool, "Right", true);

            parametricObject.addParameter(AXParameter.DataType.Bool, "Top", true);
            parametricObject.addParameter(AXParameter.DataType.Bool, "Bottom", true);


            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Output, "Output Mesh"));
        }
Beispiel #6
0
        // INIT_PARAMETRIC_OBJECT
        public override void init_parametricObject()
        {
            base.init_parametricObject();

            parametricObject.useMeshInputs = true;
            parametricObject.meshInputs    = new List <AXParameter>();

            // PLAN SHAPE

            parametricObject.addParameter(new AXParameter(AXParameter.DataType.MaterialTool, AXParameter.ParameterType.Input, "Material"));


            AXParameter p = null;

            p = parametricObject.addParameter(AXParameter.DataType.Float, AXParameter.ParameterType.GeometryControl, "SizeX", 4f, 0f, 50f);
            p.sizeBindingAxis = Axis.X;

            p = parametricObject.addParameter(AXParameter.DataType.Float, AXParameter.ParameterType.GeometryControl, "SizeY", 4f, 0f, 50f);
            p.sizeBindingAxis = Axis.Y;

            p = parametricObject.addParameter(AXParameter.DataType.Float, AXParameter.ParameterType.GeometryControl, "SizeZ", 4f, 0f, 50f);
            p.sizeBindingAxis = Axis.Z;

            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Output, "Output Mesh"));
        }
Beispiel #7
0
        /*
         * public override void initSpanParameters()
         * {
         *      parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Bay SpanU"));
         * }
         *
         * public override void initRepeaterTools()
         * {
         *      Debug.Log(parametricObject.Name + " **** initRepeaterTools");
         *      parametricObject.addParameter(new AXParameter(AXParameter.DataType.RepeaterTool, AXParameter.ParameterType.Input, "RepeaterU"));
         *      AXParametricObject repeaterTool =  parametricObject.model.createNode("RepeaterTool");
         *      repeaterTool.rect.x = parametricObject.rect.x-200;
         *      repeaterTool.isOpen = false;
         *      repeaterTool.intValue("Edge_Count", 100);
         *      parametricObject.getParameter("RepeaterU").makeDependentOn(repeaterTool.getParameter("Output"));
         * }
         */

        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            base.pollInputParmetersAndSetUpLocalReferences();

            P_Plan    = parametricObject.getParameter("Plan");
            P_Section = parametricObject.getParameter("Section");

            P_Inset            = parametricObject.getParameter("Inset");
            P_MaxSegmentLength = parametricObject.getParameter("Max Segment Length");
            P_Bay = parametricObject.getParameter("Bay Width", "Bay");
            P_CornerBreakAngle = parametricObject.getParameter("Corner Break Angle");


            // REPEATER
            P_Corner = parametricObject.getParameter("Corner Mesh");
            P_Node   = parametricObject.getParameter("Node Mesh");
            P_Cell   = parametricObject.getParameter("Cell Mesh");

            P_Repeater = parametricObject.getParameter("Repeater");


            P_CornerAngled         = parametricObject.getParameter("CornerAngled");
            P_ProgressiveRotationX = parametricObject.getParameter("IncrRotX");
            P_ProgressiveRotationY = parametricObject.getParameter("IncrRotY");
            P_ProgressiveRotationZ = parametricObject.getParameter("IncrRotZ");
        }
Beispiel #8
0
        public AXParameter getSelectedOutputParameter()
        {
            AXParameter return_P = difference;

            switch (combineType)
            {
            case CombineType.Difference:
                return_P = difference;
                break;

            case CombineType.DifferenceRail:
                return_P = differenceRail;
                break;

            case CombineType.Intersection:
                return_P = intersection;
                break;

            case CombineType.IntersectionRail:
                return_P = intersectionRail;
                break;

            case CombineType.Union:
                return_P = union;
                break;

            case CombineType.Grouped:
                return_P = grouped;
                break;
            }
            return(return_P);
        }
        // INIT_PARAMETRIC_OBJECT
        // This initialization function is called when this Generator's AXParametric object
        // is first created; for exampe, when its icon is clicked in the sidebar node menu.
        // It creates the default parameters that will appear in the node.
        // Often there is at least one input and one output parameter.
        // Parameters of type Float, Int and Bool that are created here will be available
        // to your generate() function. If no AXParameterType is specified, the type will be GeometryControl.

        public override void init_parametricObject()
        {
            // Init parameters for the node
            base.init_parametricObject();

            // INPUT AND OUTPUT
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Input Mesh"));
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Output, "Output Mesh"));

            // GEOMETRY_CONTROLS
            parametricObject.addParameter(AXParameter.DataType.Float, "Amount", 5f);
            parametricObject.addParameter(AXParameter.DataType.Int, "Octaves", 2);
            parametricObject.addParameter(AXParameter.DataType.Float, "Frequency", 1f);
            parametricObject.addParameter(AXParameter.DataType.Float, "Persistence", .5f);
            parametricObject.addParameter(AXParameter.DataType.Float, "Lacunarity", 1.5f);

            parametricObject.addParameter(AXParameter.DataType.Bool, "FromCenter");
            parametricObject.addParameter(AXParameter.DataType.Float, "CenX");
            parametricObject.addParameter(AXParameter.DataType.Float, "CenY", 0);
            parametricObject.addParameter(AXParameter.DataType.Float, "CenZ");

            parametricObject.addParameter(AXParameter.DataType.Bool, "VerticalOnly");



            P_ModifierCurve = parametricObject.addParameter(AXParameter.DataType.AnimationCurve, "ModifierCurve");

            Keyframe[] keys = new Keyframe[2];
            keys[0] = new Keyframe(0, 1);
            keys[1] = new Keyframe(10, 1);

            P_ModifierCurve.animationCurve = new AnimationCurve(keys);
        }
Beispiel #10
0
        // POLL CONTROLS (every model.generate())
        public override void pollControlValuesFromParmeters()
        {
            base.pollControlValuesFromParmeters();

            prototypeSrc_p  = (P_Prototype != null)        ? getUpstreamSourceParameter(P_Prototype)               : null;
            prototypeSrc_po = (prototypeSrc_p != null)        ? prototypeSrc_p.parametricObject                               : null;
        }
    // *** DYNAMIC_VARIABLES *** //



    // *** PARAMETER_REFERENCE_INIT *** //

    protected override void InitializeParameterReferences()
    {
        P_Box_Height     = model.getParameter("Box_Height");
        P_Box_Bevel_Segs = model.getParameter("Box_Bevel Segs");
        P_Box_Bevel_Top  = model.getParameter("Box_Bevel Top");
        P_Box_Sides      = model.getParameter("Box_Sides");
    }
Beispiel #12
0
        // POLL CONTROLS (every model.generate())
        public override void pollControlValuesFromParmeters()
        {
            base.pollControlValuesFromParmeters();

            planSrc_p  = getUpstreamSourceParameter(P_Plan);
            planSrc_po = (planSrc_p != null)                                                           ? planSrc_p.parametricObject    : null;
        }
        public override void connectionMadeWith(AXParameter to_p, AXParameter from_p)
        {
            if (from_p == null)            // || from_p.DependsOn == null)
            {
                return;
            }

            AXParameter this_p = (to_p.parametricObject == parametricObject) ? to_p   : from_p;
            AXParameter src_p  = (to_p.parametricObject == parametricObject) ? from_p : to_p;

            //Debug.Log ("connectionMadeWith AAA "+ this_p.Name);

            base.connectionMadeWith(to_p, from_p);

            if (parametricObject.is2D())
            {
                return;
            }

            //Debug.Log ("connectionMadeWith BBB "+ this_p.Name);

            switch (this_p.Name)
            {
            case "Input Mesh":
                P_CenY.FloatVal = src_p.parametricObject.bounds.center.y;
                cenY            = P_CenY.FloatVal;

                break;
            }
        }
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            base.pollInputParmetersAndSetUpLocalReferences();

            P_Top    = parametricObject.getParameter("Top");
            P_Bottom = parametricObject.getParameter("Bottom");
        }
Beispiel #15
0
        /*
         * public override void connectionMadeWith(AXParameter to_p, AXParameter from_p)
         * {
         *
         *      base.connectionMadeWith(to_p, from_p);
         *
         *      AXParametricObject po = from_p.parametricObject;
         *
         *      // use this po's bounds to init the separation parameters...
         *      if (! parametricObject.isInitialized)
         *      {
         *              parametricObject.isInitialized = true;
         *
         *              if (zAxis)
         *                      parametricObject.floatValue("Separation", 2f * parametricObject.bounds.size.z);
         *              else
         *                      parametricObject.floatValue("Separation", 1.5f * parametricObject.bounds.size.x);
         *      }
         * }
         */

        public override void parameterWasModified(AXParameter p)
        {
            switch (p.Name)
            {
            case "zAxis":
                if (!parametricObject.isInitialized)
                {
                    parametricObject.isInitialized = true;

                    float sizex = nodeSrc_po.getBoundsAdjustedForAxis().size.x;
                    float sizez = nodeSrc_po.getBoundsAdjustedForAxis().size.z;


                    // zAxis hasn't changed yet, so...
                    bool switchingToZAxis = !zAxis;

                    if (switchingToZAxis)
                    {
                        P_Seperation.initiateRipple_setFloatValueFromGUIChange(sizex / sizez + sizez);
                    }
                    else
                    {
                        P_Seperation.initiateRipple_setFloatValueFromGUIChange(sizez / sizex + sizex);
                    }
                }
                break;
            }
        }
        public void setupFullReferencesInModel(AXModel model)
        {
            //Debug.Log ("SETTING UP REFERENCES IN MODEL pA_guid="+pA_guid);
            // USE THIS TO INITIALIZE REFERENCES AFTER DESERIALIZATION

            if (pA_guid != null && pB_guid != "")
            {
                // - pA
                //Debug.Log ("pA_guid="+pA_guid);
                pA = model.getParameterByGUID(pA_guid);
                if (pA != null && !pA.relations.Contains(this))
                {
                    //Debug.Log ("AXRelation::setupReferencesInModel - relations.add pA="+pA.Name+" : " + pA.Guid);
                    pA.relations.Add(this);
                }
                // - pA
                pB = model.getParameterByGUID(pB_guid);

                if (pB != null && !pB.relations.Contains(this))
                {
                    //Debug.Log ("AXRelation::setupReferencesInModel - relations.add pB="+pB.Name+" : " + pB.Guid);
                    pB.relations.Add(this);
                }
            }
            //Debug.Log (toString ());
        }
Beispiel #17
0
        public void setupRepeaters()
        {
            AXParameter input_pU = null;
            AXParameter input_pV = null;

            if (zAxis_p == null || !zAxis_p.boolval)
            {
                input_pU = P_RepeaterU;
                input_pV = P_RepeaterV;
            }
            else
            {
                input_pV = P_RepeaterU;
                input_pU = P_RepeaterV;
            }

            if (input_pU != null)
            {
                repeaterToolU = (input_pU != null && input_pU.DependsOn != null) ? input_pU.DependsOn.parametricObject.generator as RepeaterTool        : null;
            }
            else
            {
                repeaterToolU = null;
            }

            if (input_pV != null)
            {
                repeaterToolV = (input_pV != null && input_pV.DependsOn != null) ? input_pV.DependsOn.parametricObject.generator as RepeaterTool        : null;
            }
            else
            {
                repeaterToolV = null;
            }
        }
Beispiel #18
0
        public override void init_parametricObject()
        {
            base.init_parametricObject();

            // parameters
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Floor Mesh"));
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Story Mesh"));
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Top Floor Mesh"));
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Bottom Floor Mesh"));


            parametricObject.addParameter(new AXParameter(AXParameter.DataType.JitterTool, AXParameter.ParameterType.Input, "Jitter Translation"));
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.JitterTool, AXParameter.ParameterType.Input, "Jitter Rotation"));
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.JitterTool, AXParameter.ParameterType.Input, "Jitter Scale"));

            initRepeaterTools();



            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Output, "Output Mesh"));


            P_TopFloor    = parametricObject.addParameter(AXParameter.DataType.Bool, "Top Floor", true);
            P_BottomFloor = parametricObject.addParameter(AXParameter.DataType.Bool, "Bottom Floor", true);
            P_TopStory    = parametricObject.addParameter(AXParameter.DataType.Bool, "Top Story", true);
            P_BottomStory = parametricObject.addParameter(AXParameter.DataType.Bool, "Bottom Story", true);

            P_ProgressiveRotationX = parametricObject.addParameter(AXParameter.DataType.Float, "IncrRotX", 0f);
            P_ProgressiveRotationY = parametricObject.addParameter(AXParameter.DataType.Float, "IncrRotY", 0f);
            P_ProgressiveRotationZ = parametricObject.addParameter(AXParameter.DataType.Float, "IncrRotZ", 0f);
        }
Beispiel #19
0
        // A shape can have any number of input shapes.
        // These shapes will be combined during the generation cycle
        // According to
        public AXParameter addInput()
        {
            if (inputs == null)
            {
                inputs = new List <AXParameter>();
            }

            foreach (AXParameter input_p in inputs)
            {
                if (input_p.DependsOn == null)
                {
                    return(input_p);
                }
            }
            // NEW SPLINE PARAMETER
            AXParameter input = createSplineParameter(AXParameter.ParameterType.Input, "Input Shape");

            inputs.Add(input);


            //parametricObject.assertInputControls();
            //parametricObject.inputControls.addChild(input);

            input.ParentNode = this;

            return(input);
        }
Beispiel #20
0
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            base.pollInputParmetersAndSetUpLocalReferences();

            P_Plan = parametricObject.getParameter("Plan");


            P_Extrude = parametricObject.getParameter("Height", "Extrude");

            P_Bevels_Unified = parametricObject.getParameter("Bevels Unified");
            P_Bevel_Top      = parametricObject.getParameter("Bevel Top", "Bevel Radius Top");
            P_Bevel_Bottom   = parametricObject.getParameter("Bevel Bottom", "Bevel Radius Bottom");
            P_BevelHardEdge  = parametricObject.getParameter("Bevel Hard Edge");
            P_BevelSegs      = parametricObject.getParameter("Bevel Segs");
            P_BevelOut       = parametricObject.getParameter("Bevel Out");

            P_Taper = parametricObject.getParameter("Taper");

            P_Segs = parametricObject.getParameter("Segs");

            if (P_Segs == null)
            {
                P_Segs = parametricObject.addParameter(AXParameter.DataType.Int, "Segs", 1, 1, 36);
            }
        }
Beispiel #21
0
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            base.pollInputParmetersAndSetUpLocalReferences();

            P_Plan    = parametricObject.getParameter("Plan");
            P_Section = parametricObject.getParameter("Section");
        }
Beispiel #22
0
        public override float validateFloatValue(AXParameter p, float v)
        {
            float value = v;


            switch (p.Name)
            {
            case "Bevel Top":
            case "Bevel Radius Top":
                if (bevelsUnified)
                {
                    P_Bevel_Bottom.FloatVal = v;
                }
                break;


            case "Bevel Bottom":
            case "Bevel Radius Bottom":
                if (bevelsUnified)
                {
                    P_Bevel_Top.FloatVal = v;
                }


                break;
            }


            return(value);
        }
Beispiel #23
0
        // INIT_PARAMETRIC_OBJECT
        public override void init_parametricObject()
        {
            base.init_parametricObject();

            initParameterNameStrings();

            // INPUT MESH
            parametricObject.addParameter(new AXParameter(AXParameter.DataType.Mesh, AXParameter.ParameterType.Input, "Node Mesh"));



            // SIZE
            P_Size = parametricObject.addParameter(AXParameter.DataType.Float, sizeName, 9f);
            P_Size.expressions.Add(cellCountName + "=" + sizeName + "/" + bayName);
            P_Size.expressions.Add(actualBayName + "=" + sizeName + "/" + cellCountName);

            // BAY
            P_Bay = parametricObject.addParameter(AXParameter.DataType.Float, bayName, 3f, .1f, 1000f);
            P_Bay.expressions.Add(sizeName + "=" + bayName + "*" + cellCountName);

            // CELLS
            P_Cells = parametricObject.addParameter(AXParameter.DataType.Int, cellCountName, 3, 1, 100);
            P_Cells.expressions.Add(actualBayName + "=" + sizeName + "/" + cellCountName);
            P_Cells.expressions.Add(bayName + "=" + actualBayName);

            // ACTUAL_BAY
            P_ActualBay = parametricObject.addParameter(AXParameter.DataType.Float, actualBayName, 3f, .1f, 1000f);
            P_ActualBay.expressions.Add(sizeName + "=" + actualBayName + "*" + cellCountName);


            parametricObject.addParameter(new AXParameter(AXParameter.DataType.RepeaterTool, AXParameter.ParameterType.Output, "Output"));
        }
Beispiel #24
0
        // POLL CONTROLS (every model.generate())
        public override void pollControlValuesFromParmeters()
        {
            base.pollControlValuesFromParmeters();



            cornerSrc_p  = (P_Corner != null)        ? getUpstreamSourceParameter(P_Corner)          : null;
            cornerSrc_po = (cornerSrc_p != null)        ? cornerSrc_p.parametricObject                          : null;

            nodeSrc_p  = (P_Node != null)        ? getUpstreamSourceParameter(P_Node)            : null;
            nodeSrc_po = (nodeSrc_p != null)        ? nodeSrc_p.parametricObject                            : null;

            cellSrc_p  = (P_Cell != null)        ? getUpstreamSourceParameter(P_Cell)            : null;
            cellSrc_po = (cellSrc_p != null)        ? cellSrc_p.parametricObject                            : null;



            inset            = (P_Inset != null)                     ? P_Inset.FloatVal : 0;
            maxSegmentLength = (P_MaxSegmentLength != null)  ? P_MaxSegmentLength.FloatVal : 0;
            bay = (P_Bay != null)                               ? P_Bay.FloatVal : 2f;

            cornerBreakAngle = (P_CornerBreakAngle != null)  ? P_CornerBreakAngle.FloatVal : 0;


            cornerAngled         = (P_CornerAngled != null) ? P_CornerAngled.boolval : false;
            progressiveRotationX = (P_ProgressiveRotationX != null) ? P_ProgressiveRotationX.FloatVal : 0;
            progressiveRotationY = (P_ProgressiveRotationY != null) ? P_ProgressiveRotationY.FloatVal : 0;
            progressiveRotationZ = (P_ProgressiveRotationZ != null) ? P_ProgressiveRotationZ.FloatVal : 0;
        }
Beispiel #25
0
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            //Debug.Log("Repeater::pollInputParmetersAndSetUpLocalReferences " + parametricObject.Name + " parametersHaveBeenPolled="+parametersHaveBeenPolled);

            base.pollInputParmetersAndSetUpLocalReferences();


            P_Angle             = parametricObject.getParameter("Angle");
            P_Radius            = parametricObject.getParameter("Radius");
            P_Height            = parametricObject.getParameter("Run");
            P_Riser             = parametricObject.getParameter("Riser");
            P_Steps             = parametricObject.getParameter("Steps");
            P_Actual_Riser      = parametricObject.getParameter("Actual_Riser");
            P_Actual_Step_Angle = parametricObject.getParameter("Actual_Step_Angle");

            if (P_Height != null)
            {
                if (P_Height.FloatVal < .01)
                {
                    P_Height.FloatVal = .01f;
                }
            }

            P_zAxis          = parametricObject.getParameter("zAxis");
            P_TopStep        = parametricObject.getParameter("Top Step");
            P_AlternateSteps = parametricObject.getParameter("Alternate Steps");

            P_ProgressiveRotationX = parametricObject.getParameter("IncrRotX");
            P_ProgressiveRotationY = parametricObject.getParameter("IncrRotY");
            P_ProgressiveRotationZ = parametricObject.getParameter("IncrRotZ");


            P_Stair_Profile = parametricObject.getParameter("Stair Profile");
        }
Beispiel #26
0
        // INIT_PARAMETRIC_OBJECT
        public override void init_parametricObject()
        {
            base.init_parametricObject();


            P_Radius = parametricObject.addParameter(AXParameter.DataType.Float, "Radius", 12f, 0f, 5000);;


            P_Size.FloatVal = 360;
            P_Size.min      = 1;
            P_Size.max      = 360;


            P_Cells.IntVal = 12;
            P_Cells.intmin = 1;
            P_Cells.intmax = 100;



            P_Bay.FloatVal = 30;
            P_Bay.min      = 1;
            P_Bay.max      = 360;

            P_ActualBay.FloatVal = 30;

            parametricObject.parameters.Remove(P_EdgeCount);
        }
Beispiel #27
0
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            base.pollInputParmetersAndSetUpLocalReferences();

            P_Plan = parametricObject.getParameter("Input Shape");

            P_Height = parametricObject.getParameter("Height");
        }
Beispiel #28
0
        // POLL INPUTS (only on graph change())
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            initParameterNameStrings();

            base.pollInputParmetersAndSetUpLocalReferences();

            P_Radius = parametricObject.getParameter("Radius");
        }
        public override void pollInputParmetersAndSetUpLocalReferences()
        {
            //Debug.Log("LinearRepeater::pollInputParmetersAndSetUpLocalReferences " + parametricObject.Name + " parametersHaveBeenPolled="+parametersHaveBeenPolled);
            base.pollInputParmetersAndSetUpLocalReferences();

            P_DoFirstNode = parametricObject.getParameter("Do First Node");
            P_DoLastNode  = parametricObject.getParameter("Do Last Node");
        }
        // GROUPER::GENERATE
        public override GameObject generate(bool makeGameObjects, AXParametricObject initiator_po, bool isReplica)
        {
            //if (ArchimatixUtils.doDebug)
            //Debug.Log (parametricObject.Name + " generate +++++++++++++++++++++++++++++++++++++++++++++++++ " + inputs.Count);


            if (!parametricObject.isActive)
            {
                return(null);
            }



            preGenerate();

            Path path = new Path();



            if (inputs != null && inputs.Count > 0)
            {
                for (int i = 0; i < inputs.Count; i++)
                {
                    AXParameter input = inputs[i];

                    if (input != null && input.DependsOn != null)
                    {
                        if (input.DependsOn.parametricObject.generator is FreeCurve)
                        {
                            FreeCurve fc = (FreeCurve)input.DependsOn.parametricObject.generator;

                            Path output = AX.Generators.Generator2D.transformPath(fc.getPathFromCurve(), fc.localMatrix);

                            path.AddRange(output);
                        }
                        else
                        {
                            Paths tmpPaths = input.DependsOn.getPaths();
                            if (tmpPaths != null)
                            {
                                for (int j = 0; j < tmpPaths.Count; j++)
                                {
                                    path.AddRange(tmpPaths[j]);
                                }
                            }
                        }
                    }
                }

                path = Clipper.CleanPolygon(path);

                P_Output.paths = new Paths();

                P_Output.paths.Add(path);
            }

            return(null);
        }