OCC Main Page | ModelingAlgorithms | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ModelingAlgorithms
TKShHealing
ShapeConstruct


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>


Public Member Functions

Standard_EXPORT ShapeConstruct_ProjectCurveOnSurface ()
 Empty constructor.
.
virtual Standard_EXPORT void Init (const Handle(Geom_Surface)&surf, const Standard_Real preci)
 Initializes the object with all necessary parameters,
i.e. surface and precision
.
virtual Standard_EXPORT void Init (const Handle(ShapeAnalysis_Surface)&surf, const Standard_Real preci)
 Initializes the object with all necessary parameters,
i.e. surface and precision
.
Standard_EXPORT void SetSurface (const Handle(Geom_Surface)&surf)
 Loads a surface (in the form of Geom_Surface) to project on
.
Standard_EXPORT void SetSurface (const Handle(ShapeAnalysis_Surface)&surf)
 Loads a surface (in the form of ShapeAnalysis_Surface) to project on
.
Standard_EXPORT void SetPrecision (const Standard_Real preci)
 Sets value for current precision
.
Standard_EXPORT 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_EXPORT Standard_Integer & AdjustOverDegenMode ()
 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.
.
Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status Status) const
 Returns the status of last Peform
.
virtual Standard_EXPORT 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_EXPORT 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_EXPORT 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.
.
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

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]

Private Member Functions

Standard_EXPORT Handle_Geom2d_Curve ProjectAnalytic (const Handle(Geom_Curve)&c3d) const
Standard_EXPORT Standard_Boolean ApproxPCurve (const Standard_Integer nbrPnt, const TColgp_Array1OfPnt &points, const TColStd_Array1OfReal &params, TColgp_Array1OfPnt2d &points2d, Handle(Geom2d_Curve)&c2d)
Standard_EXPORT Handle_Geom2d_Curve InterpolatePCurve (const Standard_Integer nbrPnt, Handle(TColgp_HArray1OfPnt2d)&points2d, Handle(TColStd_HArray1OfReal)&params, const Handle(Geom_Curve)&orig) const
Standard_EXPORT Handle_Geom2d_Curve ApproximatePCurve (const Standard_Integer nbrPnt, Handle(TColgp_HArray1OfPnt2d)&points2d, Handle(TColStd_HArray1OfReal)&params, const Handle(Geom_Curve)&orig) const
Standard_EXPORT Handle_Geom_Curve InterpolateCurve3d (const Standard_Integer nbrPnt, Handle(TColgp_HArray1OfPnt)&points, Handle(TColStd_HArray1OfReal)&params, const Handle(Geom_Curve)&orig) const
Standard_EXPORT void CheckPoints (Handle(TColgp_HArray1OfPnt)&points, Handle(TColStd_HArray1OfReal)&params, Standard_Real &preci) const
Standard_EXPORT void CheckPoints2d (Handle(TColgp_HArray1OfPnt2d)&points, Handle(TColStd_HArray1OfReal)&params, Standard_Real &preci) const
Standard_EXPORT Standard_Boolean IsAnIsoparametric (const Standard_Integer nbrPnt, const TColgp_Array1OfPnt &points, const TColStd_Array1OfReal &params, Standard_Boolean &isoTypeU, Standard_Boolean &p1OnIso, gp_Pnt2d &valueP1, Standard_Boolean &p2OnIso, gp_Pnt2d &valueP2, Standard_Boolean &isoPar2d3d, Handle(Geom_Curve)&cIso, Standard_Real &t1, Standard_Real &t2, TColStd_Array1OfReal &pout) const


Constructor & Destructor Documentation

Standard_EXPORT ShapeConstruct_ProjectCurveOnSurface::ShapeConstruct_ProjectCurveOnSurface  ) 
 


Member Function Documentation

Standard_EXPORT Standard_Integer& ShapeConstruct_ProjectCurveOnSurface::AdjustOverDegenMode  ) 
 

Standard_EXPORT Handle_Geom2d_Curve ShapeConstruct_ProjectCurveOnSurface::ApproximatePCurve const Standard_Integer  nbrPnt,
Handle(TColgp_HArray1OfPnt2d)&  points2d,
Handle(TColStd_HArray1OfReal)&  params,
const Handle(Geom_Curve)&  orig
const [private]
 

Standard_EXPORT Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::ApproxPCurve const Standard_Integer  nbrPnt,
const TColgp_Array1OfPnt &  points,
const TColStd_Array1OfReal &  params,
TColgp_Array1OfPnt2d &  points2d,
Handle(Geom2d_Curve)&  c2d
[private]
 

Standard_EXPORT Standard_Boolean& ShapeConstruct_ProjectCurveOnSurface::BuildCurveMode  ) 
 

Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::CheckPoints Handle(TColgp_HArray1OfPnt)&  points,
Handle(TColStd_HArray1OfReal)&  params,
Standard_Real &  preci
const [private]
 

Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::CheckPoints2d Handle(TColgp_HArray1OfPnt2d)&  points,
Handle(TColStd_HArray1OfReal)&  params,
Standard_Real &  preci
const [private]
 

Standard_EXPORT const ShapeConstruct_ProjectCurveOnSurface::Handle Standard_Type   )  const
 

virtual Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::Init const Handle(ShapeAnalysis_Surface)&  surf,
const Standard_Real  preci
[virtual]
 

virtual Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::Init const Handle(Geom_Surface)&  surf,
const Standard_Real  preci
[virtual]
 

Standard_EXPORT Handle_Geom_Curve ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d const Standard_Integer  nbrPnt,
Handle(TColgp_HArray1OfPnt)&  points,
Handle(TColStd_HArray1OfReal)&  params,
const Handle(Geom_Curve)&  orig
const [private]
 

Standard_EXPORT Handle_Geom2d_Curve ShapeConstruct_ProjectCurveOnSurface::InterpolatePCurve const Standard_Integer  nbrPnt,
Handle(TColgp_HArray1OfPnt2d)&  points2d,
Handle(TColStd_HArray1OfReal)&  params,
const Handle(Geom_Curve)&  orig
const [private]
 

Standard_EXPORT Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::IsAnIsoparametric const Standard_Integer  nbrPnt,
const TColgp_Array1OfPnt &  points,
const TColStd_Array1OfReal &  params,
Standard_Boolean isoTypeU,
Standard_Boolean p1OnIso,
gp_Pnt2d &  valueP1,
Standard_Boolean p2OnIso,
gp_Pnt2d &  valueP2,
Standard_Boolean isoPar2d3d,
Handle(Geom_Curve)&  cIso,
Standard_Real &  t1,
Standard_Real &  t2,
TColStd_Array1OfReal &  pout
const [private]
 

virtual Standard_EXPORT Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::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
[virtual]
 

Standard_EXPORT Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced Handle(Geom_Curve)&  c3d,
const Standard_Real  First,
const Standard_Real  Last,
Handle(Geom2d_Curve)&  c2d
 

Standard_EXPORT Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::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
 

Standard_EXPORT Handle_Geom2d_Curve ShapeConstruct_ProjectCurveOnSurface::ProjectAnalytic const Handle(Geom_Curve)&  c3d  )  const [private]
 

Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::SetPrecision const Standard_Real  preci  ) 
 

Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::SetSurface const Handle(ShapeAnalysis_Surface)&  surf  ) 
 

Standard_EXPORT void ShapeConstruct_ProjectCurveOnSurface::SetSurface const Handle(Geom_Surface)&  surf  ) 
 

Standard_EXPORT Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Status const ShapeExtend_Status  Status  )  const
 


Field Documentation

Standard_Integer ShapeConstruct_ProjectCurveOnSurface::myAdjustOverDegen [protected]
 

Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::myBuild [protected]
 

gp_Pnt2d ShapeConstruct_ProjectCurveOnSurface::myCashe2d[2] [protected]
 

gp_Pnt ShapeConstruct_ProjectCurveOnSurface::myCashe3d[2] [protected]
 

Standard_Integer ShapeConstruct_ProjectCurveOnSurface::myNbCashe [protected]
 

Standard_Real ShapeConstruct_ProjectCurveOnSurface::myPreci [protected]
 

Standard_Integer ShapeConstruct_ProjectCurveOnSurface::myStatus [protected]
 

Handle_ShapeAnalysis_Surface ShapeConstruct_ProjectCurveOnSurface::mySurf [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:42:35 2008 for OpenCASCADE by  doxygen 1.4.1