pyCAPS
pyCAPS: A Python Extension Module for CAPS
Loading...
Searching...
No Matches
AnalysisGeometry Class Reference

Defines Analysis Geometry Object. More...

Inherits object.

Public Member Functions

 bodies (self)
 Get dict of geometric bodies.
 
 save (self, filename, directory=os.getcwd(), extension=".egads", writeTess=True)
 Save the current geometry used by the AIM to a file.
 
 view (self, **kwargs)
 View the geometry associated with the analysis.
 
 attrList (self, attributeName, **kwargs)
 Retrieve a list of geometric attribute values of a given name ("attributeName") for the bodies loaded into the analysis.
 
 attrMap (self, getInternal=False, **kwargs)
 Create geometric attribution map (embeded dictionaries) for the bodies loaded into the analysis.
 

Detailed Description

Defines Analysis Geometry Object.

Parameters
AnalysisGeometry.despmtrValueInSequence of ValueIn CSM design parameters
AnalysisGeometry.cfgpmtrValueInSequence of ValueIn CSM configuration parameters
AnalysisGeometry.conpmtrValueInSequence of ValueIn CSM constant parameters
AnalysisGeometry.outpmtrValueOutSequence of ValueOut CSM outputs

Member Function Documentation

◆ attrList()

attrList (   self,
  attributeName,
**  kwargs 
)

Retrieve a list of geometric attribute values of a given name ("attributeName") for the bodies loaded into the analysis.

Level in which to search the bodies is determined by the attrLevel keyword argument. See analysis3.py for a representative use case.

Parameters
attributeNameName of attribute to retrieve values for.
**kwargsSee below.
Returns
A list of attribute values.

Valid keywords:

Parameters
bodyIndexSpecific body in which to retrieve attribute information from.
attrLevelLevel to which to search the body(ies). Options:
0 (or "Body") - search just body attributes
1 (or "Face") - search the body and all the faces [default]
2 (or "Edge") - search the body, faces, and all the edges
3 (or "Node") - search the body, faces, edges, and all the nodes

◆ attrMap()

attrMap (   self,
  getInternal = False,
**  kwargs 
)

Create geometric attribution map (embeded dictionaries) for the bodies loaded into the analysis.

Dictionary layout:

  • Body 1
    • Body : Body level attributes
    • Faces
      • 1 : Attributes on the first face of the body
      • 2 : Attributes on the second face of the body
      • " : ... - Edges - 1 : Attributes on the first edge of the body - 2 : Attributes on the second edge of the body - " : ...
    • Nodes :
      • 1 : Attributes on the first node of the body
      • 2 : Attributes on the second node of the body
      • " : ... - Body 2 - Body : Body level attributes - Faces - 1 : Attributes on the first face of the body - " : ...
    • ...
  • ...

Dictionary layout (reverseMap = True):

  • Body 1
    • Attribute : Attribute name
      • Value : Value of attribute
        • Body : True if value exist at body level, None if not
        • Faces : Face numbers at which the attribute exist
        • Edges : Edge numbers at which the attribute exist
        • Nodes : Node numbers at which the attribute exist
      • Value : Next value of attribute with the same name
        • Body : True if value exist at body level, None if not
        • " : ... - ... - Atribute : Attribute name - Value : Value of attribute - " : ...
      • ...
  • Body 2
    • Attribute : Attribute name
      • Value : Value of attribute
        • Body : True if value exist at body level, None if not
        • " : ... - ... - ... - ... @param getInternal Get internal attributes (denoted by starting with an underscore, for example "_AttrName") that exist on the geometry (default - False).
          Parameters
          **kwargsSee below.
          Valid keywords:
          Parameters
          reverseMapReverse the attribute map (default - False). See above table for details.
          Returns
          Dictionary containing attribution map

◆ bodies()

bodies (   self)

Get dict of geometric bodies.

Returns
Returns a dictionary of the bodies in the Analysis Object, as well a the capsLength unit. Keys use the body "_name" attribute or "Body_#".

◆ save()

save (   self,
  filename,
  directory = os.getcwd(),
  extension = ".egads",
  writeTess = True 
)

Save the current geometry used by the AIM to a file.

Parameters
filenameFile name to use when saving geometry file.
directoryDirectory where to save file. Default current working directory.
extensionExtension type for file if filename does not contain an extension.
writeTessWrite tessellations to the EGADS file (only applies to .egads extension)

◆ view()

view (   self,
**  kwargs 
)

View the geometry associated with the analysis.

If the analysis produces a surface tessellation, then that is shown. Otherwise the bodies are shown with default tessellation parameters. Note that the geometry must be built and will not autoamtically be built by this function.

Parameters
**kwargsSee below.

Valid keywords:

Parameters
portNumberPort number to start the server listening on (default - 7681).

The documentation for this class was generated from the following file: