gsnlib < products < home

 

related links

 

GSNLib™ - The General Surface Library1

Product Overview

The General Surface Library (GSNLib) is an object-oriented software toolkit that provides a set of objects and corresponding methods to create, edit, query, and analyze geometric representations. The representation domain includes points, vectors, curves, and surfaces. Please note that trimmed surfaces and solids are in the domain of the Solid Modeling Library (SMLib). The geometry representations supported by GSNLib are commonly used in the development of 2-D and 3-D applications in CAD, Simulation, Graphics, Web Development, Animation, Game Development, and Medical Modeling. Most of the objects supported by GSNLib correspond to IGES Entities and/or STEP Part 42 Objects. The principle public geometric classes are as follows:

  • Base class of all curve classes.
  • Representation of a NURBS curve.
  • Representation of a composite curve.
  • Representation of a 3D curve defined by mean of a 2D curve in the parameter space of a surface multi-user site license that allows the licensee to ship.
  • Base class of all surface classes.
  • Representation of a NURBS surface.
  • Procedural offset surface defined as a base surface plus an offset distance.
  • To provide equivalent functionality with superior reliability and/or performance relative to that found in a users existing NURBS library.
  • To provide a framework for extensibility by enabling developers to create application-specific geometry and solvers.

These classes support a wide variety of query and analysis methods. The most commonly used methods in GSNLib include:

  • Evaluation - curve/surface - points, derivatives, geometric properties
  • Intersection - point/curve, curve/curve, point/surface, curve/surface, surface/surface, curve and surface self-intersection
  • Minimization/Maximization/Normalization (and many other measurements) - point/curve/surface to point/curve/surface
  • Offsetting - single curve, composite curve with trimming, procedural for surface
  • Dropping and Lifting Curves - 3D curve into surface parameter space and surface parameter space up to 3D
  • Analysis - inflection points, curve length, surface area, minimum and maximum derivatives, silhouette points

In addition to the native functionality, GSNLib offers an Object-Oriented Extensibility Framework that should allow developers to extend both the geometric coverage and the numerical algorithms. GSNLib is designed to be sufficiently robust for demanding geometric modeling applications, efficient enough for performance intensive graphics applications, and easy to use from a programming point of view.

Key Benefits

Back To Top
Component Software Technology

GSNLib is specifically designed to serve as a component of a larger software system. It is built using modern object-oriented technology. It provides the following to simplify integration:

  • A consistent set of uniquely named C++ interfaces.
  • The ability to perform operations to user specified tolerances.
  • Various memory management options including stack based, heap based and pool based.
  • A unified error management system.
Multi-platform C++ Source Code

GSNLib is distributed as a fully documented C++ source code library. The standard GSNLib license is a multi-user site license that allows the licensee to ship generated binaries without product royalties.

User Defined Caching

The user can control the size v.s. performance tradeoff by adjusting the size of the surface and curve cache. The cache maintains a tree based Bezier decomposition of the curve or surface. For many operations, the existence of a cache can improve the performance by an order of magnitude or more. For example, depending upon the size and complexity of a surface, dropping a point onto the surface may be two orders of magnitude (100x) faster if the cache for that surface exists.

Input via. STEP Format or NLib Structures

Constructors for B-Spline curves and surfaces allow input of either a PDES STEP compatible NURBS data or a pointer to a NLib "CURVE" or "SURFACE" data structure.

Superior Reliability

GSNLib has been designed from the bottom up to handle the most difficult conditions which occur in graphics and geometric modeling. The data structures we utilize to capture information, the mathematical algorithms we choose and even the arguments to methods are designed in such a way as to enable the detection and correct processing of these difficult situations.

  • Coincidence - situation where a desired solution corresponds to a range of values as opposed to at a single value.
  • Tangency - intersection where two objects touch at a single point but do not cross over each other.
  • Proximal - occurs if two objects are within the proximity (less than the user specified tolerance) of each other but do not actually intersect.
  • Grazing - situation where two objects intersect at two points which are very close to each other.
  • Ambiguous - situation where more than one valid solution exists to a problem which typically has only a single solution.
Superior Performance

GSNLib utilizes a proprietary caching algorithm to deliver both superior performance and superior reliability relative to traditional numerical algorithms. The user can control the size v.s. performance tradeoff by adjusting the size of the surface and curve cache. The cache maintains a tree-based Bezier decomposition of the curve or surface. For many operations, the existence of a cache can improve the performance by an order of magnitude or more. For example, depending upon the size and complexity of a surface, dropping a point onto a surface may be two orders of magnitude (100x) faster if the cache for that surface exists.

Object-Oriented Extensibility Framework

GSNLib provides the base classes that enable developers to extend both the geometric coverage and the numerical algorithms. Moderately experienced developers should be able to extend the base classes like Curve and Surface with relative ease. Less experienced developers should be able to extend the numerical algorithms (the Local Solvers, the Global Solver, and the Integrator). This Object-Oriented Extensibility Framework should simplify the process of creating application specific custom or semi-custom functionality. For example, the local version of planar curve filleting can easily be created by sub-classing the local N-dimensional solver class and providing the corresponding function evaluation and Jacobian matrix.

Functionality Summary

Back To Top
  • Contains all of NLib functionality.
  • Includes source code for NLib2 with a C++ interface.
  • Curve (IwCurve):
    • Point and derivative evaluation
    • Evaluation of geometric properties
    • Bounding box calculation
    • Creation of a mirror curve
    • Creation of a curve by projection to a plane
    • Transformation with optional scaling
    • High precision curve length computation
    • Closure, periodicity and degeneracy testing
    • Tessellation using both chord height and angular tolerances
    • Find intersections with a plane
    • Find inflection points
    • Find minimum/maximum magnitude of 1st derivative and radius of curvature
    • Find 1st derivative or radius of curvature of a given magnitude
    • Find points where tangent is parallel to X, Y, and/or Z axis
    • Find points where tangent is parallel to a given vector
    • Find silhouette points with either parallel or perspective projection
  • Composite Curve (IwCompositeCurve):
    • Creation of composite curves from an unordered set of curves
    • Offset of a composite curve with filleting or extension and trimming
    • Simultaneous offset of multiple composite curve loops (i.e. face with holes)
    • Creation of a single NURBS curve from a composite
  • B-Spline Curve (IwBSplineCurve):
    • Construction/editing/query using STEP format or NLib data structures
    • Continuity calculation, removal of extra knots, conversion to 2D
    • Creation by joining connected curve segments
    • Creation of circle, ellipse, line segment, degenerate curve
    • Creation of mirror curve
    • Editing the end points of a B-Spline
    • Extraction of analytical information for lines and arcs
    • Offsetting of smooth curves
  • Curve/Point - Local and global version of the following:
    • Minimization - find point(s) on curve closest to the point
    • Maximization - find point(s) on curve farthest from the point
    • Normalization - find point(s) on curve where tangent is perpendicular to vector to the point
    • At-distance - find point on curve at given distance from point
    • Intersection - find parametric value(s) on curve corresponding to the point
    • Projected minimization and maximization - as projected to a plane
    • Directed minimization and maximization - along a vector as projected to a plane
  • Curve/Curve - Local and global version of the following:
    • Minimization - find points on the two curves where the distance between them is minimal
    • Maximization - find points on the two curves where the distance between them is maximal
    • Normalization - find points on the curves where the tangents are perpendicular to the vector between the curves
    • At distance - find points on the two curves which have a given distance between them and have the same angle to the vector between them
    • Projected solvers - intersection, minimization, maximization, directed minimization, signed directed minimization, angle to plane, angle between, signed pivot angle between
    • 3D directed minimization - collision detection - find first contact point moving along a 3D vector
  • Curve/Curve Intersection:
    • Handles coincidence, tangency, near tangency, and grazing conditions
    • Projected curve/curve intersection
    • Self-intersection detection is supported
  • Surface (IwSurface):
    • Point and derivative evaluation, evaluation of geometric properties
    • Normal evaluation, evaluation of a normal section
    • High precision surface area computation
    • Dropping 3D vectors into parameter space
    • Closed and periodic testing, singularity testing, validation
    • Transformation, mirror
    • Creation of silhouette curves
  • B-Spline Surface (IwBSplineSurface):
    • Construction using STEP format or GeomWare's Nlib data structures
    • Continuity calculation
    • Query of canonical data
    • Creation of planar section curves
    • Creation of parallel projection curves
  • Surface/Point - Local and global version of the following:
    • Minimization - find point(s) on surface closest to point
    • Maximization - find point(s) on surface farthest from the point
    • Normalization - find point(s) on surface where normal is parallel to vector to point
    • Intersection - find parametric value(s) on surface corresponding to the point
    • 3D directed minimization - collision detection - find first contact point moving along a 3D vector
  • Surface/Curve - Local and global version of the following:
    • Minimization - finds where distance between curve and surface is minimal
    • Maximization - finds where distance between curve and surface is maximal
    • Normalization - finds where vector between entities is parallel to surface normal and perpendicular to the curve tangent
    • 3D intersection - find parametric value(s) on surface corresponding to the pointtor
  • Curve/Surface Intersection:
    • Handles coincidence, tangency, near tangency, and grazing conditions
  • Surface/Surface - Local and global version of the following:
    • Minimization - find where distance between surfaces is minimal
    • Maximization - find where distance between surfaces is maximal
    • Normalization - finds where vector between surfaces is parallel to surface normals
    • 3D directed minimization - collision detection - find first contact point moving along a 3D vector
  • Dropping Curves:
    • Create the 2D parameter space curve(s) corresponding to a 3D curve which lies on or near a surface
    • Restricted to surfaces with at least C1 continuity
    • Advanced dropping which allows C0 continuity surfaces
  • Container Classes:
    • IwMapPtrToPtr - pointer to pointer map
    • IwTArray - template array class
  • Geometric Utility Classes - The following objects are implemented:
    • IwVector2d - two-dimensional vector
    • IwVector3d - three-dimensional vector
    • IwAxis2Placement - represents a local coordinate system or transformation
    • IwMatrix - N-dimensional matrix used to solve linear equations
    • IwPolynomial - polynomial equation representation
    • IwPseudoBox - non-axis aligned bounding box
    • IwPolarBox - polar coordinate bounding box
    • IwExtent1d - one-dimensional interval
    • IwExtent2d - two-dimensional bounding box
    • IwExtent3d - three-dimensional bounding box
    • IwExtentNd - N-dimensional bounding box
    • IwPeriodicExtent1d - 1-dimensional periodic extent
  • Numerical Utility Classes - The following objects are implemented:
    • IwIntegrator - provides numerical integration
    • IwLocalSolve1d - provides one-dimensional Newton based local solver algorithm
    • IwLocalSolveNd - provides N-dimensional Newton based local solver algorithm
    • IwGlobalSolver - provides global solver algorithms
  • STEP Analytical Classes - The following objects have been implemented along with supporting methods for creation and interrogation:
    • IwLine, IwEllipse, IwCircle, IwHyperbola, IwParabola
    • IwPlane, IwCylinder, IwCone, IwSphere, IwTorus, IwSurfOfRevolution, IwSurfOfExtrusion
  • Advanced Surface/Surface Intersection (IwSurface::GlobalSurfaceIntersect):
    • Global intersection which finds all intersection curves and points
    • Ability to extract intersection curves along surface tangencies - surface normals are parallel along the intersection curve
    • Adds the ability to process curves where singularities occur - point where surface normal are parallel and intersection curves pass through the point
    • Adds the ability to produce zero length or NULL curves - point where surfaces touch at a single point but do not intersect near that point
    • Fast detection of interior closed intersection loops
  • Surface Curve Tracing Abstract Class (IwSurfaceTracer):
    • Provides a Object-Oriented Framework which should enable the fast implementation of additional curve extraction utilities through subclassing and implementation of virtual methods.
  • Surface Silhouette Curve Creation (IwSurfaceSilhouette):
    • Implementation in context of the Curve Tracing Framework
    • Able to detect all silhouette curves on a surface
    • Able to detect silhouettes which correspond to iso-parametric curves
    • Able to detect silhouettes which pass through the poles of the surface
  • Misc. Classes - The following objects are implemented:
    • IwCurveCache - Bezier curve decomposition based curve cache
    • IwSurfaceCache - Bezier surface decomposition based surface cache
    • IwCacheMgr - cache manager
    • IwMemBlockMgr - fixed sized memory allocation manager
    • IwHermiteCurve - provides utility representation of a Hermite curve
    • IwIsoCurve - provides utility representation of an iso-parametric curve on a surface

Sample Figures

Back To Top
Back To Top

To view the PDF files, you will need the Adobe Acrobat Reader.

1 GSNLib Data Sheet   (PDF)

2 NURBS Data Sheet   (PDF)  (HTML)