Skip to content

Commit d8f7632

Browse files
[Hotfix 25.7]: fix(): Added a check to skip validation for legacy cloud assets without bounding box information in the simulation parameters validation function. (#1711)
Co-authored-by: Ben <106089368+benflexcompute@users.noreply.github.com> Co-authored-by: benflexcompute <ben@flexcompute.com>
1 parent 1010f65 commit d8f7632

File tree

3 files changed

+268
-22
lines changed

3 files changed

+268
-22
lines changed

flow360/component/simulation/validation/validation_simulation_params.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ def _check_complete_boundary_condition_and_unknown_surface(
336336

337337
# If transformed then `_will_be_deleted_by_mesher()` will no longer be accurate
338338
# since we do not know the final bounding box for each surface and global model.
339+
if farfield_method:
340+
for item in asset_boundary_entities:
341+
if item.private_attributes is None:
342+
# Legacy cloud asset that does not have bounding box information. Just skip the check.
343+
return params
339344
# pylint:disable=protected-access
340345
asset_boundary_entities = [
341346
item

tests/simulation/params/data/surface_mesh/simulation.json

Lines changed: 224 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,22 @@
344344
"private_attribute_is_interface": null,
345345
"private_attribute_tag_key": null,
346346
"private_attribute_sub_components": [],
347-
"private_attribute_color": null
347+
"private_attribute_color": null,
348+
"private_attributes": {
349+
"type_name": "SurfacePrivateAttributes",
350+
"bounding_box": [
351+
[
352+
0,
353+
0,
354+
0
355+
],
356+
[
357+
1,
358+
1,
359+
1
360+
]
361+
]
362+
}
348363
},
349364
{
350365
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -355,7 +370,22 @@
355370
"private_attribute_is_interface": null,
356371
"private_attribute_tag_key": null,
357372
"private_attribute_sub_components": [],
358-
"private_attribute_color": null
373+
"private_attribute_color": null,
374+
"private_attributes": {
375+
"type_name": "SurfacePrivateAttributes",
376+
"bounding_box": [
377+
[
378+
0,
379+
0,
380+
0
381+
],
382+
[
383+
1,
384+
1,
385+
1
386+
]
387+
]
388+
}
359389
},
360390
{
361391
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -366,7 +396,22 @@
366396
"private_attribute_is_interface": null,
367397
"private_attribute_tag_key": null,
368398
"private_attribute_sub_components": [],
369-
"private_attribute_color": null
399+
"private_attribute_color": null,
400+
"private_attributes": {
401+
"type_name": "SurfacePrivateAttributes",
402+
"bounding_box": [
403+
[
404+
0,
405+
0,
406+
0
407+
],
408+
[
409+
1,
410+
1,
411+
1
412+
]
413+
]
414+
}
370415
},
371416
{
372417
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -377,7 +422,22 @@
377422
"private_attribute_is_interface": null,
378423
"private_attribute_tag_key": null,
379424
"private_attribute_sub_components": [],
380-
"private_attribute_color": null
425+
"private_attribute_color": null,
426+
"private_attributes": {
427+
"type_name": "SurfacePrivateAttributes",
428+
"bounding_box": [
429+
[
430+
0,
431+
0,
432+
0
433+
],
434+
[
435+
1,
436+
1,
437+
1
438+
]
439+
]
440+
}
381441
},
382442
{
383443
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -388,7 +448,22 @@
388448
"private_attribute_is_interface": null,
389449
"private_attribute_tag_key": null,
390450
"private_attribute_sub_components": [],
391-
"private_attribute_color": null
451+
"private_attribute_color": null,
452+
"private_attributes": {
453+
"type_name": "SurfacePrivateAttributes",
454+
"bounding_box": [
455+
[
456+
0,
457+
0,
458+
0
459+
],
460+
[
461+
1,
462+
1,
463+
1
464+
]
465+
]
466+
}
392467
},
393468
{
394469
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -399,7 +474,22 @@
399474
"private_attribute_is_interface": null,
400475
"private_attribute_tag_key": null,
401476
"private_attribute_sub_components": [],
402-
"private_attribute_color": null
477+
"private_attribute_color": null,
478+
"private_attributes": {
479+
"type_name": "SurfacePrivateAttributes",
480+
"bounding_box": [
481+
[
482+
0,
483+
0,
484+
0
485+
],
486+
[
487+
1,
488+
1,
489+
1
490+
]
491+
]
492+
}
403493
},
404494
{
405495
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -410,7 +500,22 @@
410500
"private_attribute_is_interface": null,
411501
"private_attribute_tag_key": null,
412502
"private_attribute_sub_components": [],
413-
"private_attribute_color": null
503+
"private_attribute_color": null,
504+
"private_attributes": {
505+
"type_name": "SurfacePrivateAttributes",
506+
"bounding_box": [
507+
[
508+
0,
509+
0,
510+
0
511+
],
512+
[
513+
1,
514+
1,
515+
1
516+
]
517+
]
518+
}
414519
},
415520
{
416521
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -421,7 +526,22 @@
421526
"private_attribute_is_interface": null,
422527
"private_attribute_tag_key": null,
423528
"private_attribute_sub_components": [],
424-
"private_attribute_color": null
529+
"private_attribute_color": null,
530+
"private_attributes": {
531+
"type_name": "SurfacePrivateAttributes",
532+
"bounding_box": [
533+
[
534+
0,
535+
0,
536+
0
537+
],
538+
[
539+
1,
540+
1,
541+
1
542+
]
543+
]
544+
}
425545
},
426546
{
427547
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -432,7 +552,22 @@
432552
"private_attribute_is_interface": null,
433553
"private_attribute_tag_key": null,
434554
"private_attribute_sub_components": [],
435-
"private_attribute_color": null
555+
"private_attribute_color": null,
556+
"private_attributes": {
557+
"type_name": "SurfacePrivateAttributes",
558+
"bounding_box": [
559+
[
560+
0,
561+
0,
562+
0
563+
],
564+
[
565+
1,
566+
1,
567+
1
568+
]
569+
]
570+
}
436571
},
437572
{
438573
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -443,7 +578,22 @@
443578
"private_attribute_is_interface": null,
444579
"private_attribute_tag_key": null,
445580
"private_attribute_sub_components": [],
446-
"private_attribute_color": null
581+
"private_attribute_color": null,
582+
"private_attributes": {
583+
"type_name": "SurfacePrivateAttributes",
584+
"bounding_box": [
585+
[
586+
0,
587+
0,
588+
0
589+
],
590+
[
591+
1,
592+
1,
593+
1
594+
]
595+
]
596+
}
447597
},
448598
{
449599
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -454,7 +604,22 @@
454604
"private_attribute_is_interface": null,
455605
"private_attribute_tag_key": null,
456606
"private_attribute_sub_components": [],
457-
"private_attribute_color": null
607+
"private_attribute_color": null,
608+
"private_attributes": {
609+
"type_name": "SurfacePrivateAttributes",
610+
"bounding_box": [
611+
[
612+
0,
613+
0,
614+
0
615+
],
616+
[
617+
1,
618+
1,
619+
1
620+
]
621+
]
622+
}
458623
},
459624
{
460625
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -465,7 +630,22 @@
465630
"private_attribute_is_interface": null,
466631
"private_attribute_tag_key": null,
467632
"private_attribute_sub_components": [],
468-
"private_attribute_color": null
633+
"private_attribute_color": null,
634+
"private_attributes": {
635+
"type_name": "SurfacePrivateAttributes",
636+
"bounding_box": [
637+
[
638+
0,
639+
0,
640+
0
641+
],
642+
[
643+
1,
644+
1,
645+
1
646+
]
647+
]
648+
}
469649
},
470650
{
471651
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -476,7 +656,22 @@
476656
"private_attribute_is_interface": null,
477657
"private_attribute_tag_key": null,
478658
"private_attribute_sub_components": [],
479-
"private_attribute_color": null
659+
"private_attribute_color": null,
660+
"private_attributes": {
661+
"type_name": "SurfacePrivateAttributes",
662+
"bounding_box": [
663+
[
664+
0,
665+
0,
666+
0
667+
],
668+
[
669+
1,
670+
1,
671+
1
672+
]
673+
]
674+
}
480675
},
481676
{
482677
"private_attribute_registry_bucket_name": "SurfaceEntityType",
@@ -487,7 +682,22 @@
487682
"private_attribute_is_interface": null,
488683
"private_attribute_tag_key": null,
489684
"private_attribute_sub_components": [],
490-
"private_attribute_color": null
685+
"private_attribute_color": null,
686+
"private_attributes": {
687+
"type_name": "SurfacePrivateAttributes",
688+
"bounding_box": [
689+
[
690+
0,
691+
0,
692+
0
693+
],
694+
[
695+
1,
696+
1,
697+
1
698+
]
699+
]
700+
}
491701
}
492702
],
493703
"global_bounding_box": [

0 commit comments

Comments
 (0)