From: nds Date: Mon, 2 Dec 2013 11:26:09 +0000 (+0000) Subject: AIS presentation for a curve creator X-Git-Tag: BR_hydro_v_0_4~108 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=100c5bfedd7562979a95346b82e56b257884625d;p=modules%2Fhydro.git AIS presentation for a curve creator --- diff --git a/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx b/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx index 668e8564..b6a2d60a 100644 --- a/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx +++ b/src/HYDROCurveCreator/CurveCreator_AISCurve.cxx @@ -44,17 +44,18 @@ void CurveCreator_AISCurve::Compute( const Handle(PrsMgr_PresentationManager3d)& const Standard_Integer theMode ) { thePrs->Clear(); + //AIS_Shape::Compute( thePM, thePrs, theMode ); for( int iSection = 0 ; iSection < myCurve->getNbSections() ; iSection++ ) { //TopoDS_Shape aShape; - CurveCreator::SectionType aSectType = myCurve->getSectionType( iSection ); int aSectSize = myCurve->getNbPoints( iSection ); bool aSectIsClosed = myCurve->isClosed( iSection ); - /*if( aSectType == CurveCreator::Polyline ) + //if( aSectType == CurveCreator::Polyline ) { - int iPoint = 0; + + /*int iPoint = 0; for( ; iPoint < ( aSectSize - 1 ) ; iPoint++ ){ Handle_AIS_Point anAISPnt = getAISPoint(theISection, iPoint); aSectionRepresentation.push_back( anAISPnt ); @@ -69,7 +70,8 @@ void CurveCreator_AISCurve::Compute( const Handle(PrsMgr_PresentationManager3d)& aSectionRepresentation.push_back( aLine ); } } - }*/ + */ + } //else if( aSectType == CurveCreator::Spline ) { std::vector aPoints; @@ -111,14 +113,10 @@ void CurveCreator_AISCurve::Compute( const Handle(PrsMgr_PresentationManager3d)& TopoDS_Wire aWire = BRepBuilderAPI_MakeWire( anEdge ).Wire(); - //Handle(AIS_Shape) aShape = new AIS_Shape( aWire ); - //aSectionRepresentation.push_back( aShape ); - StdPrs_WFDeflectionShape::Add( thePrs, aWire/*aShape*/, myDrawer ); - //Quantity_Color aColor( 200, 200, 100, Quantity_TOC_RGB ); - //SetColor(aColor); + Set( aWire ); + AIS_Shape::Compute( thePM, thePrs, theMode ); } } - //StdPrs_WFDeflectionShape::Add( thePrs, aShape, myDrawer ); } } diff --git a/src/HYDROCurveCreator/CurveCreator_Curve.cxx b/src/HYDROCurveCreator/CurveCreator_Curve.cxx index 25939c14..823f8df1 100644 --- a/src/HYDROCurveCreator/CurveCreator_Curve.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Curve.cxx @@ -43,7 +43,7 @@ #include -//#define AIS_CURVE_DISPLAY +#define AIS_CURVE_DISPLAY //======================================================================= // function: Constructor