/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGShell_HH_ #define _MGShell_HH_ #include #include "mg/MGCL.h" #include "mg/Default.h" #include "mg/drawParam.h" #include "mg/Pvector.h" #include "mg/Position_list.h" #include "mg/FPoint.h" #include "topo/Complex.h" #include "topo/Boundary.h" #include "topo/CFisect_vector.h" #include "topo/Face.h" #include "topo/HHisect.h" #include "topo/HHisect_vector.h" class MGFSurface; class MGIgesOfstream; /** @file */ /** @addtogroup TOPO * @{ */ ///MGShell is a composition of MGFace's(trimmed surface). ///See topology structure. class MG_DLL_DECLR MGShell: public MGBoundary{ public: /////////Constructor///////// ///Default constructor. MGShell(){;}; ///Construct a shell of one face. ///Copy version of face. MGShell(const MGFace& face); ///Construct a shell of one face. ///face is a pointer to newed face, and the ownership ///will be transfered to MGShell. explicit MGShell(MGFace* face); ///Construct a shell of one face. ///Copy version of face. MGShell(const MGFSurface& face); ///Construct a shell of one face. ///face is a pointer to newed face, and the ownership ///will be transfered to MGShell. explicit MGShell(MGFSurface* face); ///Fundamental constructor. ///Construct from boundary complex(i.e. MGLoop). ///This constructor takes the ownership of MGCell* in boundary. MGShell( std::list boundaries /// perps(const MGPosition& point) const; ///Obtain the projected curves of a curve onto the shell. ///The direction of the projection is along the vector vec if the vec is not ///NULL, and normal to the shell if the vec is NULL. ///Output of 'project' is two kind of curves: ///one is general world coordinate curves(iline() of the MGHHisect members of lines), ///and the other is (u,v) curves of the parameter space of the surfaces ///(uvline1() of the MGHHisect members of lines ). ///*** uvline2() of the MGHHisect members of lines is a deque of length zero ///(not used). ///Function's return value is the number of curves obtained. ///When <0 is returned, some internal error occured. int project( const MGCurve& crv, ///& trisVec )const; ///Return MGShell pointer if this MGGel is an MGShell, else return null. MGShell* shell(){return this;}; const MGShell* shell()const{return this;}; ///Obtain boundary and main parameter lines of the FSurface. ///skeleton includes boundary() and inner parameter lines. ///density indicates how many inner parameter lines are necessary ///for both u and v directions. MGPvector skeleton(int density=1)const; ///Obtain all the parameter curves at knots of u and v knot vector. MGPvector skeleton_at_knots()const; virtual std::string whoami()const{return "Shell";}; protected: ///Read Object's member data. void ReadMembers(MGIfstream& buf); ///Write Object's Member Data void WriteMembers(MGOfstream& buf) const; private: ///Copy constructor with mapping. ///Binder cells of the pcells in loop will be registered in cmap MGShell( const MGShell& shell, /// for face(i) for i=0,...,number_of_faces()-1. void MG_DLL_DECLR set_up_shell_shade( const MGShell& shell,///& boudaries,/// >& polylines///