b311480e |
1 | -- Created on: 2004-03-05 |
2 | -- Created by: Sergey KUUL |
973c2be1 |
3 | -- Copyright (c) 2004-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
7 | -- This library is free software; you can redistribute it and/or modify it under |
8 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | -- by the Free Software Foundation, with special exception defined in the file |
10 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | class IntersectionTool from ShapeFix |
17 | |
18 | ---Purpose: Tool for fixing selfintersecting wire |
19 | -- and intersecting wires |
20 | |
21 | uses |
22 | |
23 | Face from TopoDS, |
24 | Edge from TopoDS, |
25 | Vertex from TopoDS, |
26 | ReShape from ShapeBuild, |
27 | WireData from ShapeExtend, |
28 | DataMapOfShapeBox2d from ShapeFix, |
29 | Curve from Geom2d, |
30 | Box2d from Bnd |
31 | |
32 | is |
33 | Create(context: ReShape from ShapeBuild; |
34 | preci: Real; maxtol: Real =1.0) returns IntersectionTool from ShapeFix; |
35 | ---Purpose: Constructor |
36 | |
37 | Context (me) returns ReShape from ShapeBuild; |
38 | ---Purpose: Returns context |
39 | ---C++: inline |
40 | |
41 | SplitEdge(me; edge: Edge from TopoDS; param: Real from Standard; |
42 | vert: Vertex from TopoDS; face: Face from TopoDS; |
43 | newE1: in out Edge from TopoDS; newE2: in out Edge from TopoDS; |
44 | preci: Real from Standard) |
45 | returns Boolean from Standard; |
46 | ---Purpose: Split edge on two new edges using new vertex "vert" |
47 | -- and "param" - parameter for splitting |
48 | -- The "face" is necessary for pcurves and using TransferParameterProj |
49 | |
50 | CutEdge(me; edge: Edge from TopoDS; pend: Real from Standard; |
51 | cut: Real from Standard; face: Face from TopoDS; |
52 | iscutline: in out Boolean from Standard) |
53 | returns Boolean from Standard; |
54 | ---Purpose: Cut edge by parameters pend and cut |
55 | |
56 | SplitEdge1(me; sewd: WireData from ShapeExtend; |
57 | face: Face from TopoDS; |
58 | num: Integer from Standard; |
59 | param: Real from Standard; |
60 | vert: Vertex from TopoDS; |
61 | preci: Real from Standard; |
62 | boxes: in out DataMapOfShapeBox2d from ShapeFix) |
63 | returns Boolean from Standard is private; |
64 | |
65 | SplitEdge2(me; sewd: WireData from ShapeExtend; |
66 | face: Face from TopoDS; |
67 | num: Integer from Standard; |
68 | param1: Real from Standard; |
69 | param2: Real from Standard; |
70 | vert: Vertex from TopoDS; |
71 | preci: Real from Standard; |
72 | boxes: in out DataMapOfShapeBox2d from ShapeFix) |
73 | returns Boolean from Standard is private; |
74 | |
75 | UnionVertexes(me; sewd: WireData from ShapeExtend; |
76 | edge1: in out Edge from TopoDS; |
77 | edge2: in out Edge from TopoDS; |
78 | num2: Integer from Standard; |
79 | boxes: in out DataMapOfShapeBox2d from ShapeFix; |
80 | B2: Box2d from Bnd) |
81 | returns Boolean from Standard is private; |
82 | |
83 | FindVertAndSplitEdge(me; param1: Real from Standard; |
84 | edge1,edge2: Edge from TopoDS; |
85 | Crv1: Curve from Geom2d; |
86 | MaxTolVert: in out Real from Standard; |
87 | num1: in out Integer from Standard; |
88 | sewd: WireData from ShapeExtend; |
89 | face: Face from TopoDS; |
90 | boxes: in out DataMapOfShapeBox2d from ShapeFix; |
91 | aTmpKey: Boolean from Standard) |
92 | returns Boolean from Standard is private; |
93 | |
94 | FixSelfIntersectWire(me; sewd: in out WireData from ShapeExtend; |
95 | face: Face from TopoDS; |
96 | NbSplit: in out Integer; NbCut: in out Integer; |
97 | NbRemoved: in out Integer) |
98 | returns Boolean from Standard; |
99 | |
100 | FixIntersectingWires(me; face: in out Face from TopoDS) |
101 | returns Boolean from Standard; |
102 | |
103 | fields |
104 | |
105 | myContext : ReShape from ShapeBuild; |
106 | myPreci : Real from Standard; |
107 | myMaxTol : Real from Standard; |
108 | |
109 | end IntersectionTool; |