summaryrefslogtreecommitdiff
path: root/src/BOPTools/BOPTools_RoughShapeIntersector.cdl
blob: 0820a6a96e5419b39b97d6840148e77dba5a4ddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-- File:	BOPTools_RoughShapeIntersector.cdl
-- Created:	Fri Nov 24 15:07:01 2000
-- Author:	Michael KLOKOV
--		<mkk@nizhnox.nnov.matra-dtv.fr>
---Copyright:	 Matra Datavision 2000

class RoughShapeIntersector from BOPTools

   	---Purpose: The class RoughShapeIntersector describes the algorithm of
    	--         intersection of bounding boxes of 
    	--         shapes stored in ShapesDataStructure.
	--         It stores statuses of intersection in 2 dimension array.
    
uses
    Array1OfListOfInteger from TColStd,
    ListOfInteger         from TColStd, 
    HArray2OfIntersectionStatus from BOPTools,
    IntersectionStatus          from BOPTools, 
    HArray1OfBox from Bnd,
    PShapesDataStructure from BooleanOperations
is

    Create(PDS: PShapesDataStructure from BooleanOperations)  
    	returns RoughShapeIntersector from BOPTools;
	---Purpose:
	-- Initializes algorithm by shapes data structure
	--
    
    Perform(me: in out);
    	---Purpose: 
    	-- Perform computations.
	--
	--  Warning: 
    	-- Using this function, after the destructor of
    	-- the object pointed by PDS (see constructor)
    	-- was invoked, lead to crash.
	--
    
    TableOfStatus(me)
    	returns HArray2OfIntersectionStatus from BOPTools;
	---C++: return const &
	---Purpose:
	--  Returns 2 dimension array of status flags.
    	-- First indices of the array corresponds to indices of 
    	-- subshapes of Object of myPDS.
    	-- Second indices of array corresponds to indices of 
    	-- subshapes of Tool of myPDS.
	--

    IsDone(me) returns Boolean from Standard;
    	---Purpose:
	-- Returns False if some errors occured during
	-- computations or method Perform
	-- was not invoked before, 
    	-- otherwise returns True.
	--
    
    --    private methods
    Prepare(me: in out)  
    	is private;

    PropagateForSuccessors1(me: in out; AncestorsIndex1: Integer from Standard;
    	    	    	    	    	AncestorsIndex2: Integer from Standard;
    	    	    	    	    	theStatus      : IntersectionStatus from BOPTools)
    	is private;

    PropagateForSuccessors2(me: in out; AncestorsIndex1: Integer from Standard;
    	    	    	    	    	AncestorsIndex2: Integer from Standard;
    	    	    	    	    	theStatus      : IntersectionStatus from BOPTools)
    	is private;

fields   
    myPDS: PShapesDataStructure from BooleanOperations;
    myBoundingBoxes: HArray1OfBox from Bnd;
    
    myTableOfStatus: HArray2OfIntersectionStatus from BOPTools;
    ---Purpose: First indices of array corresponds to indices of subshapes of Object of myPDS.
    --          Second indices of array corresponds to indices of subshapes of Tool of myPDS.
    
    myIsDone: Boolean from Standard;
       
end RoughShapeIntersector from BOPTools;