Hello,
Is there any way to find a borehole polygon (made using boreholes) corresponding to some coordination?
Basically I want to make the code below automated instead of having an specific name (i.e. BoreholePolygon_1_2 in this case) in it:
g_i.BoreholePolygon_1_2.deactivate(g_i.phases[3])
for example, if we have a command like: "a = find.boreholepolygon(1, 2)":
Then I will be able to change the code above to this:
a.deactivate(g_i.phases[3])
Dear Farbod,
In Staged construction, the geometry information of any point, line or polygon is no longer available as geometry cannot change.
However, you can use the .BoundingBox property:
echo BoreholePolygon_1_2.BoundingBox
Otherwise, you can create a variable during creation of the polygon, and use it later, e.g.:
pol, soil = g_i.polygon(0, 0, 0, 1, 1, 1, 1, 0) # this creates Polygon_1 and Soil_1g_i.gotostages()g_i.activate(pol, g_i.Phases[-1]) # this will activate Polygon_1, which includes Polygon_1_1
Note that normally polygons get intersected so if you need to activate only Polygon_1_2, then you will need some extra information (.BoundingBox) and add an extra for-loop to do the (de)activation.
Some users also find it better to have direct control so they create the geometry already intersected and then they know exactly what polygon to deactivate.