Set default values for local variables used for storing values that are obtained by MeshVS_Drawer::Get****() methods
myDataSource (theParentMesh->GetDataSource()),
mySelMethod (theSelMethod)
{
+ myMaxFaceNodes = 0;
theParentMesh->GetDrawer()->GetInteger (MeshVS_DA_MaxFaceNodes, myMaxFaceNodes);
Standard_ASSERT_RAISE (myMaxFaceNodes > 0,
"The maximal amount of nodes in a face must be greater than zero to create sensitive entity");
//Now we are ready to draw faces with equal colors
Aspect_TypeOfLine anEdgeType = Aspect_TOL_SOLID;
Aspect_TypeOfLine aLineType = Aspect_TOL_SOLID;
- Standard_Integer anEdgeInt, aLineInt;
- Standard_Real anEdgeWidth, aLineWidth;
+ Standard_Real anEdgeWidth = 1.0, aLineWidth = 1.0;
Quantity_Color anInteriorColor;
Quantity_Color anEdgeColor, aLineColor;
Standard_Boolean anEdgeOn = Standard_True, IsReflect = Standard_False,
aDrawer->GetBoolean( MeshVS_DA_SmoothShading, IsMeshSmoothShading );
aDrawer->GetBoolean (MeshVS_DA_SupressBackFaces, toSupressBackFaces);
+ Standard_Integer anEdgeInt = Aspect_TOL_SOLID;
if ( aDrawer->GetInteger ( MeshVS_DA_EdgeType, anEdgeInt) )
anEdgeType = (Aspect_TypeOfLine) anEdgeInt;
+ Standard_Integer aLineInt = Aspect_TOL_SOLID;
if ( aDrawer->GetInteger ( MeshVS_DA_BeamType, aLineInt) )
aLineType = (Aspect_TypeOfLine) aLineInt;
aDispMode &= MeshVS_DMF_OCCMask;
//--------------------------------------------------------
- Standard_Real aShrinkCoef;
+ Standard_Real aShrinkCoef = 0.0;
aDrawer->GetDouble ( MeshVS_DA_ShrinkCoeff, aShrinkCoef );
Standard_Boolean IsWireFrame = ( aDispMode==MeshVS_DMF_WireFrame ),
IsShrink = ( aDispMode==MeshVS_DMF_Shrink ),
HasHilightFlag = ( ( DisplayMode & MeshVS_DMF_HilightPrs ) != 0 ),
HasSelectFlag = ( ( DisplayMode & MeshVS_DMF_SelectionPrs ) != 0 ),
- IsMeshReflect, IsMeshAllowOverlap, IsReflect, IsMeshSmoothShading = Standard_False;
+ IsMeshReflect = Standard_False, IsMeshAllowOverlap = Standard_False,
+ IsMeshSmoothShading = Standard_False;
aDrawer->GetBoolean ( MeshVS_DA_Reflection, IsMeshReflect );
aDrawer->GetBoolean ( MeshVS_DA_IsAllowOverlapped, IsMeshAllowOverlap );
- IsReflect = ( IsMeshReflect && !HasHilightFlag );
+ const Standard_Boolean IsReflect = ( IsMeshReflect && !HasHilightFlag );
aDrawer->GetBoolean ( MeshVS_DA_SmoothShading, IsMeshSmoothShading );
// display mode for highlighted prs of groups
// Aspect_InteriorStyle aStyle;
// Standard_Integer aStyleInt;
Aspect_TypeOfLine anEdgeType = Aspect_TOL_SOLID;
- Standard_Integer anEdgeInt;
- Standard_Real anEdgeWidth;
+ Standard_Real anEdgeWidth = 1.0;
Quantity_Color anInteriorColor;
Quantity_Color anEdgeColor, aLineColor;
Standard_Boolean aShowEdges = Standard_True;
aDrawer->GetDouble ( MeshVS_DA_EdgeWidth, anEdgeWidth );
aDrawer->GetBoolean( MeshVS_DA_ShowEdges, aShowEdges );
+ Standard_Integer anEdgeInt = Aspect_TOL_SOLID;
if ( aDrawer->GetInteger ( MeshVS_DA_EdgeType, anEdgeInt ) )
anEdgeType = (Aspect_TypeOfLine) anEdgeInt;
Standard_Real AExpansionFactor = 1.0;
Standard_Real ASpace = 0.0;
Aspect_TypeOfStyleText ATextStyle = Aspect_TOST_ANNOTATION;
- Standard_Integer AStyleInt;
Aspect_TypeOfDisplayText ADisplayType = Aspect_TODT_NORMAL;
- TCollection_AsciiString AFontString;
- Standard_Integer ADispInt;
// Bold font is used by default for better text readability
Font_FontAspect AFontAspectType = Font_FA_Bold;
- Standard_Integer AAspect;
-
aDrawer->GetColor ( MeshVS_DA_TextColor, AColor );
aDrawer->GetDouble ( MeshVS_DA_TextExpansionFactor, AExpansionFactor );
aDrawer->GetDouble ( MeshVS_DA_TextSpace, ASpace );
+ TCollection_AsciiString AFontString = Font_NOF_ASCII_MONO;
if ( aDrawer->GetAsciiString ( MeshVS_DA_TextFont, AFontString ) )
AFont = AFontString.ToCString();
+
+ Standard_Integer AStyleInt = Aspect_TOST_ANNOTATION;
if ( aDrawer->GetInteger ( MeshVS_DA_TextStyle, AStyleInt ) )
ATextStyle = (Aspect_TypeOfStyleText) AStyleInt;
+
+ Standard_Integer ADispInt = Aspect_TODT_NORMAL;
if ( aDrawer->GetInteger ( MeshVS_DA_TextDisplayType, ADispInt ) )
ADisplayType = (Aspect_TypeOfDisplayText) ADispInt;
+
+ Standard_Integer AAspect = Font_FA_Bold;
if ( aDrawer->GetInteger ( MeshVS_DA_TextFontAspect, AAspect ) )
- AFontAspectType = (Font_FontAspect)AAspect;
+ AFontAspectType = (Font_FontAspect)AAspect;
Handle (Graphic3d_AspectText3d) aTextAspect = new Graphic3d_AspectText3d ( AColor, AFont, AExpansionFactor, ASpace,
ATextStyle, ADisplayType );