.. _group__a3d__30__geometry:

##############################
Geometry (Curves and Surfaces)
##############################

Curves and surfaces.

This module describes the functions and structures for parsing and creating geometric entities, essentially curves and surfaces. It also includes means addressing issues specific to geometric entities, such as interval definition, axis definition, and parameterization.

Generally, most curve and surface data structures contain canonical, parameterization, and transformation settings:


- A canonical form is the simplest parametric equations to define a curve or surface. The term *canonical* means commonly known standards for parametrically representing geometric information, in conjunction with an underyling mathematical equation in the form **P(t)** for a curve or **P(u,v)** for a surface. For instance, a line is defined with an origin **O** and a direction **v**\ , corresponding to the equation **P(t) = O + t.v**\ Each curve and surface has an implicit parameterization that corresponds to the object's canonical form. This implicit parameterization includes units and range. For example, the implicit parameterization of a circle has radians as its units and has the range [0,2PI]. :ref:`Geometry Type Declarations <group__a3d__geometry__types>` introduces canonical forms for curves and surfaces. The \ `*PRC Format Specification* </hoops/exchange/_static/SC2N570-PRC-WD.pdf>`__ provides a full description of all canonical forms and their associated equations. 
- Parameterization settings for a curve or surface translates from the implicit parameterization of the canonical form to the actual parameterization of the geometric entity.The parameterization settings include reparameterization coefficients and a range. The reparameterization coefficients converts from the units and range of the canonical form to the units and range of the final representation (the *actual* *parameterization*\ ). The range specifies the portion of the canonical form to use, expressed in the units of the actual parameterization. The reparameterization coefficients specify the offset and scaling between the units of the canonical form and the units of the actual parameterization. :ref:`Parameterization for Curve and Surface Geometries <group__a3d__parameterization>` describes range definitions and parameterization settings. 
- A transformation setting denotes the actual placement of the geometric entity in 3D space. Transformations describes transformation settings. 


Curves
======

Geometric curves (:c:type:`~A3DCrvBase`\ ) are a mandatory part of the topology construct in an :c:type:`~A3DTopoBody` entity. Do not confuse an :c:type:`~A3DCrvBase` entity with an :c:type:`~A3DRiCurve` entity. The latter is a particular representation item that has an :c:type:`~A3DTopoSingleWireBody` as its topology entry point.

All curves are defined as described in these steps:


1. Define the canonical form of the whole curve. 
2. Define the actual parameterization and the portion of curve (trimming information) (:c:struct:`~A3DParameterizationData`\ ). 
3. Define the orientation and scaling of the curve using a Cartesian transformation. The transformation cannot specify mirror or non-uniform scaling transformations (see :c:struct:`~A3DMiscCartesianTransformationData`\ ). 

Here are definitions for terms that apply to curves.


- *Curve* is a mathematical description for a whole curve. 
- *Arc* is a portion of a curve corresponding to an interval.



Surfaces
========

Geometric surfaces (:c:type:`~A3DSurfBase`\ ) are a mandatory part of the topology construct that is represented by an :c:type:`~A3DTopoBrepData` entity.

All surfaces are defined as follows:


1. Define the canonical form of the whole surface. 
2. Define the actual parameterization and the portion of surface (trimming information) (:c:struct:`~A3DUVParameterizationData`\ ). 
3. Define the orientation and scaling of the curve using a Cartesian transformation. The transformation cannot specify mirror or non-uniform scaling transformations (see :c:struct:`~A3DMiscCartesianTransformationData`\ ). 


   Depending on how surfaces were defined, please notice that some might have their parameterization implicitly reverted (and more especially for periodic ones).




Transformations
===============

This section describes the transformation entities that can be applied to PRC entities containing geometry.

The abstract base entity for this module (:c:type:`~A3DMiscTransformation`\ ) appears in structure members as a pointer that references either an :c:type:`~A3DMiscCartesianTransformation` or an :c:type:`~A3DMiscGeneralTransformation` entity. There are no functions to separately create or access an :c:type:`~A3DMiscTransformation` entity.

To determine the type of transformation entity referenced by an :c:type:`~A3DMiscTransformation` pointer, use the :c:func:`~A3DEntityGetType` function.


.. rst-class:: kind-group kind-topic

.. rubric:: Topics
   :class: kind-group-title


.. rst-class:: api-xref-list


* :ref:`3D Linear Transformation <group___a3_d__mathfn3d__lineartransfo>`
* :ref:`3D Non-Linear Transformation <group___a3_d__mathfn3d__nonlineartransfo>`
* :ref:`ArctanCos Function <group___a3_d__mathfn1d__arctancos>`
* :ref:`Blend Surface Type 1 <group__a3d__srfblend01>`
* :ref:`Blend Surface Type 2 <group__a3d__srfblend02>`
* :ref:`Blend Surface Type 3 <group__a3d__srfblend03>`
* :ref:`Blend02Boundary Curve <group__a3d__crvboundary>`
* :ref:`Cartesian Transformation <group__a3d__cartesiantransfo3d>`
* :ref:`Cartesian Transformation Types <group__a3d__transformationbit>`
* :ref:`Circular Curve <group__a3d__crvcircle>`
* :ref:`Combination Function <group___a3_d__mathfn1d__combination>`
* :ref:`Composite Curve <group__a3d__crvcomposite>`
* :ref:`Conic Surface <group__a3d__srfcone>`
* :ref:`Curve On Surface <group__a3d__crvonsurf>`
* :ref:`Cylindrical Surface <group__a3d__srfcylinder>`
* :ref:`Cylindrical-Space Surface <group__a3d__srfcylindrical>`
* :ref:`Elliptic Curve <group__a3d__crvellipse>`
* :ref:`Equation Curve <group__a3d__crvequation>`
* :ref:`Eval on curves and surfaces <group__a3d__evaluate>`
* :ref:`Extrusion Surface <group__a3d__srfextrusion>`
* :ref:`Fraction Function <group___a3_d__mathfn1d__fraction>`
* :ref:`From Curves Surface <group__a3d__srffromcurves>`
* :ref:`General 3D Transformation (using 4x4 transformation matrices) <group__a3d__generaltransfo3d>`
* :ref:`Helix Curve <group__a3d__crvhelix>`
* :ref:`Hyperbolic Curve <group__a3d__crvhyperbola>`
* :ref:`Intersection Curve <group__a3d__crvintersection>`
* :ref:`Linear Curve <group__a3d__crvline>`
* :ref:`NURBS Curve <group__a3d__crvnurbs>`
* :ref:`NURBS Surface (the base surface entity) <group__a3d__srfnurbs>`
* :ref:`Offset Curve <group__a3d__crvoffset>`
* :ref:`Offset Surface <group__a3d__srfoffset>`
* :ref:`Parabolic Curve <group__a3d__crvparabola>`
* :ref:`Parameterization for Curve and Surface Geometries <group__a3d__parameterization>`
* :ref:`Pipe Surface <group__a3d__srfpipe>`
* :ref:`Plane Surface <group__a3d__srfplane>`
* :ref:`Polyline Curve <group__a3d__crvpolyline>`
* :ref:`Polynomial Function <group___a3_d__mathfn1d__polynom>`
* :ref:`Project points on curves and surfaces <group__a3d__projection>`
* :ref:`Range Definitions <group__a3d__extent>`
* :ref:`Revolution Surface <group__a3d__srfrevolution>`
* :ref:`Ruled Surface <group__a3d__srfruled>`
* :ref:`Spherical Surface <group__a3d__srfsphere>`
* :ref:`Tools Module <group__a3d__tools__module>`
* :ref:`Toric Surface <group__a3d__srftorus>`
* :ref:`Transform Curve <group__a3d__crvtransform>`
* :ref:`Transform Surface <group__a3d__srftransform>`
* :ref:`Trigonometric Function <group___a3_d__mathfn1d__trigo>`
* :ref:`Vectors <group__a3d__vectors>`

.. toctree::
   :maxdepth: 1
   :hidden:

   a3d_tools_module
   a3d_evaluate
   a3d_projection
   a3d_transformationbit
   a3d_vectors
   a3d_extent
   a3d_parameterization
   a3d_crvnurbs
   a3d_crvline
   a3d_crvcircle
   a3d_crvellipse
   a3d_crvparabola
   a3d_crvhyperbola
   a3d_crvpolyline
   a3d_crvcomposite
   a3d_crvequation
   a3d_crvtransform
   a3d_crvonsurf
   a3d_crvoffset
   a3d_crvhelix
   a3d_crvintersection
   a3d_crvboundary
   a3d_srfnurbs
   a3d_srfsphere
   a3d_srfcylinder
   a3d_srftorus
   a3d_srfrevolution
   a3d_srfextrusion
   a3d_srfoffset
   a3d_srfplane
   a3d_srfblend01
   a3d_srfblend02
   a3d_srfblend03
   a3d_srfcone
   a3d_srfcylindrical
   a3d_srfruled
   a3d_srfpipe
   a3d_srftransform
   a3d_srffromcurves
   A3D_mathfn1d_polynom
   A3D_mathfn1d_trigo
   A3D_mathfn1d_fraction
   A3D_mathfn1d_arctancos
   A3D_mathfn1d_combination
   A3D_mathfn3d_lineartransfo
   A3D_mathfn3d_nonlineartransfo
   a3d_generaltransfo3d
   a3d_cartesiantransfo3d


