/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGEllipse_HH_ #define _MGEllipse_HH_ #include "mg/Curve.h" #include "mg/Position.h" #include "mg/Unit_vector.h" // MGEllipse.h // header for class MGEllipse // class MGInterval; class MGMatrix; class MGTransf; class MGCCisect_list; class MGPosition_list; class MGLBRep; class MGStraight; class MGIfstream; class MGOfstream; class MGKnotVector; class MGIgesDirectoryEntry; /** @file */ /** @addtogroup GEO * @{ */ /// MGEllipse is a class to define an ellipse of 2D or 3D. /// Ellipse is expressed as below using parameter t(radian): /// Point(t) = m_center + m_m * cos(t) + m_n * sin(t), ///where t0 <= t <= t1, -2 pai<=t00., the position reference indicates on which side ///the C lies against the vector (end-start), C and reference lie ///in the same half plane that the vector (end-start) divides. ///If r<0., C and reference lie in the opposite side. ///When r>0., smaller part arc of the circle is selected, ///and when r<0., larger part of the circle is selected. MGEllipse( double r, ///0 のときこれらで分割された円弧の指定点P側を /// d<0 のときPと反対側を作成する。 MGEllipse ( const MGPosition &P ///0) if the point is on the curve, /// and false(0) if the point is not on the curve. /// 点が楕円上にあるか調べる。楕円上であれば,そのパラメータ値を, /// そうでなくても最近傍点のパラメータ値を返す。 bool on( const MGPosition&, ///0) or not(0) /// 与ポイントから楕円への垂線の足、そのポイントでの楕円の ///パラメータ値を返却する。 int perp_point ( const MGPosition &p,/// oneD( const double g[4] ///