CFx SDK Documentation  2023 SP0
FMImpProfile2DBoundary.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2015, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2015 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 #ifndef __FMIMPPROFILE2DBOUNDARY_H__
24 #define __FMIMPPROFILE2DBOUNDARY_H__
25 
26 #include "Contours/FMImpSegmentNet2D.h"
27 
28 namespace FacetModeler
29 {
30 
32 {
33  public:
35  {
36  m_cCore.reset( tol );
37  m_bCachedRawData = false;
38  m_aGeoS.clear();
39  m_aGeoC.clear();
40  m_aGeoP.clear();
41  }
42 
43  const OdGeTol& tol() const
44  {
45  return m_cCore.getTol();
46  }
47 
48  void setTol( const OdGeTol& tTol )
49  {
51  m_cCore.reset( tTol );
52  }
53 
54  inline void invalidateGeometry()
55  {
56  m_bCachedRawData = false;
57  }
58 
59  inline void clearGeometry()
60  {
62 
63  m_aGeoS.clear();
64  m_aGeoC.clear();
65  m_aGeoP.clear();
66  }
67 
69  {
70  if ( m_bCachedRawData )
71  return;
72 
73  m_cCore.reset( m_cCore.getTol() );
74 
75  size_t i, iSize = m_aGeoS.size();
76  for ( i = 0; i < iSize; i++ )
77  m_cCore.addSegment( m_aGeoS[ i ] );
78 
79  iSize = m_aGeoC.size();
80  for ( i = 0; i < iSize; i++ )
81  m_cCore.addSegments( m_aGeoC[ i ] );
82 
83  iSize = m_aGeoP.size();
84  for ( i = 0; i < iSize; i++ )
85  m_cCore.addSegments( m_aGeoP[ i ] );
86 
87  m_bCachedRawData = true;
88  }
89 
91  std::vector<Segment2D> m_aGeoS;
92  std::vector<Contour2D> m_aGeoC;
93  std::vector<Profile2D> m_aGeoP;
94 
95  FMSegmentNet2D::SegNetProcessor m_cCore;
96 };
97 
98 }
99 
100 #endif // __FMIMPPROFILE2DBOUNDARY_H__
FMSegmentNet2D::SegNetProcessor m_cCore
Definition: GeTol.h:49