mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
black .
This commit is contained in:
@@ -84,6 +84,7 @@ ENDSEC;
|
||||
END-ISO-10303-21;
|
||||
"""
|
||||
|
||||
|
||||
def test_original_edges():
|
||||
ifc_file = ifcopenshell.file.from_string(contents)
|
||||
element = ifc_file.by_id(95)
|
||||
@@ -92,6 +93,6 @@ def test_original_edges():
|
||||
assert (len(shape.edges) // 2) == 20
|
||||
shape = ifcopenshell.geom.create_shape(settings, element, geometry_library="cgal")
|
||||
assert (len(shape.edges) // 2) == 16
|
||||
settings.set('cgal-original-edges', True)
|
||||
settings.set("cgal-original-edges", True)
|
||||
shape = ifcopenshell.geom.create_shape(settings, element, geometry_library="cgal")
|
||||
assert (len(shape.edges) // 2) == 20
|
||||
|
||||
@@ -18,28 +18,29 @@
|
||||
|
||||
import ifcopenshell.util.stationing as sta
|
||||
|
||||
|
||||
def test_station_as_string():
|
||||
# test with a bunch of "random" station values
|
||||
s = sta.station_as_string(0.0)
|
||||
assert(s == "0+000.000")
|
||||
assert s == "0+000.000"
|
||||
|
||||
s = sta.station_as_string(0.0,2,2)
|
||||
assert(s == "0+00.00")
|
||||
s = sta.station_as_string(0.0, 2, 2)
|
||||
assert s == "0+00.00"
|
||||
|
||||
s = sta.station_as_string(0.0,2)
|
||||
assert(s == "0+00.000")
|
||||
s = sta.station_as_string(0.0, 2)
|
||||
assert s == "0+00.000"
|
||||
|
||||
s = sta.station_as_string(100.00)
|
||||
assert(s == "0+100.000")
|
||||
s = sta.station_as_string(100.00)
|
||||
assert s == "0+100.000"
|
||||
|
||||
s = sta.station_as_string(-100.00)
|
||||
assert(s == "-0+100.000")
|
||||
s = sta.station_as_string(-100.00)
|
||||
assert s == "-0+100.000"
|
||||
|
||||
s = sta.station_as_string(123456.789,2,2)
|
||||
assert(s == "1234+56.79")
|
||||
s = sta.station_as_string(123456.789, 2, 2)
|
||||
assert s == "1234+56.79"
|
||||
|
||||
s = sta.station_as_string(-123456.789,2,2)
|
||||
assert(s == "-1234+56.79")
|
||||
s = sta.station_as_string(-123456.789, 2, 2)
|
||||
assert s == "-1234+56.79"
|
||||
|
||||
s = sta.station_as_string(123456.789,3,4)
|
||||
assert(s == "123+456.7890")
|
||||
s = sta.station_as_string(123456.789, 3, 4)
|
||||
assert s == "123+456.7890"
|
||||
|
||||
Reference in New Issue
Block a user