mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
bimtester: geometric step translation improvement
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
from behave import step
|
||||
|
||||
from geometric_detail_methods import class_geometric_representation
|
||||
import geometric_detail_methods as gdm
|
||||
from utils import assert_elements
|
||||
from utils import IfcFile
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "en"
|
||||
|
||||
|
||||
@step("All elements must be under {number} polygons")
|
||||
def step_impl(context, number):
|
||||
number = int(number)
|
||||
@@ -36,5 +39,9 @@ def step_impl(context, number):
|
||||
|
||||
@step("all {ifc_class} elements have an {representation_class} representation")
|
||||
def step_impl(context, ifc_class, representation_class):
|
||||
switch_locale(context.localedir, "en")
|
||||
class_geometric_representation(context, ifc_class, representation_class)
|
||||
switch_locale(context.localedir, the_lang)
|
||||
gdm.eleclass_has_geometric_representation_of_specific_class(
|
||||
context,
|
||||
ifc_class,
|
||||
representation_class
|
||||
)
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
from behave import step
|
||||
|
||||
from geometric_detail_methods import class_geometric_representation
|
||||
import geometric_detail_methods as gdm
|
||||
from utils import switch_locale
|
||||
|
||||
|
||||
the_lang = "de"
|
||||
|
||||
|
||||
@step("Alle {ifc_class} Bauteile müssen eine geometrische Repräsentation der Klasse {representation_class} verwenden")
|
||||
def step_impl(context, ifc_class, representation_class):
|
||||
switch_locale(context.localedir, "de")
|
||||
class_geometric_representation(context, ifc_class, representation_class)
|
||||
switch_locale(context.localedir, the_lang)
|
||||
gdm.eleclass_has_geometric_representation_of_specific_class(
|
||||
context,
|
||||
ifc_class,
|
||||
representation_class
|
||||
)
|
||||
|
||||
@@ -3,7 +3,11 @@ from utils import assert_elements
|
||||
from utils import IfcFile
|
||||
|
||||
|
||||
def class_geometric_representation(context, ifc_class, representation_class):
|
||||
def eleclass_has_geometric_representation_of_specific_class(
|
||||
context,
|
||||
ifc_class,
|
||||
representation_class
|
||||
):
|
||||
|
||||
def is_item_a_representation(item, representation):
|
||||
if "/" in representation:
|
||||
|
||||
Reference in New Issue
Block a user