Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Data Structures
Geom2d_OffsetCurve.hxx File Reference
#include <Standard.hxx>
#include <Standard_DefineHandle.hxx>
#include <Handle_Geom2d_OffsetCurve.hxx>
#include <Handle_Geom2d_Curve.hxx>
#include <Standard_Real.hxx>
#include <Geom2d_Curve.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Handle_Geom2d_Geometry.hxx>

Data Structures

class  Geom2d_OffsetCurve
 This class implements the basis services for the creation,
edition, modification and evaluation of planar offset curve.
The offset curve is obtained by offsetting by distance along
the normal to a basis curve defined in 2D space.
The offset curve in this package can be a self intersecting
curve even if the basis curve does not self-intersect.
The self intersecting portions are not deleted at the
construction time.
An offset curve is a curve at constant distance (Offset) from a
basis curve and the offset curve takes its parametrization from
the basis curve. The Offset curve is in the direction of the
normal to the basis curve N.
The distance offset may be positive or negative to indicate the
preferred side of the curve :
. distance offset >0 => the curve is in the direction of N
. distance offset >0 => the curve is in the direction of - N
On the Offset curve :
Value(u) = BasisCurve.Value(U) + (Offset * (T ^ Z)) / ||T ^ Z||
where T is the tangent vector to the basis curve and Z the
direction of the normal vector to the plane of the curve,
N = T ^ Z defines the offset direction and should not have
null length.

Warnings :
In this package we suppose that the continuity of the offset
curve is one degree less than the continuity of the
basis curve and we don't check that at any point ||T^Z|| != 0.0

So to evaluate the curve it is better to check that the offset
curve is well defined at any point because an exception could
be raised. The check is not done in this package at the creation
of the offset curve because the control needs the use of an
algorithm which cannot be implemented in this package.
The OffsetCurve is closed if the first point and the last point
are the same (The distance between these two points is lower or
equal to the Resolution sea package gp) . The OffsetCurve can be
closed even if the basis curve is not closed.
More...