Integration of OCCT 6.5.0 from SVN
[occt.git] / src / GC / GC_MakeTrimmedCone.cdl
CommitLineData
7fd59977 1-- File: MakeTrimmedCone.cdl
2-- Created: Mon Sep 28 11:52:10 1992
3-- Author: Remi GILET
4-- <reg@sdsun2>
5---Copyright: Matra Datavision 1992
6
7class MakeTrimmedCone from GC inherits Root from GC
8
9 --- Purpose: Implements construction algorithms for a trimmed
10 -- cone limited by two planes orthogonal to its axis. The
11 -- result is a Geom_RectangularTrimmedSurface surface.
12 -- A MakeTrimmedCone provides a framework for:
13 -- - defining the construction of the trimmed cone,
14 -- - implementing the construction algorithm, and
15 -- - consulting the results. In particular, the Value
16 -- function returns the constructed trimmed cone.
17uses Pnt from gp,
18 Ax1 from gp,
19 Lin from gp,
20 Cone from gp,
21 RectangularTrimmedSurface from Geom,
22 Real from Standard
23
24raises NotDone from StdFail
25
26is
27
28Create(P1,P2,P3,P4 : Pnt from gp ) returns MakeTrimmedCone;
29 ---Purpose: Make a RectangularTrimmedSurface <TheCone> from Geom
30 -- It is trimmed by P3 and P4.
31 -- Its axis is <P1P2> and the radius of its base is
32 -- the distance between <P3> and <P1P2>.
33 -- The distance between <P4> and <P1P2> is the radius of
34 -- the section passing through <P4>.
35 -- An error iss raised if <P1>,<P2>,<P3>,<P4> are
36 -- colinear or if <P3P4> is perpendicular to <P1P2> or
37 -- <P3P4> is colinear to <P1P2>.
38
39Create(P1,P2 : Pnt from gp ;
40 R1,R2 : Real from Standard) returns MakeTrimmedCone;
41 ---Purpose : Make a RectangularTrimmedSurface from Geom <TheCone>
42 -- from a cone and trimmed by two points P1 and P2 and
43 -- the two radius <R1> and <R2> of the sections passing
44 -- through <P1> an <P2>.
45 -- Warning
46 -- If an error occurs (that is, when IsDone returns
47 -- false), the Status function returns:
48 -- - gce_ConfusedPoints if points P1 and P2, or P3 and P4, are coincident;
49 -- - gce_NullAngle if:
50 -- - the lines joining P1 to P2 and P3 to P4 are parallel, or
51 -- - R1 and R2 are equal (i.e. their difference is less than gp::Resolution());
52 -- - gce_NullRadius if:
53 -- - the line joining P1 to P2 is perpendicular to the line joining P3 to P4, or
54 -- - the points P1, P2, P3 and P4 are collinear;
55 -- - gce_NegativeRadius if R1 or R2 is negative; or
56 -- - gce_NullAxis if points P1 and P2 are coincident (2nd syntax only).
57
58Value(me) returns RectangularTrimmedSurface from Geom
59 raises NotDone
60 is static;
61 ---Purpose: Returns the constructed trimmed cone.
62 -- StdFail_NotDone if no trimmed cone is constructed.
63 ---C++: return const&
64
65Operator(me) returns RectangularTrimmedSurface from Geom
66 is static;
67 ---C++: return const&
68 ---C++: alias "Standard_EXPORT operator Handle_Geom_RectangularTrimmedSurface() const;"
69
70fields
71
72 TheCone : RectangularTrimmedSurface from Geom;
73 --The solution from Geom.
74
75end MakeTrimmedCone;