Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:55

0001 // Created on: 1999-06-21
0002 // Created by: Galina KULIKOVA
0003 // Copyright (c) 1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _ShapeAnalysis_TransferParametersProj_HeaderFile
0018 #define _ShapeAnalysis_TransferParametersProj_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Adaptor3d_CurveOnSurface.hxx>
0024 #include <TopLoc_Location.hxx>
0025 #include <ShapeAnalysis_TransferParameters.hxx>
0026 #include <TColStd_HSequenceOfReal.hxx>
0027 class Geom_Curve;
0028 class Geom2d_Curve;
0029 class TopoDS_Edge;
0030 class TopoDS_Face;
0031 class TopoDS_Vertex;
0032 
0033 
0034 class ShapeAnalysis_TransferParametersProj;
0035 DEFINE_STANDARD_HANDLE(ShapeAnalysis_TransferParametersProj, ShapeAnalysis_TransferParameters)
0036 
0037 //! This tool is used for transferring parameters
0038 //! from 3d curve of the edge to pcurve and vice versa.
0039 //! This tool transfers parameters with help of
0040 //! projection points from curve 3d on curve 2d and
0041 //! vice versa
0042 class ShapeAnalysis_TransferParametersProj : public ShapeAnalysis_TransferParameters
0043 {
0044 
0045 public:
0046 
0047   
0048   //! Creates empty constructor.
0049   Standard_EXPORT ShapeAnalysis_TransferParametersProj();
0050   
0051   Standard_EXPORT ShapeAnalysis_TransferParametersProj(const TopoDS_Edge& E, const TopoDS_Face& F);
0052   
0053   Standard_EXPORT virtual void Init (const TopoDS_Edge& E, const TopoDS_Face& F) Standard_OVERRIDE;
0054   
0055   //! Transfers parameters given by sequence Params from 3d curve
0056   //! to pcurve (if To2d is True) or back (if To2d is False)
0057   Standard_EXPORT virtual Handle(TColStd_HSequenceOfReal) Perform (const Handle(TColStd_HSequenceOfReal)& Papams, const Standard_Boolean To2d) Standard_OVERRIDE;
0058   
0059   //! Transfers parameter given by  Param from 3d curve
0060   //! to pcurve (if To2d is True) or back (if To2d is False)
0061   Standard_EXPORT virtual Standard_Real Perform (const Standard_Real Param, const Standard_Boolean To2d) Standard_OVERRIDE;
0062   
0063   //! Returns modifiable flag forcing projection
0064   //! If it is False (default), projection is done only
0065   //! if edge is not SameParameter or if tolerance of edge
0066   //! is greater than MaxTolerance()
0067   Standard_EXPORT Standard_Boolean& ForceProjection();
0068   
0069   //! Recomputes range of curves from NewEdge.
0070   //! If Is2d equals True parameters are recomputed by curve2d else by curve3d.
0071   Standard_EXPORT virtual void TransferRange (TopoDS_Edge& newEdge, const Standard_Real prevPar, const Standard_Real currPar, const Standard_Boolean Is2d) Standard_OVERRIDE;
0072   
0073   //! Returns False;
0074   Standard_EXPORT virtual Standard_Boolean IsSameRange() const Standard_OVERRIDE;
0075   
0076   //! Make a copy of non-manifold vertex theVert
0077   //! (i.e. create new  TVertex and replace PointRepresentations for this vertex
0078   //! from fromedge to toedge. Other representations were copied)
0079   Standard_EXPORT static TopoDS_Vertex CopyNMVertex (const TopoDS_Vertex& theVert, const TopoDS_Edge& toedge, const TopoDS_Edge& fromedge);
0080   
0081   //! Make a copy of non-manifold vertex theVert
0082   //! (i.e. create new  TVertex and replace PointRepresentations for this vertex
0083   //! from fromFace to toFace. Other representations were copied)
0084   Standard_EXPORT static TopoDS_Vertex CopyNMVertex (const TopoDS_Vertex& theVert, const TopoDS_Face& toFace, const TopoDS_Face& fromFace);
0085 
0086 
0087 
0088 
0089   DEFINE_STANDARD_RTTIEXT(ShapeAnalysis_TransferParametersProj,ShapeAnalysis_TransferParameters)
0090 
0091 protected:
0092 
0093 
0094 
0095 
0096 private:
0097 
0098   
0099   Standard_EXPORT Standard_Real PreformSegment (const Standard_Real Param, const Standard_Boolean To2d, const Standard_Real First, const Standard_Real Last);
0100 
0101   Handle(Geom_Curve) myCurve;
0102   Handle(Geom2d_Curve) myCurve2d;
0103   Adaptor3d_CurveOnSurface myAC3d;
0104   Standard_Real myPrecision;
0105   TopLoc_Location myLocation;
0106   Standard_Boolean myForceProj;
0107   Standard_Boolean myInitOK;
0108 
0109 
0110 };
0111 
0112 
0113 
0114 
0115 
0116 
0117 
0118 #endif // _ShapeAnalysis_TransferParametersProj_HeaderFile