API Documentation
Loading...
Searching...
No Matches
BulgeConverter.h
Go to the documentation of this file.
1#pragma once
4namespace NDEVR
5{
6 /**--------------------------------------------------------------------------------------------------
7 \brief Converts CAD Bulge objects into arc shapes that can be used by the NDEVR API
8 **/
10 {
11 /* Line Intersection
12 * intersectX and intersectY are set to the CenterPoint */
13 static Vertex<3, fltp08> LineIntersection(double lineAx1, double lineAy1,
14 double lineAx2, double lineAy2,
15 double lineBx1, double lineBy1,
16 double lineBx2, double lineBy2);
17 /* Calculus based approach at determining whether a polygon is clockwise or counterclockwise.
18 * Returns true if arc is clockwise. */
19 static bool IsArcClockwise(double startx, double starty, double midx, double midy, double endx, double endy);
20
21 /* Calculates the CenterPoint of the Arc */
22 static Vertex<3, fltp08> ArcCenter(double arcStartX, double arcStartY,
23 double arcMidX, double arcMidY,
24 double arcEndX, double arcEndY);
25
26 /* Calculates Arc Geometry from Bulge Data.
27 * Returns false if there was an error calculating the data. */
28 static void ArcDataFromBulge(fltp08 bulge, const Vertex<3, fltp08>& p1, const Vertex<3, fltp08>& p2,
29 /* returned data */
30 Vertex<3, fltp08>& arc_mid,
31 Vertex<3, fltp08>& arc_center,
32 fltp08& radius,
33 double* chord,
34 double* chordMidX, double* chordMidY,
35 double* sagitta, double* apothem,
36 Angle<fltp08>& span);
37 };
38}
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
Converts CAD Bulge objects into arc shapes that can be used by the NDEVR API.
Definition BulgeConverter.h:10
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
Definition ACIColor.h:37
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149