diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py index db493a3311..feebdf2601 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_curve.py @@ -128,10 +128,6 @@ def _add_segment_to_curve(file: ifcopenshell.file, segment: entity_instance, cur elif segment.DesignParameters.is_a("IfcAlignmentCantSegment") and not curve.is_a("IfcSegmentedReferenceCurve"): raise TypeError(f"Expected to see IfcSegmentedReferenceCurve, instead received '{curve.is_a()}'.") - expected_type = "IfcCompositeCurve" - if not curve.is_a(expected_type): - raise TypeError(f"Expected to see {expected_type}, instead received {curve.is_a()}.") - # map the IfcAlignmentSegment to an IfcCurveSegment (or two in the case of helmert curves) if segment.DesignParameters.is_a("IfcAlignmentHorizontalSegment"): mapped_segments = _map_alignment_horizontal_segment(file, segment) diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_zero_length_segment.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_zero_length_segment.py index 96c3a9c1f2..a64eee9437 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/add_zero_length_segment.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/add_zero_length_segment.py @@ -123,7 +123,8 @@ def add_zero_length_segment(file: ifcopenshell.file, layout: entity_instance, in if layout.is_a("IfcSegmentedReferenceCurve"): ifcopenshell.api.alignment.add_zero_length_segment(file, layout.BaseCurve) elif layout.is_a("IfcGradientCurve"): - ifcopenshell.api.alignment.add_zero_length_segment(file, layout.BaseCurve) + if layout.BaseCurve is not None: + ifcopenshell.api.alignment.add_zero_length_segment(file, layout.BaseCurve) else: zero_length_curve_segment = None