refactor: rebrand project to HartOMat
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""STEP → USD exporter for Schaeffler Automat.
|
||||
"""STEP → USD exporter for HartOMat.
|
||||
|
||||
Reads a STEP file via OCP/XCAF (preserving part names + embedded colors),
|
||||
tessellates with BRepMesh, builds a USD stage mirroring the full XCAF
|
||||
@@ -18,7 +18,7 @@ Usage:
|
||||
[--color_map '{"Ring": "#4C9BE8"}'] \\
|
||||
[--sharp_threshold 20.0] \\
|
||||
[--cad_file_id uuid] \\
|
||||
[--material_map '{"part_name": "SCHAEFFLER_010101_Steel-Bare", ...}']
|
||||
[--material_map '{"part_name": "HARTOMAT_010101_Steel-Bare", ...}']
|
||||
|
||||
Exit 0 on success, exit 1 on failure.
|
||||
Prints MANIFEST_JSON: {...} to stdout before exit.
|
||||
@@ -418,8 +418,8 @@ def _author_xcaf_to_usd(
|
||||
_occ_trsf_to_usd_matrix(local_loc.Transformation()))
|
||||
|
||||
prim = xform.GetPrim()
|
||||
prim.SetCustomDataByKey("schaeffler:sourceName", source_name)
|
||||
prim.SetCustomDataByKey("schaeffler:sourceAssemblyPath", xcaf_path)
|
||||
prim.SetCustomDataByKey("hartomat:sourceName", source_name)
|
||||
prim.SetCustomDataByKey("hartomat:sourceAssemblyPath", xcaf_path)
|
||||
|
||||
print(f" {' ' * depth}[asm] {source_name} → {xform_path}"
|
||||
f"{' (transform)' if has_local_trsf else ''}")
|
||||
@@ -484,16 +484,16 @@ def _author_xcaf_to_usd(
|
||||
_occ_trsf_to_usd_matrix(local_loc.Transformation()))
|
||||
|
||||
prim = xform.GetPrim()
|
||||
prim.SetCustomDataByKey("schaeffler:partKey", part_key)
|
||||
prim.SetCustomDataByKey("schaeffler:sourceName", source_name)
|
||||
prim.SetCustomDataByKey("schaeffler:sourceAssemblyPath", xcaf_path)
|
||||
prim.SetCustomDataByKey("schaeffler:sourceColor", hex_color)
|
||||
prim.SetCustomDataByKey("schaeffler:tessellation:linearDeflectionMm",
|
||||
prim.SetCustomDataByKey("hartomat:partKey", part_key)
|
||||
prim.SetCustomDataByKey("hartomat:sourceName", source_name)
|
||||
prim.SetCustomDataByKey("hartomat:sourceAssemblyPath", xcaf_path)
|
||||
prim.SetCustomDataByKey("hartomat:sourceColor", hex_color)
|
||||
prim.SetCustomDataByKey("hartomat:tessellation:linearDeflectionMm",
|
||||
args.linear_deflection)
|
||||
prim.SetCustomDataByKey("schaeffler:tessellation:angularDeflectionRad",
|
||||
prim.SetCustomDataByKey("hartomat:tessellation:angularDeflectionRad",
|
||||
args.angular_deflection)
|
||||
if args.cad_file_id:
|
||||
prim.SetCustomDataByKey("schaeffler:cadFileId", args.cad_file_id)
|
||||
prim.SetCustomDataByKey("hartomat:cadFileId", args.cad_file_id)
|
||||
|
||||
# ── UsdGeomMesh ────────────────────────────────────────────
|
||||
mesh = UsdGeom.Mesh.Define(stage, mesh_path)
|
||||
@@ -525,13 +525,13 @@ def _author_xcaf_to_usd(
|
||||
|
||||
# ── Material metadata on mesh prim (customData) ───────────
|
||||
mesh_prim = mesh.GetPrim()
|
||||
mesh_prim.SetCustomDataByKey("schaeffler:partKey", part_key)
|
||||
mesh_prim.SetCustomDataByKey("schaeffler:sourceName", source_name)
|
||||
mesh_prim.SetCustomDataByKey("hartomat:partKey", part_key)
|
||||
mesh_prim.SetCustomDataByKey("hartomat:sourceName", source_name)
|
||||
|
||||
canonical_mat = _lookup_material(source_name, part_key, mat_map_lower)
|
||||
if canonical_mat:
|
||||
mesh_prim.SetCustomDataByKey(
|
||||
"schaeffler:canonicalMaterialName", canonical_mat)
|
||||
"hartomat:canonicalMaterialName", canonical_mat)
|
||||
|
||||
primvars_api = UsdGeom.PrimvarsAPI(mesh)
|
||||
|
||||
@@ -542,7 +542,7 @@ def _author_xcaf_to_usd(
|
||||
idx_pairs = _world_to_index_pairs(vertices, sharp_pairs)
|
||||
if idx_pairs:
|
||||
pv = primvars_api.CreatePrimvar(
|
||||
"schaeffler:sharpEdgeVertexPairs",
|
||||
"hartomat:sharpEdgeVertexPairs",
|
||||
Sdf.ValueTypeNames.Int2Array,
|
||||
UsdGeom.Tokens.constant,
|
||||
)
|
||||
@@ -556,7 +556,7 @@ def _author_xcaf_to_usd(
|
||||
seam_idx_pairs = _world_to_index_pairs(vertices, seam_pairs)
|
||||
if seam_idx_pairs:
|
||||
pv_seam = primvars_api.CreatePrimvar(
|
||||
"schaeffler:seamEdgeVertexPairs",
|
||||
"hartomat:seamEdgeVertexPairs",
|
||||
Sdf.ValueTypeNames.Int2Array,
|
||||
UsdGeom.Tokens.constant,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user