b311480e |
1 | -- Created on: 2000-02-07 |
2 | -- Created by: data exchange team |
3 | -- Copyright (c) 2000-2012 OPEN CASCADE SAS |
4 | -- |
5 | -- The content of this file is subject to the Open CASCADE Technology Public |
6 | -- License Version 6.5 (the "License"). You may not use the content of this file |
7 | -- except in compliance with the License. Please obtain a copy of the License |
8 | -- at http://www.opencascade.org and read it completely before using this file. |
9 | -- |
10 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
12 | -- |
13 | -- The Original Code and all software distributed under the License is |
14 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | -- Initial Developer hereby disclaims all such warranties, including without |
16 | -- limitation, any warranties of merchantability, fitness for a particular |
17 | -- purpose or non-infringement. Please see the License for the specific terms |
18 | -- and conditions governing the rights and limitations under the License. |
19 | |
7fd59977 |
20 | |
21 | |
22 | class AlgoContainer from ShapeAlgo inherits TShared from MMgt |
23 | |
24 | ---Purpose: |
25 | |
26 | uses |
27 | |
28 | Curve from Geom2d, |
29 | BSplineCurve from Geom2d, |
30 | BSplineCurve from Geom, |
31 | BSplineSurface from Geom, |
32 | Surface from Geom, |
33 | SequenceOfCurve from TColGeom, |
34 | HSequenceOfBoundedCurve from TColGeom, |
35 | SequenceOfCurve from TColGeom2d, |
36 | HSequenceOfBoundedCurve from TColGeom2d, |
37 | Shape from TopoDS, |
38 | Edge from TopoDS, |
39 | Wire from TopoDS, |
40 | Face from TopoDS, |
41 | ToolContainer from ShapeAlgo, |
42 | WireData from ShapeExtend, |
43 | Wire from ShapeAnalysis, |
44 | Curve from Geom, |
45 | Shape from GeomAbs |
46 | |
47 | is |
48 | |
49 | Create returns mutable AlgoContainer from ShapeAlgo; |
50 | ---Purpose: Empty constructor |
51 | |
52 | SetToolContainer (me: mutable; TC: ToolContainer from ShapeAlgo); |
53 | ---C++ : inline |
54 | ---Purpose: Sets ToolContainer |
55 | |
56 | ToolContainer (me) returns ToolContainer from ShapeAlgo; |
57 | ---C++ : inline |
58 | ---Purpose: Returns ToolContainer |
59 | |
60 | |
61 | --- Algorithms |
62 | |
63 | ConnectNextWire (me; saw : Wire from ShapeAnalysis; |
64 | nextsewd : WireData from ShapeExtend; |
65 | maxtol : Real; |
66 | distmin : out Real; |
67 | revsewd : out Boolean; |
68 | revnextsewd: out Boolean) |
69 | returns Boolean is virtual; |
70 | ---Purpose: Finds the best way to connect and connects <nextsewd> to already |
71 | -- built <sewd> (in <saw>). |
72 | -- Returns False if <nextsewd> cannot be connected, otherwise - True. |
73 | -- <maxtol> specifies the maximum tolerance with which <nextsewd> can |
74 | -- be added. |
75 | -- <distmin> is used to receive the minimum distance between <nextsewd> |
76 | -- and <sewd>. |
77 | -- <revsewd> is True if <sewd> has been reversed before connecting. |
78 | -- <revnextwd> is True if <nextsewd> has been reversed before connecting. |
79 | -- Uses functionality of ShapeAnalysis_Wire. |
80 | |
81 | ApproxBSplineCurve (me; bspline: BSplineCurve from Geom; seq: out SequenceOfCurve from TColGeom) |
82 | is virtual; |
83 | ---Purpose: |
84 | |
85 | ApproxBSplineCurve (me; bspline: BSplineCurve from Geom2d; seq: out SequenceOfCurve from TColGeom2d) |
86 | is virtual; |
87 | ---Purpose: |
88 | |
89 | C0BSplineToSequenceOfC1BSplineCurve (me; BS : BSplineCurve from Geom; |
90 | seqBS: out HSequenceOfBoundedCurve from TColGeom) |
91 | returns Boolean is virtual; |
92 | |
93 | C0BSplineToSequenceOfC1BSplineCurve (me; BS : BSplineCurve from Geom2d; |
94 | seqBS: out HSequenceOfBoundedCurve from TColGeom2d) |
95 | returns Boolean is virtual; |
96 | ---Purpose: Converts C0 B-Spline curve into sequence of C1 B-Spline curves. |
97 | -- Calls ShapeUpgrade::C0BSplineToSequenceOfC1BSplineCurve. |
98 | |
99 | C0ShapeToC1Shape (me; shape: Shape from TopoDS; tol: Real) |
100 | returns Shape from TopoDS is virtual; |
101 | ---Purpose: Converts a shape on C0 geometry into the shape on C1 geometry. |
102 | ---Remark : Uses ShapeUpgrade_ShapeDivide. |
103 | |
104 | ConvertSurfaceToBSpline(me; surf : Surface from Geom; |
105 | UF,UL,VF,VL: Real) |
106 | returns BSplineSurface from Geom is virtual; |
107 | ---Purpose: Converts a surface to B-Spline. |
108 | -- Uses ShapeConstruct. |
109 | |
110 | HomoWires (me; wireIn1 : Wire from TopoDS; |
111 | wireIn2 : Wire from TopoDS; |
112 | wireOut1: out Wire from TopoDS; |
113 | wireOut2: out Wire from TopoDS; |
114 | byParam : Boolean from Standard) |
115 | returns Boolean is virtual; |
116 | ---Purpose: Return 2 wires with the same number of edges. The both Edges |
117 | -- number i of these wires have got the same ratio between |
118 | -- theirs parameter lengths and their wire parameter lengths. |
119 | |
120 | OuterWire (me; face: Face from TopoDS) returns Wire from TopoDS is virtual; |
121 | ---Purpose: Returns the outer wire on the face <Face>. |
122 | |
123 | ConvertToPeriodic (me; surf: Surface from Geom) |
124 | returns Surface from Geom is virtual; |
125 | ---Purpose: Converts surface to periodic form. |
126 | -- Calls ShapeCustom_Surface. |
127 | |
128 | GetFaceUVBounds (me; F: Face from TopoDS; Umin, Umax, Vmin, Vmax: out Real) |
129 | is virtual; |
130 | ---Purpose: Computes exact UV bounds of all wires on the face |
131 | ---Remark : Calls ShapeAnalysis::GetFaceUVBounds. |
132 | |
133 | ConvertCurveToBSpline(me;C3D : Curve from Geom; |
134 | First : Real; |
135 | Last : Real; |
136 | Tol3d : Real; |
137 | Continuity : Shape from GeomAbs; |
138 | MaxSegments: Integer; |
139 | MaxDegree : Integer) |
140 | returns BSplineCurve from Geom is virtual; |
141 | ---Purpose: Convert Geom_Curve to Geom_BSplineCurve |
142 | ---Remark : Calls ShapeConstruct::CurveCurveToBSplineCurve. |
143 | |
144 | fields |
145 | |
146 | myTC : ToolContainer from ShapeAlgo; |
147 | |
148 | end AlgoContainer; |