From 9febe29948d7452dafef311073d66d25977147af Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Thu, 21 Jan 2016 16:47:41 +0100 Subject: [PATCH] change point marker aspect for 2D curve edition --- src/CurveCreator/CurveCreator_Curve.cxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/CurveCreator/CurveCreator_Curve.cxx b/src/CurveCreator/CurveCreator_Curve.cxx index 0185e6cf4..e6be346fa 100644 --- a/src/CurveCreator/CurveCreator_Curve.cxx +++ b/src/CurveCreator/CurveCreator_Curve.cxx @@ -37,6 +37,11 @@ #include #include +#include +#include +#include +#define DEBTRACE(msg) {std::cerr< //======================================================================= @@ -247,6 +252,7 @@ void CurveCreator_Curve::getCoordinates( int theISection, int theIPoint, double& void CurveCreator_Curve::redisplayCurve() { + //DEBTRACE("redisplayCurve"); if( myDisplayer ) { myDisplayer->eraseAll( false ); myAISShape = NULL; @@ -779,6 +785,7 @@ bool CurveCreator_Curve::addPoints( const CurveCreator::Coordinates& theCoords, const int theISection, const int theIPnt ) { + //DEBTRACE("addPoints"); bool res = false; CurveCreator::Coordinates aCoords = theCoords; // Set the difference. @@ -834,6 +841,7 @@ bool CurveCreator_Curve::setPoint( const int theISection, const int theIPnt, const CurveCreator::Coordinates& theNewCoords ) { + //DEBTRACE("setPoint"); bool res = false; // Set the difference. startOperation(); @@ -862,6 +870,7 @@ bool CurveCreator_Curve::setPoint( const int theISection, bool CurveCreator_Curve::setSeveralPoints( const SectionToPointCoordsList &theSectionToPntCoords, const bool theIsToSaveDiff ) { + //DEBTRACE("setSeveralPoints"); bool res = false; // Set the difference. startOperation(); @@ -950,6 +959,7 @@ bool CurveCreator_Curve::removeSeveralPoints( const SectionToPointList &theSecti CurveCreator::Coordinates CurveCreator_Curve::getPoint( const int theISection, const int theIPnt) const { + //DEBTRACE("getPoint"); CurveCreator_Section* aSection = (CurveCreator_Section*)getSection( theISection ); CurveCreator::Coordinates::const_iterator anIter = aSection->myPoints.begin() + toICoord(theIPnt); @@ -964,20 +974,29 @@ CurveCreator::Coordinates CurveCreator_Curve::getPoint( const int theISection, //======================================================================= CurveCreator::Coordinates CurveCreator_Curve::getPoints( const int theISection ) const { + //DEBTRACE("getPoints"); CurveCreator_Section* aSection = (CurveCreator_Section*)getSection( theISection ); return aSection ? aSection->myPoints : CurveCreator::Coordinates(); } void CurveCreator_Curve::constructAISObject() { + //DEBTRACE("constructAISObject"); TopoDS_Shape aShape; CurveCreator_Utils::constructShape( this, aShape ); myAISShape = new AIS_Shape( aShape ); + Handle(Prs3d_PointAspect) anAspect = myAISShape->Attributes()->PointAspect(); + anAspect->SetScale( 3.0 ); + anAspect->SetTypeOfMarker(Aspect_TOM_O_POINT); + anAspect->SetColor(Quantity_NOC_ROYALBLUE4); + myAISShape->Attributes()->SetPointAspect( anAspect ); + } Handle(AIS_InteractiveObject) CurveCreator_Curve::getAISObject( const bool theNeedToBuild ) const { + //DEBTRACE("getAISObject"); if ( !myAISShape && theNeedToBuild ) { CurveCreator_Curve* aCurve = (CurveCreator_Curve*)this; aCurve->constructAISObject(); -- 2.39.2