]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
AIS presentation for a curve creator
authornds <nds@opencascade.com>
Mon, 2 Dec 2013 11:26:09 +0000 (11:26 +0000)
committernds <nds@opencascade.com>
Mon, 2 Dec 2013 11:26:09 +0000 (11:26 +0000)
src/HYDROCurveCreator/CurveCreator_AISCurve.cxx
src/HYDROCurveCreator/CurveCreator_Curve.cxx

index 668e8564115a08974c4668a0cd7815e711e589e0..b6a2d60aeba7d285115252f3d0324e8c7a2f7234 100644 (file)
@@ -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<double> 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 );
   }
 }
 
index 25939c148716e0bf549d00a75a4e8cb04a5838e5..823f8df1d7a967252de3f532c8f0923710180bee 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <stdio.h>
 
-//#define AIS_CURVE_DISPLAY
+#define AIS_CURVE_DISPLAY
 
 //=======================================================================
 // function: Constructor