CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FMMdlUtils.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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 __FMMDL_UTILS_H__
24#define __FMMDL_UTILS_H__
25
26#include "Modeler/FMMdlBase.h"
27#include "Ge/GeCircArc3d.h"
28#include "FMContour3D.h"
29#include "FMProfile3D.h"
30#include "Modeler/FMMdlFace.h"
31#include "Modeler/FMMdlEdge.h"
32
33namespace FacetModeler
34{
35
36struct PathNode {
39 enum {
41 };
44 pArcData = 0;
45 flags = 0;
46 }
47};
48
49enum {
54};
55
57 const Profile2D& base,
58 const DeviationParams& deviation,
59 OdUInt32 n,
60 const PathNode* path,
61 OdUInt32 flags = 0 );
62
63FMGEOMETRY_API void getBaseFaces(const Profile2D& rProfile, std::vector<Profile2D>& aBaseFaces, const DeviationParams& devDeviation);
64
66{
68 FMGEOMETRY_API_STATIC static const double kSplitTol;
69 FMGEOMETRY_API_STATIC static const double kZeroTol;
70};
71
73{
74 bool operator() ( const Edge* pE1, const Edge* pE2 ) const
75 {
76 Vertex* pV11 = pE1->vertex();
77 Vertex* pV12 = pE1->next()->vertex();
78
79 Vertex* pV21 = pE2->vertex();
80 Vertex* pV22 = pE2->next()->vertex();
81
82 if ( pV11 > pV12 ) std::swap( pV11, pV12 );
83 if ( pV21 > pV22 ) std::swap( pV21, pV22 );
84
85 if ( pV11 == pV21 && pV12 == pV22 )
86 return false;
87
88 if ( pV11 != pV21 )
89 {
90 return pV11 < pV21;
91 }
92
93 return pV12 < pV22;
94 }
95
96 static bool isEqual( const Edge* pE1, const Edge* pE2 )
97 {
98 EdgeSortForPairRegen cComparer;
99 return (!cComparer( pE1, pE2 )) && (!cComparer( pE2, pE1 ));
100 }
101};
102
103}
104
105#endif // __FMMDL_UTILS_H__
#define FMGEOMETRY_API
#define FMGEOMETRY_API_STATIC
unsigned int OdUInt32
Edge * next() const
Vertex * vertex() const
FMGEOMETRY_API Body extrude(const Profile2D &base, const DeviationParams &deviation, OdUInt32 n, const PathNode *path, OdUInt32 flags=0)
@ kExtrudeSmoothAlongProfile
Definition: FMMdlUtils.h:52
@ kExtrudeSingleArcProfile
Definition: FMMdlUtils.h:53
@ kExtrudeClosedPath
Definition: FMMdlUtils.h:50
@ kExtrudeSmoothAlongPath
Definition: FMMdlUtils.h:51
FMGEOMETRY_API void getBaseFaces(const Profile2D &rProfile, std::vector< Profile2D > &aBaseFaces, const DeviationParams &devDeviation)
bool operator()(const Edge *pE1, const Edge *pE2) const
Definition: FMMdlUtils.h:74
static bool isEqual(const Edge *pE1, const Edge *pE2)
Definition: FMMdlUtils.h:96
static FMGEOMETRY_API_STATIC const double kDefaultTol
Definition: FMMdlUtils.h:67
static FMGEOMETRY_API_STATIC const double kSplitTol
Definition: FMMdlUtils.h:68
static FMGEOMETRY_API_STATIC const double kZeroTol
Definition: FMMdlUtils.h:69
const OdGeCircArc3d * pArcData
Definition: FMMdlUtils.h:38