diff --git a/src/ifc5d/ifc5d/csv2ifc.py b/src/ifc5d/ifc5d/csv2ifc.py index ca046709e0..7017ff4d48 100644 --- a/src/ifc5d/ifc5d/csv2ifc.py +++ b/src/ifc5d/ifc5d/csv2ifc.py @@ -51,7 +51,7 @@ class CsvHeader(TypedDict): # Assigning rates RateSchedule: NotRequired[str] - RateID : NotRequired[str] + RateID: NotRequired[str] # Currently we assume that if column is not part of the main header, diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py index cc8411aa8c..05a01e8ee2 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/_add_segment_to_layout.py @@ -107,7 +107,7 @@ def _add_segment_to_layout(file: ifcopenshell.file, layout: entity_instance, seg y = float(end[1, 3]) / unit_scale dx = float(end[0, 0]) dy = float(end[1, 0]) - zero_length_segment.DesignParameters.StartPoint.Coordinates = (x,y) + zero_length_segment.DesignParameters.StartPoint.Coordinates = (x, y) zero_length_segment.DesignParameters.StartDirection = dy / dx elif zero_length_segment.DesignParameters.is_a("IfcAlignmentVerticalSegment"): y = float(end[1, 3]) / unit_scale diff --git a/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py b/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py index 65391d4059..556c43a094 100644 --- a/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py +++ b/src/ifcpatch/ifcpatch/recipes/PatchStationReferentPosition.py @@ -23,20 +23,20 @@ class Patcher(ifcpatch.BasePatcher): def patch(self): patched_file = ifcopenshell.file.from_string(self.file.wrapped_data.to_string()) - + alignments = patched_file.by_type("IfcAlignment") for alignment in alignments: basis_curve = ifcopenshell.api.alignment.get_basis_curve(alignment) nests = alignment.IsNestedBy first_referent = nests[1].RelatedObjects[0] - start_station = ifcopenshell.util.element.get_pset(first_referent,"Pset_Stationing","Station") - #start_station = first_referent.IsDefinedBy[0].RelatingPropertyDefinition.HasProperties[0].NominalValue.wrapped_data # get station from first_referent + start_station = ifcopenshell.util.element.get_pset(first_referent, "Pset_Stationing", "Station") + # start_station = first_referent.IsDefinedBy[0].RelatingPropertyDefinition.HasProperties[0].NominalValue.wrapped_data # get station from first_referent for referent in nests[1].RelatedObjects: if referent.ObjectPlacement == None: # Need to get Station property from Pset_Stationing + Station property from the first referent... the DistanceAlong is the different in these values - station = ifcopenshell.util.element.get_pset(referent,"Pset_Stationing","Station") - #station = referent.IsDefinedBy[0].RelatingPropertyDefinition.HasProperties[0].NominalValue.wrapped_data # get station from current referent + station = ifcopenshell.util.element.get_pset(referent, "Pset_Stationing", "Station") + # station = referent.IsDefinedBy[0].RelatingPropertyDefinition.HasProperties[0].NominalValue.wrapped_data # get station from current referent object_placement = patched_file.createIfcLinearPlacement( RelativePlacement=patched_file.createIfcAxis2PlacementLinear( Location=patched_file.createIfcPointByDistanceExpression( @@ -47,7 +47,7 @@ class Patcher(ifcpatch.BasePatcher): BasisCurve=basis_curve, ) ), - ) + ) referent.ObjectPlacement = object_placement