1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-26 10:19:45 +03:00

0026586: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides previous local declaration

Eliminated warnings about "declaration of some local variable hides previous local declaration"
This commit is contained in:
ski 2015-09-08 15:41:26 +03:00 committed by bugmaster
parent 695c6eed26
commit 5174095875
186 changed files with 1382 additions and 1466 deletions

View File

@ -852,7 +852,6 @@ Standard_Boolean AIS_AngleDimension::InitTwoEdgesAngle (gp_Pln& theComputedPlane
// Compute geometry for this plane and edges // Compute geometry for this plane and edges
Standard_Boolean isInfinite1,isInfinite2; Standard_Boolean isInfinite1,isInfinite2;
gp_Pnt aFirstPoint1, aLastPoint1, aFirstPoint2, aLastPoint2; gp_Pnt aFirstPoint1, aLastPoint1, aFirstPoint2, aLastPoint2;
gp_Lin2d aFirstLin2d, aSecondLin2d;
if (!AIS::ComputeGeometry (aFirstEdge, aSecondEdge, if (!AIS::ComputeGeometry (aFirstEdge, aSecondEdge,
aFirstLine, aSecondLine, aFirstLine, aSecondLine,
@ -924,15 +923,15 @@ Standard_Boolean AIS_AngleDimension::InitTwoFacesAngle()
TopoDS_Face aSecondFace = TopoDS::Face (mySecondShape); TopoDS_Face aSecondFace = TopoDS::Face (mySecondShape);
gp_Dir aFirstDir, aSecondDir; gp_Dir aFirstDir, aSecondDir;
gp_Pln aFirstPlane, aSecondPlane; gp_Pln aFirstPln, aSecondPln;
Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf; Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf;
AIS_KindOfSurface aFirstSurfType, aSecondSurfType; AIS_KindOfSurface aFirstSurfType, aSecondSurfType;
Standard_Real aFirstOffset, aSecondOffset; Standard_Real aFirstOffset, aSecondOffset;
AIS::GetPlaneFromFace (aFirstFace, aFirstPlane, AIS::GetPlaneFromFace (aFirstFace, aFirstPln,
aFirstBasisSurf,aFirstSurfType,aFirstOffset); aFirstBasisSurf,aFirstSurfType,aFirstOffset);
AIS::GetPlaneFromFace (aSecondFace, aSecondPlane, AIS::GetPlaneFromFace (aSecondFace, aSecondPln,
aSecondBasisSurf, aSecondSurfType, aSecondOffset); aSecondBasisSurf, aSecondSurfType, aSecondOffset);
if (aFirstSurfType == AIS_KOS_Plane && aSecondSurfType == AIS_KOS_Plane) if (aFirstSurfType == AIS_KOS_Plane && aSecondSurfType == AIS_KOS_Plane)
@ -975,15 +974,15 @@ Standard_Boolean AIS_AngleDimension::InitTwoFacesAngle (const gp_Pnt thePointOnF
TopoDS_Face aSecondFace = TopoDS::Face (mySecondShape); TopoDS_Face aSecondFace = TopoDS::Face (mySecondShape);
gp_Dir aFirstDir, aSecondDir; gp_Dir aFirstDir, aSecondDir;
gp_Pln aFirstPlane, aSecondPlane; gp_Pln aFirstPln, aSecondPln;
Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf; Handle(Geom_Surface) aFirstBasisSurf, aSecondBasisSurf;
AIS_KindOfSurface aFirstSurfType, aSecondSurfType; AIS_KindOfSurface aFirstSurfType, aSecondSurfType;
Standard_Real aFirstOffset, aSecondOffset; Standard_Real aFirstOffset, aSecondOffset;
AIS::GetPlaneFromFace (aFirstFace, aFirstPlane, AIS::GetPlaneFromFace (aFirstFace, aFirstPln,
aFirstBasisSurf,aFirstSurfType,aFirstOffset); aFirstBasisSurf,aFirstSurfType,aFirstOffset);
AIS::GetPlaneFromFace (aSecondFace, aSecondPlane, AIS::GetPlaneFromFace (aSecondFace, aSecondPln,
aSecondBasisSurf, aSecondSurfType, aSecondOffset); aSecondBasisSurf, aSecondSurfType, aSecondOffset);
myFirstPoint = thePointOnFirstFace; myFirstPoint = thePointOnFirstFace;

View File

@ -958,7 +958,6 @@ void AIS_Dimension::DrawLinearDimension (const Handle(Prs3d_Presentation)& thePr
aPrimSegments->AddVertex (theSecondPoint); aPrimSegments->AddVertex (theSecondPoint);
aPrimSegments->AddVertex (aLineEndPoint); aPrimSegments->AddVertex (aLineEndPoint);
Handle(Prs3d_DimensionAspect) aDimensionAspect = myDrawer->DimensionAspect();
Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect()); Prs3d_Root::CurrentGroup (thePresentation)->SetPrimitivesAspect (aDimensionAspect->LineAspect()->Aspect());
Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments); Prs3d_Root::CurrentGroup (thePresentation)->AddPrimitiveArray (aPrimSegments);
} }

View File

@ -645,7 +645,7 @@ Standard_Boolean AIS_LengthDimension::InitTwoShapesPoints (const TopoDS_Shape& t
else if (theSecondShape.ShapeType() == TopAbs_EDGE) else if (theSecondShape.ShapeType() == TopAbs_EDGE)
{ {
myGeometryType = GeometryType_EdgeVertex; myGeometryType = GeometryType_EdgeVertex;
Standard_Boolean isSuccess = InitEdgeVertexLength (TopoDS::Edge(theSecondShape), isSuccess = InitEdgeVertexLength (TopoDS::Edge(theSecondShape),
TopoDS::Vertex(theFirstShape), TopoDS::Vertex(theFirstShape),
aDirAttach, aDirAttach,
isInfinite); isInfinite);

View File

@ -101,7 +101,6 @@ AppCont_LeastSquare::AppCont_LeastSquare(const AppCont_Function& SSP,
{ {
myDone = Standard_False; myDone = Standard_False;
myDegre = Deg; myDegre = Deg;
math_Matrix InvM(1, Deg+1, 1, Deg + 1);
Standard_Integer i, j, k, c, i2; Standard_Integer i, j, k, c, i2;
Standard_Integer classe = Deg + 1, cl1 = Deg; Standard_Integer classe = Deg + 1, cl1 = Deg;
Standard_Real U, dU, Coeff, Coeff2; Standard_Real U, dU, Coeff, Coeff2;

View File

@ -430,7 +430,7 @@ void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters) {
if (!isready) { if (!isready) {
return; return;
} }
Standard_Integer i, j, k, Ci, Nincx, i2, k1, k2; Standard_Integer i, j, k, Ci, i2, k1, k2;
Standard_Integer nbpol1 = nbpoles-1, Ninc1 = Ninc-1; Standard_Integer nbpol1 = nbpoles-1, Ninc1 = Ninc-1;
Standard_Real AD1, A0; Standard_Real AD1, A0;
// gp_Pnt Pt; // gp_Pnt Pt;
@ -523,7 +523,7 @@ void AppParCurves_LeastSquare::Perform(const math_Vector& Parameters) {
// cas de tangence: // cas de tangence:
// =========================================================== // ===========================================================
Nincx = resfin-resinit+1; Standard_Integer Nincx = resfin-resinit+1;
Standard_Integer deport = 0, Nincx2 = 2*Nincx; Standard_Integer deport = 0, Nincx2 = 2*Nincx;
math_IntegerVector InternalIndex(1, Nincx); math_IntegerVector InternalIndex(1, Nincx);

View File

@ -839,8 +839,8 @@ void BOPAlgo_ArgumentAnalyzer::TestContinuity()
aExp.Init(aS, TopAbs_FACE); aExp.Init(aS, TopAbs_FACE);
for (; aExp.More(); aExp.Next()) { for (; aExp.More(); aExp.Next()) {
const TopoDS_Face& aF = *(TopoDS_Face*)&aExp.Current(); const TopoDS_Face& aF = *(TopoDS_Face*)&aExp.Current();
const Handle(Geom_Surface)& aS = BRep_Tool::Surface(aF); Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aF);
if (aS->Continuity() == GeomAbs_C0) { if (aSurf->Continuity() == GeomAbs_C0) {
aMS.Add(aF); aMS.Add(aF);
} }
} }

View File

@ -504,7 +504,6 @@ void BOPAlgo_BOP::BuildRC()
Standard_Integer aDmin; Standard_Integer aDmin;
TopAbs_ShapeEnum aTmin; TopAbs_ShapeEnum aTmin;
TopoDS_Compound aC; TopoDS_Compound aC;
TopoDS_Shape aSAIm, aSTIm;
BRep_Builder aBB; BRep_Builder aBB;
TopExp_Explorer aExp; TopExp_Explorer aExp;
BOPCol_DataMapOfShapeShape aDMSSA; BOPCol_DataMapOfShapeShape aDMSSA;
@ -581,9 +580,9 @@ void BOPAlgo_BOP::BuildRC()
const BOPCol_ListOfShape& aLT=(!bFlag1) ? myArguments : myTools; const BOPCol_ListOfShape& aLT=(!bFlag1) ? myArguments : myTools;
aItLS.Initialize(aLT); aItLS.Initialize(aLT);
for (; aItLS.More(); aItLS.Next()) { for (; aItLS.More(); aItLS.Next()) {
const TopoDS_Shape& aST=aItLS.Value(); const TopoDS_Shape& aTShape =aItLS.Value();
if (myImages.IsBound(aST)){ if (myImages.IsBound(aTShape)){
const BOPCol_ListOfShape& aLSTIm=myImages.Find(aST); const BOPCol_ListOfShape& aLSTIm=myImages.Find(aTShape);
aItIm.Initialize(aLSTIm); aItIm.Initialize(aLSTIm);
for (; aItIm.More(); aItIm.Next()) { for (; aItIm.More(); aItIm.Next()) {
const TopoDS_Shape& aSTIm=aItIm.Value(); const TopoDS_Shape& aSTIm=aItIm.Value();
@ -614,7 +613,7 @@ void BOPAlgo_BOP::BuildRC()
} }
}// if (myImages.IsBound(aST)){ }// if (myImages.IsBound(aST)){
else { else {
aExp.Init(aST, aTmin); aExp.Init(aTShape, aTmin);
for (; aExp.More(); aExp.Next()) { for (; aExp.More(); aExp.Next()) {
const TopoDS_Shape aSIm=aExp.Current(); const TopoDS_Shape aSIm=aExp.Current();
// skip degenerated edges // skip degenerated edges

View File

@ -619,7 +619,6 @@ void BOPAlgo_BuilderFace::PerformAreas()
} }
// //
if (anUnUsedHoles.Extent()) { if (anUnUsedHoles.Extent()) {
TopoDS_Face aFace;
aBB.MakeFace(aFace, aS, aLoc, aTol); aBB.MakeFace(aFace, aS, aLoc, aTol);
aMSH.Add(aFace, anUnUsedHoles); aMSH.Add(aFace, anUnUsedHoles);
// //

View File

@ -742,9 +742,9 @@ void BOPAlgo_Builder::FillImagesFaces1()
// //
iFlag=aVFI.Flag(); iFlag=aVFI.Flag();
if (!iFlag) { if (!iFlag) {
TopoDS_Vertex& aVx=aVFI.Vertex(); TopoDS_Vertex& aVertex=aVFI.Vertex();
TopoDS_Face& aFy=aVFI.Face(); TopoDS_Face& aFy=aVFI.Face();
aBB.Add(aFy, aVx); aBB.Add(aFy, aVertex);
} }
} }
} }

View File

@ -664,7 +664,7 @@ void BOPAlgo_Builder::FillIn3DParts
BOPAlgo_FillIn3DParts& aFIP=aVFIP(k); BOPAlgo_FillIn3DParts& aFIP=aVFIP(k);
bHasImage=aFIP.HasImage(); bHasImage=aFIP.HasImage();
const TopoDS_Solid& aSolid=aFIP.Solid(); const TopoDS_Solid& aSolid=aFIP.Solid();
const TopoDS_Solid& aSD=aFIP.DraftSolid(); const TopoDS_Solid& aSDraft =aFIP.DraftSolid();
const BOPCol_ListOfShape& aLFIN=aFIP.LFIN(); const BOPCol_ListOfShape& aLFIN=aFIP.LFIN();
const BOPCol_ListOfShape& aLIF=aFIP.LIF(); const BOPCol_ListOfShape& aLIF=aFIP.LIF();
// //
@ -689,7 +689,7 @@ void BOPAlgo_Builder::FillIn3DParts
} }
// //
if (aNbFIN || bHasImage) { if (aNbFIN || bHasImage) {
theDraftSolids.Bind(aSolid, aSD); theDraftSolids.Bind(aSolid, aSDraft);
} }
} }
} }

View File

@ -450,7 +450,7 @@ void BOPAlgo_PaveFiller::PerformEE()
BOPTools_AlgoTools::MakeNewVertex(aE1, aT1, aE2, aT2, aVnew); BOPTools_AlgoTools::MakeNewVertex(aE1, aT1, aE2, aT2, aVnew);
// <-LXBR // <-LXBR
{ {
Standard_Integer nVS[2], iFound, k; Standard_Integer nVS[2], iFound;
Standard_Real aTolVx, aTolVnew, aD2, aDT2; Standard_Real aTolVx, aTolVnew, aD2, aDT2;
BOPCol_MapOfInteger aMV; BOPCol_MapOfInteger aMV;
gp_Pnt aPnew, aPx; gp_Pnt aPnew, aPx;
@ -472,8 +472,8 @@ void BOPAlgo_PaveFiller::PerformEE()
aTolVnew=BRep_Tool::Tolerance(aVnew); aTolVnew=BRep_Tool::Tolerance(aVnew);
aPnew=BRep_Tool::Pnt(aVnew); aPnew=BRep_Tool::Pnt(aVnew);
// //
for (k=0; k<=j; ++k) { for (Standard_Integer k1=0; k1<=j; ++k1) {
const TopoDS_Vertex& aVx= *(TopoDS_Vertex*)&(myDS->Shape(nVS[k])); const TopoDS_Vertex& aVx= *(TopoDS_Vertex*)&(myDS->Shape(nVS[k1]));
aTolVx=BRep_Tool::Tolerance(aVx); aTolVx=BRep_Tool::Tolerance(aVx);
aPx=BRep_Tool::Pnt(aVx); aPx=BRep_Tool::Pnt(aVx);
aD2=aPnew.SquareDistance(aPx); aD2=aPnew.SquareDistance(aPx);
@ -588,7 +588,6 @@ Standard_Integer BOPAlgo_PaveFiller::PerformVerticesEE
// //
Standard_Integer nVx, iV, j, nE, iFlag, iX, i, aNb; Standard_Integer nVx, iV, j, nE, iFlag, iX, i, aNb;
Standard_Real aT; Standard_Real aT;
TopoDS_Shape aV;
BOPCol_ListIteratorOfListOfShape aItLS; BOPCol_ListIteratorOfListOfShape aItLS;
BOPCol_ListIteratorOfListOfInteger aItLI; BOPCol_ListIteratorOfListOfInteger aItLI;
BOPDS_ListIteratorOfListOfPaveBlock aItLPB; BOPDS_ListIteratorOfListOfPaveBlock aItLPB;

View File

@ -1939,7 +1939,7 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
const BOPCol_ListOfInteger& aFaces = aCB1->Faces(); const BOPCol_ListOfInteger& aFaces = aCB1->Faces();
aIt.Initialize(aLPB); aIt.Initialize(aLPB);
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
const Handle(BOPDS_PaveBlock)& aPB = aIt.Value(); const Handle(BOPDS_PaveBlock)& aPBValue = aIt.Value();
// //
aCB = new BOPDS_CommonBlock; aCB = new BOPDS_CommonBlock;
aIt1.Initialize(aLPB1); aIt1.Initialize(aLPB1);
@ -1948,9 +1948,9 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
nE = aPB2->OriginalEdge(); nE = aPB2->OriginalEdge();
// //
aPB2n = new BOPDS_PaveBlock; aPB2n = new BOPDS_PaveBlock;
aPB2n->SetPave1(aPB->Pave1()); aPB2n->SetPave1(aPBValue->Pave1());
aPB2n->SetPave2(aPB->Pave2()); aPB2n->SetPave2(aPBValue->Pave2());
aPB2n->SetEdge(aPB->Edge()); aPB2n->SetEdge(aPBValue->Edge());
aPB2n->SetOriginalEdge(nE); aPB2n->SetOriginalEdge(nE);
aCB->AddPaveBlock(aPB2n); aCB->AddPaveBlock(aPB2n);
myDS->SetCommonBlock(aPB2n, aCB); myDS->SetCommonBlock(aPB2n, aCB);
@ -1997,8 +1997,8 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
// //
aIt.Initialize(aLPB); aIt.Initialize(aLPB);
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
Handle(BOPDS_PaveBlock)& aPB = aIt.ChangeValue(); Handle(BOPDS_PaveBlock)& aPBChangeValue = aIt.ChangeValue();
const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(aPB->Edge()); const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(aPBChangeValue->Edge());
aTolE = BRep_Tool::Tolerance(aE); aTolE = BRep_Tool::Tolerance(aE);
// //
IntTools_EdgeFace anEF; IntTools_EdgeFace anEF;
@ -2006,7 +2006,7 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
anEF.SetFace(aF); anEF.SetFace(aF);
anEF.SetTolE(aTolE); anEF.SetTolE(aTolE);
anEF.SetTolF(aTolF); anEF.SetTolF(aTolF);
anEF.SetRange(aPB->Pave1().Parameter(), aPB->Pave2().Parameter()); anEF.SetRange(aPBChangeValue->Pave1().Parameter(), aPBChangeValue->Pave2().Parameter());
anEF.SetContext(myContext); anEF.SetContext(myContext);
anEF.Perform(); anEF.Perform();
// //
@ -2015,15 +2015,15 @@ void BOPAlgo_PaveFiller::RemoveUsedVertices(BOPDS_Curve& aNC,
Standard_Boolean bCoinc = (aCPrts(1).Type() == TopAbs_EDGE); Standard_Boolean bCoinc = (aCPrts(1).Type() == TopAbs_EDGE);
if (bCoinc) { if (bCoinc) {
if (bCB) { if (bCB) {
aCB = myDS->CommonBlock(aPB); aCB = myDS->CommonBlock(aPBChangeValue);
} else { } else {
aCB = new BOPDS_CommonBlock; aCB = new BOPDS_CommonBlock;
aCB->AddPaveBlock(aPB); aCB->AddPaveBlock(aPBChangeValue);
myDS->SetCommonBlock(aPB, aCB); myDS->SetCommonBlock(aPBChangeValue, aCB);
} }
aCB->AddFace(nF); aCB->AddFace(nF);
// //
aMPBIn.Add(aPB); aMPBIn.Add(aPBChangeValue);
} }
} }
} }

View File

@ -225,7 +225,7 @@ void BOPAlgo_WireSplitter::MakeConnexityBlocks()
} }
// //
if (bRegular) { if (bRegular) {
Standard_Integer k, aNbVR, aNbER; Standard_Integer aNbVR, aNbER;
// //
aNbVR=aMVER.Extent(); aNbVR=aMVER.Extent();
for (k=1; k<=aNbVR; ++k) { for (k=1; k<=aNbVR; ++k) {

View File

@ -91,8 +91,8 @@ Standard_Integer bmodified(Draw_Interpretor& di,
aBB.MakeCompound(aRes); aBB.MakeCompound(aRes);
TopTools_ListIteratorOfListOfShape aIt(aLS); TopTools_ListIteratorOfListOfShape aIt(aLS);
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value(); const TopoDS_Shape& aShape = aIt.Value();
aBB.Add(aRes, aS); aBB.Add(aRes, aShape);
} }
// //
DBRep::Set(a[1], aRes); DBRep::Set(a[1], aRes);
@ -140,8 +140,8 @@ Standard_Integer bgenerated(Draw_Interpretor& di,
aBB.MakeCompound(aRes); aBB.MakeCompound(aRes);
TopTools_ListIteratorOfListOfShape aIt(aLS); TopTools_ListIteratorOfListOfShape aIt(aLS);
for (; aIt.More(); aIt.Next()) { for (; aIt.More(); aIt.Next()) {
const TopoDS_Shape& aS = aIt.Value(); const TopoDS_Shape& aShape = aIt.Value();
aBB.Add(aRes, aS); aBB.Add(aRes, aShape);
} }
// //
DBRep::Set(a[1], aRes); DBRep::Set(a[1], aRes);

View File

@ -985,17 +985,17 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::Recadre(Blend_SurfCurvFuncInv&
Solinv(3) = pmin; Solinv(3) = pmin;
math_FunctionSetRoot rsnld(FinvC,toler,30); math_FunctionSetRoot aRsnld(FinvC,toler,30);
rsnld.Perform(FinvC,Solinv,infb,supb); aRsnld.Perform(FinvC,Solinv,infb,supb);
if (!rsnld.IsDone()) { if (!aRsnld.IsDone()) {
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl; cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif #endif
} }
else { else {
// It is necessary to check the value of the function // It is necessary to check the value of the function
rsnld.Root(Solinv); aRsnld.Root(Solinv);
recadre = FinvC.IsSolution(Solinv,tolesp); recadre = FinvC.IsSolution(Solinv,tolesp);
} }
} }

View File

@ -4121,7 +4121,6 @@ void BRepBuilderAPI_Sewing::CreateSewedShape()
if (IndexMerged.Contains(i)) continue; if (IndexMerged.Contains(i)) continue;
TopoDS_Shell shell = TopoDS::Shell(OldShells.FindKey(i)); TopoDS_Shell shell = TopoDS::Shell(OldShells.FindKey(i));
if (NewShell.IsNull()) { if (NewShell.IsNull()) {
BRep_Builder aB;
aB.MakeShell(NewShell); aB.MakeShell(NewShell);
TopoDS_Iterator aItSS(shell) ; TopoDS_Iterator aItSS(shell) ;
for( ; aItSS.More(); aItSS.Next()) for( ; aItSS.More(); aItSS.Next())

View File

@ -173,12 +173,12 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
if ( ! myMap(S).IsNull() ) if ( ! myMap(S).IsNull() )
myMap(S)->SetFailStatus(S); myMap(S)->SetFailStatus(S);
Handle(BRepCheck_Result) aRes = myMap(aVertex); Handle(BRepCheck_Result) aResOfVertex = myMap(aVertex);
if ( ! aRes.IsNull() ) if ( !aResOfVertex.IsNull() )
{ {
aRes->SetFailStatus(aVertex); aResOfVertex->SetFailStatus(aVertex);
aRes->SetFailStatus(S); aResOfVertex->SetFailStatus(S);
} }
}//catch(Standard_Failure) }//catch(Standard_Failure)
}//for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next()) }//for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next())

View File

@ -616,9 +616,9 @@ BRepCheck_Status BRepCheck_Edge::
{ {
const Standard_Real aParam = aPOnTriag->Parameters()->Value(i); const Standard_Real aParam = aPOnTriag->Parameters()->Value(i);
const gp_Pnt aPE(aBC.Value(aParam)), const gp_Pnt aPE(aBC.Value(aParam)),
aPT(Nodes(anIndices(i)).Transformed(aLL)); aPnt(Nodes(anIndices(i)).Transformed(aLL));
const Standard_Real aSQDist = aPE.SquareDistance(aPT); const Standard_Real aSQDist = aPE.SquareDistance(aPnt);
if(aSQDist > aTol*aTol) if(aSQDist > aTol*aTol)
{ {
return BRepCheck_InvalidPolygonOnTriangulation; return BRepCheck_InvalidPolygonOnTriangulation;

View File

@ -598,8 +598,8 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update)
} }
//JR/Hp : //JR/Hp :
Standard_Integer iorf = MapOfShapeOrientation.Find(Fcur) ; Standard_Integer anOriFCur = MapOfShapeOrientation.Find(Fcur) ;
orf = (TopAbs_Orientation) iorf ; orf = (TopAbs_Orientation)anOriFCur;
// orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur); // orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur);
Fcur.Orientation(orf); Fcur.Orientation(orf);
@ -757,8 +757,8 @@ BRepCheck_Status BRepCheck_Shell::Orientation(const Standard_Boolean Update)
} }
//JR/Hp : //JR/Hp :
Standard_Integer iorf = MapOfShapeOrientation.Find(Fcur) ; Standard_Integer anOriFCur = MapOfShapeOrientation.Find(Fcur) ;
orf = (TopAbs_Orientation) iorf ; orf = (TopAbs_Orientation)anOriFCur;
// orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur); // orf = (TopAbs_Orientation)MapOfShapeOrientation.Find(Fcur);
Fcur.Orientation(orf); Fcur.Orientation(orf);

View File

@ -1054,13 +1054,13 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1, const TopoDS_Face& S
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt); TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt);
BRepExtrema_ExtPF ExtPF(V1,S2); BRepExtrema_ExtPF ExtPF(V1,S2);
const Standard_Integer NbExtrema = ExtPF.IsDone()? ExtPF.NbExt() : 0; const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0;
if ( NbExtrema > 0 ) if (NbExtremaPF > 0 )
{ {
// Search minimum distance Dstmin // Search minimum distance Dstmin
Standard_Integer ii; Standard_Integer ii;
Standard_Real Dstmin = ExtPF.SquareDistance(1); Standard_Real Dstmin = ExtPF.SquareDistance(1);
for (ii = 2; ii <= NbExtrema; ii++) for (ii = 2; ii <= NbExtremaPF; ii++)
{ {
const Standard_Real sDst = ExtPF.SquareDistance(ii); const Standard_Real sDst = ExtPF.SquareDistance(ii);
if (sDst<Dstmin) if (sDst<Dstmin)
@ -1070,7 +1070,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Edge& S1, const TopoDS_Face& S
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps)) if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps))
{ {
for (ii = 1; ii <= NbExtrema; ii++) for (ii = 1; ii <= NbExtremaPF; ii++)
{ {
if (fabs(Dstmin-sqrt(ExtPF.SquareDistance(ii)))<myEps) if (fabs(Dstmin-sqrt(ExtPF.SquareDistance(ii)))<myEps)
{ {
@ -1199,13 +1199,13 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Edge& S
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt); TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(aPnt);
BRepExtrema_ExtPF ExtPF(V1,S1); BRepExtrema_ExtPF ExtPF(V1,S1);
const Standard_Integer NbExtrema = ExtPF.IsDone()? ExtPF.NbExt() : 0; const Standard_Integer NbExtremaPF = ExtPF.IsDone()? ExtPF.NbExt() : 0;
if ( NbExtrema > 0 ) if (NbExtremaPF > 0 )
{ {
// Search minimum distance Dstmin // Search minimum distance Dstmin
Standard_Integer ii; Standard_Integer ii;
Standard_Real Dstmin = ExtPF.SquareDistance(1); Standard_Real Dstmin = ExtPF.SquareDistance(1);
for (ii = 2; ii <= NbExtrema; ii++) for (ii = 2; ii <= NbExtremaPF; ii++)
{ {
const Standard_Real sDst = ExtPF.SquareDistance(ii); const Standard_Real sDst = ExtPF.SquareDistance(ii);
if (sDst<Dstmin) if (sDst<Dstmin)
@ -1215,7 +1215,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Edge& S
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps)) if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps))
{ {
for (ii = 1; ii <= NbExtrema; ii++) for (ii = 1; ii <= NbExtremaPF; ii++)
{ {
if (fabs(Dstmin-sqrt(ExtPF.SquareDistance(ii)))<myEps) if (fabs(Dstmin-sqrt(ExtPF.SquareDistance(ii)))<myEps)
{ {

View File

@ -333,7 +333,6 @@ static void Descendants(const TopoDS_Shape&,
else {// else X0 else {// else X0
// Only solids are preserved // Only solids are preserved
TopoDS_Shape theGShape; TopoDS_Shape theGShape;
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(theGShape)); B.MakeCompound(TopoDS::Compound(theGShape));
for (; exp.More(); exp.Next()) { for (; exp.More(); exp.Next()) {
B.Add(theGShape,exp.Current()); B.Add(theGShape,exp.Current());
@ -619,7 +618,6 @@ static void Descendants(const TopoDS_Shape&,
} }
// Only solids are preserved // Only solids are preserved
theGShape.Nullify(); theGShape.Nullify();
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(theGShape)); B.MakeCompound(TopoDS::Compound(theGShape));
for (; exp.More(); exp.Next()) { for (; exp.More(); exp.Next()) {
B.Add(theGShape,exp.Current()); B.Add(theGShape,exp.Current());
@ -977,7 +975,6 @@ static void Descendants(const TopoDS_Shape&,
Standard_Real min, max, pmin, pmax; Standard_Real min, max, pmin, pmax;
Standard_Boolean flag2; Standard_Boolean flag2;
TopoDS_Shape Compo; TopoDS_Shape Compo;
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(Compo)); B.MakeCompound(TopoDS::Compound(Compo));
for (it.Initialize(lshape); it.More(); it.Next()) { for (it.Initialize(lshape); it.More(); it.Next()) {
BRepFeat::ParametricMinMax(it.Value(),C, BRepFeat::ParametricMinMax(it.Value(),C,

View File

@ -268,9 +268,9 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
} }
} }
TopExp_Explorer exp(mySbase, TopAbs_FACE); TopExp_Explorer anExp(mySbase, TopAbs_FACE);
for(; exp.More(); exp.Next()) { for(; anExp.More(); anExp.Next()) {
const TopoDS_Face& ff = TopoDS::Face(exp.Current()); const TopoDS_Face& ff = TopoDS::Face(anExp.Current());
if(ToFuse(ff, FFace)) { if(ToFuse(ff, FFace)) {
TopTools_DataMapOfShapeListOfShape sl; TopTools_DataMapOfShapeListOfShape sl;
break; break;
@ -1073,7 +1073,6 @@ void BRepFeat_MakeDPrism::BossEdges (const Standard_Integer signature)
for (itLS.Initialize(theLastShape);itLS.More();itLS.Next()) { for (itLS.Initialize(theLastShape);itLS.More();itLS.Next()) {
const TopoDS_Face& TopFace = TopoDS::Face(itLS.Value()); const TopoDS_Face& TopFace = TopoDS::Face(itLS.Value());
if (!FF.IsSame(TopFace)) { if (!FF.IsSame(TopFace)) {
TopExp_Explorer ExpE;
for (ExpE.Init(FF,TopAbs_EDGE);ExpE.More() && !Found ;ExpE.Next()) { for (ExpE.Init(FF,TopAbs_EDGE);ExpE.More() && !Found ;ExpE.Next()) {
const TopoDS_Edge& E1 = TopoDS::Edge(ExpE.Current()); const TopoDS_Edge& E1 = TopoDS::Edge(ExpE.Current());
TopoDS_Vertex V1,V2; TopoDS_Vertex V1,V2;

View File

@ -139,8 +139,8 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
myListOfEdges.Clear(); myListOfEdges.Clear();
mySlface.Clear(); mySlface.Clear();
TopoDS_Shape aLocalShape = W.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeW = W.Oriented(TopAbs_FORWARD);
myWire = TopoDS::Wire(aLocalShape); myWire = TopoDS::Wire(aLocalShapeW);
// myWire = TopoDS::Wire(W.Oriented(TopAbs_FORWARD)); // myWire = TopoDS::Wire(W.Oriented(TopAbs_FORWARD));
myDir = Direc; myDir = Direc;
myDir1 = Direc1; myDir1 = Direc1;
@ -499,7 +499,6 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
counter++; counter++;
} }
else { else {
Standard_Real f, l;
Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l); Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l);
gp_Pnt pf = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); gp_Pnt pf = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True));
gp_Pnt pl = myLastPnt; gp_Pnt pl = myLastPnt;
@ -638,7 +637,6 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
SlidMap.Clear(); SlidMap.Clear();
if(Sliding && counter1 > counter) { if(Sliding && counter1 > counter) {
TopTools_ListIteratorOfListOfShape it;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm;
TopExp_Explorer EX2(w, TopAbs_EDGE); TopExp_Explorer EX2(w, TopAbs_EDGE);
Standard_Integer ii = 0; Standard_Integer ii = 0;
@ -742,7 +740,6 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Shape comp; TopoDS_Shape comp;
BRep_Builder BB;
BB.MakeShell(TopoDS::Shell(comp)); BB.MakeShell(TopoDS::Shell(comp));
for(; it.More(); it.Next()) { for(; it.More(); it.Next()) {

View File

@ -279,9 +279,9 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle)
} }
} }
TopExp_Explorer exp(mySbase, TopAbs_FACE); TopExp_Explorer anExp(mySbase, TopAbs_FACE);
for(; exp.More(); exp.Next()) { for(; anExp.More(); anExp.Next()) {
const TopoDS_Face& ff = TopoDS::Face(exp.Current()); const TopoDS_Face& ff = TopoDS::Face(anExp.Current());
if(ToFuse(ff, FFace)) { if(ToFuse(ff, FFace)) {
TopTools_DataMapOfShapeListOfShape sl; TopTools_DataMapOfShapeListOfShape sl;
if(!FFace.IsSame(myPbase) && BRepFeat::IsInside(ff, FFace)) if(!FFace.IsSame(myPbase) && BRepFeat::IsInside(ff, FFace))

View File

@ -236,8 +236,8 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
if(tol > myTol) myTol = tol; if(tol > myTol) myTol = tol;
} }
TopoDS_Shape aLocalShape = W.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeW = W.Oriented(TopAbs_FORWARD);
myWire = TopoDS::Wire(aLocalShape); myWire = TopoDS::Wire(aLocalShapeW);
// myWire = TopoDS::Wire(W.Oriented(TopAbs_FORWARD)); // myWire = TopoDS::Wire(W.Oriented(TopAbs_FORWARD));
myPln = Plane; myPln = Plane;
myHeight1 = H1; myHeight1 = H1;
@ -619,7 +619,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
counter++; counter++;
} }
else { else {
Standard_Real f, l;
Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l); Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l);
gp_Pnt pf = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True)); gp_Pnt pf = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True));
gp_Pnt pl = myLastPnt; gp_Pnt pl = myLastPnt;
@ -755,7 +754,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
SlidMap.Clear(); SlidMap.Clear();
if(Sliding && counter1 > counter) { if(Sliding && counter1 > counter) {
TopTools_ListIteratorOfListOfShape it;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm;
TopExp_Explorer EX2(w, TopAbs_EDGE); TopExp_Explorer EX2(w, TopAbs_EDGE);
Standard_Integer ii = 0; Standard_Integer ii = 0;
@ -846,7 +844,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
Handle(Geom2d_Curve) l2d = GeomAPI::To2d(ln, Plane->Pln()); Handle(Geom2d_Curve) l2d = GeomAPI::To2d(ln, Plane->Pln());
Geom2dAPI_InterCurveCurve intcc(l2d, ln2d, Precision::Confusion()); Geom2dAPI_InterCurveCurve intcc(l2d, ln2d, Precision::Confusion());
TopoDS_Vertex VV; VV.Nullify(); TopoDS_Vertex VV; VV.Nullify();
TopoDS_Edge ee1, ee2;
if(intcc.NbPoints() > 0) { if(intcc.NbPoints() > 0) {
gp_Pnt2d P = intcc.Point(1); gp_Pnt2d P = intcc.Point(1);
@ -900,10 +897,10 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
BRepAlgoAPI_Cut c(BndFace, NewBndFace); BRepAlgoAPI_Cut c(BndFace, NewBndFace);
//modified by NIZNHY-PKV Fri Mar 22 16:52:57 2002 t //modified by NIZNHY-PKV Fri Mar 22 16:52:57 2002 t
TopExp_Explorer exp(c.Shape(), TopAbs_WIRE); TopExp_Explorer exp(c.Shape(), TopAbs_WIRE);
const TopoDS_Wire& w = TopoDS::Wire(exp.Current()); const TopoDS_Wire& aCurWire = TopoDS::Wire(exp.Current());
// akm 13/02/02 : we know the plane. Why not to use it? // akm 13/02/02 : we know the plane. Why not to use it?
// BRepLib_MakeFace ff(w); // BRepLib_MakeFace ff(w);
BRepLib_MakeFace ff(myPln->Pln(), w, Standard_True); BRepLib_MakeFace ff(myPln->Pln(), aCurWire, Standard_True);
NewBndFace = TopoDS::Face(ff.Shape()); NewBndFace = TopoDS::Face(ff.Shape());
} }
@ -962,7 +959,6 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Shape comp; TopoDS_Shape comp;
BRep_Builder BB;
BB.MakeShell(TopoDS::Shell(comp)); BB.MakeShell(TopoDS::Shell(comp));
for(; it.More(); it.Next()) { for(; it.More(); it.Next()) {
@ -1486,9 +1482,9 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
} }
for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) { for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) {
const TopoDS_Edge& e = TopoDS::Edge(ex.Current()); const TopoDS_Edge& aCurEdge = TopoDS::Edge(ex.Current());
BRepExtrema_ExtPC projF(v1, e); BRepExtrema_ExtPC projF(v1, aCurEdge);
if(projF.IsDone() && projF.NbExt() >=1) { if(projF.IsDone() && projF.NbExt() >=1) {
Standard_Real dist2min = RealLast(); Standard_Real dist2min = RealLast();
@ -1500,8 +1496,8 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
} }
} }
if (index != 0) { if (index != 0) {
if (dist2min <= BRep_Tool::Tolerance(e) * BRep_Tool::Tolerance(e)) { if (dist2min <= BRep_Tool::Tolerance(aCurEdge) * BRep_Tool::Tolerance(aCurEdge)) {
FirstEdge = e; FirstEdge = aCurEdge;
break; break;
} }
} }
@ -1590,8 +1586,8 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
} }
for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) { for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) {
const TopoDS_Edge& e = TopoDS::Edge(ex.Current()); const TopoDS_Edge& aCurEdge = TopoDS::Edge(ex.Current());
BRepExtrema_ExtPC projF(v2, e); BRepExtrema_ExtPC projF(v2, aCurEdge);
if(projF.IsDone() && projF.NbExt() >=1) { if(projF.IsDone() && projF.NbExt() >=1) {
Standard_Real dist2min = RealLast(); Standard_Real dist2min = RealLast();
@ -1603,8 +1599,8 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
} }
} }
if (index != 0) { if (index != 0) {
if (dist2min <= BRep_Tool::Tolerance(e) * BRep_Tool::Tolerance(e)) { if (dist2min <= BRep_Tool::Tolerance(aCurEdge) * BRep_Tool::Tolerance(aCurEdge)) {
FirstEdge = e; FirstEdge = aCurEdge;
break; break;
} }
} }

View File

@ -1087,21 +1087,21 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
TopoDS_Vertex OnVertex; TopoDS_Vertex OnVertex;
Standard_Real intpar; Standard_Real intpar;
for(; ex1.More(); ex1.Next()) { for(; ex1.More(); ex1.Next()) {
const TopoDS_Face& f = TopoDS::Face(ex1.Current()); const TopoDS_Face& aCurFace = TopoDS::Face(ex1.Current());
GeomAdaptor_Curve aGAC (curve); GeomAdaptor_Curve aGAC (curve);
inter.Init (f, aGAC, BRep_Tool::Tolerance(f)); inter.Init (aCurFace, aGAC, BRep_Tool::Tolerance(aCurFace));
if(!inter.More()) continue; if(!inter.More()) continue;
for(; inter.More(); inter.Next()) { for(; inter.More(); inter.Next()) {
gp_Pnt thePoint = inter.Pnt(); gp_Pnt thePoint = inter.Pnt();
if(!FirstVertex.IsNull()) { if(!FirstVertex.IsNull()) {
gp_Pnt point = BRep_Tool::Pnt(FirstVertex); gp_Pnt point = BRep_Tool::Pnt(FirstVertex);
if(point.Distance(thePoint) <= BRep_Tool::Tolerance(f)) { if(point.Distance(thePoint) <= BRep_Tool::Tolerance(aCurFace)) {
continue; continue;
} }
} }
intpar = IntPar(curve, thePoint); intpar = IntPar(curve, thePoint);
theEdge = E; theEdge = E;
theFace = f; theFace = aCurFace;
B.MakeVertex(theVertex, thePoint, Precision::Confusion()); B.MakeVertex(theVertex, thePoint, Precision::Confusion());
if(!FirstOK) { if(!FirstOK) {
if(thePoint.Distance(P2) <= Precision::Confusion()) { if(thePoint.Distance(P2) <= Precision::Confusion()) {
@ -1110,7 +1110,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
} }
// ---Find thepoint on an edge or a vertex of face f // ---Find thepoint on an edge or a vertex of face f
PtOnEdgeVertex(RevolRib, f, thePoint, FirstVertex, LastVertex, PtOnEdgeVertex(RevolRib, aCurFace, thePoint, FirstVertex, LastVertex,
PtOnEdge,OnEdge,PtOnVertex,OnVertex); PtOnEdge,OnEdge,PtOnVertex,OnVertex);

View File

@ -816,7 +816,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
Standard_Boolean NewVertex = Standard_False; Standard_Boolean NewVertex = Standard_False;
Standard_Real theparam = 1.e101, angle; Standard_Real theparam = 1.e101, angle;
TopoDS_Vertex V ; TopoDS_Vertex V ;
TopoDS_Edge E, Eref, E1 , E2; TopoDS_Edge E, Eref;
BRep_Builder B; BRep_Builder B;
// Class BRep_Tool without fields and without Constructor : // Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT; // BRep_Tool BT;

View File

@ -72,15 +72,15 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML)
Standard_Real Dist, dU = (U2 - U1) / ( 2*NbPoints - 1); Standard_Real Dist, dU = (U2 - U1) / ( 2*NbPoints - 1);
TColgp_Array1OfPnt2d LP(1,2*NbPoints); // tableau Longueur <-> Param TColgp_Array1OfPnt2d LP(1,2*NbPoints); // tableau Longueur <-> Param
gp_Pnt P1, P2; gp_Pnt aPnt1, aPnt2;
P1 = myML.Value(U1); aPnt1 = myML.Value(U1);
for ( i = 0; i < 2*NbPoints ; i++) { for ( i = 0; i < 2*NbPoints ; i++) {
P2 = myML.Value(U1 + i*dU); aPnt2 = myML.Value(U1 + i*dU);
Dist = P1.Distance(P2); Dist = aPnt1.Distance(aPnt2);
Length += Dist; Length += Dist;
LP(i+1) = gp_Pnt2d( Length, U1 + (i*dU)); LP(i+1) = gp_Pnt2d( Length, U1 + (i*dU));
P1 = P2; aPnt1 = aPnt2;
} }
// On cherche a mettre NbPoints dans la curve. // On cherche a mettre NbPoints dans la curve.
@ -140,11 +140,11 @@ void BRepFill_ApproxSeewing::Perform(const BRepFill_MultiLine& ML)
Standard_Real Uf = ML.FirstParameter(); Standard_Real Uf = ML.FirstParameter();
Standard_Real Ul = ML.LastParameter(); Standard_Real Ul = ML.LastParameter();
Standard_Real dU = (Ul-Uf)/(NbPoints-1); Standard_Real dUlf = (Ul-Uf)/(NbPoints-1);
AppDef_MultiPointConstraint MPC; AppDef_MultiPointConstraint MPC;
for ( i = 1; i<= NbPoints-1; i++) { for ( i = 1; i<= NbPoints-1; i++) {
MPC = MLS.Value(i); MPC = MLS.Value(i);
U = Uf + (i-1) * dU; U = Uf + (i-1) * dUlf;
P (i) = MPC.Point(1); P (i) = MPC.Point(1);
P1(i) = MPC.Point2d(2); P1(i) = MPC.Point2d(2);
P2(i) = MPC.Point2d(3); P2(i) = MPC.Point2d(3);

View File

@ -852,7 +852,6 @@ void BRepFill_CompatibleWires::
// initialisation // initialisation
Standard_Integer NbSects=myWork.Length(); Standard_Integer NbSects=myWork.Length();
BRepTools_WireExplorer anExp; BRepTools_WireExplorer anExp;
TopoDS_Vertex V1, V2;
Standard_Boolean allClosed = Standard_True; Standard_Boolean allClosed = Standard_True;
Standard_Integer i,ii,ideb=1,ifin=NbSects; Standard_Integer i,ii,ideb=1,ifin=NbSects;
@ -945,8 +944,6 @@ void BRepFill_CompatibleWires::
if (SeqV.Length()>NbMaxV) if (SeqV.Length()>NbMaxV)
Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed"); Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed");
// extremity of the first wire
V1 = TopoDS::Vertex(SeqV.Value(1));
// loop on vertices of wire1 // loop on vertices of wire1
for (ii=1;ii<=SeqV.Length();ii++) { for (ii=1;ii<=SeqV.Length();ii++) {
@ -1022,8 +1019,6 @@ void BRepFill_CompatibleWires::
if ( SeqV.Length()>NbMaxV || SeqV.Length()>SizeMap ) if ( SeqV.Length()>NbMaxV || SeqV.Length()>SizeMap )
Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed"); Standard_NoSuchObject::Raise("BRepFill::SameNumberByPolarMethod failed");
// extremity of the first wire
V1 = TopoDS::Vertex(SeqV.Value(1));
// next wire // next wire
const TopoDS_Wire& wire2 = TopoDS::Wire(myWork(i+1)); const TopoDS_Wire& wire2 = TopoDS::Wire(myWork(i+1));
@ -1110,11 +1105,11 @@ void BRepFill_CompatibleWires::
// parse candidate edges // parse candidate edges
Standard_Real scal1,scal2; Standard_Real scal1,scal2;
if ( (V1.IsSame(VVF)&&V2.IsSame(VVL)) || (V2.IsSame(VVF)&&V1.IsSame(VVL)) ) { if ( (V1.IsSame(VVF)&&V2.IsSame(VVL)) || (V2.IsSame(VVF)&&V1.IsSame(VVL)) ) {
Standard_Real U1 = BRep_Tool::Parameter(VVF,E); Standard_Real U1param = BRep_Tool::Parameter(VVF,E);
Standard_Real U2 = BRep_Tool::Parameter(VVL,E); Standard_Real U2param = BRep_Tool::Parameter(VVL,E);
BRepAdaptor_Curve Curve(E); BRepAdaptor_Curve CurveE(E);
gp_Pnt PP1 = Curve.Value(0.1*(U1+9*U2)); gp_Pnt PP1 = CurveE.Value(0.1*(U1param +9* U2param));
gp_Pnt PP2 = Curve.Value(0.1*(9*U1+U2)); gp_Pnt PP2 = CurveE.Value(0.1*(9* U1param + U2param));
for (rang=i;rang>ideb;rang--) { for (rang=i;rang>ideb;rang--) {
Transform(WithRotation, PP1, Transform(WithRotation, PP1,
@ -1518,12 +1513,12 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
gp_Vec NormalOfFirstPlane = FirstPlane.Axis().Direction(); gp_Vec NormalOfFirstPlane = FirstPlane.Axis().Direction();
for (i = ideb+1; i <= ifin; i++) for (i = ideb+1; i <= ifin; i++)
{ {
const TopoDS_Wire& wire = TopoDS::Wire(myWork(i)); const TopoDS_Wire& aWire = TopoDS::Wire(myWork(i));
//Compute offset vector as current bary center projected on first plane //Compute offset vector as current bary center projected on first plane
//to first bary center //to first bary center
gp_Pln CurPlane; gp_Pln CurPlane;
PlaneOfWire(wire, CurPlane); PlaneOfWire(aWire, CurPlane);
gp_Pnt CurBary = CurPlane.Location(); gp_Pnt CurBary = CurPlane.Location();
gp_Vec aVec(FirstBary, CurBary); gp_Vec aVec(FirstBary, CurBary);
gp_Vec anOffsetProj = (aVec * NormalOfFirstPlane) * NormalOfFirstPlane; gp_Vec anOffsetProj = (aVec * NormalOfFirstPlane) * NormalOfFirstPlane;
@ -1535,7 +1530,7 @@ void BRepFill_CompatibleWires::ComputeOrigin(const Standard_Boolean /*polar*/ )
BB.MakeWire(newwire); BB.MakeWire(newwire);
TopTools_SequenceOfShape SeqVertices, SeqEdges; TopTools_SequenceOfShape SeqVertices, SeqEdges;
for (anExp.Init(wire); anExp.More(); anExp.Next()) for (anExp.Init(aWire); anExp.More(); anExp.Next())
{ {
SeqVertices.Append( anExp.CurrentVertex() ); SeqVertices.Append( anExp.CurrentVertex() );
SeqEdges.Append( anExp.Current() ); SeqEdges.Append( anExp.Current() );

View File

@ -502,8 +502,8 @@ void BRepFill_Evolved::PrivatePerform(const TopoDS_Face& Spine,
// Calculate the map to the right of the current wire. // Calculate the map to the right of the current wire.
//---------------------------------------------- //----------------------------------------------
BRepLib_MakeFace B(gp_Pln(0.,0.,1.,0.)); BRepLib_MakeFace B(gp_Pln(0.,0.,1.,0.));
TopoDS_Shape aLocalShape = SpineExp.Current().Reversed(); TopoDS_Shape aLocalShapeRev = SpineExp.Current().Reversed();
B.Add(TopoDS::Wire(aLocalShape)); B.Add(TopoDS::Wire(aLocalShapeRev));
// B.Add(TopoDS::Wire(SpineExp.Current().Reversed())); // B.Add(TopoDS::Wire(SpineExp.Current().Reversed()));
Face = B.Face(); Face = B.Face();
BRepMAT2d_Explorer Exp(Face); BRepMAT2d_Explorer Exp(Face);
@ -750,8 +750,6 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
} }
#endif #endif
TopoDS_Vertex VF,VL;
//--------------------------------------------------- //---------------------------------------------------
// Construction of edges associated to bissectrices. // Construction of edges associated to bissectrices.
//--------------------------------------------------- //---------------------------------------------------
@ -1109,14 +1107,14 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
//------------------------------------------------------------ //------------------------------------------------------------
// No connected face in the volevo => no parallel edge. // No connected face in the volevo => no parallel edge.
//------------------------------------------------------------ //------------------------------------------------------------
TopTools_SequenceOfShape S; TopTools_SequenceOfShape aSeqOfShape;
TrimEdge (CurrentEdge, TrimEdge (CurrentEdge,
MapBis (FaceControle), MapBis (FaceControle),
MapBis (CurrentEdge) , MapBis (CurrentEdge) ,
MapVerPar(CurrentEdge) , S); MapVerPar(CurrentEdge) , aSeqOfShape);
for ( k = 1; k <= S.Length(); k++) { for ( k = 1; k <= aSeqOfShape.Length(); k++) {
myMap(CurrentSpine)(VCF).Append(S.Value(k)); myMap(CurrentSpine)(VCF).Append(aSeqOfShape.Value(k));
#ifdef DRAW #ifdef DRAW
if (AffichEdge) { if (AffichEdge) {
@ -1147,14 +1145,14 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
// the number of element of the list allows to know // the number of element of the list allows to know
// if the edges have already been done (closed profile) . // if the edges have already been done (closed profile) .
if (YaFace && myMap(CurrentSpine)(VCL).Extent()<= 1) { if (YaFace && myMap(CurrentSpine)(VCL).Extent()<= 1) {
TopTools_SequenceOfShape S; TopTools_SequenceOfShape aSeqOfShape;
TrimEdge (CurrentEdge, TrimEdge (CurrentEdge,
MapBis (FaceControle), MapBis (FaceControle),
MapBis (CurrentEdge) , MapBis (CurrentEdge) ,
MapVerPar(CurrentEdge) , S); MapVerPar(CurrentEdge) , aSeqOfShape);
for ( k = 1; k <= S.Length(); k++) { for ( k = 1; k <= aSeqOfShape.Length(); k++) {
myMap(CurrentSpine)(VCL).Append(S.Value(k)); myMap(CurrentSpine)(VCL).Append(aSeqOfShape.Value(k));
#ifdef DRAW #ifdef DRAW
if (AffichEdge) { if (AffichEdge) {
@ -1214,13 +1212,13 @@ void BRepFill_Evolved::ElementaryPerform (const TopoDS_Face& Sp,
} }
//Cut of the face. //Cut of the face.
TopTools_SequenceOfShape S; TopTools_SequenceOfShape aSeqOfShape;
TrimFace (CurrentFace, MapBis(CurrentFace), S); TrimFace (CurrentFace, MapBis(CurrentFace), aSeqOfShape);
for (Standard_Integer ii = 1; ii <= S.Length(); ii++) { for (Standard_Integer ii = 1; ii <= aSeqOfShape.Length(); ii++) {
myBuilder.Add (myShape,S.Value(ii)); myBuilder.Add (myShape, aSeqOfShape.Value(ii));
myMap(CurrentSpine)(CurrentProf).Append(S.Value(ii)); myMap(CurrentSpine)(CurrentProf).Append(aSeqOfShape.Value(ii));
} }
} }
} }
@ -1260,8 +1258,8 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp,
BRepMAT2d_LinkTopoBilo& Link, BRepMAT2d_LinkTopoBilo& Link,
const GeomAbs_JoinType Join) const GeomAbs_JoinType Join)
{ {
TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeOriented = Sp.Oriented(TopAbs_FORWARD);
mySpine = TopoDS::Face(aLocalShape); mySpine = TopoDS::Face(aLocalShapeOriented);
// mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD)); // mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD));
myProfile = Pr; myProfile = Pr;
myMap.Clear(); myMap.Clear();
@ -1271,7 +1269,6 @@ void BRepFill_Evolved::PlanarPerform (const TopoDS_Face& Sp,
BRepTools_WireExplorer ProfExp; BRepTools_WireExplorer ProfExp;
TopExp_Explorer Exp,exp1,exp2; TopExp_Explorer Exp,exp1,exp2;
TopoDS_Shape Rest;
TopTools_DataMapOfShapeListOfShape EmptyMap; TopTools_DataMapOfShapeListOfShape EmptyMap;
TopTools_ListOfShape EmptyList; TopTools_ListOfShape EmptyList;
TopTools_DataMapOfShapeShape MapVP; TopTools_DataMapOfShapeShape MapVP;
@ -1436,8 +1433,8 @@ void BRepFill_Evolved::VerticalPerform (const TopoDS_Face& Sp,
// MAJ myMap // MAJ myMap
for (Exp.Init(Base,TopAbs_EDGE); Exp.More(); Exp.Next()) { for (Exp.Init(Base,TopAbs_EDGE); Exp.More(); Exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(Exp.Current()); const TopoDS_Edge& anEdge = TopoDS::Edge(Exp.Current());
const TopoDS_Shape& AE = OffAnc.Ancestor(E); const TopoDS_Shape& AE = OffAnc.Ancestor(anEdge);
if (!myMap.IsBound(AE)) { if (!myMap.IsBound(AE)) {
myMap.Bind(AE,EmptyMap); myMap.Bind(AE,EmptyMap);
} }
@ -1445,7 +1442,7 @@ void BRepFill_Evolved::VerticalPerform (const TopoDS_Face& Sp,
TopTools_ListOfShape L; TopTools_ListOfShape L;
myMap(AE).Bind(V1,L); myMap(AE).Bind(V1,L);
} }
myMap(AE)(V1).Append(E); myMap(AE)(V1).Append(anEdge);
} }
First = Standard_False; First = Standard_False;
} }
@ -2116,7 +2113,7 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
Loop.Perform(); Loop.Perform();
Loop.WiresToFaces(); Loop.WiresToFaces();
const TopTools_ListOfShape& L = Loop.NewFaces(); const TopTools_ListOfShape& L = Loop.NewFaces();
TopTools_ListIteratorOfListOfShape itL(L); TopTools_ListIteratorOfListOfShape anIterL(L);
// Maj of myTop and myBottom for the history // Maj of myTop and myBottom for the history
// and addition of constructed faces. // and addition of constructed faces.
@ -2125,12 +2122,12 @@ void BRepFill_Evolved::AddTopAndBottom(BRepTools_Quilt& Glue)
B.MakeCompound(Bouchon); B.MakeCompound(Bouchon);
Standard_Integer j = 0; Standard_Integer j = 0;
for (itL.Initialize(L); itL.More(); itL.Next()) { for (anIterL.Initialize(L); anIterL.More(); anIterL.Next()) {
j++; j++;
Glue.Add(itL.Value()); Glue.Add(anIterL.Value());
if (j ==1 && i == 0) myTop = itL.Value(); if (j ==1 && i == 0) myTop = anIterL.Value();
if (j ==1 && i == 1) myBottom = itL.Value(); if (j ==1 && i == 1) myBottom = anIterL.Value();
B.Add(Bouchon,itL.Value()); B.Add(Bouchon,anIterL.Value());
} }
if (i == 0 && j > 1) myTop = Bouchon; if (i == 0 && j > 1) myTop = Bouchon;
if (i == 1 && j > 1) myBottom = Bouchon; if (i == 1 && j > 1) myBottom = Bouchon;

View File

@ -386,8 +386,6 @@ void BRepFill_Filling::AddConstraints( const BRepFill_SequenceOfEdgeFaceAndOrder
//====================================================================== //======================================================================
void BRepFill_Filling::BuildWires( TopTools_ListOfShape& EdgeList, TopTools_ListOfShape& WireList ) void BRepFill_Filling::BuildWires( TopTools_ListOfShape& EdgeList, TopTools_ListOfShape& WireList )
{ {
TopoDS_Wire CurWire;
TopoDS_Edge CurEdge;
TopTools_ListIteratorOfListOfShape Itl; TopTools_ListIteratorOfListOfShape Itl;
Standard_Integer i, j; Standard_Integer i, j;

View File

@ -251,8 +251,8 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
pos = AdC.Line().Location(); pos = AdC.Line().Location();
dist = AdC.Value(first2).Distance(AdC.Value(last2)); dist = AdC.Value(first2).Distance(AdC.Value(last2));
gp_Vec vec(AdC.Value(first2),AdC.Value(last2)); gp_Vec vec(AdC.Value(first2),AdC.Value(last2));
gp_Dir dir(vec); gp_Dir aDir(vec);
axe = gp_Ax1(AdC.Value(first2),dir); axe = gp_Ax1(AdC.Value(first2), aDir);
if (axe.IsParallel(axe1,Precision::Angular())) { if (axe.IsParallel(axe1,Precision::Angular())) {
// parallel straight line // parallel straight line
if (Abs(dist-dist1)<Precision::Confusion()) { if (Abs(dist-dist1)<Precision::Confusion()) {

View File

@ -370,14 +370,14 @@ BRepFill_MultiLine::BRepFill_MultiLine(const TopoDS_Face& Face1,
if ( myBis.GetType() == GeomAbs_Line) { if ( myBis.GetType() == GeomAbs_Line) {
Standard_Real DeltaU = myBis.LastParameter() - myBis.FirstParameter(); Standard_Real DeltaU = myBis.LastParameter() - myBis.FirstParameter();
gp_Pnt2d P1 = ValueOnF1(myBis.FirstParameter() + 0.1*DeltaU); gp_Pnt2d aPnt1 = ValueOnF1(myBis.FirstParameter() + 0.1*DeltaU);
gp_Pnt2d P2 = ValueOnF1(myBis.FirstParameter() + 0.9*DeltaU); gp_Pnt2d aPnt2 = ValueOnF1(myBis.FirstParameter() + 0.9*DeltaU);
if ( myIsoU1) { if ( myIsoU1) {
if ( Abs(P1.Y() - P2.Y()) < Precision::Confusion()) if ( Abs(aPnt1.Y() - aPnt2.Y()) < Precision::Confusion())
myKPart = 1; myKPart = 1;
} }
else { else {
if ( Abs(P1.X() - P2.X()) < Precision::Confusion()) if ( Abs(aPnt1.X() - aPnt2.X()) < Precision::Confusion())
myKPart = 1; myKPart = 1;
} }

View File

@ -110,8 +110,8 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge)
// special treatment of conic curve // special treatment of conic curve
if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic))) if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic)))
{ {
const Handle(Geom_Curve)& aCurve = aTrimCurve; // to avoid ambiguity const Handle(Geom_Curve)& aCurveTemp = aTrimCurve; // to avoid ambiguity
GeomConvert_ApproxCurve anAppr (aCurve, Precision::Confusion(), GeomAbs_C1, 16, 14); GeomConvert_ApproxCurve anAppr (aCurveTemp, Precision::Confusion(), GeomAbs_C1, 16, 14);
if (anAppr.HasResult()) if (anAppr.HasResult())
aBSCurve = anAppr.Curve(); aBSCurve = anAppr.Curve();
} }

View File

@ -725,8 +725,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
const Standard_Real Alt) const Standard_Real Alt)
{ {
myIsDone = Standard_False; myIsDone = Standard_False;
TopoDS_Shape aLocalShape = Spine.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeWork = Spine.Oriented(TopAbs_FORWARD);
myWorkSpine = TopoDS::Face(aLocalShape); myWorkSpine = TopoDS::Face(aLocalShapeWork);
// myWorkSpine = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD)); // myWorkSpine = TopoDS::Face(Spine.Oriented(TopAbs_FORWARD));
myJoinType = Join; myJoinType = Join;
myOffset = Offset ; myOffset = Offset ;
@ -1042,7 +1042,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
myMap(j).Clear(); myMap(j).Clear();
if (MapBis.IsBound(CurrentEdge)) { if (MapBis.IsBound(CurrentEdge)) {
TopTools_SequenceOfShape S; TopTools_SequenceOfShape aSeqOfShape;
if (!MapBis(CurrentEdge).IsEmpty()) { if (!MapBis(CurrentEdge).IsEmpty()) {
Standard_Integer IndOfE = 0; Standard_Integer IndOfE = 0;
if (myIsOpenResult) if (myIsOpenResult)
@ -1058,9 +1058,9 @@ void BRepFill_OffsetWire::PerformWithBiLo
Detromp (CurrentSpine), Detromp (CurrentSpine),
MapBis (CurrentEdge) , MapBis (CurrentEdge) ,
MapVerPar(CurrentEdge) , MapVerPar(CurrentEdge) ,
S, MapVV, IndOfE); aSeqOfShape, MapVV, IndOfE);
for ( k = 1; k <= S.Length(); k++) { for ( k = 1; k <= aSeqOfShape.Length(); k++) {
myMap(j).Append(S.Value(k)); myMap(j).Append(aSeqOfShape.Value(k));
} }
} }
else { else {
@ -1123,15 +1123,15 @@ void BRepFill_OffsetWire::PerformWithBiLo
TopExp_Explorer Explo( myShape, TopAbs_EDGE ); TopExp_Explorer Explo( myShape, TopAbs_EDGE );
for (; Explo.More(); Explo.Next()) for (; Explo.More(); Explo.Next())
{ {
TopoDS_Edge E = TopoDS::Edge( Explo.Current() ); TopoDS_Edge anEdge = TopoDS::Edge( Explo.Current() );
TopoDS_Vertex V1, V2; TopoDS_Vertex V1, V2;
TopExp::Vertices( E, V1, V2 ); TopExp::Vertices(anEdge, V1, V2 );
Handle(BRep_TVertex)& TV1 = *((Handle(BRep_TVertex)*) &(V1).TShape()); Handle(BRep_TVertex)& TV1 = *((Handle(BRep_TVertex)*) &(V1).TShape());
Handle(BRep_TVertex)& TV2 = *((Handle(BRep_TVertex)*) &(V2).TShape()); Handle(BRep_TVertex)& TV2 = *((Handle(BRep_TVertex)*) &(V2).TShape());
TopLoc_Location loc; TopLoc_Location loc;
Standard_Real f, l; Standard_Real f, l;
Handle( Geom_Curve ) theCurve = BRep_Tool::Curve( E, loc, f, l ); Handle( Geom_Curve ) theCurve = BRep_Tool::Curve(anEdge, loc, f, l );
theCurve = Handle( Geom_Curve )::DownCast( theCurve->Copy() ); theCurve = Handle( Geom_Curve )::DownCast( theCurve->Copy() );
theCurve->Transform( loc.Transformation() ); theCurve->Transform( loc.Transformation() );
gp_Pnt f3d = theCurve->Value( f ); gp_Pnt f3d = theCurve->Value( f );
@ -1531,7 +1531,6 @@ void BRepFill_OffsetWire::FixHoles()
TopTools_SequenceOfShape ClosedWires, UnclosedWires, IsolatedWires; TopTools_SequenceOfShape ClosedWires, UnclosedWires, IsolatedWires;
Standard_Real MaxTol = 0.; Standard_Real MaxTol = 0.;
Standard_Integer i;
BRep_Builder BB; BRep_Builder BB;
TopExp_Explorer Explo( mySpine, TopAbs_VERTEX ); TopExp_Explorer Explo( mySpine, TopAbs_VERTEX );
@ -1807,6 +1806,7 @@ void BRepFill_OffsetWire::FixHoles()
{ {
TopoDS_Compound R; TopoDS_Compound R;
BB.MakeCompound( R ); BB.MakeCompound( R );
Standard_Integer i;
for (i = 1; i <= ClosedWires.Length(); i++) for (i = 1; i <= ClosedWires.Length(); i++)
BB.Add( R, ClosedWires(i) ); BB.Add( R, ClosedWires(i) );
for (i = 1; i <= IsolatedWires.Length(); i++) for (i = 1; i <= IsolatedWires.Length(); i++)

View File

@ -2303,12 +2303,12 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
exuv = ExchUV(isec, ipath); exuv = ExchUV(isec, ipath);
S->Bounds(UFirst, ULast, VFirst, VLast); S->Bounds(UFirst, ULast, VFirst, VLast);
if (UReverse(isec, ipath)) { if (UReverse(isec, ipath)) {
Standard_Real aux; Standard_Real aux2;
if (exuv) { if (exuv) {
aux = VFirst; VFirst = VLast; VLast = aux; aux2 = VFirst; VFirst = VLast; VLast = aux2;
} }
else { else {
aux = UFirst; UFirst = ULast; ULast = aux; aux2 = UFirst; UFirst = ULast; ULast = aux2;
} }
} }
@ -2617,7 +2617,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//(4.2) // General case => Tweezers //(4.2) // General case => Tweezers
Standard_Boolean isG1; Standard_Boolean isG1;
TopoDS_Face FF; TopoDS_Face FF;
TopoDS_Edge E; TopoDS_Edge anEdge;
for (isec=1; isec <= NbLaw+1; isec++) { for (isec=1; isec <= NbLaw+1; isec++) {
if (isec>1) isG1 = if (isec>1) isG1 =
@ -2646,8 +2646,8 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
if (isG1) { if (isG1) {
if (ipath==NbPath+1) FF = TopoDS::Face(myFaces->Value(isec, 1)); if (ipath==NbPath+1) FF = TopoDS::Face(myFaces->Value(isec, 1));
else FF = TopoDS::Face(myFaces->Value(isec, IPath)); else FF = TopoDS::Face(myFaces->Value(isec, IPath));
E = TopoDS::Edge(myVEdges->Value(isec, IPath)); anEdge = TopoDS::Edge(myVEdges->Value(isec, IPath));
BRepLib::EncodeRegularity(E, FF, BRepLib::EncodeRegularity(anEdge, FF,
TopoDS::Face(myFaces->Value(isec, IPath-1)), TopoDS::Face(myFaces->Value(isec, IPath-1)),
myTolAngular); myTolAngular);
} }

View File

@ -329,7 +329,7 @@ void BRepFill_TrimShellCorner::Perform()
// //
BOPDS_VectorOfPoint& aVP=aFFi.ChangePoints(); BOPDS_VectorOfPoint& aVP=aFFi.ChangePoints();
aNbP=aVP.Extent(); aNbP=aVP.Extent();
BOPDS_VectorOfCurve& aVC=aFFi.ChangeCurves(); const BOPDS_VectorOfCurve& aVC=aFFi.Curves();
aNbC=aVC.Extent(); aNbC=aVC.Extent();
if (!aNbP && !aNbC) { if (!aNbP && !aNbC) {
if (!theDS->HasInterfSubShapes(nF1, nF2)) { if (!theDS->HasInterfSubShapes(nF1, nF2)) {
@ -338,7 +338,6 @@ void BRepFill_TrimShellCorner::Perform()
} }
// //
if((nF1 == anIndex1) && (nF2 == anIndex2)) { if((nF1 == anIndex1) && (nF2 == anIndex2)) {
const BOPDS_VectorOfCurve& aVC = aFFi.Curves();
bhassec = Standard_False; bhassec = Standard_False;
// //
for (j = 0; j < aNbC; ++j) { for (j = 0; j < aNbC; ++j) {

View File

@ -362,16 +362,16 @@ void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIn
Standard_Boolean isSensOK = (aDist12 > 0. && aDist23 > 0.); Standard_Boolean isSensOK = (aDist12 > 0. && aDist23 > 0.);
if (isSensOK) if (isSensOK)
{ {
Standard_Integer anEdges[3]; Standard_Integer anEdgeIds[3];
Standard_Boolean anEdgesOri[3]; Standard_Boolean anEdgesOri[3];
for ( Standard_Integer aTriLinkIt = 0; aTriLinkIt < 3; ++aTriLinkIt ) for ( Standard_Integer aTriLinkIt = 0; aTriLinkIt < 3; ++aTriLinkIt )
{ {
const Standard_Integer& anEdgeInfo = anEdgesInfo[aTriLinkIt]; const Standard_Integer& anEdgeInfo = anEdgesInfo[aTriLinkIt];
anEdges[aTriLinkIt] = Abs( anEdgeInfo ); anEdgeIds[aTriLinkIt] = Abs( anEdgeInfo );
anEdgesOri[aTriLinkIt] = anEdgeInfo > 0; anEdgesOri[aTriLinkIt] = anEdgeInfo > 0;
} }
addTriangle( anEdges, anEdgesOri, aNodes ); addTriangle(anEdgeIds, anEdgesOri, aNodes );
} }
else else
{ {

View File

@ -59,7 +59,6 @@ BRepMesh_EdgeTessellator::BRepMesh_EdgeTessellator(
else else
myCOnS.Initialize(theEdge, theFaceAttribute->Face()); myCOnS.Initialize(theEdge, theFaceAttribute->Face());
TopLoc_Location aLoc;
const GeomAbs_CurveType aCurveType = myCOnS.GetType(); const GeomAbs_CurveType aCurveType = myCOnS.GetType();
Standard_Integer aMinPntNb = (aCurveType == GeomAbs_Circle) ? 4 : 2; //OCC287 Standard_Integer aMinPntNb = (aCurveType == GeomAbs_Circle) ? 4 : 2; //OCC287

View File

@ -214,7 +214,7 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces,
// Calculate the intersections of offset faces // Calculate the intersections of offset faces
// Distinction of intersection between faces // tangents. // Distinction of intersection between faces // tangents.
//--------------------------------------------------------------- //---------------------------------------------------------------
TopoDS_Face F1,F2; TopoDS_Face F2;
TopTools_ListIteratorOfListOfShape it; TopTools_ListIteratorOfListOfShape it;
//--------------------------------------------------------------- //---------------------------------------------------------------
@ -591,7 +591,6 @@ void BRepOffset_Inter3d::ContextIntByInt
TopTools_DataMapOfShapeShape& Build, TopTools_DataMapOfShapeShape& Build,
TopTools_ListOfShape& Failed) TopTools_ListOfShape& Failed)
{ {
TopTools_ListOfShape LInt1,LInt2;
TopTools_MapOfShape MV; TopTools_MapOfShape MV;
TopExp_Explorer exp; TopExp_Explorer exp;
TopoDS_Face OF,NF,WCF; TopoDS_Face OF,NF,WCF;
@ -845,11 +844,11 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte
// LInt1,LInt2); // LInt1,LInt2);
LInt1.Clear(); LInt1.Append(OE); LInt1.Clear(); LInt1.Append(OE);
LInt2.Clear(); LInt2.Clear();
TopAbs_Orientation O1,O2; TopAbs_Orientation anOri1, anOri2;
BRepOffset_Tool::OrientSection(OE,CF,OF1,O1,O2); BRepOffset_Tool::OrientSection(OE,CF,OF1, anOri1,anOri2);
// if (mySide == TopAbs_OUT); // if (mySide == TopAbs_OUT);
O1 = TopAbs::Reverse(O1); anOri1 = TopAbs::Reverse(anOri1);
LInt1.First().Orientation(O1); LInt1.First().Orientation(anOri1);
Store(CF,OF1,LInt1,LInt2); Store(CF,OF1,LInt1,LInt2);
} }
} }

View File

@ -217,8 +217,8 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
// F is reversed it will be added in myOffC. // F is reversed it will be added in myOffC.
// and myOffC will be reversed in the final result. // and myOffC will be reversed in the final result.
//----------------------------------------------- //-----------------------------------------------
TopoDS_Shape aLocalShape = F.Reversed(); TopoDS_Shape aReversedF = F.Reversed();
if (InSide) Loops.Init(TopoDS::Face(aLocalShape)); if (InSide) Loops.Init(TopoDS::Face(aReversedF));
// if (InSide) Loops.Init(TopoDS::Face(F.Reversed())); // if (InSide) Loops.Init(TopoDS::Face(F.Reversed()));
else Loops.Init(F); else Loops.Init(F);
//-------------------------------------------------------- //--------------------------------------------------------
@ -232,9 +232,9 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
if (Analyse.HasAncestor(CE)) { if (Analyse.HasAncestor(CE)) {
// the stop of cups except for the connectivity stops between caps. // the stop of cups except for the connectivity stops between caps.
// if (!AsDes->HasAscendant(CE)) { // if (!AsDes->HasAscendant(CE)) {
aLocalShape = CE.Reversed(); TopoDS_Shape aReversedE = CE.Reversed();
if (InSide) Loops.AddConstEdge(CE); if (InSide) Loops.AddConstEdge(CE);
else Loops.AddConstEdge(TopoDS::Edge(aLocalShape)); else Loops.AddConstEdge(TopoDS::Edge(aReversedE));
// else Loops.AddConstEdge(TopoDS::Edge(CE.Reversed())); // else Loops.AddConstEdge(TopoDS::Edge(CE.Reversed()));
} }
} }
@ -263,8 +263,8 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
if (InSide) Loops.AddConstEdge(TopoDS::Edge(CE)); if (InSide) Loops.AddConstEdge(TopoDS::Edge(CE));
else else
{ {
TopoDS_Shape aLocalShape = CE.Reversed(); TopoDS_Shape aReversedE = CE.Reversed();
Loops.AddConstEdge(TopoDS::Edge(aLocalShape)); Loops.AddConstEdge(TopoDS::Edge(aReversedE));
} }
// else Loops.AddConstEdge(TopoDS::Edge(CE.Reversed())); // else Loops.AddConstEdge(TopoDS::Edge(CE.Reversed()));
} }

View File

@ -1147,9 +1147,9 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
const TopoDS_Shape& FI = Exp.Current(); const TopoDS_Shape& FI = Exp.Current();
const TopoDS_Shape& OFI = MapSF(FI).Face(); const TopoDS_Shape& OFI = MapSF(FI).Face();
if (MES.IsBound(OFI)) { if (MES.IsBound(OFI)) {
const TopoDS_Face& NF = TopoDS::Face(MES(OFI)); const TopoDS_Face& aLocalFace = TopoDS::Face(MES(OFI));
LFE.Append(NF); LFE.Append(aLocalFace);
IMOE.SetRoot(NF); IMOE.SetRoot(aLocalFace);
} }
} }
@ -1499,10 +1499,10 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
Standard_Real CurOffset = myOffset; Standard_Real CurOffset = myOffset;
if ( myFaceOffset.IsBound(Anc.First())) if ( myFaceOffset.IsBound(Anc.First()))
CurOffset = myFaceOffset(Anc.First()); CurOffset = myFaceOffset(Anc.First());
TopoDS_Shape aLocalShape = MapSF(Anc.First()).Generated(E); TopoDS_Shape aLocalShapeGen = MapSF(Anc.First()).Generated(E);
TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape); TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShapeGen);
aLocalShape = MapSF(Anc.Last()).Generated(E); aLocalShapeGen = MapSF(Anc.Last()).Generated(E);
TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShape); TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShapeGen);
// TopoDS_Edge EOn1 = TopoDS::Edge(MapSF(Anc.First()).Generated(E)); // TopoDS_Edge EOn1 = TopoDS::Edge(MapSF(Anc.First()).Generated(E));
// TopoDS_Edge EOn2 = TopoDS::Edge(MapSF(Anc.Last()) .Generated(E)); // TopoDS_Edge EOn2 = TopoDS::Edge(MapSF(Anc.Last()) .Generated(E));
// find if exits tangent edges in the original shape // find if exits tangent edges in the original shape
@ -3312,7 +3312,7 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
} }
else if ( Type1 == TopAbs_EDGE && Type2 == TopAbs_EDGE) { else if ( Type1 == TopAbs_EDGE && Type2 == TopAbs_EDGE) {
TopTools_ListOfShape LV; TopTools_ListOfShape LV;
TopExp_Explorer exp1,exp2; TopExp_Explorer exp1;
for (exp1.Init(Root1,TopAbs_VERTEX); exp1.More(); exp1.Next()) { for (exp1.Init(Root1,TopAbs_VERTEX); exp1.More(); exp1.Next()) {
TopExp_Explorer exp2(F2,TopAbs_EDGE); TopExp_Explorer exp2(F2,TopAbs_EDGE);
for (exp2.Init(Root2,TopAbs_VERTEX); exp2.More(); exp2.Next()) { for (exp2.Init(Root2,TopAbs_VERTEX); exp2.More(); exp2.Next()) {

View File

@ -574,7 +574,7 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face,
{ {
const Standard_Real TolApex = 1.e-5; const Standard_Real TolApex = 1.e-5;
//define the iso of singularity (u or v) //define the iso of singularity (u or v)
const TopoDS_Edge& theDegEdge = TopoDS::Edge(DegEdges(1)); TopoDS_Edge theDegEdge = TopoDS::Edge(DegEdges(1));
Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(theDegEdge, Face, fpar, lpar); Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(theDegEdge, Face, fpar, lpar);
gp_Pnt2d fp2d = aCurve->Value(fpar); gp_Pnt2d fp2d = aCurve->Value(fpar);
gp_Pnt2d lp2d = aCurve->Value(lpar); gp_Pnt2d lp2d = aCurve->Value(lpar);
@ -590,8 +590,6 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face,
} }
else //DegEdges.Length() == 1 else //DegEdges.Length() == 1
{ {
const TopoDS_Edge& theDegEdge = TopoDS::Edge(DegEdges(1));
Handle(Geom2d_Curve) aCurve = BRep_Tool::CurveOnSurface(theDegEdge, Face, fpar, lpar);
if (UisoDegen) if (UisoDegen)
{ {
if (Abs(fp2d.X() - uf1) <= Precision::Confusion()) if (Abs(fp2d.X() - uf1) <= Precision::Confusion())
@ -804,8 +802,8 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face,
TopTools_DataMapOfShapeShape MapSS; TopTools_DataMapOfShapeShape MapSS;
// mise a jour de la map sur les vertex deja crees // mise a jour de la map sur les vertex deja crees
TopoDS_Shape aLocalShape = Face.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeOriented = Face.Oriented(TopAbs_FORWARD);
TopoDS_Face CurFace = TopoDS::Face(aLocalShape); TopoDS_Face CurFace = TopoDS::Face(aLocalShapeOriented);
// TopoDS_Face CurFace = TopoDS::Face(Face.Oriented(TopAbs_FORWARD)); // TopoDS_Face CurFace = TopoDS::Face(Face.Oriented(TopAbs_FORWARD));
TopTools_MapOfShape VonDegen; TopTools_MapOfShape VonDegen;
@ -970,9 +968,9 @@ void BRepOffset_Offset::Init(const TopoDS_Face& Face,
myBuilder.Range(OE, myFace, f, l); myBuilder.Range(OE, myFace, f, l);
if (!BRep_Tool::Degenerated(E) && TheSurf->IsUClosed()) if (!BRep_Tool::Degenerated(E) && TheSurf->IsUClosed())
{ {
TopoDS_Shape aLocalShape = E.Reversed(); TopoDS_Shape aLocalShapeReversedE = E.Reversed();
Handle(Geom2d_Curve) C2d_1 = Handle(Geom2d_Curve) C2d_1 =
BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShape),CurFace,f,l); BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShapeReversedE),CurFace,f,l);
P2d1 = C2d_1->Value(BRep_Tool::Parameter(V1,E,CurFace)); P2d1 = C2d_1->Value(BRep_Tool::Parameter(V1,E,CurFace));
P2d2 = C2d_1->Value(BRep_Tool::Parameter(V2,E,CurFace)); P2d2 = C2d_1->Value(BRep_Tool::Parameter(V2,E,CurFace));
if (VonDegen.Contains(V1)) if (VonDegen.Contains(V1))

View File

@ -725,7 +725,6 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1,
#endif #endif
Handle (Geom_Curve) CI; Handle (Geom_Curve) CI;
TopoDS_Edge E;
TopAbs_Orientation O1,O2; TopAbs_Orientation O1,O2;
L1.Clear(); L2.Clear(); L1.Clear(); L2.Clear();
BRep_Builder B; BRep_Builder B;
@ -1783,7 +1782,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
for (i = 1; i <= wseq.Length(); i++) for (i = 1; i <= wseq.Length(); i++)
{ {
TopoDS_Wire aWire = TopoDS::Wire(wseq(i)); TopoDS_Wire aWire = TopoDS::Wire(wseq(i));
TopTools_SequenceOfShape EdgesForConcat; TopTools_SequenceOfShape aLocalEdgesForConcat;
if (aWire.Closed()) if (aWire.Closed())
{ {
TopoDS_Vertex StartVertex; TopoDS_Vertex StartVertex;
@ -1826,7 +1825,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
TopExp::Vertices( StartEdge, V1, V2 ); TopExp::Vertices( StartEdge, V1, V2 );
StartVertex = V1; StartVertex = V1;
} }
EdgesForConcat.Append( StartEdge ); aLocalEdgesForConcat.Append( StartEdge );
while (!Elist.IsEmpty()) while (!Elist.IsEmpty())
{ {
for (itl.Initialize(Elist); itl.More(); itl.Next()) for (itl.Initialize(Elist); itl.More(); itl.Next())
@ -1837,14 +1836,14 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
if (V1.IsSame(StartVertex)) if (V1.IsSame(StartVertex))
{ {
StartVertex = V2; StartVertex = V2;
EdgesForConcat.Append( anEdge ); aLocalEdgesForConcat.Append( anEdge );
Elist.Remove(itl); Elist.Remove(itl);
break; break;
} }
else if (V2.IsSame(StartVertex)) else if (V2.IsSame(StartVertex))
{ {
StartVertex = V1; StartVertex = V1;
EdgesForConcat.Append( anEdge ); aLocalEdgesForConcat.Append( anEdge );
Elist.Remove(itl); Elist.Remove(itl);
break; break;
} }
@ -1855,11 +1854,11 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
{ {
BRepTools_WireExplorer Wexp( aWire ); BRepTools_WireExplorer Wexp( aWire );
for (; Wexp.More(); Wexp.Next()) for (; Wexp.More(); Wexp.Next())
EdgesForConcat.Append( Wexp.Current() ); aLocalEdgesForConcat.Append( Wexp.Current() );
} }
TopoDS_Edge theEdge = TopoDS_Edge theEdge =
AssembleEdge( pDS, cpF1, cpF2, addPCurve1, addPCurve2, EdgesForConcat ); AssembleEdge( pDS, cpF1, cpF2, addPCurve1, addPCurve2, aLocalEdgesForConcat );
eseq.Append( theEdge ); eseq.Append( theEdge );
} }
} //end of else (when TrueEdges is empty) } //end of else (when TrueEdges is empty)
@ -2006,7 +2005,6 @@ void BRepOffset_Tool::InterOrExtent(const TopoDS_Face& F1,
#endif #endif
Handle (Geom_Curve) CI; Handle (Geom_Curve) CI;
TopoDS_Edge E;
TopAbs_Orientation O1,O2; TopAbs_Orientation O1,O2;
L1.Clear(); L2.Clear(); L1.Clear(); L2.Clear();
Handle (Geom_Surface) S1 = BRep_Tool::Surface(F1); Handle (Geom_Surface) S1 = BRep_Tool::Surface(F1);
@ -2291,9 +2289,9 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face& F,
while (!YaSol && itry < 2) { while (!YaSol && itry < 2) {
for ( Standard_Integer i = 1; i <= NbPC1 ; i++) { for ( Standard_Integer i = 1; i <= NbPC1 ; i++) {
TopoDS_Shape aLocalEdge = E1.Reversed(); TopoDS_Shape aLocalEdgeReversedE1 = E1.Reversed();
if (i == 1) C1 = BRep_Tool::CurveOnSurface(E1,F,fl1[0],fl1[1]); if (i == 1) C1 = BRep_Tool::CurveOnSurface(E1,F,fl1[0],fl1[1]);
else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalEdge), else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalEdgeReversedE1),
F,fl1[0],fl1[1]); F,fl1[0],fl1[1]);
// if (i == 1) C1 = BRep_Tool::CurveOnSurface(E1,F,fl1[0],fl1[1]); // if (i == 1) C1 = BRep_Tool::CurveOnSurface(E1,F,fl1[0],fl1[1]);
// else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(E1.Reversed()), // else C1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(E1.Reversed()),
@ -2437,10 +2435,10 @@ void BRepOffset_Tool::Inter2d (const TopoDS_Face& F,
gp_Pnt P = S->Value(P2d.X(),P2d.Y()); gp_Pnt P = S->Value(P2d.X(),P2d.Y());
TopoDS_Vertex V = BRepLib_MakeVertex(P); TopoDS_Vertex V = BRepLib_MakeVertex(P);
V.Orientation(TopAbs_INTERNAL); V.Orientation(TopAbs_INTERNAL);
TopoDS_Shape aLocalEdge = E1.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalEdgeOrientedE1 = E1.Oriented(TopAbs_FORWARD);
B.UpdateVertex(V,U1,TopoDS::Edge(aLocalEdge),TolConf); B.UpdateVertex(V,U1,TopoDS::Edge(aLocalEdgeOrientedE1),TolConf);
aLocalEdge = E2.Oriented(TopAbs_FORWARD); aLocalEdgeOrientedE1 = E2.Oriented(TopAbs_FORWARD);
B.UpdateVertex(V,U2,TopoDS::Edge(aLocalEdge),TolConf); B.UpdateVertex(V,U2,TopoDS::Edge(aLocalEdgeOrientedE1),TolConf);
// B.UpdateVertex(V,U1,TopoDS::Edge(E1.Oriented(TopAbs_FORWARD)),TolConf); // B.UpdateVertex(V,U1,TopoDS::Edge(E1.Oriented(TopAbs_FORWARD)),TolConf);
// B.UpdateVertex(V,U2,TopoDS::Edge(E2.Oriented(TopAbs_FORWARD)),TolConf); // B.UpdateVertex(V,U2,TopoDS::Edge(E2.Oriented(TopAbs_FORWARD)),TolConf);
LV.Append(V); LV.Append(V);
@ -3502,9 +3500,9 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F,
BRep_Tool::Range(Ecs,f,l); BRep_Tool::Range(Ecs,f,l);
} }
if (BRep_Tool::IsClosed(CE,Fforward)) { if (BRep_Tool::IsClosed(CE,Fforward)) {
TopoDS_Shape aLocalShape = CE.Reversed(); TopoDS_Shape aLocalShapeReversedCE = CE.Reversed();
Handle(Geom2d_Curve) C2R = Handle(Geom2d_Curve) C2R =
BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShape),Fforward,f,l); BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShapeReversedCE),Fforward,f,l);
// Handle(Geom2d_Curve) C2R = // Handle(Geom2d_Curve) C2R =
// BRep_Tool::CurveOnSurface(TopoDS::Edge(CE.Reversed()),F,f,l); // BRep_Tool::CurveOnSurface(TopoDS::Edge(CE.Reversed()),F,f,l);
B.UpdateEdge (CE,C2,C2R,EF,BRep_Tool::Tolerance(CE)); B.UpdateEdge (CE,C2,C2R,EF,BRep_Tool::Tolerance(CE));
@ -3763,15 +3761,14 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F,
NV1 = TopoDS::Vertex(ConstShapes(V1)); NV1 = TopoDS::Vertex(ConstShapes(V1));
NV2 = TopoDS::Vertex(ConstShapes(V2)); NV2 = TopoDS::Vertex(ConstShapes(V2));
TopoDS_Shape aLocalVertex = NV1.Oriented(TopAbs_INTERNAL); TopoDS_Shape aLocalVertexOrientedNV1 = NV1.Oriented(TopAbs_INTERNAL);
TopoDS_Shape aLocalEdge = NE.Oriented(TopAbs_INTERNAL); TopoDS_Shape aLocalEdge = NE.Oriented(TopAbs_INTERNAL);
U1 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalVertex), U1 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalVertexOrientedNV1),
TopoDS::Edge (aLocalEdge)); TopoDS::Edge (aLocalEdge));
aLocalVertex = NV2.Oriented(TopAbs_INTERNAL); aLocalVertexOrientedNV1 = NV2.Oriented(TopAbs_INTERNAL);
aLocalEdge = NE.Oriented(TopAbs_FORWARD); aLocalEdge = NE.Oriented(TopAbs_FORWARD);
U2 = BRep_Tool::Parameter U2 = BRep_Tool::Parameter (TopoDS::Vertex(aLocalVertexOrientedNV1),TopoDS::Edge (aLocalEdge));
(TopoDS::Vertex(aLocalVertex),TopoDS::Edge (aLocalEdge));
// U1 = BRep_Tool::Parameter // U1 = BRep_Tool::Parameter
// (TopoDS::Vertex(NV1.Oriented(TopAbs_INTERNAL)), // (TopoDS::Vertex(NV1.Oriented(TopAbs_INTERNAL)),
// TopoDS::Edge (NE .Oriented(TopAbs_FORWARD))); // TopoDS::Edge (NE .Oriented(TopAbs_FORWARD)));

View File

@ -718,10 +718,10 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
if (Abs(fpar-Seq2(j)) <= Precision::Confusion()) if (Abs(fpar-Seq2(j)) <= Precision::Confusion())
break; break;
NewE.Orientation( TopAbs_FORWARD ); NewE.Orientation( TopAbs_FORWARD );
TopoDS_Shape aLocalShape = SeqVer(j).Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeCur = SeqVer(j).Oriented(TopAbs_FORWARD);
BB.Add( NewE, TopoDS::Vertex( aLocalShape ) ); BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur) );
aLocalShape = SeqVer(j+1).Oriented(TopAbs_REVERSED); aLocalShapeCur = SeqVer(j+1).Oriented(TopAbs_REVERSED);
BB.Add( NewE, TopoDS::Vertex( aLocalShape ) ); BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur ) );
//BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) ); //BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) );
//BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) ); //BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) );
NewEdges.Append( NewE ); NewEdges.Append( NewE );

View File

@ -804,7 +804,6 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
if (vClosed) { if (vClosed) {
TopoDS_Solid solid; TopoDS_Solid solid;
BRep_Builder B;
B.MakeSolid(solid); B.MakeSolid(solid);
B.Add(solid, shell); B.Add(solid, shell);
@ -889,8 +888,8 @@ static Handle(Geom_BSplineCurve) EdgeToBSpline (const TopoDS_Edge& theEdge)
// special treatment of conic curve // special treatment of conic curve
if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic))) if (aTrimCurve->BasisCurve()->IsKind(STANDARD_TYPE(Geom_Conic)))
{ {
const Handle(Geom_Curve)& aCurve = aTrimCurve; // to avoid ambiguity const Handle(Geom_Curve)& aCurveTrimmed = aTrimCurve; // to avoid ambiguity
GeomConvert_ApproxCurve anAppr (aCurve, Precision::Confusion(), GeomAbs_C1, 16, 14); GeomConvert_ApproxCurve anAppr (aCurveTrimmed, Precision::Confusion(), GeomAbs_C1, 16, 14);
if (anAppr.HasResult()) if (anAppr.HasResult())
aBSCurve = anAppr.Curve(); aBSCurve = anAppr.Curve();
} }
@ -937,7 +936,6 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
Handle(Geom_BSplineSurface) surface; Handle(Geom_BSplineSurface) surface;
Handle(Geom_BSplineCurve) BS, BS1; Handle(Geom_BSplineCurve) BS, BS1;
Handle(Geom_TrimmedCurve) curvTrim; Handle(Geom_TrimmedCurve) curvTrim;
Handle(Geom_BSplineCurve) curvBS;
if (w1Point) { if (w1Point) {
jdeb++; jdeb++;

View File

@ -344,15 +344,15 @@ TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS,
if (aGenSType==TopAbs_FACE){ if (aGenSType==TopAbs_FACE){
newShell.Closed (BRep_Tool::IsClosed (newShell)); newShell.Closed (BRep_Tool::IsClosed (newShell));
TopoDS_Shape temp = SplitShell(newShell); TopoDS_Shape temp = SplitShell(newShell);
TopAbs_Orientation Or = DirectSolid(aGenS,aDirS); TopAbs_Orientation ShellOri = DirectSolid(aGenS,aDirS);
Lt.Init(temp); Lt.Init(temp);
if(Lt.More()) Lt.Next(); if(Lt.More()) Lt.Next();
if(Lt.More()){ if(Lt.More()){
for (Lt.Init(temp);Lt.More();Lt.Next()){ for (Lt.Init(temp);Lt.More();Lt.Next()){
myBuilder.Add(myShapes(iGenS,iDirS),Lt.Value(),Or); myBuilder.Add(myShapes(iGenS,iDirS),Lt.Value(), ShellOri);
} }
} }
else myBuilder.Add(myShapes(iGenS,iDirS),newShell,Or); else myBuilder.Add(myShapes(iGenS,iDirS),newShell, ShellOri);
} }
} }
else if (myDirShapeTool.Type(aDirS)==TopAbs_WIRE){ else if (myDirShapeTool.Type(aDirS)==TopAbs_WIRE){

View File

@ -518,9 +518,9 @@ void BRepSweep_Rotation::SetGeneratingPCurve
L.SetDirection(gp::DY2d()); L.SetDirection(gp::DY2d());
} }
else{ else{
Standard_Real u = 0; Standard_Real anAngleTemp = 0;
if (aDirV.Index() == 2) u = myAng; if (aDirV.Index() == 2) anAngleTemp = myAng;
L.SetLocation(gp_Pnt2d(u,0)); L.SetLocation(gp_Pnt2d(anAngleTemp,0));
L.SetDirection(gp::DY2d()); L.SetDirection(gp::DY2d());
} }
Handle(Geom2d_Line) GL = new Geom2d_Line(L); Handle(Geom2d_Line) GL = new Geom2d_Line(L);

View File

@ -786,7 +786,6 @@ static Standard_Integer SPLS(Draw_Interpretor& ,
} }
TopAbs_ShapeEnum wtyp = W.ShapeType(); TopAbs_ShapeEnum wtyp = W.ShapeType();
if (wtyp != TopAbs_WIRE && wtyp != TopAbs_EDGE && wtyp != TopAbs_COMPOUND && pick) { if (wtyp != TopAbs_WIRE && wtyp != TopAbs_EDGE && wtyp != TopAbs_COMPOUND && pick) {
Standard_Real u,v;
DBRep_DrawableShape::LastPick(W,u,v); DBRep_DrawableShape::LastPick(W,u,v);
wtyp = W.ShapeType(); wtyp = W.ShapeType();
} }

View File

@ -298,15 +298,13 @@ Handle(IGESData_IGESEntity) BRepToIGES_BRShell ::TransferFace(const TopoDS_Face&
// returns the TrimmedSurface // returns the TrimmedSurface
// -------------------------- // --------------------------
Standard_Boolean Flag = Standard_True;
Handle(IGESGeom_TrimmedSurface) TrimmedSurf = new IGESGeom_TrimmedSurface; Handle(IGESGeom_TrimmedSurface) TrimmedSurf = new IGESGeom_TrimmedSurface;
if (BRep_Tool::NaturalRestriction(start)) { if (BRep_Tool::NaturalRestriction(start)) {
//if face bounds and surface bounds are same, outer wire is unnecessary //if face bounds and surface bounds are same, outer wire is unnecessary
Standard_Boolean Flag = Standard_False; TrimmedSurf-> Init (ISurf, Standard_False, NULL, Tab);
TrimmedSurf-> Init (ISurf, Flag, NULL, Tab);
} }
else else
TrimmedSurf-> Init (ISurf, Flag, IOuter, Tab); TrimmedSurf-> Init (ISurf, Standard_True, IOuter, Tab);
res = TrimmedSurf; res = TrimmedSurf;
SetShapeResult ( start, res ); SetShapeResult ( start, res );

View File

@ -396,8 +396,6 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC);
TopLoc_Location Loc;
Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, Loc, f3d,l3d);
if(!newE.IsNull()) { if(!newE.IsNull()) {
C3d = BRep_Tool::Curve(newE, f3d, l3d); C3d = BRep_Tool::Curve(newE, f3d, l3d);
} }
@ -493,7 +491,7 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
} }
if (!itled.More()) { // on stocke l`edge et la curve2d if (!itled.More()) { // on stocke l`edge et la curve2d
Handle(Geom2d_Curve) C2dBis; Handle(Geom2d_Curve) C2dBis;
Standard_Real f3d,l3d,f2dBis,l2dBis; Standard_Real f2dBis,l2dBis;
C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d); C2d = new Geom2d_TrimmedCurve(C2d, f2d, l2d);
Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d); Geom2dAdaptor_Curve G2dAC(C2d, f2d, l2d);
Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC); Handle(Geom2dAdaptor_HCurve) G2dAHC = new Geom2dAdaptor_HCurve(G2dAC);
@ -505,8 +503,6 @@ Standard_Boolean BRepTools_NurbsConvertModification::NewCurve2d
Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis); Geom2dAdaptor_Curve G2dACBis(C2dBis, f2dBis, l2dBis);
Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis); Handle(Geom2dAdaptor_HCurve) G2dAHCBis = new Geom2dAdaptor_HCurve(G2dACBis);
TopLoc_Location Loc;
Handle(Geom_Curve) C3d = BRep_Tool::Curve(E, f3d,l3d);
if(C3d.IsNull()) { if(C3d.IsNull()) {
if(isConvert2d) { if(isConvert2d) {
Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy()); Curve2d = Handle(Geom2d_Curve)::DownCast(C2d->Copy());

View File

@ -435,17 +435,17 @@ TopoDS_Shape BRepTools_Quilt::Shells() const
// Add the faces of oldShell in SH. // Add the faces of oldShell in SH.
for (TopoDS_Iterator its(oldShell); its.More(); its.Next()) { for (TopoDS_Iterator its(oldShell); its.More(); its.Next()) {
const TopoDS_Face Fo = TopoDS::Face(its.Value()); const TopoDS_Face Fo = TopoDS::Face(its.Value());
TopAbs_Orientation NewO; TopAbs_Orientation NewOFo;
// update the orientation of Fo in SH. // update the orientation of Fo in SH.
if (Rev) if (Rev)
NewO = TopAbs::Reverse(MF(Fo).Orientation()); NewOFo = TopAbs::Reverse(MF(Fo).Orientation());
else else
NewO = MF(Fo).Orientation(); NewOFo = MF(Fo).Orientation();
MF.Bind(Fo,SH.Oriented(NewO)); MF.Bind(Fo,SH.Oriented(NewOFo));
// B.Add (SH.Oriented(TopAbs_FORWARD),Fo.Oriented(NewO)); // B.Add (SH.Oriented(TopAbs_FORWARD),Fo.Oriented(NewO));
TopoDS_Shape arefShape = SH.Oriented(TopAbs_FORWARD) ; TopoDS_Shape arefShapeFo = SH.Oriented(TopAbs_FORWARD) ;
B.Add ( arefShape ,Fo.Oriented(NewO)); B.Add ( arefShapeFo,Fo.Oriented(NewOFo));
} }
// Rebind the free edges of the old shell to the new shell // Rebind the free edges of the old shell to the new shell
//gka BUG 6491 //gka BUG 6491

View File

@ -731,8 +731,8 @@ static void CutEdge (const TopoDS_Edge& E,
const TopTools_ListOfShape& VOnE, const TopTools_ListOfShape& VOnE,
TopTools_ListOfShape& NE ) TopTools_ListOfShape& NE )
{ {
TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD); TopoDS_Shape aLocalShapeOrientedE = E.Oriented(TopAbs_FORWARD);
TopoDS_Edge WE = TopoDS::Edge(aLocalShape); TopoDS_Edge WE = TopoDS::Edge(aLocalShapeOrientedE);
// TopoDS_Edge WE = TopoDS::Edge(E.Oriented(TopAbs_FORWARD)); // TopoDS_Edge WE = TopoDS::Edge(E.Oriented(TopAbs_FORWARD));
Standard_Real U1,U2; Standard_Real U1,U2;
@ -1656,10 +1656,10 @@ void BiTgte_Blend::ComputeCenters()
if (Anc.Extent() == 2) { if (Anc.Extent() == 2) {
const BRepOffset_ListOfInterval& L = myAnalyse.Type(E); const BRepOffset_ListOfInterval& L = myAnalyse.Type(E);
if (!L.IsEmpty() && L.First().Type() == OT) { if (!L.IsEmpty() && L.First().Type() == OT) {
TopoDS_Shape aLocalShape = myMapSF(Anc.First()).Generated(E); TopoDS_Shape aLocalShapeGen = myMapSF(Anc.First()).Generated(E);
TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape); TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShapeGen);
aLocalShape = myMapSF(Anc.Last()) .Generated(E); aLocalShapeGen = myMapSF(Anc.Last()) .Generated(E);
TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShape); TopoDS_Edge EOn2 = TopoDS::Edge(aLocalShapeGen);
// TopoDS_Edge EOn1 = TopoDS::Edge(myMapSF(Anc.First()).Generated(E)); // TopoDS_Edge EOn1 = TopoDS::Edge(myMapSF(Anc.First()).Generated(E));
// TopoDS_Edge EOn2 = TopoDS::Edge(myMapSF(Anc.Last()) .Generated(E)); // TopoDS_Edge EOn2 = TopoDS::Edge(myMapSF(Anc.Last()) .Generated(E));
// find if exits tangent edges in the original shape // find if exits tangent edges in the original shape
@ -2128,15 +2128,15 @@ void BiTgte_Blend::ComputeSurfaces()
// are not actually tangent ( Cf: Approximation of lines // are not actually tangent ( Cf: Approximation of lines
// of intersection that add noise.) // of intersection that add noise.)
// ---------------------------------------------------------- // ----------------------------------------------------------
TopoDS_Vertex V1,V2; TopoDS_Vertex aVertex1, aVertex2;
if ( E1f.IsNull() && !VfOnE1.IsNull() && !VfOnE2.IsNull()) { if ( E1f.IsNull() && !VfOnE1.IsNull() && !VfOnE2.IsNull()) {
TopTools_MapIteratorOfMapOfShape it(MapOnV1f); TopTools_MapIteratorOfMapOfShape it(MapOnV1f);
for ( ; it.More(); it.Next()) { for ( ; it.More(); it.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(it.Key()); const TopoDS_Edge& E = TopoDS::Edge(it.Key());
if ( !E.IsNull()) { if ( !E.IsNull()) {
TopExp::Vertices(E,V1,V2); TopExp::Vertices(E, aVertex1, aVertex2);
if ((V1.IsSame(VfOnE1) && V2.IsSame(VfOnE2)) || if ((aVertex1.IsSame(VfOnE1) && aVertex2.IsSame(VfOnE2)) ||
(V2.IsSame(VfOnE1) && V1.IsSame(VfOnE2)) ) { (aVertex2.IsSame(VfOnE1) && aVertex1.IsSame(VfOnE2)) ) {
E1f = E; E1f = E;
break; break;
} }
@ -2148,9 +2148,9 @@ void BiTgte_Blend::ComputeSurfaces()
for ( ; it.More(); it.Next()) { for ( ; it.More(); it.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(it.Key()); const TopoDS_Edge& E = TopoDS::Edge(it.Key());
if ( !E.IsNull()) { if ( !E.IsNull()) {
TopExp::Vertices(E,V1,V2); TopExp::Vertices(E, aVertex1, aVertex2);
if ((V1.IsSame(VlOnE1) && V2.IsSame(VlOnE2)) || if ((aVertex1.IsSame(VlOnE1) && aVertex2.IsSame(VlOnE2)) ||
(V2.IsSame(VlOnE1) && V1.IsSame(VlOnE2)) ) { (aVertex2.IsSame(VlOnE1) && aVertex1.IsSame(VlOnE2)) ) {
E1l = E; E1l = E;
break; break;
} }
@ -2252,14 +2252,14 @@ void BiTgte_Blend::ComputeSurfaces()
TopTools_IndexedDataMapOfShapeListOfShape Map; TopTools_IndexedDataMapOfShapeListOfShape Map;
TopExp::MapShapesAndAncestors(Co,TopAbs_VERTEX,TopAbs_EDGE,Map); TopExp::MapShapesAndAncestors(Co,TopAbs_VERTEX,TopAbs_EDGE,Map);
for ( Standard_Integer i = 1; i <= Map.Extent(); i++) { for ( Standard_Integer j = 1; j <= Map.Extent(); j++) {
const TopoDS_Vertex& V = TopoDS::Vertex(Map.FindKey(i)); const TopoDS_Vertex& V = TopoDS::Vertex(Map.FindKey(j));
if ( Map(i).Extent() != 3) continue; if ( Map(j).Extent() != 3) continue;
TopTools_ListOfShape LOE; TopTools_ListOfShape LOE;
TopTools_ListIteratorOfListOfShape it; TopTools_ListIteratorOfListOfShape it;
for (it.Initialize(Map(i)) ; it.More(); it.Next()) { for (it.Initialize(Map(j)) ; it.More(); it.Next()) {
Standard_Boolean Reverse = Standard_True; Standard_Boolean Reverse = Standard_True;
if ( Reverse) if ( Reverse)
LOE.Append(myMapSF(it.Value()).Generated(V).Reversed()); LOE.Append(myMapSF(it.Value()).Generated(V).Reversed());
@ -2466,9 +2466,9 @@ void BiTgte_Blend::ComputeShape()
TopoDS_Edge OE; TopoDS_Edge OE;
if ( MapSS.IsBound(E)) { // this is an edge of cutting if ( MapSS.IsBound(E)) { // this is an edge of cutting
OE = TopoDS::Edge(MapSS(E)); OE = TopoDS::Edge(MapSS(E));
TopoDS_Shape aLocalShape = E.Reversed(); TopoDS_Shape aLocalShapeReversedE = E.Reversed();
Handle(Geom2d_Curve) C2d_1 = Handle(Geom2d_Curve) C2d_1 =
BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShape),Face,f,l); BRep_Tool::CurveOnSurface(TopoDS::Edge(aLocalShapeReversedE),Face,f,l);
// Handle(Geom2d_Curve) C2d_1 = // Handle(Geom2d_Curve) C2d_1 =
// BRep_Tool::CurveOnSurface(TopoDS::Edge(E.Reversed()), // BRep_Tool::CurveOnSurface(TopoDS::Edge(E.Reversed()),
// Face,f,l); // Face,f,l);

View File

@ -256,14 +256,14 @@ Standard_Boolean BinMNaming_NamingDriver::Paste
} }
if(BinMNaming::DocumentVersion() > 4 && BinMNaming::DocumentVersion() < 7) { if(BinMNaming::DocumentVersion() > 4 && BinMNaming::DocumentVersion() < 7) {
// Orientation processing - converting from old format // Orientation processing - converting from old format
Handle(TNaming_NamedShape) aNS; Handle(TNaming_NamedShape) aNShape;
if(anAtt->Label().FindAttribute(TNaming_NamedShape::GetID(), aNS)) { if(anAtt->Label().FindAttribute(TNaming_NamedShape::GetID(), aNShape)) {
//const TDF_Label& aLab = aNS->Label(); //const TDF_Label& aLab = aNS->Label();
TNaming_Iterator itL (aNS); TNaming_Iterator itL (aNShape);
for (; itL.More(); itL.Next()) { for (; itL.More(); itL.Next()) {
const TopoDS_Shape& S = itL.NewShape(); const TopoDS_Shape& S = itL.NewShape();
if (S.IsNull()) continue; if (S.IsNull()) continue;
if(aNS->Evolution() == TNaming_SELECTED) { if(aNShape->Evolution() == TNaming_SELECTED) {
if (itL.More() && itL.NewShape().ShapeType() != TopAbs_VERTEX && if (itL.More() && itL.NewShape().ShapeType() != TopAbs_VERTEX &&
!itL.OldShape().IsNull() && itL.OldShape().ShapeType() == TopAbs_VERTEX ) {//OR-N !itL.OldShape().IsNull() && itL.OldShape().ShapeType() == TopAbs_VERTEX ) {//OR-N
TopAbs_Orientation OrientationToApply = itL.OldShape().Orientation(); TopAbs_Orientation OrientationToApply = itL.OldShape().Orientation();

View File

@ -754,7 +754,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
else { else {
gp_Lin2d l(apoint,gp_Dir2d(Direc2.XY()-Direc1.XY())); gp_Lin2d l(apoint,gp_Dir2d(Direc2.XY()-Direc1.XY()));
Handle(GccInt_Bisec) solution = new GccInt_BLine(l); Handle(GccInt_Bisec) solution = new GccInt_BLine(l);
Standard_Boolean ok; Standard_Boolean isOk;
sense = Standard_False; sense = Standard_False;
// Modified by skv - Tue Feb 15 17:51:29 2005 Integration Begin // Modified by skv - Tue Feb 15 17:51:29 2005 Integration Begin
// distanceptsol = Distance(apoint,solution, // distanceptsol = Distance(apoint,solution,
@ -763,13 +763,13 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
if (oncurve) if (oncurve)
distanceptsol = Distance(apoint,solution, distanceptsol = Distance(apoint,solution,
tan2,tan1,LineBisVec, tan2,tan1,LineBisVec,
adirection,parameter,sense,ok); adirection,parameter,sense, isOk);
else else
distanceptsol = Distance(apoint,solution, distanceptsol = Distance(apoint,solution,
afirstvector,asecondvector,LineBisVec, afirstvector,asecondvector,LineBisVec,
adirection,parameter,sense,ok, Standard_True); adirection,parameter,sense, isOk, Standard_True);
// Modified by skv - Tue Feb 15 17:51:29 2005 Integration End // Modified by skv - Tue Feb 15 17:51:29 2005 Integration End
if (ok || !oncurve) { if (isOk || !oncurve) {
thesense = sense; thesense = sense;
distancemini = distanceptsol; distancemini = distanceptsol;
} }
@ -827,27 +827,27 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
Standard_Integer cas = 0; Standard_Integer cas = 0;
Handle(Standard_Type) type = afirstcurve->DynamicType(); Handle(Standard_Type) aFirstCurveType = afirstcurve->DynamicType();
if (type == STANDARD_TYPE(Geom2d_TrimmedCurve)) { if (aFirstCurveType == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
curve = Handle(Geom2d_TrimmedCurve)::DownCast (afirstcurve)->BasisCurve(); curve = Handle(Geom2d_TrimmedCurve)::DownCast (afirstcurve)->BasisCurve();
} }
else { else {
curve = afirstcurve; curve = afirstcurve;
} }
type = curve->DynamicType(); aFirstCurveType = curve->DynamicType();
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
gp_Pnt2d Point(asecondpoint->Pnt2d()); gp_Pnt2d Point(asecondpoint->Pnt2d());
#else #else
asecondpoint->Pnt2d(); asecondpoint->Pnt2d();
#endif #endif
if (type == STANDARD_TYPE(Geom2d_Circle)) { if (aFirstCurveType == STANDARD_TYPE(Geom2d_Circle)) {
cas = 1; cas = 1;
Handle(Geom2d_Circle) C1 = Handle(Geom2d_Circle)::DownCast(curve); Handle(Geom2d_Circle) C1 = Handle(Geom2d_Circle)::DownCast(curve);
circle = C1->Circ2d(); circle = C1->Circ2d();
} }
else if (type == STANDARD_TYPE(Geom2d_Line)) { else if (aFirstCurveType == STANDARD_TYPE(Geom2d_Line)) {
cas = 2; cas = 2;
Handle(Geom2d_Line) L1 = Handle(Geom2d_Line)::DownCast(curve); Handle(Geom2d_Line) L1 = Handle(Geom2d_Line)::DownCast(curve);
line = L1->Lin2d(); line = L1->Lin2d();
@ -882,9 +882,9 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
} }
} }
if (!TheSol.IsNull()) { if (!TheSol.IsNull()) {
GccInt_IType type = TheSol->ArcType(); GccInt_IType aSolType = TheSol->ArcType();
Handle(Geom2d_Curve) bisectorcurve; Handle(Geom2d_Curve) bisectorcurve;
if (type == GccInt_Lin) { if (aSolType == GccInt_Lin) {
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// If the bisectrice is a line // If the bisectrice is a line
@ -921,7 +921,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
secondparameter); secondparameter);
} }
else if (type == GccInt_Cir) { else if (aSolType == GccInt_Cir) {
bisectorcurve = new Geom2d_Circle(TheSol->Circle()); bisectorcurve = new Geom2d_Circle(TheSol->Circle());
if (!thesense) if (!thesense)
thebisector = new Geom2d_TrimmedCurve(bisectorcurve, thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
@ -934,7 +934,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
firstparameter+2.0*M_PI, firstparameter+2.0*M_PI,
thesense); thesense);
} }
else if (type == GccInt_Hpr) { else if (aSolType == GccInt_Hpr) {
bisectorcurve=new Geom2d_Hyperbola(TheSol->Hyperbola()); bisectorcurve=new Geom2d_Hyperbola(TheSol->Hyperbola());
if (!thesense) if (!thesense)
thebisector = new Geom2d_TrimmedCurve(bisectorcurve, thebisector = new Geom2d_TrimmedCurve(bisectorcurve,
@ -945,7 +945,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
firstparameter, firstparameter,
Precision::Infinite()); Precision::Infinite());
} }
else if (type == GccInt_Ell) { else if (aSolType == GccInt_Ell) {
bisectorcurve = new Geom2d_Ellipse(TheSol->Ellipse()); bisectorcurve = new Geom2d_Ellipse(TheSol->Ellipse());
if (!thesense) if (!thesense)
thebisector = new Geom2d_TrimmedCurve(bisectorcurve, thebisector = new Geom2d_TrimmedCurve(bisectorcurve,

View File

@ -823,8 +823,8 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U,
if (SolRoot.IsDone()) { if (SolRoot.IsDone()) {
for (Standard_Integer j = 1; j <= SolRoot.NbSolutions(); j++) { for (Standard_Integer j = 1; j <= SolRoot.NbSolutions(); j++) {
USol = SolRoot.Value(j); USol = SolRoot.Value(j);
gp_Pnt2d P2 = curve2->Value(USol); gp_Pnt2d P2Curve2 = curve2->Value(USol);
gp_Vec2d P2P1(P1.X() - P2.X(),P1.Y() - P2.Y()); gp_Vec2d P2P1(P1.X() - P2Curve2.X(),P1.Y() - P2Curve2.Y());
Standard_Real SquareP2P1 = P2P1.SquareMagnitude(); Standard_Real SquareP2P1 = P2P1.SquareMagnitude();
Standard_Real N1P2P1 = N1.Dot(P2P1); Standard_Real N1P2P1 = N1.Dot(P2P1);

View File

@ -88,7 +88,6 @@ void Blend_Walking::Perform(Blend_Function& Func,
} }
Blend_Status State; Blend_Status State;
TheExtremity ptf1,ptf2;
param = Pdep; param = Pdep;
Func.Set(param); Func.Set(param);

View File

@ -311,19 +311,19 @@ Standard_Boolean Blend_Walking::Recadre(Blend_FuncInv& FuncInv,
FuncInv.Set(OnFirst,thecur); FuncInv.Set(OnFirst,thecur);
FuncInv.GetBounds(infb,supb); FuncInv.GetBounds(infb,supb);
FuncInv.GetTolerance(toler,tolesp/10);//Il vaut mieux garder un peu de marge FuncInv.GetTolerance(toler,tolesp/10);//Il vaut mieux garder un peu de marge
math_FunctionSetRoot rsnld(FuncInv,toler,35); math_FunctionSetRoot aRsnld(FuncInv,toler,35);
toler *= 10; // Mais on fait les tests correctements toler *= 10; // Mais on fait les tests correctements
// Resolution... // Resolution...
rsnld.Perform(FuncInv,solrst,infb,supb); aRsnld.Perform(FuncInv,solrst,infb,supb);
if (!rsnld.IsDone()) { if (!aRsnld.IsDone()) {
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
cout << "Walking::Recadre : RSNLD not done " << endl; cout << "Walking::Recadre : RSNLD not done " << endl;
#endif #endif
recadre = Standard_False; recadre = Standard_False;
} }
else { else {
rsnld.Root(solrst); aRsnld.Root(solrst);
recadre = FuncInv.IsSolution(solrst,tolesp); recadre = FuncInv.IsSolution(solrst,tolesp);
} }
} }

View File

@ -220,11 +220,10 @@ TCollection_ExtendedString CDF_FWOSDriver::SetName(const Handle(CDM_Document)& a
#ifdef WNT #ifdef WNT
//windows is not case sensitive //windows is not case sensitive
Standard_ExtCharacter echar;
//make the extension lower case //make the extension lower case
for(int i = 1; i <= xn.Length(); i++) for(int i = 1; i <= xn.Length(); i++)
{ {
echar = xn.Value(i); Standard_ExtCharacter echar = xn.Value(i);
echar = towlower(echar); echar = towlower(echar);
xn.SetValue(i, echar); xn.SetValue(i, echar);
} }
@ -235,11 +234,10 @@ TCollection_ExtendedString CDF_FWOSDriver::SetName(const Handle(CDM_Document)& a
if (e.Length() > 0) { if (e.Length() > 0) {
#ifdef WNT #ifdef WNT
//windows is not case sensitive //windows is not case sensitive
Standard_ExtCharacter echar;
//make the extension lower case //make the extension lower case
for(int i = 1; i <= xe.Length(); i++) for(int i = 1; i <= xe.Length(); i++)
{ {
echar = xe.Value(i); Standard_ExtCharacter echar = xe.Value(i);
echar = towlower(echar); echar = towlower(echar);
xe.SetValue(i, echar); xe.SetValue(i, echar);
} }

View File

@ -321,13 +321,13 @@ void CSLib::Normal(const Standard_Integer MaxOrder,
while(n<=FindRoots.NbSolutions()) while(n<=FindRoots.NbSolutions())
{ {
Standard_Real ASOL=FindRoots.Value(n); Standard_Real ASOL=FindRoots.Value(n);
Standard_Integer i=n-1; Standard_Integer j=n-1;
while((i>=1) && (Sol0(i)> ASOL)) while((j>=1) && (Sol0(j)> ASOL))
{ {
Sol0(i+1)=Sol0(i); Sol0(j+1)=Sol0(j);
i--; j--;
} }
Sol0(i+1)=ASOL; Sol0(j+1)=ASOL;
n++; n++;
}//end while(n }//end while(n
//Add limits of the domains //Add limits of the domains

View File

@ -198,7 +198,7 @@ void CSLib_Offset::D3(const gp_Pnt2d& theBasePoint,
(theOffset * (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r)))); (theOffset * (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r))));
D3Ndir.Multiply (theOffset/R); D3Ndir.Multiply (theOffset/R);
// V2 = P" (U) : // V2 = P" (U) :
Standard_Real R4 = R2 * R2; R4 = R2 * R2;
D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2)); D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2));
D2Ndir.Subtract (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2))); D2Ndir.Subtract (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2)));
D2Ndir.Multiply (theOffset / R); D2Ndir.Multiply (theOffset / R);
@ -339,7 +339,7 @@ void CSLib_Offset::D2(const gp_Pnt& theBasePoint,
//We try another computation but the stability is not very good //We try another computation but the stability is not very good
//dixit ISG. //dixit ISG.
// V2 = P" (U) : // V2 = P" (U) :
Standard_Real R4 = R2 * R2; R4 = R2 * R2;
D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2)); D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2));
D2Ndir.Add (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2))); D2Ndir.Add (Ndir.Multiplied (((3.0 * Dr * Dr)/R4) - (D2r/R2)));
D2Ndir.Multiply (theOffsetValue / R); D2Ndir.Multiply (theOffsetValue / R);
@ -423,7 +423,7 @@ void CSLib_Offset::D3(const gp_Pnt& theBasePoint,
D3Ndir.Add (Ndir.Multiplied (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r)); D3Ndir.Add (Ndir.Multiplied (6.0*Dr*Dr/R4 + 6.0*Dr*D2r/R4 - 15.0*Dr*Dr*Dr/R6 - D3r));
D3Ndir.Multiply (theOffsetValue/R); D3Ndir.Multiply (theOffsetValue/R);
// V2 = P" (U) : // V2 = P" (U) :
Standard_Real R4 = R2 * R2; R4 = R2 * R2;
D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2)); D2Ndir.Subtract (DNdir.Multiplied (2.0 * Dr / R2));
D2Ndir.Subtract (Ndir.Multiplied ((3.0 * Dr * Dr / R4) - (D2r / R2))); D2Ndir.Subtract (Ndir.Multiplied ((3.0 * Dr * Dr / R4) - (D2r / R2)));
D2Ndir.Multiply (theOffsetValue / R); D2Ndir.Multiply (theOffsetValue / R);

View File

@ -758,12 +758,12 @@ Standard_Boolean ChFi2d_AnaFilletAlgo::ArcFilletSegment(const Standard_Real radi
// Make a line parallel to segment and // Make a line parallel to segment and
// passing near the "near" point. // passing near the "near" point.
gp_Vec2d d2(v2); gp_Vec2d aD2Vec(v2);
gp_Lin2d line(p22, -d2); gp_Lin2d line(p22, -aD2Vec);
d2.Rotate(M_PI_2); aD2Vec.Rotate(M_PI_2);
line.Translate(radius * d2); line.Translate(radius * aD2Vec);
if (line.Distance(nearPoint) > radius) if (line.Distance(nearPoint) > radius)
line.Translate(-2.0 * radius * d2); line.Translate(-2.0 * radius * aD2Vec);
// Make a circle of radius of the arc +/- fillet radius. // Make a circle of radius of the arc +/- fillet radius.
gp_Ax2d axes(pc1, gp::DX2d()); gp_Ax2d axes(pc1, gp::DX2d());

View File

@ -1041,8 +1041,7 @@ TopoDS_Edge ChFi2d_Builder::BuildFilletEdge(const TopoDS_Vertex& V,
if (OE1 == TopAbs_REVERSED) { if (OE1 == TopAbs_REVERSED) {
vec1.Reverse(); vec1.Reverse();
} // if (OE1 ... } // if (OE1 ...
Standard_Real cross = vec1*vec; Standard_Boolean Sense = ( vec1*vec ) > 0.;
Standard_Boolean Sense = cross > 0.;
if (U1 > Vv1 && U1 > 2.*M_PI) { if (U1 > Vv1 && U1 > 2.*M_PI) {
ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1); ElCLib::AdjustPeriodic(0.,2.*M_PI,Precision::Confusion(),U1,Vv1);
} // if (U1 ... } // if (U1 ...

View File

@ -266,14 +266,14 @@ void ChFi2d_FilletAlgo::FillPoint(FilletPoint* thePoint, const Standard_Real the
aValid2 = !IsRadiusIntersected(myCurve1, myStart1, myEnd1, aCenter, aProj.Point(a), Standard_False); aValid2 = !IsRadiusIntersected(myCurve1, myStart1, myEnd1, aCenter, aProj.Point(a), Standard_False);
// checking the right parameter // checking the right parameter
Standard_Real aParam = aProj.Parameter(a); Standard_Real aParamProj = aProj.Parameter(a);
while(myCurve2->IsPeriodic() && aParam < myStart2) while(myCurve2->IsPeriodic() && aParamProj < myStart2)
aParam += myCurve2->Period(); aParamProj += myCurve2->Period();
const Standard_Real d = aProj.Distance(a); const Standard_Real d = aProj.Distance(a);
thePoint->appendValue(d * d - myRadius * myRadius, (aParam >= myStart2 && aParam <= myEnd2 && aValid2)); thePoint->appendValue(d * d - myRadius * myRadius, (aParamProj >= myStart2 && aParamProj <= myEnd2 && aValid2));
if (Abs(d - myRadius) < Precision::Confusion()) if (Abs(d - myRadius) < Precision::Confusion())
thePoint->setParam2(aParam); thePoint->setParam2(aParamProj);
} }
} }

View File

@ -955,10 +955,10 @@ void ChFi3d_Builder::StartSol(const Handle(ChFiDS_Stripe)& Stripe,
Stripe->OrientationOnFace1(), Stripe->OrientationOnFace1(),
Stripe->OrientationOnFace2(), Stripe->OrientationOnFace2(),
RC); RC);
const Handle(Adaptor3d_HSurface)& HSon1 = HS1; // to avoid ambiguity const Handle(Adaptor3d_HSurface)& HSon1new = HS1; // to avoid ambiguity
const Handle(Adaptor3d_HSurface)& HSon2 = HS2; // to avoid ambiguity const Handle(Adaptor3d_HSurface)& HSon2new = HS2; // to avoid ambiguity
I1->Initialize(HSon1); I1->Initialize(HSon1new);
I2->Initialize(HSon2); I2->Initialize(HSon2new);
if(PerformFirstSection(Spine,HGuide,Choix,HS1,HS2, if(PerformFirstSection(Spine,HGuide,Choix,HS1,HS2,
I1,I2,w,SolDep,Pos1,Pos2)){ I1,I2,w,SolDep,Pos1,Pos2)){
P1.SetCoord(SolDep(1),SolDep(2)); P1.SetCoord(SolDep(1),SolDep(2));

View File

@ -496,7 +496,7 @@ Handle(Law_Composite) ChFiDS_FilSpine::ComputeLaw
Standard_Real spinefin = LastParameter(); Standard_Real spinefin = LastParameter();
Standard_Integer nbed = ifin - ideb + 1; Standard_Integer nbed = ifin - ideb + 1;
Standard_Integer biddeb = ideb, bidfin = ifin; Standard_Integer bidfin = ifin;
Handle(Law_Composite) loi = new Law_Composite(); Handle(Law_Composite) loi = new Law_Composite();
Law_Laws& list = loi->ChangeLaws(); Law_Laws& list = loi->ChangeLaws();
@ -510,11 +510,11 @@ Handle(Law_Composite) ChFiDS_FilSpine::ComputeLaw
if(IsPeriodic()){ if(IsPeriodic()){
if(deb < 0 && ideb > ifin) bidfin += len; if(deb < 0 && ideb > ifin) bidfin += len;
else if(fin > LastParameter(len) && ideb > ifin) bidfin += len; else if(fin > LastParameter(len) && ideb > ifin) bidfin += len;
nbed = bidfin - biddeb + 1; nbed = bidfin - ideb + 1;
} }
TColStd_Array1OfInteger ind(1,nbed); TColStd_Array1OfInteger ind(1,nbed);
Standard_Integer j = 1; Standard_Integer j = 1;
for(Standard_Integer i = biddeb; i <= bidfin; i++){ for(Standard_Integer i = ideb; i <= bidfin; i++){
ind(j++) = ((i - 1)%len) + 1; ind(j++) = ((i - 1)%len) + 1;
} }

View File

@ -1464,9 +1464,9 @@ void Contap_Contour::Perform
//IFV begin //IFV begin
if(solrst.NbSegments() <= 0) { if(solrst.NbSegments() <= 0) {
if(mySFunc.FunctionType() == Contap_ContourStd) { if(mySFunc.FunctionType() == Contap_ContourStd) {
const Handle(Adaptor3d_HSurface)& Surf = mySFunc.Surface(); const Handle(Adaptor3d_HSurface)& SurfToCheck = mySFunc.Surface();
if(Adaptor3d_HSurfaceTool::GetType(Surf) == GeomAbs_Torus) { if(Adaptor3d_HSurfaceTool::GetType(SurfToCheck) == GeomAbs_Torus) {
gp_Torus aTor = Adaptor3d_HSurfaceTool::Torus(Surf); gp_Torus aTor = Adaptor3d_HSurfaceTool::Torus(SurfToCheck);
gp_Dir aTorDir = aTor.Axis().Direction(); gp_Dir aTorDir = aTor.Axis().Direction();
gp_Dir aProjDir = mySFunc.Direction(); gp_Dir aProjDir = mySFunc.Direction();

View File

@ -372,7 +372,7 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
// Faces // Faces
Handle(Poly_Triangulation) Tr; Handle(Poly_Triangulation) Tr;
TopLoc_Location l; TopLoc_Location aTempLoc;
TopLoc_Location loc; TopLoc_Location loc;
DBRep_ListIteratorOfListOfFace itf(myFaces); DBRep_ListIteratorOfListOfFace itf(myFaces);
@ -382,23 +382,23 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
const Handle(DBRep_Face)& F = itf.Value(); const Handle(DBRep_Face)& F = itf.Value();
dis.SetColor(F->Color()); dis.SetColor(F->Color());
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F->Face(),l); Handle(Geom_Surface) aSurf = BRep_Tool::Surface(F->Face(), aTempLoc);
if (!S.IsNull()) { if (!aSurf.IsNull()) {
Standard_Boolean restriction = Standard_False; Standard_Boolean restriction = Standard_False;
if(S->IsUPeriodic() || S->IsVPeriodic()) { if(aSurf->IsUPeriodic() || aSurf->IsVPeriodic()) {
Standard_Real SU1 = 0., SU2 = 0., SV1 = 0., SV2 = 0.; Standard_Real SU1 = 0., SU2 = 0., SV1 = 0., SV2 = 0.;
Standard_Real FU1 = 0., FU2 = 0., FV1 = 0., FV2 = 0.; Standard_Real FU1 = 0., FU2 = 0., FV1 = 0., FV2 = 0.;
S->Bounds(SU1,SU2,SV1,SV2); aSurf->Bounds(SU1,SU2,SV1,SV2);
BRepTools::UVBounds (F->Face(),FU1,FU2,FV1,FV2); BRepTools::UVBounds (F->Face(),FU1,FU2,FV1,FV2);
if(S->IsUPeriodic()) { if(aSurf->IsUPeriodic()) {
if(FU1 < SU1 || FU1 > SU2) if(FU1 < SU1 || FU1 > SU2)
restriction = Standard_True; restriction = Standard_True;
if(!restriction && (FU2 < SU1 || FU2 > SU2)) if(!restriction && (FU2 < SU1 || FU2 > SU2))
restriction = Standard_True; restriction = Standard_True;
} }
if(!restriction && S->IsVPeriodic()) { if(!restriction && aSurf->IsVPeriodic()) {
if(FV1 < SV1 || FV1 > SV2) if(FV1 < SV1 || FV1 > SV2)
restriction = Standard_True; restriction = Standard_True;
if(!restriction && (FV2 < SV1 || FV2 > SV2)) if(!restriction && (FV2 < SV1 || FV2 > SV2))
@ -604,7 +604,7 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
// trace des eventuelles triangulations. // trace des eventuelles triangulations.
//===================================== //=====================================
if (S.IsNull() || mytriangulations) { if (aSurf.IsNull() || mytriangulations) {
Tr = BRep_Tool::Triangulation(F->Face(), loc); Tr = BRep_Tool::Triangulation(F->Face(), loc);
if (!Tr.IsNull()) { if (!Tr.IsNull()) {
Display(Tr, loc.Transformation(), dis); Display(Tr, loc.Transformation(), dis);
@ -627,12 +627,12 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
// display geometrical curve if exists. // display geometrical curve if exists.
Standard_Boolean isgeom = BRep_Tool::IsGeometric(E->Edge()); Standard_Boolean isgeom = BRep_Tool::IsGeometric(E->Edge());
Standard_Real U1,U2; Standard_Real aCheckU1, aCheckU2;
if (isgeom) { if (isgeom) {
// check the range (to report bad edges) // check the range (to report bad edges)
BRep_Tool::Range(E->Edge(),U1,U2); BRep_Tool::Range(E->Edge(), aCheckU1, aCheckU2);
if (U2 < U1) { if (aCheckU2 < aCheckU1) {
// bad orientation // bad orientation
cout << "DBRep_DrawableShape : Bad parameters on edge."<<endl; cout << "DBRep_DrawableShape : Bad parameters on edge."<<endl;
BRepTools::Dump(E->Edge(),cout); BRepTools::Dump(E->Edge(),cout);
@ -719,13 +719,13 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
if (myDispOr) { if (myDispOr) {
// display an arrow at the end // display an arrow at the end
gp_Pnt P; gp_Pnt aPnt;
gp_Vec V; gp_Vec V;
C.D1(l,P,V); C.D1(l, aPnt,V);
gp_Pnt2d p1,p2; gp_Pnt2d p1,p2;
dis.Project(P,p1); dis.Project(aPnt,p1);
P.Translate(V); aPnt.Translate(V);
dis.Project(P,p2); dis.Project(aPnt,p2);
gp_Vec2d v(p1,p2); gp_Vec2d v(p1,p2);
if (v.Magnitude() > gp::Resolution()) { if (v.Magnitude() > gp::Resolution()) {
Standard_Real L = 20 / dis.Zoom(); Standard_Real L = 20 / dis.Zoom();
@ -769,12 +769,12 @@ void DBRep_DrawableShape::DrawOn(Draw_Display& dis) const
else { else {
// Polygone sur triangulation: // Polygone sur triangulation:
Handle(Poly_Triangulation) Tr; Handle(Poly_Triangulation) PolyTr;
Handle(Poly_PolygonOnTriangulation) Poly; Handle(Poly_PolygonOnTriangulation) Poly;
BRep_Tool::PolygonOnTriangulation(E->Edge(), Poly, Tr, loc); BRep_Tool::PolygonOnTriangulation(E->Edge(), Poly, PolyTr, loc);
if (!Poly.IsNull()) { if (!Poly.IsNull()) {
const TColStd_Array1OfInteger& Indices = Poly->Nodes(); const TColStd_Array1OfInteger& Indices = Poly->Nodes();
const TColgp_Array1OfPnt& Nodes = Tr->Nodes(); const TColgp_Array1OfPnt& Nodes = PolyTr->Nodes();
for (i=Indices.Lower()+1; i<=Indices.Upper(); i++) { for (i=Indices.Lower()+1; i<=Indices.Upper(); i++) {
dis.Draw(Nodes(Indices(i-1)).Transformed(loc), dis.Draw(Nodes(Indices(i-1)).Transformed(loc),
Nodes(Indices(i)).Transformed(loc)); Nodes(Indices(i)).Transformed(loc));

View File

@ -749,7 +749,6 @@ void DNaming::LoadAndOrientModifiedShapes (BRepBuilderAPI_MakeShape& MS,
{ {
TopTools_MapOfShape View; TopTools_MapOfShape View;
TopExp_Explorer ShapeExplorer (ShapeIn, KindOfShape); TopExp_Explorer ShapeExplorer (ShapeIn, KindOfShape);
TopTools_ListOfShape Shapes;
for (; ShapeExplorer.More(); ShapeExplorer.Next ()) { for (; ShapeExplorer.More(); ShapeExplorer.Next ()) {
const TopoDS_Shape& Root = ShapeExplorer.Current (); const TopoDS_Shape& Root = ShapeExplorer.Current ();
if (!View.Add(Root)) continue; if (!View.Add(Root)) continue;

View File

@ -169,8 +169,8 @@ Standard_Integer DNaming_PrismDriver::Execute(TFunction_Logbook& theLog) const {
} }
const TopoDS_Shape& aResult = aMakePrism.Shape(); const TopoDS_Shape& aResult = aMakePrism.Shape();
BRepCheck_Analyzer aCheck(aResult); BRepCheck_Analyzer aCheckAnalyzer(aResult);
if (!aCheck.IsValid(aResult)) { if (!aCheckAnalyzer.IsValid(aResult)) {
aFunction->SetFailure(RESULT_NOT_VALID); aFunction->SetFailure(RESULT_NOT_VALID);
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
Standard_CString aFileName = "PrismResult.brep"; Standard_CString aFileName = "PrismResult.brep";

View File

@ -180,8 +180,8 @@ Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) co
return -1; return -1;
} }
const TopoDS_Shape aResult = aMakeRevol.Shape(); const TopoDS_Shape aResult = aMakeRevol.Shape();
BRepCheck_Analyzer aCheck(aResult); BRepCheck_Analyzer aCheckAnalyzer(aResult);
if (!aCheck.IsValid(aResult)) { if (!aCheckAnalyzer.IsValid(aResult)) {
aFunction->SetFailure(RESULT_NOT_VALID); aFunction->SetFailure(RESULT_NOT_VALID);
return -1; return -1;
} }
@ -223,8 +223,8 @@ Standard_Integer DNaming_RevolutionDriver::Execute(TFunction_Logbook& theLog) co
return -1; return -1;
} }
const TopoDS_Shape aResult = aMakeRevol.Shape(); const TopoDS_Shape aResult = aMakeRevol.Shape();
BRepCheck_Analyzer aCheck(aResult); BRepCheck_Analyzer aCheckAnalyzer(aResult);
if (!aCheck.IsValid(aResult)) { if (!aCheckAnalyzer.IsValid(aResult)) {
aFunction->SetFailure(RESULT_NOT_VALID); aFunction->SetFailure(RESULT_NOT_VALID);
return -1; return -1;
} }
@ -453,8 +453,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
if(StartShape.ShapeType() != TopAbs_FACE) { if(StartShape.ShapeType() != TopAbs_FACE) {
TopoDS_Iterator it(StartShape); TopoDS_Iterator it(StartShape);
for (; it.More(); it.Next()) { for (; it.More(); it.Next()) {
TNaming_Builder Builder(theResultLabel.NewChild()); TNaming_Builder aBuilder(theResultLabel.NewChild());
Builder.Generated(it.Value()); aBuilder.Generated(it.Value());
} }
} }
} else { } else {
@ -478,8 +478,8 @@ void DNaming_RevolutionDriver::LoadNamingDS (const TDF_Label& theResultLabel,
if(EndShape.ShapeType() != TopAbs_FACE) { if(EndShape.ShapeType() != TopAbs_FACE) {
TopoDS_Iterator it(EndShape); TopoDS_Iterator it(EndShape);
for (; it.More(); it.Next()) { for (; it.More(); it.Next()) {
TNaming_Builder Builder(theResultLabel.NewChild()); TNaming_Builder aBuilder(theResultLabel.NewChild());
Builder.Generated(it.Value()); aBuilder.Generated(it.Value());
} }
} }
} else { } else {

View File

@ -248,9 +248,9 @@ void Extrema_GenExtCS::Perform (const Adaptor3d_Curve& C,
// Pre-compute curve sample points. // Pre-compute curve sample points.
TColgp_HArray1OfPnt aCurvPnts (0, mytsample); TColgp_HArray1OfPnt aCurvPnts (0, mytsample);
Standard_Real aCU = aMinTUV(1); Standard_Real aCU1 = aMinTUV(1);
for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU += aStepCU) for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU1 += aStepCU)
aCurvPnts.SetValue (aCUI, C.Value (aCU)); aCurvPnts.SetValue (aCUI, C.Value (aCU1));
PSO_Particle* aParticle = aParticles.GetWorstParticle(); PSO_Particle* aParticle = aParticles.GetWorstParticle();
// Select specified number of particles from pre-computed set of samples // Select specified number of particles from pre-computed set of samples
@ -260,18 +260,18 @@ void Extrema_GenExtCS::Perform (const Adaptor3d_Curve& C,
Standard_Real aSV = aMinTUV(3); Standard_Real aSV = aMinTUV(3);
for (Standard_Integer aSVI = 0; aSVI <= myvsample; aSVI++, aSV += aStepSV) for (Standard_Integer aSVI = 0; aSVI <= myvsample; aSVI++, aSV += aStepSV)
{ {
Standard_Real aCU = aMinTUV(1); Standard_Real aCU2 = aMinTUV(1);
for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU += aStepCU) for (Standard_Integer aCUI = 0; aCUI <= mytsample; aCUI++, aCU2 += aStepCU)
{ {
Standard_Real aSqDist = mySurfPnts->Value(aSUI, aSVI).SquareDistance(aCurvPnts.Value(aCUI)); Standard_Real aSqDist = mySurfPnts->Value(aSUI, aSVI).SquareDistance(aCurvPnts.Value(aCUI));
if (aSqDist < aParticle->Distance) if (aSqDist < aParticle->Distance)
{ {
aParticle->Position[0] = aCU; aParticle->Position[0] = aCU2;
aParticle->Position[1] = aSU; aParticle->Position[1] = aSU;
aParticle->Position[2] = aSV; aParticle->Position[2] = aSV;
aParticle->BestPosition[0] = aCU; aParticle->BestPosition[0] = aCU2;
aParticle->BestPosition[1] = aSU; aParticle->BestPosition[1] = aSU;
aParticle->BestPosition[2] = aSV; aParticle->BestPosition[2] = aSV;

View File

@ -520,7 +520,6 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint)
PasU = (PasU - U0) / (myusample - 1); PasU = (PasU - U0) / (myusample - 1);
U0 = U0/2. + myumin; U0 = U0/2. + myumin;
myUParams = new TColStd_HArray1OfReal(1,myusample ); myUParams = new TColStd_HArray1OfReal(1,myusample );
Standard_Integer NoU;
Standard_Real U = U0; Standard_Real U = U0;
for ( NoU = 1 ; NoU <= myusample; NoU++, U += PasU) for ( NoU = 1 ; NoU <= myusample; NoU++, U += PasU)
myUParams->SetValue(NoU, U); myUParams->SetValue(NoU, U);
@ -534,7 +533,6 @@ void Extrema_GenExtPS::BuildGrid(const gp_Pnt &thePoint)
V0 = V0/2. + myvmin; V0 = V0/2. + myvmin;
myVParams = new TColStd_HArray1OfReal(1,myvsample ); myVParams = new TColStd_HArray1OfReal(1,myvsample );
Standard_Integer NoV;
Standard_Real V = V0; Standard_Real V = V0;
for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV) for ( NoV = 1, V = V0; NoV <= myvsample; NoV++, V += PasV)

View File

@ -322,9 +322,9 @@ Standard_Boolean FEmTool_Assembly::Solve()
if(GHGt->IsInProfile(k, i)) { if(GHGt->IsInProfile(k, i)) {
Standard_Real m = 0.; // m = M(k,i) Standard_Real m = 0.; // m = M(k,i)
const FEmTool_ListOfVectors& L = G.Value(k); const FEmTool_ListOfVectors& aL = G.Value(k);
for(Iter.Initialize(L); Iter.More(); Iter.Next()) { for(Iter.Initialize(aL); Iter.More(); Iter.Next()) {
const Handle(TColStd_HArray1OfReal)& a = Iter.Value(); const Handle(TColStd_HArray1OfReal)& a = Iter.Value();
for(j = a->Lower(); j <= a->Upper(); j++) m += qi(j) * a->Value(j); // scalar product of for(j = a->Lower(); j <= a->Upper(); j++) m += qi(j) * a->Value(j); // scalar product of
@ -486,7 +486,6 @@ void FEmTool_Assembly::AddConstraint(const Standard_Integer IndexofConstraint,
} }
else { else {
FEmTool_ListIteratorOfListOfVectors Iter(L); FEmTool_ListIteratorOfListOfVectors Iter(L);
Standard_Integer i;
Standard_Real s1 = 0, s2 = 0; Standard_Real s1 = 0, s2 = 0;
Handle(TColStd_HArray1OfReal) Aux1, Aux2; Handle(TColStd_HArray1OfReal) Aux1, Aux2;
for(i=1; Iter.More(); Iter.Next(), i++) { for(i=1; Iter.More(); Iter.Next(), i++) {

View File

@ -53,9 +53,9 @@ FEmTool_LinearFlexion::FEmTool_LinearFlexion(const Standard_Integer WorkDegree,
Handle(PLib_HermitJacobi) theBase = new PLib_HermitJacobi(WDeg, ConstraintOrder); Handle(PLib_HermitJacobi) theBase = new PLib_HermitJacobi(WDeg, ConstraintOrder);
FEmTool_ElementsOfRefMatrix Elem = FEmTool_ElementsOfRefMatrix(theBase, DerOrder); FEmTool_ElementsOfRefMatrix Elem = FEmTool_ElementsOfRefMatrix(theBase, DerOrder);
Standard_Integer maxDegree = WDeg+1; Standard_Integer maxDegree = WDeg+1;
math_IntegerVector Order(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); math_IntegerVector anOrder(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax()));
math_Vector Lower(1,1,-1.), Upper(1,1,1.); math_Vector Lower(1,1,-1.), Upper(1,1,1.);
math_GaussSetIntegration anInt(Elem, Lower, Upper, Order); math_GaussSetIntegration anInt(Elem, Lower, Upper, anOrder);
MatrixElemts = anInt.Value(); MatrixElemts = anInt.Value();
} }

View File

@ -53,11 +53,11 @@ FEmTool_LinearJerk::FEmTool_LinearJerk(const Standard_Integer WorkDegree,
Standard_Integer maxDegree = WDeg+1; Standard_Integer maxDegree = WDeg+1;
math_IntegerVector Order(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); math_IntegerVector anOrder(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax()));
math_Vector Lower(1,1,-1.), Upper(1,1,1.); math_Vector Lower(1,1,-1.), Upper(1,1,1.);
math_GaussSetIntegration anInt(Elem, Lower, Upper, Order); math_GaussSetIntegration anInt(Elem, Lower, Upper, anOrder);
MatrixElemts = anInt.Value(); MatrixElemts = anInt.Value();
} }

View File

@ -51,10 +51,10 @@ FEmTool_LinearTension::FEmTool_LinearTension(const Standard_Integer WorkDegree,
FEmTool_ElementsOfRefMatrix Elem = FEmTool_ElementsOfRefMatrix(theBase, DerOrder); FEmTool_ElementsOfRefMatrix Elem = FEmTool_ElementsOfRefMatrix(theBase, DerOrder);
Standard_Integer maxDegree = WDeg+1; Standard_Integer maxDegree = WDeg+1;
math_IntegerVector Order(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax())); math_IntegerVector anOrder(1,1,Min(4*(maxDegree/2+1),math::GaussPointsMax()));
math_Vector Lower(1,1,-1.), Upper(1,1,1.); math_Vector Lower(1,1,-1.), Upper(1,1,1.);
math_GaussSetIntegration anInt(Elem, Lower, Upper, Order); math_GaussSetIntegration anInt(Elem, Lower, Upper, anOrder);
MatrixElemts = anInt.Value(); MatrixElemts = anInt.Value();
} }

View File

@ -425,16 +425,16 @@ Standard_Boolean FairCurve_Batten::Compute(const gp_Vec2d& DeltaP1,
} }
NewBS -> InsertKnots(NKnots->Array1(), NMults->Array1(), 1.e-10); NewBS -> InsertKnots(NKnots->Array1(), NMults->Array1(), 1.e-10);
Handle(TColgp_HArray1OfPnt2d) NPoles = Handle(TColgp_HArray1OfPnt2d) NewNPoles =
new TColgp_HArray1OfPnt2d(1, NewBS->NbPoles()); new TColgp_HArray1OfPnt2d(1, NewBS->NbPoles());
NewBS -> Poles( NPoles->ChangeArray1() ); NewBS -> Poles(NewNPoles->ChangeArray1() );
NewBS -> Multiplicities( NMults->ChangeArray1() ); NewBS -> Multiplicities( NMults->ChangeArray1() );
NewBS -> Knots( NKnots->ChangeArray1() ); NewBS -> Knots( NKnots->ChangeArray1() );
Handle(TColStd_HArray1OfReal) FKnots = Handle(TColStd_HArray1OfReal) FKnots =
new TColStd_HArray1OfReal (1, NewBS->NbPoles() + Degree+1); new TColStd_HArray1OfReal (1, NewBS->NbPoles() + Degree+1);
NewBS -> KnotSequence( FKnots->ChangeArray1()); NewBS -> KnotSequence( FKnots->ChangeArray1());
Poles = NPoles; Poles = NewNPoles;
Mults = NMults; Mults = NMults;
Knots = NKnots; Knots = NKnots;
Flatknots = FKnots; Flatknots = FKnots;

View File

@ -407,16 +407,16 @@ Standard_Boolean FairCurve_MinimalVariation::Compute(const gp_Vec2d& DeltaP1,
} }
NewBS -> InsertKnots(NKnots->Array1(), NMults->Array1(), 1.e-10); NewBS -> InsertKnots(NKnots->Array1(), NMults->Array1(), 1.e-10);
Handle(TColgp_HArray1OfPnt2d) NPoles = Handle(TColgp_HArray1OfPnt2d) NewNPoles =
new TColgp_HArray1OfPnt2d(1, NewBS->NbPoles()); new TColgp_HArray1OfPnt2d(1, NewBS->NbPoles());
NewBS -> Poles( NPoles->ChangeArray1() ); NewBS -> Poles(NewNPoles->ChangeArray1() );
NewBS -> Multiplicities( NMults->ChangeArray1() ); NewBS -> Multiplicities( NMults->ChangeArray1() );
NewBS -> Knots( NKnots->ChangeArray1() ); NewBS -> Knots( NKnots->ChangeArray1() );
Handle(TColStd_HArray1OfReal) FKnots = Handle(TColStd_HArray1OfReal) FKnots =
new TColStd_HArray1OfReal (1, NewBS->NbPoles() + Degree+1); new TColStd_HArray1OfReal (1, NewBS->NbPoles() + Degree+1);
NewBS -> KnotSequence( FKnots->ChangeArray1()); NewBS -> KnotSequence( FKnots->ChangeArray1());
Poles = NPoles; Poles = NewNPoles;
Mults = NMults; Mults = NMults;
Knots = NKnots; Knots = NKnots;
Flatknots = FKnots; Flatknots = FKnots;

View File

@ -239,15 +239,15 @@ Standard_Integer FilletSurf_InternalBuilder::Add(const TopTools_ListOfShape& E,
} }
if(!periodic && yatrou) return 2; if(!periodic && yatrou) return 2;
if(periodic && yatrou){ if(periodic && yatrou){
Standard_Boolean vraitrou = 0, debut = 0; Standard_Boolean vraitrou = 0, aLocalDebut = 0;
for(Standard_Integer i = sp->NbEdges(); i > yatrou; i--){ for(Standard_Integer i = sp->NbEdges(); i > yatrou; i--){
TopoDS_Edge cured = sp->Edges(i); TopoDS_Edge cured = sp->Edges(i);
if(isinlist(cured,E)){ if(isinlist(cured,E)){
if(vraitrou) return 2; if(vraitrou) return 2;
newsp->PutInFirst(cured); newsp->PutInFirst(cured);
} }
else if(debut) vraitrou = 1; else if(aLocalDebut) vraitrou = 1;
debut = 1; aLocalDebut = 1;
} }
} }

View File

@ -389,7 +389,7 @@ parcen3(1,8)
cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius); cirsol(NbrSol) = gp_Circ2d(gp_Ax2d(Center,dirx),Radius);
// ======================================================= // =======================================================
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
gp_Dir2d dc1(center1.XY()-Center.XY()); gp_Dir2d aDC1(center1.XY()-Center.XY());
#endif #endif
gp_Dir2d dc2(origin2.XY()-Center.XY()); gp_Dir2d dc2(origin2.XY()-Center.XY());
Standard_Real distcc1 = Center.Distance(center1); Standard_Real distcc1 = Center.Distance(center1);

View File

@ -106,21 +106,21 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 ,
ElCLib::D1(Ufirst(1),L1,point1,Tan1); ElCLib::D1(Ufirst(1),L1,point1,Tan1);
Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2); Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2);
gp_Vec2d Tan3(OnLine.Direction().XY()); gp_Vec2d Tan3(OnLine.Direction().XY());
gp_Pnt2d point3(OnLine.Location().XY()+Ufirst(3)*Tan3.XY()); gp_Pnt2d point3new(OnLine.Location().XY()+Ufirst(3)*Tan3.XY());
Standard_Real dist1 = point3.Distance(point1); Standard_Real dist1 = point3new.Distance(point1);
Standard_Real dist2 = point3.Distance(point2); Standard_Real dist2 = point3new.Distance(point2);
if ( Abs(dist1-dist2)/2. <= Tol) { if ( Abs(dist1-dist2)/2. <= Tol) {
cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.);
Standard_Real normetan2 = Tan2.Magnitude(); Standard_Real normetan2 = Tan2.Magnitude();
gp_Vec2d Vec1(point1,point3); gp_Vec2d Vec1(point1,point3new);
gp_Vec2d Vec2(point2,point3); gp_Vec2d Vec2(point2,point3new);
Standard_Real normevec2 = Vec2.Magnitude(); Standard_Real normevec2 = Vec2.Magnitude();
Standard_Real angle2; Standard_Real angle2;
if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) { if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
angle2 = Vec2.Angle(Tan2); angle2 = Vec2.Angle(Tan2);
} }
else { angle2 = 0.; } else { angle2 = 0.; }
Standard_Real pscal=point3.XY().Dot(gp_XY(-L1.Direction().Y(), Standard_Real pscal=point3new.XY().Dot(gp_XY(-L1.Direction().Y(),
L1.Direction().X())); L1.Direction().X()));
if (Qualified1.IsUnqualified() || if (Qualified1.IsUnqualified() ||
(Qualified1.IsOutside() && pscal <= 0.) || (Qualified1.IsOutside() && pscal <= 0.) ||
@ -137,7 +137,7 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 ,
pnttg2sol = point2; pnttg2sol = point2;
pararg2 = Ufirst(2); pararg2 = Ufirst(2);
par2sol = ElCLib::Parameter(cirsol,pnttg2sol); par2sol = ElCLib::Parameter(cirsol,pnttg2sol);
pntcen = point3; pntcen = point3new;
parcen3 = Ufirst(3); parcen3 = Ufirst(3);
WellDone = Standard_True; WellDone = Standard_True;
} }
@ -207,15 +207,15 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1); Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1);
Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2); Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2);
gp_Vec2d Tan3(OnLine.Direction().XY()); gp_Vec2d Tan3(OnLine.Direction().XY());
gp_Pnt2d point3(OnLine.Location().XY()+Ufirst(3)*Tan3.XY()); gp_Pnt2d point3new(OnLine.Location().XY()+Ufirst(3)*Tan3.XY());
Standard_Real dist1 = point3.Distance(point1); Standard_Real dist1 = point3new.Distance(point1);
Standard_Real dist2 = point3.Distance(point2); Standard_Real dist2 = point3new.Distance(point2);
if ( Abs(dist1-dist2)/2. <= Tol) { if ( Abs(dist1-dist2)/2. <= Tol) {
cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.);
Standard_Real normetan1 = Tan1.Magnitude(); Standard_Real normetan1 = Tan1.Magnitude();
Standard_Real normetan2 = Tan2.Magnitude(); Standard_Real normetan2 = Tan2.Magnitude();
gp_Vec2d Vec1(point1,point3); gp_Vec2d Vec1(point1,point3new);
gp_Vec2d Vec2(point2,point3); gp_Vec2d Vec2(point2,point3new);
Standard_Real normevec1 = Vec1.Magnitude(); Standard_Real normevec1 = Vec1.Magnitude();
Standard_Real normevec2 = Vec2.Magnitude(); Standard_Real normevec2 = Vec2.Magnitude();
Standard_Real angle1,angle2; Standard_Real angle1,angle2;
@ -243,7 +243,7 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
pnttg2sol = point2; pnttg2sol = point2;
pararg2 = Ufirst(2); pararg2 = Ufirst(2);
par2sol = ElCLib::Parameter(cirsol,pnttg2sol); par2sol = ElCLib::Parameter(cirsol,pnttg2sol);
pntcen = point3; pntcen = point3new;
parcen3 = Ufirst(3); parcen3 = Ufirst(3);
WellDone = Standard_True; WellDone = Standard_True;
} }
@ -300,16 +300,16 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
Func.Value(Ufirst,Umin); Func.Value(Ufirst,Umin);
if (Root.IsDone()) { if (Root.IsDone()) {
Root.Root(Ufirst); Root.Root(Ufirst);
gp_Pnt2d point1,point3; gp_Pnt2d point1new,point3new;
gp_Vec2d Tan1,Tan3; gp_Vec2d Tan1,Tan3;
Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1); Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1new,Tan1);
ElCLib::D1(Ufirst(2),OnLine,point3,Tan3); ElCLib::D1(Ufirst(2),OnLine,point3new,Tan3);
Standard_Real dist1 = point3.Distance(point1); Standard_Real dist1 = point3new.Distance(point1new);
Standard_Real dist2 = point3.Distance(Point2); Standard_Real dist2 = point3new.Distance(Point2);
if ( Abs(dist1-dist2)/2. <= Tol) { if ( Abs(dist1-dist2)/2. <= Tol) {
cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.);
Standard_Real normetan1 = Tan1.Magnitude(); Standard_Real normetan1 = Tan1.Magnitude();
gp_Vec2d Vec1(point1,point3); gp_Vec2d Vec1(point1new,point3new);
Standard_Real normevec1 = Vec1.Magnitude(); Standard_Real normevec1 = Vec1.Magnitude();
Standard_Real angle1; Standard_Real angle1;
if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) { if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
@ -322,13 +322,13 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
(Qualified1.IsEnclosed() && angle1 <= 0.)) { (Qualified1.IsEnclosed() && angle1 <= 0.)) {
qualifier1 = Qualified1.Qualifier(); qualifier1 = Qualified1.Qualifier();
qualifier2 = GccEnt_noqualifier; qualifier2 = GccEnt_noqualifier;
pnttg1sol = point1; pnttg1sol = point1new;
pararg1 = Ufirst(1); pararg1 = Ufirst(1);
par1sol = ElCLib::Parameter(cirsol,pnttg1sol); par1sol = ElCLib::Parameter(cirsol,pnttg1sol);
pnttg2sol = Point2; pnttg2sol = Point2;
pararg2 = Ufirst(2); pararg2 = Ufirst(2);
par2sol = ElCLib::Parameter(cirsol,pnttg2sol); par2sol = ElCLib::Parameter(cirsol,pnttg2sol);
pntcen = point3; pntcen = point3new;
parcen3 = Ufirst(3); parcen3 = Ufirst(3);
WellDone = Standard_True; WellDone = Standard_True;
} }
@ -607,21 +607,21 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 ,
Func.Value(Ufirst,Umin); Func.Value(Ufirst,Umin);
if (Root.IsDone()) { if (Root.IsDone()) {
Root.Root(Ufirst); Root.Root(Ufirst);
gp_Pnt2d point1,point2; gp_Pnt2d point1new,point2new;
gp_Vec2d Tan1,Tan2; gp_Vec2d Tan1,Tan2;
ElCLib::D1(Ufirst(1),L1,point1,Tan1); ElCLib::D1(Ufirst(1),L1,point1new,Tan1);
Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2,Tan2); Geom2dGcc_CurveTool::D1(Cu2,Ufirst(2),point2new,Tan2);
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
gp_Vec2d Tan3(-Sin(Ufirst(3)),Cos(Ufirst(3))); gp_Vec2d Tan3(-Sin(Ufirst(3)),Cos(Ufirst(3)));
#endif #endif
point3 = ElCLib::Value(Ufirst(3),OnCirc); point3 = ElCLib::Value(Ufirst(3),OnCirc);
Standard_Real dist1 = point3.Distance(point1); Standard_Real dist1 = point3.Distance(point1new);
Standard_Real dist2 = point3.Distance(point2); Standard_Real dist2 = point3.Distance(point2new);
if ( Abs(dist1-dist2)/2. <= Tol) { if ( Abs(dist1-dist2)/2. <= Tol) {
cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.);
Standard_Real normetan2 = Tan2.Magnitude(); Standard_Real normetan2 = Tan2.Magnitude();
gp_Vec2d Vec1(point1,point3); gp_Vec2d Vec1(point1new,point3);
gp_Vec2d Vec2(point2,point3); gp_Vec2d Vec2(point2new,point3);
Standard_Real normevec2 = Vec2.Magnitude(); Standard_Real normevec2 = Vec2.Magnitude();
Standard_Real angle2; Standard_Real angle2;
if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) { if (normevec2 >= gp::Resolution() && normetan2 >= gp::Resolution()) {
@ -639,10 +639,10 @@ Geom2dGcc_Circ2d2TanOnIter (const GccEnt_QualifiedLin& Qualified1 ,
(Qualified2.IsEnclosed() && angle2 <= 0.)) { (Qualified2.IsEnclosed() && angle2 <= 0.)) {
qualifier1 = Qualified1.Qualifier(); qualifier1 = Qualified1.Qualifier();
qualifier2 = Qualified2.Qualifier(); qualifier2 = Qualified2.Qualifier();
pnttg1sol = point1; pnttg1sol = point1new;
pararg1 = Ufirst(1); pararg1 = Ufirst(1);
par1sol = ElCLib::Parameter(cirsol,pnttg1sol); par1sol = ElCLib::Parameter(cirsol,pnttg1sol);
pnttg2sol = point2; pnttg2sol = point2new;
pararg2 = Ufirst(2); pararg2 = Ufirst(2);
par2sol = ElCLib::Parameter(cirsol,pnttg2sol); par2sol = ElCLib::Parameter(cirsol,pnttg2sol);
pntcen = point3; pntcen = point3;
@ -813,16 +813,16 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
Func.Value(Ufirst,Umin); Func.Value(Ufirst,Umin);
if (Root.IsDone()) { if (Root.IsDone()) {
Root.Root(Ufirst); Root.Root(Ufirst);
gp_Pnt2d point1,point3; gp_Pnt2d point1new,point3new;
gp_Vec2d Tan1,Tan3; gp_Vec2d Tan1,Tan3;
Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1,Tan1); Geom2dGcc_CurveTool::D1(Cu1,Ufirst(1),point1new,Tan1);
ElCLib::D1(Ufirst(2),OnCirc,point3,Tan3); ElCLib::D1(Ufirst(2),OnCirc,point3new,Tan3);
Standard_Real dist1 = point3.Distance(point1); Standard_Real dist1 = point3new.Distance(point1new);
Standard_Real dist2 = point3.Distance(Point2); Standard_Real dist2 = point3new.Distance(Point2);
if ( Abs(dist1-dist2)/2. <= Tol) { if ( Abs(dist1-dist2)/2. <= Tol) {
cirsol = gp_Circ2d(gp_Ax2d(point3,dirx),(dist1+dist2)/2.); cirsol = gp_Circ2d(gp_Ax2d(point3new,dirx),(dist1+dist2)/2.);
Standard_Real normetan1 = Tan1.Magnitude(); Standard_Real normetan1 = Tan1.Magnitude();
gp_Vec2d Vec1(point1,point3); gp_Vec2d Vec1(point1new,point3new);
Standard_Real normevec1 = Vec1.Magnitude(); Standard_Real normevec1 = Vec1.Magnitude();
Standard_Real angle1; Standard_Real angle1;
if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) { if (normevec1 >= gp::Resolution() && normetan1 >= gp::Resolution()) {
@ -835,13 +835,13 @@ Geom2dGcc_Circ2d2TanOnIter (const Geom2dGcc_QCurve& Qualified1 ,
(Qualified1.IsEnclosed() && angle1 <= 0.)) { (Qualified1.IsEnclosed() && angle1 <= 0.)) {
qualifier1 = Qualified1.Qualifier(); qualifier1 = Qualified1.Qualifier();
qualifier2 = GccEnt_noqualifier; qualifier2 = GccEnt_noqualifier;
pnttg1sol = point1; pnttg1sol = point1new;
pararg1 = Ufirst(1); pararg1 = Ufirst(1);
par1sol = ElCLib::Parameter(cirsol,pnttg1sol); par1sol = ElCLib::Parameter(cirsol,pnttg1sol);
pnttg2sol = Point2; pnttg2sol = Point2;
pararg2 = 0.; pararg2 = 0.;
par2sol = ElCLib::Parameter(cirsol,pnttg2sol); par2sol = ElCLib::Parameter(cirsol,pnttg2sol);
pntcen = point3; pntcen = point3new;
parcen3 = Ufirst(3); parcen3 = Ufirst(3);
WellDone = Standard_True; WellDone = Standard_True;
} }

View File

@ -837,7 +837,7 @@ pararg2(1,aNbSolMAX)
firstparam = Max(Geom2dGcc_CurveToolGeo::FirstParameter(C1),thefirst); firstparam = Max(Geom2dGcc_CurveToolGeo::FirstParameter(C1),thefirst);
lastparam = Min(Geom2dGcc_CurveToolGeo::LastParameter(C1),thelast); lastparam = Min(Geom2dGcc_CurveToolGeo::LastParameter(C1),thelast);
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
IntRes2d_Domain D2(Geom2dGcc_CurveToolGeo::Value(C1,firstparam),firstparam,Tol, IntRes2d_Domain D2C1(Geom2dGcc_CurveToolGeo::Value(C1,firstparam),firstparam,Tol,
Geom2dGcc_CurveToolGeo::Value(C1,lastparam),lastparam,Tol); Geom2dGcc_CurveToolGeo::Value(C1,lastparam),lastparam,Tol);
#else #else
Geom2dGcc_CurveToolGeo::Value(C1,firstparam); Geom2dGcc_CurveToolGeo::Value(C1,firstparam);
@ -849,7 +849,7 @@ pararg2(1,aNbSolMAX)
firstparam = Max(Geom2dGcc_CurveToolGeo::FirstParameter(C2),thefirst); firstparam = Max(Geom2dGcc_CurveToolGeo::FirstParameter(C2),thefirst);
lastparam = Min(Geom2dGcc_CurveToolGeo::LastParameter(C2),thelast); lastparam = Min(Geom2dGcc_CurveToolGeo::LastParameter(C2),thelast);
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
IntRes2d_Domain D2(Geom2dGcc_CurveToolGeo::Value(C2,firstparam),firstparam,Tol, IntRes2d_Domain D2C2(Geom2dGcc_CurveToolGeo::Value(C2,firstparam),firstparam,Tol,
Geom2dGcc_CurveToolGeo::Value(C2,lastparam),lastparam,Tol); Geom2dGcc_CurveToolGeo::Value(C2,lastparam),lastparam,Tol);
#else #else
Geom2dGcc_CurveToolGeo::Value(C2,firstparam); Geom2dGcc_CurveToolGeo::Value(C2,firstparam);

View File

@ -630,8 +630,6 @@ Geom2dGcc_Circ2d3TanIter (const GccEnt_QualifiedLin& Qualified1 ,
if (Qualified1.IsUnqualified() || if (Qualified1.IsUnqualified() ||
(Qualified1.IsOutside() && pscal <= 0.) || (Qualified1.IsOutside() && pscal <= 0.) ||
(Qualified1.IsEnclosed() && pscal >= 0.)) { (Qualified1.IsEnclosed() && pscal >= 0.)) {
Standard_Real pscal=centre.XY().Dot(gp_XY(-L1.Direction().Y(),
L1.Direction().X()));
gp_Vec2d Tan1(L1.Direction().XY()); gp_Vec2d Tan1(L1.Direction().XY());
gp_Vec2d Tan2(L2.Direction().XY()); gp_Vec2d Tan2(L2.Direction().XY());
Standard_Real normetan1 = Tan1.Magnitude(); Standard_Real normetan1 = Tan1.Magnitude();

View File

@ -262,8 +262,6 @@ Standard_Integer GeomAdaptor_Curve::NbIntervals(const GeomAbs_Shape S) const
else if ( S == GeomAbs_C2) Cont = 2; else if ( S == GeomAbs_C2) Cont = 2;
else if ( S == GeomAbs_C3) Cont = 3; else if ( S == GeomAbs_C3) Cont = 3;
else Cont = myBspl->Degree(); else Cont = myBspl->Degree();
Standard_Integer FirstIndex = myBspl->FirstUKnotIndex();
Standard_Integer LastIndex = myBspl->LastUKnotIndex();
Standard_Integer Degree = myBspl->Degree(); Standard_Integer Degree = myBspl->Degree();
Standard_Integer NbKnots = myBspl->NbKnots(); Standard_Integer NbKnots = myBspl->NbKnots();
TColStd_Array1OfInteger Mults (1, NbKnots); TColStd_Array1OfInteger Mults (1, NbKnots);
@ -386,8 +384,6 @@ void GeomAdaptor_Curve::Intervals(TColStd_Array1OfReal& T,
else if ( S == GeomAbs_C2) Cont = 2; else if ( S == GeomAbs_C2) Cont = 2;
else if ( S == GeomAbs_C3) Cont = 3; else if ( S == GeomAbs_C3) Cont = 3;
else Cont = myBspl->Degree(); else Cont = myBspl->Degree();
Standard_Integer FirstIndex = myBspl->FirstUKnotIndex();
Standard_Integer LastIndex = myBspl->LastUKnotIndex();
Standard_Integer Degree = myBspl->Degree(); Standard_Integer Degree = myBspl->Degree();
Standard_Integer NbKnots = myBspl->NbKnots(); Standard_Integer NbKnots = myBspl->NbKnots();
TColStd_Array1OfInteger Mults (1, NbKnots); TColStd_Array1OfInteger Mults (1, NbKnots);

View File

@ -363,10 +363,10 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
Handle(Geom_Surface) Surf = Strim->BasisSurface(); Handle(Geom_Surface) Surf = Strim->BasisSurface();
UFirst = U1; ULast = U2; VFirst = V1; VLast = V2; UFirst = U1; ULast = U2; VFirst = V1; VLast = V2;
if (Surf->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) { if (Surf->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) {
Handle(Geom_OffsetSurface) OffsetSur = Handle(Geom_OffsetSurface) OffsetSurBasis =
Handle(Geom_OffsetSurface)::DownCast(Surf); Handle(Geom_OffsetSurface)::DownCast(Surf);
S = OffsetSur->Surface(); S = OffsetSurBasis->Surface();
if (!S.IsNull()) { if (!S.IsNull()) {
Surf = S; Surf = S;
} }
@ -374,11 +374,11 @@ Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
} }
if (Surf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { if (Surf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
Handle(Geom_RectangularTrimmedSurface) Strim = new Handle(Geom_RectangularTrimmedSurface) aStrim = new
(Geom_RectangularTrimmedSurface) (Surf, (Geom_RectangularTrimmedSurface) (Surf,
UFirst, ULast, UFirst, ULast,
VFirst, VLast); VFirst, VLast);
return SurfaceToBSplineSurface(Strim); return SurfaceToBSplineSurface(aStrim);
} }
if (Surf->IsKind(STANDARD_TYPE(Geom_Plane))) { if (Surf->IsKind(STANDARD_TYPE(Geom_Plane))) {

View File

@ -612,14 +612,14 @@ GeomFill_LocationDraft::GeomFill_LocationDraft
E.DerivTX(DN, myAngle, D2EDTDX); // d2E/dtdx E.DerivTX(DN, myAngle, D2EDTDX); // d2E/dtdx
math_Vector D2SDT2(1,3,0); // d2s/dt2 math_Vector D2SDT2(1,3,0); // d2s/dt2
math_Matrix T(1,3,1,3,0); math_Matrix aT(1,3,1,3,0);
D2EDX2.Multiply(DSDT,T); D2EDX2.Multiply(DSDT,aT);
// resolution du syst. lin. // resolution du syst. lin.
math_Gauss Ga1 (DEDX); math_Gauss Ga1 (DEDX);
if (Ga1.IsDone()) if (Ga1.IsDone())
{ {
Ga1.Solve ( -T*DSDT - 2*D2EDTDX*DSDT - D2EDT2 , D2SDT2); Ga1.Solve ( -aT*DSDT - 2*D2EDTDX*DSDT - D2EDT2 , D2SDT2);
gp_Vec2d d2p (D2SDT2(2), D2SDT2(3)); // surface gp_Vec2d d2p (D2SDT2(2), D2SDT2(3)); // surface
gp_Vec2d d2q (D2SDT2(1), 0); // courbe gp_Vec2d d2q (D2SDT2(1), 0); // courbe
D2Poles2d.SetValue(1, d2p); D2Poles2d.SetValue(1, d2p);

View File

@ -101,8 +101,8 @@ void UnifyBySettingMiddleKnots(TColGeom_SequenceOfCurve& theCurves)
Standard_Real aMidKnot = 0.; Standard_Real aMidKnot = 0.;
for (i = 1; i <= theCurves.Length(); i++) for (i = 1; i <= theCurves.Length(); i++)
{ {
Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(theCurves(i)); Handle(Geom_BSplineCurve) Ctemp = Handle(Geom_BSplineCurve)::DownCast(theCurves(i));
aMidKnot += C->Knot(j); aMidKnot += Ctemp->Knot(j);
} }
aMidKnot /= theCurves.Length(); aMidKnot /= theCurves.Length();
NewKnots(j) = aMidKnot; NewKnots(j) = aMidKnot;
@ -110,8 +110,8 @@ void UnifyBySettingMiddleKnots(TColGeom_SequenceOfCurve& theCurves)
for (i = 1; i <= theCurves.Length(); i++) for (i = 1; i <= theCurves.Length(); i++)
{ {
Handle(Geom_BSplineCurve) C = Handle(Geom_BSplineCurve)::DownCast(theCurves(i)); Handle(Geom_BSplineCurve) Cres = Handle(Geom_BSplineCurve)::DownCast(theCurves(i));
C->SetKnots(NewKnots); Cres->SetKnots(NewKnots);
} }
} }

View File

@ -373,7 +373,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
D2Px(1, Ordre), D2Py(1, Ordre), D2W(1, Ordre); D2Px(1, Ordre), D2Py(1, Ordre), D2W(1, Ordre);
Standard_Integer ii; Standard_Integer ii;
Standard_Real aux, daux, b, b2, c, c2, bpr, bsc; Standard_Real daux, b, b2, c, c2, bpr, bsc;
gp_Vec V1(Center, FirstPnt), V1Prim, V1Secn, V2; gp_Vec V1(Center, FirstPnt), V1Prim, V1Secn, V2;
// Calcul des transformations // Calcul des transformations
@ -481,7 +481,7 @@ void GeomFill_QuasiAngularConvertor::Section(const gp_Pnt& FirstPnt,
+ 2*betaprim * tan_b * dtan_b; + 2*betaprim * tan_b * dtan_b;
b2 = tan_b - beta; b2 = tan_b - beta;
b += beta / (3*b2); b += beta / (3*b2);
aux = betaprim*tan_b - beta*dtan_b; Standard_Real aux = betaprim*tan_b - beta*dtan_b;
bpr += aux / (3*b2*b2); bpr += aux / (3*b2*b2);
daux = betasecn*tan_b - beta*d2tan_b; daux = betasecn*tan_b - beta*d2tan_b;
bsc += (daux - 2*aux*betaprim*tan_b*tan_b/b2)/(3*b2*b2); bsc += (daux - 2*aux*betaprim*tan_b*tan_b/b2)/(3*b2*b2);

View File

@ -465,7 +465,6 @@ void GeomFill_SectionPlacement::Perform(const Handle(Adaptor3d_HCurve)& Path,
if (Intersector.IsDone()) if (Intersector.IsDone())
{ {
Standard_Real w; Standard_Real w;
gp_Pnt P;
Standard_Real aDist; Standard_Real aDist;
for (ii=1; ii<=Intersector.NbPoints(); ii++) for (ii=1; ii<=Intersector.NbPoints(); ii++)
{ {

View File

@ -272,14 +272,14 @@ Handle(Geom2d_Curve) GeomPlate_BuildPlateSurface::ProjectCurve(const Handle(Ada
ProjLib_CompProjectedCurve Projector(hsur, Curv, myTol3d/10, myTol3d/10); ProjLib_CompProjectedCurve Projector(hsur, Curv, myTol3d/10, myTol3d/10);
Standard_Real Udeb, Ufin, ProjUdeb, ProjUfin; Standard_Real UdebCheck, UfinCheck, ProjUdeb, ProjUfin;
Udeb = Curv->FirstParameter(); UdebCheck = Curv->FirstParameter();
Ufin = Curv->LastParameter(); UfinCheck = Curv->LastParameter();
Projector.Bounds( 1, ProjUdeb, ProjUfin ); Projector.Bounds( 1, ProjUdeb, ProjUfin );
if (Projector.NbCurves() != 1 || if (Projector.NbCurves() != 1 ||
Abs( Udeb-ProjUdeb ) > Precision::PConfusion() || Abs( UdebCheck -ProjUdeb ) > Precision::PConfusion() ||
Abs( Ufin-ProjUfin ) > Precision::PConfusion()) Abs( UfinCheck -ProjUfin ) > Precision::PConfusion())
{ {
if (Projector.IsSinglePnt(1, P2d)) if (Projector.IsSinglePnt(1, P2d))
{ {
@ -506,18 +506,17 @@ void GeomPlate_BuildPlateSurface::Perform()
Standard_Real u1,v1,u2,v2; Standard_Real u1,v1,u2,v2;
mySurfInit->Bounds(u1,v1,u2,v2); mySurfInit->Bounds(u1,v1,u2,v2);
GeomAdaptor_Surface Surf(mySurfInit); GeomAdaptor_Surface aSurfInit(mySurfInit);
myTolU = Surf.UResolution(myTol3d); myTolU = aSurfInit.UResolution(myTol3d);
myTolV = Surf.VResolution(myTol3d); myTolV = aSurfInit.VResolution(myTol3d);
myProj.Initialize(Surf,u1,v1,u2,v2, myProj.Initialize(aSurfInit,u1,v1,u2,v2,
myTolU,myTolV); myTolU,myTolV);
//====================================================================== //======================================================================
// Projection des courbes // Projection des courbes
//====================================================================== //======================================================================
Standard_Integer i;
Standard_Boolean Ok = Standard_True; Standard_Boolean Ok = Standard_True;
for (i = 1; i <= NTLinCont; i++) for (Standard_Integer i = 1; i <= NTLinCont; i++)
if(myLinCont->Value(i)->Curve2dOnSurf().IsNull()) if(myLinCont->Value(i)->Curve2dOnSurf().IsNull())
{ {
Handle( Geom2d_Curve ) Curve2d = ProjectCurve( myLinCont->Value(i)->Curve3d() ); Handle( Geom2d_Curve ) Curve2d = ProjectCurve( myLinCont->Value(i)->Curve3d() );
@ -545,7 +544,7 @@ void GeomPlate_BuildPlateSurface::Perform()
myTolU,myTolV); myTolU,myTolV);
Ok = Standard_True; Ok = Standard_True;
for (i = 1; i <= NTLinCont; i++) for (Standard_Integer i = 1; i <= NTLinCont; i++)
{ {
Handle( Geom2d_Curve ) Curve2d = ProjectCurve( myLinCont->Value(i)->Curve3d() ); Handle( Geom2d_Curve ) Curve2d = ProjectCurve( myLinCont->Value(i)->Curve3d() );
if (Curve2d.IsNull()) if (Curve2d.IsNull())
@ -560,18 +559,18 @@ void GeomPlate_BuildPlateSurface::Perform()
mySurfInit = myPlanarSurfInit; mySurfInit = myPlanarSurfInit;
mySurfInit->Bounds(u1,v1,u2,v2); mySurfInit->Bounds(u1,v1,u2,v2);
GeomAdaptor_Surface Surf(mySurfInit); GeomAdaptor_Surface SurfNew(mySurfInit);
myTolU = Surf.UResolution(myTol3d); myTolU = SurfNew.UResolution(myTol3d);
myTolV = Surf.VResolution(myTol3d); myTolV = SurfNew.VResolution(myTol3d);
myProj.Initialize(Surf,u1,v1,u2,v2, myProj.Initialize(SurfNew,u1,v1,u2,v2,
myTolU,myTolV); myTolU,myTolV);
for (i = 1; i <= NTLinCont; i++) for (Standard_Integer i = 1; i <= NTLinCont; i++)
myLinCont->ChangeValue(i)-> myLinCont->ChangeValue(i)->
SetCurve2dOnSurf(ProjectCurve( myLinCont->Value(i)->Curve3d() ) ); SetCurve2dOnSurf(ProjectCurve( myLinCont->Value(i)->Curve3d() ) );
} }
else { // Project the points else { // Project the points
for ( i=1;i<=NTPntCont;i++) { for (Standard_Integer i=1; i<=NTPntCont; i++) {
gp_Pnt P; gp_Pnt P;
myPntCont->Value(i)->D0(P); myPntCont->Value(i)->D0(P);
myPntCont->ChangeValue(i)->SetPnt2dOnSurf(ProjectPoint(P)); myPntCont->ChangeValue(i)->SetPnt2dOnSurf(ProjectPoint(P));
@ -582,7 +581,7 @@ void GeomPlate_BuildPlateSurface::Perform()
//====================================================================== //======================================================================
// Projection des points // Projection des points
//====================================================================== //======================================================================
for ( i=1;i<=NTPntCont;i++) { for (Standard_Integer i=1;i<=NTPntCont;i++) {
if (! myPntCont->Value(i)->HasPnt2dOnSurf()) { if (! myPntCont->Value(i)->HasPnt2dOnSurf()) {
gp_Pnt P; gp_Pnt P;
myPntCont->Value(i)->D0(P); myPntCont->Value(i)->D0(P);
@ -1808,10 +1807,10 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
{ Standard_Real coin; { Standard_Real coin;
Standard_Real Tol= 100 * myTol3d; Standard_Real Tol= 100 * myTol3d;
Standard_Real A1; Standard_Real A1;
gp_Pnt2d P1,P2; gp_Pnt2d P1temp,P2temp;
gp_Vec2d V1,V2; gp_Vec2d V1,V2;
myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1, V1); myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1temp, V1);
myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2, V2); myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2temp, V2);
A1 = V1.Angle(V2); A1 = V1.Angle(V2);
if (A1>(M_PI/2)) if (A1>(M_PI/2))
A1= M_PI - A1; A1= M_PI - A1;
@ -1862,10 +1861,10 @@ Intersect(Handle(GeomPlate_HArray1OfSequenceOfReal)& PntInter,
Standard_Real coin; Standard_Real coin;
Standard_Real Tol= 100 * myTol3d; Standard_Real Tol= 100 * myTol3d;
Standard_Real A1; Standard_Real A1;
gp_Pnt2d P1,P2; gp_Pnt2d P1temp,P2temp;
gp_Vec2d V1,V2; gp_Vec2d V1,V2;
myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1, V1); myLinCont->Value(i)->Curve2dOnSurf()->D1( int2d.ParamOnFirst(), P1temp, V1);
myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2, V2); myLinCont->Value(j)->Curve2dOnSurf()->D1( int2d.ParamOnSecond(), P2temp, V2);
A1 = V1.Angle( V2 ); A1 = V1.Angle( V2 );
if (A1 > M_PI/2) if (A1 > M_PI/2)
A1= M_PI - A1; A1= M_PI - A1;
@ -2298,7 +2297,6 @@ void GeomPlate_BuildPlateSurface::LoadPoint(const Standard_Integer ,
Standard_Integer NTPntCont=myPntCont->Length(); Standard_Integer NTPntCont=myPntCont->Length();
Standard_Integer Tang, i; Standard_Integer Tang, i;
// gp_Vec V1,V2,V3,V4,V5,V6,V7,V8,V9,V10; // gp_Vec V1,V2,V3,V4,V5,V6,V7,V8,V9,V10;
gp_Vec V1,V2,V3,V4;
// Chargement des points de contraintes ponctuel // Chargement des points de contraintes ponctuel
for (i=1;i<=NTPntCont;i++) { for (i=1;i<=NTPntCont;i++) {
@ -2312,6 +2310,7 @@ void GeomPlate_BuildPlateSurface::LoadPoint(const Standard_Integer ,
myPlate.Load(PC); myPlate.Load(PC);
Tang = Min(myPntCont->Value(i)->Order(), OrderMax); Tang = Min(myPntCont->Value(i)->Order(), OrderMax);
if (Tang==1) {// ==1 if (Tang==1) {// ==1
gp_Vec V1,V2,V3,V4;
myPntCont->Value(i)->D1(PP,V1,V2); myPntCont->Value(i)->D1(PP,V1,V2);
mySurfInit->D1(P2d.Coord(1),P2d.Coord(2),PP,V3,V4); mySurfInit->D1(P2d.Coord(1),P2d.Coord(2),PP,V3,V4);
Plate_D1 D1final(V1.XYZ(),V2.XYZ()); Plate_D1 D1final(V1.XYZ(),V2.XYZ());

View File

@ -131,11 +131,11 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
dout << mark; dout << mark;
for (Standard_Integer i = 2; i<=Nb; i++) { for (Standard_Integer j = 2; j<=Nb; j++) {
dout.Select(id,XX,YY,b); dout.Select(id,XX,YY,b);
Points(i) = gp_Pnt2d( ((Standard_Real)XX)/zoom, Points(j) = gp_Pnt2d( ((Standard_Real)XX)/zoom,
((Standard_Real)YY)/zoom ); ((Standard_Real)YY)/zoom );
mark = new Draw_Marker2D( Points(i), Draw_X, Draw_vert); mark = new Draw_Marker2D( Points(j), Draw_X, Draw_vert);
dout << mark; dout << mark;
} }
} }

View File

@ -161,9 +161,9 @@ static Standard_Integer PointsByPick
AppDef_MultiPointConstraint mpc(1,0); AppDef_MultiPointConstraint mpc(1,0);
MPC->ChangeArray1().Init(mpc); MPC->ChangeArray1().Init(mpc);
for (i=1; i<=ThePoints.Length(); i++) { for (i=1; i<=ThePoints.Length(); i++) {
AppDef_MultiPointConstraint mpc(1,0); AppDef_MultiPointConstraint aLocalMpc(1,0);
mpc.SetPoint(1, ThePoints.Value(i)); aLocalMpc.SetPoint(1, ThePoints.Value(i));
MPC->SetValue(i, mpc); MPC->SetValue(i, aLocalMpc);
} }
} }

View File

@ -921,15 +921,15 @@ static Standard_Integer cfindp (Draw_Interpretor& , Standard_Integer n, const ch
if (!DBs.IsNull()) if (!DBs.IsNull())
DBs->FindPole( x, y, d, 5, Index); DBs->FindPole( x, y, d, 5, Index);
else { else {
Handle(DrawTrSurf_BezierCurve2d) DBz = Handle(DrawTrSurf_BezierCurve2d) DBz2d =
Handle(DrawTrSurf_BezierCurve2d)::DownCast(D); Handle(DrawTrSurf_BezierCurve2d)::DownCast(D);
if( !DBz.IsNull()) if( !DBz2d.IsNull())
DBz->FindPole( x, y, d, 5, Index); DBz2d->FindPole( x, y, d, 5, Index);
else { else {
Handle(DrawTrSurf_BSplineCurve2d) DBs = Handle(DrawTrSurf_BSplineCurve2d) DBs2d =
Handle(DrawTrSurf_BSplineCurve2d)::DownCast(D); Handle(DrawTrSurf_BSplineCurve2d)::DownCast(D);
if (!DBs.IsNull()) if (!DBs2d.IsNull())
DBs->FindPole( x, y, d, 5, Index); DBs2d->FindPole( x, y, d, 5, Index);
else else
return 1; return 1;
} }

View File

@ -826,12 +826,12 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P)
myFEOutLine = myFaceItr1.OutLine (); myFEOutLine = myFaceItr1.OutLine ();
myFEInternal = myFaceItr1.Internal (); myFEInternal = myFaceItr1.Internal ();
myFEDouble = myFaceItr1.Double (); myFEDouble = myFaceItr1.Double ();
HLRBRep_EdgeData* ed = &(myEData(myFE)); HLRBRep_EdgeData* EDataFE1 = &(myEData(myFE));
if (!myFEDouble && if (!myFEDouble &&
(myFEOri == TopAbs_FORWARD || (myFEOri == TopAbs_FORWARD ||
myFEOri == TopAbs_REVERSED)) { myFEOri == TopAbs_REVERSED)) {
myFEGeom = &(ed->ChangeGeometry()); myFEGeom = &(EDataFE1->ChangeGeometry());
const HLRBRep_Curve& EC = ed->Geometry(); const HLRBRep_Curve& EC = EDataFE1->Geometry();
p = EC.Parameter3d((EC.LastParameter () + p = EC.Parameter3d((EC.LastParameter () +
EC.FirstParameter()) / 2); EC.FirstParameter()) / 2);
if (HLRBRep_EdgeFaceTool::UVPoint(p,myFEGeom,iFaceGeom,pu,pv)) { if (HLRBRep_EdgeFaceTool::UVPoint(p,myFEGeom,iFaceGeom,pu,pv)) {
@ -890,9 +890,9 @@ void HLRBRep_Data::Update (const HLRAlgo_Projector& P)
myFaceItr1.MoreEdge(); myFaceItr1.MoreEdge();
myFaceItr1.NextEdge()) { myFaceItr1.NextEdge()) {
myFE = myFaceItr1.Edge(); myFE = myFaceItr1.Edge();
HLRBRep_EdgeData* ed = &(myEData(myFE)); HLRBRep_EdgeData* EDataFE2 = &(myEData(myFE));
if (!fd->Simple()) ed->AutoIntersectionDone(Standard_False); if (!fd->Simple()) EDataFE2->AutoIntersectionDone(Standard_False);
HLRAlgo::DecodeMinMax(ed->MinMax(), HLRAlgo::DecodeMinMax(EDataFE2->MinMax(),
(Standard_Address)EdgeMin, (Standard_Address)EdgeMin,
(Standard_Address)EdgeMax); (Standard_Address)EdgeMax);
if (myFaceItr1.BeginningOfWire()) if (myFaceItr1.BeginningOfWire())

View File

@ -96,10 +96,10 @@ HLRBRep_HLRToShape::InternalCompound (const Standard_Integer typ,
Exp.Next()) { Exp.Next()) {
Standard_Integer ie = Edges.FindIndex(Exp.Current()); Standard_Integer ie = Edges.FindIndex(Exp.Current());
if (ie != 0) { if (ie != 0) {
HLRBRep_EdgeData& ed = DS->EDataArray().ChangeValue(ie); HLRBRep_EdgeData& EDataIE = DS->EDataArray().ChangeValue(ie);
if (!ed.Used()) { if (!EDataIE.Used()) {
DrawEdge(visible,Standard_False,typ,ed,Result,added,In3d); DrawEdge(visible,Standard_False,typ, EDataIE,Result,added,In3d);
ed.Used(Standard_True); EDataIE.Used(Standard_True);
} }
} }
} }
@ -111,13 +111,13 @@ HLRBRep_HLRToShape::InternalCompound (const Standard_Integer typ,
DrawFace(visible,typ,iface,DS,Result,added,In3d); DrawFace(visible,typ,iface,DS,Result,added,In3d);
if (typ >= 3) { if (typ >= 3) {
HLRBRep_EdgeData* ed = &(DS->EDataArray().ChangeValue(e1 - 1)); HLRBRep_EdgeData* EDataE11 = &(DS->EDataArray().ChangeValue(e1 - 1));
for (Standard_Integer ie = e1; ie <= e2; ie++) { for (Standard_Integer ie = e1; ie <= e2; ie++) {
ed++; EDataE11++;
if (!ed->Used()) { if (!EDataE11->Used()) {
DrawEdge(visible,Standard_False,typ,*ed,Result,added,In3d); DrawEdge(visible,Standard_False,typ,*EDataE11,Result,added,In3d);
ed->Used(Standard_True); EDataE11->Used(Standard_True);
} }
} }
} }

View File

@ -865,7 +865,7 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
*/ */
//-- ====================================================================== //-- ======================================================================
if(nf>2) { if(nf>2) {
Standard_Integer i,ir,j,l; Standard_Integer i,ir,k,l;
Standard_Integer rra; Standard_Integer rra;
l=(nf>>1)+1; l=(nf>>1)+1;
ir=nf; ir=nf;
@ -882,28 +882,28 @@ void HLRBRep_InternalAlgo::HideSelected (const Standard_Integer I,
} }
} }
i=l; i=l;
j=l+l; k=l+l;
while(j<=ir) { while(k<=ir) {
if(j<ir) { if(k<ir) {
if(Val(Index(j)) > Val(Index(j+1))) if(Val(Index(k)) > Val(Index(k+1)))
j++; k++;
else if(Val(Index(j)) == Val(Index(j+1))) { else if(Val(Index(k)) == Val(Index(k+1))) {
if(Size(Index(j)) > Size(Index(j+1))) if(Size(Index(k)) > Size(Index(k+1)))
j++; k++;
} }
} }
if(Val(rra) > Val(Index(j))) { if(Val(rra) > Val(Index(k))) {
Index(i)=Index(j); Index(i)=Index(k);
i=j; i=k;
j<<=1; k<<=1;
} }
else if((Val(rra) == Val(Index(j))) && (Size(rra) > Size(Index(j)))) { else if((Val(rra) == Val(Index(k))) && (Size(rra) > Size(Index(k)))) {
Index(i)=Index(j); Index(i)=Index(k);
i=j; i=k;
j<<=1; k<<=1;
} }
else { else {
j=ir+1; k=ir+1;
} }
} }
Index(i)=rra; Index(i)=rra;

View File

@ -938,9 +938,9 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape,
if (ShapeMap1.Add(E)) { if (ShapeMap1.Add(E)) {
Standard_Integer e = myEMap.FindIndex(E); Standard_Integer e = myEMap.FindIndex(E);
ES(e) = iShell; ES(e) = iShell;
Standard_Integer i = EF.FindIndex(E); Standard_Integer anIndexE = EF.FindIndex(E);
if (i > 0) { if (anIndexE > 0) {
TopTools_ListOfShape& LS = EF(i); TopTools_ListOfShape& LS = EF(anIndexE);
InitBiPointsWithConnexity(e,E,List,PID,LS,Standard_True); InitBiPointsWithConnexity(e,E,List,PID,LS,Standard_True);
} }
else { else {
@ -1312,10 +1312,10 @@ InitBiPointsWithConnexity (const Standard_Integer e,
Nod11Indices = Nod12Indices; Nod11Indices = Nod12Indices;
Nod11RValues = Nod12RValues; Nod11RValues = Nod12RValues;
i1p2 = Pol1(iPol); i1p2 = Pol1(iPol);
const Handle(HLRAlgo_PolyInternalNode)* pi1p2 = const Handle(HLRAlgo_PolyInternalNode)* pi1p2iPol =
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol))); &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol)));
Nod12Indices = (*pi1p2)->Indices(); Nod12Indices = (*pi1p2iPol)->Indices();
Nod12RValues = (*pi1p2)->RValues(); Nod12RValues = (*pi1p2iPol)->RValues();
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
if (DoError) { if (DoError) {
if (Nod11NrmX*Nod12NrmX + if (Nod11NrmX*Nod12NrmX +
@ -1387,7 +1387,7 @@ InitBiPointsWithConnexity (const Standard_Integer e,
const TColStd_Array1OfInteger& Pol1 = HPol[0]->Nodes(); const TColStd_Array1OfInteger& Pol1 = HPol[0]->Nodes();
const TColStd_Array1OfInteger& Pol2 = HPol[1]->Nodes(); const TColStd_Array1OfInteger& Pol2 = HPol[1]->Nodes();
const Handle(TColStd_HArray1OfReal)& par = HPol[0]->Parameters(); const Handle(TColStd_HArray1OfReal)& par = HPol[0]->Parameters();
Standard_Integer nbPol = Pol1.Upper(); Standard_Integer nbPol1 = Pol1.Upper();
Standard_Address TData1 = &pid1->TData(); Standard_Address TData1 = &pid1->TData();
Standard_Address PISeg1 = &pid1->PISeg(); Standard_Address PISeg1 = &pid1->PISeg();
Standard_Address PINod1 = &pid1->PINod(); Standard_Address PINod1 = &pid1->PINod();
@ -1402,16 +1402,16 @@ InitBiPointsWithConnexity (const Standard_Integer e,
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(1 ))); &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(1 )));
Nod11Indices = (*pi1p1)->Indices(); Nod11Indices = (*pi1p1)->Indices();
Nod11RValues = (*pi1p1)->RValues(); Nod11RValues = (*pi1p1)->RValues();
const Handle(HLRAlgo_PolyInternalNode)* pi1p2 = const Handle(HLRAlgo_PolyInternalNode)* pi1p2nbPol1 =
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(nbPol))); &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(nbPol1)));
Nod12Indices = (*pi1p2)->Indices(); Nod12Indices = (*pi1p2nbPol1)->Indices();
Nod12RValues = (*pi1p2)->RValues(); Nod12RValues = (*pi1p2nbPol1)->RValues();
const Handle(HLRAlgo_PolyInternalNode)* pi2p1 = const Handle(HLRAlgo_PolyInternalNode)* pi2p1 =
&(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(1 ))); &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(1 )));
Nod21Indices = (*pi2p1)->Indices(); Nod21Indices = (*pi2p1)->Indices();
Nod21RValues = (*pi2p1)->RValues(); Nod21RValues = (*pi2p1)->RValues();
const Handle(HLRAlgo_PolyInternalNode)* pi2p2 = const Handle(HLRAlgo_PolyInternalNode)* pi2p2 =
&(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(nbPol))); &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(nbPol1)));
Nod22Indices = (*pi2p2)->Indices(); Nod22Indices = (*pi2p2)->Indices();
Nod22RValues = (*pi2p2)->RValues(); Nod22RValues = (*pi2p2)->RValues();
Nod11Flag |= NMskVert; Nod11Flag |= NMskVert;
@ -1419,7 +1419,7 @@ InitBiPointsWithConnexity (const Standard_Integer e,
Nod21Flag |= NMskVert; Nod21Flag |= NMskVert;
Nod22Flag |= NMskVert; Nod22Flag |= NMskVert;
for (iPol = 1; iPol <= nbPol; iPol++) { for (iPol = 1; iPol <= nbPol1; iPol++) {
const Handle(HLRAlgo_PolyInternalNode)* pi1pA = const Handle(HLRAlgo_PolyInternalNode)* pi1pA =
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol))); &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol)));
Standard_Address Nod1AIndices = (*pi1pA)->Indices(); Standard_Address Nod1AIndices = (*pi1pA)->Indices();
@ -1467,22 +1467,22 @@ InitBiPointsWithConnexity (const Standard_Integer e,
Nod12Flag |= NMskEdge; Nod12Flag |= NMskEdge;
Nod22Flag |= NMskEdge; Nod22Flag |= NMskEdge;
TIMultiply(XTI2,YTI2,ZTI2); TIMultiply(XTI2,YTI2,ZTI2);
if (Pol1(1) == Pol1(nbPol) && myPC.IsPeriodic()) if (Pol1(1) == Pol1(nbPol1) && myPC.IsPeriodic())
U2 = U2 - myPC.Period(); U2 = U2 - myPC.Period();
if (nbPol == 2 && BRep_Tool::Degenerated(E)) { if (nbPol1 == 2 && BRep_Tool::Degenerated(E)) {
CheckDegeneratedSegment(Nod11Indices,Nod11RValues, CheckDegeneratedSegment(Nod11Indices,Nod11RValues,
Nod12Indices,Nod12RValues); Nod12Indices,Nod12RValues);
CheckDegeneratedSegment(Nod21Indices,Nod21RValues, CheckDegeneratedSegment(Nod21Indices,Nod21RValues,
Nod22Indices,Nod22RValues); Nod22Indices,Nod22RValues);
UpdateAroundNode(Pol1(1 ),Nod11Indices,TData1,PISeg1,PINod1); UpdateAroundNode(Pol1(1 ),Nod11Indices,TData1,PISeg1,PINod1);
UpdateAroundNode(Pol1(nbPol),Nod12Indices,TData1,PISeg1,PINod1); UpdateAroundNode(Pol1(nbPol1),Nod12Indices,TData1,PISeg1,PINod1);
UpdateAroundNode(Pol2(1 ),Nod21Indices,TData2,PISeg2,PINod2); UpdateAroundNode(Pol2(1 ),Nod21Indices,TData2,PISeg2,PINod2);
UpdateAroundNode(Pol2(nbPol),Nod22Indices,TData2,PISeg2,PINod2); UpdateAroundNode(Pol2(nbPol1),Nod22Indices,TData2,PISeg2,PINod2);
} }
else { else {
for (iPol = 2; iPol <= nbPol; iPol++) { for (iPol = 2; iPol <= nbPol1; iPol++) {
i1p1 = i1p2; i1p1 = i1p2;
Nod11Indices = Nod12Indices; Nod11Indices = Nod12Indices;
Nod11RValues = Nod12RValues; Nod11RValues = Nod12RValues;
@ -1490,15 +1490,15 @@ InitBiPointsWithConnexity (const Standard_Integer e,
Nod21Indices = Nod22Indices; Nod21Indices = Nod22Indices;
Nod21RValues = Nod22RValues; Nod21RValues = Nod22RValues;
i1p2 = Pol1(iPol); i1p2 = Pol1(iPol);
const Handle(HLRAlgo_PolyInternalNode)* pi1p2 = const Handle(HLRAlgo_PolyInternalNode)* pi1p2iPol =
&(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol))); &(((HLRAlgo_Array1OfPINod*)PINod1)->ChangeValue(Pol1(iPol)));
Nod12Indices = (*pi1p2)->Indices(); Nod12Indices = (*pi1p2iPol)->Indices();
Nod12RValues = (*pi1p2)->RValues(); Nod12RValues = (*pi1p2iPol)->RValues();
i2p2 = Pol2(iPol); i2p2 = Pol2(iPol);
const Handle(HLRAlgo_PolyInternalNode)* pi2p2 = const Handle(HLRAlgo_PolyInternalNode)* pi2p2iPol =
&(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(iPol))); &(((HLRAlgo_Array1OfPINod*)PINod2)->ChangeValue(Pol2(iPol)));
Nod22Indices = (*pi2p2)->Indices(); Nod22Indices = (*pi2p2iPol)->Indices();
Nod22RValues = (*pi2p2)->RValues(); Nod22RValues = (*pi2p2iPol)->RValues();
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
if (DoError) { if (DoError) {
if (Nod11NrmX*Nod12NrmX + if (Nod11NrmX*Nod12NrmX +
@ -1582,7 +1582,7 @@ InitBiPointsWithConnexity (const Standard_Integer e,
TTMa[2][0] = ttma.Value(3,1); TTMa[2][0] = ttma.Value(3,1);
TTMa[2][1] = ttma.Value(3,2); TTMa[2][1] = ttma.Value(3,2);
TTMa[2][2] = ttma.Value(3,3); TTMa[2][2] = ttma.Value(3,3);
Standard_Integer nbPol = Pol.Upper(); Standard_Integer nbPol1 = Pol.Upper();
const gp_XYZ& P1 = Pol(1).XYZ(); const gp_XYZ& P1 = Pol(1).XYZ();
X2 = P1.X(); X2 = P1.X();
Y2 = P1.Y(); Y2 = P1.Y();
@ -1593,14 +1593,14 @@ InitBiPointsWithConnexity (const Standard_Integer e,
ZTI2 = Z2; ZTI2 = Z2;
TIMultiply(XTI2,YTI2,ZTI2); TIMultiply(XTI2,YTI2,ZTI2);
for (Standard_Integer iPol = 2; iPol <= nbPol; iPol++) { for (Standard_Integer jPol = 2; jPol <= nbPol1; jPol++) {
X1 = X2; X1 = X2;
Y1 = Y2; Y1 = Y2;
Z1 = Z2; Z1 = Z2;
XTI1 = XTI2; XTI1 = XTI2;
YTI1 = YTI2; YTI1 = YTI2;
ZTI1 = ZTI2; ZTI1 = ZTI2;
const gp_XYZ& P2 = Pol(iPol).XYZ(); const gp_XYZ& P2 = Pol(jPol).XYZ();
X2 = P2.X(); X2 = P2.X();
Y2 = P2.Y(); Y2 = P2.Y();
Z2 = P2.Z(); Z2 = P2.Z();

View File

@ -218,12 +218,12 @@ HLRBRep_ShapeToHLR::ExploreFace(const Handle(HLRTopoBRep_OutLiner)& S,
continue; continue;
ne++; ne++;
Standard_Integer ie = EM.FindIndex(E); Standard_Integer ie = EM.FindIndex(E);
TopAbs_Orientation orient = E.Orientation(); TopAbs_Orientation anOrientE = E.Orientation();
Standard_Boolean Int = TopDS.IsIntLFaceEdge(F,E); Standard_Boolean Int = TopDS.IsIntLFaceEdge(F,E);
Standard_Boolean Iso = TopDS.IsIsoLFaceEdge(F,E); Standard_Boolean Iso = TopDS.IsIsoLFaceEdge(F,E);
Standard_Boolean Out = TopDS.IsOutLFaceEdge(F,E); Standard_Boolean Out = TopDS.IsOutLFaceEdge(F,E);
Standard_Boolean Dbl = BRepTools::IsReallyClosed(TopoDS::Edge(E),theFace); Standard_Boolean Dbl = BRepTools::IsReallyClosed(TopoDS::Edge(E),theFace);
fd.SetWEdge(nw, ne, ie, orient, Out, Int, Dbl, Iso); fd.SetWEdge(nw, ne, ie, anOrientE, Out, Int, Dbl, Iso);
} }
} }
DS->FaceMap().Add(theFace); DS->FaceMap().Add(theFace);

View File

@ -94,15 +94,15 @@ HLRTest_DrawableEdgeTool::InternalDraw (Draw_Display& D,
if (typ >= 3) { if (typ >= 3) {
iCB = 1; iCB = 1;
e2 = 0; e2 = 0;
HLRBRep_EdgeData* ed = &(DS->EDataArray().ChangeValue(0)); HLRBRep_EdgeData* anEdgeData = &(DS->EDataArray().ChangeValue(0));
ed++; anEdgeData++;
for (Standard_Integer ie = 1; ie <= ne; ie++) { for (Standard_Integer i = 1; i <= ne; i++) {
if (!ed->Used()) { if (!anEdgeData->Used()) {
DrawEdge(D,Standard_False,typ,nCB,ie,e2,iCB,*ed); DrawEdge(D,Standard_False,typ,nCB,i,e2,iCB,*anEdgeData);
ed->Used(Standard_True); anEdgeData->Used(Standard_True);
} }
ed++; anEdgeData++;
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More