Open CASCADE Technology  6.5.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
ShapeConstruct_ProjectCurveOnSurface Class Reference

This tool provides a method for computing pcurve by projecting
3d curve onto a surface.
Projection is done by 23 or more points (this number is changed
for B-Splines according to the following rule:
the total number of the points is not less than number of spans *
(degree + 1);
it is increased recursively starting with 23 and is added with 22
until the condition is fulfilled).
Isoparametric cases (if curve corresponds to U=const or V=const on
the surface) are recognized with the given precision.

#include <ShapeConstruct_ProjectCurveOnSurface.hxx>

Inheritance diagram for ShapeConstruct_ProjectCurveOnSurface:
Inheritance graph
[legend]

Public Member Functions

 ShapeConstruct_ProjectCurveOnSurface ()
 Empty constructor.

virtual void Init (const Handle< Geom_Surface > &surf, const Standard_Real preci)
 Initializes the object with all necessary parameters,
i.e. surface and precision

virtual void Init (const Handle< ShapeAnalysis_Surface > &surf, const Standard_Real preci)
 Initializes the object with all necessary parameters,
i.e. surface and precision

void SetSurface (const Handle< Geom_Surface > &surf)
 Loads a surface (in the form of Geom_Surface) to project on

void SetSurface (const Handle< ShapeAnalysis_Surface > &surf)
 Loads a surface (in the form of ShapeAnalysis_Surface) to project on

void SetPrecision (const Standard_Real preci)
 Sets value for current precision

Standard_BooleanBuildCurveMode ()
 Returns (modifiable) the build-curve-3d mode, by default False
If True, if the projected curve has been recomputed by
interpolation, the 3d curve is also rebuild by interpolation

Standard_IntegerAdjustOverDegenMode ()
 Returns (modifiable) the flag specifying to which side of
parametrical space adjust part of pcurve which lies on seam.
This is required in very rare case when 3d curve which is
to be projected goes partly along the seam on the closed
surface with singularity (e.g. sphere), goes through the
degenerated point and paerly lies on internal area of surface.

If this flag is True, the seam part of such curve will be
adjusted to the left side of parametric space (on sphere U=0),
else to the right side (on sphere U=2*PI)
Default value is True

Standard_Boolean Status (const ShapeExtend_Status Status) const
 Returns the status of last Peform

virtual Standard_Boolean Perform (Handle< Geom_Curve > &c3d, const Standard_Real First, const Standard_Real Last, Handle< Geom2d_Curve > &c2d, const GeomAbs_Shape continuity=GeomAbs_C1, const Standard_Integer maxdeg=12, const Standard_Integer nbinterval=-1)
 Computes the projection of 3d curve onto a surface using the
standard algorithm from ProjLib. Returns False if standard
projector fails or raises an exception or cuts the curve by
parametrical bounds of the surface. Else, if pcurve computed
successfully, returns True.
The continuity, maxdeg and nbinterval are parameters of call
to Approx_CurveOnSurface. If nbinterval is equal to -1
(default), this value is computed depending on source 3d curve
and surface.

Standard_Boolean PerformByProjLib (Handle< Geom_Curve > &c3d, const Standard_Real First, const Standard_Real Last, Handle< Geom2d_Curve > &c2d, const GeomAbs_Shape continuity=GeomAbs_C1, const Standard_Integer maxdeg=12, const Standard_Integer nbinterval=-1)
 Computes the projection of 3d curve onto a surface using the
standard algorithm from ProjLib. Returns False if standard
projector fails or raises an exception or cuts the curve by
parametrical bounds of the surface. Else, if pcurve computed
successfully, returns True.
The continuity, maxdeg and nbinterval are parameters of call
to Approx_CurveOnSurface. If nbinterval is equal to -1
(default), this value is computed depending on source 3d curve
and surface.

Standard_Boolean PerformAdvanced (Handle< Geom_Curve > &c3d, const Standard_Real First, const Standard_Real Last, Handle< Geom2d_Curve > &c2d)
 Computes the projection of 3d curve onto a surface using
either standard projector (method PerformByStandard()) or
internal one (method Perform()). The selection is done by
analyzing the surface and 3d curve and is aimed to filter
the cases potentially dangerous for the standard projector.
If the standard projector fails, internal one is used.

Protected Attributes

Handle_ShapeAnalysis_Surface mySurf
Standard_Real myPreci
Standard_Boolean myBuild
Standard_Integer myStatus
Standard_Integer myAdjustOverDegen
Standard_Integer myNbCashe
gp_Pnt myCashe3d [2]
gp_Pnt2d myCashe2d [2]

Constructor & Destructor Documentation


Member Function Documentation


Field Documentation

Handle_ShapeAnalysis_Surface ShapeConstruct_ProjectCurveOnSurface::mySurf [protected]

The documentation for this class was generated from the following file: