PK_ERROR_code_t PK_EDGE_set_blend_constant
(
--- received arguments ---
int n_edges, --- no. of edges to blend
const PK_EDGE_t edges[], --- edges to have
--- blends set
double radius, --- blend radius
const PK_EDGE_set_blend_constant_o_t *options, --- options structure
--- returned arguments ---
int *const n_blend_edges, --- number of edges with
--- blends set
PK_EDGE_t **const blend_edges --- edges with blends
--- set
)
This function sets edges to have a constant radius blend.
Specific Errors:
PK_ERROR_bad_blend_param illegal combination of blend properties
PK_ERROR_general_body edges are from a general body
Attaches unfixed constant radius blends to a given array of edges.
The argument radius is the radius of the rolling ball and
must be greater than twice the maximum tolerance of all
edges in edges and their associated vertices.
option structure
------ ---------
The option structure allows the caller to control which blend properties are
set.
The option structure allows the following to be set:
cliff_edge
tag of edge at cliff top.
Creates a blend tangent to the face adjacent to the blended edge
and touching the edge at the 'top' of the cliff. This option is
only allowed when n_edges = 1.
properties
properties of blend contained in a PK_blend_properties_t structure.
The fields appropriate to this type of blend are detailed below:
propagate
Blend will be propagated over tangent edges, or past other
unfixed blends if the resultant combination of blends at a
vertex would be invalid, and blending the third edge results
in a valid combination. The default behaviour is no propagation.
Note that if a blend does propagate, and you wish to remove
the resulting blend attributes, PK_EDGE_remove_blend
will need to be passed the edges propagated on to
as well as that of the original edge.
This property is invalid for cliffedge blends.
Overflow: The default overflow behaviour of a blend is as follows;
When fixing a blend, it is possible that the blend as defined by
its basic parameters would lie outside the faces adjacent
to the edge being blended. If this is so, the blend must 'overflow'.
ov_smooth
If the configuration allows us, we `smoothly overflow' and
create a blend one of whose underlying faces is the
one it has overflowed onto.
ov_cliff
If the configuration is unsuitable for smooth overflow,
we try to `cliff overflow' - that is replace the
appropriate section of the blend by a cliffedge blend
running along the appropriate edges.
ov_cliff_end
If the configuration is unsuitable for cliff overflow,
we try to `cliff and overflow' - that is replace the
appropriate section of the blend by a cliffedge blend
at the ends of the appropriate edges.
ov_notch
If the configuration is unsuitable for cliff overflow too,
we will then `notch overflow' - that is, merely trim the blend
by the other faces in the region, leaving its surface geometry
unchanged. If the configuration is unsuitable
for this as well, the blend will not fix.
By default neither cliffedge or smooth overflows will occur when
the edge being overflowed is of the same convexity as the
edge being blended.
By default also, cliffedge overflows will not occur
at the ends of blends, except where they meet another blend smoothly.
Overflow Type | Prevent
--------------------------------------------
SMOOTH | PK_blend_ov_smooth_no_c
CLIFFEDGE | PK_blend_ov_cliff_no_c
NOTCH | PK_blend_ov_notch_no_c
--------------------------------------------
Overflow Type | Allow when Same Convexity
--------------------------------------------
SMOOTH | PK_blend_ov_smooth_any_c
CLIFFEDGE | PK_blend_ov_cliff_any_c
--------------------------------------------
Overflow Type | Allow at End
--------------------------------------------
CLIFFEDGE END | PK_blend_ov_cliff_end_yes_c
--------------------------------------------
Overflow Type | Default
--------------------------------------------
SMOOTH | PK_blend_ov_smooth_diff_c
CLIFFEDGE | PK_blend_ov_cliff_diff_c
CLIFFEDGE END | PK_blend_ov_cliff_end_no_c
NOTCH | PK_blend_ov_notch_yes_c
--------------------------------------------
render_ribs
Whether ribs will be drawn by the rendering functions.
ribspace
The approximate separation of rib lines.
( 0 < ribspace < size )
draw_fix
When draw_fix is PK_LOGICAL_true, the created unfixed blends are
fixed, checked and rendered when required.
Setting draw_fix to PK_LOGICAL_false causes the unfixed blends
to be ignored by PK_BODY_fix_blends, PK_EDGE_check_blends and
PK_TOPOL_render_line, which will all treat the edges as unblended.
For further explanation, and examples, of the use of these tokens,
please refer to the blending section of the manual.
A successful result will produce a new blend attribute. It will return
the edge(s) to which the blend attribute is attached in the array
blend_edges.
See PK_BODY_fix_blends for making the blends a part of the topology.
Note that an unfixed cliffedge blend will be invalidated if stored between
sessions.
This function is not supported for edges on general bodies.