Skip to content

Instantly share code, notes, and snippets.

@warvariuc
Created March 19, 2022 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save warvariuc/e6db169b837811cdbf51b8bb55fe8180 to your computer and use it in GitHub Desktop.
Save warvariuc/e6db169b837811cdbf51b8bb55fe8180 to your computer and use it in GitHub Desktop.
This script will calculate the chop saw miter and bevel settings for any angle crown molding.
"""
This application will calculate the chop saw miter and bevel settings for any angle crown molding.
https://play.google.com/store/apps/details?id=com.crownking
"""
import math
wall_angle = 90 # Wall angle
sping_angle = 38 # Miter spring angle
sa2 = math.radians(sping_angle)
wa2 = math.radians(wall_angle)
ma = math.atan(math.sin(sa2) / math.tan(wa2 / 2.0))
ba = math.asin(math.cos(sa2) * math.cos(wa2 / 2.0))
ma2 = math.degrees(ma)
ba2 = math.degrees(ba)
print("Answer:")
print("Miter Angle = %.2f" % ma2)
print("Bevel Angle = %.2f" % ba2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment