Skip to content

Commit

Permalink
fix polygon windows to have proper frame width and jamb thickness
Browse files Browse the repository at this point in the history
  • Loading branch information
BlendingJake committed Jan 16, 2019
1 parent d5823b2 commit 62c1ace
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jv_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,15 @@ def _arch(props, mesh):

@staticmethod
def _polygon(props, mesh):
# TODO: adjust frame_width and jamb_th to work with the angle
geometry_data = []

radius, jamb_w, jamb_th, sides = props.window_radius, props.jamb_width, Units.INCH, props.window_side_count
frame_width, frame_th, inset = props.frame_width, props.frame_thickness, Units.Q_INCH # pane variables
interior_angle = ((sides - 2) * radians(180)) / sides

# adjust so these are the widths/thicknesses perpendicular to the sides
jamb_th /= sin(interior_angle / 2)
frame_width /= sin(interior_angle / 2)

ang_step = Euler((0, radians(360) / sides, 0))
hjamb_w, hframe_th, = jamb_w / 2, frame_th / 2
Expand Down

0 comments on commit 62c1ace

Please sign in to comment.