How to connect two walls using ifcOpenShell
Hi,
How can I connect two walls that I created using IfcOpenShell?
I saw some code doing this in the IfcOpenHouse tutorial. However I still have some questions:
connection_args = {'relating_connection': 'ATEND', 'related_connection': 'ATSTART'}
rel_connect_paths = [
ios.geometry.connect_path(
file, relating_element=south_wall, related_element=east_wall, **connection_args
),
ios.geometry.connect_path(
file, relating_element=east_wall, related_element=north_wall, **connection_args
),
ios.geometry.connect_path(
file, relating_element=north_wall, related_element=west_wall, **connection_args
),
ios.geometry.connect_path(
file, relating_element=west_wall, related_element=south_wall, **connection_args
)
]
point_list = file.create_entity('IfcCartesianPointList2D', CoordList = [[-1., -1.], [1., 1.]])
curve_on_relating = file.create_entity('IfcIndexedPolyCurve', Points=point_list)
connection_curve = file.create_entity(
'IfcConnectionCurveGeometry', CurveOnRelatingElement=curve_on_relating
)
for path in rel_connect_paths:
path.ConnectionGeometry = connection_curve
I think I understand the connect_path
part. However I still have some questions about the other stuff.
What is the role of the point_list
and its following use?
Why are the points [-1, -1], [1, 1]
chosen?
How would the resulting diagonal line connect two walls?
Would I have to choose different points if the walls would not meet at a 90° angle? If so How would I compute them?
Tanks