Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-08-25
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1994-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_TrsfModification_HeaderFile
0018 #define _BRepTools_TrsfModification_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_Trsf.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 
0036 class BRepTools_TrsfModification;
0037 DEFINE_STANDARD_HANDLE(BRepTools_TrsfModification, BRepTools_Modification)
0038 
0039 //! Describes a modification that uses a gp_Trsf to
0040 //! change the geometry of a shape. All functions return
0041 //! true and transform the geometry of the shape.
0042 class BRepTools_TrsfModification : public BRepTools_Modification
0043 {
0044 
0045 public:
0046 
0047   
0048   Standard_EXPORT BRepTools_TrsfModification(const gp_Trsf& T);
0049   
0050   //! Provides access to the gp_Trsf associated with this
0051   //! modification. The transformation can be changed.
0052   Standard_EXPORT gp_Trsf& Trsf();
0053 
0054   //! Sets a flag to indicate the need to copy mesh.
0055   Standard_EXPORT Standard_Boolean& IsCopyMesh();
0056   
0057   //! Returns true if the face F has been modified.
0058   //! If the face has been modified:
0059   //! - S is the new geometry of the face,
0060   //! - L is its new location, and
0061   //! - Tol is the new tolerance.
0062   //! RevWires is set to true when the modification
0063   //! reverses the normal of the surface (the wires have to be reversed).
0064   //! RevFace is set to true if the orientation of the
0065   //! modified face changes in the shells which contain it.
0066   //! For this class, RevFace returns true if the gp_Trsf
0067   //! associated with this modification is negative.
0068   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;
0069   
0070   //! Returns true if the face has been modified according to changed triangulation.
0071   //! If the face has been modified:
0072   //! - T is a new triangulation on the face
0073   Standard_EXPORT Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE;
0074 
0075   //! Returns true if the edge has been modified according to changed polygon.
0076   //! If the edge has been modified:
0077   //! - P is a new polygon
0078   Standard_EXPORT Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE;
0079 
0080   //! Returns true if the edge has been modified according to changed polygon on triangulation.
0081   //! If the edge has been modified:
0082   //! - P is a new polygon on triangulation
0083   Standard_EXPORT Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F, Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE;
0084 
0085   //! Returns true if the edge E has been modified.
0086   //! If the edge has been modified:
0087   //! - C is the new geometric support of the edge,
0088   //! - L is the new location, and
0089   //! - Tol is the new tolerance.
0090   //! If the edge has not been modified, this function
0091   //! returns false, and the values of C, L and Tol are not significant.
0092   Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE;
0093   
0094   //! Returns true if the vertex V has been modified.
0095   //! If the vertex has been modified:
0096   //! - P is the new geometry of the vertex, and
0097   //! - Tol is the new tolerance.
0098   //! If the vertex has not been modified this function
0099   //! returns false, and the values of P and Tol are not significant.
0100   Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) Standard_OVERRIDE;
0101   
0102   //! Returns true if the edge E has a new curve on surface on the face F.
0103   //! If a new curve exists:
0104   //! - C is the new geometric support of the edge,
0105   //! - L is the new location, and
0106   //! - Tol the new tolerance.
0107   //! If no new curve exists, this function returns false, and
0108   //! the values of C, L and Tol are not significant.
0109   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;
0110   
0111   //! Returns true if the Vertex V has a new parameter on the edge E.
0112   //! If a new parameter exists:
0113   //! - P is the parameter, and
0114   //! - Tol is the new tolerance.
0115   //! If no new parameter exists, this function returns false,
0116   //! and the values of P and Tol are not significant.
0117   Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE;
0118   
0119   //! Returns the  continuity of  <NewE> between <NewF1>
0120   //! and <NewF2>.
0121   //!
0122   //! <NewE> is the new  edge created from <E>.  <NewF1>
0123   //! (resp. <NewF2>) is the new  face created from <F1>
0124   //! (resp. <F2>).
0125   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;
0126 
0127 
0128 
0129 
0130   DEFINE_STANDARD_RTTIEXT(BRepTools_TrsfModification,BRepTools_Modification)
0131 
0132 protected:
0133 
0134 
0135 
0136 
0137 private:
0138 
0139 
0140   gp_Trsf myTrsf;
0141   Standard_Boolean myCopyMesh;
0142 
0143 
0144 };
0145 
0146 
0147 
0148 
0149 
0150 
0151 
0152 #endif // _BRepTools_TrsfModification_HeaderFile