#include <BRepOffsetAPI_MakePipeShell.hxx>
#include <BRepOffsetAPI_MakePipe.hxx>
#include <BRepCheck_Analyzer.hxx>
-#include <BRepTools.hxx>
#include <TopExp.hxx>
QStringList HYDROData_Channel::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
{
- QStringList aResList = HYDROData_Entity::DumpToPython( theTreatedObjects );
+ QStringList aResList = dumpObjectCreation( theTreatedObjects );
+ QString aName = GetObjPyName();
+
+ Handle(HYDROData_Polyline3D) aRefGideLine = GetGuideLine();
+ setPythonReferenceObject( theTreatedObjects, aResList, aRefGideLine, "SetGuideLine" );
+
+ Handle(HYDROData_Profile) aRefProfile = GetProfile();
+ setPythonReferenceObject( theTreatedObjects, aResList, aRefProfile, "SetProfile" );
- // TODO
+ aResList << QString( "" );
+ aResList << QString( "%1.Update();" ).arg( aName );
+ aResList << QString( "" );
return aResList;
}
if(aProfileWire.IsNull())
return;
+#ifdef DEB_CHANNEL
BRepTools::Write( aPathWire, "guideline.brep" );
BRepTools::Write( aProfileWire, "profile.brep" );
+#endif
HYDROData_Canal3dAnd2d aChannelConstructor( aProfileWire, aPathWire );
aChannelConstructor.Create3dPresentation();
SetShape3D( aChannelConstructor.Get3dPresentation() );
SetTopShape( aChannelConstructor.Get2dPresentation() );
+#ifdef DEB_CHANNEL
BRepTools::Write( aChannelConstructor.Get2dPresentation(), "channel2d.brep" );
BRepTools::Write( aChannelConstructor.Get3dPresentation(), "channel3d.brep" );
+#endif
TopAbs_ShapeEnum aType = GetTopShape().ShapeType();
TopoDS_Wire anInlet = aChannelConstructor.GetInlet();
TopoDS_Wire anOutlet = aChannelConstructor.GetOutlet();
+#ifdef DEB_CHANNEL
+ HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Top shape edges:", GetTopShape(), TopAbs_EDGE );
+ HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Left bank edges:", aLeftBank, TopAbs_EDGE );
+ HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Right bank edges:", aRightBank, TopAbs_EDGE );
+ HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Inlet edges:", anInlet, TopAbs_EDGE );
+ HYDROData_ShapesTool::DumpShapeSubShapes( std::cout, "Outlet edges:", anOutlet, TopAbs_EDGE );
+#endif
+
TopTools_SequenceOfShape aLeftBankEdges;
HYDROData_ShapesTool::ExploreShapeToShapes( aLeftBank, TopAbs_EDGE, aLeftBankEdges );