loadIntermediate#
Loads an intermediate file into a kdFlex format.
Attributes#
Classes#
Container for extra information pulled from FreeCAD assemblies. |
Functions#
Convert a .freecad.yaml file into a Karana BasicPrefabDS. |
Module Contents#
- class loadIntermediate.FreeCadExtraInfo(/, **data: Any)#
Bases:
Karana.KUtils.DataStruct.DataStructContainer for extra information pulled from FreeCAD assemblies.
Only used for debugging and validation.
- total_mass: float#
Total mass of assembly (defaults to units of kg).
- total_com_global: Karana.Math.Ktyping.Vec3#
Center of mass in global frame of whole assembly (defaults to units of m).
- cms_global: dict[str, Karana.Math.Ktyping.Vec3]#
Mapping of body names to their centers of mass in global frame.
- loadIntermediate.freecadToBasicPrefabDS(in_file: str | pathlib.Path, verbose: bool = False) Karana.KUtils.BasicPrefab.BasicPrefabDS[FreeCadExtraInfo]#
Convert a .freecad.yaml file into a Karana BasicPrefabDS.
- Parameters:
in_file (str) – input yaml file containing intermediate representation of FreeCAD system.
verbose (bool) – Controls verbosity of conversion; defaults to False.
- Returns:
A BasicPrefab DataStruct containing all bodies, joints, and geometries extracted from the intermediate file. Also contains extra info used for validation in the from of FreeCadParams.
- Return type:
- loadIntermediate.RTOL = 1e-08#
- loadIntermediate.ATOL = 1e-08#