1 // Created on: 1998-06-03
2 // Created by: data exchange team
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _ShapeFix_WireVertex_HeaderFile
18 #define _ShapeFix_WireVertex_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <ShapeAnalysis_WireVertex.hxx>
25 #include <Standard_Real.hxx>
26 #include <Standard_Integer.hxx>
28 class ShapeExtend_WireData;
29 class ShapeAnalysis_WireVertex;
32 //! Fixing disconnected edges in the wire
33 //! Fixes vertices in the wire on the basis of pre-analysis
34 //! made by ShapeAnalysis_WireVertex (given as argument).
35 //! The Wire has formerly been loaded in a ShapeExtend_WireData.
36 class ShapeFix_WireVertex
43 Standard_EXPORT ShapeFix_WireVertex();
45 //! Loads the wire, ininializes internal analyzer
46 //! (ShapeAnalysis_WireVertex) with the given precision,
47 //! and performs analysis
48 Standard_EXPORT void Init (const TopoDS_Wire& wire, const Standard_Real preci);
50 //! Loads the wire, ininializes internal analyzer
51 //! (ShapeAnalysis_WireVertex) with the given precision,
52 //! and performs analysis
53 Standard_EXPORT void Init (const Handle(ShapeExtend_WireData)& sbwd, const Standard_Real preci);
55 //! Loads all the data on wire, already analysed by
56 //! ShapeAnalysis_WireVertex
57 Standard_EXPORT void Init (const ShapeAnalysis_WireVertex& sawv);
59 //! returns internal analyzer
60 Standard_EXPORT const ShapeAnalysis_WireVertex& Analyzer() const;
62 //! returns data on wire (fixed)
63 Standard_EXPORT const Handle(ShapeExtend_WireData)& WireData() const;
65 //! returns resulting wire (fixed)
66 Standard_EXPORT TopoDS_Wire Wire() const;
68 //! Fixes "Same" or "Close" status (same vertex may be set,
69 //! without changing parameters)
70 //! Returns the count of fixed vertices, 0 if none
71 Standard_EXPORT Standard_Integer FixSame();
73 //! Fixes all statuses except "Disjoined", i.e. the cases in which a
74 //! common value has been set, with or without changing parameters
75 //! Returns the count of fixed vertices, 0 if none
76 Standard_EXPORT Standard_Integer Fix();
91 ShapeAnalysis_WireVertex myAnalyzer;
102 #endif // _ShapeFix_WireVertex_HeaderFile