All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

SPAkern Class spl_sur

SPAbase.ACIS_OBJECT
  |
  +---SPAkern.subtype_object
    |
    +---SPAkern.subtrans_object
      |
      +---spl_sur
 

Usage: you must use this class as is. You should never derive it.


public class spl_sur

Defines an abstract base class from which spline surface definitions are derived.

Role: In ACIS a sculptured surface is represented by the class spline, which contains a pointer to an internal description called spl_sur. The spl_sur further contains a bs3_surface that is a pointer to a rational or nonrational, nonuniform B-spline surface in the underlying surface package.

To support various types of surface construction, ACIS uses classes derived from the internal representation spl_sur. Also, surface classes can be derived from the derived class to construct more complicated surfaces. This section covers the base class spl_sur along with the methods used to create derived classes, rewritten per their specifications. The section also presents the classes derived from spl_sur and the construction method for them.

This class contains the mathematical definition for a spline surface. It uses use counts to limit copying, and it allows derivation to construct surfaces that are only approximated by the bs3_surface. The base class spl_sur contains the following information for defining the surface:

- A use count indicating the number of times this spl_sur is used.
- A pointer to a bs3_surface, that represents the spline surface.
- A fitting tolerance representing the precision of the spline approximation to the true surface.

Classes derived from spl_sur can contain additional information, and can record the creation method of the true spline surface.

All functions defined for the spline class are supported by virtual functions that depend on the true definition of the surface. The functionality is made virtual to allow the derived surfaces to implement the functionality on their own. For surfaces that have an exact bs3_surface, there is no need to implement the functionality because the methods written for the base class are sufficient.

See also:
discontinuity_info


Constructor and Destructor Index


o spl_sur(SPAinterval&,SPAinterval&,closed_forms,closed_forms,singularity_type,singularity_type)
C++ copy constructor requests memory for this object and populates it with the data from the object supplied as arguments.
o spl_sur(bs3_surface,double)
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.
o spl_sur(spl_sur&)
C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.

Method Index


o closed_u()
Determines if the surface is closed, smoothly or not, in the u-parameter direction.
o closed_v()
Determines if the surface is closed, smoothly or not, in the v-parameter direction.
o copy()
Constructs a duplicate spl_sur in free storage of this object, with a zero use count.
o deep_copy(pointer_map*)
Creates a copy of an item that does not share any data with the original.
o eval(SPApar_pos const&,SPAposition&,SPAvector*,SPAvector*)
Finds the position and the first and second derivatives of the surface at a specified point.
o eval_position(SPApar_pos const&)
Finds the point on the spline with the given parameter value.
o fitol()
Returns the fit tolerance for the approximating bs3_surface.
o get_path()
Returns the sweep path curve for this spl_sur.
o get_path_type()
Returns the sweep path type for this spl_sur.
o get_profile(double)
Returns the sweep profile curve for this spl_sur.
o get_rail()
Returns the sweep rail law for this spl_sur.
o invalidate_cache()
Method to be called by any user who modifies the surface in an external process, to ensure that stale evaluation results are discarded.
o iterate_perp(SPAposition const&,SPAposition&,SPAunit_vector&,surf_princurv&,SPApar_pos const&,SPApar_pos&,logical)
Support function for point_perp (and bs3_surface_perp).
o param_period_u()
Returns the u period of a periodic parametric surface, zero if the surface is not periodic in the u direction.
o param_period_v()
Returns the v period of a periodic parametric surface, zero if the surface is not periodic in the v direction.
o param_range(SPAbox const&)
Returns the principal parameter range of a parametric surface in both u and v-parameter directions.
o param_range_u(SPAbox const&)
Returns the principal parameter range of a parametric surface in the u-parameter direction.
o param_range_v(SPAbox const&)
Returns the principal parameter range of a parametric surface in the v-parameter direction.
o periodic_u()
Determines if a parametric surface is periodic in the u direction.
o periodic_v()
Determines if a parametric surface is periodic in the v direction.
o singular_u(double)
Reports whether the surface parameterization is singular at the specified u-parameter value.
o singular_v(double)
Reports whether the surface parameterization is singular at the specified v-parameter value.
o sur()
Returns the bs3_surface approximation.

Constructor and Destructor


o spl_sur
public spl_sur( const SPAinterval& u_range,
const SPAinterval& v_range,
closed_forms closure_u,
closed_forms closure_v,
singularity_type type_u,
singularity_type type_v)
C++ copy constructor requests memory for this object and populates it with the data from the object supplied as arguments.

Parameters:
u_range
u range.
v_range
v range.
closure_u
type of closure in u.
closure_v
type of closure in v.
type_u
singularity type for u.
type_v
singularity type for v.
o spl_sur
public spl_sur(bs3_surface appr,
double fit= 0 )
C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments.

Parameters:
appr
approximation surface.
fit
fit tolerance.
o spl_sur
public spl_sur( const spl_sur& spl)
C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument.

Parameters:
spl
spline surface.

Methods


o closed_u
public logical closed_u()
Determines if the surface is closed, smoothly or not, in the u-parameter direction.
o closed_v
public logical closed_v()
Determines if the surface is closed, smoothly or not, in the v-parameter direction.
o copy
public virtual subtrans_object * copy()const = 0
Constructs a duplicate spl_sur in free storage of this object, with a zero use count.
o deep_copy
public virtual spl_sur * deep_copy(pointer_map* pm= NULL) const = 0
Creates a copy of an item that does not share any data with the original.

Role: Allocates new storage for all member data and any pointers. Returns a pointer to the copied item.

In a deep copy, all the information about the copied item is self-contained in a new memory block. By comparison, a shallow copy stores only the first instance of the item in memory, and increments the reference count for each copy.

The pointer_map keeps a list of all pointers in the original object that have already been deep copied. For example, a deep_copy of a complex model results in self contained data, but identical sub-parts within the model are allowed to share a single set of data.

Parameters:
pm
list of items within the entity that are already deep copied.
o eval
public virtual void eval(SPApar_pos const& uv,
SPAposition& pos,
SPAvector* dpos,
SPAvector* ddpos)const
Finds the position and the first and second derivatives of the surface at a specified point.

Parameters:
uv
given parameter.
pos
returned point.
dpos
first derivative.
ddpos
second derivative.
o eval_position
public virtual SPAposition eval_position(SPApar_pos const& parameter)const
Finds the point on the spline with the given parameter value.

Parameters:
parameter
given parameter.
o fitol
public double fitol()
Returns the fit tolerance for the approximating bs3_surface.
o get_path
public virtual curve * get_path()
Returns the sweep path curve for this spl_sur.
o get_path_type
public virtual sweep_path_type get_path_type()
Returns the sweep path type for this spl_sur.
o get_profile
public virtual curve * get_profile(double param)
Returns the sweep profile curve for this spl_sur.
Parameters:
param
parameter
o get_rail
public virtual law * get_rail()
Returns the sweep rail law for this spl_sur.
o invalidate_cache
public void invalidate_cache()
Method to be called by any user who modifies the surface in an external process, to ensure that stale evaluation results are discarded.
o iterate_perp
public logical iterate_perp(SPAposition const& pos,
SPAposition& surf,
SPAunit_vector& normal,
surf_princurv& curv,
SPApar_pos const& guess,
SPApar_pos& actual,
logical pt)const
Support function for point_perp (and bs3_surface_perp).

Role: This method finds a true perpendicular given an initial parameter guess, and avoiding oscillations. It may be set to iterate to the nearest perpendicular of any sort (minimum or maximum distance, or inflexion), or to find only minima (which is sometimes more reliable when there are inflexions), and it returns a success or failure indication.

Parameters:
pos
given position.
surf
position on surface.
normal
normal to surface.
curv
principal curvature.
guess
guess parameter.
actual
actual parameter.
pt
TRUE to iterate to a (local) near-point rather than any perpendicular..
o param_period_u
public double param_period_u()
Returns the u period of a periodic parametric surface, zero if the surface is not periodic in the u direction.
o param_period_v
public double param_period_v()
Returns the v period of a periodic parametric surface, zero if the surface is not periodic in the v direction.
o param_range
public SPApar_box param_range(SPAbox const& box= *(SPAbox *)NULL_REF)
Returns the principal parameter range of a parametric surface in both u and v-parameter directions.

Role: For a nonparametric surface, the range is returned as the empty interval or box.

A periodic surface is defined for all parameter values in the periodic direction, by reducing the given parameter modulo the period into this principal range. For a surface open or nonperiodic in the chosen direction the surface evaluation functions are defined only for parameter values in the returned range.

If a box is provided, the parameter range returned may be restricted to a portion of the surface which is guaranteed to contain all portions of the surface that lie within the region of interest. If none is provided, and the parameter range in some direction is unbounded, then conventionally an empty interval is returned.

Parameters:
box
object space box.
o param_range_u
public SPAinterval param_range_u(SPAbox const& box= *(SPAbox *)NULL_REF )
Returns the principal parameter range of a parametric surface in the u-parameter direction.

Role: For a nonparametric surface, the range is returned as the empty interval or box. A periodic surface is defined for all parameter values in the periodic direction, by reducing the given parameter modulo the period into this principal range. For a surface open or nonperiodic in the chosen direction the surface evaluation functions are defined only for parameter values in the returned range.

Parameters:
box
object space box.
o param_range_v
public SPAinterval param_range_v(SPAbox const& box= *(SPAbox *)NULL_REF )
Returns the principal parameter range of a parametric surface in the v-parameter direction.

Role: For a nonparametric surface, the range is returned as the empty interval or box. A periodic surface is defined for all parameter values in the periodic direction, by reducing the given parameter modulo the period into this principal range. For a surface open or nonperiodic in the chosen direction the surface evaluation functions are defined only for parameter values in the returned range.

Parameters:
box
object space box.
o periodic_u
public logical periodic_u()
Determines if a parametric surface is periodic in the u direction.

Role: Determines if a parametric surface is periodic in the u direction. (i.e. it is smoothly closed, so faces can run over the seam).
o periodic_v
public logical periodic_v()
Determines if a parametric surface is periodic in the v direction.

Role: Determines if a parametric surface is periodic in the v direction. (i.e. it is smoothly closed, so faces can run over the seam).
o singular_u
public logical singular_u(double uparam)const
Reports whether the surface parameterization is singular at the specified u-parameter value.

Role: The only singularity recognized is where every value of the nonconstant parameter generates the same object-space point, and these can only occur at the ends of the parameter range as returned by the functions above. A plane is nonsingular in both directions.

Parameters:
uparam
constant u parameter.
o singular_v
public logical singular_v(double vparam)const
Reports whether the surface parameterization is singular at the specified v-parameter value.

Role: The only singularity recognized is where every value of the nonconstant parameter generates the same object-space point, and these can only occur at the ends of the parameter range as returned by the functions above. A plane is nonsingular in both directions.

Parameters:
vparam
constant v parameter.
o sur
public bs3_surface sur()
Returns the bs3_surface approximation.

This object is included in the file: spldef.hxx

Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.