work6x6kamaz modular verify
This commit is contained in:
parent
2bc14415b6
commit
df411b396c
3 changed files with 85 additions and 34 deletions
|
|
@ -293,3 +293,27 @@ unclassifiedObjects -> []
|
|||
rearAxleWheelPartCount -> 44
|
||||
rearAxleChassisPartCount -> 130
|
||||
```
|
||||
|
||||
## 2026-06-19: совместимость KAMAZ с KRAZ body for bulk
|
||||
|
||||
Проверочный файл:
|
||||
|
||||
```text
|
||||
C:\Users\post\Documents\mrPlow\in\mrplow_modular_assembly_verify.blend
|
||||
```
|
||||
|
||||
Правило комплектации:
|
||||
|
||||
- `KRAZ_body for bulk` можно ставить на заднюю часть KAMAZ вместо штатных `KUZOV/GRUZ`;
|
||||
- `KRAZ_blade bucket` можно ставить спереди как навесной плуг/ковш;
|
||||
- `wing` остается в базовом KAMAZ source;
|
||||
- `wing_VerifyAltModulesVariant` удаляется только в проверочном варианте с `KRAZ_body for bulk`, потому bulk-бункер занимает тот же rear-side clearance envelope;
|
||||
- это не удаление детали из базовой машины, а правило совместимости модулей.
|
||||
|
||||
Текущий verify result:
|
||||
|
||||
```text
|
||||
kamazModules -> KUZOV, GRUZ
|
||||
krazModulesPlacedOnKamaz -> KRAZ_body for bulk, KRAZ_blade bucket
|
||||
removedForKrazBulk -> wing_VerifyAltModulesVariant
|
||||
```
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ KAMAZ_CLEAN_FILE = "kamaz_65115_clean.blend"
|
|||
KRAZ_FILE = "kraz_6322 .blend"
|
||||
VERIFY_FILE = "mrplow_modular_assembly_verify.blend"
|
||||
VERIFY_REPORT = "mrplow_modular_assembly_verify_report.json"
|
||||
KAMAZ_MODULE_NAMES = ["KUZOV", "GRUZ", "broom"]
|
||||
KAMAZ_MODULE_NAMES = ["KUZOV", "GRUZ"]
|
||||
KRAZ_MODULE_NAMES = ["body for bulk", "blade bucket"]
|
||||
INCOMPATIBLE_WITH_KRAZ_BULK = ["wing"]
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
|
@ -127,6 +128,25 @@ def duplicate_collection_objects(source_collection_name, suffix, offset, target_
|
|||
return duplicated
|
||||
|
||||
|
||||
def remove_variant_objects(source_objects, source_names, suffix, reason):
|
||||
removed = []
|
||||
source_names = set(source_names)
|
||||
for obj in list(source_objects):
|
||||
base_name = obj.name
|
||||
if base_name.endswith(suffix):
|
||||
base_name = base_name[: -len(suffix)]
|
||||
if base_name not in source_names:
|
||||
continue
|
||||
removed.append({
|
||||
"name": obj.name,
|
||||
"baseName": base_name,
|
||||
"reason": reason,
|
||||
})
|
||||
bpy.data.objects.remove(obj, do_unlink=True)
|
||||
source_objects.remove(obj)
|
||||
return removed
|
||||
|
||||
|
||||
def align_bottom_center(obj, target_center, target_bottom_z):
|
||||
min_v, max_v, size = bounds([obj])
|
||||
obj_center = (min_v + max_v) * 0.5
|
||||
|
|
@ -211,12 +231,19 @@ def main():
|
|||
kraz_blade = bpy.data.objects.get("KRAZ_blade bucket")
|
||||
|
||||
placed_modules = []
|
||||
removed_for_bulk = []
|
||||
if kuzov and kraz_body:
|
||||
target_min, target_max, _ = bounds([kuzov])
|
||||
target = (target_min + target_max) * 0.5 + variant_offset
|
||||
align_bottom_center(kraz_body, target, target_min.z)
|
||||
link_to_collection(kraz_body, variant_collection)
|
||||
placed_modules.append(kraz_body)
|
||||
removed_for_bulk = remove_variant_objects(
|
||||
variant_chassis,
|
||||
INCOMPATIBLE_WITH_KRAZ_BULK,
|
||||
"_VerifyAltModulesVariant",
|
||||
"KRAZ_body for bulk replaces/conflicts with rear wing geometry",
|
||||
)
|
||||
|
||||
if variant_chassis and kraz_blade:
|
||||
min_v, max_v, _ = bounds(variant_chassis)
|
||||
|
|
@ -233,7 +260,7 @@ def main():
|
|||
default_center = center(mesh_objects())
|
||||
add_text_label(
|
||||
"Label_Default_Kamaz",
|
||||
"01 KAMAZ default assembly: chassis + KUZOV + GRUZ + broom",
|
||||
"01 KAMAZ default assembly: chassis + KUZOV + GRUZ",
|
||||
Vector((default_center.x, -2.9, 3.4)),
|
||||
labels_collection,
|
||||
)
|
||||
|
|
@ -276,10 +303,19 @@ def main():
|
|||
],
|
||||
"kamazModules": [object_report(obj) for obj in kamaz_modules],
|
||||
"krazModulesPlacedOnKamaz": [object_report(obj) for obj in placed_modules],
|
||||
"removedForKrazBulk": removed_for_bulk,
|
||||
"incompatibilityRules": [
|
||||
{
|
||||
"whenRearModule": "KRAZ_body for bulk",
|
||||
"removeFromVariant": INCOMPATIBLE_WITH_KRAZ_BULK,
|
||||
"reason": "bulk body occupies the same rear side clearance envelope",
|
||||
}
|
||||
],
|
||||
"variantChassisBounds": object_report(variant_chassis[0]) if variant_chassis else {},
|
||||
"notes": [
|
||||
"KAMAZ default modules remain in the clean source file and are exported separately.",
|
||||
"KRAZ modules are placed on the KAMAZ alternative module fit variant, offset by +5m on Y.",
|
||||
"wing is removed only from the KRAZ bulk verification variant, not from the base KAMAZ source.",
|
||||
"Final Unreal import still uses separate FBX assets, not one combined mesh.",
|
||||
],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"MrPlow_Chassis",
|
||||
"MrPlow_Modules",
|
||||
"MrPlow_Rig",
|
||||
"Verify_02_KAMAZ_With_KRAZ_Modules",
|
||||
"Verify_02_KAMAZ_With_Alt_Modules",
|
||||
"Verify_03_Module_Parking",
|
||||
"Verify_Labels"
|
||||
],
|
||||
|
|
@ -71,32 +71,6 @@
|
|||
},
|
||||
"nonUnitScale": false,
|
||||
"negativeScale": false
|
||||
},
|
||||
{
|
||||
"name": "broom",
|
||||
"type": "MESH",
|
||||
"locationM": [
|
||||
-2.1234,
|
||||
0.0,
|
||||
0.2514
|
||||
],
|
||||
"boundsMinM": [
|
||||
-3.8952,
|
||||
-1.1416,
|
||||
0.63
|
||||
],
|
||||
"boundsMaxM": [
|
||||
-3.8048,
|
||||
1.1621,
|
||||
0.9406
|
||||
],
|
||||
"sizeCm": {
|
||||
"x": 9.04,
|
||||
"y": 230.37,
|
||||
"z": 31.06
|
||||
},
|
||||
"nonUnitScale": false,
|
||||
"negativeScale": false
|
||||
}
|
||||
],
|
||||
"krazModulesPlacedOnKamaz": [
|
||||
|
|
@ -132,17 +106,17 @@
|
|||
"locationM": [
|
||||
4.509,
|
||||
5.0,
|
||||
0.7053
|
||||
0.9657
|
||||
],
|
||||
"boundsMinM": [
|
||||
3.6118,
|
||||
3.0193,
|
||||
0.0494
|
||||
0.3098
|
||||
],
|
||||
"boundsMaxM": [
|
||||
5.4063,
|
||||
6.9807,
|
||||
1.3612
|
||||
1.6216
|
||||
],
|
||||
"sizeCm": {
|
||||
"x": 179.45,
|
||||
|
|
@ -153,8 +127,24 @@
|
|||
"negativeScale": false
|
||||
}
|
||||
],
|
||||
"removedForKrazBulk": [
|
||||
{
|
||||
"name": "wing_VerifyAltModulesVariant",
|
||||
"baseName": "wing",
|
||||
"reason": "KRAZ_body for bulk replaces/conflicts with rear wing geometry"
|
||||
}
|
||||
],
|
||||
"incompatibilityRules": [
|
||||
{
|
||||
"whenRearModule": "KRAZ_body for bulk",
|
||||
"removeFromVariant": [
|
||||
"wing"
|
||||
],
|
||||
"reason": "bulk body occupies the same rear side clearance envelope"
|
||||
}
|
||||
],
|
||||
"variantChassisBounds": {
|
||||
"name": "CABIN_VerifyKrazVariant",
|
||||
"name": "CABIN_VerifyAltModulesVariant",
|
||||
"type": "MESH",
|
||||
"locationM": [
|
||||
2.3732,
|
||||
|
|
@ -181,7 +171,8 @@
|
|||
},
|
||||
"notes": [
|
||||
"KAMAZ default modules remain in the clean source file and are exported separately.",
|
||||
"KRAZ modules are placed in a side-by-side fit variant, offset by +5m on Y.",
|
||||
"KRAZ modules are placed on the KAMAZ alternative module fit variant, offset by +5m on Y.",
|
||||
"wing is removed only from the KRAZ bulk verification variant, not from the base KAMAZ source.",
|
||||
"Final Unreal import still uses separate FBX assets, not one combined mesh."
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue