Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OCC functionality moving out from the widget
[modules/hydro.git]
/
src
/
HYDROCurveCreator
/
CurveCreator_Curve.cxx
diff --git
a/src/HYDROCurveCreator/CurveCreator_Curve.cxx
b/src/HYDROCurveCreator/CurveCreator_Curve.cxx
index 824338b29055919aa2f048b9efc3a97e2ef0724e..25939c148716e0bf549d00a75a4e8cb04a5838e5 100644
(file)
--- a/
src/HYDROCurveCreator/CurveCreator_Curve.cxx
+++ b/
src/HYDROCurveCreator/CurveCreator_Curve.cxx
@@
-43,6
+43,8
@@
#include <stdio.h>
#include <stdio.h>
+//#define AIS_CURVE_DISPLAY
+
//=======================================================================
// function: Constructor
// purpose:
//=======================================================================
// function: Constructor
// purpose:
@@
-56,6
+58,9
@@
CurveCreator_Curve::CurveCreator_Curve( const CurveCreator::Dimension theDimensi
myUndoDepth (-1),
myOpLevel(0)
{
myUndoDepth (-1),
myOpLevel(0)
{
+#ifdef AIS_CURVE_DISPLAY
+ myAISCurve = new CurveCreator_AISCurve( this );
+#endif
}
//=======================================================================
}
//=======================================================================
@@
-105,6
+110,10
@@
std::string CurveCreator_Curve::getUniqSectionName() const
void CurveCreator_Curve::setDisplayer( CurveCreator_Displayer* theDisplayer )
{
myDisplayer = theDisplayer;
void CurveCreator_Curve::setDisplayer( CurveCreator_Displayer* theDisplayer )
{
myDisplayer = theDisplayer;
+
+#ifdef AIS_CURVE_DISPLAY
+ myDisplayer->displayAIS( myAISCurve, false );
+#endif
}
//=======================================================================
}
//=======================================================================
@@
-352,8
+361,12
@@
void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double&
void CurveCreator_Curve::redisplayCurve()
{
if( myDisplayer ) {
void CurveCreator_Curve::redisplayCurve()
{
if( myDisplayer ) {
- myDisplayer->erase();
- myDisplayer->display( constructWire() );
+#ifdef AIS_CURVE_DISPLAY
+ myDisplayer->redisplayAIS(myAISCurve, false);
+#else
+ myDisplayer->erase( false );
+ myDisplayer->display( constructWire(), true );
+#endif
}
}
}
}
@@
-472,7
+485,7
@@
bool CurveCreator_Curve::clearInternal()
{
// erase curve from the viewer
if( myDisplayer )
{
// erase curve from the viewer
if( myDisplayer )
- myDisplayer->erase();
+ myDisplayer->erase(
true
);
// Delete all allocated data.
int i = 0;
const int aNbSections = getNbSections();
// Delete all allocated data.
int i = 0;
const int aNbSections = getNbSections();
@@
-520,20
+533,18
@@
bool CurveCreator_Curve::joinInternal( const int theISectionTo,
return res;
}
return res;
}
-//! Join range of sections to one section (join all sections if -1 is passed in
one of arguments
)
+//! Join range of sections to one section (join all sections if -1 is passed in
theISectionFrom argument
)
bool CurveCreator_Curve::join( const int theISectionTo,
const int theISectionFrom )
{
bool CurveCreator_Curve::join( const int theISectionTo,
const int theISectionFrom )
{
+ //TODO
bool res = false;
bool res = false;
- if (mySections.size() >= 2 &&
- ( theISectionTo != theISectionFrom || (theISectionTo == -1 && theISectionFrom == -1) )) {
+ if ( theISectionTo != theISectionFrom ) {
startOperation();
startOperation();
- int aISectionTo = getNbSections()-1;
- int aISectionFrom = 0;
if (addEmptyDiff())
if (addEmptyDiff())
- myListDiffs.back().init(this, CurveCreator_Operation::Join,
aISectionTo, a
ISectionFrom);
+ myListDiffs.back().init(this, CurveCreator_Operation::Join,
theISectionTo, the
ISectionFrom);
- res = joinInternal(
aISectionTo, a
ISectionFrom );
+ res = joinInternal(
theISectionTo, the
ISectionFrom );
finishOperation();
}
finishOperation();
}