Afternoon,
I have a csv file with:
- boreholes (1, 2, 3,..., b) characteristics ('x', head, 1st layer top level, 1st layer bottom level, 2nd layer bottom level, 3rd layer bottom level, ..., lth layer bottom level);
- material (1, 2, 3, ..., m) characteristics (to be assigned to each soil layer that each borehole).
Whilst I managed to get the Python script reading the csv files, trying to set boreholes/layers/materials in loops has been more complex (I would like the script to be run for as many boreholes/layer/materials as needed). All examples I have seen, so far, are for basic ground models with horizontal layers defined by a single borehole. Is there a way to set as many boreholes as needed, change the top and bottom layers levels, head, ‘x’ coordination in a loop?
From what I have seen g_i.borehole(x) creates Borehole_1, and if I repeat g_i.borehole(x) Borehole_2 is created, and so on. How can I access and change the characteristics of each borehole, using a Python script, for any number of boreholes >1?
How can layers characteristics be set for each borehole, and a material set for each of those layer, in a loop?
Apologies if this question has been asked before but, I couldn’t find it in the forum.
Cheers,
Joao
Hello Sean,
Typically we use the .BoundingBox of a polygon object to identify which is which.
However, we are working on some further developments (still improving) on the geometry information in Staged construction I can share with you.
Let's say you have Polygon_1_1 in Staged construction.
Running the following command will give you the segments (lines) that define the polygon:
echo Polygon_1_1.Geometry.Segments
And if you want to know the points of each part, you can run this:
echo Polygon_1_1.Geometry.Segments[0]
This will give you x1, y1, x2, y2.
In Python naturally, you can do a for-loop to query all the values and remove any duplicates.
I hope that this helps.