Open CASCADE Technology
7.0.0

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 BSplines 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. More...
#include <ShapeConstruct_ProjectCurveOnSurface.hxx>
Public Member Functions  
ShapeConstruct_ProjectCurveOnSurface ()  
Empty constructor. More...  
virtual void  Init (const Handle< Geom_Surface > &surf, const Standard_Real preci) 
Initializes the object with all necessary parameters, i.e. surface and precision. More...  
virtual void  Init (const Handle< ShapeAnalysis_Surface > &surf, const Standard_Real preci) 
Initializes the object with all necessary parameters, i.e. surface and precision. More...  
void  SetSurface (const Handle< Geom_Surface > &surf) 
Loads a surface (in the form of Geom_Surface) to project on. More...  
void  SetSurface (const Handle< ShapeAnalysis_Surface > &surf) 
Loads a surface (in the form of ShapeAnalysis_Surface) to project on. More...  
void  SetPrecision (const Standard_Real preci) 
Sets value for current precision. More...  
Standard_Boolean &  BuildCurveMode () 
Returns (modifiable) the buildcurve3d mode, by default False If True, if the projected curve has been recomputed by interpolation, the 3d curve is also rebuild by interpolation. More...  
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. More...  
Standard_Boolean  Status (const ShapeExtend_Status Status) const 
Returns the status of last Peform. More...  
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 specialized algorithm. Returns False if projector fails, otherwise, 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. The output curve 2D is guaranteed to be sameparameter with input curve 3D on the interval [First, Last]. If the output curve lies on a direct line the infinite line is returned, in the case sameparameter condition is satisfied. More...  
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. More...  
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 PerformByProjLib()) 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. More...  
Public Member Functions inherited from MMgt_TShared  
virtual void  Delete () const override 
Memory deallocator for transient classes. More...  
Public Member Functions inherited from Standard_Transient  
Standard_Transient ()  
Empty constructor. More...  
Standard_Transient (const Standard_Transient &)  
Copy constructor – does nothing. More...  
Standard_Transient &  operator= (const Standard_Transient &) 
Assignment operator, needed to avoid copying reference counter. More...  
virtual  ~Standard_Transient () 
Destructor must be virtual. More...  
virtual const opencascade::handle< Standard_Type > &  DynamicType () const 
Returns a type descriptor about this object. More...  
Standard_Boolean  IsInstance (const opencascade::handle< Standard_Type > &theType) const 
Returns a true value if this is an instance of Type. More...  
Standard_Boolean  IsInstance (const Standard_CString theTypeName) const 
Returns a true value if this is an instance of TypeName. More...  
Standard_Boolean  IsKind (const opencascade::handle< Standard_Type > &theType) const 
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...  
Standard_Boolean  IsKind (const Standard_CString theTypeName) const 
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...  
Standard_Transient *  This () const 
Returns nonconst pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...  
Standard_Integer  GetRefCount () const 
Get the reference counter of this object. More...  
void  IncrementRefCounter () const 
Increments the reference counter of this object. More...  
Standard_Integer  DecrementRefCounter () const 
Decrements the reference counter of this object; returns the decremented value. More...  
Protected Member Functions  
Handle< Geom2d_Curve >  getLine (const TColgp_Array1OfPnt &points, const TColStd_Array1OfReal ¶ms, TColgp_Array1OfPnt2d &points2d, const Standard_Real theTol, Standard_Boolean &IsRecompute) const 
Try to approximate 3D curve by Geom2d_Line or Geom2d_BsplineCurve with degree 1 with specified tolerance. points  points obtained from 3d curve. params  parameters corresponding points on 3d curves points2d  2d points lies on line in parametric space theTol  tolerance used for compare initial points 3d and 3d points obtained from line lying in parameric space of surface. More...  
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] 
Additional Inherited Members  
Public Types inherited from Standard_Transient  
typedef void  base_type 
Returns a type descriptor about this object. More...  
Static Public Member Functions inherited from Standard_Transient  
static const char *  get_type_name () 
Returns a type descriptor about this object. More...  
static const opencascade::handle< Standard_Type > &  get_type_descriptor () 
Returns type descriptor of Standard_Transient class. More...  
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 BSplines 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.
ShapeConstruct_ProjectCurveOnSurface::ShapeConstruct_ProjectCurveOnSurface  (  ) 
Empty constructor.
Standard_Integer& ShapeConstruct_ProjectCurveOnSurface::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.
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& ShapeConstruct_ProjectCurveOnSurface::BuildCurveMode  (  ) 
Returns (modifiable) the buildcurve3d mode, by default False If True, if the projected curve has been recomputed by interpolation, the 3d curve is also rebuild by interpolation.

protected 
Try to approximate 3D curve by Geom2d_Line or Geom2d_BsplineCurve with degree 1 with specified tolerance. points  points obtained from 3d curve. params  parameters corresponding points on 3d curves points2d  2d points lies on line in parametric space theTol  tolerance used for compare initial points 3d and 3d points obtained from line lying in parameric space of surface.

virtual 
Initializes the object with all necessary parameters, i.e. surface and precision.

virtual 
Initializes the object with all necessary parameters, i.e. surface and precision.

virtual 
Computes the projection of 3d curve onto a surface using the specialized algorithm. Returns False if projector fails, otherwise, 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. The output curve 2D is guaranteed to be sameparameter with input curve 3D on the interval [First, Last]. If the output curve lies on a direct line the infinite line is returned, in the case sameparameter condition is satisfied.
Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::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 PerformByProjLib()) 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_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 

) 
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.
void ShapeConstruct_ProjectCurveOnSurface::SetPrecision  (  const Standard_Real  preci  ) 
Sets value for current precision.
void ShapeConstruct_ProjectCurveOnSurface::SetSurface  (  const Handle< Geom_Surface > &  surf  ) 
Loads a surface (in the form of Geom_Surface) to project on.
void ShapeConstruct_ProjectCurveOnSurface::SetSurface  (  const Handle< ShapeAnalysis_Surface > &  surf  ) 
Loads a surface (in the form of ShapeAnalysis_Surface) to project on.
Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::Status  (  const ShapeExtend_Status  Status  )  const 
Returns the status of last Peform.

protected 

protected 

protected 

protected 

protected 

protected 

protected 

protected 