summaryrefslogtreecommitdiff
path: root/src/IGESGeom/IGESGeom_OffsetSurface.cxx
blob: f1bff7f5889950cfd287fbafee8ed4850e458d76 (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
//--------------------------------------------------------------------
//
//  File Name : IGESGeom_OffsetSurface.cxx
//  Date      :
//  Author    : CKY / Contract Toubro-Larsen
//  Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------

#include <IGESGeom_OffsetSurface.ixx>
#include <gp_GTrsf.hxx>


    IGESGeom_OffsetSurface::IGESGeom_OffsetSurface ()     {  }


    void IGESGeom_OffsetSurface::Init
  (const gp_XYZ&                      anIndicator,
   const Standard_Real                aDistance,
   const Handle(IGESData_IGESEntity)& aSurface)
{
  theIndicator = anIndicator;
  theDistance  = aDistance;
  theSurface   = aSurface;
  InitTypeAndForm(140,0);
}

    gp_Vec IGESGeom_OffsetSurface::OffsetIndicator () const
{
  return gp_Vec(theIndicator);
}

    gp_Vec IGESGeom_OffsetSurface::TransformedOffsetIndicator () const
{
  if (!HasTransf()) return gp_Vec(theIndicator);
  gp_XYZ temp(theIndicator);
  gp_GTrsf loc = Location();
  loc.SetTranslationPart(gp_XYZ(0.,0.,0.));
  loc.Transforms(temp);
  return gp_Vec(temp);
}

    Standard_Real IGESGeom_OffsetSurface::Distance () const
{
  return theDistance;
}

    Handle(IGESData_IGESEntity) IGESGeom_OffsetSurface::Surface () const
{
  return theSurface;
}