diff --git a/src/blenderbim/blenderbim/tool/model.py b/src/blenderbim/blenderbim/tool/model.py index a4e9295d72..904f7019ed 100644 --- a/src/blenderbim/blenderbim/tool/model.py +++ b/src/blenderbim/blenderbim/tool/model.py @@ -358,7 +358,7 @@ class Model(blenderbim.core.tool.Model): is_closed = False if curve.Segments: for segment in curve.Segments: - if len(segment[0]) == 3: # IfcArcIndex + if segment.is_a("IfcArcIndex"): is_arc = True local_point = cls.convert_unit_to_si(curve.Points.CoordList[segment[0][0] - 1]) global_point = position @ Vector(local_point).to_3d() @@ -368,12 +368,13 @@ class Model(blenderbim.core.tool.Model): cls.vertices.append(global_point) cls.arcs.append([len(cls.vertices) - 2, len(cls.vertices) - 1]) else: - local_point = cls.convert_unit_to_si(curve.Points.CoordList[segment[0][0] - 1]) - global_point = position @ Vector(local_point).to_3d() - cls.vertices.append(global_point) - if is_arc: - cls.arcs[-1].append(len(cls.vertices) - 1) - is_arc = False + for segment_index in segment[0][0:-1]: + local_point = cls.convert_unit_to_si(curve.Points.CoordList[segment_index - 1]) + global_point = position @ Vector(local_point).to_3d() + cls.vertices.append(global_point) + if is_arc: + cls.arcs[-1].append(len(cls.vertices) - 1) + is_arc = False if curve.Segments[0][0][0] == curve.Segments[-1][0][-1]: is_closed = True