# Modeling Algorithms

Modeling Algorithms contain a vast range of geometrical and topological algorithms.

Modeling Algorithms module groups a wide range of topological and geometric algorithms used in geometric modeling. Basically, there are two groups of algorithms in Open CASCADE Technology:

•  High-level modeling routines used in the real design
•  Low-level mathematical support functions used as a groundwork for the modeling API
•  Low-level geometric tools provide the algorithms, which:
• Calculate the intersection of two curves, surfaces, or a curve and a surface
•  Project points onto 2D and 3D curves, points onto surfaces and 3D curves onto surfaces
•  Construct lines and circles from constraints
•  Construct free-form curves and surfaces from constraints (interpolation, approximation, skinning, gap filling, etc.).
• Low-level topological tools provide the algorithms, which:
•  Tessellate shapes
•  Check correct definition of shapes
•  Determine the local and global properties of shapes (derivatives, mass-inertia properties, etc.)
•  Perform affine transformations
•  Find planes in which edges are located
•  Convert shapes to NURBS geometry
•  Sew connected topologies (shells and wires) from separate topological elements (faces and edges).

Top-level API provides the following functionality:

•  Construction of Primitives:
•  Boxes
•  Prisms
•  Cylinders
•  Cones
•  Spheres
•  Toruses.
•  Kinematic Modeling:
•  Prisms - linear sweeps
•  Revolutions - rotational sweeps
•  Pipes - general-form sweeps
•  Lofting.

Shapes containing pipes with variable radius produced by sweeping

• Boolean Operations, which allow creating new shapes from the combinations of source shapes. For two shapes S1 and S2:
•  Common contains all points that are in S1 and S2
•  Fuse contains all points that are in S1 or S2
•  Cut contains all points in that are in S1 and not in S2.

See Boolean Operations Guide for detailed documentation.

•  Algorithms for local modifications such as:
•  Hollowing
•  Shelling
•  Creation of tapered shapes using draft angles
•  Algorithms to make fillets and chamfers on shape edges, including those with variable radius (chord).
•  Algorithms for creation of mechanical features, i.e. depressions, protrusions, ribs and grooves or slots along planar or revolution surfaces.

Please, see the details in Modeling Algorithms User's Guide.

Mesh

Mesh provides functionality to work with tessellated representations of objects.

Mesh module provides the functionality to work with tessellated representations of objects in form of triangular facets. This module contains:

•  data structures to store surface mesh data associated to shapes and basic algorithms to handle them;
•  data structures and algorithms to a build triangular surface mesh from BRep objects (shapes);
•  tools for displaying meshes with associated pre- and post-processor data (scalars or vectors).

Open CASCADE Technology includes two mesh converters:

•  VRML converter translates Open CASCADE shapes to VRML 1.0 files (Virtual Reality Modeling Language). Two representation modes are possible: shaded, which presents shapes as sets of triangles computed by the mesh algorithm, or wireframe, which presents shapes as sets of curves.
•  STL converter translates Open CASCADE shapes to STL files. STL (STtereoLithography) format is widely used for rapid prototyping (3D printing).