mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
Merge remote branch 'origin/hydro/imps_2015'
This commit is contained in:
commit
ec168c32f8
@ -35,7 +35,7 @@ BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = NO
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
INLINE_INHERITED_MEMB = YES
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@ @PROJECT_BINARY_DIR@
|
||||
STRIP_FROM_INC_PATH =
|
||||
@ -47,8 +47,8 @@ INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 5
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = YES
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
BUILTIN_STL_SUPPORT = @DOXYGEN_SUPPORT_STL@
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
@ -60,7 +60,7 @@ EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
EXTRACT_LOCAL_METHODS = YES
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
@ -70,16 +70,16 @@ CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
SORT_BY_SCOPE_NAME = YES
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 25
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
|
||||
@ -105,11 +105,12 @@ INPUT = @PROJECT_SOURCE_DIR@/src \
|
||||
@CMAKE_CURRENT_SOURCE_DIR@/input
|
||||
FILE_PATTERNS = *.idl *.hxx *.cxx *.h *.c *.hh *.cc @DOXYGEN_PYTHON_EXTENSION@ *.doc
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = YES
|
||||
IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
@ -152,7 +153,7 @@ TOC_EXPAND = YES
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = YES
|
||||
TREEVIEW_WIDTH = 250
|
||||
TREEVIEW_WIDTH = 300
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
@ -214,7 +215,7 @@ PERLMOD_MAKEVAR_PREFIX =
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
@ -240,14 +241,14 @@ HIDE_UNDOC_RELATIONS = NO
|
||||
HAVE_DOT = YES
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = NO
|
||||
GROUP_GRAPHS = NO
|
||||
UML_LOOK = NO
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = YES
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_FONTNAME = Arial
|
||||
DOT_PATH =
|
||||
@ -257,10 +258,10 @@ MAX_DOT_GRAPH_HEIGHT = 1200
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
||||
SEARCHENGINE = YES
|
||||
|
@ -281,6 +281,7 @@ SET( _res_files
|
||||
closedspline.png
|
||||
edit_points.png
|
||||
join2.png
|
||||
bringTogether.png
|
||||
new_point.png
|
||||
new_section.png
|
||||
# ADVANCED_RESOURCES:
|
||||
|
BIN
resources/bringTogether.png
Normal file
BIN
resources/bringTogether.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 645 B |
@ -101,14 +101,15 @@ CurveCreator_TableView::CurveCreator_TableView( CurveCreator_ICurve* theCurve,
|
||||
{
|
||||
setItemDelegate( new CurveCreator_TableItemDelegate( this ) );
|
||||
setVisible( false );
|
||||
setColumnCount( 4 );
|
||||
setColumnCount( 5 );
|
||||
setColumnWidth( 0, SECTION_NAME_COLUMN_WIDTH );
|
||||
setColumnWidth( 1, POINT_INDEX_COLUMN_WIDTH );
|
||||
QStringList aLabels;
|
||||
QString aCoord1 = theCoordTitles.size() > 0 ? theCoordTitles[0] : tr( "TABLE_X" ); // tr( "X_POSITION_LBL" )
|
||||
QString aCoord2 = theCoordTitles.size() > 1 ? theCoordTitles[1] : tr( "TABLE_Y" ); // tr( "Y_POSITION_LBL" )
|
||||
QString aDistance = theCoordTitles.size() > 2 ? theCoordTitles[2] : tr( "DISTANCE_PREV" );
|
||||
//aLabels << tr( "SECTION_LABEL" ) << tr( "IDENTIFIER_LABEL" ) << aCoord1 << aCoord2;
|
||||
aLabels << tr( "TABLE_SECTION" ) << tr("TABLE_INDEX") << aCoord1 << aCoord2;
|
||||
aLabels << tr( "TABLE_SECTION" ) << tr("TABLE_INDEX") << aCoord1 << aCoord2 << aDistance;
|
||||
setHorizontalHeaderLabels( aLabels );
|
||||
|
||||
connect( horizontalHeader(), SIGNAL( sectionClicked( int ) ), this, SLOT( OnHeaderClick( int ) ) );
|
||||
@ -125,6 +126,8 @@ void CurveCreator_TableView::setLocalPointsToTable(
|
||||
setRowCount( thePoints.size() );
|
||||
|
||||
int aRowId = 0;
|
||||
double prevX=0;
|
||||
double prevY=0;
|
||||
CurveCreator_ICurve::SectionToPointList::const_iterator anIt = thePoints.begin(),
|
||||
aLast = thePoints.end();
|
||||
for ( ; anIt != aLast; anIt++ ) {
|
||||
@ -153,7 +156,7 @@ void CurveCreator_TableView::setLocalPointsToTable(
|
||||
setItem( aRowId, 2, anItem );
|
||||
}
|
||||
anItem->setData( Qt::UserRole, aPoint.X() );
|
||||
anItem->setData( Qt::DisplayRole, QString::number( aPoint.X(), 'f', 2 ).toDouble() );
|
||||
anItem->setData( Qt::DisplayRole, QString::number( aPoint.X(), 'f', 3 ).toDouble() );
|
||||
|
||||
anItem = item( aRowId, 3 );
|
||||
if ( !anItem ) {
|
||||
@ -161,7 +164,20 @@ void CurveCreator_TableView::setLocalPointsToTable(
|
||||
setItem( aRowId, 3, anItem );
|
||||
}
|
||||
anItem->setData( Qt::UserRole, aPoint.Y() );
|
||||
anItem->setData( Qt::DisplayRole, QString::number( aPoint.Y(), 'f', 2 ).toDouble() );
|
||||
anItem->setData( Qt::DisplayRole, QString::number( aPoint.Y(), 'f', 3 ).toDouble() );
|
||||
|
||||
anItem = item( aRowId, 4 );
|
||||
if ( !anItem ) {
|
||||
anItem = new QTableWidgetItem();
|
||||
setItem( aRowId, 4, anItem );
|
||||
}
|
||||
double d=0;
|
||||
if (aRowId>0)
|
||||
d=sqrt((aPoint.X()-prevX)* (aPoint.X()-prevX) + (aPoint.Y()-prevY)* (aPoint.Y()-prevY));
|
||||
anItem->setData( Qt::UserRole, d );
|
||||
anItem->setData( Qt::DisplayRole, QString::number( d, 'f', 6 ).toDouble() );
|
||||
prevX = aPoint.X();
|
||||
prevY = aPoint.Y();
|
||||
|
||||
aRowId++;
|
||||
}
|
||||
|
@ -48,6 +48,8 @@
|
||||
#include <QTime>
|
||||
#include <QSplitter>
|
||||
|
||||
#include <utilities.h>
|
||||
|
||||
//#define MEASURE_TIME
|
||||
|
||||
#ifdef MEASURE_TIME
|
||||
@ -118,6 +120,7 @@ CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
|
||||
QPixmap aSplinePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_SPLINE")));
|
||||
QPixmap aRemovePixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_DELETE")));
|
||||
QPixmap aJoinPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_JOIN")));
|
||||
QPixmap aBringTogetherPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_BRING_TOGETHER")));
|
||||
QPixmap aStepUpPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_ARROW_UP")));
|
||||
QPixmap aStepDownPixmap(aResMgr->loadPixmap("GEOM", tr("ICON_CC_ARROW_DOWN")));
|
||||
|
||||
@ -160,9 +163,9 @@ CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
|
||||
anAct->setCheckable(true);
|
||||
connect(anAct, SIGNAL(triggered(bool)), this, SLOT(onDetectionMode(bool)) );
|
||||
connect(anAct, SIGNAL(toggled(bool)), this, SLOT(onModeChanged(bool)) );
|
||||
if ( !(theActionFlags & DisableDetectionMode) ) {
|
||||
aTB->addAction(anAct);
|
||||
}
|
||||
// if ( !(theActionFlags & DisableDetectionMode) ) {
|
||||
// aTB->addAction(anAct);
|
||||
// }
|
||||
|
||||
anAct = createAction( CLOSE_SECTIONS_ID, tr("CLOSE_SECTIONS"), QPixmap(), tr("CLOSE_SECTIONS_TLT"),
|
||||
QKeySequence(Qt::ControlModifier|Qt::Key_W) );
|
||||
@ -181,18 +184,23 @@ CurveCreator_Widget::CurveCreator_Widget(QWidget* parent,
|
||||
tr("SET_SECTIONS_SPLINE_TLT"), QKeySequence(Qt::ControlModifier|Qt::Key_R) );
|
||||
connect(anAct, SIGNAL(triggered()), this, SLOT(onSetSpline()) );
|
||||
|
||||
aTB->addSeparator();
|
||||
|
||||
anAct = createAction( REMOVE_ID, tr("REMOVE"), aRemovePixmap, tr("REMOVE_TLT"),
|
||||
QKeySequence(Qt::ControlModifier|Qt::Key_Delete ) );
|
||||
connect(anAct, SIGNAL(triggered()), this, SLOT(onRemove()) );
|
||||
aTB->addAction(anAct);
|
||||
|
||||
aTB->addSeparator();
|
||||
|
||||
anAct = createAction( JOIN_ID, tr("JOIN"), aJoinPixmap, tr("JOIN_TLT"),
|
||||
QKeySequence(Qt::ControlModifier|Qt::Key_Plus ) );
|
||||
connect( anAct, SIGNAL(triggered()), this, SLOT(onJoin()) );
|
||||
aTB->addAction(anAct);
|
||||
|
||||
anAct = createAction( BRING_TOGETHER_ID, tr("BRING_TOGETHER"), aBringTogetherPixmap, tr("BRING_TOGETHER_TLT"),
|
||||
QKeySequence(Qt::ControlModifier|Qt::Key_Equal ) );
|
||||
connect( anAct, SIGNAL(triggered()), this, SLOT(onBringTogether()) );
|
||||
aTB->addAction(anAct);
|
||||
|
||||
anAct = createAction( CLEAR_ALL_ID, tr("CLEAR_ALL"), QPixmap(), tr("CLEAR_ALL_TLT"),
|
||||
QKeySequence(Qt::ControlModifier | Qt::ShiftModifier | Qt::Key_Delete ) );
|
||||
connect( anAct, SIGNAL(triggered()), this, SLOT( onClearAll()) );
|
||||
@ -383,7 +391,7 @@ void CurveCreator_Widget::updateActionsStates()
|
||||
if( aSectCnt > 1 )
|
||||
anEnabledAct << JOIN_ALL_ID;
|
||||
if( aSelSections.size() > 1 ){
|
||||
anEnabledAct << JOIN_ID;
|
||||
anEnabledAct << JOIN_ID << BRING_TOGETHER_ID;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -974,6 +982,68 @@ void CurveCreator_Widget::addCoordsByClick( QMouseEvent* pe )
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the same coordinates on two section extremities.
|
||||
* Usage: build a closed contour with several sections.
|
||||
* Works with two points selected, at the extremities of different sections.
|
||||
* The second point gets the coordinates of the first.
|
||||
*/
|
||||
void CurveCreator_Widget::onBringTogether()
|
||||
{
|
||||
MESSAGE("onBringTogether");
|
||||
ActionMode aMode = getActionMode();
|
||||
if ( aMode != ModificationMode )
|
||||
return;
|
||||
int nbPoints = myLocalPoints.size();
|
||||
MESSAGE("number of selected points: " << nbPoints);
|
||||
if (nbPoints != 2)
|
||||
{
|
||||
MESSAGE("works only with two points taken at the extremities of different sections, nothing done");
|
||||
return;
|
||||
}
|
||||
|
||||
CurveCreator_ICurve::SectionToPointList::const_iterator anIt = myLocalPoints.begin(),
|
||||
aLast = myLocalPoints.end();
|
||||
std::vector<int> sections(nbPoints);
|
||||
std::vector<int> iPoints(nbPoints);
|
||||
std::vector<int> nbPtsSection(nbPoints);
|
||||
std::vector<double> x(nbPoints);
|
||||
std::vector<double> y(nbPoints);
|
||||
int i = 0;
|
||||
for ( ; anIt != aLast; anIt++, i++ )
|
||||
{
|
||||
CurveCreator_ICurve::SectionToPoint aSPoint = *anIt;
|
||||
sections[i] = aSPoint.first;
|
||||
iPoints[i] = aSPoint.second;
|
||||
nbPtsSection[i] = myCurve->getNbPoints(sections[i]);
|
||||
if ((iPoints[i] != 0) && (iPoints[i] != nbPtsSection[i]-1))
|
||||
{
|
||||
MESSAGE("a point is not on a section extremity, nothing done");
|
||||
return;
|
||||
}
|
||||
gp_Pnt aPoint;
|
||||
CurveCreator_UtilsICurve::getPoint( myCurve, sections[i], iPoints[i], aPoint );
|
||||
x[i] = aPoint.X();
|
||||
y[i] = aPoint.Y();
|
||||
MESSAGE("point: " << sections[i] << " " << iPoints[i] << " " << x[i] << " " << y[i]);
|
||||
}
|
||||
if (sections[1] == sections[0])
|
||||
{
|
||||
MESSAGE("the two points must be at the extremities of different sections, nothing done");
|
||||
return;
|
||||
}
|
||||
|
||||
CurveCreator_ICurve::SectionToPointList aSelPoints;
|
||||
startCurveModification( aSelPoints );
|
||||
|
||||
CurveCreator::Coordinates aChangedPos;
|
||||
aChangedPos.push_back( x[0] ); // apply the first point coordinates to the second point.
|
||||
aChangedPos.push_back( y[0] );
|
||||
myCurve->setPoint( sections[1], iPoints[1], aChangedPos );
|
||||
|
||||
finishCurveModification( aSelPoints );
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage mouse press events
|
||||
* \param theWindow an owner of the signal
|
||||
|
@ -114,6 +114,7 @@ protected slots:
|
||||
void onModifySection();
|
||||
void onCancelSection();
|
||||
void onJoin();
|
||||
void onBringTogether();
|
||||
void onRemove();
|
||||
void onClearAll();
|
||||
void onJoinAll();
|
||||
@ -157,7 +158,8 @@ protected:
|
||||
CLEAR_ALL_ID,
|
||||
SEPARATOR_ID,
|
||||
MODIFICATION_MODE_ID,
|
||||
DETECTION_MODE_ID
|
||||
DETECTION_MODE_ID,
|
||||
BRING_TOGETHER_ID
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -27,6 +27,10 @@
|
||||
<source>ICON_CC_JOIN</source>
|
||||
<translation>join2.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_CC_BRING_TOGETHER</source>
|
||||
<translation>bringTogether.png</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ICON_CC_NEW_POINT</source>
|
||||
<translation>new_point.png</translation>
|
||||
|
@ -5836,6 +5836,10 @@ shells and solids on the other hand.</translation>
|
||||
<source>TABLE_Y</source>
|
||||
<translation>Y</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>DISTANCE_PREV</source>
|
||||
<translation>Distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CurveCreator_Widget</name>
|
||||
@ -5938,8 +5942,16 @@ shells and solids on the other hand.</translation>
|
||||
<message>
|
||||
<source>JOIN_TLT</source>
|
||||
<translation>Join selected sections</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>BRING_TOGETHER</source>
|
||||
<translation>Bring together</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>BRING_TOGETHER_TLT</source>
|
||||
<translation>Bring together two points on the extremities of two sections</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CLEAR_ALL</source>
|
||||
<translation>Clear all</translation>
|
||||
</message>
|
||||
|
Loading…
Reference in New Issue
Block a user