Export helper object from FreeCAD: grasp poses, part's zero positions, planar (tables, surfaces) and volumetric zones (storage, boxes)

This commit is contained in:
Mark Voltov 2023-06-18 15:55:12 +00:00 committed by Igor Brylyov
parent a38c3bec5a
commit 9fa936cfba
26 changed files with 12259 additions and 2 deletions

View file

@ -184,11 +184,23 @@ def getLocalPartProps(obj):
"label": obj.Label,
"parent_label": obj_parent_label,
"placement": placement2pose(old_placement),
# "grip properties": { "grip open": obj.GripOpen, "grip depth": obj.GripDepth, "grip width": obj.GripWidth}
# "boundingbox": boundingBox2list(obj.Shape.BoundBox),
# "volume": obj.Shape.Volume*1e-9,
# "centerofmass": vector2list(obj.Shape.CenterOfMass),
# "principalproperties": principalProperties2dict(obj.Shape.PrincipalProperties)
}
if obj.Type == 'grip':
partprops["grip properties"] = { "grip open": obj.GripOpen, "grip depth": obj.GripDepth, "grip width": obj.GripWidth}
elif obj.Type == 'area':
partprops["area dim"] = { } #свойства, описывающие размер
elif obj.Type == 'vol':
partprops["vol dim"] = { } #свойства, описывающие размер области
# obj.Placement = old_placement
return partprops