PK_ERROR_code_t PK_EDGE_set_blend_chamfer
(
--- received arguments ---
int n_edges, --- no. of edges to blend
const PK_EDGE_t edges[], --- edges to have
--- blends set
double range_1, --- range on first face
double range_2, --- range on other face
PK_FACE_t *faces, --- faces of first range
--- ( optional )
const PK_EDGE_set_blend_chamfer_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 chamfer 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 chamfer blends to a given array of edges.
The argument range_1 is the range on the left-hand face and range_2
is the other range. range_1 and range_2 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:
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.
tolerance
Sets the tolerance for the blended edge.
The default tolerance is 1000 * modeller resolution.
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_notch
If the configuration is unsuitable for smooth overflow,
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 smooth overflows will not occur when
the edge being overflowed is of the same convexity as the
edge being blended.
Overflow Type | Prevent
--------------------------------------------
SMOOTH | PK_blend_ov_smooth_no_c
NOTCH | PK_blend_ov_notch_no_c
--------------------------------------------
Overflow Type | Allow when Same Convexity
--------------------------------------------
SMOOTH | PK_blend_ov_smooth_any_c
NOTCH | PK_blend_ov_notch_yes_c
--------------------------------------------
Overflow Type | Default
--------------------------------------------
SMOOTH | PK_blend_ov_smooth_diff_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.
This function is not supported for edges on general bodies.