mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
black .
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user