CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FMGeometry.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
24#ifndef __FMGEOMETRY_H__
25#define __FMGEOMETRY_H__
26
27#include <OdaCommon.h>
28#include "FMBuildSettings.h"
29#include "FMSTLHelper.h"
30#include <Ge/GeTol.h>
31#include <Ge/GePlane.h>
32#include <Ge/GeMatrix2d.h>
33#include <Ge/GeLine2d.h>
34
35#define FMGE_ANGLE_TO_MINUSPI_PI(x) ( (x>OdaPI)?(x-Oda2PI):(x) )
36
37namespace FacetModeler
38{
43 {
48
56 DeviationParams(double deviation, OdUInt16 maxpercircle, OdUInt16 minpercircle);
57
59 double Deviation;
64 };
65
70 {
72 eUnion = 0,
73
76
79
81 eXOR = 3
82 };
83
91 BooleanOperation eOperation);
92
97 {
99 eNo = 0,
100
102 eOn = 1,
103
106
109
111 eSpanning = 4
112 };
113
122 {
125
127 efoTop = 0x01,
128
130 efoBottom = 0x02,
131
133 efoLeft = 0x04,
134
136 efoRight = 0x08,
137
139 efoFront = 0x10,
140
142 efoBack = 0x20,
143
145 efoDiscard = 0x80
146 };
147
152 {
162
170
180 FMGEOMETRY_API_STATIC static OdUInt16 GetSegmentCount(double dAngle, double dRadius,
181 const DeviationParams& devDeviation);
182
189 static FaceOrientation PlaneOrientation(const OdGeVector3d& normal);
190
199
200 };
201
204 return normal.x > 0. ? efoRight : efoLeft;
205 }
206 else if (normal.isParallelTo(OdGeVector3d::kYAxis)) {
207 return normal.y > 0. ? efoBack : efoFront;
208 }
209 else if (normal.isParallelTo(OdGeVector3d::kZAxis)) {
210 return normal.z > 0. ? efoTop : efoBottom;
211 }
212 return efoDefault;
213 }
214
215}
216
217#endif //__FMGEOMETRY_H__
#define FMGEOMETRY_API
#define FMGEOMETRY_API_STATIC
unsigned short OdUInt16
Definition: GeTol.h:49
static GE_STATIC_EXPORT const OdGeVector3d kZAxis
Definition: GeVector3d.h:103
bool isParallelTo(const OdGeVector3d &vect, const OdGeTol &tol=OdGeContext::gTol) const
static GE_STATIC_EXPORT const OdGeVector3d kYAxis
Definition: GeVector3d.h:102
static GE_STATIC_EXPORT const OdGeVector3d kXAxis
Definition: GeVector3d.h:101
FMGEOMETRY_API OdString GetBoolOperationName(BooleanOperation eOperation)
DeviationParams(double deviation, OdUInt16 maxpercircle, OdUInt16 minpercircle)
static FaceOrientation PlaneOrientation(const OdGeVector3d &normal)
Definition: FMGeometry.h:202
static FMGEOMETRY_API_STATIC OdUInt16 GetSegmentCount(double dAngle, double dRadius, const DeviationParams &devDeviation)
static FMGEOMETRY_API_STATIC DeviationParams gDefDev
Definition: FMGeometry.h:161
static FMGEOMETRY_API_STATIC FaceOrientation GetReversedOrientation(FaceOrientation eOri)
static FMGEOMETRY_API_STATIC OdGeTol gTol
Definition: FMGeometry.h:169