 |
PK_EDGE_set_blend_chain_o_t |
|
struct PK_EDGE_set_blend_chain_o_s
{
int o_t_version; --- options struct version
PK_blend_xs_shape_t xs_shape; --- cross-section shape
--- (PK_blend_xs_shape_conic_c)
--- [PF]
int n_positions; --- number of given positions (0)
PK_VECTOR_t *positions; --- positions where the blend
--- parameters apply (NULL)
double *primary_sizes; --- size parameter array on
--- primary side of blend (NULL)
--- [PF]
double *secondary_sizes; --- size parameter array on
--- secondary side of blend (NULL)
--- [PF]
double *rhos; --- array of rho values (NULL)
--- [NF]
PK_blend_size_t primary_size_type;
--- interpretation of
--- 'primary_sizes'
--- (PK_blend_size_face_offset_c)
PK_blend_size_t secondary_size_type;
--- interpretation of
--- 'secondary_sizes'
--- (PK_blend_size_face_offset_c)
PK_blend_rho_t rho_type; --- interpretation of rho values
--- (PK_blend_rho_absolute_c) [NF]
int n_primary_fins; --- number of primary fins (0)
PK_FIN_t *primary_fins; --- fins identifying primary side
--- of the blend (NULL)
int n_mitre_fins; --- length of 'mitre_fins' array
--- (0)
PK_FIN_t *mitre_fins; --- array of fins indicating how
--- to handle coincident positions
--- (NULL)
int *mitre_fins_indices;
--- indices in 'positions' to
--- which the 'mitre_fins' pertain
--- (NULL)
int n_clamp_indices; --- length of 'clamp_indices' (0)
int *clamp_indices; --- indices in 'positions' at
--- which to hold the parameters'
--- rates of change at zero (NULL)
PK_blend_ov_smooth_t ov_smooth; --- control smooth overflow
--- (PK_blend_ov_smooth_diff_c)
--- [PF]
PK_blend_ov_cliff_t ov_cliff; --- control cliff edge overflow
--- (PK_blend_ov_cliff_diff_c)
--- [PF]
PK_blend_ov_cliff_end_t ov_cliff_end; --- control cliff edge end
--- overflow
--- (PK_blend_ov_cliff_end_no_c)
--- [NF]
PK_blend_ov_notch_t ov_notch; --- control notch overflow
--- (PK_blend_ov_notch_yes_c)
double tolerance; --- tolerance for blend surfaces
--- (1.0e-5)
};
typedef struct PK_EDGE_set_blend_chain_o_s PK_EDGE_set_blend_chain_o_t;
Holds optional controls for setting blends on a chain of edges.
Used in:
PK_EDGE_set_blend_chain
Description of fields:
'xs_shape'
This option controls the cross-sectional shape of the blend. It may be
set to PK_blend_xs_shape_conic_c for a blend with a circular or conic
cross-section, PK_blend_xs_shape_g2_c for a curvature-continuous
cross-section, or PK_blend_xs_shape_chamfer_c for a linear
cross-section.
If this option is set to PK_blend_xs_shape_g2_c, 'rho_type' must be
set to PK_blend_rho_absolute_c, 'ov_cliff' must be set to
PK_blend_ov_cliff_no_c and 'ov_cliff_end' must be set to
PK_blend_ov_cliff_end_no_c.
If this option is set to PK_blend_xs_shape_chamfer_c, 'n_positions'
must be exactly 2. Both members of 'primary_sizes' should be equal and
should also equal both members of 'secondary_sizes', if not NULL.
This option must be set to either PK_blend_xs_shape_conic_c or
PK_blend_xs_shape_chamfer_c for facet geometry. If set to
PK_blend_xs_shape_conic_c then 'n_positions' must be exactly 2, both
members of 'primary_sizes' should be equal and, if not NULL, should
also equal both members of 'secondary_sizes'.
'n_positions'
The number of positions at which to specify numerical blend parameters
(i.e. 'primary_sizes', 'secondary_sizes' and 'rhos', when supplied)
along the blend chain. This number should be at least 2.
'positions'
An array of PK_VECTOR_t specifying where the blend parameters with the
same array index apply along the blend chain. The length of this array
should be 'n_positions'. All positions specified here should lie on an
edge in the chain. If the edge chain is open, one position should be at
the start of the chain, and another at the end of the chain. If the
chain is closed and only two positions are specified, then these
positions may be equal provided their associated sizes are also
equal.
A position may occur twice at a vertex between two of the edges in the
chain provided that:
1. the two edges do not meet smoothly at the vertex; and
2. there are entries in 'mitre_fins' and 'mitre_fins_indices' to
indicate on which of the two edges the associated parameters apply.
'primary_sizes'
The blend's range as defined by 'primary_size_type' on the primary
side of the blend (if identified using 'primary_fins'), or both sides
if the blend is symmetric. For a symmetric blend, only this size array
needs to be given. This array's length should be 'n_positions'.
'secondary_sizes'
As 'primary_sizes', except for the secondary side of the blend (as
identified by 'primary_fins'). This may be set to NULL, in which case
the blend will be created as if this array were the same as
'primary_sizes' (i.e., a symmetric blend). If 'secondary_sizes' is not
NULL, then its length must be 'n_positions', and 'primary_sizes' and
'primary_fins' must also be specified.
'rhos'
An array of blend rho parameters. If specified, this array should have
length 'n_positions' and the same index convention as 'primary_sizes'.
This may be set to NULL, in which case the blend will be created as
if all of this array's entries were 0.0.
The rhos must either be all zero, or all be greater than zero. If
'rho_type' is set to PK_blend_rho_absolute_c or PK_blend_rho_relative_c
then all the rhos should be less than one.
When setting a blend with the 'xs_shape' option set to
PK_blend_xs_shape_conic_c, if the primary and secondary sizes at each
position are equal and all rhos are zero, then the blend will have
circular cross section. Otherwise the blend will have conic cross-
section.
When setting a blend with the 'xs_shape' option set to
PK_blend_xs_shape_g2_c, if all rhos are zero, the cross-section will be
curvature-continuous with automatic depth control. Otherwise, the rhos
are taken to specify the depth of the curvature-continuous blend
cross-section.
When setting a blend with 'xs_shape' option set to
PK_blend_xs_shape_chamfer_c 'rhos' must be set to NULL.
'primary_size_type'
'secondary_size_type'
These options control how the sizes given in 'primary_sizes' and
'secondary_sizes' are interpreted. For non-default values, these
options control the interpretation of chamfer blends.
If set to PK_blend_size_face_offset_c then the size represents the
blend's offset range from the underlying surface on that side.
If set to PK_blend_size_apex_range_c then the size represents the range
between the contact point on that side and the blend's apex.
If set to PK_blend_size_angle_c then the size represents the angle made
by the chord between the contact points and the tangent plane of the
contact point on the other side. The values in this size array must
then be between 0 and pi.
Valid combinations of 'primary_size_type' and 'secondary_size_type' can
be found in the below table.
-------------------------------------------------------------------
| 'primary_size_type' | 'secondary_size_type' |
-------------------------------------------------------------------
| PK_blend_size_face_offset_c | PK_blend_size_face_offset_c |
| | |
| PK_blend_size_apex_range_c | PK_blend_size_apex_range_c |
| | |
| PK_blend_size_apex_range_c | PK_blend_size_angle_c |
| | |
| PK_blend_size_angle_c | PK_blend_size_apex_range_c |
-------------------------------------------------------------------
If 'primary_size_type' and 'secondary_size_type' are both set to
either PK_blend_size_face_offset_c or PK_blend_apex_range_c, then
'secondary_sizes' may be set to NULL and the blend will be symmetric.
If these options are set to any value other than
PK_blend_size_face_offset_c then 'xs_shape' must be set to
PK_blend_xs_shape_chamfer_c.
If these options are set to any value other than
PK_blend_size_face_offset_c and the chain contains a mixed edge then
'ov_smooth' must be set to PK_blend_ov_smooth_no_c.
See here for more information.
For positions on the interior of an open chain, or anywhere on a closed
chain, the corresponding elements of 'primary_sizes' and 'secondary_sizes'
must be greater than zero. For a position at the start or end of an open
chain, the corresponding member of 'primary_sizes' may be set to zero; if
'secondary_sizes' is given, the corresponding element must also be zero.
If an open chain's sizes are zero at both ends, at least one positive size
must be specified somewhere in the interior of the chain. If 'xs_shape' is
set to PK_blend_xs_shape_chamfer_c and 'size_type' is
PK_blend_size_face_offset_c then the sizes can be negative.
'rho_type'
This option controls how 'rhos' is interpreted when creating conic-
shaped blends.
If 'rho_type' is set to PK_blend_rho_absolute_c, 'rhos' are independent
of the angle subtended by the blend.
If 'rho_type' is set to PK_blend_rho_relative_c, 'rhos' are relative to
the angle subtended by the blend. For example, a relative rho value of
0.5 will produce a circular or least tension elliptical conic, while an
absolute rho value of 0.5 will produce a parabolic conic.
If 'rho_type' is set to PK_blend_rho_centre_c, the 'rhos' are the radii
of curvature at the centre of the conic blend cross-section.
'n_primary_fins'
The length of 'primary_fins'. This may be 0 only for blends with
symmetric cross-sections; otherwise it must be 1 or greater.
'primary_fins'
This option identifies the primary side of the blend chain by
specifying fins lying on that side. Any number of fins may be given,
but at least one of these fins should be on an edge in the blended
edge chain. They should all lie on the same side of the chain; if fins
are supplied from both sides, PK_ERROR_bad_orientation will be
returned.
This option is used to determine the shape of blends with asymmetric
cross sections (i.e. where 'secondary_sizes' is non-NULL and differs
from 'primary_sizes') and only required to be supplied in such cases;
otherwise it may be NULL.
PK_EDGE_set_blend_chain propagates these fins along the whole of the
chain, and returns the complete list via its 'primary_fins' argument.
'n_mitre_fins'
The length of 'mitre_fins'.
'mitre_fins'
An array of fins indicating how to apply the blend parameters at a
vertex where edges in the chain do not meet smoothly (where two
different blend parameters might be specified). mitre_fins[i] should
point towards the vertex at positions[mitre_fins_indices[i]], and be
attached to an edge in the chain at that vertex. The parameters with
index mitre_fins_indices[i] apply to mitre_fin[i]'s side of the
vertex.
All members of 'mitre_fins' should be unique.
Each (position, mitre_fin) pair should be unique across the chain. If
an entry in 'positions' is unique, a mitre fin should not be specified.
If all elements of 'positions' are unique, the array 'mitre_fins'
itself may be NULL, and 'n_mitre_fins' set to 0.
'mitre_fins_indices'
An array of integers of length 'n_mitre_fins'. mitre_fins_indices[i]
should contain the index in 'positions' (see above) of where
mitre_fins[i] ends, which is also the index of the size and rho
parameters that apply on the side of the vertex where mitre_fins[i]
lies.
All members of 'mitre_fins_indices' should be unique, and they should
be in pairs correponding to common GEOMETRICAL positions in
'positions'.
'n_clamp_indices'
The length of 'clamp_indices'.
'clamp_indices'
An array of integers of length 'n_clamp_indices'. clamp_indices[i]
should contain the index in 'positions' (see above) of where the rate
of change of the blend parameters is to be held at zero.
Overflow properties: When fixing a blend, it is possible that the blend as
defined by its 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 onto which it has
overflowed.
This option must be set to either PK_blend_ov_smooth_no_c or
PK_blend_ov_smooth_any_c for facet geometry.
'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.
This option must be set to PK_blend_ov_cliff_no_c for facet geometry.
'ov_cliff_end'
If the configuration is unsuitable for cliff overflow, we try to
"cliff-end 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 nor 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.
Further information on the `ov_*' fields' values may be found in the
documentation for their respective `PK_blend_ov_*_t' types.
'tolerance'
Sets the tolerance for the blend surfaces. The default tolerance is
1000 * (modeller resolution).