Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-25 09:19:18

0001 // Copyright (c) 2021 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _BrepLib_ToolTriangulatedShape_HeaderFile
0015 #define _BrepLib_ToolTriangulatedShape_HeaderFile
0016 
0017 #include <Poly_Connect.hxx>
0018 #include <Poly_Triangulation.hxx>
0019 
0020 class TopoDS_Face;
0021 class Poly_Triangulation;
0022 
0023 //! Provides methods for calculating normals to Poly_Triangulation of TopoDS_Face.
0024 class BRepLib_ToolTriangulatedShape
0025 {
0026 public:
0027   //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface.
0028   //! Does nothing if triangulation already defines normals.
0029   //! @param[in] theFace the face
0030   //! @param[in] theTris the definition of a face triangulation
0031   static void ComputeNormals(const TopoDS_Face&                     theFace,
0032                              const occ::handle<Poly_Triangulation>& theTris)
0033   {
0034     Poly_Connect aPolyConnect;
0035     ComputeNormals(theFace, theTris, aPolyConnect);
0036   }
0037 
0038   //! Computes nodal normals for Poly_Triangulation structure using UV coordinates and surface.
0039   //! Does nothing if triangulation already defines normals.
0040   //! @param[in] theFace the face
0041   //! @param[in] theTris the definition of a face triangulation
0042   //! @param[in,out] thePolyConnect optional, initialized tool for exploring triangulation
0043   Standard_EXPORT static void ComputeNormals(const TopoDS_Face&                     theFace,
0044                                              const occ::handle<Poly_Triangulation>& theTris,
0045                                              Poly_Connect&                          thePolyConnect);
0046 };
0047 
0048 #endif