/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGCylinder_HH_ #define _MGCylinder_HH_ #include "mg/Position.h" #include "mg/Unit_vector.h" #include "mg/CSisect_list.h" #include "mg/Surface.h" #include "mg/Ellipse.h" #include "mg/Straight.h" // MGCylinder.h // Header for class MGCylinder class MGTransf; class MGStraight; class MGSBRep; class MGIfstream; class MGOfstream; /** @file */ /** @addtogroup GEO * @{ */ ///MGCylinder is a Cylinder in 3D space. ///Cylinder is expressed by an ellipse and a straight line. ///Cylinder function f(u,v) = m_ellipse(u) + m_axis(v), ///where u and v are two parameter of surface representation. ///Here, m_axis is a straight line whose root point is the origin. /// MGCylinderクラスは3次元空間における円筒面を表すクラスである。 /// MGCylinderクラスでは以下のようなパラメータ表現を使用します。 /// f(u,v) = m_ellipse(u) + m_axis(v); class MG_DLL_DECLR MGCylinder :public MGSurface{ public: MG_DLL_DECLR friend MGCylinder operator+ (const MGVector& v, const MGCylinder& cyl); ///////////////Constructor コンストラクタ////////////// ///Void constructor 初期化なしで柱面を生成する。 MGCylinder(void); //Copy constructor. //MGCylinder(const MGCylinder& cyl); /// Construct a Cylinder by changing this space dimension or /// ordering the coordinates. MGCylinder( int dim, ///< New space dimension. const MGCylinder& cyl, ///< Original Cylinder. int start1=0, ///< Destination order of new Surface. int start2=0 ///< Source order of original Surface. ); /// Construct a cylinder of whole circle whose bottom center is bottom ///and top center is bottom+axis. MGCylinder( const MGPosition& bottom, ///=4. ///The extrapolation is done so that extrapolating length is "length" ///at the position of the parameter value "param" of the perimeter. MGCylinder& extend( int perimeter, /// offset_c1( double ofs_value, ///<オフセット量 int& error ///<エラーコード 0:成功 -1:面におれがある ///< -2:曲率半径以上のオフセット不可 -3:面生成コンストラクタエラー )const; /// 指定点が面上にあるか調べる。(面上ならばtrue) ///Test if a point is on the Cylinder. If on the Cylinder, return true. bool on( const MGPosition& point, ///0. value is input, edge deviation is tested if the deviation is <=max_edge_len. ///< If deviation>max_edge_len, flat_tess will return false. )const; ///Intersection of Surface and a straight line. MGCSisect_list isectSl( const MGStraight& sl,///