1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + This file is part of enGrid. +
5 // + Copyright 2008-2014 enGits GmbH +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef __vtkEgNormalExtrusion_h
22 #define __vtkEgNormalExtrusion_h
24 class vtkEgNormalExtrusion
;
26 #include "vtkEgGridFilter.h"
27 #include "meshpartition.h"
32 class vtkEgNormalExtrusion
: public vtkEgGridFilter
35 protected: // attributes
37 enum mode_t
{ normal
, fixed
, planar
, cylinder
, rotation
, curve
};
39 QVector
<double> layer_y
;
41 vec3_t origin
, axis
, fixed_normal
;
46 bool m_RemoveInternalFaces
;
52 // data for extrusion along curve
55 bool m_OrthoExtrusion
;
56 QVector
<vec3_t
> m_InitialBaseCoords
;
61 static vtkEgNormalExtrusion
* New();
62 void SetLayers(const QVector
<double> &y
);
63 void SetOrigin(vec3_t x
) { origin
= x
; }
64 void SetAxis(vec3_t x
) { axis
= x
; }
65 void SetNormal(vec3_t x
) { fixed_normal
= x
; }
66 void SetMinDist(double d
) { min_dist
= d
; }
67 void SetCylindrical() { m_Mode
= cylinder
; }
68 void SetFixed() { m_Mode
= fixed
; }
69 void SetPlanar() { m_Mode
= planar
; }
70 void SetRotation() { m_Mode
= rotation
; }
71 void SetCurves(Curve
* curve1
, Curve
* curve2
);
72 void OrthoExtrusionOn() { m_OrthoExtrusion
= true; }
73 void OrthoExtrusionOff() { m_OrthoExtrusion
= false; }
74 void SetRestrictNone() { m_ScaleX
= 1; m_ScaleY
= 1; m_ScaleZ
= 1; }
75 void SetRestrictXY() { m_ScaleX
= 1; m_ScaleY
= 1; m_ScaleZ
= 0; }
76 void SetRestrictXZ() { m_ScaleX
= 1; m_ScaleY
= 0; m_ScaleZ
= 1; }
77 void SetRestrictYZ() { m_ScaleX
= 0; m_ScaleY
= 1; m_ScaleZ
= 1; }
78 void SetRemoveInternalFacesOn() { m_RemoveInternalFaces
= true; }
79 void SetRemoveInternalFacesOff() { m_RemoveInternalFaces
= false; }
80 void SetCustomBottomBc(int bc
) { m_CustomBottomBc
= bc
; }
81 void SetCustomSideBc(int bc
) { m_CustomSideBc
= bc
; }
82 void SetCustomTopBc(int bc
) { m_CustomTopBc
= bc
; }
87 vtkEgNormalExtrusion();
88 ~vtkEgNormalExtrusion() {}
89 virtual void ExecuteEg();
91 int getNewBc(MeshPartition
*part
, vtkIdType id_node1
, vtkIdType id_node2
);
92 bool PrepareCurveExtrusion(QVector
<vtkIdType
> nodes
);
93 mat3_t
ComputeBase(double l
);
98 vtkEgNormalExtrusion (const vtkEgNormalExtrusion
&);
99 void operator= (const vtkEgNormalExtrusion
&);