ChangeRepresentation(this, VISU::SHRINK);
}
+//----------------------------------------------------------------------------
+void
+VisuGUI
+::OnMakeFeatureEdges()
+{
+ ChangeRepresentation(this, VISU::FEATURE_EDGES);
+}
+
//----------------------------------------------------------------------------
void
VisuGUI
tr("MEN_UNSHRINK"), "", 0, aParent, false,
this, SLOT(OnMakeShrink()));
+ createAction( VISU_FEATURE_EDGES, tr("MEN_FEATURE_EDGES"), QIcon(),
+ tr("MEN_FEATURE_EDGES"), "", 0, aParent, false,
+ this, SLOT(OnMakeFeatureEdges()));
+
createAction( VISU_SHADING, tr("MEN_SHADING"), QIcon(),
tr("MEN_SHADING"), "", 0, aParent, false,
this, SLOT(OnSetShadingOn()));
createMenu( VISU_PLOT_3D, aMenuId, 10 ); // Plot3d
createMenu( VISU_SCALAR_MAP_ON_DEFORMED_SHAPE, aMenuId, 10 ); // scalar map on deformed shape
- aMenuId = createMenu( tr( "MEN_SELECTION" ), -1, -1, 30 );
- createMenu( VISU_SELECTION_INFO, aMenuId, 10 ); // selection info
+ //aMenuId = createMenu( tr( "MEN_SELECTION" ), -1, -1, 30 );
+ //createMenu( VISU_SELECTION_INFO, aMenuId, 10 ); // selection info
aMenuId = createMenu( tr( "MEN_REPRESENTATION" ), -1, -1, 30 );
int parentId =
mgr->insert( action( VISU_SURFACE ) , parentId, -1, -1 ); // surface
mgr->insert( action( VISU_INSIDEFRAME ) , parentId, -1, -1 ); // insideframe
mgr->insert( action( VISU_SURFACEFRAME ), parentId, -1, -1 ); // surfaceframe
+ mgr->insert( action( VISU_FEATURE_EDGES ), parentId, -1, -1 ); // feature edges
mgr->insert( action( VISU_SHRINK ) , parentId, -1, -1 ); // shrink
mgr->insert( action( VISU_UNSHRINK ) , parentId, -1, -1 ); // unshrink
mgr->insert( separator(), parentId, -1, -1 );
mgr->insert( action( VISU_CURVE_PROPS ), -1, -1, -1 ); // curve properties
- mgr->insert( action( VISU_SELECTION_INFO ), -1, -1, -1 ); // Selection info
+ //mgr->insert( action( VISU_SELECTION_INFO ), -1, -1, -1 ); // Selection info
mgr->insert( action( VISU_MULTIPR_FULL_RES ), -1, -1, -1 );
mgr->insert( action( VISU_MULTIPR_MED_RES ), -1, -1, -1 );
QString aShrinkType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TDEFORMEDSHAPE' 'VISU::TSCALARMAPONDEFORMEDSHAPE'}";
QString aLineType = " and $type in {'VISU::TMESH' 'VISU::TSCALARMAP' 'VISU::TSCALARMAP' 'VISU::TISOSURFACES' 'VISU::TDEFORMEDSHAPE' "
"'VISU::TCUTPLANES' 'VISU::TCUTLINES' 'VISU::TSTREAMLINES' 'VISU::TPLOT3D' 'VISU::TSCALARMAPONDEFORMEDSHAPE' }";
+ QString aFeatureEdgesType = " and $type in {'VISU::TMESH'}";
aRule = "selcount=1";
mgr->setRule( action( VISU_CLIPPING ), aRule + aPrsType );
aPrsType = " and $type in {'VISU::TMESH' " + aPrsAll + "}";
// "Representation" submenu
- QString aNotPoints = " and $representation in {'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
- QString aNotWirefr = " and $representation in {'VISU::POINT' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
- QString aNotSurfac = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
- QString aNotInside = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::SURFACEFRAME'}";
- QString aNotSurffr = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME'}";
+ QString aNotPoints = " and $representation in {'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+ QString aNotWirefr = " and $representation in {'VISU::POINT' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+ QString aNotSurfac = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+ QString aNotInside = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::SURFACEFRAME' 'VISU::FEATURE_EDGES'}";
+ QString aNotSurffr = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::FEATURE_EDGES'}";
+ QString aNotFeatureEdges = " and $representation in {'VISU::POINT' 'VISU::WIREFRAME' 'VISU::SHADED' 'VISU::INSIDEFRAME' 'VISU::SURFACEFRAME'}";
mgr->setRule( action( VISU_POINTS ) , aRule + aPrsType + aNotPoints );
mgr->setRule( action( VISU_WIREFRAME ) , aRule + aPrsType + aNotWirefr );
mgr->setRule( action( VISU_SURFACE ) , aRule + aSurfType + aNotSurfac );
mgr->setRule( action( VISU_INSIDEFRAME ) , aRule + anInsideType + aNotInside );
mgr->setRule( action( VISU_SURFACEFRAME ), aRule + aSurfFrameType + aNotSurffr );
+ mgr->setRule( action( VISU_FEATURE_EDGES ), aRule + aFeatureEdgesType + aNotFeatureEdges );
mgr->setRule( action( VISU_SHRINK ) , aRule + aShrinkType + " and isShrunk=0" );
mgr->setRule( action( VISU_UNSHRINK ), aRule + aShrinkType + " and isShrunk=1" );
mgr->setRule( action( VISU_SWEEP ), aRule );
// "Selection info" popup item
- aRule = "client='VTKViewer' and selcount=1" + anInsideType;
- mgr->setRule( action( VISU_SELECTION_INFO ), aRule );
+ //aRule = "client='VTKViewer' and selcount=1" + anInsideType;
+ //mgr->setRule( action( VISU_SELECTION_INFO ), aRule );
aRule = "client='ObjectBrowser' and selcount>0";
aRule += " and $type in {'VISU::TFIELD'}";
mesh_modes.append( "Insideframe" );
mesh_modes.append( "Surfaceframe" );
mesh_modes.append( "Surface" );
+ mesh_modes.append( "Feature edges" );
QList<QVariant> mesh_indices;
mesh_indices.append( 0 );
mesh_indices.append( 1 );
mesh_indices.append( 3 );
mesh_indices.append( 4 );
mesh_indices.append( 2 );
+ mesh_indices.append( 5 );
+
+ QStringList modes0 = mesh_modes;
+ modes0.removeAll( "Feature edges" );
+ QList<QVariant> indices0 = mesh_indices;
+ indices0.removeAll( 5 );
- QStringList modes1 = mesh_modes;
+ QStringList modes1 = modes0;
modes1.removeAll( "Insideframe" );
- QList<QVariant> indices1 = mesh_indices;
+ QList<QVariant> indices1 = indices0;
indices1.removeAll( 3 );
QStringList modes2 = modes1;
addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "mesh_shrink" );
int scalar_map_represent = addPreference( tr( "VISU_SCALAR_MAP" ), representGr, LightApp_Preferences::Selector, "VISU", "scalar_map_represent" );
- setPreferenceProperty( scalar_map_represent, "strings", mesh_modes );
- setPreferenceProperty( scalar_map_represent, "indexes", mesh_indices );
+ setPreferenceProperty( scalar_map_represent, "strings", modes0 );
+ setPreferenceProperty( scalar_map_represent, "indexes", indices0 );
addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "scalar_map_shrink" );
int iso_surfaces_represent = addPreference( tr( "VISU_ISO_SURFACES" ), representGr, LightApp_Preferences::Selector, "VISU", "iso_surfaces_represent" );
addPreference( "", representGr, LightApp_Preferences::Space );
int deformed_shape_represent = addPreference( tr( "VISU_DEFORMED_SHAPE" ), representGr, LightApp_Preferences::Selector, "VISU", "deformed_shape_represent" );
- setPreferenceProperty( deformed_shape_represent, "strings", mesh_modes );
- setPreferenceProperty( deformed_shape_represent, "indexes", mesh_indices );
+ setPreferenceProperty( deformed_shape_represent, "strings", modes0 );
+ setPreferenceProperty( deformed_shape_represent, "indexes", indices0 );
addPreference( tr( "VISU_SHRINK" ), representGr, LightApp_Preferences::Bool, "VISU", "deformed_shape_shrink" );
int vectors_represent = addPreference( tr( "VISU_VECTORS" ), representGr, LightApp_Preferences::Selector, "VISU", "vectors_represent" );
addPreference( tr( "VISU_DISP_ONLY" ), representGr,
LightApp_Preferences::Bool, "VISU", "display_only" );
+
+ // TAB: Feature edges ; group: "Feature edges properties"
+ int featureEdgesTab = addPreference( tr( "VISU_FEATURE_EDGES" ) );
+
+ int featureEdgesGr = addPreference( tr( "VISU_FEATURE_EDGES_PROPS" ), featureEdgesTab );
+ setPreferenceProperty( featureEdgesGr, "columns", 2 );
+
+ int featureEdgesAnglePref = addPreference( tr( "VISU_FEATURE_EDGES_ANGLE" ), featureEdgesGr,
+ LightApp_Preferences::DblSpin, "VISU", "feature_edges_angle" );
+ setPreferenceProperty( featureEdgesAnglePref, "step", 1.0 );
+ setPreferenceProperty( featureEdgesAnglePref, "min", 0.0 );
+ setPreferenceProperty( featureEdgesAnglePref, "max", 90.0 );
+
+ addPreference( tr( "VISU_FEATURE_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "feature_edges" );
+ addPreference( tr( "VISU_BOUNDARY_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "boundary_edges" );
+ addPreference( tr( "VISU_MANIFOLD_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "manifold_edges" );
+ addPreference( tr( "VISU_NON_MANIFOLD_EDGES" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "non_manifold_edges" );
+ addPreference( tr( "VISU_FEATURE_EDGES_COLORING" ), featureEdgesGr, LightApp_Preferences::Bool, "VISU", "feature_edges_coloring" );
}
void VisuGUI::preferencesChanged( const QString& a, const QString& b)