( controls: FourPoints, 
                    subdivisions:int = DEFAULT_SUBDIVISIONS, 
                    extrude_height:float = DEFAULT_EXTRUDE_HEIGHT,
                    show_controls: bool = False,
                    center: bool = True)
return shape
Return an OpenSCAD object representing a closed quadratic Bezier curve.
    If extrude_height == 0, return a 2D `polygon()` object. 
    If extrude_height > 0, return a 3D extrusion of specified height. 
    Note that OpenSCAD won't render 2D & 3D objects together correctly, so pick
    one and use that.
Return an OpenSCAD object representing a closed quadratic Bezier curve.
    If extrude_height == 0, return a 2D `polygon()` object. 
    If extrude_height > 0, return a 3D extrusion of specified height. 
    Note that OpenSCAD won't render 2D & 3D objects together correctly, so pick
    one and use that.
Return an OpenSCAD object representing a closed quadratic Bezier curve . If extrude_height == 0 return a 2D polygon () object . If extrude_height > 0 return a 3D extrusion of specified height . Note that OpenSCAD won t render 2D & 3D objects together correctly so pick one and use that .
def bezier_polygon( controls: FourPoints, 
                    subdivisions:int = DEFAULT_SUBDIVISIONS, 
                    extrude_height:float = DEFAULT_EXTRUDE_HEIGHT,
                    show_controls: bool = False,
                    center: bool = True) -> OpenSCADObject:
    '''
    Return an OpenSCAD object representing a closed quadratic Bezier curve.
    If extrude_height == 0, return a 2D `polygon()` object. 
    If extrude_height > 0, return a 3D extrusion of specified height. 
    Note that OpenSCAD won't render 2D & 3D objects together correctly, so pick
    one and use that.
    '''                
    points = bezier_points(controls, subdivisions)
    # OpenSCAD can'ts handle Point3s in creating a polygon. Convert them to Point2s
    # Note that this prevents us from making polygons outside of the XY plane, 
    # even though a polygon could reasonably be in some other plane while remaining 2D
    points = list((Point2(p.x, p.y) for p in points))
    shape: OpenSCADObject = polygon(points)
    if extrude_height != 0:
        shape = linear_extrude(extrude_height, center=center)(shape)

    if show_controls:
        control_objs = control_points(controls, extrude_height=extrude_height, center=center)
        shape += control_objs
    
    return shape
def bezier_polygon ( controls : FourPoints , subdivisions : int = DEFAULT_SUBDIVISIONS , extrude_height : float = DEFAULT_EXTRUDE_HEIGHT , show_controls : bool = False , center : bool = True ) -> OpenSCADObject : points = bezier_points ( controls , subdivisions ) # OpenSCAD can'ts handle Point3s in creating a polygon. Convert them to Point2s # Note that this prevents us from making polygons outside of the XY plane,  # even though a polygon could reasonably be in some other plane while remaining 2D points = list ( ( Point2 ( p . x , p . y ) for p in points ) ) shape : OpenSCADObject = polygon ( points ) if extrude_height != 0 : shape = linear_extrude ( extrude_height , center = center ) ( shape ) if show_controls : control_objs = control_points ( controls , extrude_height = extrude_height , center = center ) shape += control_objs return shape