/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #include "MGCLStdAfx.h" #include "mg/Pvector.h" #include "mg/Tolerance.h" #include "mg/Straight.h" #include "mg/LBRep.h" #include "mg/TrimmedCurve.h" #include "mg/SurfCurve.h" #include "mg/CParam_list.h" #include "mg/Plane.h" #include "mg/SBRep.h" #include "topo/Edge.h" #include "topo/Loop.h" #include "topo/Face.h" #if defined(_DEBUG) #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif using namespace std; //Comparison operator. bool MGFSurface::operator< (const MGFSurface& f2) const{ const MGFace* face1=dynamic_cast(this); const MGFace* face2=dynamic_cast(&f2); if(face1 && face2) return (*face1)<(*face2); if((!face1) && (!face2)) return *(get_surface_pointer())< *(f2.get_surface_pointer()); return false; } //Get the box of the object. const MGBox& MGFSurface::get_box() const{ const MGObject* obj=object_pointer(); return obj->box(); } /** * @brief eval_discrete_deviationの下請け関数 * @param face1 一方の面データ * @param face2 もう一方の面データ * @param wcrv1 face1側エッジのワールドカーブ(must be trimmed into evaluatin range). * @param wcrv2 face2側エッジのワールドカーブ(must be trimmed into evaluatin range). * @param pcrv1 face1側エッジの面上パラメータカーブ(must be the same range as wcrv1). * @param pcrv2 face2側エッジの面上パラメータカーブ(must be the same range as wcrv2). * * wcrv1とwcrv2はほぼ共線となっている。 */ void deviation( const MGFSurface& face1,///& uvuvs///equal_direction(pcrv1,wcrv1)==1; MGPosition wcrv2s = wcrv2.start_point(), wcrv2e = wcrv2.end_point(); MGPosition uv2s=pcrv2.start_point(), uv2e=pcrv2.end_point(); bool w2_equal_to_p2=face2.get_surface_pointer()->equal_direction(pcrv2,wcrv2)==1; //std::cout << "端点:\n"; //std::cout << "f1S:uv="<