1 -- Created on: 1998-06-03
2 -- Created by: data exchange team
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class ShapeTolerance from ShapeAnalysis
25 ---Purpose: Tool for computing shape tolerances (minimal, maximal, average),
26 -- finding shape with tolerance matching given criteria,
27 -- setting or limitating tolerances.
31 ShapeEnum from TopAbs,
32 HSequenceOfShape from TopTools
36 Create returns ShapeTolerance from ShapeAnalysis;
37 ---Purpose: Empty constructor
39 Tolerance (me : in out; shape: Shape from TopoDS;
41 type : ShapeEnum from TopAbs = TopAbs_SHAPE)
43 ---Purpose: Determines a tolerance from the ones stored in a shape
44 -- Remark : calls InitTolerance and AddTolerance,
45 -- hence, can be used to start a series for cumulating tolerance
46 -- <mode> = 0 : returns the average value between sub-shapes,
47 -- <mode> > 0 : returns the maximal found,
48 -- <mode> < 0 : returns the minimal found.
49 -- <type> defines what kinds of sub-shapes to consider:
50 -- SHAPE (default) : all : VERTEX, EDGE, FACE,
51 -- VERTEX : only vertices,
54 -- SHELL : combined SHELL + FACE, for each face (and containing
55 -- shell), also checks EDGE and VERTEX
57 OverTolerance (me; shape: Shape from TopoDS;
59 type : ShapeEnum = TopAbs_SHAPE)
60 returns HSequenceOfShape from TopTools;
61 ---Purpose: Determines which shapes have a tolerance over the given value
62 -- <type> is interpreted as in the method Tolerance
64 InTolerance (me; shape : Shape from TopoDS;
66 type : ShapeEnum = TopAbs_SHAPE)
67 returns HSequenceOfShape from TopTools;
68 ---Purpose: Determines which shapes have a tolerance within a given interval
69 -- <type> is interpreted as in the method Tolerance
71 InitTolerance (me : in out);
72 ---Purpose: Initializes computation of cumulated tolerance
74 AddTolerance (me : in out; shape: Shape from TopoDS;
75 type : ShapeEnum from TopAbs = TopAbs_SHAPE);
76 ---Purpose: Adds data on new Shape to compute Cumulated Tolerance
77 -- (prepares three computations : maximal, average, minimal)
79 GlobalTolerance (me; mode: Integer) returns Real;
80 ---Purpose: Returns the computed tolerance according to the <mode>
81 -- <mode> = 0 : average
82 -- <mode> > 0 : maximal
83 -- <mode> < 0 : minimal