Json cross section

Hey,

I’m trying to define cross section with JSON to GH and from GH to Sofistik. Cross section works fine and line reinforcement also but I can’t get perimeter reinforcement to work. I tried the definition with line reinforcement and got it work and then removed it from the script.
Grasshopper does read the JSON file and draws the cross section but the it doesn’t draw the reinforcement. What’s wrong with my script?

Hello

I am not that familiar with Grasshopper and JSON. But have you seen our online documentation for Grasshopper?

https://www.sofistik.de/documentation/2020/en/rhino_interface/grasshopper/sectionJson/sectionJson_reference.html

Best regards
Frederik Höller
Your SOFiSTiK Support Team

Hey,

Yes I have. And I have wrote the script according that document, but I still don’t get it to work.

Do you guys have a example file of cross section with perimeter reinforcement that you could send me?

-Juha

Hi Juha,

the tag for that type of reinforcement is “PerimeterReinforcements”, with the “s” at the end.
That should work. Please see example below.

With kind regards

Emanuel


{
    "Id": 11,
    "Name": "MySection",
    "Unit": "m",
    "Loops":
      [
        {
          "Id": "Pier",
          "Points":
            [
              { "Id": "P1",  "Coord": [  "0.50*b", "-0.5*h" ], "R":"r"},
              { "Id": "P2",  "Coord": [  "0.50*b", "+0.5*h" ], "R":"r"},
              { "Id": "P3",  "Coord": [  "-0.50*b", "+0.5*h" ], "R":"r"},
              { "Id": "P4",  "Coord": [  "-0.50*b", "-0.5*h" ], "R":"r"}
            ]
        }
      ],
    "Variables": { "h":300.0,  "b":125.0, "r":10.0},
    "PerimeterReinforcements":
    [
      {
        "Id": "PRef1",
        "Layer": "1",
        "MaterialId": "1",
        "Diameter": "0.1",
        "BarDistribution": "FULL",
        "Spacing": "0.2",
        "Inset": "0.2",
        "LoopId": "Pier"
      }
    ]
}

1 Like

Hey,

Yes now it works. Thanks for the tip!

-Juha

The answer seems correct. Only issue i had was regarding the units. The pier loop variables seems to be in cm, but your unit is set to meter. Also the perimeter reinforcement variables seem to be in meter. So changing the variables to the following would be the correct way:
“Variables”: { “h”:3.0, “b”:1.25, “r”:0.1}

Edit: Im using the 2023 version, maybe thats why i had to change it

{
    "Id": 11,
    "Name": "MySection",
    "Unit": "m",
    "Loops":
      [
        {
          "Id": "Pier",
          "Points":
            [
              { "Id": "P1",  "Coord": [  "0.50*b", "-0.5*h" ], "R":"r"},
              { "Id": "P2",  "Coord": [  "0.50*b", "+0.5*h" ], "R":"r"},
              { "Id": "P3",  "Coord": [  "-0.50*b", "+0.5*h" ], "R":"r"},
              { "Id": "P4",  "Coord": [  "-0.50*b", "-0.5*h" ], "R":"r"}
            ]
        }
      ],
    "Variables": { "h":3.0,  "b":1.25, "r":0.1},
    "PerimeterReinforcements":
    [
      {
        "Id": "PRef1",
        "Layer": "1",
        "MaterialId": "1",
        "Diameter": "0.1",
        "BarDistribution": "FULL",
        "Spacing": "0.2",
        "Inset": "0.2",
        "LoopId": "Pier"
      }
    ]
}