0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / BRepProj / BRepProj_Projection.hxx
CommitLineData
42cf5bc1 1// Created on: 1998-11-13
2// Created by: Jean-Michel BOULCOURT
3// Copyright (c) 1998-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License 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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepProj_Projection_HeaderFile
18#define _BRepProj_Projection_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <TopoDS_Shape.hxx>
26#include <TopoDS_Compound.hxx>
27#include <TopTools_HSequenceOfShape.hxx>
28#include <Standard_Integer.hxx>
29#include <TopoDS_Wire.hxx>
30class Standard_NoSuchObject;
31class Standard_ConstructionError;
32class Standard_NullObject;
33class TopoDS_Shape;
34class gp_Dir;
35class gp_Pnt;
36
37
38//! The Projection class provides conical and
39//! cylindrical projections of Edge or Wire on
40//! a Shape from TopoDS. The result will be a Edge
41//! or Wire from TopoDS.
42class BRepProj_Projection
43{
44public:
45
46 DEFINE_STANDARD_ALLOC
47
48
49 //! Makes a Cylindrical projection of Wire om Shape
50 Standard_EXPORT BRepProj_Projection(const TopoDS_Shape& Wire, const TopoDS_Shape& Shape, const gp_Dir& D);
51
52 //! Makes a Conical projection of Wire om Shape
53 Standard_EXPORT BRepProj_Projection(const TopoDS_Shape& Wire, const TopoDS_Shape& Shape, const gp_Pnt& P);
54
55 //! returns False if the section failed
56 Standard_Boolean IsDone() const;
57
58 //! Resets the iterator by resulting wires.
59 void Init();
60
61 //! Returns True if there is a current result wire
62 Standard_Boolean More() const;
63
64 //! Move to the next result wire.
65 void Next();
66
67 //! Returns the current result wire.
68 TopoDS_Wire Current() const;
69
70 //! Returns the complete result as compound of wires.
71 TopoDS_Compound Shape() const;
72
73
74
75
76protected:
77
78
79
80
81
82private:
83
84
85 //! Performs section of theShape by theTool
86 //! and stores result in the fields.
87 Standard_EXPORT void BuildSection (const TopoDS_Shape& Shape, const TopoDS_Shape& Tool);
88
89
90 Standard_Boolean myIsDone;
91 TopoDS_Shape myLsh;
92 TopoDS_Compound myShape;
93 Handle(TopTools_HSequenceOfShape) mySection;
94 Standard_Integer myItr;
95
96
97};
98
99
100#include <BRepProj_Projection.lxx>
101
102
103
104
105
106#endif // _BRepProj_Projection_HeaderFile