Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-26 09:15:39

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