1 // File: HLRAppli_ReflectLines.cxx
2 // Created: 05.12.12 12:55:50
3 // Created by: Julia GERASIMOVA
4 // Copyright (c) 2001-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <HLRAppli_ReflectLines.hxx>
18 #include <HLRBRep_Algo.hxx>
19 #include <HLRBRep_HLRToShape.hxx>
20 #include <BRep_Builder.hxx>
23 //=======================================================================
24 //function : HLRAppli_ReflectLines
25 //purpose : Constructor
26 //=======================================================================
28 HLRAppli_ReflectLines::HLRAppli_ReflectLines(const TopoDS_Shape& aShape)
33 //=======================================================================
36 //=======================================================================
38 void HLRAppli_ReflectLines::SetAxes(const Standard_Real Nx,
39 const Standard_Real Ny,
40 const Standard_Real Nz,
41 const Standard_Real XAt,
42 const Standard_Real YAt,
43 const Standard_Real ZAt,
44 const Standard_Real XUp,
45 const Standard_Real YUp,
46 const Standard_Real ZUp)
48 Standard_Boolean IsPerspective = Standard_False;
49 Standard_Real aFocus = 1;
50 //Prs3d_Projector aPrs3dProjector(IsPerspective, aFocus, Nx, Ny, Nz, XAt, YAt, ZAt, XUp, YUp, ZUp);
52 gp_Pnt At (XAt,YAt,ZAt);
53 gp_Dir Zpers (Nx,Ny,Nz);
54 gp_Dir Ypers (XUp,YUp,ZUp);
55 gp_Dir Xpers = Ypers.Crossed(Zpers);
56 gp_Ax3 Axe (At, Zpers, Xpers);
58 T.SetTransformation(Axe);
60 //myProjector = aPrs3dProjector.Projector();
61 myProjector = HLRAlgo_Projector(T,IsPerspective,aFocus);
64 //=======================================================================
67 //=======================================================================
69 void HLRAppli_ReflectLines::Perform()
71 Handle(HLRBRep_Algo) aHLRAlgo = new HLRBRep_Algo();
72 aHLRAlgo->Add( myShape, 0 );
73 aHLRAlgo->Projector( myProjector );
76 HLRBRep_HLRToShape aHLRToShape( aHLRAlgo );
78 myCompound = aHLRToShape.OutLineVCompound3d();
81 //=======================================================================
82 //function : GetResult
84 //=======================================================================
86 TopoDS_Shape HLRAppli_ReflectLines::GetResult() const