summaryrefslogtreecommitdiff
path: root/src/BRepFeat/BRepFeat_MakeCylindricalHole.cdl
blob: 0295328d3925ab57851e9b317097e2b93e3a718a (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
-- File:	BRepFeat_MakeCylindricalHole.cdl
-- Created:	Tue Jun 13 15:02:53 1995
-- Author:	Jacques GOUSSARD
--		<jag@bravox>
---Copyright:	 Matra Datavision 1995


class MakeCylindricalHole from BRepFeat inherits Builder from BRepFeat

	---Purpose: Provides a tool to make cylindrical holes on a shape.

uses Shape                from TopoDS,
     Face                 from TopoDS,
     Ax1                  from gp,
     Status               from BRepFeat


raises NotDone from StdFail,
       ConstructionError from Standard

is

    Create
	---Purpose: Empty constructor.
    	returns MakeCylindricalHole from BRepFeat;
	---C++: inline


    Create(S: Shape from TopoDS)
	---Purpose: Creates the tool to perform hole(s) on the shape <S>. 
	---C++: inline
    	returns MakeCylindricalHole from BRepFeat;


    Create(S: Shape from TopoDS; Axis: Ax1 from gp)
	---Purpose: Creates the tool to perform hole(s) on the shape <S>,
	--          with the axis <Axis>. 
	---C++: inline
    	returns MakeCylindricalHole from BRepFeat;


--  Init(me: in out; S: Shape from TopoDS) is inherited from BRepFeat_Builder.


    Init(me: in out; Axis: Ax1 from gp)
	---Purpose: Sets the axis of the hole(s).
	---C++: inline
    	is static;


    Init(me: in out; S: Shape from TopoDS; Axis: Ax1 from gp)
	---Purpose: Sets the shape and  axis on which hole(s)  will be
	--          performed.  
        ---C++: inline
    	is static;


    Perform(me: in out; Radius: Real from Standard)
	---Purpose: Performs every  holes of   radius  <Radius>.  This
	--          command  has the  same effect as   a cut operation
	--          with an  infinite cylinder   defined by the  given
	--          axis and <Radius>.

    	raises ConstructionError from Standard
	-- The exception is raised when no shape or no axis is defined.
    	is static;


    Perform(me: in out; Radius: Real from Standard; 
                        PFrom,PTo: Real from Standard;
                        WithControl: Boolean from Standard = Standard_True)
	---Purpose: Performs evry   hole  of  radius  <Radius> located
	--          between PFrom  and  PTo  on the  given  axis.   If
	--          <WithControl> is set  to Standard_False no control
	--          are  done  on   the  resulting  shape   after  the
	--          operation is performed.

    	raises ConstructionError from Standard
	-- The exception is raised when no shape or no axis is defined.
    	is static;


    PerformThruNext(me: in out; 
                     Radius: Real from Standard;
                     WithControl: Boolean from Standard = Standard_True)
	---Purpose: Performs the first hole of radius <Radius>, in the
	--          direction of  the defined axis. First hole signify
	--          first encountered after the origin of the axis. If
	--          <WithControl> is set  to Standard_False no control
	--          are  done  on   the  resulting  shape   after  the
	--          operation is performed. 

    	raises ConstructionError from Standard
	-- The exception is raised when no shape or no axis is defined.
    	is static;


    PerformUntilEnd(me: in out; 
                     Radius: Real from Standard;
                     WithControl: Boolean from  Standard = Standard_True)
	---Purpose: Performs  evry  holes of  radius  <Radius> located
	--          after  the   origin  of   the given    axis.    If
	--          <WithControl> is  set to Standard_False no control
	--          are done   on   the  resulting  shape   after  the
	--          operation is performed.

    	raises ConstructionError from Standard
	-- The exception is raised when no shape or no axis is defined.
    	is static;


    PerformBlind(me: in out; 
                  Radius: Real from Standard; 
                  Length: Real from Standard;
		  WithControl: Boolean from  Standard = Standard_True)
	---Purpose: Performs a  blind   hole of radius    <Radius> and
	--          length <Length>.  The length is  measured from the
	--          origin of the given  axis. If <WithControl> is set
	--          to  Standard_False no  control  are done after the
	--          operation is performed.

    	raises ConstructionError from Standard
	-- The exception is raised when no shape or no axis is defined.
    	is static;


    Status(me)
	---Purpose: Returns the status after a hole is performed.
	---C++: inline
    	returns Status from BRepFeat
	is static;


--- Redefinition of BRepBuilderAPI_MakeShape methods
--  
--  

    Build(me: in out)
	---Purpose: Builds the    resulting shape  (redefined     from
	--          MakeShape). Invalidates the  given parts  of tools
	--          if  any,   and performs the  result   of the local
	--          operation.

    	is redefined;


--- Private implementation method


    Validate(me: in out)
    
    	returns Status from BRepFeat
	is static private;


fields

    myAxis    : Ax1                  from gp;
    myAxDef   : Boolean              from Standard;
    myStatus  : Status               from BRepFeat;
    myIsBlind : Boolean              from Standard;
    myValidate: Boolean              from Standard;
    myTopFace : Face                 from TopoDS;
    myBotFace : Face                 from TopoDS;


end MakeCylindricalHole;