General topics¶
Basic entities¶
Basic entities for data exchange.
- class import_export.basic_entities.ComponentSupportRecord(typ='Rigid', k=0.0)¶
Bases:
object
Constraints for x,y,z,rx,ry,rz displacements of a node/kPoint.
- Variables
typ – constraint component type.
k – stiffness.
- getDict()¶
Return the object members in a Python dictionary.
- getTypeCode()¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.basic_entities.SupportRecord(id, xComp=<import_export.basic_entities.ComponentSupportRecord object>, yComp=<import_export.basic_entities.ComponentSupportRecord object>, zComp=<import_export.basic_entities.ComponentSupportRecord object>, rxComp=<import_export.basic_entities.ComponentSupportRecord object>, ryComp=<import_export.basic_entities.ComponentSupportRecord object>, rzComp=<import_export.basic_entities.ComponentSupportRecord object>)¶
Bases:
object
Constraints for displacements.
- Variables
id – object identifier.
xComp – x displacement constraint definition.
yComp – y displacement constraint definition.
zComp – z displacement constraint definition.
rxComp – x rotation constraint definition.
ryComp – y rotation constraint definition.
rzComp – z rotation constraint definition.
- getDict()¶
Return the object members in a Python dictionary.
- getStrConstraints()¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- setupFromComponentLabels(componentLabels)¶
Block topology entities¶
- class import_export.block_topology_entities.BlockData(verbosity=1)¶
Bases:
object
Block topology entities container: points, lines, faces, solids,…
- Variables
name – container name.
materials – materials dictionary.
points – point container.
blocks – block (line, surface, volumen) container.
pointSupports – constrained points.
verbosity – verbosity level.
- appendBlock(block)¶
- Append a block (line, surface, volume) to the
block data.
- Parameters
block – block to append.
- appendPoint(id, x, y, z, pointProperties=None)¶
Append a point to the block data.
- Parameters
id – point identifier (-1 == auto).
x – x coordinate of the point.
y – y coordinate of the point.
z – z coordinate of the point.
pointProperties – labels and attributes for the point.
- blockFromPoints(points, blockProperties, thickness=0.0, matId=None)¶
- Create a block with the points and append it
to the container.
- Parameters
points – points to build the new block.
blockProperties – labels and attributes for the new block.
thickness – thickness of the new block.
matId – material of the new block.
- dumpToXC(preprocessor)¶
Dump the entities of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- extend(other)¶
Append a the data from the argument to this container.
- Parameters
other – container to append here.
- getBlockTags()¶
Return the identifiers of the blocks.
- getDict()¶
Return the object members in a Python dictionary.
- getHoles()¶
Return the holes defined in this container.
- getNearest(pos3d)¶
Return the block nearest to the point argument.
- Parameters
pos3d – position of the point.
- getPointTags()¶
Return the identifiers of the points.
- getXCCommandString(xcImportExportData)¶
Return a string with the XC commands that define the blocks.
- hasHoles()¶
Return true if one or more of the surfaces has holes in it.
- readFromXCSet(xcSet)¶
Read points and surfaces from an XC set.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- writeDxf(drawing)¶
- Write the blocks (point, lines, surfaces, volumes,…)
in a DXF file.
- Parameters
drawing – ezdxf drawing object.
- writeDxfFile(fileName, silent=True)¶
Write block topology in a DXF file.
- Parameters
fileName – name of the DXF file to write.
silent – if true instruct ezdxf not to write regular info messages (only warning or error messages).
- writeToJSON(xcImportExportData)¶
Write the objects that define the mesh.
- Parameters
xcImportExportData – import/export parameters.
- writeToXCFile(xcImportExportData)¶
Write a Python file with XC commands.
- class import_export.block_topology_entities.BlockDict¶
Bases:
dict
Block container.
- append(cell)¶
- dumpToXC(preprocessor)¶
Dump the entities of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getDict()¶
Return the object members in a Python dictionary.
- getTags()¶
Return the identifiers of the objects.
- getXCCommandString(xcImportExportData)¶
Return a string with the XC commands that define the cells.
- readFromXCSet(xcSet)¶
Read blocks from XC set.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- 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.BlockProperties(labels=None, attributes=None)¶
Bases:
object
Labels and attributes of the block.
- Variables
labels – string list that helps to identify the role of the block in the model.
attributes – block attributes stored in a dictionary.
- appendAttribute(key, value)¶
Append the label argument to the container.
- appendLabel(label)¶
Append the label argument to the container.
- static copyFrom(blockProperties)¶
- If the argument is not None creates a new BlockProperties
object with the arguments contents, otherwise return an empty BlockProperties object.
- Parameters
blockProperties – object to copy contents from.
- dumpToXC(preprocessor, entity)¶
Dump the entities of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
entity – entity which receives the properties.
- extend(blockProperties)¶
Append the argument labels and attributes to the container.
- extendAttributes(attributes)¶
Append the labels argument to the container.
- extendLabels(labels)¶
Append the labels argument to the container.
- getAttribute(key)¶
Return the attribute corresponding to the key argument in the dictionary.
- getDict()¶
Return the object members in a Python dictionary.
- getXCCommandString(strId)¶
Return the XC command that stores the properties.
- Parameters
strId – identifier of the object.
- hasAttribute(key)¶
Return true if the key argument is the attribute dictionary.
- hasLabel(label)¶
Return true if the label argument is the label container.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.block_topology_entities.BlockRecord(blkId, typ, kPoints, blockProperties=None, thk=0.0, matId=None)¶
Bases:
import_export.mesh_entities.CellRecord
Block type entities: line, face, body,…
- Variables
blockProperties – labels and attributes of the block.
matId – material identifier.
- dumpToXC(preprocessor)¶
Defines the corresponding (line, surface or volume) entity in XC.
- Parameters
preprocessor – preprocessor of the finite element problem.
- getAttribute(key)¶
Return the attribute corresponding to the key argument in the dictionary.
- getDict()¶
Return the object members in a Python dictionary.
- getGeomObject(pointDict)¶
Return the geometric object that represents this line, surface or volume.
- getHoles()¶
Return the blocks defining the holes of the block.
- getKPointIds()¶
Return the key points identifiers of the block.
- getStrKeyPointsIds()¶
- getType()¶
Return the type of the block.
- getVertices(pointDict)¶
Return the positions of the k-points defining this block.
- getXCCommandString(xcImportExportData)¶
Return the XC Python string defining the object.
- hasAttribute(key)¶
Return true if the key argument is the attribute dictionary.
- hasHoles()¶
Return true if the block has holes in it.
- hasLabel(label)¶
Return true if the label argument is the label container.
- isHole()¶
Return true if the block defines a hole
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.block_topology_entities.PointDict¶
Bases:
import_export.mesh_entities.NodeDict
Point container.
- append(ident, x, y, z, blockProperties=None)¶
Append a new point to the container.
- Parameters
ident – identifier for the point.
x – x-coordinate of the point.
y – y-coordinate of the point.
z – z-coordinate of the point.
blockProperties – labels and attributes of the point.
- dumpToXC(preprocessor)¶
Dump the points of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getDict()¶
Return the object members in a Python dictionary.
- getName()¶
- getXCCommandString(xcImportExportData)¶
Return a string with the XC commands that define the nodes.
- readFromXCSet(xcSet)¶
Read the points from the XC set and append them to this container.
- Parameters
xcSet – xc set.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- writeToXCFile(f, xcImportExportData)¶
Write the XC commands that define nodes.
- class import_export.block_topology_entities.PointRecord(ident, coords, blockProperties=None)¶
Bases:
import_export.mesh_entities.NodeRecord
kPoint type entity
- Variables
blockProperties – labels and attributes of the point.
- dumpToXC(preprocessor)¶
Dump the entities of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getAttribute(key)¶
Return the attribute corresponding to the key argument in the dictionary.
- getDict()¶
Return the object members in a Python dictionary.
- getXCCommandString(pointHandlerName: str)¶
Return the XC command that creates the point.
- Parameters
pointHandlerName – name of the point handler
- hasAttribute(key)¶
Return true if the key argument is the attribute dictionary.
- hasLabel(label)¶
Return true if the label argument is the label container.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.block_topology_entities.PointSupportDict¶
Bases:
dict
Point support container.
- append(ps)¶
- getDict()¶
Return the object members in a Python dictionary.
- readFromXCSet(xcSet, points)¶
Read supports from the given XC set.
- Parameters
xcSet – XC set to read from.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.block_topology_entities.PointSupportRecord(ident, pointId, nsr)¶
Bases:
import_export.mesh_entities.NodeSupportRecord
Constraints for node displacements.
Neutral mesh description¶
Data structures to describe a finite element mesh.
- class import_export.neutral_mesh_description.GroupRecord¶
Bases:
object
Object defining a grop of entities (nodes, cells, points, or lines).
- Variables
name – group name.
nodeIds – identifiers of the nodes.
cellIds – identifiers of the cells.
pointIds – identifiers of the points.
lineIds – identifiers of the lines.
- empty()¶
- getDict()¶
Return the object members in a Python dictionary.
- readFromDATFile(fName)¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- setUp(name, points, lines)¶
- writeDxfFile(dummy)¶
groups have not representation in dxf files.
- Parameters
dummy – dummy argument (not used).
- writeToXCFile(xcImportExportData)¶
writes the XC commands to define the group in a file.
:param xcImportExportData:Data used when importing and/or exporting XC models.
- class import_export.neutral_mesh_description.MEDMeshData(umesh)¶
Bases:
import_export.mesh_entities.MeshData
- getDict()¶
Return the object members in a Python dictionary.
- meshDimension = None¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- spaceDimension = None¶
- class import_export.neutral_mesh_description.XCImportExportData¶
Bases:
object
- Data used when importing and/or exporting XC
models.
- Variables
outputFileName – name to use for the output file.
problemName – name for the XC problem object.
nodeHandlerName – name for the XC node handler.
cellHandlerName – name for the XC element handler.
setHandlerName – name for the XC group handler.
pointHandlerName – name for the XC point handler.
lineHandlerName – name for the XC line handler.
surfaceHandlerName – name for the XC surface handler.
cellConversion – dictionary for cell conversion.
outputFile – Python file object used for output.
meshDesc – string describing the mesh
blockData – block data (points, lines, surfaces, bodies).
- convertCellType(tp)¶
- dumpToXC(preprocessor)¶
Dump the objects in this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getBlockHandlerName(blockType)¶
- getDict()¶
Return the object members in a Python dictionary.
- getDxfFileName()¶
- getJSONFileName()¶
- getXCCommandString()¶
Return a string with the XC commands that define the model.
- getXCFileName()¶
- readDATFiles()¶
- readDxfFile(fName, preprocessor)¶
Read from DXF file.
- Parameters
fName – file name.
preprocessor – xc preprocessor for the FE problem.
- readFromXCSet(xcSet)¶
- Read the objects from the XC set and create the
corresponding entities here.
- Parameters
preprocessor – XC finite element problem preprocessor.
- readJSONFile(fName)¶
Read from JSON file.
- Parameters
fName – file name.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- writeDxfFile(fileName)¶
- writeToJSON()¶
Write the objects that define the mesh.
- Parameters
xcImportExportData – import/export parameters.
- writeToXCFile()¶
Write the model to a XC file.
- 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)¶
- dumpToXC(preprocessor)¶
Dump the elementss of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getDict()¶
Return the object members in a Python dictionary.
- getTags()¶
- getXCCommandString(xcImportExportData)¶
Return a string with the XC commands that define the cells.
- readFromDATFile(lines, begin, end)¶
- readFromUMesh(umesh)¶
- readFromXCSet(xcSet)¶
Read cells from the given XC set.
- Parameters
xcSet – XC set to read from.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- 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(ident, typ, nodes, thk=0.0)¶
Bases:
object
Cell object
- Variables
ident – identifier for the cell.
typ – cell type.
nodes – nodes that define block geometry and topology.
thickness – cell thickness.
- dumpToXC(preprocessor)¶
Defines the corresponding (line, surface or volume) entity in XC.
- Parameters
preprocessor – preprocessor of the finite element problem.
- getDict()¶
Return the object members in a Python dictionary.
- getStrThicknessCommand(strId)¶
- Return a string defining the thickness
property of the cell.
- Parameters
strId – object identifier.
- getStrXCNodes()¶
- getXCCommandString(xcImportExportData)¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- writeDxf(nodeDict, drawing, layerName)¶
- class import_export.mesh_entities.MaterialDict¶
Bases:
dict
Material container indexed by the material name.
- append(mat)¶
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.mesh_entities.MaterialRecord(name, typo, thermalExp, rho, E, nu, G, logDec, specHeat, thermalCond)¶
Bases:
object
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.mesh_entities.MeshData¶
Bases:
object
- dumpToXC(preprocessor)¶
Dump the objects in this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getDict()¶
Return the object members in a Python dictionary.
- getXCCommandString(xcImportExportData)¶
Return a string with the XC commands that define the blocks.
- readFromDATFile(fName)¶
- readFromXCSet(xcSet)¶
Read nodes and elements from the given XC set.
- Parameters
xcSet – set to read the mesh from.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- writeDxf(drawing)¶
Write mesh in a DXF file.
- writeDxfFile(fileName, silent=True)¶
Write mesh in a DXF file.
- Parameters
fileName – name of the DXF file to write.
silent – if true instruct ezdxf not to write regular info messages (only warning or error messages).
- writeToJSON(xcImportExportData)¶
Write the objects that define the mesh.
- Parameters
xcImportExportData – import/export parameters.
- writeToXCFile(xcImportExportData)¶
Write the XC commands that define the mesh.
- Parameters
xcImportExportData – import/export parameters.
- class import_export.mesh_entities.NodeDict¶
Bases:
dict
Node container.
- append(ident, x, y, z)¶
- dumpToXC(preprocessor)¶
Dump the nodes of this container into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getDict()¶
Return the object members in a Python dictionary.
- getName()¶
- getTags()¶
- getXCCommandString(xcImportExportData)¶
Return a string with the XC commands that define the nodes.
- readFromDATFile(lines, begin, end)¶
- readFromUMesh(umesh)¶
- readFromXCSet(xcSet)¶
Read nodes from the given XC set.
- Parameters
xcSet – XC set to read from.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- 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(ident, coords)¶
Bases:
object
Node of a finite element mesh.
;ivar ident: identifier for the node. :ivar coords: coordinates of the node.
- dumpToXC(preprocessor)¶
Dump the node into the preprocessor argument.
- Parameters
preprocessor – XC finite element problem preprocessor.
- getDict()¶
Return the object members in a Python dictionary.
- getX()¶
- getXCCommandString(nodeHandlerName)¶
- getY()¶
- getZ()¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- writeDxf(drawing, layerName)¶
- class import_export.mesh_entities.NodeSupportDict¶
Bases:
dict
Container of node supports.
- append(ns)¶
- getDict()¶
Return the object members in a Python dictionary.
- getNodeTags()¶
Return dictionary keys in a list.
- readFromXCDomain(domain)¶
Read SP constraints from an XC domain.
- Parameters
domain – domain to read SP constraints from.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.mesh_entities.NodeSupportRecord(ident, nodeId, xComp=<import_export.basic_entities.ComponentSupportRecord object>, yComp=<import_export.basic_entities.ComponentSupportRecord object>, zComp=<import_export.basic_entities.ComponentSupportRecord object>, rxComp=<import_export.basic_entities.ComponentSupportRecord object>, ryComp=<import_export.basic_entities.ComponentSupportRecord object>, rzComp=<import_export.basic_entities.ComponentSupportRecord object>)¶
Bases:
import_export.basic_entities.SupportRecord
Constraints for node displacements.
- Variables
nodeId – identifier of the supported node.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- 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
Load over an elemetn.
- Variables
tags – identifiers of the elements.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadCase(id, name, desc, lg, ltyp)¶
Bases:
object
Load case.
- Variables
id – load case identifier.
name – load case name.
desc – load case description.
loadGroupId – load group identifier.
actionType – action type.
ltyp – load type.
loads – load container.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadComb(id, name, desc, typ, descomp)¶
Bases:
object
Load combination.
- Variables
id – combination identifier.
name – combination name.
desc – combination description.
typ – combination type.
descomp – expression of the combination
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadCombComponent(id, loadCase, coef)¶
Bases:
object
Component of a load combination.
- Variables
id – component identifier.
loadCaseId – load case identifier.
loadCaseName – load case name.
coef – load multiplier.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadContainer(n)¶
Bases:
object
Load container.
- Variables
name – name of the container.
punctualLoads – punctual loads container.
surfaceLoads – surface loads container.
- empty()¶
- getDict()¶
Return the object members in a Python dictionary.
- getNumberOfLoads()¶
- searchLoadedElements(elementSet)¶
Get load distribution over elements taken from the set.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadData¶
Bases:
object
Container for load groups, cases and combinations.
- Variables
loadGroups – load group container.
loadCases – load cases container.
loadCombs – load combination container.
- getDict()¶
Return the object members in a Python dictionary.
- readLoadCombsFromXC(combContainer, mapLoadCases)¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadGroup(id, desc, permanent=False)¶
Bases:
object
Loads which share some property (origin,…).
- Variables
id – load group identifier.
desc – load group description.
permanent – true if the load is permanent.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.LoadRecord(loadCase, bName='nil', v=1.0)¶
Bases:
object
Load definition.
- Variables
loadCaseId – load case identifier.
loadCaseName – load case name.
loadName – name of the load.
value – absolute value of the load.
vDir – direction vector.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.NodalLoadRecord(loadCase, bName, pos, v)¶
Bases:
import_export.neutral_load_description.PointForceRecord
Load over a node or an element.
- Variables
tag – identifier of the node or the element.
- getDict()¶
Return the object members in a Python dictionary.
- searchLoadedElement(elemSet)¶
- searchLoadedNode(elemSet)¶
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.PointForceRecord(loadCase, bName, pos, v)¶
Bases:
import_export.neutral_load_description.LoadRecord
Force applied in a point.
- Variables
pos – position of the point.
- getDict()¶
Return the object members in a Python dictionary.
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- class import_export.neutral_load_description.SurfaceLoadRecord(loadCase, bName='nil', plg=None, v=1.0, mode='nil')¶
Bases:
import_export.neutral_load_description.ElementLoadRecord
Load over a surface.
- Variables
plg – polygon defining the contour of the surface.
projPlane – projection plane.
- get2DPolygon()¶
- getDict()¶
Return the object members in a Python dictionary.
- searchLoadedElements(elemSet)¶
Returns elements which have his center inside the polygon
- setFromDict(dct)¶
Set the data values from the dictionary argument.
- Parameters
dct – dictionary containing the values of the object members.
- setPolygon(points)¶
- import_export.neutral_load_description.getComponentsFromStr(descompStr, mapLoadCases)¶
DXF reader¶
Read block topology data from DXF files.
- class import_export.dxf_reader.DXFImport(dxfFileName, layerNamesToImport, getRelativeCoo, threshold=0.01, importLines=True, importSurfaces=True, polylinesAsSurfaces=False, tolerance=0.01)¶
Bases:
import_export.reader_base.ReaderBase
Import DXF entities.
- Variables
layerNamesToImport – list of regular expressions to be tested.
polylinesAsSurfaces – if true import polylines as surfaces.
tolerance – tolerance for polyface and polyline decomposition
- extractPoints()¶
Extract the points from the entities argument.
- 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.
- getNamesToImport()¶
Return the layer names to import.
- importFaces()¶
Import 3D faces from DXF.
- importGroups()¶
Import the DXF groups on the file.
- importLines()¶
Import lines from DXF.
- importPoints()¶
Import points from DXF.
- class import_export.dxf_reader.FloatList(tol=0.01)¶
Bases:
list
- List of floats that are more than
“tol” apart.
- Variables
tol – tolerance.
- append(num)¶
Append object to the end of the list.
- 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.quads2d_to_global_coordinates(sisRef, selected_quads)¶
Convert the quads from 2D to 3D.