Home

skin_options Class Reference
[Skinning and Lofting]

Sets options for skinning. More...

#include <skin_opts.hxx>

Inheritance diagram for skin_options:

Inheritance graph
[legend]
Collaboration diagram for skin_options:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int get_align () const
 Returns the current value of the align option.
int get_allow_same_uv () const
 Returns the current value of the allow same uv option.
int get_arc_length () const
 Returns the current value of the arc length option.
int get_arc_length_u () const
 Returns the current value of the arc length u option.
int get_closed () const
 Returns the current value of the closed option.
int get_estimate_loft_tanfacs () const
 Returns the current value of the estimate loft tangent factors option.
skin_gap_type get_gap_type () const
 Returns the gap filling type.
guide_curve_preference get_guide_constraint_preference () const
 Returns the current value of the guide curve constraint option.
double get_guide_tol () const
 Get virtual guide tolerance.
int get_match_vertices () const
 Returns the current value of the match vertices option.
int get_merge_wirecoedges () const
 Returns the current value of the merge wire coedges option.
int get_no_new_twist_vertices () const
 Returns the current value of the no new twist option.
int get_no_twist () const
 Returns the current value of the no twist option.
int get_periodic () const
 Returns the current value of the periodic option.
int get_perpendicular () const
 Returns the current value of the perpendicular option.
int get_postprocess_stitch () const
 Returns the current value of the postprocess stitch option.
int get_self_int_test () const
 Returns the current value of the self intersection test option.
int get_simplify () const
 Returns the current value of the simplify option.
double get_smooth_g0_vertices () const
 get smooth g0 vertices angle (in radians).
int get_solid () const
 Returns the current value of the solid option.
int get_virtualGuides () const
 Returns the current value of the virtual guides option.
logical operator!= (skin_options const &in_skin_opt) const
 Tests two options for equality.
logical operator== (skin_options const &in_skin_opt) const
 Determines if two options are equal.
void set_align (int set)
 Sets the value of the align option.
void set_allow_same_uv (int set)
 Sets the value of the allow same uv option.
void set_arc_length (int set)
 Sets the value of the arc length (in V) option.
void set_arc_length_u (int set)
 Sets the value of the arc_length in u option.
void set_closed (int set)
 Sets the value of the closed option.
void set_defaults (int arc_length=FALSE, int no_twist=TRUE, int align=TRUE, int perpendicular=FALSE, int simplify=TRUE, int closed=FALSE, int solid=TRUE, int periodic=FALSE, int virtual_guide_curves=FALSE, int merge=TRUE, int tanfacs=FALSE, int breakup=TRUE, int no_twist_verts=FALSE, guide_curve_preference g_pref=FOLLOW_GUIDE_CONSTRAINT, int same_uv=FALSE, int arc_length_u=FALSE, int postprocess_stitch=FALSE, int set_int_test=TRUE, skin_gap_type gap_type=SKIN_GAP_EXTENDED, double guide_tol=SPAresfit)
 Sets the default value of the options: -1 = unset, 0 = false, and 1 = true.
void set_estimate_loft_tanfacs (int set)
 Sets the value of the estimate loft tanfacs option.
void set_gap_type (skin_gap_type gap_type)
 Sets the gap filling type.
void set_guide_constraint_preference (guide_curve_preference set)
 Sets the value of the guide curve constraint option option.
void set_guide_tol (double tol)
 Set virtual guide tolerance.
void set_match_vertices (int set)
 Sets the value of the match vertices option.
void set_merge_wirecoedges (int set)
 Sets the value of the merge wire coedges option.
void set_no_new_twist_vertices (int set)
 Sets the value of the no new twist vertices option.
void set_no_twist (int set)
 Sets the value of the no twist option.
void set_periodic (int set)
 Sets the value of the periodic option.
void set_perpendicular (int set)
 Sets the value of the perpendicular option.
void set_postprocess_stitch (int set)
 Sets the value of the postprocess stitch option.
void set_self_int_test (int set)
 Sets the value of the self intersection test option.
void set_simplify (int set)
 Sets the value of the simplify option.
void set_smooth_g0_vertices (const double iAngle)
 Set smooth spline curve angle.
void set_solid (int set)
 Sets the value of the solid option.
void set_virtualGuides (int set)
 Sets the value of the virtual guides option.
 skin_options ()
 Default constructor.
 ~skin_options ()
 Default destructor.


Detailed Description

Sets options for skinning.


Role: This class holds various options for the skinning operation. The following lists the options:

arc_length and arc_length_u: The "arc_length" option is used to choose arc length or isoparametric parameterization of the skinning surface. For basic skinning and lofting in isoparametric parameterization, the surface parameter in the V direction follows the cross section curves. For arc length parameterization, the surface parameter follows lines of constant length. The default is isoparametric parameterization. In the case of skinning with guide curves with arc length parameterization - the guide curve is arc length parameterized however the surface is still isoparametric.

The "arc_length_u" option reparameterizes curves of the skinning or lofting profiles to arc length. The default is FALSE for both options.

no twist: This option may be used to minimize the twist of the surface produced. Twist minimization aligns closed curves such that the start of the second curve is aligned to the start of the first curve. Even if a body's shape is unaffected by twisting, a surface with a twist could produce unexpected results when faceting and rendering. The default is TRUE.

align: This option is used to align the direction of the cross section curves such that the normal of the first profile points towards the second profile. All other profiles are aligned to follow the first and second. If the sections are not oriented in the same direction, the align option should be used to avoid producing a twisted, self intersecting body. The default is TRUE.

perpendicular: The take-off vector is a tangent vector going out of the starting edge or surface and into the skinned or lofted surface. The perpendicular option (for lofting only) is used to specify the direction of the take-off vector, perpendicular to the coedge or in the loft direction. (This removes any restriction that the take-off vector for the loft has to be determined by the cross-product of the coedge tangent vector and the surface normal times the tangent factor.) The default is in the loft direction, because a perpendicular take-off vector can cause self-intersections to the surface.

simplify: This option simplifies the surface to a conical surface, if applicable. If all of the cross sections lie on a conical surface (plane, cylinder, cone, sphere, or torus), the conical surface is created instead. The SPAresabs variable is used to determine whether or not the cross section lies on a conical surface. The default is TRUE.

closed: This option may be used when the user needs to construct a solid body closed in V. (i.e., a torus). A solid body will be constructed only when all the wires supplied are closed. At least three profiles must be provided to create a closed body. The default is FALSE.

solid: This option may be used when a solid loft must be constructed but a closed body is not desired. When a closed body is not desired, the end wires are capped with planar faces. The default is TRUE. This option is forced to FALSE when skinning or lofting from faces or if the postprocess stitch option is TRUE.

periodic: This option allows the construction of loft bodies that are periodic in V, i.e., bodies that close back on themselves smoothly (continuously) at the start and end profiles. This option is activated in the skinning APIs by giving the closed option a value of 2. In Scheme, this is achieved by setting the periodic flag to TRUE. As for the closed option, at least three profiles must be supplied to create a periodic loft body. The default is FALSE.

virtual guide: This option may be used in order to have the user defined guides affect the body in a global nature. The default is FALSE.

merge_wirecoedges: When this option is set to TRUE, the G1 vertices of the skinning and lofting wire profiles are removed by merging adjacent coedges/edges. This improves operations such as blending and shelling as it reduces the coedge/edge count and the number of surfaces, and eliminates near tangent edges. The default is TRUE.

estimate_loft_tanfacs: When this option is on, the weight factor for the tangency conditions of the loft will be determined such that it minimizes the average radius of curvature of the lofting surfaces. The resulting bodies should support shelling to greater thickness and also blending of their edges to larger blend radii. The default is FALSE.

match_vertices: This option suppresses the vertex-matching-algorithm which ensures that all profiles consist of the same number of coedges. A heuristic approach is used to determine which vertex pairs are good matches. Profile coedges are then split where additional vertices are needed. This option is forced to TRUE if the coedge numbers of the profiles are not equal. Its default is TRUE.

guide_curve_preference: This is an enumerated type with two possible values, FOLLOW_GUIDE_CONSTRAINT and FOLLOW_TANGENT_CONSTRAINT. This option is used to specify how an overconstrained guide is resolved. If the type FOLLOW_GUIDE_CONSTRAINT is set, then the resulting lofting surface will always stay with the defining guide curve. If the FOLLOW_TANGENT_CONSTRAINT is specified, then the lofting surface will always follow the tangent constraint. Default is FOLLOW_GUIDE_CONSTRAINT.

no_new_twist_vertices: The algorithm that minimizes the surface twist may add vertices to some of the profiles if none of the existing vertices match well. This option allows the user to force the algorithm to choose matching vertices from the existing vertices. The default is FALSE.

allow_same_uv: This option allows surfaces with the same u & v direction to be created. If the option is TRUE and a surface with the same u & v direction is created, a warning will be thrown. If FALSE, an error will be thrown.
Note: if this option is set TRUE and a surface with the same u & v direction is created, later modeling problems may appear.

self_int_test: This option checks for a self intersecting skin surfaces. Commonly self-intersecting skin surfaces can be made based on poor tangent factor magnitudes, poor profiles, or an incorrect usage of the perpendicular option. The default is TRUE. If FALSE the check will not be made and a body will be built however later modeling problems may appear.

postprocess_stitch: This option stitches the resulting lofting body to the original bodies inwhich it's coedge definition came from. This option only works with api_loft_coedges (lofting) and not with any skinning operation (api_skin_wires). It is identical in nature to the stitching operation performed in api_loft_faces. The default is TRUE.

gap_type: This option specifies the type of gap to be placed between the new faces. The type can be "extended" (extending the surfaces and intersecting), "rounded" (tangent surface to both lateral faces), or "chamfered" (a linear fill between both lateral faces). Presently, the gap types "rounded" and "chamfered" are available only when there are two profile curves specified for skinning. If more than two profile curves are specified, then the gap type (if different from "extended") is changed to "extended" and a warning is issued. When the "chamfered" or "rounded" corners option is used, the two neighboring surfaces of the gap must not have a partial intersection. In the case of any gap failure, the skin operation will re-try the gap algorithm in the following order: "extended", "rounded", and then "chamfered". A warning is issued if the gap type is changed.



guide_tol: Specifies the tolerance in distance at the intersecting point between the wire bodies and the virtual guide curves.


Constructor & Destructor Documentation

skin_options::skin_options (  ) 

Default constructor.

skin_options::~skin_options (  ) 

Default destructor.


Member Function Documentation

int skin_options::get_align (  )  const

Returns the current value of the align option.

int skin_options::get_allow_same_uv (  )  const

Returns the current value of the allow same uv option.

int skin_options::get_arc_length (  )  const

Returns the current value of the arc length option.

int skin_options::get_arc_length_u (  )  const

Returns the current value of the arc length u option.

int skin_options::get_closed (  )  const

Returns the current value of the closed option.

int skin_options::get_estimate_loft_tanfacs (  )  const

Returns the current value of the estimate loft tangent factors option.

skin_gap_type skin_options::get_gap_type (  )  const

Returns the gap filling type.

guide_curve_preference skin_options::get_guide_constraint_preference (  )  const

Returns the current value of the guide curve constraint option.

double skin_options::get_guide_tol (  )  const

Get virtual guide tolerance.

int skin_options::get_match_vertices (  )  const

Returns the current value of the match vertices option.

int skin_options::get_merge_wirecoedges (  )  const

Returns the current value of the merge wire coedges option.

int skin_options::get_no_new_twist_vertices (  )  const

Returns the current value of the no new twist option.

int skin_options::get_no_twist (  )  const

Returns the current value of the no twist option.

int skin_options::get_periodic (  )  const

Returns the current value of the periodic option.

int skin_options::get_perpendicular (  )  const

Returns the current value of the perpendicular option.

int skin_options::get_postprocess_stitch (  )  const

Returns the current value of the postprocess stitch option.

int skin_options::get_self_int_test (  )  const

Returns the current value of the self intersection test option.

int skin_options::get_simplify (  )  const

Returns the current value of the simplify option.

double skin_options::get_smooth_g0_vertices (  )  const

get smooth g0 vertices angle (in radians).

int skin_options::get_solid (  )  const

Returns the current value of the solid option.

int skin_options::get_virtualGuides (  )  const

Returns the current value of the virtual guides option.

logical skin_options::operator!= ( skin_options const &  in_skin_opt  )  const

Tests two options for equality.



Parameters:
in_skin_opt option.

logical skin_options::operator== ( skin_options const &  in_skin_opt  )  const

Determines if two options are equal.



Parameters:
in_skin_opt option.

void skin_options::set_align ( int  set  ) 

Sets the value of the align option.



Parameters:
set value.

void skin_options::set_allow_same_uv ( int  set  ) 

Sets the value of the allow same uv option.



Parameters:
set value.

void skin_options::set_arc_length ( int  set  ) 

Sets the value of the arc length (in V) option.



Parameters:
set value.

void skin_options::set_arc_length_u ( int  set  ) 

Sets the value of the arc_length in u option.



Parameters:
set value.

void skin_options::set_closed ( int  set  ) 

Sets the value of the closed option.



Parameters:
set value.

void skin_options::set_defaults ( int  arc_length = FALSE,
int  no_twist = TRUE,
int  align = TRUE,
int  perpendicular = FALSE,
int  simplify = TRUE,
int  closed = FALSE,
int  solid = TRUE,
int  periodic = FALSE,
int  virtual_guide_curves = FALSE,
int  merge = TRUE,
int  tanfacs = FALSE,
int  breakup = TRUE,
int  no_twist_verts = FALSE,
guide_curve_preference  g_pref = FOLLOW_GUIDE_CONSTRAINT,
int  same_uv = FALSE,
int  arc_length_u = FALSE,
int  postprocess_stitch = FALSE,
int  set_int_test = TRUE,
skin_gap_type  gap_type = SKIN_GAP_EXTENDED,
double  guide_tol = SPAresfit 
)

Sets the default value of the options: -1 = unset, 0 = false, and 1 = true.



Role: This method leaves most of the options as unset. When it is passed into an individual API, that API sets them, because APIs may have different default values for the same option.

Parameters:
arc arc length.
ntw no twist.
ali align.
perp perpendicular.
sim simplify.
clo closed.
sol solid.
pdc periodic.
vGs virtual guides.
merge merge wirecoedges.
tanfacs estimate loft tanfacs.
breakup match vertices.
no_twist_verts no new twist vertices.
same_uv same uv.
arc_length_u arc length u.
g_pref guide curve preference.
gap_type How to fill up the lateral gaps.
guide_tol Maximum intersection distance between virtual guide curves and wires.
smooth_g0_vertices Maximum smooth angle (in radians) beween two tangent vectors from two connected spline curve at a g0 vertex

void skin_options::set_estimate_loft_tanfacs ( int  set  ) 

Sets the value of the estimate loft tanfacs option.



Parameters:
set value.

void skin_options::set_gap_type ( skin_gap_type  gap_type  ) 

Sets the gap filling type.



Parameters:
gap_type Gap can be extended, rounded or chamfered.

void skin_options::set_guide_constraint_preference ( guide_curve_preference  set  ) 

Sets the value of the guide curve constraint option option.



Parameters:
set value.

void skin_options::set_guide_tol ( double  tol  ) 

Set virtual guide tolerance.



Parameters:
tol Tolerance, default is SPAresfit.

void skin_options::set_match_vertices ( int  set  ) 

Sets the value of the match vertices option.



Parameters:
set value.

void skin_options::set_merge_wirecoedges ( int  set  ) 

Sets the value of the merge wire coedges option.



Parameters:
set value.

void skin_options::set_no_new_twist_vertices ( int  set  ) 

Sets the value of the no new twist vertices option.



Parameters:
set value.

void skin_options::set_no_twist ( int  set  ) 

Sets the value of the no twist option.



Parameters:
set value.

void skin_options::set_periodic ( int  set  ) 

Sets the value of the periodic option.



Parameters:
set value.

void skin_options::set_perpendicular ( int  set  ) 

Sets the value of the perpendicular option.



Parameters:
set value.

void skin_options::set_postprocess_stitch ( int  set  ) 

Sets the value of the postprocess stitch option.



Parameters:
set value.

void skin_options::set_self_int_test ( int  set  ) 

Sets the value of the self intersection test option.



Parameters:
set value.

void skin_options::set_simplify ( int  set  ) 

Sets the value of the simplify option.



Parameters:
set value.

void skin_options::set_smooth_g0_vertices ( const double  iAngle  ) 

Set smooth spline curve angle.



Parameters:
iAngle Maximum smooth angle beween two tangent vectors from two connected spline curve at a g0 vertex

void skin_options::set_solid ( int  set  ) 

Sets the value of the solid option.



Parameters:
set value.

void skin_options::set_virtualGuides ( int  set  ) 

Sets the value of the virtual guides option.



Parameters:
set value.