Geometry tools

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()

Return node abcissae; first node x= 0.0 last node x= lengthOfLine.

getNodeAttrOrdinates(attributeName)

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

getOrderedNodes()

Return line interior nodes.

model.geometry.geom_utils.create_set_lines_from_pairs_points(preprocessor, lstPairPoints, setName)

Return a set of lines created between the pairs of points in list ‘lstPairPoints’

Parameters:
  • preprocessor – preprocessor
  • lstPairPoints – list of point pairs [[pnt1,pnt2],[pnt3,pnt4], …]
  • setName – name of the set to be created
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.lines_on_path(preprocessor, path, elementLength)

Return a list of lines between the points on the path

Parameters:
  • path – point sequence
  • elementLength – length of the element for the lines
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)