1 //--------------------------------------------------------------------
3 // File Name : IGESSolid_RightAngularWedge.cxx
5 // Author : CKY / Contract Toubro-Larsen
6 // Copyright : MATRA-DATAVISION 1993
8 //--------------------------------------------------------------------
10 #include <IGESSolid_RightAngularWedge.ixx>
11 #include <gp_GTrsf.hxx>
14 IGESSolid_RightAngularWedge::IGESSolid_RightAngularWedge () { }
17 void IGESSolid_RightAngularWedge::Init
18 (const gp_XYZ& aSize, const Standard_Real LowX,
19 const gp_XYZ& aCorner, const gp_XYZ& anXAxis, const gp_XYZ& anZAxis)
22 theXSmallLength = LowX;
23 theCorner = aCorner; // default (0,0,0)
24 theXAxis = anXAxis; // default (1,0,0)
25 theZAxis = anZAxis; // default (0,0,1)
26 InitTypeAndForm(152,0);
29 gp_XYZ IGESSolid_RightAngularWedge::Size () const
34 Standard_Real IGESSolid_RightAngularWedge::XBigLength () const
39 Standard_Real IGESSolid_RightAngularWedge::XSmallLength () const
41 return theXSmallLength;
44 Standard_Real IGESSolid_RightAngularWedge::YLength () const
49 Standard_Real IGESSolid_RightAngularWedge::ZLength () const
54 gp_Pnt IGESSolid_RightAngularWedge::Corner () const
56 return gp_Pnt(theCorner);
59 gp_Pnt IGESSolid_RightAngularWedge::TransformedCorner () const
61 if (!HasTransf()) return gp_Pnt(theCorner);
64 gp_XYZ tmp = theCorner;
65 Location().Transforms(tmp);
70 gp_Dir IGESSolid_RightAngularWedge::XAxis () const
72 return gp_Dir(theXAxis);
75 gp_Dir IGESSolid_RightAngularWedge::TransformedXAxis () const
77 if (!HasTransf()) return gp_Dir(theXAxis);
80 gp_XYZ tmp = theXAxis;
81 gp_GTrsf loc = Location();
82 loc.SetTranslationPart(gp_XYZ(0.,0.,0.));
88 gp_Dir IGESSolid_RightAngularWedge::YAxis () const
90 return gp_Dir(theXAxis ^ theZAxis); // ^ overloaded
93 gp_Dir IGESSolid_RightAngularWedge::TransformedYAxis () const
95 if (!HasTransf()) return gp_Dir(theXAxis ^ theZAxis);
98 gp_XYZ tmp = theXAxis ^ theZAxis;
99 gp_GTrsf loc = Location();
100 loc.SetTranslationPart(gp_XYZ(0.,0.,0.));
106 gp_Dir IGESSolid_RightAngularWedge::ZAxis () const
108 return gp_Dir(theZAxis);
111 gp_Dir IGESSolid_RightAngularWedge::TransformedZAxis () const
113 if (!HasTransf()) return gp_Dir(theZAxis);
116 gp_XYZ tmp = theZAxis;
117 gp_GTrsf loc = Location();
118 loc.SetTranslationPart(gp_XYZ(0.,0.,0.));