Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:17

0001 // Created on: 1996-07-12
0002 // Created by: Stagiaire Mary FABIEN
0003 // Copyright (c) 1996-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 _BRepTools_NurbsConvertModification_HeaderFile
0018 #define _BRepTools_NurbsConvertModification_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <TopTools_ListOfShape.hxx>
0023 #include <TColStd_ListOfTransient.hxx>
0024 #include <TColStd_IndexedDataMapOfTransientTransient.hxx>
0025 #include <BRepTools_CopyModification.hxx>
0026 #include <Standard_Real.hxx>
0027 #include <GeomAbs_Shape.hxx>
0028 class TopoDS_Face;
0029 class Geom_Surface;
0030 class TopLoc_Location;
0031 class TopoDS_Edge;
0032 class Geom_Curve;
0033 class TopoDS_Vertex;
0034 class gp_Pnt;
0035 class Geom2d_Curve;
0036 
0037 
0038 class BRepTools_NurbsConvertModification;
0039 DEFINE_STANDARD_HANDLE(BRepTools_NurbsConvertModification, BRepTools_CopyModification)
0040 
0041 //! Defines a modification of the  geometry by a  Trsf
0042 //! from gp. All methods return True and transform the
0043 //! geometry.
0044 class BRepTools_NurbsConvertModification : public BRepTools_CopyModification
0045 {
0046 
0047 public:
0048 
0049   
0050   Standard_EXPORT BRepTools_NurbsConvertModification();
0051   
0052   //! Returns Standard_True  if  the face  <F> has  been
0053   //! modified.  In this  case, <S> is the new geometric
0054   //! support of  the  face, <L> the  new location,<Tol>
0055   //! the new  tolerance.<RevWires> has  to  be set   to
0056   //! Standard_True   when the modification reverses the
0057   //! normal of  the   surface.(the wires   have  to  be
0058   //! reversed).   <RevFace>   has   to   be   set    to
0059   //! Standard_True if  the orientation  of the modified
0060   //! face changes in the  shells which contain  it.  --
0061   //! Here, <RevFace>  will  return Standard_True if the
0062   //! -- gp_Trsf is negative.
0063   Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L, Standard_Real& Tol, Standard_Boolean& RevWires, Standard_Boolean& RevFace) Standard_OVERRIDE;
0064   
0065   //! Returns Standard_True  if  the edge  <E> has  been
0066   //! modified.  In this case,  <C> is the new geometric
0067   //! support of the  edge, <L> the  new location, <Tol>
0068   //! the         new    tolerance.   Otherwise, returns
0069   //! Standard_False,    and  <C>,  <L>,   <Tol> are not
0070   //! significant.
0071   Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE;
0072   
0073   //! Returns  Standard_True if the  vertex <V> has been
0074   //! modified.  In this  case, <P> is the new geometric
0075   //! support of the vertex,   <Tol> the new  tolerance.
0076   //! Otherwise, returns Standard_False, and <P>,  <Tol>
0077   //! are not significant.
0078   Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) Standard_OVERRIDE;
0079   
0080   //! Returns Standard_True if  the edge  <E> has a  new
0081   //! curve on surface on the face <F>.In this case, <C>
0082   //! is the new geometric support of  the edge, <L> the
0083   //! new location, <Tol> the new tolerance.
0084   //! Otherwise, returns  Standard_False, and <C>,  <L>,
0085   //! <Tol> are not significant.
0086   Standard_EXPORT Standard_Boolean NewCurve2d (const TopoDS_Edge& E, const TopoDS_Face& F, const TopoDS_Edge& NewE, const TopoDS_Face& NewF, Handle(Geom2d_Curve)& C, Standard_Real& Tol) Standard_OVERRIDE;
0087   
0088   //! Returns Standard_True if the Vertex  <V> has a new
0089   //! parameter on the  edge <E>. In  this case,  <P> is
0090   //! the parameter,    <Tol>  the     new    tolerance.
0091   //! Otherwise, returns Standard_False, and <P>,  <Tol>
0092   //! are not significant.
0093   Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE;
0094   
0095   //! Returns the  continuity of  <NewE> between <NewF1>
0096   //! and <NewF2>.
0097   //!
0098   //! <NewE> is the new  edge created from <E>.  <NewF1>
0099   //! (resp. <NewF2>) is the new  face created from <F1>
0100   //! (resp. <F2>).
0101   Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const TopoDS_Edge& NewE, const TopoDS_Face& NewF1, const TopoDS_Face& NewF2) Standard_OVERRIDE;
0102 
0103   //! Returns true if the face has been modified according to changed triangulation.
0104   //! If the face has been modified:
0105   //! - theTri is a new triangulation on the face
0106   Standard_EXPORT Standard_Boolean NewTriangulation(const TopoDS_Face& theFace, Handle(Poly_Triangulation)& theTri) Standard_OVERRIDE;
0107 
0108   //! Returns true if the edge has been modified according to changed polygon.
0109   //! If the edge has been modified:
0110   //! - thePoly is a new polygon
0111   Standard_EXPORT Standard_Boolean NewPolygon(const TopoDS_Edge& theEdge, Handle(Poly_Polygon3D)& thePoly) Standard_OVERRIDE;
0112 
0113   //! Returns true if the edge has been modified according to changed polygon on triangulation.
0114   //! If the edge has been modified:
0115   //! - thePoly is a new polygon on triangulation
0116   Standard_EXPORT Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge&                   theEdge,
0117                                                              const TopoDS_Face&                   theFace,
0118                                                              Handle(Poly_PolygonOnTriangulation)& thePoly) Standard_OVERRIDE;
0119 
0120   Standard_EXPORT const TopTools_ListOfShape& GetUpdatedEdges() const;
0121 
0122 
0123   DEFINE_STANDARD_RTTIEXT(BRepTools_NurbsConvertModification,BRepTools_CopyModification)
0124 
0125 protected:
0126 
0127 
0128 
0129 
0130 private:
0131 
0132 
0133   TopTools_ListOfShape myled;
0134   TColStd_ListOfTransient mylcu;
0135   TColStd_IndexedDataMapOfTransientTransient myMap;
0136   TopTools_ListOfShape myUpdatedEdges;
0137 
0138 
0139 };
0140 
0141 
0142 
0143 
0144 
0145 
0146 
0147 #endif // _BRepTools_NurbsConvertModification_HeaderFile