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