Parabola
DeclaraCAD supports the Parabola
which is defined with a focal_length
.
# Created in DeclaraCAD
from declaracad.occ.api import *
enamldef Assembly(Part):
Parabola: p1:
color = 'red'
focal_length = 1
Parabola: p2:
color = 'blue'
focal_length = 3
# For reference
Line: xaxis:
color = 'black'
direction = (1, 0)
Line: yaxis:
color = 'black'
direction = (0, 1)
Hyperbola
DeclaraCAD supports the Hyperbola
which is defined with a major_radius
and minor_radius
.
# Created in DeclaraCAD
from declaracad.occ.api import *
enamldef Assembly(Part):
Hyperbola: h1:
color = 'red'
major_radius = 3
minor_radius = 1
Hyperbola: h2:
color = 'blue'
major_radius = 5
minor_radius = 2
# For reference
Line: xaxis:
color = 'black'
direction = (1, 0)
Line: yaxis:
color = 'black'
direction = (0, 1)