{ "Uuid": "b1613a9e-00a7-4765-8c3d-9aa4847cb2c1", "IsCustomNode": false, "Description": null, "Name": "splitRect", "ElementResolver": { "ResolutionMap": { "Rectangle": { "Key": "Autodesk.DesignScript.Geometry.Rectangle", "Value": "ProtoGeometry.dll" }, "List": { "Key": "List", "Value": "BuiltIn.ds" }, "Solid": { "Key": "Autodesk.DesignScript.Geometry.Solid", "Value": "ProtoGeometry.dll" }, "Vector": { "Key": "Autodesk.DesignScript.Geometry.Vector", "Value": "ProtoGeometry.dll" }, "PolyCurve": { "Key": "Autodesk.DesignScript.Geometry.PolyCurve", "Value": "ProtoGeometry.dll" }, "Math": { "Key": "DSCore.Math", "Value": "DSCoreNodes.dll" }, "Line": { "Key": "Autodesk.DesignScript.Geometry.Line", "Value": "ProtoGeometry.dll" } } }, "Inputs": [], "Outputs": [], "Nodes": [ { "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", "NodeType": "CodeBlockNode", "Code": "rctg1 = Rectangle.ByWidthLength(10,10);\n//Number of Lines\ncnt;\n//Minimum Area of Polygon\nmin;\n//Maximum Area of Polygon\nmax;\n//Max attempts\natm = 500;\n\n[Imperative]\n{\n\tsurf1 = rctg1.Patch();\n\tlins1 = [];\n\tc = 0;\n\tt = [];\n\tsed = 0;\n\ttest1 = true;\n\tsed = sed + 1;\n\twhile(test1 && sedmax)\n\t\t\t{\n\t\t\t\tt[c] = true;\n\t\t\t\tc = c + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tt[c] = false;\n\t\t\t\tc = c + 1;\n\t\t\t}\n\t\t}\n\t\tsed = sed + 1;\n\t\ttest1 = List.Contains(t,true);\n\t}\n\treturn surf1;\n};", "Id": "7c7ab325e5d1410cad5f6a49e9a51882", "Inputs": [ { "Id": "5029de17f07348f1b4bab2440e9e2b7a", "Name": "cnt", "Description": "cnt", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "79553657d6d44f68bd6de4f1e5b34ba4", "Name": "min", "Description": "min", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "1612e86187fe45dbb14cc573cc6b3096", "Name": "max", "Description": "max", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Outputs": [ { "Id": "673d521e336b452eb123de28ebb47de6", "Name": "", "Description": "rctg1", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "1701bb3853e042ceb717f3e80963bcd8", "Name": "", "Description": "Value of expression at line 3", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "21efa4fe6d1a4e16bffc68359db0960e", "Name": "", "Description": "Value of expression at line 5", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "7441feee2460449faa96400a5cb37488", "Name": "", "Description": "Value of expression at line 7", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "710272be7ba64a36b335cdd8266358f2", "Name": "", "Description": "atm", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false }, { "Id": "f7ada9fd12354ea696b0e79106432831", "Name": "", "Description": "Value of expression at line 11", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "Allows for DesignScript code to be authored directly" }, { "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", "NodeType": "CodeBlockNode", "Code": "def lins(rec,cnt,sed)\n{\n\tedgs1 = rec.Explode();\n\tparm1 = List.TakeItems(List.Shuffle(0.1..1..#(Math.Random(sed)*50)),cnt/2);\n\tparm2 = List.TakeItems(List.Shuffle(0.1..1..#(Math.Random(sed+1)*50)),cnt/2);\n\tparm3 = List.TakeItems(List.Shuffle(0.1..1..#(Math.Random(sed+2)*50)),cnt/2);\n\tparm4 = List.TakeItems(List.Shuffle(0.1..1..#(Math.Random(sed+3)*50)),cnt/2);\n\tpnts1 = edgs1[0].PointAtParameter(parm1);\n\tpnts2 = edgs1[1].PointAtParameter(parm2);\n\tpnts3 = edgs1[2].PointAtParameter(parm3);\n\tpnts4 = edgs1[3].PointAtParameter(parm4);\n\tlins1 = List.TakeItems(List.Flatten(Line.ByStartPointEndPoint([pnts1,pnts2],[pnts3,pnts4]),-1),cnt);\n\treturn lins1;\n};\n\n\ndef spl(rect,lines:var[]..[])\n{\n//Cutting Tool\ntool = Solid.ByUnion(List.Flatten([rect,lines],-1).Extrude(Vector.ZAxis()).Thicken(0.4));\n\n//Divisions\ndivisions = List.Clean(PolyCurve.ByJoinedCurves(rect.Patch().Split(tool).PerimeterCurves()),false).Offset(0.2,false).Patch();\nreturn divisions;\n};", "Id": "f4f27e75bf1d44d298df617b8b59c399", "Inputs": [], "Outputs": [], "Replication": "Disabled", "Description": "Allows for DesignScript code to be authored directly" }, { "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore", "NodeType": "CodeBlockNode", "Code": "divs;", "Id": "22f217f5cb2d4519b229ba9a0a6d6317", "Inputs": [ { "Id": "bdcbab65403c40d78ef5dfa60c2e3baf", "Name": "divs", "Description": "divs", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Outputs": [ { "Id": "e6639c589ace48c0b1781cff067a3aec", "Name": "", "Description": "Value of expression at line 1", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "Allows for DesignScript code to be authored directly" }, { "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore", "NodeType": "FunctionNode", "FunctionSignature": "Autodesk.DesignScript.Geometry.Surface.Area", "Id": "a60155c7eb404d4192f735e65b289c73", "Inputs": [ { "Id": "5a050373b07240169c490934c4491bd5", "Name": "surface", "Description": "Autodesk.DesignScript.Geometry.Surface", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Outputs": [ { "Id": "2e2f69ad1559432aa4720b100cded361", "Name": "double", "Description": "double", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Auto", "Description": "Returns the total surface area.\n\nSurface.Area: double" }, { "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels", "NodeType": "NumberInputNode", "NumberType": "Integer", "InputValue": 2, "MaximumValue": 10, "MinimumValue": 0, "StepValue": 1, "Id": "3a39c4b110c74244856620dcf8e15a59", "Inputs": [], "Outputs": [ { "Id": "debd437f30674b12bf3d35a91c6ae35f", "Name": "", "Description": "Int32", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "A slider that produces integer values." }, { "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels", "NodeType": "NumberInputNode", "NumberType": "Integer", "InputValue": 12, "MaximumValue": 50, "MinimumValue": 0, "StepValue": 1, "Id": "aac702d69e104206876c46e2d69c0be7", "Inputs": [], "Outputs": [ { "Id": "8a067a3ae6064df29d64497ca40958d2", "Name": "", "Description": "Int32", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "A slider that produces integer values." }, { "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels", "NodeType": "NumberInputNode", "NumberType": "Integer", "InputValue": 100, "MaximumValue": 100, "MinimumValue": 50, "StepValue": 1, "Id": "c60dd32a091e4e92aafbeefa203f831e", "Inputs": [], "Outputs": [ { "Id": "c388a92680014bbea41ea5932e870736", "Name": "", "Description": "Int32", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "A slider that produces integer values." }, { "ConcreteType": "Watch3DNodeModels.Watch3D, Watch3DNodeModels", "WatchWidth": 351.0, "WatchHeight": 298.0, "WasExecuted": true, "Camera": { "Name": "4c8b7f88-2603-48d0-86b8-91e1726db75c Preview", "EyeX": -3.7447833129956702, "EyeY": 7.9962131277222444, "EyeZ": 8.0269703224198921, "LookX": 4.5108439304091874, "LookY": -11.297657621321564, "LookZ": -8.15830566881325, "UpX": 0.29851923134291375, "UpY": 0.78701505876665856, "UpZ": -0.539901440813925 }, "NodeType": "ExtensionNode", "Id": "4c8b7f88260348d086b891e1726db75c", "Inputs": [ { "Id": "0f6fbd62668742ca86e40108d2cb862b", "Name": "", "Description": "Incoming geometry objects.", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Outputs": [ { "Id": "9b27312ee95a434b8fa4eff0e2af90ca", "Name": "", "Description": "Incoming geometry objects.", "UsingDefaultValue": false, "Level": 2, "UseLevels": false, "KeepListStructure": false } ], "Replication": "Disabled", "Description": "Shows a dynamic preview of geometry." } ], "Connectors": [ { "Start": "f7ada9fd12354ea696b0e79106432831", "End": "bdcbab65403c40d78ef5dfa60c2e3baf", "Id": "ceba0aedf0e74558967b96cf5cf43cfa" }, { "Start": "e6639c589ace48c0b1781cff067a3aec", "End": "5a050373b07240169c490934c4491bd5", "Id": "47da7faafe10410581a3995e29799fac" }, { "Start": "e6639c589ace48c0b1781cff067a3aec", "End": "0f6fbd62668742ca86e40108d2cb862b", "Id": "bd9da5eb3b6645a0ac5db17a4aea53ef" }, { "Start": "debd437f30674b12bf3d35a91c6ae35f", "End": "5029de17f07348f1b4bab2440e9e2b7a", "Id": "54bf4870e506444fa1788531d2c2025b" }, { "Start": "8a067a3ae6064df29d64497ca40958d2", "End": "79553657d6d44f68bd6de4f1e5b34ba4", "Id": "11ae9ebdd9884d2098d2baa0a9f3e74a" }, { "Start": "c388a92680014bbea41ea5932e870736", "End": "1612e86187fe45dbb14cc573cc6b3096", "Id": "f938d9b357ac4042b5b1728239adffd8" } ], "Dependencies": [], "Bindings": [], "View": { "Dynamo": { "ScaleFactor": 1.0, "HasRunWithoutCrash": true, "IsVisibleInDynamoLibrary": true, "Version": "2.0.0.4654", "RunType": "Manual", "RunPeriod": "1000" }, "Camera": { "Name": "Background Preview", "EyeX": 0.23150426618166842, "EyeY": 26.192514935012618, "EyeZ": 15.918496916998635, "LookX": 3.8073354015523027, "LookY": -20.393423269961193, "LookZ": -13.554680805333154, "UpX": 0.18442723824896096, "UpY": 0.73135370161917146, "UpZ": -0.6565884227732004 }, "NodeViews": [ { "ShowGeometry": true, "Name": "Code Block", "Id": "7c7ab325e5d1410cad5f6a49e9a51882", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 1258.3022641536, "Y": 472.415548492195 }, { "ShowGeometry": true, "Name": "Functions", "Id": "f4f27e75bf1d44d298df617b8b59c399", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 555.22910553185488, "Y": 716.83610697998324 }, { "ShowGeometry": true, "Name": "Code Block", "Id": "22f217f5cb2d4519b229ba9a0a6d6317", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 1687.7426023070134, "Y": 646.84959956569685 }, { "ShowGeometry": true, "Name": "Surface.Area", "Id": "a60155c7eb404d4192f735e65b289c73", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 1836.4059626184512, "Y": 642.78541124895946 }, { "ShowGeometry": true, "Name": "Number of Lines", "Id": "3a39c4b110c74244856620dcf8e15a59", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 924.38402219396, "Y": 430.76596887822615 }, { "ShowGeometry": true, "Name": "Minimum Polygon Area", "Id": "aac702d69e104206876c46e2d69c0be7", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 924.38402219396, "Y": 486.86613146481011 }, { "ShowGeometry": true, "Name": "Maximum Polygon Area", "Id": "c60dd32a091e4e92aafbeefa203f831e", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 925.5527755811803, "Y": 544.13504743861427 }, { "ShowGeometry": true, "Name": "Watch 3D", "Id": "4c8b7f88260348d086b891e1726db75c", "IsSetAsInput": false, "IsSetAsOutput": false, "Excluded": false, "X": 1691.3325385537942, "Y": 862.33061957020118 } ], "Annotations": [], "X": -587.045224793224, "Y": -334.28791247753639, "Zoom": 0.80866462089477631 } }