General topics

Basic entities

Basic entities for data exchange.

class import_export.basic_entities.ComponentSupportRecord(typ='Rigid', k=0.0)

Constraints for x,y,z,rx,ry,rz displacements of a node/kPoint.

getTypeCode()
class import_export.basic_entities.SupportRecord(id, xComp=<import_export.basic_entities.ComponentSupportRecord instance>, yComp=<import_export.basic_entities.ComponentSupportRecord instance>, zComp=<import_export.basic_entities.ComponentSupportRecord instance>, rxComp=<import_export.basic_entities.ComponentSupportRecord instance>, ryComp=<import_export.basic_entities.ComponentSupportRecord instance>, rzComp=<import_export.basic_entities.ComponentSupportRecord instance>)

Bases: object

Constraints for displacements

getStrConstraints()
setupFromComponentLabels(componentLabels)

Block topology entities

class import_export.block_topology_entities.BlockData

Bases: object

Block topology entities container: points, lines, faces, solids,…

appendBlock(block)
appendPoint(id, x, y, z, labels=None)
getBlockTags()

Return the identifiers of the blocks.

getPointTags()

Return the identifiers of the points.

readFromDxfFile(fName, preprocessor, dxfLayers)

Read block topology from a DXF file.

Parameters:
  • fName – name of the DXF file to write.
  • preprocessor – XC preprocessor
  • dxfLayers – layers to import objects from.
readFromXCSet(xcSet)

Read points and surfaces from an XC set.

writeDxf(drawing)

Write the blocs (point, lines, surfaces, volumes,…) in a DXF file.

Parameters:drawing – ezdxf drawing object.
writeDxfFile(fileName)

Write mesh in a DXF file.

Parameters:fileName – name of the DXF file to write.
writeToXCFile(xcImportExportData)

Write a Python file with XC commands.

class import_export.block_topology_entities.BlockDict

Bases: dict

Block container.

append(cell)
getTags()

Return the identifiers of the objects.

readFromXCSet(xcSet)

Read blocks from XC set.

writeDxf(name, pointDict, drawing)

Write the cells in dxf file.

writeToXCFile(f, xcImportExportData)

Write the XC commands that define the cells (elements).

class import_export.block_topology_entities.BlockRecord(id, typ, kPoints, labels=None, thk=0.0)

Bases: import_export.mesh_entities.CellRecord

Block type entities: line, face, body,…

getStrKeyPointsIds()
getStrXCCommand(xcImportExportData)
getType()

Return the type of the block.

class import_export.block_topology_entities.PointDict

Bases: import_export.mesh_entities.NodeDict

Node container.

append(id, x, y, z)
getName()
readFromXCSet(xcSet)
writeToXCFile(f, xcImportExportData)

Write the XC commands that define nodes.

class import_export.block_topology_entities.PointRecord(id, coords, labels=None)

Bases: import_export.mesh_entities.NodeRecord

kPoint type entity

getStrXCCommand(pointHandlerName)

Return the XC command that creates the point.

class import_export.block_topology_entities.PointSupportDict

Bases: dict

Point to put constraints on.

append(ps)
readFromXCSet(xcSet, points)

Read supports from an XC set.

class import_export.block_topology_entities.PointSupportRecord(id, pointId, nsr)

Bases: import_export.basic_entities.SupportRecord

Constraints for node displacements.

Neutral mesh description

class import_export.neutral_mesh_description.GroupRecord

Bases: object

empty()
readFromDATFile(fName)
setUp(name, points, lines)
writeDxfFile(xcImportExportData)

groups have not representation in dxf files.

writeToXCFile(xcImportExportData)

writes the XC commands to define the group in a file.

class import_export.neutral_mesh_description.MEDMeshData(umesh)

Bases: import_export.mesh_entities.MeshData

meshDimension = None
spaceDimension = None
class import_export.neutral_mesh_description.XCImportExportData

Bases: object

convertCellType(tp)
getBlockHandlerName(blockType)
getDxfFileName()
getXCFileName()
readDATFiles()
readDxfFile(fName, preprocessor)
writeDxfFile(fileName)
writeToXCFile()
import_export.neutral_mesh_description.dumpMeshes(meshes, fName)
import_export.neutral_mesh_description.loadMeshes(fName)

Mesh entities

class import_export.mesh_entities.CellDict

Bases: dict

Cell container.

append(cell)
getTags()
readFromDATFile(lines, begin, end)
readFromUMesh(umesh)
readFromXCSet(xcSet)
writeDxf(nodeDict, drawing)

Write the cells in dxf file.

writeToXCFile(f, xcImportExportData)

Write the XC commands that define the cells (elements).

class import_export.mesh_entities.CellRecord(id, typ, nodes, thk=0.0)

Bases: object

getStrXCCommand(xcImportExportData)
getStrXCNodes()
writeDxf(nodeDict, drawing, layerName)
class import_export.mesh_entities.MaterialDict

Bases: dict

append(mat)
class import_export.mesh_entities.MaterialRecord(name, typo, thermalExp, rho, E, nu, G, logDec, specHeat, thermalCond)

Bases: object

class import_export.mesh_entities.MeshData

Bases: object

readFromDATFile(fName)
readFromXCSet(xcSet)

Read nodes and elements from an XC set.

writeDxf(drawing)

Write mesh in a DXF file.

writeDxfFile(fileName)

Write mesh in a DXF file.

writeToXCFile(xcImportExportData)

Write the XC commands that define the mesh.

class import_export.mesh_entities.NodeDict

Bases: dict

Node container.

append(id, x, y, z)
getName()
getTags()
readFromDATFile(lines, begin, end)
readFromUMesh(umesh)
readFromXCSet(xcSet)
writeDxf(drawing)

Write the node positions in dxf file.

writeToXCFile(f, xcImportExportData)

Write the XC commands that define nodes.

class import_export.mesh_entities.NodeRecord(id, coords)

Bases: object

Node of a finite element mesh

getStrXCCommand(nodeHandlerName)
getX()
getY()
getZ()
writeDxf(drawing, layerName)
class import_export.mesh_entities.NodeSupportDict

Bases: dict

append(ns)
getNodeTags()

Return dictionary keys in a list.

readFromXCDomain(domain)

Read SP constraints from an XC domain.

class import_export.mesh_entities.NodeSupportRecord(id, nodeId, xComp=<import_export.basic_entities.ComponentSupportRecord instance>, yComp=<import_export.basic_entities.ComponentSupportRecord instance>, zComp=<import_export.basic_entities.ComponentSupportRecord instance>, rxComp=<import_export.basic_entities.ComponentSupportRecord instance>, ryComp=<import_export.basic_entities.ComponentSupportRecord instance>, rzComp=<import_export.basic_entities.ComponentSupportRecord instance>)

Bases: import_export.basic_entities.SupportRecord

Constraints for node displacements

import_export.mesh_entities.getConstraintsByNode(domain)

Neutral load description

class import_export.neutral_load_description.ElementLoadRecord(loadCase, bName='nil', v=1.0, mode='nil')

Bases: import_export.neutral_load_description.LoadRecord

class import_export.neutral_load_description.LoadCase(id, name, desc, lg, ltyp)

Bases: object

Load case.

class import_export.neutral_load_description.LoadComb(id, name, desc, typ, descomp)

Bases: object

Load combination.

class import_export.neutral_load_description.LoadCombComponent(id, loadCase, coef)

Bases: object

class import_export.neutral_load_description.LoadContainer(n)

Bases: object

empty()
getNumberOfLoads()
searchLoadedElements(elementSet)

Get load distribution over elements taken from the set.

class import_export.neutral_load_description.LoadData

Bases: object

Container for load groups, cases and combinations.

readLoadCombsFromXC(combContainer, mapLoadCases)
class import_export.neutral_load_description.LoadGroup(id, desc, permanent=False)

Bases: object

Loads wich share some property (origin,…).

class import_export.neutral_load_description.LoadRecord(loadCase, bName='nil', v=1.0)

Bases: object

class import_export.neutral_load_description.NodalLoadRecord(loadCase, bName, pos, v)

Bases: import_export.neutral_load_description.PointForceRecord

Load over a node.

searchLoadedElement(elemSet)
searchLoadedNode(elemSet)
class import_export.neutral_load_description.PointForceRecord(loadCase, bName, pos, v)

Bases: import_export.neutral_load_description.LoadRecord

Force applied in a point.

class import_export.neutral_load_description.SurfaceLoadRecord(loadCase, bName='nil', plg=None, v=1.0, mode='nil')

Bases: import_export.neutral_load_description.ElementLoadRecord

get2DPolygon()
searchLoadedElements(elemSet)

Returns elements which have his center inside the polygon

setPolygon(points)
import_export.neutral_load_description.getComponentsFromStr(descompStr, mapLoadCases)

DXF reader

class import_export.dxf_reader.DXFImport(dxfFileName, layerNamesToImport, getRelativeCoo, threshold=0.01, importLines=True, importSurfaces=True, polylinesAsSurfaces=False, tolerance=0.01)

Bases: object

Import DXF entities.

exportBlockTopology(name)
extractPoints()

Extract the points from the entities argument.

getIndexNearestPoint(pt)
getLayersToImport(namesToImport)

Return the layers names that will be imported according to the regular expressions contained in the second argument.

Parameters:namesToImport – list of regular expressions to be tested.
getNearestPoint(pt)
getOrientation(p0, p1, length)

Return the points in the order that makes the resulting vector to point outwards the origin.

importFaces()

Import 3D faces from DXF.

importGroups()

Import the DXF groups on the file.

importLines()

Import lines from DXF.

importPoints()

Import points from DXF.

selectKPoints()

Selects the k-points to be used in the model. All the points that are closer than the threshold distance are melted into one k-point.

class import_export.dxf_reader.FloatList(tol=0.01)

Bases: list

List of floats that are more than “tol” apart.

append(num)
class import_export.dxf_reader.OldDxfReader(tol=0.001)

Bases: object

Reading of DXF entities for further processing.

newKeyPoint(pt)
newLine(l)
read(dxf_file_name, xc_preprocessor, layers)
read_lines(entities, layerName)
read_points(entities, layerName)
import_export.dxf_reader.decompose_polyface(polyface, tol=0.01)

Return the quadrilateral surfaces that compose the polyface.

import_export.dxf_reader.decompose_polyline(polyline, tol=0.01)

Return the quadrilateral surfaces that compose the polyline.

import_export.dxf_reader.get_candidate_2Dquads(sisRef, points, tol)

Return candidate quads in 2D.

import_export.dxf_reader.get_extended_data(obj, appName='XC')

Extract dxf object extended data.

import_export.dxf_reader.get_polyface_points_axis(polyface_points)

Return the axis for the polyface.

import_export.dxf_reader.get_polygon_axis(points, tol)

Compute the polygon axis on the assumption that they all the sides are orthogonal.

import_export.dxf_reader.layerToImport(layerName, namesToImport)

Return true if the layer name matches one of the regular expressions contained in the second argument.

Parameters:
  • layerName – name of the layer.
  • namesToImport – list of regular expressions to be tested.
import_export.dxf_reader.quads2d_to_global_coordinates(sisRef, selected_quads)

Convert the quads from 2D to 3D.