Geometry tools

Utilities for geometry entities related manipulations.

class model.geometry.geom_utils.LineWrapper(line)

Bases: object

getElementFunctionOrdinates(factor0, funcName0, factor1, funcName1)

Return a list with the values of attribute extrapolated at each node.

getElements()
getFirstNode()

Returns line’s first node.

getInteriorNodes()

Returns line’s interior nodes.

getLastNode()

Return line’s last node.

getNodeAbcissae()

Returns node’s abcissae; first node x= 0.0 last node x= lengthOfLine.

getNodeAttrOrdinates(attributeName)

Return a list with the values of attribute at each node.

getOrderedNodes()

Returns line’s interior nodes.

model.geometry.geom_utils.def_rg_cooLim(XYZLists, Xcoo, Ycoo, Zcoo)

Return an XYZ range given the three lists of coordinates of the grid and the limit coordinates.

Parameters:
  • XYZList – (xList,yList,zList)
  • Xcoo – (xmin,xmax)
  • Ycoo – (ymin,ymax)
  • Zcoo – (zmin,zmax)
model.geometry.geom_utils.eq_points_parabola(startS, stopS, numPts, a, b, c, angSX)

Returns equispaced nPts points of the parabola “z=as^2 + bs + c” in the range [startS,stopS]. S is a coordinate by the straight line projection of the parabola on the XY plane. angSX is the angle (in rad) between that line and the X-axis

model.geometry.geom_utils.fit_parabola(x, y)

Fits the equation “y = ax^2 + bx + c” given exactly 3 points as two lists or arrays of x & y coordinates

model.geometry.geom_utils.getFirstNode(line)

DEPRECATED; returns line’s first node.

model.geometry.geom_utils.getInteriorNodes(line)

DEPRECATED; returns line’s interior nodes.

model.geometry.geom_utils.getLastNode(line)

DEPRECATED; returns line’s last node.

model.geometry.geom_utils.get_lin_2Pts(pnt1, pnt2, setSrchLin=None)

return the line that belongs to the set ,setSrchLin and whose starting and ending points are pnt1 and pnt2 (in this order) If no set is defined, total set is adopted

model.geometry.geom_utils.lstEquPnts_from_polyline(pol, nDiv)

Return a list of nDiv+1 equally spaced points (3dPos) in polyline ‘pol’

Parameters:
  • pol – polyline (as defined with geom.Polyline3d())
  • nDiv – number of divisions to split polyline
model.geometry.geom_utils.lstLns_from_lstPnts(lstPnts)

Return an ordered list of consecutive lines from the ordered list of points ‘lstPnts’ given as parameter.

model.geometry.geom_utils.lstP3d_from_lstLns(lstLns)

Return an ordered list of vertex (3DPos) from the ordered list of consecutive lines ‘lstLns’ given as parameter.

model.geometry.geom_utils.rect2DPolygon(xCent, yCent, Lx, Ly)

Rectangular polygon

Nets

class model.geometry.net_utils.Net2DHelper(net2D)

Bases: object

assignZ(zFunc)
createSurfaces(preprocessor, iSize, jSize)
net = None
model.geometry.net_utils.createSurfacesNet2D(preprocessor, net2D, iSize, jSize)
model.geometry.net_utils.net2DfromXYlists(preprocessor, abscissae, ordinates)

Retaining wall geometry

class model.geometry.retaining_wall_geometry.CantileverRetainingWallGeometry(name='prb', stemBottomWidth=0.25, stemTopWidth=0.25, footingThickness=0.25)

Bases: object

Geometry of a cantilever retaining wall.

Attributes:
ivar name:(string) Identifier.
ivar stemHeight:
 (float) Height of the stem.
ivar stemBottomWidth:
 (float) Stem width at his contact with the footing.
ivar stemTopWidth:
 (float) Stem width at his top.
ivar footingThickness:
 (float) Thickness of the footing.
ivar bToe:(float) Toe length.
ivar bHeel:(float) Heel length.
defaultDimensions(totalHeight)

Computes default dimension from the total height.

defineWireframeModel(nodes)
getDepth(y)

Return stem section depth for height “y”).

getFootingMidPlane()

Returns the midplane of the footing.

getFootingWidth()

Return total width of the footing.

getFoundationCenterPosition()

Returns the position of the foundation center (for excentricity computation).

getFoundationDepth(toeFillDepth)

Return wall foundation depth. Args:

toeFillDepth:(float) depht of the soil filling overt the toe.
getFoundationPlane()

Returns the foundation plane.

getToePosition()

Returns the position of the toe (for overturning moment computation).

getTotalHeight()

Return total height of the wall.

getWFHeelEndPosition()

Returns the position of the heel end in the wireframe model.

getWFStemBottomPosition()

Returns the position of the stem bottom in the wireframe model.

getWFStemHeigth()

Return the height of the stem in the wireframe model.

getWFStemTopPosition()

Returns the position of the stem top in the wireframe model.

getWFToeEndPosition()

Returns the position of the toe end in the wireframe model.

writeGeometry(outputFile)

Write wall geometry in LaTeX format.