Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 09:16:58

0001 // Created on: 1998-06-03
0002 // Created by: data exchange team
0003 // Copyright (c) 1998-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 _ShapeFix_WireVertex_HeaderFile
0018 #define _ShapeFix_WireVertex_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <ShapeAnalysis_WireVertex.hxx>
0025 #include <Standard_Integer.hxx>
0026 class TopoDS_Wire;
0027 class ShapeExtend_WireData;
0028 
0029 //! Fixing disconnected edges in the wire
0030 //! Fixes vertices in the wire on the basis of pre-analysis
0031 //! made by ShapeAnalysis_WireVertex (given as argument).
0032 //! The Wire has formerly been loaded in a ShapeExtend_WireData.
0033 class ShapeFix_WireVertex
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   Standard_EXPORT ShapeFix_WireVertex();
0039 
0040   //! Loads the wire, ininializes internal analyzer
0041   //! (ShapeAnalysis_WireVertex) with the given precision,
0042   //! and performs analysis
0043   Standard_EXPORT void Init(const TopoDS_Wire& wire, const double preci);
0044 
0045   //! Loads the wire, ininializes internal analyzer
0046   //! (ShapeAnalysis_WireVertex) with the given precision,
0047   //! and performs analysis
0048   Standard_EXPORT void Init(const occ::handle<ShapeExtend_WireData>& sbwd, const double preci);
0049 
0050   //! Loads all the data on wire, already analysed by
0051   //! ShapeAnalysis_WireVertex
0052   Standard_EXPORT void Init(const ShapeAnalysis_WireVertex& sawv);
0053 
0054   //! returns internal analyzer
0055   Standard_EXPORT const ShapeAnalysis_WireVertex& Analyzer() const;
0056 
0057   //! returns data on wire (fixed)
0058   Standard_EXPORT const occ::handle<ShapeExtend_WireData>& WireData() const;
0059 
0060   //! returns resulting wire (fixed)
0061   Standard_EXPORT TopoDS_Wire Wire() const;
0062 
0063   //! Fixes "Same" or "Close" status (same vertex may be set,
0064   //! without changing parameters)
0065   //! Returns the count of fixed vertices, 0 if none
0066   Standard_EXPORT int FixSame();
0067 
0068   //! Fixes all statuses except "Disjoined", i.e. the cases in which a
0069   //! common value has been set, with or without changing parameters
0070   //! Returns the count of fixed vertices, 0 if none
0071   Standard_EXPORT int Fix();
0072 
0073 private:
0074   ShapeAnalysis_WireVertex myAnalyzer;
0075 };
0076 
0077 #endif // _ShapeFix_WireVertex_HeaderFile