Skip to content

Instantly share code, notes, and snippets.

@mangtronix
Created May 5, 2016 10:09
Show Gist options
  • Save mangtronix/ed28522fc48e5d1947d066cb32f81cd4 to your computer and use it in GitHub Desktop.
Save mangtronix/ed28522fc48e5d1947d066cb32f81cd4 to your computer and use it in GitHub Desktop.
Bisect an angle between two lines, for skildall
from FreeCAD import Base
A = Base.Vector(10,3,0)
B = Base.Vector(1,10,0)
C = Base.Vector(0,0,0)
dirCB = B-C
dirCB.normalize()
dirCA = A-C
dirCA.normalize()
dirCc = dirCA + dirCB
dirCc.normalize()
d = 1 # for example
cxcy = dirCc * d + C
Part.show(Part.makeLine(C,B))
Part.show(Part.makeLine(C,A))
Part.show(Part.makeLine(C,cxcy))
@mangtronix
Copy link
Author

screen shot 2016-05-05 at 12 09 54 pm

@mangtronix
Copy link
Author

13131594_10154259288599274_6342813827897613327_o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment