package OCADml
Library
Module
Module type
Parameter
Class
Class type
Rounded prism configuration module.
type spec = {
k : float;
(*default curvature used if specific curvatures are
*)None
k_bot : float option;
(*curvature smoothness of bottom edges
*)k_top : float option;
(*curvature smoothness of bottom top
*)k_sides : [ `Flat of float | `Mix of float list ] option;
(*smoothness to be applied flatly to all side edges, or a list specifying a smoothness for each edge (must be same length as corresponding paths)
*)joint_bot : float * float;
(*pair of inwards (into bottom face) and upwards (towards top) joint distances
*)joint_top : float * float;
(*pair of inwards (into top face) and downwards (towards bottom) joint distances
*)joint_sides : [ `Flat of float * float | `Mix of (float * float) list ];
(*pair of backwards and forwards joint distances to be applied flatly to all side edges, or a list specifying joints for each edge (must be same length as corresponding paths)
*)
}
Rounded prism joint and curvature specification.
In general, joint_
parameters are pairs determine the distance away from the edge that curvature begins, and k
parameters set the smoothness of the curvature.
Specifies how holes in the prism should be treated, either relative to the outer shape, or independantly. When multiple holes are present, `Mix
allows each one to be specified separately, to treat all the same, use the other variants directly. Defaults to `Flip
for the prism
and linear_prism
functions.
flip spec
Negate the top and bottom inwards joints (firsts of the joint_bot
and joint_top
pairs) of caps
. These values govern whether the roundover flare inwards (positive when shape is CCW) or outwards (negative when shape is CCW). Since holes (inner paths) have reverse winding compared the outer path, you'll often want to use opposite polarity inward joints.
val spec :
?k:float ->
?k_bot:float ->
?k_top:float ->
?k_sides:[ `Flat of float | `Mix of float list ] ->
?joint_bot:(float * float) ->
?joint_top:(float * float) ->
?joint_sides:[ `Flat of float * float | `Mix of (float * float) list ] ->
unit ->
spec
spec ?k ?k_bot ?k_top ?k_sides ?joint_bot ?joint_top ?joint_sides ()
Construct a spec
with joint distances set to 0.
by default (no rounding), and a default curvature smoothess k = 0.5
.