Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c169c4eeda | |||
| 32b5ef88a1 | |||
| 3a979318ad |
@@ -898,7 +898,7 @@ class Brep(
|
||||
def VerticesValue(self) -> List[Point]:
|
||||
if self.Vertices is None:
|
||||
return None
|
||||
encoded_unit = get_encoding_from_units(self.Vertices[0]._units)
|
||||
encoded_unit = get_encoding_from_units(self.Vertices[0].units)
|
||||
values = [encoded_unit]
|
||||
for vertex in self.Vertices:
|
||||
values.extend(vertex.to_list())
|
||||
@@ -913,7 +913,7 @@ class Brep(
|
||||
|
||||
for i in range(0, len(value), 3):
|
||||
vertex = Point.from_list(value[i : i + 3])
|
||||
vertex._units = units
|
||||
vertex.units = units
|
||||
vertices.append(vertex)
|
||||
|
||||
self.Vertices = vertices
|
||||
|
||||
@@ -11,8 +11,8 @@ from specklepy.api.models import (
|
||||
from specklepy.logging.exceptions import (
|
||||
GraphQLException,
|
||||
SpeckleException,
|
||||
UnsupportedException,
|
||||
)
|
||||
from devtools import debug
|
||||
|
||||
|
||||
@pytest.mark.run(order=3)
|
||||
@@ -201,9 +201,6 @@ class TestStream:
|
||||
def test_stream_activity(self, client: SpeckleClient, stream: Stream):
|
||||
activity = client.stream.activity(stream.id)
|
||||
|
||||
if isinstance(activity, SpeckleException):
|
||||
debug(activity.with_traceback())
|
||||
|
||||
older_activity = client.stream.activity(
|
||||
stream.id, before=activity.items[0].time
|
||||
)
|
||||
|
||||
@@ -388,9 +388,9 @@ def test_brep_curve3d_values_serialization(curve, polyline, circle):
|
||||
def test_brep_vertices_values_serialization():
|
||||
brep = Brep()
|
||||
brep.VerticesValue = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3]
|
||||
assert brep.Vertices[0].get_id() == Point(x=1, y=1, z=1, _units=Units.mm).get_id()
|
||||
assert brep.Vertices[1].get_id() == Point(x=2, y=2, z=2, _units=Units.mm).get_id()
|
||||
assert brep.Vertices[2].get_id() == Point(x=3, y=3, z=3, _units=Units.mm).get_id()
|
||||
assert brep.Vertices[0].get_id() == Point(x=1, y=1, z=1, units=Units.mm).get_id()
|
||||
assert brep.Vertices[1].get_id() == Point(x=2, y=2, z=2, units=Units.mm).get_id()
|
||||
assert brep.Vertices[2].get_id() == Point(x=3, y=3, z=3, units=Units.mm).get_id()
|
||||
|
||||
|
||||
def test_trims_value_serialization():
|
||||
|
||||
Reference in New Issue
Block a user