Python Utility Functions
This chapter describes in every section the functions and classes of the utility modules. These modules help to create multibody systems with the Exudyn core module. Functions are implemented in Python and can be changed, extended and verified by the user - check the source code by entering a function in Spyder and pressing CTRL + left mouse button. These Python functions are much slower than the functions of the C++ core; some matrix computations with larger matrices, implemented in numpy and scipy, are parallelised and therefore very efficient.
Note that in general functions accept lists and numpy arrays. If not, an error will occur, which is easily tracked. Furthermore, angles are generally provided in radian (\(2\pi\) equals \(360\,^o\)) and no units are used for distances, but it is recommended to use SI units (m, kg, s) throughout.
Functions have been implemented, if not otherwise mentioned, by Johannes Gerstmayr.
- Module: advancedUtilities
- Function: PlotLineCode
- Function: FindObjectIndex
- Function: FindNodeIndex
- Function: IsListOrArray
- Function: RaiseTypeError
- Function: IsNone
- Function: IsNotNone
- Function: IsValidBool
- Function: IsValidRealInt
- Function: IsValidInt
- Function: IsValidPRealInt
- Function: IsValidURealInt
- Function: IsReal
- Function: IsInteger
- Function: IsVector
- Function: IsIntVector
- Function: IsSquareMatrix
- Function: IsValidObjectIndex
- Function: IsValidNodeIndex
- Function: IsValidMarkerIndex
- Function: IsEmptyList
- Function: FillInSubMatrix
- Function: SweepSin
- Function: SweepCos
- Function: FrequencySweep
- Function: SmoothStep
- Function: SmoothStepDerivative
- Function: IndexFromValue
- Function: RoundMatrix
- Function: ConvertScipySparseToDict
- Function: ConvertDictToScipySparse
- Function: SaveDictToHDF5
- Function: LoadDictFromHDF5
- Function: ConvertFunctionToSymbolic
- Function: CreateSymbolicUserFunction
- Function: CreateTCPIPconnection
- Function: TCPIPsendReceive
- Function: CloseTCPIPconnection
- Function: LoadPotentialEnergy
- Function: CreateLoadEnergySensor
- Function: ItemODE2Coordinates
- Function: NumericalJacobian
- CLASS ExpectedType(Enum) (in module advancedUtilities)
- CLASS TCPIPdata (in module advancedUtilities)
- CLASS SystemEnergy (in module advancedUtilities)
- Module: artificialIntelligence
- Module: basicUtilities
- Function: ClearWorkspace
- Function: SmartRound2String
- Function: Normalize
- Function: GaussIntegrate
- Function: LobattoIntegrate
- Function: GetOtherMarker
- Function: GetJointArgs
- Function: ShowOnlyObjects
- Function: HighlightItem
- Function: UFsensorRecord
- Function: AddSensorRecorder
- Function: UIWindowSuppressed
- Function: OutputFilePath
- Function: CreateDirectoryForFile
- Function: LoadSolutionFile
- Function: NumpyInt8ArrayToString
- Function: BinaryReadIndex
- Function: BinaryReadReal
- Function: BinaryReadString
- Function: BinaryReadArrayIndex
- Function: BinaryReadRealVector
- Function: LoadBinarySolutionFile
- Function: RecoverSolutionFile
- Function: SetSolutionState
- Function: AnimateSolution
- Module: beams
- Function: GenerateStraightLineANCFCable2D
- Function: GenerateStraightLineANCFCable
- Function: GenerateBeamElementsAlongLine
- Function: GenerateStraightBeam
- Function: GenerateCircularArcANCFCable2D
- Function: CreateReevingCurve
- Function: PointsAndSlopes2ANCFCable2D
- Function: GenerateSlidingJoint
- Function: GenerateAleSlidingJoint
- Module: demos
- Module: FEM
- Function: CompressedRowSparseToDenseMatrix
- Function: MapSparseMatrixIndices
- Function: VectorDiadicUnitMatrix3D
- Function: CyclicCompareReversed
- Function: AddEntryToCompressedRowSparseArray
- Function: CSRtoRowsAndColumns
- Function: CSRtoScipySparseCSR
- Function: SparseTripletsToScipySparseCSR
- Function: ScipySparseCSRtoCSR
- Function: ResortIndicesOfCSRmatrix
- Function: ResortIndicesOfNGvector
- Function: ResortIndicesExudyn2NGvector
- Function: ReadNodesFromAbaqusInp
- Function: ConvertHexToTrigs
- Function: ConvertTetToTrigs
- Function: ConvertDenseToCompressedRowMatrix
- Function: ReadMatrixFromAnsysMMF
- Function: ReadMatrixDOFmappingVectorFromAnsysTxt
- Function: ReadNodalCoordinatesFromAnsysTxt
- Function: ReadElementsFromAnsysTxt
- Function: CMSObjectComputeNorm
- Function: PostProcessingModesToStorage
- Function: PostProcessingModesFromStorage
- CLASS MaterialBaseClass (in module FEM)
- CLASS KirchhoffMaterial(MaterialBaseClass) (in module FEM)
- CLASS FiniteElement (in module FEM)
- CLASS Tet4(FiniteElement) (in module FEM)
- CLASS ObjectFFRFinterface (in module FEM)
- CLASS ObjectFFRFreducedOrderInterface (in module FEM)
- CLASS HCBstaticModeSelection(Enum) (in module FEM)
- CLASS FEMinterface (in module FEM)
- Module: graphics
- Function: Sphere
- Function: Spheres
- Function: Triangles6ToTriangles
- Function: SpheresToTriangleList
- Function: _SphereTriangles6
- Function: _SphereHollowTriangles6
- Function: _SphereTriangleList
- Function: Lines
- Function: Circle
- Function: Text
- Function: Cuboid
- Function: BrickXYZ
- Function: Brick
- Function: _QuadraticPatch
- Function: _OrientTriangle6
- Function: _OrientTriangle
- Function: _NumberOfQuadraticElements
- Function: Cylinder
- Function: Tube
- Function: Torus
- Function: RigidLink
- Function: SolidOfRevolution
- Function: Arrow
- Function: Basis
- Function: Frame
- Function: Quad
- Function: CheckerBoard
- Function: SolidExtrusion
- Function: LinkedCylinders
- Function: _LinkedCylindersFlat
- Function: BallBearingRings
- Function: InvoluteGear
- Function: ToothedRack
- Function: BoundingBoxSingle
- Function: BoundingBox
- Function: FromPointsAndTrigs
- Function: ToPointsAndTrigs
- Function: Transform
- Function: Move
- Function: MergeTriangleLists
- Function: InvertTriangles
- Function: InconsistentTriangles
- Function: NGsolveMesh2PointsAndTrigs
- Function: FromSTLfileASCII
- Function: FromPyMeshlabFile
- Function: FromSTLfile
- Function: AddEdgesAndSmoothenNormals
- Function: ExportSTL
- CLASS color (in module graphics)
- CLASS material (in module graphics)
- Module: graphicsDataUtilities
- Function: SwitchTripletOrder
- Function: ComputeTriangleNormal
- Function: ComputeTriangleArea
- Function: Compute6NodeTrigsNormals
- Function: RefineMesh
- Function: ShrinkMeshNormalToSurface
- Function: ComputeTriangularMesh
- Function: SegmentsFromPoints
- Function: CirclePointsAndSegments
- Function: GraphicsDataRectangle
- Function: GraphicsDataOrthoCubeLines
- Module: misc.GUI
- Function: _ComplainOnce
- Function: GetRendererSystemContainer
- Function: MakeProcessDpiAware
- Function: TkFontSystemHint
- Function: CheckTkFontSystem
- Function: ScaledFontSize
- Function: ApplyDialogFontScaling
- Function: GetTkRootAndNewWindow
- Function: TkRootExists
- Function: ColumnWidthFractions
- Function: DialogFontSize
- Function: DialogRowMetrics
- Function: GetExudynDisplayScaling
- Function: DialogScaling
- Function: SplitStoredFromChanged
- Function: RenderStateCodeLines
- Function: EditDictionaryWithTypeInfo
- Function: StoreDialogPositions
- Function: RestoreWindowGeometry
- Function: RememberWindowGeometry
- Function: StoreGeometryString
- Function: StoreWindowGeometry
- Function: ApplyDialogWindowSettings
- Function: ShowHelpDialog
- Function: ModelScope
- Function: ShowPythonCommandDialog
- Function: ShowVisualizationSettingsDialog
- Function: ShowRightMouseSelectionDialog
- Function: AskQuitDialog
- CLASS Tooltip (in module misc.GUI)
- Module: misc.settingsUtilities
- Function: GetComboBoxListsDict
- Function: SettingsLeafList
- Function: EnumDisplayName
- Function: EnumFullName
- Function: ValueLiteral
- Function: SettingsCodeLines
- Function: CompiledSettingsClass
- Function: DefaultSettingsDictionary
- Function: SettingsValueStrings
- Function: FindMatches
- Function: SettingsPrefix
- Function: ChangedSettings
- Function: ChangedSettingsCode
- Function: PrintChangedSettings
- Module: interactive
- Module: kinematicTree
- Module: lieGroupBasics
- Function: Sinc
- Function: Cot
- Function: R3xSO3Matrix2RotationMatrix
- Function: R3xSO3Matrix2Translation
- Function: R3xSO3Matrix
- Function: ExpSO3
- Function: ExpS3
- Function: LogSO3
- Function: TExpSO3
- Function: TExpSO3Inv
- Function: ExpSE3
- Function: LogSE3
- Function: TExpSE3
- Function: TExpSE3Inv
- Function: ExpR3xSO3
- Function: TExpR3xSO3
- Function: TExpR3xSO3Inv
- Function: CompositionRuleDirectProductR3AndS3
- Function: CompositionRuleSemiDirectProductR3AndS3
- Function: CompositionRuleDirectProductR3AndR3RotVec
- Function: CompositionRuleSemiDirectProductR3AndR3RotVec
- Function: CompositionRuleDirectProductR3AndR3RotXYZAngles
- Function: CompositionRuleSemiDirectProductR3AndR3RotXYZAngles
- Function: CompositionRuleForEulerParameters
- Function: CompositionRuleForRotationVectors
- Function: CompositionRuleRotXYZAnglesRotationVector
- Module: misc.mainSystemExtensions
- Module: particles
- Module: physics
- Module: plot
- Function: __PlotWindowName
- Function: __PlotWindowOf
- Function: __WindowGeometry
- Function: __StorePlotWindow
- Function: StorePlotWindowGeometry
- Function: PlotWindowGeometries
- Function: __PlacePlotWindow
- Function: ParseOutputFileHeader
- Function: PlotSensorDefaults
- Function: PlotSensor
- Function: PlotFFT
- Function: FileStripSpaces
- Function: DataArrayFromSensorList
- Function: __ImageDataFromGraphicsData
- Function: PlotImage
- Module: processing
- Module: rigidBodyUtilities
- Function: ComputeOrthonormalBasisVectors
- Function: ComputeOrthonormalBasis
- Function: GramSchmidt
- Function: Skew
- Function: Skew2Vec
- Function: ComputeSkewMatrix
- Function: EulerParameters2G
- Function: EulerParameters2GLocal
- Function: EulerParameters2RotationMatrix
- Function: RotationMatrix2EulerParameters
- Function: AngularVelocity2EulerParameters_t
- Function: RotationVector2RotationMatrix
- Function: RotationMatrix2RotationVector
- Function: ComputeRotationAxisFromRotationVector
- Function: RotationVector2G
- Function: RotationVector2GLocal
- Function: RotXYZ2RotationMatrix
- Function: RotationMatrix2RotXYZ
- Function: RotXYZ2G
- Function: RotXYZ2G_t
- Function: RotXYZ2GLocal
- Function: RotXYZ2GLocal_t
- Function: AngularVelocity2RotXYZ_t
- Function: RotXYZ2EulerParameters
- Function: RotationMatrix2RotZYZ
- Function: RotationMatrixX
- Function: RotationMatrixY
- Function: RotationMatrixZ
- Function: RotationMatrix2D
- Function: HomogeneousTransformation
- Function: HTtranslate
- Function: HTtranslateX
- Function: HTtranslateY
- Function: HTtranslateZ
- Function: HT0
- Function: HTrotateX
- Function: HTrotateY
- Function: HTrotateZ
- Function: HT2translation
- Function: HT2rotationMatrix
- Function: InverseHT
- Function: RotationX2T66
- Function: RotationY2T66
- Function: RotationZ2T66
- Function: Translation2T66
- Function: TranslationX2T66
- Function: TranslationY2T66
- Function: TranslationZ2T66
- Function: T66toRotationTranslation
- Function: InverseT66toRotationTranslation
- Function: RotationTranslation2T66
- Function: RotationTranslation2T66Inverse
- Function: T66Inverse
- Function: T66toHT
- Function: HT2T66Inverse
- Function: InertiaTensor2Inertia6D
- Function: Inertia6D2InertiaTensor
- Function: StrNodeType2NodeType
- Function: GetRigidBodyNode
- Function: AddRigidBody
- Function: AddRevoluteJoint
- Function: AddPrismaticJoint
- CLASS TreeLink (in module rigidBodyUtilities)
- CLASS RigidBodyInertia (in module rigidBodyUtilities)
- CLASS InertiaCuboid(RigidBodyInertia) (in module rigidBodyUtilities)
- CLASS InertiaRodX(RigidBodyInertia) (in module rigidBodyUtilities)
- CLASS InertiaMassPoint(RigidBodyInertia) (in module rigidBodyUtilities)
- CLASS InertiaSphere(RigidBodyInertia) (in module rigidBodyUtilities)
- CLASS InertiaHollowSphere(RigidBodyInertia) (in module rigidBodyUtilities)
- CLASS InertiaCylinder(RigidBodyInertia) (in module rigidBodyUtilities)
- Module: robotics
- Function: _ToHT
- Function: StdDH2HT
- Function: ModDHKK2HT
- Function: projectAngleToPMPi
- CLASS VRobotLink (in module robotics)
- CLASS RobotLink (in module robotics)
- CLASS VRobotTool (in module robotics)
- CLASS RobotTool (in module robotics)
- CLASS VRobotBase (in module robotics)
- CLASS RobotBase (in module robotics)
- CLASS Robot (in module robotics)
- CLASS InverseKinematicsNumerical() (in module robotics)
- Module: robotics.rosInterface
- Module: robotics.future
- Module: robotics.models
- Module: robotics.mobile
- Module: robotics.motion
- Module: robotics.special
- Module: robotics.utilities
- Module: shells
- Function: _UnitVector
- Function: AddNodeConstraints
- Function: AddSphericalJointToGround
- Function: AddClampToGround
- Function: _ThinPlateShapeFunctionDerivatives
- Function: _CreateMPCZeroMarker
- Function: _AddSlopeDeviationConstraint
- Function: AddSlopeConformityConstraints
- Function: AddDistributedClampToEdge
- Function: ApplyEdgeLoad
- Function: AddRotationalSpringDamper
- Function: AddEdgeSpringDamper
- CLASS ShellMesh (in module shells)
- CLASS SurfaceMap (in module shells)
- Module: signalProcessing
- Module: solver
- Module: utilities