1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0027068: Coding - eliminate VC++ 14 compiler warnings in MFC samples

Code is corrected to avoid compiler warnings
This commit is contained in:
abv 2016-01-09 09:33:40 +03:00
parent e31a8e52bb
commit e0280ce92e
8 changed files with 93 additions and 95 deletions

View File

@ -1440,8 +1440,7 @@ Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve(); \n\
AddSeparator(aDoc,Message); AddSeparator(aDoc,Message);
//-------------------------------------------------------------- //--------------------------------------------------------------
TCollection_AsciiString aString; TCollection_AsciiString aString;
Standard_Integer i; for(int i = array.Lower();i<=array.Upper();i++)
for(i = array.Lower();i<=array.Upper();i++)
{ {
gp_Pnt2d P = array(i); gp_Pnt2d P = array(i);
TCollection_AsciiString Message2 (i); TCollection_AsciiString Message2 (i);
@ -1455,7 +1454,7 @@ Handle(Geom2d_BSplineCurve) SPL3 = anInterpolation2.Curve(); \n\
aString = "harray ";aString += Message2; aString = "harray ";aString += Message2;
DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); DisplayPoint(aDoc,P,aString.ToCString(),false,0.5);
} }
for( i = harray2->Lower();i<=harray2->Upper();i++) for( int i = harray2->Lower();i<=harray2->Upper();i++)
{ {
gp_Pnt2d P = harray2->Value(i); gp_Pnt2d P = harray2->Value(i);
TCollection_AsciiString Message2 (i); TCollection_AsciiString Message2 (i);
@ -1881,10 +1880,10 @@ void GeomSources::gpTest26(CGeometryDoc* aDoc)
TColgp_Array2OfPnt2d aSolutionArray(1,NbExtrema,1,2); TColgp_Array2OfPnt2d aSolutionArray(1,NbExtrema,1,2);
for(int i=1;i <= NbExtrema; i++) for(int i=1;i <= NbExtrema; i++)
{ {
gp_Pnt2d P1,P2; gp_Pnt2d P1x,P2x;
ECC2.Points(i,P1,P2); ECC2.Points(i,P1x,P2x);
aSolutionArray(i,1) = P1; aSolutionArray(i,1) = P1x;
aSolutionArray(i,2) = P2; aSolutionArray(i,2) = P2x;
} }
//============================================================== //==============================================================
@ -1955,17 +1954,17 @@ for(int i=1;i <= NbExtrema; i++) { \n\
for(int i=1;i <= NbExtrema; i++) for(int i=1;i <= NbExtrema; i++)
{ {
gp_Pnt2d P1 =aSolutionArray(i,1); gp_Pnt2d P1x =aSolutionArray(i,1);
TCollection_AsciiString Message2 (i); TCollection_AsciiString Message2 (i);
aString = "P1_"; aString = "P1_";
aString += Message2; aString += Message2;
DisplayPoint(aDoc,P1,aString.ToCString(),false,0.7*i); DisplayPoint(aDoc,P1x,aString.ToCString(),false,0.7*i);
gp_Pnt2d P2 = aSolutionArray(i,2); gp_Pnt2d P2x = aSolutionArray(i,2);
Handle(Geom2d_TrimmedCurve) SolutionCurve = Handle(Geom2d_TrimmedCurve) SolutionCurve =
GCE2d_MakeSegment(P1,P2); GCE2d_MakeSegment(P1x,P2x);
Handle(ISession2D_Curve) aSolutionCurve = new ISession2D_Curve(SolutionCurve); Handle(ISession2D_Curve) aSolutionCurve = new ISession2D_Curve(SolutionCurve);
aDoc->GetISessionContext()->Display(aSolutionCurve, Standard_False); aDoc->GetISessionContext()->Display(aSolutionCurve, Standard_False);
} }
@ -2162,10 +2161,9 @@ void GeomSources::gpTest30(CGeometryDoc* aDoc)
gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3); gp_Circ2d C = gce_MakeCirc2d (P1,P2,P3);
GccEnt_QualifiedCirc QC = GccEnt::Outside(C); GccEnt_QualifiedCirc QC = GccEnt::Outside(C);
GccAna_Lin2d2Tan LT (QC,P4,Precision::Confusion()); GccAna_Lin2d2Tan LT (QC,P4,Precision::Confusion());
Standard_Integer NbSol = 0;
if (LT.IsDone()) if (LT.IsDone())
{ {
NbSol = LT.NbSolutions(); Standard_Integer NbSol = LT.NbSolutions();
for(Standard_Integer k=1; k<=NbSol; k++) for(Standard_Integer k=1; k<=NbSol; k++)
{ {
gp_Lin2d L = LT.ThisSolution(k); gp_Lin2d L = LT.ThisSolution(k);
@ -2214,14 +2212,14 @@ if (LT.IsDone()) \n\
{ {
gp_Lin2d L = LT.ThisSolution(k); gp_Lin2d L = LT.ThisSolution(k);
Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-10,20); Handle(Geom2d_TrimmedCurve) aLine = GCE2d_MakeSegment(L,-10,20);
Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aLine); Handle(ISession2D_Curve) aCurveN = new ISession2D_Curve(aLine);
aDoc->GetISessionContext()->Display(aCurve, Standard_False); aDoc->GetISessionContext()->Display(aCurveN, Standard_False);
} }
} }
Message += " C is Blue \n\n"; Message += " C is Blue \n\n";
Message += "LT.IsDone() = "; Message += "LT.IsDone() = ";
if (LT.IsDone()) Message += "True \n"; else Message += "False \n"; if (LT.IsDone()) Message += "True \n"; else Message += "False \n";
TCollection_AsciiString Message2 (NbSol); TCollection_AsciiString Message2 (LT.NbSolutions());
Message += "NbSol = "; Message += Message2 ; Message += "\n"; Message += "NbSol = "; Message += Message2 ; Message += "\n";
PostProcess(aDoc,ID_BUTTON_Test_30,TheDisplayType,Message); PostProcess(aDoc,ID_BUTTON_Test_30,TheDisplayType,Message);
@ -2324,9 +2322,9 @@ if (TR.IsDone()) \n
for (Standard_Integer k=1; k<=NbSol; k++) for (Standard_Integer k=1; k<=NbSol; k++)
{ {
circ = TR.ThisSolution(k); circ = TR.ThisSolution(k);
Handle(Geom2d_Circle) aCircle = new Geom2d_Circle(circ); Handle(Geom2d_Circle) aCircleN = new Geom2d_Circle(circ);
Handle(ISession2D_Curve) aCurve = new ISession2D_Curve(aCircle); Handle(ISession2D_Curve) aCurveN = new ISession2D_Curve(aCircleN);
aDoc->GetISessionContext()->Display(aCurve, Standard_False); aDoc->GetISessionContext()->Display(aCurveN, Standard_False);
// find the solution circle // find the solution circle
TR.Tangency1(k,parsol,pararg,tangentpoint1); TR.Tangency1(k,parsol,pararg,tangentpoint1);
@ -2682,14 +2680,14 @@ if(CS.IsDone()) \n\
Standard_Integer k; Standard_Integer k;
if(CS.IsDone()) if(CS.IsDone())
{ {
Standard_Integer NbSeg = CS.NbSegments(); NbSeg = CS.NbSegments();
for (k=1; k<=NbSeg; k++) for (k=1; k<=NbSeg; k++)
{ {
TCollection_AsciiString Message2 (k); TCollection_AsciiString Message2 (k);
segment = CS.Segment(k); segment = CS.Segment(k);
aString = "S_";aString += Message2; aString = "S_";aString += Message2;
Handle(ISession_Curve) aCurve = new ISession_Curve(segment); Handle(ISession_Curve) aCurveN = new ISession_Curve(segment);
aDoc->GetAISContext()->Display(aCurve, Standard_False); aDoc->GetAISContext()->Display(aCurveN, Standard_False);
} }
for ( k=1; k<=NbPoints; k++) for ( k=1; k<=NbPoints; k++)
@ -2881,9 +2879,10 @@ if (PE.IsSpace()) { /* ... */ } \n\
TCollection_AsciiString aString; TCollection_AsciiString aString;
for(Standard_Integer i = anArrayofPnt.Lower();i<=anArrayofPnt.Upper();i++){ for(Standard_Integer i = anArrayofPnt.Lower();i<=anArrayofPnt.Upper();i++){
TCollection_AsciiString Message2(i); TCollection_AsciiString Message2(i);
gp_Pnt P = anArrayofPnt(i); gp_Pnt aP = anArrayofPnt(i);
aString = "P";aString += Message2; aString = "P";
DisplayPoint(aDoc,P,aString.ToCString(),false,0.5); aString += Message2;
DisplayPoint(aDoc,aP,aString.ToCString(),false,0.5);
} }
Message += " PE.IsPoint() = "; if (PE.IsPoint()) Message += "True \n"; else Message += "False\n"; Message += " PE.IsPoint() = "; if (PE.IsPoint()) Message += "True \n"; else Message += "False\n";

View File

@ -21,9 +21,9 @@
#include <Geom_Plane.hxx> #include <Geom_Plane.hxx>
#include <BRepTools.hxx> #include <BRepTools.hxx>
Handle(AIS_Shape) AIS1; static Handle(AIS_Shape) AIS1;
TopoDS_Face F1,F2; static TopoDS_Face THE_F1, THE_F2;
TopoDS_Edge E1,E2; static TopoDS_Edge THE_E1, THE_E2;
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CModelingDoc // CModelingDoc
@ -4756,10 +4756,10 @@ void CModelingDoc::OnFillwithtang()
if (myAISContext->MoreCurrent()) { if (myAISContext->MoreCurrent()) {
Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current()); Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current());
try { try {
F1 = TopoDS::Face(ashape->Shape()); THE_F1 = TopoDS::Face(ashape->Shape());
} }
catch(Standard_Failure){} catch(Standard_Failure){}
if (F1.IsNull()) if (THE_F1.IsNull())
{ {
AfxMessageBox (L"Current object is not a face!\n\ AfxMessageBox (L"Current object is not a face!\n\
Please, select a face to continue\nthe creation of a tangent surface."); Please, select a face to continue\nthe creation of a tangent surface.");
@ -4807,7 +4807,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
if (myState == SELECT_EDGE_PLATE_TGTES_1) { if (myState == SELECT_EDGE_PLATE_TGTES_1) {
myAISContext->InitSelected(); myAISContext->InitSelected();
if (myAISContext->MoreSelected()) { if (myAISContext->MoreSelected()) {
E1 = TopoDS::Edge(myAISContext->SelectedShape()); THE_E1 = TopoDS::Edge(myAISContext->SelectedShape());
myAISContext->CloseLocalContext(); myAISContext->CloseLocalContext();
myState = SELECT_EDGE_PLATE_TGTES_2; myState = SELECT_EDGE_PLATE_TGTES_2;
@ -4821,7 +4821,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
myAISContext->SetCurrentObject(aLI.First()); myAISContext->SetCurrentObject(aLI.First());
myAISContext->InitCurrent(); myAISContext->InitCurrent();
Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current()); Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current());
F2 = TopoDS::Face(ashape->Shape()); THE_F2 = TopoDS::Face(ashape->Shape());
myAISContext->OpenLocalContext(); myAISContext->OpenLocalContext();
myAISContext->Activate(ashape,2); myAISContext->Activate(ashape,2);
myState = SELECT_EDGE_PLATE_TGTES_3; myState = SELECT_EDGE_PLATE_TGTES_3;
@ -4845,7 +4845,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
myAISContext->InitCurrent(); myAISContext->InitCurrent();
if (myAISContext->MoreCurrent()) { if (myAISContext->MoreCurrent()) {
Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current()); Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->Current());
F2 = TopoDS::Face(ashape->Shape()); THE_F2 = TopoDS::Face(ashape->Shape());
myAISContext->OpenLocalContext(); myAISContext->OpenLocalContext();
myAISContext->Activate(ashape,2); myAISContext->Activate(ashape,2);
myState = SELECT_EDGE_PLATE_TGTES_3; myState = SELECT_EDGE_PLATE_TGTES_3;
@ -4857,7 +4857,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
else if (myState == SELECT_EDGE_PLATE_TGTES_3) { else if (myState == SELECT_EDGE_PLATE_TGTES_3) {
myAISContext->InitSelected(); myAISContext->InitSelected();
if (myAISContext->MoreSelected()) { if (myAISContext->MoreSelected()) {
E2 = TopoDS::Edge(myAISContext->SelectedShape()); THE_E2 = TopoDS::Edge(myAISContext->SelectedShape());
myAISContext->CloseLocalContext(); myAISContext->CloseLocalContext();
Standard_Integer i, nbPntsOnFaces=10; Standard_Integer i, nbPntsOnFaces=10;
@ -4868,9 +4868,9 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
gp_Pnt P, PP; gp_Pnt P, PP;
//get the pcurve, curve and surface //get the pcurve, curve and surface
BRepAdaptor_Curve Curve3d1(E1), Curve3d2(E2); BRepAdaptor_Curve Curve3d1(THE_E1), Curve3d2(THE_E2);
BRepAdaptor_Curve2d Curve2d1(E1,F1), Curve2d2(E2,F2); BRepAdaptor_Curve2d Curve2d1(THE_E1,THE_F1), Curve2d2(THE_E2,THE_F2);
BRepAdaptor_Surface Surf1(F1), Surf2(F2); BRepAdaptor_Surface Surf1(THE_F1), Surf2(THE_F2);
//compute the average plane : initial surface //compute the average plane : initial surface
Handle(TColgp_HArray1OfPnt) theTanPoints = new Handle(TColgp_HArray1OfPnt) theTanPoints = new
@ -4981,12 +4981,12 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
// Face building ... // Face building ...
Handle(Geom2d_Curve)C1,C2,C3,C4; Handle(Geom2d_Curve)C1,C2,C3,C4;
Handle(Geom_Curve)C; Handle(Geom_Curve)C;
C = BRep_Tool::Curve(E1,First,Last); C = BRep_Tool::Curve(THE_E1,First,Last);
TolProj = 0.01; TolProj = 0.01;
C1 = GeomProjLib::Curve2d(C,First,Last,theSurface,TolProj); C1 = GeomProjLib::Curve2d(C,First,Last,theSurface,TolProj);
TopoDS_Edge Ed1 = BRepBuilderAPI_MakeEdge(C1,theSurface).Edge(); TopoDS_Edge Ed1 = BRepBuilderAPI_MakeEdge(C1,theSurface).Edge();
C = BRep_Tool::Curve(E2,First,Last); C = BRep_Tool::Curve(THE_E2,First,Last);
TolProj = 0.01; TolProj = 0.01;
C3 = GeomProjLib::Curve2d(C,First,Last,theSurface,TolProj); C3 = GeomProjLib::Curve2d(C,First,Last,theSurface,TolProj);
TopoDS_Edge Ed3 = BRepBuilderAPI_MakeEdge(C3,theSurface).Edge(); TopoDS_Edge Ed3 = BRepBuilderAPI_MakeEdge(C3,theSurface).Edge();
@ -5005,10 +5005,10 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
if (!BRepAlgo::IsValid(theFace)){ if (!BRepAlgo::IsValid(theFace)){
C2 = GCE2d_MakeSegment(C1->Value(C1->LastParameter()), C2 = GCE2d_MakeSegment(C1->Value(C1->LastParameter()),
C3->Value(C3->FirstParameter())).Value(); C3->Value(C3->FirstParameter())).Value();
TopoDS_Edge Ed2 = BRepBuilderAPI_MakeEdge(C2,theSurface).Edge(); Ed2 = BRepBuilderAPI_MakeEdge(C2,theSurface).Edge();
C4 = GCE2d_MakeSegment(C3->Value(C3->LastParameter()), C4 = GCE2d_MakeSegment(C3->Value(C3->LastParameter()),
C1->Value(C1->FirstParameter())).Value(); C1->Value(C1->FirstParameter())).Value();
TopoDS_Edge Ed4 = BRepBuilderAPI_MakeEdge(C4,theSurface).Edge(); Ed4 = BRepBuilderAPI_MakeEdge(C4,theSurface).Edge();
Ed3.Reverse(); Ed3.Reverse();
theWire = BRepBuilderAPI_MakeWire(Ed1,Ed2,Ed3,Ed4); theWire = BRepBuilderAPI_MakeWire(Ed1,Ed2,Ed3,Ed4);
theFace = BRepBuilderAPI_MakeFace(theWire); theFace = BRepBuilderAPI_MakeFace(theWire);

View File

@ -294,8 +294,8 @@ void TexturesExt_Presentation::sampleTerrain()
gp_Trsf aMoveTrsf; gp_Trsf aMoveTrsf;
gp_Ax3 New(gp_Pnt(-30,-30, 0),gp_Dir(0,0,1)); gp_Ax3 New(gp_Pnt(-30,-30, 0),gp_Dir(0,0,1));
gp_Ax3 Current(aPnt,gp_Dir(0,0,1)); gp_Ax3 aCurrent(aPnt,gp_Dir(0,0,1));
aMoveTrsf.SetDisplacement(Current, New); aMoveTrsf.SetDisplacement(aCurrent, New);
gp_Trsf aScaleTrsf; gp_Trsf aScaleTrsf;
aScaleTrsf.SetScale(aPnt,0.0075); aScaleTrsf.SetScale(aPnt,0.0075);

View File

@ -192,7 +192,6 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
aBuild1.MakeCompound(aComp1); aBuild1.MakeCompound(aComp1);
aBuild2.MakeCompound(aComp2); aBuild2.MakeCompound(aComp2);
TopTools_SequenceOfShape aVertices;
Standard_Integer aCount = 0; Standard_Integer aCount = 0;
Standard_Integer aNumOfNodes = 0; Standard_Integer aNumOfNodes = 0;
Standard_Integer aNumOfTriangles = 0; Standard_Integer aNumOfTriangles = 0;

View File

@ -381,10 +381,10 @@ void CDimensionDlg::OnBnClickedDimLength()
{ {
// Update parameters // Update parameters
UpdateStandardModeForLength (); UpdateStandardModeForLength ();
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_SHOW); GetDlgItem (IDC_LengthTab)->ShowWindow (SW_SHOW);
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
UpdateUnitsListForLength (); UpdateUnitsListForLength ();
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15); ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
@ -399,10 +399,10 @@ void CDimensionDlg::OnBnClickedDimAngle()
{ {
// Update parameters // Update parameters
UpdateStandardModeForAngle(); UpdateStandardModeForAngle();
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_SHOW); GetDlgItem (IDC_AngleTab)->ShowWindow (SW_SHOW);
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
UpdateUnitsListForAngle(); UpdateUnitsListForAngle();
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15); ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (15);
@ -420,10 +420,10 @@ void CDimensionDlg::OnBnClickedDimDiameter()
myAISContext->OpenLocalContext(); myAISContext->OpenLocalContext();
myAISContext->ActivateStandardMode (TopAbs_EDGE); myAISContext->ActivateStandardMode (TopAbs_EDGE);
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_SHOW); GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_SHOW);
UpdateUnitsListForLength(); UpdateUnitsListForLength();
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0); ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0);
@ -440,10 +440,10 @@ void CDimensionDlg::OnBnClickedDimRadius()
myAISContext->CloseAllContexts(); myAISContext->CloseAllContexts();
myAISContext->OpenLocalContext(); myAISContext->OpenLocalContext();
myAISContext->ActivateStandardMode (TopAbs_EDGE); myAISContext->ActivateStandardMode (TopAbs_EDGE);
(CTabCtrl*) GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_LengthTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_AngleTab)->ShowWindow (SW_HIDE);
(CTabCtrl*) GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_SHOW); GetDlgItem (IDC_RadiusTab)->ShowWindow (SW_SHOW);
(CTabCtrl*) GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE); GetDlgItem (IDC_DiameterTab)->ShowWindow (SW_HIDE);
UpdateUnitsListForLength(); UpdateUnitsListForLength();
((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0); ((CSliderCtrl*)GetDlgItem(IDC_Flyout))->SetPos (0);

View File

@ -184,39 +184,39 @@ void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*the
if (DrawHiddenLine) if (DrawHiddenLine)
{ {
Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED, Handle(Prs3d_LineAspect) aLineAspectHighlightedHLR = new Prs3d_LineAspect(Quantity_NOC_RED,
Aspect_TOL_DOTDASH,2); Aspect_TOL_DOTDASH,2);
Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_BLUE1, Handle(Prs3d_LineAspect) aLineAspectHLR = new Prs3d_LineAspect(Quantity_NOC_BLUE1,
Aspect_TOL_DOTDASH,1); Aspect_TOL_DOTDASH,1);
switch(aMode) switch(aMode)
{ {
case (6): case (6):
{ {
DrawCompound(thePresentation, HCompound, aLineAspectHighlighted); DrawCompound(thePresentation, HCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (7): case (7):
{ {
DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (8): case (8):
{ {
DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (9): case (9):
{ {
DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
default: default:
{ {
DrawCompound(thePresentation, HCompound, aLineAspect); DrawCompound(thePresentation, HCompound, aLineAspectHLR);
DrawCompound(thePresentation, Rg1LineHCompound, aLineAspect); DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHLR);
DrawCompound(thePresentation, RgNLineHCompound, aLineAspect); DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHLR);
DrawCompound(thePresentation, OutLineHCompound, aLineAspect); DrawCompound(thePresentation, OutLineHCompound, aLineAspectHLR);
} }
} }
} }
@ -267,45 +267,45 @@ void ISession2D_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*the
if (DrawHiddenLine) if (DrawHiddenLine)
{ {
Handle(Prs3d_LineAspect) aLineAspectHighlighted = new Prs3d_LineAspect(Quantity_NOC_RED, Handle(Prs3d_LineAspect) aLineAspectHighlightedHLR = new Prs3d_LineAspect(Quantity_NOC_RED,
Aspect_TOL_DOT,2); Aspect_TOL_DOT,2);
Handle(Prs3d_LineAspect) aLineAspect = new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE,
Aspect_TOL_DOT,1);
switch (aMode) switch (aMode)
{ {
case (6): case (6):
{ {
DrawCompound(thePresentation, HCompound, aLineAspectHighlighted); DrawCompound(thePresentation, HCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (7): case (7):
{ {
DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (8): case (8):
{ {
DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (9): case (9):
{ {
DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, OutLineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
case (10): case (10):
{ {
DrawCompound(thePresentation, IsoLineHCompound, aLineAspectHighlighted); DrawCompound(thePresentation, IsoLineHCompound, aLineAspectHighlightedHLR);
break; break;
} }
default: default:
{ {
DrawCompound(thePresentation, HCompound, aLineAspect); Handle(Prs3d_LineAspect) aLineAspectHLR =
DrawCompound(thePresentation, Rg1LineHCompound, aLineAspect); new Prs3d_LineAspect(Quantity_NOC_ALICEBLUE, Aspect_TOL_DOT, 1);
DrawCompound(thePresentation, RgNLineHCompound, aLineAspect); DrawCompound(thePresentation, HCompound, aLineAspectHLR);
DrawCompound(thePresentation, OutLineHCompound, aLineAspect); DrawCompound(thePresentation, Rg1LineHCompound, aLineAspectHLR);
DrawCompound(thePresentation, IsoLineHCompound, aLineAspect); DrawCompound(thePresentation, RgNLineHCompound, aLineAspectHLR);
DrawCompound(thePresentation, OutLineHCompound, aLineAspectHLR);
DrawCompound(thePresentation, IsoLineHCompound, aLineAspectHLR);
} }
} }
} }

View File

@ -793,8 +793,8 @@ Standard_Boolean CImportExport::SaveVRML(const Standard_CString&
Handle(VrmlData_Node) node = itr.Value(); Handle(VrmlData_Node) node = itr.Value();
if (node->DynamicType() == STANDARD_TYPE(VrmlData_ShapeNode)) if (node->DynamicType() == STANDARD_TYPE(VrmlData_ShapeNode))
{ {
Handle(VrmlData_ShapeNode) shape = Handle(VrmlData_ShapeNode)::DownCast(node); Handle(VrmlData_ShapeNode) aShape = Handle(VrmlData_ShapeNode)::DownCast(node);
shape->SetAppearance(appearance); aShape->SetAppearance(appearance);
} }
else if (itr.Value()->DynamicType() == STANDARD_TYPE(VrmlData_Group)) else if (itr.Value()->DynamicType() == STANDARD_TYPE(VrmlData_Group))
{ {

View File

@ -43,7 +43,7 @@ int AFXAPI AfxWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
_SYSTEM_INFO lps; _SYSTEM_INFO lps;
GetSystemInfo(&lps); GetSystemInfo(&lps);
rep = AllocConsole(); rep = AllocConsole();
hCrt = _open_osfhandle((long) GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT); hCrt = _open_osfhandle((intptr_t) GetStdHandle(STD_OUTPUT_HANDLE),_O_TEXT);
hf = _fdopen( hCrt, "w" ); hf = _fdopen( hCrt, "w" );
*stdout = *hf; *stdout = *hf;
// stop the buffer on stdout // stop the buffer on stdout