CFx SDK Documentation  2020SP3
FMProfile2DBool.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 
24 #ifndef __FMPROFILE2DBOOL_H__
25 #define __FMPROFILE2DBOOL_H__
26 
27 #include "FMProfile2D.h"
28 
30 
35 {
36  class Intersector;
37 };
38 
42 namespace FacetModeler
43 {
44 
56 class FMGEOMETRY_API Profile2DBool
57 {
58  public:
63  {
64  eoUnknown = 0,
65  eoOR, // union
66  eoAND, // intersection
67  eoSUB, // difference
68  eoXOR, // exclusive or = union minus intersection
69  eoLastOper
70  };
71 
79  class ArgStub
80  {
81  public:
82  ArgStub( const Contour2D & rC2D, OdUInt32 uPriority = 0 )
83  : m_pProfile(0), m_pContour(&rC2D.impl()), m_uPriority(uPriority) { }
84  ArgStub( const IContour2D & rIC2D, OdUInt32 uPriority = 0 )
85  : m_pProfile(0), m_pContour(&rIC2D), m_uPriority(uPriority) { }
86  ArgStub( const Profile2D & rP2D, OdUInt32 uPriority = 0 )
87  : m_pProfile(&rP2D), m_pContour(0), m_uPriority(uPriority) { }
88 
89  inline const IContour2D * contour() const { return m_pContour; }
90  inline const Profile2D * profile() const { return m_pProfile; }
91  inline OdUInt32 priority() const { return m_uPriority; }
92 
93  ArgStub& setPriority(OdUInt32 uNewP) { m_uPriority = uNewP; return *this; }
94 
95  bool isEmpty() const;
96 
97  bool isSame (const ArgStub& rOther) const;
98 
99  void copyTo (Profile2D& rResult) const;
100 
102 
103  private:
104  const IContour2D * m_pContour;
105  const Profile2D * m_pProfile;
106  OdUInt32 m_uPriority;
107  };
108 
109  public:
114 
119 
124 
125 
141  Operations eOper,
142  ArgStub rArg1,
143  ArgStub rArg2,
144  Profile2D& rResult );
145 
163  Operations eOper,
164  ArgStub rLinesArg,
165  ArgStub rRegionArg,
166  Profile2D& rResult,
167  bool bRegionIsOpen = false );
168 
185  Operations eOper,
186  ArgStub rArg1,
187  ArgStub rArg2,
188  Profile2D& rResult );
189 
200  Result pushRegion( ArgStub rArg, bool bSaveCopy = true );
201 
215 
243  ArgStub rSource,
244  ArgStub rStencilRegion,
245  Profile2D& rResult,
246  OdUInt32 uMask,
247  OdUInt32 uInBits,
248  OdUInt32 uOutBits = 0,
249  OdUInt32 uBoundaryBits = 0
250  );
251 
252  private:
253  OdGeTol m_gTol;
255  };
256 };
257 
258 #endif //__FMPROFILE2DBOOL_H__
FacetModeler::Profile2DBool::evalPushedRegions
Result evalPushedRegions(Operations eOper, Profile2D &rResult)
FacetModeler::FMGeGbl::gTol
static FMGEOMETRY_API_STATIC OdGeTol gTol
Definition: FMGeometry.h:156
FacetModeler::Profile2DBool::~Profile2DBool
~Profile2DBool()
FacetModelerProfile2DBool::Intersector
Definition: FMImpProfile2DBool.h:365
FacetModeler::Profile2DBool::stencilFlags
Result stencilFlags(ArgStub rSource, ArgStub rStencilRegion, Profile2D &rResult, OdUInt32 uMask, OdUInt32 uInBits, OdUInt32 uOutBits=0, OdUInt32 uBoundaryBits=0)
FacetModeler::Contour2D
Definition: FMContour2D.h:75
FacetModeler
Definition: FMContour2D.h:35
FacetModeler::Profile2DBool::evalRegions
Result evalRegions(Operations eOper, ArgStub rArg1, ArgStub rArg2, Profile2D &rResult)
FMProfile2D.h
FacetModelerProfile2DBool::eoUnknown
@ eoUnknown
Definition: FMImpProfile2DBool.h:52
FacetModeler::Profile2DBool::eoSUB
@ eoSUB
Definition: FMProfile2DBool.h:67
FacetModeler::Profile2DBool::ArgStub::numContours
OdUInt32 numContours() const
FacetModeler::Profile2DBool
Definition: FMProfile2DBool.h:57
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
FacetModeler::Profile2DBool::ArgStub::ArgStub
ArgStub(const Contour2D &rC2D, OdUInt32 uPriority=0)
Definition: FMProfile2DBool.h:82
FacetModeler::Profile2DBool::ArgStub::ArgStub
ArgStub(const Profile2D &rP2D, OdUInt32 uPriority=0)
Definition: FMProfile2DBool.h:86
FacetModeler::Profile2DBool::ArgStub::contour
const IContour2D * contour() const
Definition: FMProfile2DBool.h:89
FacetModeler::Profile2DBool::evalLines
Result evalLines(Operations eOper, ArgStub rArg1, ArgStub rArg2, Profile2D &rResult)
FacetModeler::Profile2DBool::ArgStub::setPriority
ArgStub & setPriority(OdUInt32 uNewP)
Definition: FMProfile2DBool.h:93
FacetModeler::IContour2D
Definition: FM_IContour2D.h:38
FacetModeler::Profile2DBool::ArgStub::isSame
bool isSame(const ArgStub &rOther) const
FacetModeler::Profile2DBool::Profile2DBool
Profile2DBool(const OdGeTol &gTol=FMGeGbl::gTol)
FacetModeler::Profile2DBool::eoXOR
@ eoXOR
Definition: FMProfile2DBool.h:68
FacetModeler::Profile2DBool::ArgStub
Definition: FMProfile2DBool.h:80
FacetModeler::Profile2DBool::reset
Profile2DBool & reset(const OdGeTol &gTol=FMGeGbl::gTol)
FacetModeler::Profile2DBool::ArgStub::priority
OdUInt32 priority() const
Definition: FMProfile2DBool.h:91
FacetModeler::Profile2DBool::ArgStub::ArgStub
ArgStub(const IContour2D &rIC2D, OdUInt32 uPriority=0)
Definition: FMProfile2DBool.h:84
FacetModeler::Result
Result
Definition: FMContoursBase.h:44
FacetModeler::Profile2DBool::evalLinesRegion
Result evalLinesRegion(Operations eOper, ArgStub rLinesArg, ArgStub rRegionArg, Profile2D &rResult, bool bRegionIsOpen=false)
FacetModeler::Profile2DBool::ArgStub::profile
const Profile2D * profile() const
Definition: FMProfile2DBool.h:90
FacetModeler::Profile2DBool::ArgStub::isEmpty
bool isEmpty() const
FacetModelerProfile2DBool
DOM.
Definition: FMProfile2DBool.h:35
FacetModeler::Profile2DBool::pushRegion
Result pushRegion(ArgStub rArg, bool bSaveCopy=true)
FacetModeler::Profile2DBool::ArgStub::copyTo
void copyTo(Profile2D &rResult) const
FacetModeler::Profile2D
Definition: FMProfile2D.h:39
OdGeTol
Definition: GeTol.h:49
FacetModeler::Profile2DBool::eoOR
@ eoOR
Definition: FMProfile2DBool.h:65
FacetModeler::Profile2DBool::eoAND
@ eoAND
Definition: FMProfile2DBool.h:66
FacetModeler::Profile2DBool::Operations
Operations
Definition: FMProfile2DBool.h:63