mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
shapebuilder - replace y extrusion args with shortcut for readibility
This commit is contained in:
@@ -274,9 +274,7 @@ class FilledOpeningGenerator:
|
||||
get_curve_2d_from_3d(profile),
|
||||
magnitude=thickness / unit_scale,
|
||||
position=Vector([0.0, -thickness * 0.5 / unit_scale, 0.0]),
|
||||
position_x_axis=Vector((1, 0, 0)),
|
||||
position_z_axis=Vector((0, -1, 0)),
|
||||
extrusion_vector=Vector((0, 0, -1)),
|
||||
**shape_builder.extrude_kwargs("Y")
|
||||
)
|
||||
return shape_builder.get_representation(context, [extrusion])
|
||||
|
||||
@@ -309,9 +307,7 @@ class FilledOpeningGenerator:
|
||||
shape_builder.rectangle(size=opening_size),
|
||||
magnitude=thickness / unit_scale,
|
||||
position=opening_position,
|
||||
position_z_axis=Vector((0.0, -1.0, 0.0)),
|
||||
position_x_axis=Vector((1.0, 0.0, 0.0)),
|
||||
extrusion_vector=Vector((0.0, 0.0, -1.0)),
|
||||
**shape_builder.extrude_kwargs("Y")
|
||||
)
|
||||
|
||||
return shape_builder.get_representation(context, [extrusion])
|
||||
|
||||
@@ -68,9 +68,7 @@ def update_simple_openings(element, opening_width, opening_height):
|
||||
shape_builder.rectangle(size=Vector([opening_width, 0.0, opening_height]).xz),
|
||||
magnitude=thickness / unit_scale,
|
||||
position=Vector([0.0, -0.1 / unit_scale, 0.0]),
|
||||
position_x_axis=V(1, 0, 0),
|
||||
position_z_axis=V(0, -1, 0),
|
||||
extrusion_vector=V(0, 0, -1),
|
||||
**shape_builder.extrude_kwargs("Y")
|
||||
)
|
||||
|
||||
new_representation = shape_builder.get_representation(context, extrusion)
|
||||
|
||||
@@ -1134,8 +1134,7 @@ class LibraryGenerator:
|
||||
back_wall_extruded = builder.extrude(
|
||||
back_wall,
|
||||
back_wall_depth + back_wall_border_mask_depth,
|
||||
position_z_axis=V(0, -1, 0),
|
||||
extrusion_vector=V(0, 0, -1),
|
||||
**builder.extrude_kwargs("Y")
|
||||
)
|
||||
items_3d_to_center.append(back_wall_extruded)
|
||||
|
||||
|
||||
@@ -66,9 +66,7 @@ def create_ifc_door_lining(
|
||||
door_lining = builder.extrude(
|
||||
door_lining,
|
||||
size.y,
|
||||
position_x_axis=V(1, 0, 0),
|
||||
position_z_axis=V(0, -1, 0),
|
||||
extrusion_vector=V(0, 0, -1),
|
||||
**builder.extrude_kwargs("Y")
|
||||
)
|
||||
builder.translate(door_lining, position)
|
||||
|
||||
|
||||
@@ -59,10 +59,8 @@ def create_ifc_window_frame_simple(
|
||||
return builder.extrude(
|
||||
profile,
|
||||
size.y,
|
||||
position_x_axis=V(1, 0, 0),
|
||||
position_z_axis=V(0, -1, 0),
|
||||
extrusion_vector=V(0, 0, -1),
|
||||
position=position,
|
||||
**builder.extrude_kwargs("Y")
|
||||
)
|
||||
|
||||
# if all lining sides are present then we can just use two rectangles
|
||||
@@ -212,10 +210,8 @@ def create_ifc_window(
|
||||
glass = builder.extrude(
|
||||
glass_rect,
|
||||
glass_thickness,
|
||||
position_x_axis=V(1, 0, 0),
|
||||
position_z_axis=V(0, -1, 0),
|
||||
extrusion_vector=V(0, 0, -1),
|
||||
position=glass_position,
|
||||
**builder.extrude_kwargs("Y")
|
||||
)
|
||||
|
||||
output_items = [lining_items, frame_extruded_items, [glass]]
|
||||
|
||||
Reference in New Issue
Block a user