Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoNurbsBREPAction.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef _SO_NURBS_BREP_ACTION_
24#define _SO_NURBS_BREP_ACTION_
25
26#include <Inventor/nodes/SoNurbsGroup.h>
27
28#include <Inventor/actions/SoSubAction.h>
29#include <Inventor/STL/vector>
30
31#ifdef _WIN32
32#pragma warning(push)
33#pragma warning(disable:4251)
34#endif
35
36class SoNurbsSurface;
37class SoNurbsBoundary;
38class SoBrep;
39#ifndef HIDDEN_FROM_DOC
40namespace A3DPhigsCrackFreeTess
41{
42 class Pid_polyline_data;
43 class Pid_polygon_data;
44 class Pid_quad_data;
45}
46#endif
47
49
50 SO_ACTION_HEADER(SoNurbsBREPAction);
51
52 public:
55
56 private:
57 virtual void beginTraversal(SoNode *node);
58
59 private:
60 static void initClass() ;
61 static void exitClass() ;
62
63 SbBool needUpdateBREP() { return m_needUpdateBREP; }
64 void setBREP(SoBrep *brep) { m_brep = brep; }
65
66 void setNeedupdatedBREP(SbBool flag) { m_needUpdateBREP = flag; }
67 const std::vector<SoNurbsSurface *> &getNurbsSurfaces();
68 const std::vector<SoNurbsBoundary *> &getNurbsBoundary();
69 void resetNurbsBoundaryID();
70
71 void setCurrPass(int n) { m_currPass = n; }
72
73 int getNextProfileID() { return m_nurbsProfileID++; }
74
75 int getMaxProfileID() { return m_nurbsProfileID; }
76
77 void setNurbsProperty(SoNurbsGroup::NurbsProperty &prop) { m_nurbsProperty = prop; }
78
79 private:
80 static void doNurbsBREPAction(SoAction *action, SoNode *node);
81 static void callDoAction(SoAction *action, SoNode *node);
82 static void updateProfileID(SoAction *action, SoNode *node);
83
84 void updateBREP(SoNurbsSurface *nurbsSurf);
85 void checkCache(SoNurbsSurface *nurbsSurf);
86
87 int m_currPass;
88
89 SbBool m_needUpdateBREP;
90 SoBrep *m_brep;
91
92 int m_nurbsProfileID;
93 std::vector<SoNurbsSurface *> m_nurbsSurfaces;
94 std::vector<SoNurbsBoundary *> m_nurbsBoundary;
95
96 SoNurbsGroup::NurbsProperty m_nurbsProperty;
97};
98
99#ifdef _WIN32
100#pragma warning(pop)
101#endif
102
103#endif /* _SO_NURBS_BREP_ACTION_ */
104
Abstract base class for all actions.
Definition SoAction.h:132
Abstract base class for all database nodes.
Definition SoNode.h:145
virtual ~SoNurbsBREPAction()
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...
NURBS surface shape node.
int SbBool
Boolean type.
Definition SbBase.h:87