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
|
-- File: Cone.cdl
-- Created: Thu Nov 5 18:41:49 1992
-- Author: Remi LEQUETTE
-- <rle@phylox>
---Copyright: Matra Datavision 1992
class Cone from BRepPrim inherits Revolution from BRepPrim
---Purpose: Implement the cone primitive.
uses
Face from TopoDS,
Pnt from gp,
Ax2 from gp
raises
DomainError
is
Create(Angle : Real; Position : Ax2 from gp; Height : Real;
Radius : Real = 0)
returns Cone from BRepPrim
---Purpose: the STEP definition
-- Angle = semi-angle of the cone
-- Position : the coordinate system
-- Height : height of the cone.
-- Radius : radius of truncated face at z = 0
--
-- The apex is on z < 0
--
-- Errors : Height < Resolution
-- Angle < Resolution / Height
-- Angle > PI/2 - Resolution / Height
raises DomainError;
Create(Angle : Real)
returns Cone from BRepPrim
---Purpose: infinite cone at origin on Z negative
raises DomainError;
Create(Angle : Real; Apex : Pnt from gp)
returns Cone from BRepPrim
---Purpose: infinite cone at Apex on Z negative
raises DomainError;
Create(Angle : Real; Axes : Ax2 from gp)
returns Cone from BRepPrim
---Purpose: infinite cone with Axes
raises DomainError;
Create(R1,R2,H : Real)
returns Cone from BRepPrim
---Purpose: create a Cone at origin on Z axis, of height H,
-- radius R1 at Z = 0, R2 at Z = H, X is the origin
-- of angles. If R1 or R2 is 0 there is an apex.
-- Otherwise, it is a truncated cone.
--
-- Error : R1 and R2 < Resolution
-- R1 or R2 negative
-- Abs(R1-R2) < Resolution
-- H < Resolution
-- H negative
raises DomainError;
Create(Center : Pnt from gp; R1,R2,H : Real)
returns Cone from BRepPrim
---Purpose: same as above but at a given point
raises DomainError;
Create(Axes : Ax2 from gp; R1,R2,H : Real)
returns Cone from BRepPrim
---Purpose: same as above with given axes system.
raises DomainError;
MakeEmptyLateralFace(me) returns Face from TopoDS
---Purpose: The surface normal should be directed towards the
-- outside.
is redefined;
SetMeridian(me : in out)
is static private;
SetParameters(me : in out; R1, R2, H : Real)
is static private;
fields
myHalfAngle : Real;
myRadius : Real;
end Cone;
|