0022627: Change OCCT memory management defaults
[occt.git] / src / IGESSolid / IGESSolid_SolidOfLinearExtrusion.cxx
1 //--------------------------------------------------------------------
2 //
3 //  File Name : IGESSolid_SolidOfLinearExtrusion.cxx
4 //  Date      :
5 //  Author    : CKY / Contract Toubro-Larsen
6 //  Copyright : MATRA-DATAVISION 1993
7 //
8 //--------------------------------------------------------------------
9
10 #include <IGESSolid_SolidOfLinearExtrusion.ixx>
11 #include <gp_GTrsf.hxx>
12
13
14     IGESSolid_SolidOfLinearExtrusion::IGESSolid_SolidOfLinearExtrusion ()   { }
15
16
17     void  IGESSolid_SolidOfLinearExtrusion::Init
18   (const Handle(IGESData_IGESEntity)& aCurve,
19    const Standard_Real Length, const gp_XYZ& Direction)
20 {
21   theCurve     = aCurve;
22   theLength    = Length;
23   theDirection = Direction;           // default (0,0,1)
24   InitTypeAndForm(164,0);
25 }
26
27     Handle(IGESData_IGESEntity)  IGESSolid_SolidOfLinearExtrusion::Curve () const
28 {
29   return theCurve;
30 }
31
32     Standard_Real  IGESSolid_SolidOfLinearExtrusion::ExtrusionLength () const
33 {
34   return theLength;
35 }
36
37     gp_Dir  IGESSolid_SolidOfLinearExtrusion::ExtrusionDirection () const
38 {
39   return gp_Dir(theDirection);
40 }
41
42     gp_Dir  IGESSolid_SolidOfLinearExtrusion::TransformedExtrusionDirection () const
43 {
44   if (!HasTransf()) return gp_Dir(theDirection);
45   else
46     {
47       gp_XYZ tmp = theDirection;
48       gp_GTrsf loc = Location();
49       loc.SetTranslationPart(gp_XYZ(0.,0.,0.));
50       loc.Transforms(tmp);
51       return gp_Dir(tmp);
52     }
53 }