/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /* Granted under the MIT license (see mg/MGCL.h for detail) */ /********************************************************************/ #include "MGCLStdAfx.h" #include #include "mg/Pvector.h" #include "mg/Box.h" #include "mg/Curve.h" #include "mg/Tolerance.h" #include "mg/CParam_list.h" #include "mg/SurfCurve.h" #include "topo/LEPoint.h" #include "topo/CPointsVec.h" #include "topo/LCisect_vector.h" #include "topo/Loop.h" #include "topo/Edge.h" #include "topo/Face.h" #include "Tl2/TL2Polyline.h" #include "Tl2/TL2Face.h" #if defined(_DEBUG) #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif mgTL2PlBridge::mgTL2PlBridge( mgTL2Polyline* line,//newed object, whose ownership is transfered to this. const MGLEPoint& le_start,//line's start point's MGLEPoint. const MGLEPoint& le_end//line's end point's MGLEPoint. ):m_polyLine(line), m_le_start(le_start), m_le_end(le_end){;} //Make a cop of m_polyLine and make MGEdge. //Function's return value is newed MGEdge pointer. MGEdge* mgTL2PlBridge::copy_edge(){ mgTL2Polyline* line=new mgTL2Polyline(*m_polyLine); return new MGEdge(line); } //Release m_polyLine object and make MGEdge. //Function's return value is newed MGEdge pointer. //After release_edge, m_polyLine is null. MGEdge* mgTL2PlBridge::release_edge(){ mgTL2Polyline* line=m_polyLine.release(); return new MGEdge(line); } std::ostream& operator<< (std::ostream& out, const mgTL2PlBridge& bridge){ out<<"mgTL2PlBridge:"<<*(bridge.m_polyLine); out<<"start="<