aBorderColor = myEditedObject->GetBorderColor();
}
- myPreviewPrs->setFillingColor( aFillingColor, false, false );
- myPreviewPrs->setBorderColor( aBorderColor, false, false );
TopoDS_Face aFace;
if( !aZoneShape.IsNull() )
aFace = TopoDS::Face( aZoneShape );
myPreviewPrs->setFace( aFace, true, true, "" );
+ myPreviewPrs->setFillingColor( aFillingColor, false, false );
+ myPreviewPrs->setBorderColor( aBorderColor, false, false );
}
QApplication::restoreOverrideCursor();
#include <BRepBuilderAPI_MakeFace.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Prs3d_IsoAspect.hxx>
-#include <Prs3d_ShadingAspect.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
TopoDS_Shape aPolylineShape = aPolyline->GetShape();
- if ( !aPolylineShape.IsNull() ) {
- if ( aPolylineShape.ShapeType() == TopAbs_WIRE ) {
+ if ( !aPolylineShape.IsNull() )
+ {
+ if ( aPolylineShape.ShapeType() == TopAbs_WIRE )
+ {
TopoDS_Wire aPolylineWire = TopoDS::Wire( aPolylineShape );
setWire( aPolylineWire, false, false );
- } else {
+ }
+ else
+ {
myTopoShape = aPolylineShape;
// Set shading mode to avoid that hilight presentation is equal to "normal" object presentation.
// Note that hilight presentation is always to be on top ( i.e. in the top Z layer ).
TopoDS_Face aZoneFace = TopoDS::Face( aZone->GetShape() );
setFace( aZoneFace, false, false, "" );
- if (aZone->IsMergingNeed() && aZone->GetMergeType() == HYDROData_Zone::Merge_UNKNOWN )
+ if( aZone->IsMergingNeed() && aZone->GetMergeType() == HYDROData_Zone::Merge_UNKNOWN )
{
// Red color for a zone with bathymetry conflict
setFillingColor( Qt::red );
}
anIsoAspect = anAttributes->VIsoAspect();
- if ( !anIsoAspect.IsNull() ) {
+ if ( !anIsoAspect.IsNull() )
+ {
anIsoAspect->SetNumber( 0 );
anAttributes->SetVIsoAspect( anIsoAspect );
}
if ( myDisplayMode == AIS_Shaded )
{
- Handle(Prs3d_ShadingAspect) aShadingAspect = anAttributes->ShadingAspect();
- if ( !aShadingAspect.IsNull() )
- {
- Graphic3d_MaterialAspect aMatAspect( Graphic3d_NOM_PLASTIC );
- //aMatAspect.SetAmbient( 1 );
- //aMatAspect.SetDiffuse( 0 );
-
- aShadingAspect->Aspect()->SetFrontMaterial( aMatAspect );
- aShadingAspect->Aspect()->SetBackMaterial( aMatAspect );
- }
+ myShape->SetMaterial( Graphic3d_NOM_PLASTIC );
}
else if ( myDisplayMode == AIS_WireFrame )
{
{
if ( myDisplayMode == AIS_Shaded )
{
- // Coloring face filling
- Handle(Prs3d_ShadingAspect) aShadingAspect = anAttributes->ShadingAspect();
- if ( !aShadingAspect.IsNull() )
- {
- Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ),
- getQuantityColorVal( myFillingColor.green() ),
- getQuantityColorVal( myFillingColor.blue() ),
- Quantity_TOC_RGB );
+ Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ),
+ getQuantityColorVal( myFillingColor.green() ),
+ getQuantityColorVal( myFillingColor.blue() ),
+ Quantity_TOC_RGB );
- aShadingAspect->SetColor( aFillingColor );
- aShadingAspect->SetTransparency( 1 - getQuantityColorVal( myFillingColor.alpha() ) );
- }
+ myShape->SetColor( aFillingColor );
+ myShape->SetTransparency( 1 - getQuantityColorVal( myFillingColor.alpha() ) );
}
else if ( myDisplayMode == AIS_WireFrame )
{