Package empro :: Module empro :: Module geometry :: Class Assembly
[frames] | no frames]

Class Assembly

core.Updatable --+            
                 |            
   core.Selectable --+        
                     |        
     core.Attributable --+    
                         |    
                      Part --+
                             |
                            Assembly

An Assembly is a set of Parts grouped together.

Class Hierarchy for Assembly
Class Hierarchy for Assembly

constructor Assembly():

constructor Assembly(iName):

Instance Methods
 
__call__(x, ...)
x(...)
 
__contains__(x, y)
y in x
 
__delitem__(x, y)
del x[y]
 
__getitem__(x, y)
x[y]
 
__len__(x)
len(x)
 
__setitem__(x, i, y)
x[i]=y
None
append(iPart)
Appends a Part.
 
appendList(...)
No documentation available.
Part
at(iPosition)
Retrieves the Part at a given position.
Part
child(iIndex)
Returns the child of the assembly at the specified index.
None
clear()
Removes all the parts from the assembly.
bool
contains(iName)
Returns whether the assembly contains the specified part or not.
Assembly
deserialize(xml)
Static method, deserialize XML representation of definition to Python object.
 
deserializeEx(...)
No documentation available.
None
exportCad(iFile)
Exports the assembly to a CAD file.
list[Part]
flatList(iRecursive)
Gives a list of parts in the assembly.
int
index(iPart)
Returns the index of the specified part in the assembly.
None
insert(iIndex, iPart)
Inserts the specifed part at the specifed index in the assembly.
tuple
pathToPart(iPart)
Returns a tuple indicating the path to the specifed part.
None
remove(iPosition)
Removes the Part at a given position.
string
serialize()
Serialize assembly to XML
 
serializeEx(...)
No documentation available.
int
size()
The number of parts in the assembly.

Inherited from Part: age, badFaces, boundingBox, centeredBoundingBox, check, checkLumps, cloneFlatten, exportFaceToSAT, exportToSAB, exportToSAT, faceCentroid, faceNormalAtCentroid, faces, facetFaces, hide, importCad, importCadWithUnits, inspectPart, locatorList, project, show, slice, sliceLineFacets, touchGeometry

Inherited from core.Attributable: addAttribute, attributeNames, getAttribute, removeAttribute, setAttribute

Inherited from core.Selectable: clone, isSelected

Inherited from core.Updatable: __enter__, __exit__, hash, isValid, reasonWhyInvalid

Properties

Inherited from Part: appearance, cadId, coordinateSystem, gridParameters, material, meshParameters, priority, unit, visible

Inherited from core.Selectable: metaData, name, notes

Method Details

append(iPart)

 

Appends a Part.

Parameters:
  • iPart (Part) - The part to append.
Returns: None

at(iPosition)

 

Retrieves the Part at a given position.

Parameters:
  • iPosition (int) - the position of the part to retrieve
Returns: Part

child(iIndex)

 

Returns the child of the assembly at the specified index.

Parameters:
  • iIndex (int) - The index of the child in the assembly.
Returns: Part

contains(iName)

 

Returns whether the assembly contains the specified part or not.

Parameters:
  • iName (string) - The name of the part.
Returns: bool

deserialize(xml)

 

Static method, deserialize XML representation of definition to Python object.

Parameters:
  • xml (string) - XML representation of the assembly.
Returns: Assembly

exportCad(iFile)

 

Exports the assembly to a CAD file.

Parameters:
  • iFile (string) - The name of the file to export to.
Returns: None

flatList(iRecursive)

 

Gives a list of parts in the assembly.

Parameters:
  • iRecursive (bool) - when True underlying assemblies will be flatlisted as well
Returns: list[Part]

index(iPart)

 

Returns the index of the specified part in the assembly.

Parameters:
  • iPart (Part) - The part in the assembly.
Returns: int

insert(iIndex, iPart)

 

Inserts the specifed part at the specifed index in the assembly.

Parameters:
  • iIndex (int) - Index at which the part has to be inserted.
  • iPart (Part) - The part to be inserted.
Returns: None

pathToPart(iPart)

 

Returns a tuple indicating the path to the specifed part.

Parameters:
  • iPart (Part) - The part for which tha path is required.
Returns: tuple

remove(iPosition)

 

Removes the Part at a given position.

Parameters:
  • iPosition (int) - the position of the part to remove
Returns: None

serialize()

 

Serialize assembly to XML

Returns: string
Overrides: Part.serialize

serializeEx(...)

 

No documentation available.

Overrides: Part.serializeEx