FEDEM Solver  R8.0
Source code of the dynamics solver
FFa3PArc.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FFA_3P_ARC_H
9 #define FFA_3P_ARC_H
10 
13 
14 
15 class FFa3PArc
16 {
17 public:
18  FFa3PArc(const FaVec3& p1, const FaVec3& p2, const FaVec3& p3)
19  { P[0] = p1; P[1] = p2; P[2] = p3; }
20 
21  static FFa3PArc makeFromTangentP1P2(const FaVec3& t, const FaVec3& p1,
22  const FaVec3& p2, bool startTan = true);
23  static FFa3PArc makeFromP1T1T2L(const FaVec3& p1, const FaVec3& t1,
24  const FaVec3& t2, double arcLength);
25 
26  static FaVec3 findCenter(const FaVec3& P1, FaVec3 P1C,
27  const FaVec3& P2, FaVec3 P2C);
28 
29  FaVec3 getCenter() const;
30  FaVec3 getNormal() const;
31  double getRadius() const;
32 
33  double getArcLength() const;
34  FaVec3 getPointOnArc(double lengthFromStart) const;
35  FaVec3 getTangent(double lengthFromStart) const;
36  double getLengthWMaxDefl(double maxDeflection) const;
37 
38  FaMat34 getCtrlPointMatrix(int pointNumber, const FaVec3& positiveNormal,
39  bool normalIsSignOnly = true) const;
40 
41  bool isArc(double epsilon = 1.0e-10) const;
42  bool isInside(const FaVec3& point) const;
43  bool isOnCenterSide(const FaVec3& point) const;
44 
45  FaVec3 P[3];
46 };
47 
48 #endif
Point vectors in 3D space.
Definition: FFa3PArc.H:16
FaVec3 getNormal() const
Definition: FFa3PArc.C:95
FaVec3 getTangent(double lengthFromStart) const
Definition: FFa3PArc.C:280
FaVec3 getPointOnArc(double lengthFromStart) const
Definition: FFa3PArc.C:266
FFa3PArc(const FaVec3 &p1, const FaVec3 &p2, const FaVec3 &p3)
Definition: FFa3PArc.H:18
double getRadius() const
Definition: FFa3PArc.C:104
bool isOnCenterSide(const FaVec3 &point) const
Definition: FFa3PArc.C:121
bool isInside(const FaVec3 &point) const
Definition: FFa3PArc.C:112
static FFa3PArc makeFromP1T1T2L(const FaVec3 &p1, const FaVec3 &t1, const FaVec3 &t2, double arcLength)
Definition: FFa3PArc.C:168
static FaVec3 findCenter(const FaVec3 &P1, FaVec3 P1C, const FaVec3 &P2, FaVec3 P2C)
Definition: FFa3PArc.C:49
double getArcLength() const
Definition: FFa3PArc.C:253
FaVec3 P[3]
Definition: FFa3PArc.H:45
FaVec3 getCenter() const
Definition: FFa3PArc.C:23
static FFa3PArc makeFromTangentP1P2(const FaVec3 &t, const FaVec3 &p1, const FaVec3 &p2, bool startTan=true)
Definition: FFa3PArc.C:207
FaMat34 getCtrlPointMatrix(int pointNumber, const FaVec3 &positiveNormal, bool normalIsSignOnly=true) const
Definition: FFa3PArc.C:127
double getLengthWMaxDefl(double maxDeflection) const
Definition: FFa3PArc.C:297
bool isArc(double epsilon=1.0e-10) const
Definition: FFa3PArc.C:11
Definition: FFaMat34.H:16
Class for point vectors in 3D space.
Definition: FFaVec3.H:40