mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Replacing french comments by english one
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
|
||||
//=======================================================================
|
||||
//function : ConcaveSide
|
||||
//purpose : calcule le cote concave au voisinage de la frontiere
|
||||
// de 2 faces.
|
||||
//purpose : calculate the concave face at the neighborhood of the border of
|
||||
// 2 faces.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
|
||||
@@ -111,9 +111,9 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
|
||||
}
|
||||
}
|
||||
else {
|
||||
//les faces sont localement tangentes on bidouille!!
|
||||
//the faces are locally tangent - this is fake!
|
||||
if(dint1.Dot(dint2) < 0.){
|
||||
//ici c'est une regularite oubliee
|
||||
//This is a forgotten regularity
|
||||
gp_Vec DDU, DDV, DDUV;
|
||||
S1.D2(p2d1.X(),p2d1.Y(),pt1,DU1,DV1,DDU,DDV,DDUV);
|
||||
DU1 += ( DU1 * dint1 < 0) ? -DDU : DDU;
|
||||
@@ -143,15 +143,15 @@ Standard_Integer ChFi3d::ConcaveSide(const BRepAdaptor_Surface& S1,
|
||||
}
|
||||
else {
|
||||
#ifdef DEB
|
||||
cout<<"ConcaveSide : pas de cote concave"<<endl;
|
||||
cout<<"ConcaveSide : no concave face"<<endl;
|
||||
#endif
|
||||
//ce 10 montre que la face en bout est dans le prolongement de l'une des deux faces d'appui
|
||||
//This 10 shows that the face at end is in the extension of one of two base faces
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//ici ca rebrousse, on prend des points dans les faces
|
||||
//ni trop pres ni trop loin, comme on peut.
|
||||
//here it turns back, the points are taken in faces
|
||||
//neither too close nor too far as much as possible.
|
||||
Standard_Real u,v;
|
||||
#ifdef DEB
|
||||
// Standard_Real deport = 1000*BRep_Tool::Tolerance(E);
|
||||
|
@@ -66,7 +66,7 @@ raises
|
||||
|
||||
is
|
||||
|
||||
-- Construction et donnees generales.
|
||||
-- Construction and general data.
|
||||
-------------------------------------
|
||||
|
||||
Delete(me:out) is virtual;
|
||||
@@ -84,7 +84,7 @@ is
|
||||
AngularTolerance : Real);
|
||||
|
||||
|
||||
-- Acquisition et interrogation concernant les trajets.
|
||||
-- Acquisition and questioning on trajectories.
|
||||
-------------------------------------------------------
|
||||
|
||||
Remove(me : in out; E : Edge from TopoDS)
|
||||
@@ -166,20 +166,19 @@ is
|
||||
is static;
|
||||
|
||||
|
||||
-- Le calcul et la recuperation des resultats.
|
||||
-- Calculation and the restoration of results.
|
||||
----------------------------------------------
|
||||
|
||||
Compute(me : in out)
|
||||
---Purpose: calculation general
|
||||
-- -geometrie sur l ensemble des aretes,
|
||||
-- -reconstruction topologique
|
||||
---Purpose: general calculation of geometry on all edges,
|
||||
-- topologic reconstruction.
|
||||
is static;
|
||||
|
||||
IsDone(me) returns Boolean from Standard is static;
|
||||
---Purpose: returns True if the computation is success
|
||||
|
||||
Shape(me) returns Shape from TopoDS
|
||||
---Purpose: if (Isdone()) rend le resultat.
|
||||
---Purpose: if (Isdone()) makes the result.
|
||||
raises NoSuchObject from Standard
|
||||
---Purpose: if (!Isdone())
|
||||
is static;
|
||||
@@ -486,9 +485,9 @@ is
|
||||
Intf,Intl : in out Boolean from Standard)
|
||||
|
||||
returns Boolean from Standard is static;
|
||||
---Purpose: Methode, implementee dans les heritants, calculant
|
||||
-- les elements de construction de la surface (conge
|
||||
-- ou chanfrein).
|
||||
---Purpose: Method, implemented in the inheritants, calculates
|
||||
-- the elements of construction of the surface (fillet or
|
||||
-- chamfer).
|
||||
|
||||
CallPerformSurf(me : in out;
|
||||
Stripe : in out Stripe from ChFiDS;
|
||||
@@ -535,9 +534,9 @@ is
|
||||
Intf,Intl : in out Boolean from Standard)
|
||||
returns Boolean
|
||||
is deferred protected;
|
||||
---Purpose: Methode, implementee dans les heritants, calculant
|
||||
-- les elements de construction de la surface (conge
|
||||
-- ou chanfrein).
|
||||
---Purpose: Method, implemented in the inheritants, calculating
|
||||
-- elements of construction of the surface (fillet or
|
||||
-- chamfer).
|
||||
|
||||
PerformSurf(me : in out;
|
||||
Data : out SequenceOfSurfData from ChFiDS;
|
||||
@@ -856,7 +855,7 @@ is
|
||||
Forward : Boolean from Standard;
|
||||
RecP1, RecRst1 : Boolean from Standard;
|
||||
RecP2, RecRst2 : Boolean from Standard)
|
||||
---Purpose: Calculated a Line of contact edge/edge.
|
||||
---Purpose: Calculates a Line of contact edge/edge.
|
||||
returns Boolean from Standard is static protected;
|
||||
|
||||
|
||||
@@ -917,57 +916,57 @@ is
|
||||
|
||||
fields
|
||||
|
||||
-- La piece d entree
|
||||
-- Input part
|
||||
myShape : Shape from TopoDS;
|
||||
|
||||
-- Donnees numeriques (tolerances) REMARQUE : il faut virer les tol2d!!!
|
||||
angular : Real from Standard; -- tangence entre aretes
|
||||
tolappangle : Real from Standard is protected; -- approx angulaire
|
||||
-- Numeric data (tolerances) NOTE : suspend tol2d!!!
|
||||
angular : Real from Standard; -- tangency of edges
|
||||
tolappangle : Real from Standard is protected; -- angular approximation
|
||||
tolesp : Real from Standard is protected; -- confusion 3d : def 1.e-4
|
||||
tol2d : Real from Standard is protected; -- confusion 2d : def 1.e-5
|
||||
tolapp3d : Real from Standard is protected; -- approx 3d : def 1.e-4
|
||||
tolapp2d : Real from Standard is protected; -- approx 2d : def 1.e-5
|
||||
fleche : Real from Standard is protected; -- fleche du walking : def 1.e-6
|
||||
fleche : Real from Standard is protected; -- vector of walking : def 1.e-6
|
||||
|
||||
-- Continuite pour la geometrie approximee
|
||||
-- Continuity for the approximated geometry
|
||||
myConti : Shape from GeomAbs is protected;
|
||||
|
||||
-- Maps de pointeurs arrieres pour travailler
|
||||
-- Maps of back-pointers to work
|
||||
myEFMap : Map from ChFiDS is protected;
|
||||
myESoMap : Map from ChFiDS is protected;
|
||||
myEShMap : Map from ChFiDS is protected;
|
||||
myVFMap : Map from ChFiDS is protected;
|
||||
myVEMap : Map from ChFiDS is protected;
|
||||
|
||||
-- Les outils de stockage et de reconstruction
|
||||
-- Tools of storage and reconstruction
|
||||
myDS : HDataStructure from TopOpeBRepDS is protected;
|
||||
myCoup : HBuilder from TopOpeBRepBuild is protected;
|
||||
|
||||
-- Les outils de stockage interne
|
||||
-- Tools of internal storage
|
||||
myListStripe : ListOfStripe from ChFiDS is protected;
|
||||
myVDataMap : StripeMap from ChFiDS is protected;
|
||||
myRegul : Regularities from ChFiDS is protected;
|
||||
|
||||
-- Les stripes dont le calcul a plante
|
||||
-- Stripes the calculation which of hangs
|
||||
badstripes : ListOfStripe from ChFiDS is protected;
|
||||
|
||||
-- Les vertex au voisinage desquels la finition a plante
|
||||
-- Vertexes in the neighborhood which of the finition hangs
|
||||
badvertices : ListOfShape from TopTools is protected;
|
||||
|
||||
-- donnees calculees pendant le compute pour l historique
|
||||
-- Data calculated during the computation for the history
|
||||
myGenerated : ListOfShape from TopTools;
|
||||
myEVIMap : DataMapOfShapeListOfInteger from TopTools is protected;
|
||||
|
||||
-- flag si tout s est bien passe
|
||||
-- flag if all has passed well
|
||||
done : Boolean from Standard is protected;
|
||||
|
||||
-- le resultat
|
||||
-- result
|
||||
myShapeResult : Shape from TopoDS;
|
||||
|
||||
-- flag si il y a un resultat partiel(badshape)
|
||||
-- flag there is partial result (badshape)
|
||||
hasresult : Boolean from Standard is protected;
|
||||
|
||||
-- resultat partiel eventuel
|
||||
-- eventual partial result
|
||||
badShape : Shape from TopoDS;
|
||||
|
||||
|
||||
|
@@ -57,7 +57,7 @@
|
||||
#ifdef DEB
|
||||
#include <OSD_Chronometer.hxx>
|
||||
|
||||
// variables pour les performances
|
||||
// variables for performances
|
||||
|
||||
|
||||
OSD_Chronometer cl_total,cl_extent,cl_perfsetofsurf,cl_perffilletonvertex,
|
||||
@@ -208,7 +208,7 @@ void ChFi3d_Builder::Compute()
|
||||
TestTopOpe::Shapes(myShape,bids);
|
||||
#endif
|
||||
|
||||
// remplissage de myVDatatMap
|
||||
// filling of myVDatatMap
|
||||
ChFiDS_ListIteratorOfListOfStripe itel;
|
||||
|
||||
for (itel.Initialize(myListStripe);itel.More(); itel.Next()) {
|
||||
@@ -221,7 +221,7 @@ void ChFi3d_Builder::Compute()
|
||||
else if (itel.Value()->Spine()->LastStatus() == ChFiDS_FreeBoundary)
|
||||
ExtentOneCorner(itel.Value()->Spine()->LastVertex(),itel.Value());
|
||||
}
|
||||
// preanalyse pour evaluer les prolongements.
|
||||
// preanalysis to evaluate the extensions.
|
||||
ExtentAnalyse();
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ void ChFi3d_Builder::Compute()
|
||||
ChFi3d_InitChron(cl_perfsetofsurf);
|
||||
#endif
|
||||
|
||||
// Construction de la bande de conge sur chaque stripe.
|
||||
// Construction of the stripe of fillet on each stripe.
|
||||
for (itel.Initialize(myListStripe);itel.More(); itel.Next()) {
|
||||
itel.Value()->Spine()->SetErrorStatus(ChFiDS_Ok);
|
||||
try {
|
||||
@@ -257,7 +257,7 @@ void ChFi3d_Builder::Compute()
|
||||
ChFi3d_InitChron(cl_perffilletonvertex);
|
||||
#endif
|
||||
|
||||
//construire les conges sur chaque vertex +alimenter la Ds
|
||||
//construct fillets on each vertex + feed the Ds
|
||||
if (done) {
|
||||
//Standard_Integer nbresult=0;
|
||||
// for (Standard_Integer j=1;j<=myVDataMap.Extent();j++) {
|
||||
@@ -351,8 +351,8 @@ void ChFi3d_Builder::Compute()
|
||||
if (done) {
|
||||
BRep_Builder B1;
|
||||
CompleteDS(DStr,myShape);
|
||||
//Update des tolerances sur vertex au max des aretes adjacentes ou
|
||||
//Update des tolerances sur arete degeneree au max des vertex adjacents.
|
||||
//Update tolerances on vertex to max adjacent edges or
|
||||
//Update tolerances on degenerated edge to max of adjacent vertexes.
|
||||
TopOpeBRepDS_CurveExplorer cex(DStr);
|
||||
for(;cex.More();cex.Next()){
|
||||
TopOpeBRepDS_Curve& c = *((TopOpeBRepDS_Curve*)(void*)&(cex.Curve()));
|
||||
@@ -421,7 +421,8 @@ void ChFi3d_Builder::Compute()
|
||||
its = myCoup->Merged(curshape,TopAbs_IN);
|
||||
if(!its.More()) B1.Add(myShapeResult,curshape);
|
||||
else {
|
||||
//Si l'ancien type est du Shape est un Shell, on mettre un Shell et non un Solid, Il reste neanmoins un pbleme pour compound de Shell ouvert.
|
||||
//If the old type of Shape is Shell, Shell is placed instead of Solid,
|
||||
//However there is a problem for compound of open Shell.
|
||||
while (its.More()) {
|
||||
const TopAbs_ShapeEnum letype = curshape.ShapeType();
|
||||
if (letype == TopAbs_SHELL){
|
||||
@@ -461,7 +462,7 @@ void ChFi3d_Builder::Compute()
|
||||
ChFi3d_InitChron(cl_setregul);
|
||||
#endif
|
||||
|
||||
// On code les regularites apres coup.
|
||||
// Regularities are coded after cutting.
|
||||
SetRegul();
|
||||
|
||||
|
||||
@@ -475,7 +476,7 @@ void ChFi3d_Builder::Compute()
|
||||
#endif
|
||||
|
||||
|
||||
// affichage des temps pour les perfs
|
||||
// display of time for perfs
|
||||
|
||||
#ifdef DEB
|
||||
cout<<endl;
|
||||
@@ -546,7 +547,7 @@ void ChFi3d_Builder::Compute()
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformSingularCorner
|
||||
//purpose : Charge le vertex et les aretes degeneree.
|
||||
//purpose : Load vertex and degenerated edges.
|
||||
//=======================================================================
|
||||
|
||||
void ChFi3d_Builder::PerformSingularCorner
|
||||
@@ -565,17 +566,17 @@ void ChFi3d_Builder::PerformSingularCorner
|
||||
#endif
|
||||
for (It.Initialize(myVDataMap(Index)), i=0; It.More(); It.Next(),i++){
|
||||
stripe = It.Value();
|
||||
// la SurfData en cause et ses CommonPoints,
|
||||
// SurfData concerned and its CommonPoints,
|
||||
Standard_Integer sens = 0;
|
||||
Standard_Integer num = ChFi3d_IndexOfSurfData(Vtx,stripe,sens);
|
||||
Standard_Boolean isfirst = (sens == 1);
|
||||
Fd = stripe->SetOfSurfData()->Sequence().Value(num);
|
||||
const ChFiDS_CommonPoint& CV1 = Fd->Vertex(isfirst,1);
|
||||
const ChFiDS_CommonPoint& CV2 = Fd->Vertex(isfirst,2);
|
||||
// Est ce toujours degenere ?
|
||||
// Is it always degenerated ?
|
||||
if ( CV1.Point().IsEqual( CV2.Point(), 0) ) {
|
||||
// si oui on stoke le vertex dans la stripe
|
||||
// et on fabrique l'arete en bout
|
||||
// if yes the vertex is stored in the stripe
|
||||
// and the edge at end is created
|
||||
if (i==0) Ivtx = ChFi3d_IndexPointInDS(CV1, DStr);
|
||||
Standard_Real tolreached;
|
||||
Standard_Real Pardeb, Parfin;
|
||||
@@ -638,14 +639,14 @@ void ChFi3d_Builder::PerformFilletOnVertex
|
||||
for (It.Initialize(myVDataMap(Index)), i=0; It.More(); It.Next(),i++){
|
||||
stripe = It.Value();
|
||||
sp = stripe->Spine();
|
||||
// la SurfData en cause et ses CommonPoints,
|
||||
// SurfData and its CommonPoints,
|
||||
Standard_Integer sens = 0;
|
||||
Standard_Integer num = ChFi3d_IndexOfSurfData(Vtx,stripe,sens);
|
||||
isfirst = (sens == 1);
|
||||
Fd = stripe->SetOfSurfData()->Sequence().Value(num);
|
||||
const ChFiDS_CommonPoint& CV1 = Fd->Vertex(isfirst,1);
|
||||
const ChFiDS_CommonPoint& CV2 = Fd->Vertex(isfirst,2);
|
||||
// Est ce toujours degenere ?
|
||||
// Is it always degenerated ?
|
||||
if ( CV1.Point().IsEqual( CV2.Point(), 0) )
|
||||
nondegenere = Standard_False;
|
||||
else toujoursdegenere = Standard_False;
|
||||
@@ -671,7 +672,7 @@ void ChFi3d_Builder::PerformFilletOnVertex
|
||||
nba=nba/2;*/
|
||||
Standard_Integer nba = ChFi3d_NumberOfEdges(Vtx, myVEMap);
|
||||
|
||||
if (nondegenere) { // Traitement normal
|
||||
if (nondegenere) { // Normal processing
|
||||
switch (i) {
|
||||
case 1 :
|
||||
{
|
||||
@@ -753,9 +754,9 @@ void ChFi3d_Builder::PerformFilletOnVertex
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // Traitement des cas singulier
|
||||
else { // Single case processing
|
||||
if (toujoursdegenere) PerformSingularCorner(Index);
|
||||
else PerformMoreThreeCorner(Index, i);//Derniere chance...
|
||||
else PerformMoreThreeCorner(Index, i);//Last chance...
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -375,9 +375,9 @@ Handle(TopOpeBRepBuild_HBuilder) ChFi3d_Builder::Builder()const
|
||||
|
||||
//=======================================================================
|
||||
//function : ChFi3d_FaceTangency
|
||||
//purpose : determiner si les faces en vis a vis des edges sont tangents
|
||||
// pour aller des faces en vis a vis sur e0 vers les faces en vis
|
||||
//a vis sur e1 ,considerer l ensemble des faces partant du sommet commun
|
||||
//purpose : determine if the faces opposing to edges are tangent
|
||||
// to go from opposing faces on e0 to opposing faces
|
||||
// on e1, consider all faces starting at a common top.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::FaceTangency(const TopoDS_Edge& E0,
|
||||
@@ -389,7 +389,7 @@ Standard_Boolean ChFi3d_Builder::FaceTangency(const TopoDS_Edge& E0,
|
||||
Standard_Integer Nbf;
|
||||
TopoDS_Face F[2];
|
||||
|
||||
//On verifie qu on ne chaine pas sur une arete de regularite.
|
||||
//It is checked if the connection is not on a regular edge.
|
||||
for (It.Initialize(myEFMap(E1)), Nbf= 0 ;It.More();It.Next(), Nbf++) {
|
||||
if (Nbf>1)
|
||||
Standard_ConstructionError::Raise("ChFi3d_Builder:only 2 faces");
|
||||
@@ -430,7 +430,7 @@ Standard_Boolean ChFi3d_Builder::FaceTangency(const TopoDS_Edge& E0,
|
||||
|
||||
//=======================================================================
|
||||
//function : TangentExtremity
|
||||
//purpose : Test si 2 face sont tangentes en bout d'une edge
|
||||
//purpose : Test if 2 faces are tangent at the end of an edge
|
||||
//=======================================================================
|
||||
static Standard_Boolean TangentExtremity(const TopoDS_Vertex& V,
|
||||
const TopoDS_Edge& E,
|
||||
@@ -461,7 +461,7 @@ static Standard_Boolean TangentExtremity(const TopoDS_Vertex& V,
|
||||
n1.SetXYZ(theProp1.Normal().XYZ());
|
||||
if (O1 == TopAbs_REVERSED) n1.Reverse();
|
||||
}
|
||||
else return Standard_False; // On ne sait pas ...
|
||||
else return Standard_False; // It is not known...
|
||||
|
||||
|
||||
Handle(Geom2d_Curve) pc2 = BRep_Tool::CurveOnSurface(e2,f2,f,l);
|
||||
@@ -471,14 +471,14 @@ static Standard_Boolean TangentExtremity(const TopoDS_Vertex& V,
|
||||
n2.SetXYZ(theProp2.Normal().XYZ());
|
||||
if(O2 == TopAbs_REVERSED) n2.Reverse();
|
||||
}
|
||||
else return Standard_False; // On ne sait pas ...
|
||||
else return Standard_False; // It is not known...
|
||||
|
||||
return (n1.Angle(n2) < tang);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : TangentOnVertex
|
||||
//purpose : Test si les faces support d'une edge sont tangente en bout.
|
||||
//purpose : Test if support faces of an edge are tangent at end.
|
||||
//=======================================================================
|
||||
static Standard_Boolean TangentOnVertex(const TopoDS_Vertex& V,
|
||||
const TopoDS_Edge& E,
|
||||
@@ -495,10 +495,9 @@ static Standard_Boolean TangentOnVertex(const TopoDS_Vertex& V,
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformExtremity
|
||||
//purpose : Dans le cas ou PerformElement a renvoye BreakPoint
|
||||
// a l une ou l autre des extremites, on essaye de raffiner
|
||||
// en fonction des concavite entres les faces voisines du
|
||||
// sommet.
|
||||
//purpose : In case if PerformElement returned BreakPoint at one or
|
||||
// another extremity, it is attempted to refine
|
||||
// depending on concavities between neighbour faces of the top.
|
||||
//=======================================================================
|
||||
|
||||
void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
@@ -520,7 +519,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
E[0] = Spine->Edges(iedge);
|
||||
V = Spine->LastVertex();
|
||||
}
|
||||
//On verifie avant tout que l on ne meurt pas en tangence.
|
||||
//Before all it is checked if the tangency is not dead.
|
||||
E[0] = Spine->Edges(iedge);
|
||||
ConexFaces (Spine,iedge,0,hs1,hs2);
|
||||
if(TangentExtremity(V,E[0],hs1,hs2,angular)){
|
||||
@@ -554,7 +553,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
}
|
||||
else{
|
||||
#ifdef DEB
|
||||
cout<<"sommet a plus de 3 aretes"<<endl;
|
||||
cout<<"top has more than 3 edges"<<endl;
|
||||
#endif
|
||||
sommetpourri = Standard_True;
|
||||
break;
|
||||
@@ -570,7 +569,6 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
}
|
||||
}
|
||||
|
||||
//petite verue pour debug avec MPS.
|
||||
if (!Spine->IsPeriodic()) {
|
||||
TopTools_ListIteratorOfListOfShape It,Jt;
|
||||
Standard_Integer nbf = 0, jf = 0;
|
||||
@@ -586,7 +584,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
if(nbf>3) {
|
||||
Spine->SetFirstStatus(ChFiDS_BreakPoint);
|
||||
#if DEB
|
||||
cout<<"sommet a : "<<nbf<<" faces."<<endl;
|
||||
cout<<"top has : "<<nbf<<" faces."<<endl;
|
||||
#endif
|
||||
}
|
||||
nbf = 0, jf = 0;
|
||||
@@ -602,7 +600,7 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
if(nbf>3) {
|
||||
Spine->SetLastStatus(ChFiDS_BreakPoint);
|
||||
#if DEB
|
||||
cout<<"sommet a : "<<nbf<<" faces."<<endl;
|
||||
cout<<"top has : "<<nbf<<" faces."<<endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -610,10 +608,9 @@ void ChFi3d_Builder::PerformExtremity (const Handle(ChFiDS_Spine)& Spine)
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformElement
|
||||
//purpose : rechercher l ensemble des edges tangents entre eux ;
|
||||
// Chaque edge retenu a 2 faces en vis
|
||||
// a vis pour 2 edges adjacents tangents il faut que les faces en vis a vis
|
||||
// soient tangentes
|
||||
//purpose : find all mutually tangent edges ;
|
||||
// Each edge has 2 opposing faces. For 2 adjacent tangent edges it is required that
|
||||
// the opposing faces were tangent.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spine)
|
||||
@@ -629,7 +626,7 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
TopoDS_Vertex Ve1,VStart,FVEc,LVEc,FVEv,LVEv;
|
||||
TopoDS_Edge Ev,Ec(Spine->Edges(1));
|
||||
if(BRep_Tool::Degenerated(Ec)) return 0;
|
||||
//on controle que l arete est bien une arete de cassure
|
||||
//it is checked if the edge is a cut edge
|
||||
TopoDS_Face ff1,ff2;
|
||||
ChFi3d_conexfaces(Ec,ff1,ff2,myEFMap);
|
||||
if(ff1.IsNull() || ff2.IsNull()) return 0;
|
||||
@@ -650,7 +647,7 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
#else
|
||||
ChFiDS_State CurSt;
|
||||
#endif
|
||||
if (VStart.IsSame(LVEc)) {//cas ou un seul edge ferme
|
||||
if (VStart.IsSame(LVEc)) {//case if only one edge is closed
|
||||
CEc.Initialize(Ec);
|
||||
Wl = BRep_Tool::Parameter(VStart,Ec);
|
||||
CEc.D1(Wl,P2,V1);
|
||||
@@ -670,7 +667,7 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
Spine->SetLastStatus(CurSt);
|
||||
Spine->SetFirstStatus(CurSt);
|
||||
}
|
||||
else { // Progression aval
|
||||
else { // Downstream progression
|
||||
FVEc = VStart;
|
||||
TopAbs_Orientation Or1;
|
||||
while (!Fini) {
|
||||
@@ -700,18 +697,18 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
Standard_Boolean rev = (Or1 != curor);
|
||||
Standard_Boolean OnAjoute = Standard_False;
|
||||
if (FaceTangency(Ec,Ev,FVEv)) {
|
||||
//il n'y a pas besoin de tolerance
|
||||
// pour se decider (PRO9486) la regularite suffit.
|
||||
// On verifie quand meme le non rebrousement (PRO9810)
|
||||
// there is no need of tolerance
|
||||
// to make a decision (PRO9486) the regularity is enough.
|
||||
// However, the abcense of turn-back is checked (PRO9810)
|
||||
OnAjoute = ((!rev && av1v2 < PI/2)
|
||||
||(rev && av1v2 > PI/2));
|
||||
// Il faut faire Attention au cas singulier (cf CTS21610_1)
|
||||
// mate attention to the single case (cf CTS21610_1)
|
||||
if (OnAjoute && (degeneOnEc ||
|
||||
TangentOnVertex(LVEc, Ev,myEFMap, ta)) )
|
||||
OnAjoute=((!rev && av1v2 < ta) || (rev && (PI - av1v2) < ta));
|
||||
}
|
||||
if (OnAjoute) {
|
||||
Fini = Standard_False; // Si Si cela peut etre util (Cf PRO14713)
|
||||
Fini = Standard_False; // If this can be useful (Cf PRO14713)
|
||||
Ec = Ev;
|
||||
// Ec = TopoDS::Edge(Ev);
|
||||
Ec.Orientation(Or1);
|
||||
@@ -733,8 +730,6 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
Nbface++) {}
|
||||
if (Nbface> 1) CurSt = ChFiDS_BreakPoint;
|
||||
Fini = ((!rev && av1v2 < ta) || (rev && (PI - av1v2) < ta));
|
||||
//attention dans le cas ou sur un vertex il part 3 edges dont l edge courant
|
||||
//+un edge bord libre et un edge cassure le status sera au pif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -744,7 +739,7 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
if (CurSt == ChFiDS_Closed) {
|
||||
Spine->SetFirstStatus(CurSt);
|
||||
}
|
||||
else {// Progression amont
|
||||
else {// Upstream progression
|
||||
Fini = Standard_False;
|
||||
Ec = Spine->Edges(1);
|
||||
curor = Ec.Orientation();
|
||||
@@ -797,8 +792,6 @@ Standard_Boolean ChFi3d_Builder::PerformElement(const Handle(ChFiDS_Spine)& Spin
|
||||
Nbface++) {}
|
||||
if (Nbface> 1) CurSt = ChFiDS_BreakPoint;
|
||||
Fini = ((!rev && av1v2 < ta) || (rev && (PI - av1v2) < ta));
|
||||
//attention dans le cas ou sur un vertex il part 3 edges dont l edge courant
|
||||
//+un edge bord libre et un edge cassure le status sera au pif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -77,7 +77,7 @@
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
|
||||
#ifdef DEB
|
||||
// Pour les mesures.
|
||||
// For measurements.
|
||||
#include <OSD_Chronometer.hxx>
|
||||
//static OSD_Chronometer appclock;
|
||||
#endif
|
||||
@@ -251,8 +251,8 @@ static void CompParam(Geom2dAdaptor_Curve Carc,
|
||||
const Standard_Real preftg)
|
||||
{
|
||||
Standard_Boolean found = 0;
|
||||
//(1) On verifie si les paramtres fournies sont bon
|
||||
// cas ou les pcurves sont paramtres comme la spine.
|
||||
//(1) It is checked if the provided parameters are good
|
||||
// if pcurves have the same parameters as the spine.
|
||||
gp_Pnt2d point = Carc.Value(prefarc);
|
||||
Standard_Real distini = point.Distance(Ctg->Value(preftg));
|
||||
if (distini <= Precision::PConfusion()) {
|
||||
@@ -261,9 +261,9 @@ static void CompParam(Geom2dAdaptor_Curve Carc,
|
||||
found = Standard_True;
|
||||
}
|
||||
else {
|
||||
//(2) On intersecte
|
||||
//(2) Intersection
|
||||
#ifdef DEB
|
||||
cout<< "CompParam : mauvais parametres on intersecte"<<endl;
|
||||
cout<< "CompParam : bad intersection parameters"<<endl;
|
||||
#endif
|
||||
IntRes2d_IntersectionPoint int2d;
|
||||
Geom2dInt_GInter Intersection;
|
||||
@@ -278,7 +278,7 @@ static void CompParam(Geom2dAdaptor_Curve Carc,
|
||||
nbseg = Intersection.NbSegments();
|
||||
if ( nbseg > 0 ){
|
||||
#ifdef DEB
|
||||
cout<< "segments d intersection sur les restrictions"<<endl;
|
||||
cout<< "segments of intersection on the restrictions"<<endl;
|
||||
#endif
|
||||
}
|
||||
nbpt = Intersection.NbPoints();
|
||||
@@ -298,23 +298,23 @@ static void CompParam(Geom2dAdaptor_Curve Carc,
|
||||
}
|
||||
|
||||
if(!found){
|
||||
// (3) On projette...
|
||||
// (3) Projection...
|
||||
#ifdef DEB
|
||||
cout<<"CompParam : echec intersection PC, on projette."<<endl;
|
||||
cout<<"CompParam : failed intersection PC, projection is created."<<endl;
|
||||
#endif
|
||||
parc = prefarc;
|
||||
Geom2dAPI_ProjectPointOnCurve projector(point,Ctg);
|
||||
|
||||
if(projector.NbPoints() == 0){
|
||||
// Cela arrive parfois dans les cas singuliers ou l'on sort
|
||||
// en bout de spine sur vertex...
|
||||
// This happens in some cases when there is a vertex
|
||||
// at the end of spine...
|
||||
ptg = preftg;
|
||||
#ifdef DEB
|
||||
cout<<"CompParam : echec proj p2d/c2d, on prend l'extremite!" <<endl;
|
||||
cout<<"CompParam : failed proj p2d/c2d, the extremity is taken!" <<endl;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
// On controle que l'on n'as pas calculer n'importe quoi (EDC402 C2)
|
||||
// It is checked if everything was calculated correctly (EDC402 C2)
|
||||
if (projector.LowerDistance() < distini)
|
||||
ptg = projector.LowerDistanceParameter();
|
||||
else ptg = preftg;
|
||||
@@ -324,8 +324,8 @@ static void CompParam(Geom2dAdaptor_Curve Carc,
|
||||
|
||||
//=======================================================================
|
||||
//function : CompBlendPoint
|
||||
//purpose : fabrique le BlendPoint correspondant a une tangence sur Vertex
|
||||
// pmn : 15/10/1997 : renvoi false, si l'on n' a pas de pcurve
|
||||
//purpose : create BlendPoint corresponding to a tangency on Vertex
|
||||
// pmn : 15/10/1997 : returns false, if there is no pcurve
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean CompBlendPoint(const TopoDS_Vertex& V,
|
||||
@@ -355,7 +355,7 @@ static Standard_Boolean CompBlendPoint(const TopoDS_Vertex& V,
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateLine
|
||||
//purpose : Met a jour les extremites apres une invalidation partiel
|
||||
//purpose : Updates extremities after a partial invalidation
|
||||
//=======================================================================
|
||||
|
||||
static void UpdateLine(Handle(BRepBlend_Line)& Line,
|
||||
@@ -398,8 +398,8 @@ static void UpdateLine(Handle(BRepBlend_Line)& Line,
|
||||
|
||||
//=======================================================================
|
||||
//function : CompleteData
|
||||
//purpose : Calcule les courbes et les CommonPoints a partir des donnees
|
||||
// calculees par remplissage.
|
||||
//purpose : Calculates curves and CommonPoints from the data
|
||||
// calculated by filling.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
@@ -436,7 +436,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
if(!Gf1) Data->ChangeVertexLastOnS1().SetPoint(Surfcoin->Value(ULast,VFirst));
|
||||
if(!Gf2) Data->ChangeVertexLastOnS2().SetPoint(Surfcoin->Value(ULast,VLast));
|
||||
|
||||
//calcul des courbes cote S1
|
||||
//calculate curves side S1
|
||||
Handle(Geom_Curve) Crv3d1;
|
||||
if(!PC1.IsNull()) Crv3d1= Surfcoin->VIso(VFirst);
|
||||
gp_Pnt2d pd1(UFirst,VFirst), pf1(ULast,VFirst);
|
||||
@@ -466,7 +466,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
Fint1.SetFirstParameter(UFirst);
|
||||
Fint1.SetLastParameter(ULast);
|
||||
Fint1.SetInterference(Index1OfCurve,tra1,c2dtrim,PCurveOnSurf);
|
||||
//calcul des courbes cote S2
|
||||
//calculate curves side S2
|
||||
Handle(Geom_Curve) Crv3d2;
|
||||
if(!PC2.IsNull()) Crv3d2 = Surfcoin->VIso(VLast);
|
||||
gp_Pnt2d pd2(UFirst,VLast), pf2(ULast,VLast);
|
||||
@@ -499,11 +499,10 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
|
||||
//=======================================================================
|
||||
//function : CompleteData
|
||||
//purpose : Calcule la surface les courbes et eventuellement les
|
||||
// CommonPoints a partir des donnees calculees dans
|
||||
// ComputeData.
|
||||
//purpose : Calculates the surface of curves and eventually
|
||||
// CommonPoints from the data calculated in ComputeData.
|
||||
//
|
||||
// 11/08/1996 : Utilisation de F(t)
|
||||
// 11/08/1996 : Use of F(t)
|
||||
//
|
||||
//=======================================================================
|
||||
|
||||
@@ -543,7 +542,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
|
||||
//=======================================================================
|
||||
//function : CompleteData
|
||||
//purpose : Nouvelle surcharge pour les fonctions surf/rst
|
||||
//purpose : New overload for functions surf/rst
|
||||
// jlr le 28/07/97 branchement F(t)
|
||||
//=======================================================================
|
||||
|
||||
@@ -566,7 +565,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
myConti);
|
||||
if (!approx.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Approximation non faite !!!" << endl;
|
||||
cout << "Approximation is not done!" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -581,7 +580,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
|
||||
//=======================================================================
|
||||
//function : CompleteData
|
||||
//purpose : Nouvelle surcharge pour les fonctions rst/rst
|
||||
//purpose : New overload for functions rst/rst
|
||||
// jlr le 28/07/97 branchement F(t)
|
||||
//=======================================================================
|
||||
|
||||
@@ -619,7 +618,7 @@ Standard_Boolean ChFi3d_Builder::CompleteData
|
||||
|
||||
//=======================================================================
|
||||
//function : StoreData
|
||||
//purpose : Recopie d un resultat d approx dans une SurfData.
|
||||
//purpose : Copy of an approximation result in SurfData.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
@@ -634,7 +633,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
const Standard_Boolean Gf2,
|
||||
const Standard_Boolean Reversed)
|
||||
{
|
||||
// Petits outils pour les controles.
|
||||
// Small control tools.
|
||||
static Handle(GeomAdaptor_HCurve) checkcurve;
|
||||
if(checkcurve.IsNull()) checkcurve = new GeomAdaptor_HCurve();
|
||||
GeomAdaptor_Curve& chc = checkcurve->ChangeCurve();
|
||||
@@ -653,8 +652,8 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
}
|
||||
|
||||
TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS();
|
||||
// On rend l espace parametric de la surface carre a defaut de pouvoir
|
||||
// parametrer en U par # R*teta // a revoir lbo 29/08/97
|
||||
// By default parametric space is created using a square surface
|
||||
// to be able to parameterize in U by # R*teta // a revoir lbo 29/08/97
|
||||
const TColStd_Array1OfReal& ku = approx.SurfUKnots();
|
||||
const TColStd_Array1OfReal& kv = approx.SurfVKnots();
|
||||
Standard_Real larg = (kv(kv.Upper())-kv(kv.Lower()));
|
||||
@@ -665,7 +664,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
kku,kv,
|
||||
approx.SurfUMults(),approx.SurfVMults(),
|
||||
approx.UDegree(),approx.VDegree());
|
||||
// prolongement de la surface
|
||||
// extension of the surface
|
||||
|
||||
Standard_Real length1,length2;
|
||||
length1=Data->FirstExtensionValue();
|
||||
@@ -701,7 +700,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
Standard_Integer ion1 = 1, ion2 = 2;
|
||||
if(Reversed) { Uon1 = ULast; Uon2 = UFirst; ion1 = 2; ion2 = 1; }
|
||||
|
||||
// On remplit la SurfData pour ce qui concerne S1,
|
||||
// The SurfData is filled in what concerns S1,
|
||||
Handle(Geom_Curve) Crv3d1 = Surf->UIso(Uon1);
|
||||
gp_Pnt2d pori1(Uon1,0.);
|
||||
gp_Lin2d lfil1(pori1,gp::DY2d());
|
||||
@@ -718,7 +717,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
|
||||
if(!ChFi3d_CheckSameParameter(checkcurve,PCurveOnFace,S1,tolC1,tolcheck)){
|
||||
#ifdef DEB
|
||||
cout<<"tol approx sous evaluee : "<<tolC1<<" pour "<<tolcheck<<endl;
|
||||
cout<<"aaproximate tolerance under-valued : "<<tolC1<<" for "<<tolcheck<<endl;
|
||||
#endif
|
||||
tolC1 = tolcheck;
|
||||
}
|
||||
@@ -758,7 +757,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
else TraOn1 = ChFi3d_TrsfTrans(lin->TransitionOnS1());
|
||||
Fint1.SetInterference(Index1OfCurve,TraOn1,PCurveOnFace,PCurveOnSurf);
|
||||
|
||||
// on remplit la SurfData pour ce qui concerne S2,
|
||||
// SurfData is filled in what concerns S2,
|
||||
Handle(Geom_Curve) Crv3d2 = Surf->UIso(Uon2);
|
||||
gp_Pnt2d pori2(Uon2,0.);
|
||||
gp_Lin2d lfil2(pori2,gp::DY2d());
|
||||
@@ -771,7 +770,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
chc.Load(Crv3d2,par1,par2);
|
||||
if(!ChFi3d_CheckSameParameter(checkcurve,PCurveOnFace,S2,tolC2,tolcheck)){
|
||||
#ifdef DEB
|
||||
cout<<"tol approx sous evaluee : "<<tolC2<<" pour "<<tolcheck<<endl;
|
||||
cout<<"approximate tolerance under-evaluated : "<<tolC2<<" for "<<tolcheck<<endl;
|
||||
#endif
|
||||
tolC2 = tolcheck;
|
||||
}
|
||||
@@ -817,7 +816,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
(Index2OfCurve,TopAbs_FORWARD,bidpc,PCurveOnSurf);
|
||||
}
|
||||
|
||||
// on calcule l orientation du conge par rapport aux faces,
|
||||
// the orientation of the fillet in relation to the faces is evaluated,
|
||||
|
||||
Handle(Adaptor3d_HSurface) Sref = S1;
|
||||
PCurveOnFace = Fint1.PCurveOnFace();
|
||||
@@ -885,7 +884,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
if(!Gf2 && !S2.IsNull())
|
||||
ChFi3d_FilCommonPoint(lin->EndPointOnSecond(),lin->TransitionOnS2(),
|
||||
Standard_False, Data->ChangeVertex(0,ion2),tolC2);
|
||||
// Les parametres sur l ElSpine
|
||||
// Parameters on ElSpine
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
Data->FirstSpineParam(lin->Point(1).Parameter());
|
||||
Data->LastSpineParam(lin->Point(nbp).Parameter());
|
||||
@@ -896,8 +895,7 @@ Standard_Boolean ChFi3d_Builder::StoreData(Handle(ChFiDS_SurfData)& Data,
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeData
|
||||
//purpose : Chapeau du cheminement edge/face pour le contournement
|
||||
// d obstacle.
|
||||
//purpose : Head of the path edge/face for the bypass of obstacle.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
@@ -948,7 +946,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
#else
|
||||
Standard_Integer Nbpnt;
|
||||
#endif
|
||||
// on recadre la solution de depart a la demande.
|
||||
// the initial solution is reframed if necessary.
|
||||
math_Vector ParSol(1,3);
|
||||
Standard_Real NewFirst = PFirst;
|
||||
if(RecP || RecS || RecRst){
|
||||
@@ -956,7 +954,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
tolesp,TolGuide,RecRst,RecP,RecS,
|
||||
NewFirst,ParSol)){
|
||||
#ifdef DEB
|
||||
cout<<"ChFi3d_Builder::ComputeData : echec calcul first section"<<endl;
|
||||
cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -971,7 +969,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
|
||||
if (!TheWalk.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Cheminement non fait" << endl;
|
||||
cout << "Path not created" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -979,7 +977,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if (reverse) {
|
||||
if (!TheWalk.Complete(Func,FInv,FInvP,FInvC,SpLast)) {
|
||||
#ifdef DEB
|
||||
cout << "Complement non fait" << endl;
|
||||
cout << "Not completed" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -990,14 +988,14 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if (Nbpnt <= 1 && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"1 seul point de cheminement on essaye MS/50."<<endl;
|
||||
cout <<"one point of the path MS/50 is attempted."<<endl;
|
||||
#endif
|
||||
MS = MS/50.; Target = Targetsov;
|
||||
}
|
||||
else if (Nbpnt<=nbptmin && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
Standard_Real u1 = Lin->Point(1).Parameter();
|
||||
Standard_Real u2 = Lin->Point(Nbpnt).Parameter();
|
||||
@@ -1007,7 +1005,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
}
|
||||
else if(Nbpnt<=nbptmin){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1029,8 +1027,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeData
|
||||
//purpose : Chapeau du cheminement edge/edge pour le contournement
|
||||
// d obstacle.
|
||||
//purpose : Heading of the path edge/edge for the bypass of obstacle.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
@@ -1085,7 +1082,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
#else
|
||||
Standard_Integer Nbpnt;
|
||||
#endif
|
||||
// on recadre la solution de depart a la demande.
|
||||
// the initial solution is reframed if necessary.
|
||||
math_Vector ParSol(1,2);
|
||||
Standard_Real NewFirst = PFirst;
|
||||
if (RecP1 || RecRst1 || RecP2 || RecRst2) {
|
||||
@@ -1093,7 +1090,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
tolesp, TolGuide, RecRst1, RecP1, RecRst2, RecP2,
|
||||
NewFirst, ParSol)){
|
||||
#ifdef DEB
|
||||
cout<<"ChFi3d_Builder::ComputeData : echec calcul first section"<<endl;
|
||||
cout<<"ChFi3d_Builder::ComputeData : fail calculation first section"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1108,7 +1105,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
|
||||
if (!TheWalk.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Cheminement non fait" << endl;
|
||||
cout << "Path not done" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1116,7 +1113,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if (reverse) {
|
||||
if (!TheWalk.Complete(Func, FInv1, FInvP1, FInv2, FInvP2, SpLast)) {
|
||||
#ifdef DEB
|
||||
cout << "Complement non fait" << endl;
|
||||
cout << "Not completed" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1127,14 +1124,14 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if (Nbpnt <= 1 && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"1 seul point de cheminement on essaye MS/50."<<endl;
|
||||
cout <<"one point of path MS/50 is attempted."<<endl;
|
||||
#endif
|
||||
MS = MS/50.; Target = Targetsov;
|
||||
}
|
||||
else if (Nbpnt<=nbptmin && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
Standard_Real u1 = Lin->Point(1).Parameter();
|
||||
Standard_Real u2 = Lin->Point(Nbpnt).Parameter();
|
||||
@@ -1143,7 +1140,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
}
|
||||
else if(Nbpnt<=nbptmin){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1171,8 +1168,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
|
||||
//=======================================================================
|
||||
//function : SimulData
|
||||
//purpose : Chapeau du cheminement edge/face pour le contournement
|
||||
// d obstacle en mode simulation.
|
||||
//purpose : Heading of the path edge/face for the bypass of obstacle in simulation mode.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::SimulData
|
||||
@@ -1220,7 +1216,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
#else
|
||||
Standard_Integer Nbpnt;
|
||||
#endif
|
||||
// on recadre la solution de depart a la demande.
|
||||
// the starting solution is reframed if needed.
|
||||
math_Vector ParSol(1,3);
|
||||
Standard_Real NewFirst = PFirst;
|
||||
if(RecP || RecS || RecRst){
|
||||
@@ -1229,7 +1225,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
NewFirst,ParSol)){
|
||||
#ifdef DEB
|
||||
|
||||
cout<<"ChFi3d_Builder::SimulData : echec calcul first section"<<endl;
|
||||
cout<<"ChFi3d_Builder::SimulData : fail calculate first section"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1243,14 +1239,14 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
MS,TolGuide,ParSol,tolesp,Fleche,Appro);
|
||||
if (!TheWalk.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Cheminement non fait" << endl;
|
||||
cout << "Path not done" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
if (reverse) {
|
||||
if (!TheWalk.Complete(Func,FInv,FInvP,FInvC,SpLast)) {
|
||||
#ifdef DEB
|
||||
cout << "Complement non fait" << endl;
|
||||
cout << "Not completed" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1259,14 +1255,14 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
if (Nbpnt <= 1 && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"1 seul point de cheminement on essaye MS/50."<<endl;
|
||||
cout <<"one point of path MS/50 is attempted."<<endl;
|
||||
#endif
|
||||
MS = MS/50.; Target = Targetsov;
|
||||
}
|
||||
else if (Nbpnt <= NbSecMin && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
Standard_Real u1 = Lin->Point(1).Parameter();
|
||||
Standard_Real u2 = Lin->Point(Nbpnt).Parameter();
|
||||
@@ -1275,7 +1271,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
}
|
||||
else if(Nbpnt<=NbSecMin){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1297,8 +1293,8 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
|
||||
//=======================================================================
|
||||
//function : SimulData
|
||||
//purpose : Chapeau du cheminement edge/edge pour le contournement
|
||||
// d obstacle en mode simulation.
|
||||
//purpose : Heading of path edge/edge for the bypass
|
||||
// of obstacle in simulation mode.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::SimulData
|
||||
@@ -1350,7 +1346,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
#else
|
||||
Standard_Integer Nbpnt;
|
||||
#endif
|
||||
// on recadre la solution de depart a la demande.
|
||||
// The initial solution is reframed if necessary.
|
||||
math_Vector ParSol(1,2);
|
||||
Standard_Real NewFirst = PFirst;
|
||||
if (RecP1 || RecRst1 || RecP2 || RecRst2) {
|
||||
@@ -1359,7 +1355,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
NewFirst,ParSol)){
|
||||
#ifdef DEB
|
||||
|
||||
cout<<"ChFi3d_Builder::SimulData : echec calcul first section"<<endl;
|
||||
cout<<"ChFi3d_Builder::SimulData : calculation fail first section"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1373,14 +1369,14 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
MS, TolGuide, ParSol, tolesp, Fleche, Appro);
|
||||
if (!TheWalk.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Cheminement non fait" << endl;
|
||||
cout << "Path not created" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
if (reverse) {
|
||||
if (!TheWalk.Complete(Func, FInv1, FInvP1, FInv2, FInvP2, SpLast)) {
|
||||
#ifdef DEB
|
||||
cout << "Complement non fait" << endl;
|
||||
cout << "Not completed" << endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1389,14 +1385,14 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
if (Nbpnt <= 1 && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"1 seul point de cheminement on essaye MS/50."<<endl;
|
||||
cout <<"only one point of path MS/50 is attempted."<<endl;
|
||||
#endif
|
||||
MS = MS/50.; Target = Targetsov;
|
||||
}
|
||||
else if (Nbpnt <= NbSecMin && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
Standard_Real u1 = Lin->Point(1).Parameter();
|
||||
Standard_Real u2 = Lin->Point(Nbpnt).Parameter();
|
||||
@@ -1405,7 +1401,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
}
|
||||
else if(Nbpnt<=NbSecMin){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1435,7 +1431,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeData
|
||||
//purpose : Construction d un conge elementaire par cheminement.
|
||||
//purpose : Construction of elementary fillet by path.
|
||||
//
|
||||
//=======================================================================
|
||||
|
||||
@@ -1469,27 +1465,27 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
const Standard_Boolean RecOnS1,
|
||||
const Standard_Boolean RecOnS2)
|
||||
{
|
||||
//Les prolongements en cas de sortie des deux domaines sont faits
|
||||
//de facon directe et non plus par cheminement ( trop hasardeux ).
|
||||
//The extrensions are created in case of output of two domains
|
||||
//directly and not by path ( too hasardous ).
|
||||
Data->FirstExtensionValue(0);
|
||||
Data-> LastExtensionValue(0);
|
||||
|
||||
//On recupere les faces eventuelles pour les tests de saut d edge.
|
||||
//The eventual faces are restored to test the jump of edge.
|
||||
TopoDS_Face F1, F2;
|
||||
Handle(BRepAdaptor_HSurface) HS = Handle(BRepAdaptor_HSurface)::DownCast(S1);
|
||||
if(!HS.IsNull()) F1 = HS->ChangeSurface().Face();
|
||||
HS = Handle(BRepAdaptor_HSurface)::DownCast(S2);
|
||||
if(!HS.IsNull()) F2 = HS->ChangeSurface().Face();
|
||||
|
||||
// Variables d'encadrement du cheminement
|
||||
// Path framing variables
|
||||
Standard_Real TolGuide=tolguide, TolEsp = tolesp;
|
||||
Standard_Integer nbptmin = 4;
|
||||
|
||||
BRepBlend_Walking TheWalk(S1,S2,I1,I2);
|
||||
|
||||
//Debut du carnage, on eteint les controles 2d du cheminement
|
||||
//qui s'accomodent mal des surfaces a parametrages non homogenes
|
||||
//en u et en v.
|
||||
//Start of removal, 2D path controls
|
||||
//that qui s'accomodent mal des surfaces a parametrages non homogenes
|
||||
//en u et en v are extinguished.
|
||||
TheWalk.Check2d(0);
|
||||
|
||||
Standard_Real MS = MaxStep;
|
||||
@@ -1497,9 +1493,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_Real SpFirst = HGuide->FirstParameter();
|
||||
Standard_Real SpLast = HGuide->LastParameter();
|
||||
|
||||
// Lorsque le point de depart est interne, on chemine
|
||||
// d abord a gauche afin de determiner le Last pour les
|
||||
// periodiques.
|
||||
// When the start point is inside, the path goes first to the left
|
||||
// to determine the Last for the periodicals.
|
||||
Standard_Boolean reverse = (!Forward || Inside);
|
||||
Standard_Real Target;
|
||||
if(reverse){
|
||||
@@ -1511,8 +1506,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if(!intl) Target = Last;
|
||||
}
|
||||
|
||||
// Dans le cas de singularite pre-determinee,
|
||||
// on en informe le cheminement
|
||||
// In case if the singularity is pre-determined,
|
||||
// the path is indicated.
|
||||
if (!Spine.IsNull()){
|
||||
if (Spine->IsTangencyExtremity(Standard_True)) {
|
||||
TopoDS_Vertex V = Spine->FirstVertex();
|
||||
@@ -1546,7 +1541,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
}
|
||||
}
|
||||
|
||||
//On recadre la solution de depart a la demande.
|
||||
//The starting solution is reframed if necessary.
|
||||
//**********************************************//
|
||||
math_Vector ParSol(1,4);
|
||||
Standard_Real NewFirst = PFirst;
|
||||
@@ -1555,7 +1550,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
tolesp,TolGuide,RecOnS1,RecOnS2,
|
||||
NewFirst,ParSol)){
|
||||
#ifdef DEB
|
||||
cout<<"ChFi3d_Builder::ComputeData : echec calcul first section"<<endl;
|
||||
cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1564,7 +1559,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
ParSol = Soldep;
|
||||
}
|
||||
|
||||
//On calcule d abord la partie valide, sans souci des prolongements.
|
||||
//First the valid part is calculate, without caring for the extensions.
|
||||
//******************************************************************//
|
||||
Standard_Integer again = 0;
|
||||
Standard_Boolean tchernobyl = 0;
|
||||
@@ -1574,15 +1569,15 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_Real u1sov, u2sov;
|
||||
#endif
|
||||
TopoDS_Face bif;
|
||||
//Un pas max coherent, mais grand, on compte sur la fleche pour detecter
|
||||
//les vrillages.
|
||||
//Max step is relevant, but too great, the vector is required to detect
|
||||
//the twists.
|
||||
if( (Abs(Last-First) <= MS * 5.) &&
|
||||
(Abs(Last-First) >= 0.01*Abs(NewFirst-Target)) ){
|
||||
MS = Abs(Last-First)*0.2;
|
||||
}
|
||||
|
||||
while(again < 3){
|
||||
//On chemine.
|
||||
//Path.
|
||||
if(!again && (MS < 5*TolGuide)) MS = 5*TolGuide;
|
||||
else {
|
||||
if (5*TolGuide > MS) TolGuide = MS/5;
|
||||
@@ -1592,7 +1587,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
ParSol,TolEsp,Fleche,Appro);
|
||||
if (!TheWalk.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Cheminement non fait" << endl;
|
||||
cout << "Path is not created" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1608,18 +1603,18 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if (Inside) complmnt = TheWalk.Complete(Func,FInv,SpLast);
|
||||
if(!complmnt){
|
||||
#ifdef DEB
|
||||
cout << "Complement non fait" << endl;
|
||||
cout << "Not completed" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
//On controle le resultat avec deux criteres :
|
||||
//- y a-t-il assez de points,
|
||||
//- est-on alle assez loin.
|
||||
//The result is controlled using two criterions :
|
||||
//- if there is enough points,
|
||||
//- if one has gone far enough.
|
||||
Nbpnt = Lin->NbPoints();
|
||||
if (Nbpnt == 0){
|
||||
#ifdef DEB
|
||||
cout <<"0 point de cheminement on sort."<<endl;
|
||||
cout <<"0 point of path, quit."<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1640,12 +1635,11 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
okfin = (narc1 > 0 || narc2 > 0 || (Last-lpointpar) < 10*TolGuide);
|
||||
}
|
||||
if(!okdeb || !okfin || Nbpnt == 1){
|
||||
//Ca frotte, on eteint les controles on espere evaluer un pas max
|
||||
//satisfaisant, et on serre les fesses!!!. Si c est deja fait on
|
||||
//sort.
|
||||
//It drags, the controls are extended, it is expected to evaluate a
|
||||
//satisfactory maximum step. If it already done, quit.
|
||||
if(tchernobyl){
|
||||
#ifdef DEB
|
||||
cout <<"Ca frotte meme sans controle, on sort."<<endl;
|
||||
cout <<"If it drags without control, quit."<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1653,14 +1647,14 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
TheWalk.Check(0);
|
||||
if (Nbpnt == 1){
|
||||
#ifdef DEB
|
||||
cout <<"1 seul point de cheminement on essaye MS/100"<<endl;
|
||||
cout <<"et on eteint les controles."<<endl;
|
||||
cout <<"only one point of path MS/100 is attempted"<<endl;
|
||||
cout <<"and the controls are extended."<<endl;
|
||||
#endif
|
||||
MS *= 0.01;
|
||||
}
|
||||
else{
|
||||
#ifdef DEB
|
||||
cout <<"Ca frotte on eteint les controles."<<endl;
|
||||
cout <<"It drags, the controls are extended."<<endl;
|
||||
#endif
|
||||
MS = (lpointpar-fpointpar)/Nbpnt; //EvalStep(Lin);
|
||||
}
|
||||
@@ -1668,7 +1662,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
else if (Nbpnt < nbptmin){
|
||||
if(again == 0){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
u1sov = fpointpar;
|
||||
u2sov = lpointpar;
|
||||
@@ -1678,13 +1672,13 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if(Abs(fpointpar-u1sov)>=TolGuide ||
|
||||
Abs(lpointpar-u2sov)>=TolGuide){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points encore insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is still too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
MS = (lpointpar - fpointpar) * factor;
|
||||
}
|
||||
else{
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -1699,20 +1693,20 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if(TheWalk.TwistOnS1()){
|
||||
Data->TwistOnS1(Standard_True);
|
||||
#ifdef DEB
|
||||
cout<<"Cheminement complet mais VRILLE sur S1"<<endl;
|
||||
cout<<"Path completed, but TWIST on S1"<<endl;
|
||||
#endif
|
||||
}
|
||||
if(TheWalk.TwistOnS2()){
|
||||
Data->TwistOnS2(Standard_True);
|
||||
#ifdef DEB
|
||||
cout<<"Cheminement complet mais VRILLE sur S2"<<endl;
|
||||
cout<<"Parh completed, but TWIST on S2"<<endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//Ici on a un resultat plus ou moins presentable mais qui recouvre
|
||||
//la zone minimum visee.
|
||||
//On attaque les prolongements.
|
||||
//Here there is a more or less presentable result
|
||||
//however it covers a the minimum zone.
|
||||
//The extensions are targeted.
|
||||
//*****************************//
|
||||
|
||||
Gd1 = Gd2 = Gf1 = Gf2 = Standard_False;
|
||||
@@ -1743,7 +1737,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_True, Data->ChangeVertexFirstOnS1(),tolesp);
|
||||
debarc1 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexFirstOnS1(),F1,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if there is not an obstacle.
|
||||
debcas1 = Standard_True;
|
||||
if(!Spine.IsNull()){
|
||||
if(Spine->IsPeriodic()){
|
||||
@@ -1761,7 +1755,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_True, Data->ChangeVertexFirstOnS2(),tolesp);
|
||||
debarc2 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexFirstOnS2(),F2,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if it is not an obstacle.
|
||||
debcas2 = Standard_True;
|
||||
if(!Spine.IsNull()){
|
||||
if(Spine->IsPeriodic()){
|
||||
@@ -1782,7 +1776,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if(oncontinue) {
|
||||
TheWalk.ClassificationOnS1(!debarc1);
|
||||
TheWalk.ClassificationOnS2(!debarc2);
|
||||
TheWalk.Check2d(Standard_True); // Il faut etre severe (PMN)
|
||||
TheWalk.Check2d(Standard_True); // It should be strict (PMN)
|
||||
TheWalk.Continu(Func,FInv,Target);
|
||||
TheWalk.ClassificationOnS1(Standard_True);
|
||||
TheWalk.ClassificationOnS2(Standard_True);
|
||||
@@ -1798,7 +1792,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_True, Data->ChangeVertexFirstOnS1(),tolesp);
|
||||
debarc1 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexFirstOnS1(),F1,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if it is not an obstacle.
|
||||
debcas1 = Standard_True;
|
||||
// if(!Spine.IsNull()) {
|
||||
// if(Spine->IsPeriodic()){
|
||||
@@ -1819,7 +1813,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_True, Data->ChangeVertexFirstOnS2(),tolesp);
|
||||
debarc2 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexFirstOnS2(),F2,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if it is not an obstacle.
|
||||
debcas2 = Standard_True;
|
||||
// if(!Spine.IsNull()){
|
||||
// if(Spine->IsPeriodic()){
|
||||
@@ -1854,7 +1848,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_False, Data->ChangeVertexLastOnS1(),tolesp);
|
||||
finarc1 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexLastOnS1(),F1,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if it is not an obstacle.
|
||||
fincas1 = Standard_True;
|
||||
if(!Spine.IsNull()){
|
||||
finobst1 = IsObst(Data->VertexLastOnS1(),
|
||||
@@ -1867,7 +1861,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_False, Data->ChangeVertexLastOnS2(),tolesp);
|
||||
finarc2 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexLastOnS2(),F2,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if it is not an obstacle.
|
||||
fincas2 = Standard_True;
|
||||
if(!Spine.IsNull()){
|
||||
finobst2 = IsObst(Data->VertexLastOnS2(),
|
||||
@@ -1883,7 +1877,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if(oncontinue){
|
||||
TheWalk.ClassificationOnS1(!finarc1);
|
||||
TheWalk.ClassificationOnS2(!finarc2);
|
||||
TheWalk.Check2d(Standard_True); // Il faut etre severe (PMN)
|
||||
TheWalk.Check2d(Standard_True); // It should be strict (PMN)
|
||||
TheWalk.Continu(Func,FInv,Target);
|
||||
TheWalk.ClassificationOnS1(Standard_True);
|
||||
TheWalk.ClassificationOnS2(Standard_True);
|
||||
@@ -1899,7 +1893,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Standard_False, Data->ChangeVertexLastOnS1(),tolesp);
|
||||
finarc1 = Standard_True;
|
||||
if(!SearchFace(Spine,Data->VertexLastOnS1(),F1,bif)){
|
||||
//On regarde si ce n'est pas un obstacle.
|
||||
//It is checked if it is not an obstacle.
|
||||
fincas1 = Standard_True;
|
||||
// if(!Spine.IsNull()){
|
||||
// finobst1 = IsObst(Data->VertexLastOnS1(),
|
||||
@@ -1948,8 +1942,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Gd1 = debcas1/* && !debobst1*/; // skv(occ67)
|
||||
Gd2 = debcas2/* && !debobst2*/; // skv(occ67)
|
||||
if ((debarc1^debarc2) && !unseulsuffitdeb && (First!=SpFirst)) {
|
||||
// Cas de cheminement incomplet, cela finit surement mal :
|
||||
// on tronque le resultat au lieu de sortie.
|
||||
// Case of incomplete path, of course this ends badly :
|
||||
// the result is truncated instead of exit.
|
||||
Standard_Real sortie;
|
||||
Standard_Integer ind;
|
||||
if (debarc1) sortie = Data->VertexFirstOnS1().Parameter();
|
||||
@@ -1989,7 +1983,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
|| backwContinueFailed; // eap
|
||||
else if (intf && unseulsuffitdeb && (intf<5)) {
|
||||
intf = (Gd1 || Gd2);
|
||||
// On controle qu'il n'y pas de nouvelle face.
|
||||
// It is checked if there is no new face.
|
||||
if (intf &&
|
||||
((!debcas1 && debarc1) || (!debcas2 && debarc2)) ) intf = 0;
|
||||
}
|
||||
@@ -2000,8 +1994,8 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
Gf1 = fincas1/* && !finobst1*/; // skv(occ67)
|
||||
Gf2 = fincas2/* && !finobst2*/; // skv(occ67)
|
||||
if ((finarc1 ^finarc2) && !unseulsuffitfin && (Last!=SpLast)) {
|
||||
// Cas de cheminement incomplet, cela finit surement mal :
|
||||
// on tronque le resultat au lieu de sortie.
|
||||
// Case of incomplete path, of course, this ends badly :
|
||||
// the result is truncated instead of exit.
|
||||
Standard_Real sortie;
|
||||
Standard_Integer ind;
|
||||
if (finarc1) sortie = Data->VertexLastOnS1().Parameter();
|
||||
@@ -2018,7 +2012,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
}
|
||||
}
|
||||
else if ((intl>=5) && !finarc1 && !finarc2 && (Last!=SpLast) ) {
|
||||
// Idem dans le cas ou toute la "Lin" constitue un prolongement
|
||||
// The same in case when the entire "Lin" is an extension
|
||||
Standard_Real sortie = (First+2*Last)/3;
|
||||
Standard_Integer ind;
|
||||
if (Last - sortie > tolesp) {
|
||||
@@ -2042,7 +2036,7 @@ Standard_Boolean ChFi3d_Builder::ComputeData
|
||||
if (intl && !unseulsuffitfin) intl = (Gf1 && Gf2)//;
|
||||
|| forwContinueFailed; // eap
|
||||
else if (intl && unseulsuffitfin && (intl<5)) {
|
||||
intl = (Gf1 || Gf2);// On controle qu'il n'y pas de nouvelle face.
|
||||
intl = (Gf1 || Gf2);// It is checked if there is no new face.
|
||||
if (intl &&
|
||||
((!fincas1 && finarc1) || (!fincas2 && finarc2)) ) intl = 0;
|
||||
}
|
||||
@@ -2111,7 +2105,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
tolesp,TolGuide,RecOnS1,RecOnS2,
|
||||
NewFirst,ParSol)){
|
||||
#ifdef DEB
|
||||
cout<<"ChFi3d_Builder::SimulData : echec calcul first section"<<endl;
|
||||
cout<<"ChFi3d_Builder::SimulData : calculation fail first section"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -2121,9 +2115,8 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
}
|
||||
Standard_Integer again = 0;
|
||||
while(again < 3){
|
||||
// Lorsque le point de depart est interne, on chemine
|
||||
// d abord a gauche afin de determiner le Last pour les
|
||||
// periodiques.
|
||||
// When the start point is inside, the path goes first to the left
|
||||
// to determine the Last for the periodicals.
|
||||
if(!again && (MS < 5*TolGuide)) MS = 5*TolGuide;
|
||||
else {
|
||||
if (5*TolGuide > MS) TolGuide = MS/5;
|
||||
@@ -2135,7 +2128,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
|
||||
if (!TheWalk.IsDone()) {
|
||||
#ifdef DEB
|
||||
cout << "Cheminement non fait" << endl;
|
||||
cout << "Path not created" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -2151,7 +2144,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
if (Inside) complmnt = TheWalk.Complete(Func,FInv,SpLast);
|
||||
if(!complmnt){
|
||||
#ifdef DEB
|
||||
cout << "Complement non fait" << endl;
|
||||
cout << "Not completed" << endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -2160,14 +2153,14 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
Standard_Real factor = 1./(NbSecMin + 1);
|
||||
if (Nbpnt == 0){
|
||||
#ifdef DEB
|
||||
cout <<"0 point de cheminement on sort."<<endl;
|
||||
cout <<"0 point of path, quit."<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
else if (Nbpnt == 1 && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"1 seul point de cheminement on essaye MS/100."<<endl;
|
||||
cout <<"only one point of path, MS/100 is attempted."<<endl;
|
||||
#endif
|
||||
MS *= 0.01; Target = Targetsov;
|
||||
u1sov = u2sov = Lin->Point(1).Parameter();
|
||||
@@ -2175,7 +2168,7 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
else if (Nbpnt< NbSecMin && again == 0) {
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
Standard_Real u1 = u1sov = Lin->Point(1).Parameter();
|
||||
Standard_Real u2 = u2sov = Lin->Point(Nbpnt).Parameter();
|
||||
@@ -2188,21 +2181,21 @@ Standard_Boolean ChFi3d_Builder::SimulData
|
||||
if(Abs(u1-u1sov)>=TolGuide || Abs(u2-u2sov)>=TolGuide){
|
||||
again++;
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points encore insuffisant on reduit le pas"<<endl;
|
||||
cout <<"Number of points is still too small, the step is reduced"<<endl;
|
||||
#endif
|
||||
MS /= 100;
|
||||
Target = Targetsov;
|
||||
}
|
||||
else{
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
else if(Nbpnt < NbSecMin){
|
||||
#ifdef DEB
|
||||
cout <<"Nombre de points toujours insuffisant on sort"<<endl;
|
||||
cout <<"Number of points is still too small, quit"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
|
@@ -159,9 +159,9 @@ static Standard_Real recadre(const Standard_Real p,
|
||||
|
||||
//=======================================================================
|
||||
//function : Update
|
||||
//purpose : Calcul de l intersection entre la face en bout et la ligne
|
||||
// de tangence pour mise a jour du CommonPoint et de son
|
||||
// parametre dans la FaceInterference.
|
||||
//purpose : Calculate the intersection of the face at the end of
|
||||
// the tangency line to update CommonPoint and its
|
||||
// parameter in FaceInterference.
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean Update(Handle(Adaptor3d_HSurface)& fb,
|
||||
@@ -215,9 +215,9 @@ static Standard_Boolean Update(Handle(Adaptor3d_HSurface)& fb,
|
||||
Standard_Real& wop)
|
||||
{
|
||||
IntCurveSurface_HInter Intersection;
|
||||
//verifier que dans les KPart les bornes de la ligne de tangence
|
||||
//sont deja en place a ce stade.
|
||||
//Modif de lvt : on recadre les cas periodiques surtout si on a rien trouve.
|
||||
//check if in KPart the limits of the tangency line
|
||||
//are already in place at this stage.
|
||||
//Modif lvt : the periodic cases are reframed, espercially if nothing was found.
|
||||
Standard_Real w,uf = ct->FirstParameter(),ul = ct->LastParameter();
|
||||
#ifndef DEB
|
||||
Standard_Real wbis = 0.;
|
||||
@@ -305,9 +305,9 @@ static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs,
|
||||
gp_Pnt2d& FprolUV,
|
||||
Standard_Real& c3dU)
|
||||
{
|
||||
// rajouter ici des criteres plus ou moins restrictifs pour
|
||||
// decider si on fait l intersection avec la face en bout
|
||||
// etendue ou si on aiguille sur bouchon.
|
||||
// add more or less restrictive criterions to
|
||||
// decide if the intersection is done with the face at
|
||||
// extended end or if the end is sharp.
|
||||
Standard_Real uf = FIop.FirstParameter();
|
||||
Standard_Real ul = FIop.LastParameter();
|
||||
Handle(GeomAdaptor_HCurve) Hc3df;
|
||||
@@ -330,9 +330,9 @@ static Standard_Boolean IntersUpdateOnSame(Handle(GeomAdaptor_HSurface)& HGs,
|
||||
|
||||
//=======================================================================
|
||||
//function : Update
|
||||
//purpose : Calcul de l extrema curveonsurf/curveonsurf pour privilegier
|
||||
// les valeurs concernant la trace on surf et la pcurve sur la
|
||||
// face en bout.
|
||||
//purpose : Calculate the extrema curveonsurf/curveonsurf to prefer
|
||||
// the values concerning the trace on surf and the pcurve on the
|
||||
// face at end.
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean Update(Handle(Adaptor3d_HSurface)& face,
|
||||
@@ -419,7 +419,7 @@ static void ChFi3d_ExtendSurface (Handle(Geom_Surface) & S ,
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeCurve2d
|
||||
//purpose : calcule le 2d de la courbe Ct sur la face Face
|
||||
//purpose : calculate the 2d of the curve Ct on face Face
|
||||
//=======================================================================
|
||||
|
||||
static void ComputeCurve2d (Handle(Geom_Curve )& Ct,
|
||||
@@ -514,20 +514,19 @@ Standard_Boolean ChFi3d_SelectStripe(ChFiDS_ListIteratorOfListOfStripe & It,
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PerformOneCorner
|
||||
//purpose : Calcul d un coin a trois aretes incidentes et un conge
|
||||
// incident.
|
||||
// 3 cas distincts : (22/07/94 seul le 1er est traite)
|
||||
//purpose : Calculate a corner with three edges and a fillet.
|
||||
// 3 separate case: (22/07/94 only 1st is implemented)
|
||||
//
|
||||
// - meme concavite sur les trois edges, intersection avec la
|
||||
// face en bout,
|
||||
// - concavite des 2 edges de sortie opposee a celle du conge,
|
||||
// si la face en bout s y prete, idem cas 1 sur face etendue,
|
||||
// sinon on fait un petit bouchon avec GeomFill,
|
||||
// - un seul edge de sortie de concavite opposee a celle du
|
||||
// conge et du troisieme edge, on relie le sommet au coin
|
||||
// dans le vide du conge et on bouche, soit en agrandissant
|
||||
// la face en bout si celle ci est plane et orthogonale a
|
||||
// l edge guide, soit par un bouchon type GeomFill.
|
||||
// - same concavity on three edges, intersection with the
|
||||
// face at end,
|
||||
// - concavity of 2 outgoing edges is opposite to the one of the fillet,
|
||||
// if the face at end is ready for that, the same in case 1 on extended face,
|
||||
// otherwise a small cap is done with GeomFill,
|
||||
// - only one outgoing edge has concavity opposed to the edge of the
|
||||
// fillet and the third edge, the top of the corner is reread
|
||||
// in the empty of the fillet and closed, either by extending the face
|
||||
// at end if it is plane and orthogonal to the
|
||||
// guiding edge, or by a cap of type GeomFill.
|
||||
//
|
||||
// <thePrepareOnSame> means that only needed thing is redefinition
|
||||
// of intersection pameter of OnSame-Stripe with <Arcprol>
|
||||
@@ -540,11 +539,11 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS();
|
||||
|
||||
#ifdef DEB
|
||||
OSD_Chronometer ch;// init perf pour PerformSetOfKPart
|
||||
OSD_Chronometer ch;// init perf for PerformSetOfKPart
|
||||
#endif
|
||||
// le sommet,
|
||||
// the top,
|
||||
const TopoDS_Vertex& Vtx = myVDataMap.FindKey(Index);
|
||||
// On recupere le conge concerne,
|
||||
// The fillet is returned,
|
||||
ChFiDS_ListIteratorOfListOfStripe StrIt;
|
||||
StrIt.Initialize(myVDataMap(Index));
|
||||
if ( ! ChFi3d_SelectStripe (StrIt, Vtx, thePrepareOnSame)) return;
|
||||
@@ -552,24 +551,24 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
const Handle(ChFiDS_Spine) spine = stripe->Spine();
|
||||
ChFiDS_SequenceOfSurfData& SeqFil =
|
||||
stripe->ChangeSetOfSurfData()->ChangeSequence();
|
||||
// la SurfData en cause et ses CommonPoints,
|
||||
// SurfData and its CommonPoints,
|
||||
Standard_Integer sens = 0;
|
||||
|
||||
// Choisit la bonne SurfData
|
||||
// Choose proper SurfData
|
||||
Standard_Integer num = ChFi3d_IndexOfSurfData(Vtx,stripe,sens);
|
||||
Standard_Boolean isfirst = (sens == 1);
|
||||
if (isfirst) {
|
||||
for (; num<SeqFil.Length() && (
|
||||
(SeqFil.Value(num)->IndexOfS1()==0) ||
|
||||
(SeqFil.Value(num)->IndexOfS2()==0) ); ) {
|
||||
SeqFil.Remove(num); // On elimine le surplus
|
||||
SeqFil.Remove(num); // The surplus is removed
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (; num>1 && (
|
||||
(SeqFil.Value(num)->IndexOfS1()==0) ||
|
||||
(SeqFil.Value(num)->IndexOfS2()==0) ); ) {
|
||||
SeqFil.Remove(num);// On elimine le surplus
|
||||
SeqFil.Remove(num);// The surplus is removed
|
||||
num--;
|
||||
}
|
||||
}
|
||||
@@ -577,10 +576,10 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Handle(ChFiDS_SurfData)& Fd = SeqFil.ChangeValue(num);
|
||||
ChFiDS_CommonPoint& CV1 = Fd->ChangeVertex(isfirst,1);
|
||||
ChFiDS_CommonPoint& CV2 = Fd->ChangeVertex(isfirst,2);
|
||||
//Pour evaluer la boule des nouveaux points.
|
||||
//To evaluate the new points.
|
||||
Bnd_Box box1,box2;
|
||||
|
||||
// On traite separement les cas bouchon des cas intersection.
|
||||
// The cases of cap and intersection are processed separately.
|
||||
// ----------------------------------------------------------
|
||||
ChFiDS_State stat;
|
||||
if (isfirst) stat = spine->FirstStatus();
|
||||
@@ -625,9 +624,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
if (!CV1.IsOnArc() && !CV2.IsOnArc())
|
||||
Standard_Failure::Raise("Corner OnSame : no point on arc");
|
||||
else if (CV1.IsOnArc() && CV2.IsOnArc()) {
|
||||
// on explore pour detromper les KPart qui seraient sortis
|
||||
// au diable.
|
||||
Standard_Boolean sur1 = 0, sur2 = 0;
|
||||
Standard_Boolean sur1 = 0, sur2 = 0;
|
||||
for(ex.Init(CV1.Arc(),TopAbs_VERTEX); ex.More(); ex.Next()) {
|
||||
if (Vtx.IsSame(ex.Current())) {
|
||||
sur1 = 1;
|
||||
@@ -654,7 +651,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Fad = TopoDS::Face(DStr.Shape(Fd->Index(IFadArc)));
|
||||
Fop = TopoDS::Face(DStr.Shape(Fd->Index(IFopArc)));
|
||||
TopTools_ListIteratorOfListOfShape It;
|
||||
// On recupere la face en bout sans controle de son unicite.
|
||||
// The face at end is returned without check of its unicity.
|
||||
for(It.Initialize(myEFMap(Arcpiv));It.More();It.Next()) {
|
||||
if (!Fad.IsSame(It.Value())) {
|
||||
Fv = TopoDS::Face(It.Value());
|
||||
@@ -662,7 +659,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
}
|
||||
}
|
||||
|
||||
// est-ce que la face en bout contient le Vertex ?
|
||||
// Does the face at bout contain the Vertex ?
|
||||
Standard_Boolean isinface = Standard_False;
|
||||
for (ex.Init(Fv,TopAbs_VERTEX); ex.More(); ex.Next()) {
|
||||
if (ex.Current().IsSame(Vtx)) {
|
||||
@@ -677,7 +674,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Fad = TopoDS::Face(DStr.Shape(Fd->Index(IFadArc)));
|
||||
Fop = TopoDS::Face(DStr.Shape(Fd->Index(IFopArc)));
|
||||
//TopTools_ListIteratorOfListOfShape It;
|
||||
// On recupere la face en bout sans controle de son unicite.
|
||||
// The face at end is returned without check of its unicity.
|
||||
for(It.Initialize(myEFMap(Arcpiv));It.More();It.Next()) {
|
||||
if (!Fad.IsSame(It.Value())) {
|
||||
Fv = TopoDS::Face(It.Value());
|
||||
@@ -687,13 +684,13 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
}
|
||||
|
||||
if (Fv.IsNull()) StdFail_NotDone::Raise
|
||||
("OneCorner : face en bout non trouvee");
|
||||
("OneCorner : face at end not found");
|
||||
|
||||
Fv.Orientation(TopAbs_FORWARD);
|
||||
Fad.Orientation(TopAbs_FORWARD);
|
||||
Fop.Orientation(TopAbs_FORWARD);
|
||||
|
||||
// On recupere de meme l edge qui sera a prolonger.
|
||||
// The edge that will be extended is returned.
|
||||
for(It.Initialize(myVEMap(Vtx));It.More() && Arcprol.IsNull();It.Next()) {
|
||||
if (!Arcpiv.IsSame(It.Value())) {
|
||||
for(ex.Init(Fv,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||
@@ -734,17 +731,16 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Bad.Initialize(Fad);
|
||||
Bop.Initialize(Fop);
|
||||
}
|
||||
//dans le cas OnSame on va devoir modifier le CommonPoint
|
||||
//dans le vide et son parametre dans la FaceInterference.
|
||||
//On les recupere donc tous deux dans des references
|
||||
//non const. Attention les modifs se font dans le dos
|
||||
//in case of OnSame it is necessary to modify the CommonPoint
|
||||
//in the empty and its parameter in the FaceInterference.
|
||||
//They are both returned in non const references. Attention the modifications are done behind
|
||||
//de CV1,CV2,Fi1,Fi2.
|
||||
ChFiDS_CommonPoint& CPopArc = Fd->ChangeVertex(isfirst,IFopArc);
|
||||
ChFiDS_FaceInterference& FiopArc = Fd->ChangeInterference(IFopArc);
|
||||
ChFiDS_CommonPoint& CPadArc = Fd->ChangeVertex(isfirst,IFadArc);
|
||||
ChFiDS_FaceInterference& FiadArc = Fd->ChangeInterference(IFadArc);
|
||||
//on initialise le parametre du vertex en l air a la valeur de son
|
||||
//copain d en face (point sur arc).
|
||||
//the parameter of the vertex in the air is initialiced with the value of
|
||||
//its opposite (point on arc).
|
||||
Standard_Real wop = Fd->ChangeInterference(IFadArc).Parameter(isfirst);
|
||||
Handle(Geom_Curve) c3df;
|
||||
Handle(GeomAdaptor_HSurface)
|
||||
@@ -855,7 +851,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Udeb = Cc->FirstParameter();
|
||||
Ufin = Cc->LastParameter();
|
||||
|
||||
// on determine si la courbe a une intersection avec l'arete de couture
|
||||
// determine if the curve has an intersection with edge of sewing
|
||||
|
||||
ChFi3d_Couture(Fv,couture,edgecouture);
|
||||
|
||||
@@ -947,9 +943,9 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
stripe->SetIndexPoint(ChFi3d_IndexPointInDS(CV2,DStr),isfirst,2);
|
||||
|
||||
if (!intcouture) {
|
||||
// il n'y a pas d'intersection avec l'arete de couture
|
||||
// on stocke la courbe Cc dans la stripe
|
||||
// le stockage dans la DS se fera par FILDS.
|
||||
// there is no intersection with the sewing edge
|
||||
// the curve Cc is stored in the stripe
|
||||
// the storage in the DS is not done by FILDS.
|
||||
|
||||
TopOpeBRepDS_Curve Tc(Cc,tolreached);
|
||||
ICurve = DStr.AddCurve(Tc);
|
||||
@@ -1136,11 +1132,11 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
stripe->SetParameters(isfirst,Udeb,Ufin);
|
||||
}
|
||||
else {
|
||||
// on stocke les courbes curv1 et curv2 dans la DS
|
||||
// ces courbes ne seront pas reconstruites par FILDS car
|
||||
// on met stripe->InDS(isfirst);
|
||||
// curves curv1 are curv2 stored in the DS
|
||||
// these curves will not be reconstructed by FILDS as
|
||||
// one places stripe->InDS(isfirst);
|
||||
|
||||
// interferences de curv1 et curv2 sur Fv
|
||||
// interferences of curv1 and curv2 on Fv
|
||||
ComputeCurve2d(curv1,Fv,c2d1);
|
||||
Handle(TopOpeBRepDS_SurfaceCurveInterference) InterFv;
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv1,IShape,c2d1,Et);
|
||||
@@ -1148,7 +1144,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
ComputeCurve2d(curv2,Fv,c2d2);
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv2,IShape,c2d2,Et);
|
||||
DStr.ChangeShapeInterferences(IShape).Append(InterFv);
|
||||
// interferences de curv1 et curv2 sur Isurf
|
||||
// interferences of curv1 and curv2 on Isurf
|
||||
if (Fd->Orientation()== Fv.Orientation()) Et=TopAbs::Reverse(Et);
|
||||
c2d1=new Geom2d_TrimmedCurve(Ps,Udeb,par2);
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv1,Isurf,c2d1,Et);
|
||||
@@ -1157,7 +1153,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv2,Isurf,c2d2,Et);
|
||||
DStr.ChangeSurfaceInterferences(Isurf).Append(InterFv);
|
||||
|
||||
// limitation de l'arete de couture
|
||||
// limitation of the sewing edge
|
||||
Standard_Integer Iarc=DStr.AddShape(edgecouture);
|
||||
Handle(TopOpeBRepDS_CurvePointInterference) Interfedge;
|
||||
TopAbs_Orientation ori;
|
||||
@@ -1172,7 +1168,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Interfedge = ChFi3d_FilPointInDS(ori,Iarc,indpt,par1);
|
||||
DStr.ChangeShapeInterferences(Iarc).Append(Interfedge);
|
||||
|
||||
// creation des CurveInterferences de Icurv1 et Icurv2
|
||||
// creation of CurveInterferences from Icurv1 and Icurv2
|
||||
stripe->InDS(isfirst);
|
||||
Standard_Integer ind1= stripe->IndexPoint(isfirst,1);
|
||||
Standard_Integer ind2= stripe->IndexPoint(isfirst,2);
|
||||
@@ -1192,14 +1188,14 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
|
||||
if (onsame && inters) {
|
||||
// VARIANT 1:
|
||||
// On rajoute le petit bout de courbe qui manque pour l extension
|
||||
// de la face en bout et la limitation de la face opposee.
|
||||
// A small missing end of curve is added for the extension
|
||||
// of the face at end and the limitation of the opposing face.
|
||||
|
||||
// VARIANT 2 : extend Arcprol, not create new small edge
|
||||
// To do: modify for intcouture
|
||||
const Standard_Boolean variant1 = Standard_True;
|
||||
|
||||
// Tout d abord on coupe les ponts avec l arete de la spine.
|
||||
// First of all the ponts are cut with the edge of the spine.
|
||||
Standard_Integer IArcspine = DStr.AddShape(Arcspine);
|
||||
Standard_Integer IVtx = DStr.AddShape(Vtx);
|
||||
#ifndef DEB
|
||||
@@ -1220,7 +1216,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
interfv = ChFi3d_FilVertexInDS(OVtx,IArcspine,IVtx,parVtx);
|
||||
DStr.ChangeShapeInterferences(IArcspine).Append(interfv);
|
||||
|
||||
// On construit maintenant les courbes qui manquent.
|
||||
// Now the missing curves are constructed.
|
||||
TopoDS_Vertex V2;
|
||||
for(ex.Init(Arcprol.Oriented(TopAbs_FORWARD),TopAbs_VERTEX);
|
||||
ex.More(); ex.Next()) {
|
||||
@@ -1267,8 +1263,8 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
TopOpeBRepDS_Curve Zob(zob3d,tolreached);
|
||||
Standard_Integer IZob = DStr.AddCurve(Zob);
|
||||
|
||||
// on determine si Fop a une arete de couture
|
||||
// on determine si la courbe a une intersection avec l'arete de couture
|
||||
// it is determined if Fop has an edge of sewing
|
||||
// it is determined if the curve has an intersection with the edge of sewing
|
||||
|
||||
//TopoDS_Edge edgecouture;
|
||||
//Standard_Boolean couture;
|
||||
@@ -1299,7 +1295,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
}
|
||||
if (intcouture) {
|
||||
|
||||
// interference de curv1 et curv2 sur Ishape
|
||||
// interference of curv1 and curv2 on Ishape
|
||||
Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolv));
|
||||
ComputeCurve2d(curv1,Fop,c2d1);
|
||||
Handle(TopOpeBRepDS_SurfaceCurveInterference)
|
||||
@@ -1309,7 +1305,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv2,IShape,/*zob2dv*/c2d2,Et);
|
||||
DStr.ChangeShapeInterferences(IShape).Append(InterFv);
|
||||
|
||||
// limitation de l'arete de couture
|
||||
// limitation of the sewing edge
|
||||
Standard_Integer Iarc=DStr.AddShape(edgecouture);
|
||||
Handle(TopOpeBRepDS_CurvePointInterference) Interfedge;
|
||||
TopAbs_Orientation ori;
|
||||
@@ -1324,7 +1320,7 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
Interfedge = ChFi3d_FilPointInDS(ori,Iarc,indpt,par1);
|
||||
DStr.ChangeShapeInterferences(Iarc).Append(Interfedge);
|
||||
|
||||
// interference de curv1 et curv2 sur Iop
|
||||
// interference of curv1 and curv2 on Iop
|
||||
Standard_Integer Iop = DStr.AddShape(Fop);
|
||||
Et = TopAbs::Reverse(TopAbs::Compose(OVtx,OArcprolop));
|
||||
Handle(TopOpeBRepDS_SurfaceCurveInterference) Interfop;
|
||||
@@ -1397,8 +1393,8 @@ void ChFi3d_Builder::PerformOneCorner(const Standard_Integer Index,
|
||||
|
||||
//=======================================================================
|
||||
//function : cherche_face
|
||||
//purpose : recherche de la face F appartenant a la map , differente des faces
|
||||
// F1 F2 F3 et contenant l'edge E
|
||||
//purpose : find face F belonging to the map, different from faces
|
||||
// F1 F2 F3 and containing edge E
|
||||
//=======================================================================
|
||||
|
||||
static void cherche_face (const TopTools_ListOfShape & map,
|
||||
@@ -1429,7 +1425,7 @@ static void cherche_face (const TopTools_ListOfShape & map,
|
||||
|
||||
//=======================================================================
|
||||
//function : cherche_edge1
|
||||
//purpose : cherche l'edge commune entre les faces F1 et F2
|
||||
//purpose : find common edge between faces F1 and F2
|
||||
//=======================================================================
|
||||
|
||||
static void cherche_edge1 (const TopoDS_Face & F1,
|
||||
@@ -1459,7 +1455,7 @@ static void cherche_edge1 (const TopoDS_Face & F1,
|
||||
|
||||
//=======================================================================
|
||||
//function : containV
|
||||
//purpose : renvoie vrai si le vertex V appartient a F1
|
||||
//purpose : return true if vertex V belongs to F1
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean containV(const TopoDS_Face & F1,
|
||||
@@ -1483,7 +1479,7 @@ static Standard_Boolean containV(const TopoDS_Face & F1,
|
||||
|
||||
//=======================================================================
|
||||
//function : containE
|
||||
//purpose : renvoie vrai si le l'edge E appartient a F1
|
||||
//purpose : return true if edge E belongs to F1
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean containE(const TopoDS_Face & F1,
|
||||
@@ -1552,11 +1548,11 @@ static Standard_Boolean IsShrink(const Geom2dAdaptor_Curve PC,
|
||||
void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
{
|
||||
|
||||
//intersection en bout d'un conge avec au moins deux faces
|
||||
// traite les cas suivants:
|
||||
// - sommet a n (n>3) aretes adjacentes
|
||||
// - sommet a 3 aretes dont le conge sur une des aretes arrive sur plus
|
||||
// d'une face
|
||||
// intersection at end of fillet with at least two faces
|
||||
// process the following cases:
|
||||
// - top has n (n>3) adjacent edges
|
||||
// - top has 3 edges and fillet on one of edges touches
|
||||
// more than one face
|
||||
|
||||
#ifdef DEB
|
||||
OSD_Chronometer ch;// init perf
|
||||
@@ -1576,7 +1572,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
//Standard_Integer sense;
|
||||
TopoDS_Edge edgelibre1,edgelibre2,EdgeSpine;
|
||||
Standard_Boolean bordlibre;
|
||||
// determination du nombre de faces et d'aretes
|
||||
// determine the number of faces and edges
|
||||
TopTools_Array1OfShape tabedg(0,nn);
|
||||
TopoDS_Face F1,F2;
|
||||
Standard_Integer nface=ChFi3d_nbface(myVFMap(Vtx));
|
||||
@@ -1586,8 +1582,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
ChFi3d_ChercheBordsLibres(myVEMap,Vtx,bordlibre,edgelibre1,edgelibre2);
|
||||
if (bordlibre) nbarete=(nbarete-2)/2 +2;
|
||||
else nbarete=nbarete/2;
|
||||
// on determine s'il y a une arete de couture, l'arete de couture
|
||||
// et la face qui a une arete de couture
|
||||
// it is determined if there is an edge of sewing and it face
|
||||
|
||||
TopoDS_Face facecouture;
|
||||
TopoDS_Edge edgecouture;
|
||||
@@ -1599,7 +1594,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
if (couture)
|
||||
facecouture=fcur;
|
||||
}
|
||||
// on determine si l'une des aretes adjacente au conge est reguliere
|
||||
// it is determined if one of edges adjacent to the fillet is regular
|
||||
Standard_Boolean reg1,reg2;
|
||||
TopoDS_Edge Ecur,Eadj1,Eadj2;
|
||||
TopoDS_Face Fga,Fdr;
|
||||
@@ -1639,7 +1634,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
reg2=isTangentFaces(Eadj2,Fga,Fdr);
|
||||
// Modified by Sergey KHROMOV - Fri Dec 21 17:58:24 2001 End
|
||||
|
||||
// on cherche les deux faces communes a l'edge
|
||||
// two faces common to the edge are found
|
||||
if (reg1 || reg2) {
|
||||
Standard_Boolean compoint1=Standard_False;
|
||||
Standard_Boolean compoint2=Standard_False;
|
||||
@@ -1660,8 +1655,8 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
}
|
||||
// on a une seule face en bout si FindFace est vrai et si la face
|
||||
// n'est pas la face avec arete de couture
|
||||
// there is only one face at end if FindFace is true and if the face
|
||||
// is not the face with sewing edge
|
||||
TopoDS_Face face;
|
||||
Handle(ChFiDS_SurfData) Fd = SeqFil.ChangeValue(num);
|
||||
ChFiDS_CommonPoint& CV1 = Fd->ChangeVertex(isfirst,1);
|
||||
@@ -1699,7 +1694,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
SDprev = SeqFil(num1);
|
||||
IsurfPrev = SDprev->Surf();
|
||||
}
|
||||
// calcul de l' orientation orcourbe des courbes en bout
|
||||
// calculate the orientation of curves at end
|
||||
|
||||
Standard_Real tolpt=1.e-4;
|
||||
Standard_Real tolreached;
|
||||
@@ -1789,11 +1784,10 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
}
|
||||
|
||||
/***********************************************************************/
|
||||
// recherche des faces a intersecter avec le conge et des edges servant
|
||||
// a limiter ces intersections
|
||||
// nbface est le nb de faces a intersecter, Face[i] contient les faces
|
||||
// a intersecter (i=0.. nbface-1). Edge[i] contient les edges limitant
|
||||
// les intersections (i=0 ..nbface)
|
||||
// find faces intersecting with the fillet and edges limiting intersections
|
||||
// nbface is the nb of faces intersected, Face[i] contais the faces
|
||||
// to intersect (i=0.. nbface-1). Edge[i] contains edges limiting
|
||||
// the intersections (i=0 ..nbface)
|
||||
/**********************************************************************/
|
||||
|
||||
Standard_Integer nb = 1,nbface;
|
||||
@@ -1820,9 +1814,9 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
Edge[nbface]=CV2.Arc();
|
||||
tabedg.SetValue(0,Edge[0]);
|
||||
tabedg.SetValue(nbface,Edge[nbface]);
|
||||
// traitement d'un conge arrivant sur un vertex
|
||||
// l'edge contenue dans CV.Arc n'est pas forcement la bonne
|
||||
// on cherche l'edge concernee par l'intersection
|
||||
// processing of a fillet arriving on a vertex
|
||||
// edge contained in CV.Arc is not inevitably good
|
||||
// the edge concerned by the intersection is found
|
||||
|
||||
Standard_Real dist1,dist2;
|
||||
if (CV1.IsVertex()) {
|
||||
@@ -1885,8 +1879,8 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
if (!onecorner) {
|
||||
// Lorsqu'il y a une arete de regularite les faces adjacentes a l'edge
|
||||
// ne sont pas dans Fd->IndexOfS1 ou Fd->IndexOfS2
|
||||
// If there is a regular edge, the faces adjacent to it
|
||||
// are not in Fd->IndexOfS1 or Fd->IndexOfS2
|
||||
|
||||
// TopoDS_Face Find1 ,Find2;
|
||||
// if (isfirst)
|
||||
@@ -1902,9 +1896,9 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
// }
|
||||
// }
|
||||
|
||||
// si nface =3 on a un sommet a trois arete avec un conge incident
|
||||
// dont les commons points sont sur des faces differentes
|
||||
// sinon on est dans le cas d'un sommet a plus de 3 aretes
|
||||
// if nface =3 there is a top with 3 edges and a fillet
|
||||
// and their common points are on different faces
|
||||
// otherwise there is a case when a top has more than 3 edges
|
||||
|
||||
if (nface==3) {
|
||||
if (CV1.IsVertex ()) findonf1=Standard_True;
|
||||
@@ -1945,10 +1939,9 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
|
||||
// findonf1 findonf2 indiquent si F1 et ou F2 sont adajacentes
|
||||
// a plusieurs faces en bout
|
||||
// on determine ces faces en bout ainsi que les edges concernees par
|
||||
// les intersections
|
||||
// findonf1 findonf2 show if F1 and/or F2 are adjacent
|
||||
// to many faces at end
|
||||
// the faces at end and intersected edges are found
|
||||
|
||||
if (findonf1 && !isOnSame1) {
|
||||
if (CV1.TransitionOnArc()==TopAbs_FORWARD)
|
||||
@@ -1965,7 +1958,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
cherche_edge1(Face[nb-1],Face[nb],Edge[nb]);
|
||||
nb++;
|
||||
if (nb>=nn) Standard_Failure::Raise
|
||||
("IntersectionAtEnd : nb de faces limites atteint");
|
||||
("IntersectionAtEnd : the max number of faces reached");
|
||||
}
|
||||
if (!findonf2) Edge[nb]=CV2.Arc();
|
||||
}
|
||||
@@ -1987,7 +1980,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
cherche_edge1(Face[nb-1],Face[nb],Edge[nb]);
|
||||
nb++;
|
||||
if (nb>=nn) Standard_Failure::Raise
|
||||
("IntersectionAtEnd : nb de faces limites atteint");
|
||||
("IntersectionAtEnd : the max number of faces reached");
|
||||
}
|
||||
Edge[nb]=CV2.Arc();
|
||||
}
|
||||
@@ -2001,8 +1994,8 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
|
||||
else {
|
||||
|
||||
// on est dans le cas d'un sommet a plus de trois aretes
|
||||
// on determine les faces et les aretes concernees
|
||||
// this is the case when a top has more than three edges
|
||||
// the faces and edges concerned are found
|
||||
Standard_Boolean /*trouve,*/possible1, possible2;
|
||||
trouve = possible1 = possible2 = Standard_False;
|
||||
TopExp_Explorer ex;
|
||||
@@ -2034,7 +2027,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
return;
|
||||
}
|
||||
if (nbarete==4) {
|
||||
// si deux edges consecutives sont G1 on a une seule face d'intersection
|
||||
// if two consecutive edges are G1 there is only one face of intersection
|
||||
Standard_Real ang1=0.0;
|
||||
TopoDS_Vertex Vcom;
|
||||
trouve=Standard_False;
|
||||
@@ -2106,8 +2099,8 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
Standard_Boolean extend=Standard_False;
|
||||
Handle(Geom_Surface) Sfacemoins1,Sface;
|
||||
/***************************************************************************/
|
||||
// calcul de l'intersection entre le conge et chaque face
|
||||
// et stockage dans la DS
|
||||
// calculate intersection of the fillet and each face
|
||||
// and storage in the DS
|
||||
/***************************************************************************/
|
||||
for (nb=1;nb<=nbface;nb++) {
|
||||
prolface[nb-1]=0;
|
||||
@@ -2137,10 +2130,10 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
Handle(Geom_Curve) cint;
|
||||
Handle(Geom2d_Curve) C2dint1, C2dint2,cface,cfacemoins1;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// determination des intersections entre les edges et le conge
|
||||
// pour trouver les limitations des intersections face - conge
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////
|
||||
// determine intersections of edges and the fillet
|
||||
// to find limitations of intersections face - fillet
|
||||
///////////////////////////////////////////////////////
|
||||
|
||||
if (nb==1) {
|
||||
Hc1 = BRep_Tool::CurveOnSurface(Edge[0],Face[0],Ubid,Ubid);
|
||||
@@ -2174,7 +2167,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
}
|
||||
else {
|
||||
if (Hc1.IsNull()) {
|
||||
// on a pas trouve de courbe 2d . On etend Sfacemoins1 et on y projette
|
||||
// curve 2d not found. Sfacemoins1 is extended and projection is done there
|
||||
// CV1.Point ()
|
||||
ChFi3d_ExtendSurface(Sfacemoins1,prolface[0]);
|
||||
if (prolface[0]) {
|
||||
@@ -2337,8 +2330,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
else {
|
||||
Hc2 = BRep_Tool::CurveOnSurface(E2,Face[nbface-1],Ubid,Ubid);
|
||||
if (Hc2.IsNull()) {
|
||||
// on a pas trouve de courbe 2d , on etend Sfacemoins1
|
||||
// on y projette CV2.Point()
|
||||
// curve 2d is not found, Sfacemoins1 is extended CV2.Point() is projected there
|
||||
|
||||
ChFi3d_ExtendSurface(Sfacemoins1,prolface[0]);
|
||||
if (prolface[0]) {
|
||||
@@ -2403,8 +2395,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
if (prolface[nb-1]) Bs.Initialize(faceprol[nb-1]);
|
||||
else Bs.Initialize(Face[nb-1]);
|
||||
|
||||
// decalage des parametres s'ils ne sont pas dans
|
||||
// la meme periode
|
||||
// offset of parameters if they are not in the same period
|
||||
|
||||
// commented by eap 30 May 2002 occ354
|
||||
// the following code may cause trimming a wrong part of periodic surface
|
||||
@@ -2466,7 +2457,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// calcul des intersections face - conge
|
||||
// calculate intersections face - fillet
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (!ChFi3d_ComputeCurves(HGs,HBs,Pardeb,Parfin,Cc,
|
||||
@@ -2474,9 +2465,9 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
PerformMoreThreeCorner (Index,1);
|
||||
return;
|
||||
}
|
||||
// stockage des informations dans la structure de donnees
|
||||
// storage of information in the data structure
|
||||
|
||||
// eval tolerances
|
||||
// evaluate tolerances
|
||||
p1=Cc->FirstParameter();
|
||||
p2=Cc->LastParameter();
|
||||
Standard_Real to1,to2;
|
||||
@@ -2499,7 +2490,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// stokage dans la DS de la courbe d'intersection
|
||||
// storage in the DS of the intersection curve
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
Standard_Boolean Isvtx1=0;
|
||||
@@ -2547,7 +2538,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
DStr.ChangeCurveInterferences(indcurve[nb-1]).Append(Interfp2);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// stockage pour la face
|
||||
// storage for the face
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef DEB
|
||||
@@ -2558,7 +2549,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
orface=Face[nb-1].Orientation();
|
||||
if (orface==orsurfdata ) orien = TopAbs::Reverse(orcourbe);
|
||||
else orien = orcourbe ;
|
||||
// limitation des edges des faces
|
||||
// limitation of edges of faces
|
||||
if (nb==1) {
|
||||
Standard_Integer Iarc1= DStr.AddShape(Edge[0]);
|
||||
Interfedge[0]= ChFi3d_FilPointInDS(CV1.TransitionOnArc(),Iarc1,
|
||||
@@ -2954,8 +2945,7 @@ void ChFi3d_Builder::PerformIntersectionAtEnd(const Standard_Integer Index)
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformMoreSurfdata
|
||||
//purpose : determine les intersections en bout sur plusieurs
|
||||
// surfdata
|
||||
//purpose : determine intersections at end on several surfdata
|
||||
//=======================================================================
|
||||
void ChFi3d_Builder::PerformMoreSurfdata(const Standard_Integer Index)
|
||||
{
|
||||
@@ -3593,10 +3583,10 @@ void ChFi3d_Builder::PerformMoreSurfdata(const Standard_Integer Index)
|
||||
}
|
||||
// Modified by Sergey KHROMOV - Thu Apr 11 12:23:40 2002 End
|
||||
|
||||
//=======================================================================
|
||||
//==============================================================
|
||||
//function : FindFace
|
||||
//purpose : attention ne marche que si une seule face en commun entre
|
||||
// P1,P2,V
|
||||
//purpose : attention it works only if there is only one common face
|
||||
// between P1,P2,V
|
||||
//===========================================================
|
||||
|
||||
|
||||
@@ -3617,7 +3607,7 @@ Standard_Boolean ChFi3d_Builder::FindFace(const TopoDS_Vertex& V,
|
||||
{
|
||||
if (P1.IsVertex() || P2.IsVertex()) {
|
||||
#ifdef DEB
|
||||
cout<<"changement de face sur vertex plantatoire"<<endl;
|
||||
cout<<"change of face on vertex"<<endl;
|
||||
#endif
|
||||
}
|
||||
if (!(P1.IsOnArc() && P2.IsOnArc())) {
|
||||
@@ -3643,7 +3633,7 @@ Standard_Boolean ChFi3d_Builder::FindFace(const TopoDS_Vertex& V,
|
||||
}
|
||||
#ifdef DEB
|
||||
if(!ContainsV){
|
||||
cout<<"FindFace : l extremite de la spine n est pas dans la face en bout"<<endl;
|
||||
cout<<"FindFace : the extremity of the spine is not in the end face"<<endl;
|
||||
}
|
||||
#endif
|
||||
return Found;
|
||||
@@ -3651,14 +3641,14 @@ Standard_Boolean ChFi3d_Builder::FindFace(const TopoDS_Vertex& V,
|
||||
|
||||
//=======================================================================
|
||||
//function : MoreSurfdata
|
||||
//purpose : detecte si l'intersection en bout concerne plusieurs Surfdata
|
||||
//purpose : detects if the intersection at end concerns several Surfdata
|
||||
//=======================================================================
|
||||
Standard_Boolean ChFi3d_Builder::MoreSurfdata(const Standard_Integer Index) const
|
||||
{
|
||||
// l'intersection en bout se fait sur plusieurs surfdata si :
|
||||
// -le nb de surfdata concernant le vertex est superieur a 1 .
|
||||
// -et si l'avant derniere surfdata a un de ses commonpoints sur un des
|
||||
// deux arcs qui constituent les intersections de la face en bout et du conge
|
||||
// intersection at end is created on several surfdata if :
|
||||
// - the number of surfdata concerning the vertex is more than 1.
|
||||
// - and if the last but one surfdata has one of commonpoints on one of
|
||||
// two arcs, which constitute the intersections of the face at end and of the fillet
|
||||
|
||||
ChFiDS_ListIteratorOfListOfStripe It;
|
||||
It.Initialize(myVDataMap(Index));
|
||||
@@ -3677,7 +3667,7 @@ Standard_Boolean ChFi3d_Builder::MoreSurfdata(const Standard_Integer Index) cons
|
||||
TopoDS_Face Fv;
|
||||
Standard_Boolean inters,oksurf;
|
||||
nbsurf= stripe->SetOfSurfData()->Length();
|
||||
// Fv est la face en bout
|
||||
// Fv is the face at end
|
||||
inters = FindFace(Vtx,CV1,CV2,Fv);
|
||||
if (sens==1) {
|
||||
num1=1;
|
||||
@@ -3692,7 +3682,7 @@ Standard_Boolean ChFi3d_Builder::MoreSurfdata(const Standard_Integer Index) cons
|
||||
|
||||
if (nbsurf!=1 && inters) {
|
||||
|
||||
// determination de arc1 et arc2 intersection du conge et de la face en bout
|
||||
// determination of arc1 and arc2 intersection of the fillet and the face at end
|
||||
|
||||
TopoDS_Edge arc1,arc2;
|
||||
TopTools_ListIteratorOfListOfShape ItE;
|
||||
@@ -3735,7 +3725,7 @@ Standard_Boolean ChFi3d_Builder::MoreSurfdata(const Standard_Integer Index) cons
|
||||
}
|
||||
|
||||
|
||||
//Cas des conges sur sommet a 4 aretes avec une aretes sur la meme geometrie que l'arete du conge
|
||||
//Case of fillets on top with 4 edges, one of them is on the same geometry as the edgeof the fillet
|
||||
|
||||
|
||||
void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
@@ -3745,33 +3735,33 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
#ifdef DEB
|
||||
OSD_Chronometer ch;// init perf pour PerformSetOfKPart
|
||||
#endif
|
||||
// On recupere le conge concerne,
|
||||
// The fillet is returned,
|
||||
ChFiDS_ListIteratorOfListOfStripe StrIt;
|
||||
StrIt.Initialize(myVDataMap(Index));
|
||||
Handle(ChFiDS_Stripe) stripe = StrIt.Value();
|
||||
const Handle(ChFiDS_Spine) spine = stripe->Spine();
|
||||
ChFiDS_SequenceOfSurfData& SeqFil =
|
||||
stripe->ChangeSetOfSurfData()->ChangeSequence();
|
||||
// le sommet,
|
||||
// the top,
|
||||
const TopoDS_Vertex& Vtx = myVDataMap.FindKey(Index);
|
||||
// la SurfData en cause et ses CommonPoints,
|
||||
// the SurfData concerned and its CommonPoints,
|
||||
Standard_Integer sens = 0;
|
||||
|
||||
// Choisit la bonne SurfData
|
||||
// Choose the proper SurfData
|
||||
Standard_Integer num = ChFi3d_IndexOfSurfData(Vtx,stripe,sens);
|
||||
Standard_Boolean isfirst = (sens == 1);
|
||||
if (isfirst) {
|
||||
for (; num<SeqFil.Length() && (
|
||||
(SeqFil.Value(num)->IndexOfS1()==0) ||
|
||||
(SeqFil.Value(num)->IndexOfS2()==0) ); ) {
|
||||
SeqFil.Remove(num); // On elimine le surplus
|
||||
SeqFil.Remove(num); // The surplus is removed
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (; num>1 && (
|
||||
(SeqFil.Value(num)->IndexOfS1()==0) ||
|
||||
(SeqFil.Value(num)->IndexOfS2()==0) ); ) {
|
||||
SeqFil.Remove(num);// On elimine le surplus
|
||||
SeqFil.Remove(num);// The surplus is removed
|
||||
num--;
|
||||
}
|
||||
}
|
||||
@@ -3779,10 +3769,10 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
Handle(ChFiDS_SurfData)& Fd = SeqFil.ChangeValue(num);
|
||||
ChFiDS_CommonPoint& CV1 = Fd->ChangeVertex(isfirst,1);
|
||||
ChFiDS_CommonPoint& CV2 = Fd->ChangeVertex(isfirst,2);
|
||||
//Pour evaluer la boule des nouveaux points.
|
||||
//To evaluate the cloud of new points.
|
||||
Bnd_Box box1,box2;
|
||||
|
||||
// On traite separement les cas bouchon des cas intersection.
|
||||
// The cases of cap are processed separately from intersection.
|
||||
// ----------------------------------------------------------
|
||||
|
||||
TopoDS_Face Fv,Fad,Fop,Fopbis;
|
||||
@@ -3824,8 +3814,6 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
if(!CV1.IsOnArc() && !CV2.IsOnArc())
|
||||
Standard_Failure::Raise("Corner intersmore : no point on arc");
|
||||
else if(CV1.IsOnArc() && CV2.IsOnArc()){
|
||||
// on explore pour detromper les KPart qui seraient sortis
|
||||
// au diable.
|
||||
Standard_Boolean sur1 = 0, sur2 = 0;
|
||||
for(ex.Init(CV1.Arc(),TopAbs_VERTEX); ex.More(); ex.Next()){
|
||||
if(Vtx.IsSame(ex.Current())) {
|
||||
@@ -3848,7 +3836,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
Fad = TopoDS::Face(DStr.Shape(Fd->Index(IFadArc)));
|
||||
Fop = TopoDS::Face(DStr.Shape(Fd->Index(IFopArc)));
|
||||
TopTools_ListIteratorOfListOfShape It;
|
||||
// On recupere la face en bout sans controle de son unicite.
|
||||
// The face at end is returned without control of its unicity.
|
||||
for(It.Initialize(myEFMap(Arcpiv));It.More();It.Next()) {
|
||||
if(!Fad.IsSame(It.Value())){
|
||||
Fv = TopoDS::Face(It.Value());
|
||||
@@ -3856,7 +3844,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
|
||||
// est-ce que la face en bout contient le Vertex ?
|
||||
// does the face at end contain the Vertex ?
|
||||
Standard_Boolean isinface = Standard_False;
|
||||
for (ex.Init(Fv,TopAbs_VERTEX); ex.More(); ex.Next()){
|
||||
if (ex.Current().IsSame(Vtx)) {
|
||||
@@ -3871,8 +3859,8 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
Fad = TopoDS::Face(DStr.Shape(Fd->Index(IFadArc)));
|
||||
Fop = TopoDS::Face(DStr.Shape(Fd->Index(IFopArc)));
|
||||
//TopTools_ListIteratorOfListOfShape It;
|
||||
// On recupere la face en bout sans controle de son unicite.
|
||||
for(It.Initialize(myEFMap(Arcpiv));It.More();It.Next()) {
|
||||
// The face at end is returned without control of its unicity.
|
||||
for(It.Initialize(myEFMap(Arcpiv));It.More();It.Next()) {
|
||||
if(!Fad.IsSame(It.Value())){
|
||||
Fv = TopoDS::Face(It.Value());
|
||||
break;
|
||||
@@ -3881,12 +3869,12 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
}
|
||||
|
||||
if(Fv.IsNull()) StdFail_NotDone::Raise
|
||||
("OneCorner : face en bout non trouvee");
|
||||
("OneCorner : face at end is not found");
|
||||
|
||||
Fv.Orientation(TopAbs_FORWARD);
|
||||
Fad.Orientation(TopAbs_FORWARD);
|
||||
|
||||
// On recupere de meme l edge qui sera a prolonger.
|
||||
// In the same way the edge to be extended is returned.
|
||||
for(It.Initialize(myVEMap(Vtx));It.More() && Arcprol.IsNull();It.Next()){
|
||||
if(!Arcpiv.IsSame(It.Value())){
|
||||
for(ex.Init(Fv,TopAbs_EDGE); ex.More(); ex.Next()){
|
||||
@@ -3899,16 +3887,16 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
|
||||
//Fopbis est la face contenant la trace du conge dont le CP.Arc() ne contient pas Vtx.
|
||||
//Normalement soit Fobis est la meme que Fop (cylindre), soit Fobis est G1 avec Fop.
|
||||
//Fopbis is the face containing the trace of fillet CP.Arc() which of does not contain Vtx.
|
||||
//Normallly Fobis is either the same as Fop (cylinder), or Fobis is G1 with Fop.
|
||||
Fopbis.Orientation(TopAbs_FORWARD);
|
||||
|
||||
//on appelle Fop la 4eme face inutilisee du vertex
|
||||
//Fop calls the 4th face non-used for the vertex
|
||||
cherche_face(myVFMap(Vtx),Arcprol,Fad,Fv,Fv,Fopbis);
|
||||
Fop.Orientation(TopAbs_FORWARD);
|
||||
|
||||
if(Arcprol.IsNull()) StdFail_NotDone::Raise
|
||||
("OneCorner : edge a prolonger non trouve");
|
||||
("OneCorner : edge to be extended is not found");
|
||||
for(ex.Init(Fopbis,TopAbs_EDGE); ex.More(); ex.Next()){
|
||||
if(Arcprol.IsSame(ex.Current())) {
|
||||
OArcprolop = ex.Current().Orientation();
|
||||
@@ -3932,17 +3920,17 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
Bad.Initialize(Fad);
|
||||
Bop.Initialize(Fop);
|
||||
}
|
||||
// on va devoir modifier le CommonPoint
|
||||
//dans le vide et son parametre dans la FaceInterference.
|
||||
//On les recupere donc tous deux dans des references
|
||||
//non const. Attention les modifs se font dans le dos
|
||||
//de CV1,CV2,Fi1,Fi2.
|
||||
// it is necessary to modify the CommonPoint
|
||||
// in the space and its parameter in FaceInterference.
|
||||
// So both of them are returned in references
|
||||
// non const. Attention the modifications are done behind
|
||||
// CV1,CV2,Fi1,Fi2.
|
||||
ChFiDS_CommonPoint& CPopArc = Fd->ChangeVertex(isfirst,IFopArc);
|
||||
ChFiDS_FaceInterference& FiopArc = Fd->ChangeInterference(IFopArc);
|
||||
ChFiDS_CommonPoint& CPadArc = Fd->ChangeVertex(isfirst,IFadArc);
|
||||
ChFiDS_FaceInterference& FiadArc = Fd->ChangeInterference(IFadArc);
|
||||
//on initialise le parametre du vertex en l air a la valeur de son
|
||||
//copain d en face (point sur arc).
|
||||
// the parameter of the vertex is initialized with the value
|
||||
// of its opposing vertex (point on arc).
|
||||
Standard_Real wop = Fd->ChangeInterference(IFadArc).Parameter(isfirst);
|
||||
Handle(Geom_Curve) c3df;
|
||||
Handle(GeomAdaptor_HSurface)
|
||||
@@ -3950,9 +3938,9 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
gp_Pnt2d p2dbout;
|
||||
{
|
||||
|
||||
// rajouter ici des criteres plus ou moins restrictifs pour
|
||||
// decider si on fait l intersection avec la face en bout
|
||||
// etendue ou si on aiguille sur bouchon.
|
||||
// add here more or less restrictive criteria to
|
||||
// decide if the intersection with face is done at the
|
||||
// extended end or if there will be a cap on sharp end.
|
||||
c3df = DStr.Curve(FiopArc.LineIndex()).Curve();
|
||||
Standard_Real uf = FiopArc.FirstParameter();
|
||||
Standard_Real ul = FiopArc.LastParameter();
|
||||
@@ -3968,8 +3956,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
// if(!inters && BRep_Tool::Continuity(Arcprol,Fv,Fop) != GeomAbs_C0){
|
||||
if(!inters && isTangentFaces(Arcprol,Fv,Fop)){
|
||||
// Modified by Sergey KHROMOV - Fri Dec 21 18:08:29 2001 End
|
||||
// Arcprol etant une arete de tangence on tente un
|
||||
// ultime rattrappage par un extrema curve/curve.
|
||||
// Arcprol is an edge of tangency, ultimate adjustment by an extrema curve/curve is attempted.
|
||||
Standard_Real ff,ll;
|
||||
Handle(Geom2d_Curve) gpcprol = BRep_Tool::CurveOnSurface(Arcprol,Fv,ff,ll);
|
||||
Handle(Geom2dAdaptor_HCurve) pcprol = new Geom2dAdaptor_HCurve(gpcprol);
|
||||
@@ -4042,12 +4029,12 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
if (!ChFi3d_ComputeCurves(HGs,HBs,Pardeb,Parfin,Cc,
|
||||
Ps,
|
||||
Pc,tolesp,tol2d,tolreached))
|
||||
Standard_Failure::Raise("OneCorner : echec calcul intersection");
|
||||
Standard_Failure::Raise("OneCorner : failed calculation intersection");
|
||||
|
||||
Udeb = Cc->FirstParameter();
|
||||
Ufin = Cc->LastParameter();
|
||||
|
||||
// on determine si la courbe a une intersection avec l'arete de couture
|
||||
// check if the curve has an intersection with sewing edge
|
||||
|
||||
ChFi3d_Couture(Fv,couture,edgecouture);
|
||||
|
||||
@@ -4095,7 +4082,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
}
|
||||
|
||||
else{
|
||||
Standard_NotImplemented::Raise("OneCorner : bouchon non ecrit");
|
||||
Standard_NotImplemented::Raise("OneCorner : cap not written");
|
||||
}
|
||||
Standard_Integer IShape = DStr.AddShape(Fv);
|
||||
#ifndef DEB
|
||||
@@ -4140,9 +4127,9 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
stripe->SetIndexPoint(ChFi3d_IndexPointInDS(CV2,DStr),isfirst,2);
|
||||
|
||||
if (!intcouture) {
|
||||
// il n'y a pas d'intersection avec l'arete de couture
|
||||
// on stocke la courbe Cc dans la stripe
|
||||
// le stockage dans la DS se fera par FILDS.
|
||||
// there is no intersection with edge of sewing
|
||||
// curve Cc is stored in the stripe
|
||||
// the storage in the DS is done by FILDS.
|
||||
|
||||
TopOpeBRepDS_Curve Tc(Cc,tolreached);
|
||||
ICurve = DStr.AddCurve(Tc);
|
||||
@@ -4154,11 +4141,11 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
stripe->SetParameters(isfirst,Udeb,Ufin);
|
||||
}
|
||||
else {
|
||||
// on stocke les courbes curv1 et curv2 dans la DS
|
||||
// ces courbes ne seront pas reconstruites par FILDS car
|
||||
// on met stripe->InDS(isfirst);
|
||||
// curves curv1 and curv2 are stored in the DS
|
||||
// these curves are not reconstructed by FILDS as
|
||||
// stripe->InDS(isfirst) is placed;
|
||||
|
||||
// interferences de curv1 et curv2 sur Fv
|
||||
// interferences of curv1 and curv2 on Fv
|
||||
ComputeCurve2d(curv1,Fv,c2d1);
|
||||
Handle(TopOpeBRepDS_SurfaceCurveInterference) InterFv;
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv1,IShape,c2d1,Et);
|
||||
@@ -4166,7 +4153,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
ComputeCurve2d(curv2,Fv,c2d2);
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv2,IShape,c2d2,Et);
|
||||
DStr.ChangeShapeInterferences(IShape).Append(InterFv);
|
||||
// interferences de curv1 et curv2 sur Isurf
|
||||
// interferences of curv1 and curv2 on Isurf
|
||||
if (Fd->Orientation()== Fv.Orientation()) Et=TopAbs::Reverse(Et);
|
||||
c2d1=new Geom2d_TrimmedCurve(Ps,Udeb,par2);
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv1,Isurf,c2d1,Et);
|
||||
@@ -4175,7 +4162,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
InterFv = ChFi3d_FilCurveInDS(Icurv2,Isurf,c2d2,Et);
|
||||
DStr.ChangeSurfaceInterferences(Isurf).Append(InterFv);
|
||||
|
||||
// limitation de l'arete de couture
|
||||
// limitation of the sewing edge
|
||||
Standard_Integer Iarc=DStr.AddShape(edgecouture);
|
||||
Handle(TopOpeBRepDS_CurvePointInterference) Interfedge;
|
||||
TopAbs_Orientation ori;
|
||||
@@ -4190,7 +4177,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
Interfedge = ChFi3d_FilPointInDS(ori,Iarc,indpt,par1);
|
||||
DStr.ChangeShapeInterferences(Iarc).Append(Interfedge);
|
||||
|
||||
// creation des CurveInterferences de Icurv1 et Icurv2
|
||||
// creation of CurveInterferences from Icurv1 and Icurv2
|
||||
stripe->InDS(isfirst);
|
||||
Standard_Integer ind1= stripe->IndexPoint(isfirst,1);
|
||||
Standard_Integer ind2= stripe->IndexPoint(isfirst,2);
|
||||
@@ -4211,10 +4198,10 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
if( inters){
|
||||
//
|
||||
|
||||
// On rajoute le petit bout de courbe qui manque pour l extension
|
||||
// de la face en bout et la limitation de la face opposee.
|
||||
// The small end of curve missing for the extension
|
||||
// of the face at end and the limitation of the opposing face is added.
|
||||
|
||||
// Tout d abord on coupe les ponts avec l arete de la spine.
|
||||
// Above all the points cut the points with the edge of the spine.
|
||||
Standard_Integer IArcspine = DStr.AddShape(Arcspine);
|
||||
Standard_Integer IVtx = DStr.AddShape(Vtx);
|
||||
TopAbs_Orientation OVtx2;
|
||||
@@ -4237,7 +4224,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
DStr.ChangeShapeInterferences(IArcspine).Append(interfv);
|
||||
|
||||
|
||||
//Modif de lvt pour trouver la suite de Arcprol dans l'autre face
|
||||
//Modif of lvt to find the suite of Arcprol in the other face
|
||||
{
|
||||
TopTools_ListIteratorOfListOfShape It;
|
||||
for (It.Initialize(myVEMap(Vtx)); It.More(); It.Next()){
|
||||
@@ -4249,9 +4236,9 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
}
|
||||
//fin de modif
|
||||
//end of modif
|
||||
|
||||
// On construit maintenant les courbes qui manquent.
|
||||
//Now the missing curves are constructed.
|
||||
for(ex.Init(Arcprolbis.Oriented(TopAbs_FORWARD),TopAbs_VERTEX);
|
||||
ex.More(); ex.Next()){
|
||||
if(Vtx.IsSame(ex.Current())) {
|
||||
@@ -4266,7 +4253,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// on determine si Fop a une arete de couture
|
||||
// it is checked if Fop has a sewing edge
|
||||
|
||||
// TopoDS_Edge edgecouture;
|
||||
// Standard_Boolean couture;
|
||||
@@ -4325,7 +4312,7 @@ void ChFi3d_Builder::IntersectMoreCorner(const Standard_Integer Index)
|
||||
TopOpeBRepDS_Curve Zob(zob3d,tolreached);
|
||||
Standard_Integer IZob = DStr.AddCurve(Zob);
|
||||
|
||||
// on ne determine pas si la courbe a une intersection avec l'arete de couture
|
||||
// it is not determined if the curve has an intersection with the sewing edge
|
||||
|
||||
|
||||
{
|
||||
|
@@ -115,10 +115,9 @@ static void Reduce(const Standard_Real& p1,
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformTwoCornerbyInter
|
||||
//purpose : Effectue un PerformTwoCorner par intersection.
|
||||
// Dans le cas Biseau on utilise pour tous les cas le
|
||||
// cheminement biparam/biparam; on reapproxime alors la courbe
|
||||
// 3d et les 2 pcurves .
|
||||
//purpose : Performs PerformTwoCorner by intersection.
|
||||
// In case of Biseau for all cases the
|
||||
// path is used; 3D curve and 2 pcurves are approximated.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer Index)
|
||||
@@ -128,10 +127,10 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
const TopoDS_Vertex& Vtx = myVDataMap.FindKey(Index);
|
||||
TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS();
|
||||
|
||||
//On extrait les informations necessaires sur les conges
|
||||
//Information on fillets is extracted
|
||||
//------------------------------------------------------
|
||||
|
||||
//le premier
|
||||
//the first
|
||||
//----------
|
||||
ChFiDS_ListIteratorOfListOfStripe It;
|
||||
It.Initialize(myVDataMap(Index));
|
||||
@@ -143,7 +142,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Corner1->ChangeSetOfSurfData()->ChangeSequence();
|
||||
Handle(ChFiDS_SurfData)& Fd1 = SeqFil1.ChangeValue(IFd1);
|
||||
|
||||
//le deuxieme
|
||||
//the second
|
||||
//----------
|
||||
It.Next();
|
||||
Handle(ChFiDS_Stripe)& Corner2 = It.Value();
|
||||
@@ -158,10 +157,10 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Corner2->ChangeSetOfSurfData()->ChangeSequence();
|
||||
Handle(ChFiDS_SurfData)& Fd2 = SeqFil2.ChangeValue(IFd2);
|
||||
|
||||
// On analyse les concavites, dans le cas de concavites differentes,
|
||||
// prevoir un raccord evolutif du type ThreeCorner de R vers 0.
|
||||
// Sinon on recherche la face en vis a vis
|
||||
// et l intersection eventuelle des 2 pcurves sur cette face.
|
||||
// The concavities are analysed in case of differents concavities,
|
||||
// preview an evolutionary connection of type ThreeCorner of R to 0.
|
||||
// Otherwise the opposite face
|
||||
// and the eventual intersection of 2 pcurves on this face are found.
|
||||
|
||||
ChFiDS_State Stat1,Stat2;
|
||||
Standard_Boolean isfirst1 = (Sens1 == 1);
|
||||
@@ -187,8 +186,8 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
return done;
|
||||
}
|
||||
if (!OkinterCC) {
|
||||
// On calcule l'intersection des pcurves sans les restreindre par les
|
||||
// common point
|
||||
// The intersection of pcurves is calculated without restricting them by
|
||||
// common points.
|
||||
OkinterCC= ChFi3d_IsInFront(DStr,Corner1,Corner2,IFd1,IFd2,Sens1,Sens2,
|
||||
UIntPC1,UIntPC2,FaCo,SameSide,
|
||||
IFaCo1,IFaCo2,Okvisavis,Vtx,Standard_True,1);
|
||||
@@ -196,29 +195,29 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
|
||||
if (!Okvisavis) {
|
||||
#if DEB
|
||||
cout<<"TwoCorner : pas de face commune"<<endl;
|
||||
cout<<"TwoCorner : no common face"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
}
|
||||
if (!OkinterCC) {
|
||||
#if DEB
|
||||
cout<<"biseau : echec intersection des lignes de tangence sur face commune"<<endl;
|
||||
cout<<"biseau : failed intersection of tangency lines on common face"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
}
|
||||
Standard_Integer IFaArc1 = 3-IFaCo1, IFaArc2 = 3-IFaCo2;
|
||||
|
||||
// On verifie que les conges ont bien un commonpoint sur un arc commun.
|
||||
// Cet edge est le pivot du biseau ou de la rotule.
|
||||
// It is checked if the fillets have a commonpoint on a common arc.
|
||||
// This edge is the pivot of the bevel or of the kneecap.
|
||||
|
||||
ChFiDS_CommonPoint& CP1 = Fd1->ChangeVertex(isfirst1,IFaArc1);
|
||||
ChFiDS_CommonPoint& CP2 = Fd2->ChangeVertex(isfirst2,IFaArc2);
|
||||
|
||||
if (!CP1.IsOnArc() || !CP2.IsOnArc()) {
|
||||
#if DEB
|
||||
cout<<"echec 1 des 2 conges n est pas sur arc"<<endl;
|
||||
cout<<"fail 1 of 2 fillets are not on arc"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
@@ -226,7 +225,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
if ( ! CP1.Arc().IsSame( CP2.Arc()) ) {
|
||||
// look like OnSame + OnDiff case (eap, Arp 9 2002, occ266)
|
||||
#if DEB
|
||||
cout<<"PerformTwoCornerbyInter(): conges ne sont pas sur la meme arc"<<endl;
|
||||
cout<<"PerformTwoCornerbyInter(): fillets are not on the same arc"<<endl;
|
||||
#endif
|
||||
done = Standard_True;
|
||||
PerformMoreThreeCorner(Index, 2);
|
||||
@@ -269,9 +268,8 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
}
|
||||
}
|
||||
if(!ok1 || !ok2){
|
||||
//On est dans un contexte merdique
|
||||
#if DEB
|
||||
cout<<"echec une des surfaces n a pas de face d appui commune avec l edge pivot"<<endl;
|
||||
cout<<"fail one of surfaces has no common base face with the pivot edge"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
@@ -287,7 +285,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Handle(Geom_Curve) Gc;
|
||||
|
||||
if(sameparam) {
|
||||
// Du cote face commune, calcul de Pardeb.
|
||||
// Side common face, calculation of Pardeb.
|
||||
ChFi3d_ComputesIntPC (Fd1->Interference(IFaCo1),
|
||||
Fd2->Interference(IFaCo2),
|
||||
HS1,HS2,UIntPC1,UIntPC2);
|
||||
@@ -298,7 +296,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Pardeb(3)= UV.X(); Pardeb(4)=UV.Y();
|
||||
gp_Pnt PFaCo = HS1->Surface().Value(Pardeb(1),Pardeb(2));
|
||||
|
||||
// Du cote arc, calcul de Parfin.
|
||||
// Side arc, calculation of Parfin.
|
||||
Standard_Real UIntArc1 = Fd1->Interference(IFaArc1).Parameter(isfirst1);
|
||||
Standard_Real UIntArc2 = Fd2->Interference(IFaArc2).Parameter(isfirst2);
|
||||
|
||||
@@ -318,7 +316,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
!ChFi3d_ComputeCurves(HS1,HS2,Pardeb,Parfin,Gc,
|
||||
PGc1,PGc2,tolesp,tol2d,tolreached)) {
|
||||
#if DEB
|
||||
cout<<"echec calcul biseau echec interSS"<<endl;
|
||||
cout<<"failed to calculate bevel error interSS"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
@@ -327,12 +325,12 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
!ChFi3d_ComputeCurves(HS1,HS2,Parfin,Pardeb,Gc,
|
||||
PGc1,PGc2,tolesp,tol2d,tolreached)) {
|
||||
#if DEB
|
||||
cout<<"echec calcul biseau echec interSS"<<endl;
|
||||
cout<<"failed to calculate bevel error interSS"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
}
|
||||
// On met a jour les CornerData avec les resultats de l intersection.
|
||||
// CornerData are updated with results of the intersection.
|
||||
Standard_Real WFirst = Gc->FirstParameter();
|
||||
Standard_Real WLast = Gc->LastParameter();
|
||||
Standard_Integer Ipoin1;
|
||||
@@ -370,7 +368,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
isfirst2,IFaCo2);
|
||||
Corner2->SetIndexPoint(Corner1->IndexPoint(isfirst1,IFaArc1),
|
||||
isfirst2,IFaArc2);
|
||||
//On update les tolerances des points.
|
||||
//The tolerances of points are updated.
|
||||
Bnd_Box bco,barc;
|
||||
if(IFaCo1 == 1) ChFi3d_EnlargeBox(DStr,Corner1,Fd1,bco,barc,isfirst1);
|
||||
else ChFi3d_EnlargeBox(DStr,Corner1,Fd1,barc,bco,isfirst1);
|
||||
@@ -382,12 +380,12 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
ChFi3d_SetPointTolerance(DStr,bco,Corner1->IndexPoint(isfirst1,IFaCo1));
|
||||
}
|
||||
else {
|
||||
// Il faut identifier la surface qui deborde,
|
||||
// trouver le point de fin de l intersection Surf/Surf
|
||||
// par l intersection de la ligne de tangence du petit sur
|
||||
// la face opposee avec la surface du gros,
|
||||
// et enfin intersecter le gros avec la face en bout
|
||||
// entre ce point et le point sur arc.
|
||||
// It is necessary to identify the border surface,
|
||||
// find the end point of the intersection Surf/Surf
|
||||
// by the intersection of the tangency line of the small
|
||||
// on the opposing face with the surface of the big,
|
||||
// and finally intersect the big with the face at end
|
||||
// between this point and the point on arc.
|
||||
#ifndef DEB
|
||||
Standard_Boolean parcrois = Standard_False ;
|
||||
#else
|
||||
@@ -427,11 +425,11 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
isfirstBig = isfirst1; isfirstSma = isfirst2;
|
||||
}
|
||||
|
||||
//Intersection du gros avec le petit :
|
||||
//Intersection of the big with the small :
|
||||
//------------------------------------
|
||||
|
||||
// Pardeb (parametres du point PFaCo)
|
||||
// on verifie l'intersection
|
||||
// Pardeb (parameters of point PFaCo)
|
||||
// the intersection is checked
|
||||
ChFi3d_ComputesIntPC (SmaFD->Interference(IFaCoSma),
|
||||
BigFD->Interference(IFaCoBig),
|
||||
SmaHS,BigHS,UIntPCSma,UIntPCBig);
|
||||
@@ -442,7 +440,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Pardeb(1)= UVi.X(); Pardeb(2)=UVi.Y();
|
||||
gp_Pnt PFaCo = SmaHS->Value(UVi.X(),UVi.Y());
|
||||
|
||||
// Parfin (parametres du point PMil)
|
||||
// Parfin (parameters of point PMil)
|
||||
const ChFiDS_FaceInterference& FiArcSma = SmaFD->Interference(IFaArcSma);
|
||||
Handle(Geom_Curve) ctg = DStr.Curve(FiArcSma.LineIndex()).Curve();
|
||||
Handle(GeomAdaptor_HCurve) Hctg = new GeomAdaptor_HCurve();
|
||||
@@ -467,7 +465,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
}
|
||||
if(!ChFi3d_IntCS(BigHS,Hctg,UVi,wi)){
|
||||
#if DEB
|
||||
cout<<"biseau : echec inter C S"<<endl;
|
||||
cout<<"bevel : failed inter C S"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
@@ -481,12 +479,12 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
if (!ChFi3d_ComputeCurves(SmaHS,BigHS,Pardeb,Parfin,Gc,
|
||||
PGc1,PGc2,tolesp,tol2d,tolreached)) {
|
||||
#if DEB
|
||||
cout<<"echec calcul biseau echec interSS"<<endl;
|
||||
cout<<"failed to calculate bevel failed interSS"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
}
|
||||
// On met a jour la SmaCD, c est fini pour elle.
|
||||
// SmaCD is updated, for it this is all.
|
||||
Standard_Real WFirst = Gc->FirstParameter();
|
||||
Standard_Real WLast = Gc->LastParameter();
|
||||
Standard_Integer IpointCo, IpointMil, IpointArc;
|
||||
@@ -514,7 +512,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
SmaCD->SetIndexPoint(IpointMil,isfirstSma,IFaArcSma);
|
||||
if (IFaCoSma == 2) SmaCD->SetOrientation(TopAbs_REVERSED,isfirstSma);
|
||||
|
||||
// Pour la BigCD on met ces premiers resultats dans la DS.
|
||||
// For BigCD the first results are met in the DS.
|
||||
BigCD->SetIndexPoint(IpointCo,isfirstBig,IFaCoBig);
|
||||
BigFD->ChangeVertex(isfirstBig,IFaCoBig) = psmaco;
|
||||
BigFD->ChangeInterference(IFaCoBig).SetParameter(UIntPCBig,isfirstBig);
|
||||
@@ -526,7 +524,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Interfp = ChFi3d_FilPointInDS(TopAbs_REVERSED,ICurv,IpointMil,WLast);
|
||||
Li.Append(Interfp);
|
||||
|
||||
// la transition des courbes d intersection sur la Big
|
||||
// the transition of curves of intersection on the Big
|
||||
TopAbs_Orientation tra = BigFD->InterferenceOnS1().Transition();
|
||||
TopAbs_Orientation ofac = DStr.Shape(BigFD->IndexOfS1()).Orientation();
|
||||
TopAbs_Orientation ofil = BigFD->Orientation();
|
||||
@@ -540,18 +538,18 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Interfc = ChFi3d_FilCurveInDS (ICurv,ISurf,PGc2,tracurv);
|
||||
DStr.ChangeSurfaceInterferences(ISurf).Append(Interfc);
|
||||
|
||||
//On update les tolerances des points (on commence).
|
||||
//The tolerances of points are updated (beginning).
|
||||
Bnd_Box bco,bmil,barc;
|
||||
if(IFaCoSma == 1) ChFi3d_EnlargeBox(DStr,SmaCD,SmaFD,bco,bmil,isfirstSma);
|
||||
else ChFi3d_EnlargeBox(DStr,SmaCD,SmaFD,bmil,bco,isfirstSma);
|
||||
ChFi3d_EnlargeBox(BigHS,PGc2,WFirst,WLast,bco,bmil);
|
||||
|
||||
// Intersection du gros avec la face en bout :
|
||||
// Intersection of the big with the face at end :
|
||||
// -------------------------------------------
|
||||
|
||||
// Pardeb (parametres de PMil)
|
||||
// On rejoue l intersection courbe surface mais avec la representation
|
||||
// pcurve on face de la courbe pour etre bien sur.
|
||||
// Pardeb (parameters of PMil)
|
||||
// The intersection curve surface is tried again, now with representation
|
||||
// pcurve on face of the curve to be sure.
|
||||
TopoDS_Face F = TopoDS::Face(DStr.Shape(SmaFD->Index(IFaArcSma)));
|
||||
Handle(BRepAdaptor_HSurface) HF = new BRepAdaptor_HSurface(F);
|
||||
Standard_Real fsma = FiArcSma.FirstParameter();
|
||||
@@ -570,7 +568,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Handle(Adaptor3d_HCurveOnSurface) Hconsf = new Adaptor3d_HCurveOnSurface(consf);
|
||||
if(!ChFi3d_IntCS(BigHS,Hconsf,UVi,wi)) {
|
||||
#if DEB
|
||||
cout<<"biseau : echec inter C S"<<endl;
|
||||
cout<<"bevel : failed inter C S"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
@@ -580,7 +578,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Pardeb(1) = UVi.X(); Pardeb(2) = UVi.Y();
|
||||
gp_Pnt2d ppff1 = UVi;
|
||||
|
||||
// Parfin (parametres du point cpend)
|
||||
// Parfin (parameters of the point cpend)
|
||||
Standard_Real ptg = BigFD->Interference(IFaArcBig).Parameter(isfirstBig);
|
||||
UVi = BigFD->Interference(IFaArcBig).PCurveOnSurf()->Value(ptg);
|
||||
Parfin(3) = UVi.X(); Parfin(4) = UVi.Y();
|
||||
@@ -595,21 +593,21 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
// Intersection.
|
||||
Standard_Real uu1,uu2,vv1,vv2;
|
||||
ChFi3d_Boite(ppff1,ppff2,uu1,uu2,vv1,vv2);
|
||||
// pour le cas ou les deux chanfreins sont sur deux aretes OnSame,
|
||||
// il faut etendre la surface portant F, sinon, au moins ne pas la
|
||||
// restreindre.
|
||||
// for the case when two chamfers are on two edges OnSame,
|
||||
// it is necessary to extend the surface carrying F, or at least
|
||||
// not to limit it.
|
||||
ChFi3d_BoundFac(HF->ChangeSurface(),uu1,uu2,vv1,vv2,Standard_True);
|
||||
|
||||
if (!ChFi3d_ComputeCurves(HF,BigHS,Pardeb,Parfin,Gc,
|
||||
PGc1,PGc2,tolesp,tol2d,tolreached)) {
|
||||
#if DEB
|
||||
cout<<"echec calcul biseau echec interSS"<<endl;
|
||||
cout<<"fail calculation bevel fail interSS"<<endl;
|
||||
#endif
|
||||
done=Standard_False;
|
||||
return done;
|
||||
}
|
||||
|
||||
// On finit de mettre a jour la BigCD et la DS.
|
||||
// End of update of the BigCD and the DS.
|
||||
WFirst = Gc->FirstParameter();
|
||||
WLast = Gc->LastParameter();
|
||||
ICurv = DStr.AddCurve(TopOpeBRepDS_Curve(Gc,tolreached));
|
||||
@@ -626,7 +624,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
DStr.ChangeSurfaceInterferences(ISurf).Append(Interfc);
|
||||
BigCD->InDS(isfirstBig);
|
||||
|
||||
// Et enfin on met dans la DS les informations cote face.
|
||||
// Finally the information on faces is placed in the DS.
|
||||
Standard_Integer IShape = DStr.AddShape(F);
|
||||
if(SmaFD->Surf() == BigFD->Surf()){
|
||||
tracurv = TopAbs::Compose(etest.Orientation(),
|
||||
@@ -646,7 +644,7 @@ Standard_Integer ChFi3d_Builder::PerformTwoCornerbyInter(const Standard_Integer
|
||||
Interfc = ChFi3d_FilCurveInDS(ICurv,IShape,PGc1,tracurv);
|
||||
DStr.ChangeShapeInterferences(IShape).Append(Interfc);
|
||||
|
||||
//On update les tolerances des points (on finit).
|
||||
//The tolerances of points are updated (end).
|
||||
Handle(ChFiDS_Stripe) bidst;
|
||||
if(IFaCoBig == 1) ChFi3d_EnlargeBox(DStr,bidst,BigFD,bco,barc,isfirstBig);
|
||||
else ChFi3d_EnlargeBox(DStr,bidst,BigFD,barc,bco,isfirstBig);
|
||||
|
@@ -236,7 +236,7 @@ static void RemoveSD(Handle(ChFiDS_Stripe)& Stripe,
|
||||
|
||||
//=======================================================================
|
||||
//function : cherche_edge1
|
||||
//purpose : cherche l'edge commune entre les faces F1 et F2
|
||||
//purpose : find common edge of faces F1 and F2
|
||||
//=======================================================================
|
||||
|
||||
static void cherche_edge1 (const TopoDS_Face & F1,
|
||||
@@ -266,9 +266,9 @@ static void cherche_edge1 (const TopoDS_Face & F1,
|
||||
|
||||
//=======================================================================
|
||||
//function : CurveHermite
|
||||
//purpose : calcule une courbe 3d au moyen des polynomes d'Hermite.
|
||||
// l'arete ic est une arete de regularite . On construit une courbe 3d entre
|
||||
// les aretes icmoins et icplus.
|
||||
//purpose : calculate a curve 3d using polynoms of Hermite.
|
||||
// the edge is a regular edge. Curve 3D is constructed
|
||||
// between edges icmoins and icplus.
|
||||
//=======================================================================
|
||||
|
||||
static void CurveHermite (const TopOpeBRepDS_DataStructure& DStr,
|
||||
@@ -437,7 +437,7 @@ static void CurveHermite (const TopOpeBRepDS_DataStructure& DStr,
|
||||
|
||||
//=======================================================================
|
||||
//function : CalculDroite
|
||||
//purpose : calcule une droite 2d passant par le point p2d1 et de direction xdir ydir
|
||||
//purpose : calculate a 2D straight line passing through point p2d1 and direction xdir ydir
|
||||
//=======================================================================
|
||||
|
||||
static void CalculDroite(const gp_Pnt2d & p2d1,
|
||||
@@ -452,7 +452,7 @@ static void CalculDroite(const gp_Pnt2d & p2d1,
|
||||
|
||||
//=======================================================================
|
||||
//function : CalculBatten
|
||||
//purpose : calcule un batten entre les courbes 2d curv2d1 et curv2d2 aux points p2d1 et p2d2
|
||||
//purpose : calcule a batten between curves 2d curv2d1 and curv2d2 at points p2d1 and p2d2
|
||||
//=======================================================================
|
||||
|
||||
static void CalculBatten (const Handle (GeomAdaptor_HSurface) ASurf,
|
||||
@@ -514,7 +514,7 @@ static void CalculBatten (const Handle (GeomAdaptor_HSurface) ASurf,
|
||||
Ok = Bat.Compute(Iana,25,1.e-2);
|
||||
#if DEB
|
||||
if (!Ok) {
|
||||
cout<<"pas de batten :";
|
||||
cout<<"no batten :";
|
||||
Bat.Dump(cout);
|
||||
}
|
||||
#endif
|
||||
@@ -539,8 +539,8 @@ static void CalculBatten (const Handle (GeomAdaptor_HSurface) ASurf,
|
||||
|
||||
//=======================================================================
|
||||
//function : OrientationIcNonVive
|
||||
//purpose : calcule l'orientation de la courbe de raccord entre ic et icplus sachant que ic
|
||||
// n'est pas une arete vive
|
||||
//purpose : calculate the orientation of the curve between ic and icplus knowing that ic
|
||||
// is not a living edge.
|
||||
//=======================================================================
|
||||
|
||||
static void OrientationIcNonVive (const Handle(ChFiDS_Stripe) & CDic,
|
||||
@@ -563,8 +563,8 @@ static void OrientationIcNonVive (const Handle(ChFiDS_Stripe) & CDic,
|
||||
|
||||
//=======================================================================
|
||||
//function : OrientationIcplusNonVive
|
||||
//purpose : calcule l'orientation de la courbe de raccord entre ic et icplus sachant que icplus
|
||||
// n'est pas une arete vive;
|
||||
//purpose : calculate the orientation of the curve between ic and icplus knowing that icplus
|
||||
// is not a living edge;
|
||||
//=======================================================================
|
||||
|
||||
static void OrientationIcplusNonVive (const Handle(ChFiDS_Stripe) & CDicplus,
|
||||
@@ -588,8 +588,8 @@ static void OrientationIcplusNonVive (const Handle(ChFiDS_Stripe) & CDicplus,
|
||||
|
||||
//=======================================================================
|
||||
//function : OrientationAreteViveConsecutive
|
||||
//purpose : calcule l'orientation de la courbe de raccord entre les aretes ic et icplus
|
||||
// ou ic et icplus sont vives consecutives
|
||||
//purpose : calculate the orientation of the curve between edges ic and icplus
|
||||
// where ic and icplus are consecutively living
|
||||
//=======================================================================
|
||||
|
||||
static void OrientationAreteViveConsecutive (const TopoDS_Shape & Fviveicicplus,
|
||||
@@ -597,7 +597,7 @@ static void OrientationAreteViveConsecutive (const TopoDS_Shape & Fviveicicplus,
|
||||
const TopoDS_Vertex & V1,
|
||||
TopAbs_Orientation & orien)
|
||||
|
||||
{ // orinterf est l'orientation de l'edge ic par rapport a la face Fviveicicplus prise FORWARD
|
||||
{ // orinterf is orientation of edge ic corresponding to face Fviveicicplus taken FORWARD
|
||||
#ifndef DEB
|
||||
TopAbs_Orientation orinterf = TopAbs_FORWARD;
|
||||
#else
|
||||
@@ -612,8 +612,8 @@ static void OrientationAreteViveConsecutive (const TopoDS_Shape & Fviveicicplus,
|
||||
break;
|
||||
}
|
||||
}
|
||||
// si V1 est le vertex REVERSED de l'edge ic alors la courbe de
|
||||
// raccord a la meme orientation que ic
|
||||
// if V1 is vertex REVERSED of edge ic the curve
|
||||
// has the same orientation as ic
|
||||
TopoDS_Vertex vl;
|
||||
vl=TopExp::LastVertex(E);
|
||||
if (vl.IsSame(V1)){
|
||||
@@ -628,7 +628,7 @@ static void OrientationAreteViveConsecutive (const TopoDS_Shape & Fviveicicplus,
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformTwoCornerSameExt
|
||||
//purpose : calcule l'intersection entre les deux stripes stripe1 et stripe2
|
||||
//purpose : calculate intersection between two stripes stripe1 and stripe2
|
||||
//=======================================================================
|
||||
|
||||
static void PerformTwoCornerSameExt(TopOpeBRepDS_DataStructure& DStr,
|
||||
@@ -754,7 +754,7 @@ static void PerformTwoCornerSameExt(TopOpeBRepDS_DataStructure& DStr,
|
||||
|
||||
//=======================================================================
|
||||
//function : CpOnEdge
|
||||
//purpose : determine si la surfdata num a un common point sur Eadj1 ou Eadj2
|
||||
//purpose : determine if surfdata num has a common point on Eadj1 or Eadj2
|
||||
//=======================================================================
|
||||
|
||||
static void CpOnEdge (const Handle(ChFiDS_Stripe) & stripe,
|
||||
@@ -780,7 +780,7 @@ static void CpOnEdge (const Handle(ChFiDS_Stripe) & stripe,
|
||||
|
||||
//=======================================================================
|
||||
//function : RemoveSurfData
|
||||
//purpose : pour chaque stripe suppression des surfdatas initiles
|
||||
//purpose : for each stripe removal of unused surfdatas
|
||||
//=======================================================================
|
||||
|
||||
static void RemoveSurfData (const ChFiDS_StripeMap & myVDataMap,
|
||||
@@ -815,9 +815,9 @@ static void RemoveSurfData (const ChFiDS_StripeMap & myVDataMap,
|
||||
Standard_Integer ind;
|
||||
if (sense==1) {
|
||||
ind=0;
|
||||
// parmi les surfdatas on cherche le plus grand indice ind tel que
|
||||
// la surfdata ait un de ses commonpoint sur Eadj1 et Eadj2
|
||||
// on supprime les surfdata de 1 a ind-1
|
||||
// among surfdatas find the greatest indice ind so that
|
||||
// surfdata could have one of commonpoint on Eadj1 and Eadj2
|
||||
// remove surfdata from 1 to ind-1
|
||||
for (Standard_Integer i=1;i<=nbsurf;i++) {
|
||||
CpOnEdge (It.Value(),i,isfirst,Eadj1,Eadj2,compoint);
|
||||
if (compoint) ind=i;
|
||||
@@ -826,9 +826,9 @@ static void RemoveSurfData (const ChFiDS_StripeMap & myVDataMap,
|
||||
}
|
||||
else {
|
||||
ind=num;
|
||||
// parmi les surfdatas on cherche le plus petit indice ind tel que
|
||||
// la surfdata ait un de ses commonpoint sur Eadj1 et Eadj2
|
||||
// on supprime les surfdata de ind+1 a num
|
||||
// among surfdatas find the smallest indice ind so that
|
||||
// surfdata could have one of commonpoint on Eadj1 and Eadj2
|
||||
// remove surfdata from ind+1 to num
|
||||
for (Standard_Integer i=num;i>=1;i--) {
|
||||
CpOnEdge (It.Value(),i,isfirst,Eadj1,Eadj2,compoint);
|
||||
if (compoint) ind=i;
|
||||
@@ -971,7 +971,7 @@ static TopAbs_Orientation PlateOrientation(const Handle(Geom_Surface)& thePlateS
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformMoreThreeCorner
|
||||
//purpose : Traite le cas d'un sommet a n aretes.
|
||||
//purpose : Process case of a top with n edges.
|
||||
//=======================================================================
|
||||
|
||||
void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
@@ -1061,8 +1061,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
TopoDS_Face F1,F2;
|
||||
gp_Vec SumFaceNormalAtV1(0,0,0); // is used to define Plate orientation
|
||||
|
||||
// on determine s'il y a une arete de couture
|
||||
// la face qui a une arete de couture et l'arete de couture
|
||||
// it is determined if there is a sewing edge
|
||||
Standard_Boolean couture=Standard_False;
|
||||
TopoDS_Face facecouture;
|
||||
TopoDS_Edge edgecouture;
|
||||
@@ -1073,10 +1072,10 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
facecouture=fcur;
|
||||
}
|
||||
|
||||
// On enleve les surfdata inutiles
|
||||
// unused surfdata are removed
|
||||
RemoveSurfData (myVDataMap, myEFMap,edgecouture,facecouture,V1);
|
||||
|
||||
// tri des aretes et des faces
|
||||
// parse edges and faces
|
||||
trouve=Standard_False;
|
||||
TopoDS_Edge Enext;
|
||||
TopoDS_Vertex VV;
|
||||
@@ -1100,7 +1099,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
ChFi3d_cherche_edge(V1,Evive,Fcur,Enext,VV);
|
||||
trouve= !Enext.IsNull();
|
||||
}
|
||||
// find sum of all face normales at V1
|
||||
// find sum of all face normals at V1
|
||||
SummarizeNormal(V1, Fcur, Ecur, SumFaceNormalAtV1);
|
||||
|
||||
Standard_Integer nbcouture=0;
|
||||
@@ -1111,7 +1110,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
else ChFi3d_cherche_edge(V1,Evive,Fcur,Enext,VV);
|
||||
if (Enext.IsNull())Standard_Failure::Raise
|
||||
("PerformMoreThreeCorner: pb dans le tri des aretes et des faces");
|
||||
("PerformMoreThreeCorner: pb in the parsing of edges and faces");
|
||||
if (Enext.IsSame(edgelibre1)|| Enext.IsSame(edgelibre2)) {
|
||||
CD.SetValue(ii, cdbid);
|
||||
Index.SetValue(ii, 0);
|
||||
@@ -1146,7 +1145,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
jf.SetValue(ii, 0);
|
||||
}
|
||||
else {
|
||||
// on cherche si Enext est dans la map des stripes
|
||||
// it is found if Enext is in the map of stripes
|
||||
TopoDS_Edge EE;
|
||||
/*Standard_Boolean */trouve = Standard_False;
|
||||
for (It.Initialize(myVDataMap(Jndex));It.More()&&!trouve;It.Next()) {
|
||||
@@ -1168,7 +1167,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Evive.SetValue(ii, Enext);
|
||||
}
|
||||
else {
|
||||
// l'arete ii est vive
|
||||
// edge ii is alive
|
||||
CD.SetValue(ii, cdbid);
|
||||
Index.SetValue(ii, 0);
|
||||
sens.SetValue(ii, -1);
|
||||
@@ -1179,7 +1178,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Evive.SetValue(ii, Enext);
|
||||
jf.SetValue(ii, 0);
|
||||
}
|
||||
// On cherche la face Fnext!=Fcur qui contient Enext
|
||||
// Face Fnext!=Fcur containing Enext
|
||||
Fnext=Fcur;
|
||||
ChFi3d_cherche_face1(myEFMap(Enext),Fcur,Fnext);
|
||||
Indices(nedge,ii,icplus,icmoins);
|
||||
@@ -1189,11 +1188,11 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
numfa.SetValue(icplus,ii,numfa.Value(ii,icplus));
|
||||
Standard_Integer numface1,numface2;
|
||||
if (trouve) {
|
||||
// on regarde si numfa correspond a IndexOfS1 ou IndexOfS2
|
||||
// on met a jour en consequence jf
|
||||
// si ce n'est pas le cas on recherche parmi les faces precedentes
|
||||
// celle qui correspond a IndexOfs1 IndexOfS2 et on remet a jour
|
||||
// numfa et Fvive (cts16288)
|
||||
// it is checked if numfa corresponds to IndexOfS1 or IndexOfS2
|
||||
// jf is updated is consequently updated
|
||||
// if it is not the case among the previous faces are found
|
||||
// those which correspond to IndexOfs1 IndexOfS2 and
|
||||
// numfa and Fvive are reupdated (cts16288)
|
||||
numface2 = SurfIndex(CD, ii, Index.Value(ii), FACE2);
|
||||
if (numface2==numfa.Value(ii,icplus))
|
||||
jf.SetValue(ii, 2);
|
||||
@@ -1239,8 +1238,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
}
|
||||
// on verifie qu'une arete de regularite n'est pas tangente a une autre arete
|
||||
// dans ce cas on ne la considere pas comme reguliere (cts60072)
|
||||
// it is checked if a regular edge is not tangent to another edge
|
||||
// in case if it is not considered regular (cts60072)
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
if (regul.Value(ic) ) {
|
||||
trouve=Standard_False;
|
||||
@@ -1259,10 +1258,9 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// la variable deuxconges permet de detecter les cas ou on a un sommet a
|
||||
// n aretes et deux conges sur deux aretes tangentes qui ne sont pas
|
||||
// des bords libres
|
||||
// les courbes de raccord partent du conge jusqu'au sommet
|
||||
// variable deuxconges allows detecting cases when there is a top with
|
||||
// n edges and two fillets on two tangent edges that are not free borders
|
||||
// the connecting curves start from the fillet and end on top
|
||||
|
||||
Standard_Boolean deuxconges,deuxcgnontg;
|
||||
deuxconges=Standard_False;
|
||||
@@ -1280,9 +1278,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// on utilise la variable deuxconges dans le cas particulier
|
||||
// ou on a deux conges et si les deux autres aretes vives
|
||||
// sont tangentes (cts60072)
|
||||
// variable deuxconges is used in the special case when there are
|
||||
// two fillets and if two other living edges are tangent (cts60072)
|
||||
if (nconges==2 && nedge==4) {
|
||||
TopoDS_Edge E1,E2;
|
||||
for (ic=0;ic<nedge&&!deuxconges;ic++) {
|
||||
@@ -1331,10 +1328,10 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
PerformOneCorner (Jndex, Standard_True);
|
||||
}
|
||||
|
||||
// si le commonpoint est sur une arete qui n'a pas comme
|
||||
// extremite le vertex , on determine a nouveau Evive
|
||||
// On determine a nouveau Fvive si elle ne correspondant
|
||||
// pas a une des deux faces adjacentes a Evive (cts16288)
|
||||
// if the commonpoint is on an edge that does not have a
|
||||
// vertex at the extremity, Evive is found anew
|
||||
// Fvive is found anew if it does not correspond
|
||||
// to two faces adjacent to Evive (cts16288)
|
||||
|
||||
if (!deuxconges && !isOnSameDiff)
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
@@ -1411,7 +1408,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// on recupere la premiere arete libre si elle existe
|
||||
// the first free edge is restored if it exists
|
||||
trouve=Standard_False;
|
||||
for (ic=0; ic<nedge&&!trouve;ic++) {
|
||||
TopoDS_Edge ecom;
|
||||
@@ -1422,7 +1419,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// determination de la distance de recul distmin a ne pas depasser
|
||||
// determine the minimum recoil distance that can't be exceeded
|
||||
Standard_Boolean distmini=Standard_False;
|
||||
gp_Pnt som=BRep_Tool::Pnt(V1),pic;
|
||||
gp_Pnt2d p2;
|
||||
@@ -1445,8 +1442,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
if (dst<distmin) distmin=dst;
|
||||
}
|
||||
|
||||
// calcul des intersections entre les stripes et determination des parametres
|
||||
// sur chaque pcurve
|
||||
// calculate intersections between stripes and determine the parameters on each pcurve
|
||||
Standard_Boolean inters=Standard_True;
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
@@ -1461,8 +1457,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Handle(ChFiDS_Stripe) strip;
|
||||
Standard_Real angedg;
|
||||
Standard_Integer iface;
|
||||
// si les deux aretes sont tangentes on ne tente pas
|
||||
// l'intersection (cts60046)
|
||||
// if two edges are tangent the intersection is not attempted (cts60046)
|
||||
angedg=Abs(ChFi3d_AngleEdge(V1,TopoDS::Edge(Evive.Value(ic)),TopoDS::Edge(Evive.Value(icplus))));
|
||||
if (Abs(angedg-PI)>0.01)
|
||||
ok = ChFi3d_SearchFD(DStr,CD.Value(ic),CD.Value(icplus),sens.Value(ic),sens.Value(icplus),
|
||||
@@ -1470,9 +1465,9 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Index.Value(ic),Index.Value(icplus),
|
||||
face,sameside,jf1,jfp);
|
||||
else ok=Standard_False;
|
||||
// s'il y a une intersection on regarde si la surfdata ou il y a l'intersection
|
||||
// correspond a la premiere ou a la derniere
|
||||
// si ce n'est pas le cas on enleve de la SD les surfdata
|
||||
// if there is an intersection it is checked if surfdata with the intersection
|
||||
// corresponds to the first or the last
|
||||
// if this is not the case, the surfdata are removed from SD
|
||||
|
||||
if (ok) {
|
||||
if (i1!=Index.Value(ic) ){
|
||||
@@ -1556,8 +1551,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
if (!oksea.Value(ic) ) inters=Standard_False;
|
||||
}
|
||||
|
||||
// cas ou il n'y a pas que des intersections
|
||||
// les parametres sur les Pcurves sont les extremites de la stripe
|
||||
// case if there are only intersections
|
||||
// the parametres on Pcurves are the extremities of the stripe
|
||||
Standard_Real para;
|
||||
if (!inters) {
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
@@ -1607,7 +1602,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// calcul de la distance max du sommet a chaque point
|
||||
// calculate max distance to the top at each point
|
||||
TColStd_Array1OfReal dist1(0,size);
|
||||
TColStd_Array1OfReal dist2(0,size);
|
||||
Standard_Real distance=0.;
|
||||
@@ -1636,8 +1631,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// decalage des parametres et elimination des points d'intersections
|
||||
// trop proches du sommet
|
||||
// offset of parameters and removal of intersection points
|
||||
// too close to the top
|
||||
|
||||
Standard_Real ec, dist;
|
||||
if (!deuxconges && !deuxcgnontg)
|
||||
@@ -1645,7 +1640,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
if (sharp.Value(ic) ) {
|
||||
BRepAdaptor_Curve C(TopoDS::Edge(Evive.Value(ic)));
|
||||
// pour passer d'une distance 3d a une distance parametrique
|
||||
// to pass from 3D distance to a parametric distance
|
||||
if (!tangentregul(ic))
|
||||
ec = distance*100*C.Resolution(0.01);
|
||||
else ec=0.0;
|
||||
@@ -1657,7 +1652,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
para=p.Value(ic,icmoins) - ec;
|
||||
p.SetValue(ic,icmoins,para);
|
||||
}
|
||||
// il faudra etre sur de rester sur l'edge
|
||||
// it is necessary to be on to remain on the edge
|
||||
p.SetValue(ic,icplus, p.Value(ic,icmoins));
|
||||
}
|
||||
else if (!distmini) {
|
||||
@@ -1701,7 +1696,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// on tente de limiter l'arete vive par un des commonpoint
|
||||
// it is attempted to limit the edge by a commonpoint
|
||||
//
|
||||
|
||||
Standard_Real tolcp=0;
|
||||
@@ -1731,10 +1726,10 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
if (!sharp.Value(icmoins) && !sharp.Value(icplus))
|
||||
samecompoint=cp1.Point().Distance(cp2.Point())<tolapp;
|
||||
if ((dS<d1 || dS<d2)&& !samecompoint) {
|
||||
// on recule jusqu'aux Common Points
|
||||
// sans sortir de l'Edge ??
|
||||
// step back till Common Points
|
||||
// without leaving the Edge ??
|
||||
if (d2<d1 &&cp1.IsOnArc() ) {
|
||||
// on choisit cp1
|
||||
// cp1 is chosen
|
||||
p.SetValue(ic,icmoins, cp1.ParameterOnArc());
|
||||
p.SetValue(ic,icplus, p.Value(ic,icmoins));
|
||||
isfirst=(sens.Value(icplus)==1);
|
||||
@@ -1744,7 +1739,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
if (cp1.Tolerance()>tolcp &&cp1.Tolerance()<1 ) tolcp=cp1.Tolerance();
|
||||
}
|
||||
else if( cp2.IsOnArc()){
|
||||
// on choisit cp2
|
||||
// cp2 is chosen
|
||||
p.SetValue(ic,icmoins, cp2.ParameterOnArc());
|
||||
p.SetValue(ic,icplus, p.Value(ic,icmoins));
|
||||
isfirst=(sens.Value(icmoins)==1);
|
||||
@@ -1754,11 +1749,11 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
else {
|
||||
// on se recale sur un Common Point uniquement si on en est tres pres
|
||||
// step back till Common Point only if it is very close
|
||||
if (!sharp.Value(icplus)) {
|
||||
if ((cp1.Point().Distance(PE)<cp1.Tolerance() ||
|
||||
samecompoint || nconges==1) && cp1.IsOnArc()) {
|
||||
// on est tres proche de cp1
|
||||
// it is very close to cp1
|
||||
p.SetValue(ic,icmoins, cp1.ParameterOnArc());
|
||||
ponctuel.SetValue(ic,Standard_True);
|
||||
p.SetValue(ic,icplus, p.Value(ic,icmoins));
|
||||
@@ -1772,7 +1767,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
if (!sharp.Value(icmoins)){
|
||||
if ((cp2.Point().Distance(PE)<cp2.Tolerance() ||
|
||||
samecompoint || nconges==1) && cp2.IsOnArc()) {
|
||||
// on est tres proche de cp2
|
||||
// it is very close to cp2
|
||||
ponctuel.SetValue(icmoins,Standard_True);
|
||||
p.SetValue(ic,icmoins, cp2.ParameterOnArc());
|
||||
p.SetValue(ic,icplus,p.Value(ic,icmoins));
|
||||
@@ -1786,8 +1781,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// dans le cas d'un bord libre on prend le parametre correspondant
|
||||
// au common point sur l'arete libre.
|
||||
// in case of a free border the parameter corresponding
|
||||
// to the common point on the free edge is chosen.
|
||||
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
if (TopoDS::Edge(Evive.Value(ic)).IsSame(edgelibre1) ||
|
||||
@@ -1821,11 +1816,11 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// si ic est une arete de regularite, on cherche l'arete indfin qui ne
|
||||
// soit pas une arete de regularite, on construit une courbe 3d
|
||||
// entre les aretes (ou stripes ) icmoins et indfin.
|
||||
// On projette ensuite cette courbe3d sur toutes les faces (nbface) qui
|
||||
// separent icmoins et indfin
|
||||
// if ic is a regular edge, one finds edge indfin which is not
|
||||
// a regular edge, and construtc a curve 3d
|
||||
// between edges (or stripes ) icmoins and indfin.
|
||||
// Then this courbe3d is projected on all faces (nbface) that
|
||||
// separate icmoins and indfin
|
||||
#ifndef DEB
|
||||
Standard_Integer nbface = 0;
|
||||
#else
|
||||
@@ -1922,7 +1917,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// cas ou la courbe de raccord entre ic et icplus traverse plusieurs faces
|
||||
// case when the conncting curve between ic and icplus crosses many faces
|
||||
|
||||
TopTools_SequenceOfShape Ecom;
|
||||
TopTools_SequenceOfShape Eproj;
|
||||
@@ -1984,9 +1979,9 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// cas ou deux conges ont les memes commonpoints
|
||||
// on procede alors par intersection
|
||||
// on verifie cependant que les extremites de l'intersection coincident avec les commonpoints
|
||||
// case when two fillets have the same commonpoints
|
||||
// one continues then by intersection
|
||||
// it is checked if the extremities of the intersection coincide with commonpoints
|
||||
|
||||
Standard_Boolean intersection=Standard_False, introuve;
|
||||
if (nconges==2 && !deuxconges) {
|
||||
@@ -2034,10 +2029,10 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// declaration pour plate
|
||||
// declaration for plate
|
||||
GeomPlate_BuildPlateSurface PSurf(3,10,3,tol2d,tolesp,angular);
|
||||
|
||||
// calcul des courbes sur surface pour chaque stripe
|
||||
// calculation of curves on surface for each stripe
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
gp_Pnt2d p2d1, p2d2;
|
||||
if (!sharp.Value(ic)) {
|
||||
@@ -2050,7 +2045,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
indice= SurfIndex(CD, ic, i.Value(ic,icplus), ChFiSURFACE);
|
||||
Handle (GeomAdaptor_HSurface) Asurf =
|
||||
new GeomAdaptor_HSurface(DStr.Surface(indice).Surface());
|
||||
// calcul de la courbe 2d
|
||||
// calculation of curve 2d
|
||||
xdir= p2d2.X()-p2d1.X();
|
||||
ydir= p2d2.Y()-p2d1.Y();
|
||||
Standard_Real l0 = sqrt(xdir*xdir+ ydir*ydir );
|
||||
@@ -2066,7 +2061,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
new GeomPlate_CurveConstraint(HCons,Order.Value(ic),10,tolesp,angular,0.1);
|
||||
PSurf.Add(Cont);
|
||||
|
||||
// calcul des indices de points et de la courbe pour la DS
|
||||
// calculate indexes of points and of the curve for the DS
|
||||
isfirst=(sens.Value(ic)==1);
|
||||
GeomLib::BuildCurve3d(tolapp,CurvOnS,CurvOnS.FirstParameter(),
|
||||
CurvOnS.LastParameter(),Curv3d,maxapp,avedev);
|
||||
@@ -2080,13 +2075,13 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
TopOpeBRepDS_Point tpoint2 (point2,maxapp);
|
||||
errapp.SetValue(ic,maxapp);
|
||||
if (ic==0) {
|
||||
// il faut creer les deux points
|
||||
// it is necessary to create two points
|
||||
indpoint.SetValue(ic,0,DStr.AddPoint(tpoint1));
|
||||
indpoint.SetValue(ic,1,DStr.AddPoint(tpoint2));
|
||||
}
|
||||
else {
|
||||
// les points existent peut-etre deja sur un conge
|
||||
// (intersection precedente,...)
|
||||
// probably the points are already on the fillet
|
||||
// (previous intersection...)
|
||||
trouve = Standard_False;
|
||||
for (ii=0;ii<ic&&(!trouve);ii++) {
|
||||
if (!sharp.Value(ii)) {
|
||||
@@ -2114,7 +2109,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
indpoint.SetValue(ic,1,DStr.AddPoint(tpoint2));
|
||||
}
|
||||
|
||||
// mise a jour de la stripe
|
||||
// update of the stripe
|
||||
isurf1=3-jf.Value(ic); isurf2=jf.Value(ic);
|
||||
if (isurf1==2) CD.Value(ic)->SetOrientation(TopAbs_REVERSED,isfirst);
|
||||
CD.Value(ic)->SetCurve(indcurve3d.Value(n3d),isfirst);
|
||||
@@ -2137,7 +2132,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// calcul des indices de points pour les aretes vives
|
||||
// calculate the indices of points for living edges
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
if (sharp.Value(ic)) {
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
@@ -2156,7 +2151,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
cp = CD.Value(icplus)->SetOfSurfData()->Value(i.Value(icplus,ic))->
|
||||
ChangeVertex (isfirst,jfp);
|
||||
if ( cp.Point().Distance(PE) <= Max(1.e-4,tolcp)) {
|
||||
// l'arete a ete limitee par le 1er CommonPoint de CD[icplus]
|
||||
// edge was limited by the 1st CommonPoint of CD[icplus]
|
||||
indpoint.SetValue(ic,0,indpoint.Value(icplus,0));
|
||||
indpoint.SetValue(ic,1,indpoint.Value(icplus,0));
|
||||
}
|
||||
@@ -2166,7 +2161,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
cp = CD.Value(icmoins)->SetOfSurfData()->Value(i.Value(icmoins,ic))->
|
||||
ChangeVertex (isfirst,jf.Value(icmoins));
|
||||
if ( cp.Point().Distance(PE) <= Max(1.e-4,tolcp)) {
|
||||
// l'arete a ete limitee par le 2eme CommonPoint de CD[icmoins]
|
||||
// edge was limited by the 2nd CommonPoint of CD[icmoins]
|
||||
if (indpoint.Value(ic,0)==0) {
|
||||
indpoint.SetValue(ic,0, indpoint.Value(icmoins,1));
|
||||
indpoint.SetValue(ic,1, indpoint.Value(icmoins,1));
|
||||
@@ -2180,8 +2175,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// calcul des courbes intermediaires reliant deux stripes dans le cas ou il n'y a pas
|
||||
// d'intersection. La courbe peut etre une droite une projection ou un batten
|
||||
// calculation of intermediary curves connecting two stripes in case if
|
||||
// there is no intersection. The curve is a straight line, projection or batten
|
||||
|
||||
Standard_Boolean raccordbatten;
|
||||
if (!inters) {
|
||||
@@ -2204,8 +2199,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Handle (GeomAdaptor_HSurface) Asurf;
|
||||
Standard_Real u1bid,u2bid;
|
||||
|
||||
// recuperation de la premiere courbe 2d
|
||||
// et du premier point de raccordement
|
||||
// return the 1st curve 2d
|
||||
// and the 1st connection point
|
||||
if (sharp.Value(ic))
|
||||
curv2d1 = BRep_Tool::CurveOnSurface(TopoDS::Edge(Evive.Value(ic)),TopoDS::Face(Fvive.Value(ic,icplus)),
|
||||
u1bid,u2bid);
|
||||
@@ -2231,7 +2226,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
if (tolu>tolv) ratio=tolu/tolv;
|
||||
else ratio=tolv/tolu;
|
||||
|
||||
// dans le cas d'une arete de couture on recadre les parametres
|
||||
// in case of a sewing edge the parameters are reframed
|
||||
if (couture) {
|
||||
Standard_Boolean PI1=Standard_False, PI2=Standard_False;
|
||||
Standard_Real xx;
|
||||
@@ -2257,7 +2252,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
|
||||
Standard_Real l0 = sqrt(xdir*xdir+ ydir*ydir );
|
||||
if (l0<1.e-7|| ponctuel.Value(ic)) {
|
||||
// raccord inutile
|
||||
// unused connection
|
||||
n3d--;
|
||||
ponctuel.SetValue(ic,Standard_True);
|
||||
if (!deuxconges) {
|
||||
@@ -2271,13 +2266,13 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // le raccord est soit une droite soit une projection soit un batten
|
||||
else { // the connection is a straight line, projection or batten
|
||||
if (ratio>10 && nconges==1) raccordbatten=Standard_True;
|
||||
if (ratio>10 && raccordbatten) {
|
||||
CalculDroite(p2d1,xdir,ydir,pcurve);
|
||||
raccordbatten=Standard_False;
|
||||
}
|
||||
else if (!raccordbatten){ // on recupere les courbes projetees
|
||||
else if (!raccordbatten){ // the projected curves are returned
|
||||
if (regul.Value(ic)) {
|
||||
if (cproj2.Value(ic).IsNull()){
|
||||
raccordbatten=Standard_True;
|
||||
@@ -2304,7 +2299,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
contraint2=Standard_True;
|
||||
if (raccordbatten) {
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch);// init performances pour les batten
|
||||
ChFi3d_InitChron(ch);// initial performances for battens
|
||||
#endif
|
||||
Standard_Boolean inverseic,inverseicplus;
|
||||
if (sharp.Value(ic)) {
|
||||
@@ -2330,17 +2325,17 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
CalculBatten(Asurf,TopoDS::Face(Fvive(ic,icplus)),xdir,ydir,p2d1,p2d2,contraint1,contraint2,curv2d1,curv2d2,p.Value(ic,icplus),
|
||||
p.Value(icplus,ic),inverseic,inverseicplus,pcurve);
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron( ch,t_batten); // result performances pour les batten
|
||||
ChFi3d_ResultChron( ch,t_batten); // resulting performances for battens
|
||||
#endif
|
||||
}
|
||||
|
||||
// construction des frontieres pour Plate
|
||||
// construction of borders for Plate
|
||||
Handle (Geom2dAdaptor_HCurve) Acurv=new Geom2dAdaptor_HCurve(pcurve);
|
||||
Adaptor3d_CurveOnSurface CurvOnS (Acurv,Asurf);
|
||||
Handle(Adaptor3d_HCurveOnSurface) HCons =
|
||||
new Adaptor3d_HCurveOnSurface(CurvOnS);
|
||||
|
||||
// on met des contraintes G1 si les aretes ic et icplus ne sont pas toutes les deux vives
|
||||
// constraints G1 are set if edges ic and icplus are not both alive
|
||||
|
||||
|
||||
Order.SetValue(n3d,0);
|
||||
@@ -2358,7 +2353,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
new GeomPlate_CurveConstraint(HCons,Order.Value(n3d),10,tolesp,angular,0.1);
|
||||
PSurf.Add(Cont);
|
||||
|
||||
//calcul de la courbe 3d si ce n'est pas une projection
|
||||
//calculation of curve 3d if it is not a projection
|
||||
if (curveint.IsNull()) {
|
||||
GeomLib::BuildCurve3d(tolapp,CurvOnS,CurvOnS.FirstParameter(),
|
||||
CurvOnS.LastParameter(),Curv3d,maxapp1,avedev);
|
||||
@@ -2367,13 +2362,13 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
curveint= new Geom_TrimmedCurve(Curv3d,pardeb,parfin);
|
||||
}
|
||||
|
||||
//stockage dans la DS
|
||||
//storage in the DS
|
||||
TopOpeBRepDS_Curve tcurv3d( curveint,maxapp1);
|
||||
indcurve3d.SetValue(n3d, DStr.AddCurve(tcurv3d));
|
||||
pardeb=curveint->FirstParameter();
|
||||
parfin=curveint->LastParameter();
|
||||
if ( sharp.Value(icplus) && indpoint.Value(icplus,0) == 0) {
|
||||
// il faut initialiser indpoint[icplus][0] et indpoint[icplus][1]
|
||||
// it is necessary to initialize indpoint[icplus][0] and indpoint[icplus][1]
|
||||
gp_Pnt point2;
|
||||
point2 =curveint->Value(parfin);
|
||||
TopOpeBRepDS_Point tpoint2 (point2,maxapp);
|
||||
@@ -2401,7 +2396,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
tpt2.Tolerance (tpt2.Tolerance()+maxapp1);
|
||||
}
|
||||
|
||||
// calcul de l'orientation de la courbe
|
||||
// calculate orientation of the curve
|
||||
TopAbs_Orientation orinterf;
|
||||
if (!sharp.Value(ic)) {
|
||||
OrientationIcNonVive(CD.Value(ic),jf.Value(ic),i.Value(ic,icplus),sens.Value(ic),orinterf);
|
||||
@@ -2415,11 +2410,11 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Interfc=ChFi3d_FilCurveInDS(indcurve3d.Value(n3d),numfa.Value(ic,icplus),pcurve,orinterf);
|
||||
DStr.ChangeShapeInterferences(numfa.Value(ic,icplus)).Append(Interfc);
|
||||
}
|
||||
} // fin du traitement par arete
|
||||
} // fin de la boucle sur les aretes
|
||||
} // fin du traitement pour les courbes intermediaires
|
||||
} // end of processing by edge
|
||||
} // end of the loop on edges
|
||||
} // end of processing for intermediary curves
|
||||
|
||||
// stockage dans la DS des courbes projetees sur plusieurs faces
|
||||
// storage in the DS of curves projected on several faces
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
if (moresurf.Value(ic) ){
|
||||
TopoDS_Vertex Vf,Vl;
|
||||
@@ -2495,7 +2490,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
//calcul de l'orientation
|
||||
//calculation of the orientation
|
||||
TopAbs_Orientation orinterf;
|
||||
if (P1.Distance(Pcom)>1.e-4) {
|
||||
if (orvt==TopAbs_FORWARD) {
|
||||
@@ -2529,7 +2524,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// cas ou les deux bords libres sont tangents
|
||||
// case when two free borders are tangent
|
||||
if (droit)
|
||||
for (ic=0;ic<nedge;ic++) {
|
||||
Handle(Geom_Curve) curve,ctrim,rcurve;
|
||||
@@ -2602,19 +2597,19 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch); // init performances pour plate
|
||||
ChFi3d_InitChron(ch); // init performances for plate
|
||||
#endif
|
||||
|
||||
PSurf.Perform();
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch, t_plate); //result performances pour plate
|
||||
ChFi3d_ResultChron(ch, t_plate); //result performances for plate
|
||||
#endif
|
||||
|
||||
// appel a l'approx
|
||||
// call of approx
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch); // init performances pour approxplate
|
||||
ChFi3d_InitChron(ch); // init performances for approxplate
|
||||
#endif
|
||||
if (PSurf.IsDone()) {
|
||||
Standard_Integer nbcarreau=9;
|
||||
@@ -2636,10 +2631,10 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
apperror=Mapp.CriterionError()*coef;
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch, t_approxplate); // result performances pour approxplate
|
||||
ChFi3d_ResultChron(ch, t_approxplate); // result performances for approxplate
|
||||
#endif
|
||||
|
||||
// Stockage de la surface plate et des courbes correspondantes dans la DS
|
||||
// Storage of the surface plate and corresponding curves in the DS
|
||||
|
||||
TopAbs_Orientation orplate,orsurfdata,orpcurve,orien;
|
||||
#ifdef DEB
|
||||
@@ -2664,9 +2659,9 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
TopOpeBRepDS_ListOfInterference& SolidInterfs =
|
||||
DStr.ChangeShapeInterferences(SolInd);
|
||||
|
||||
// dans le cas ou l'on relie au sommet , il faut que les
|
||||
// aretes vives qui arrivent au sommet soient enlevees de la DS.
|
||||
// Pour cela on les stocke dans la DS avec leur orientation inverse
|
||||
// in case when one rereads at top, it is necessary that
|
||||
// alive edges that arrive at the top should be removed from the DS.
|
||||
// For this they are stored in the DS with their inverted orientation
|
||||
Standard_Integer nbedge;
|
||||
TopExp_Explorer ex;
|
||||
if (deuxconges)
|
||||
@@ -2699,8 +2694,8 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// calcul de l'orientation de Plate orplate par rapport aux surfdata
|
||||
// on fait le calcul par rapport a la premiere la stripe
|
||||
// calculate orientation of Plate orplate corresponding to surfdata
|
||||
// calculation corresponding to the first stripe
|
||||
Indices(nedge,0,icplus,icmoins);
|
||||
isfirst=(sens.Value(0)==1);
|
||||
const Handle(ChFiDS_SurfData)& Fd =
|
||||
@@ -2723,7 +2718,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
// else orplate=TopAbs::Reverse(orsurfdata);
|
||||
orplate = PlateOrientation(Surf,PSurf.Curves2d(),SumFaceNormalAtV1);
|
||||
|
||||
// creation de la solidinterderence pour Plate
|
||||
// creation of solidinterderence for Plate
|
||||
Handle(TopOpeBRepDS_SolidSurfaceInterference) SSI =
|
||||
new TopOpeBRepDS_SolidSurfaceInterference(TopOpeBRepDS_Transition(orplate),
|
||||
TopOpeBRepDS_SOLID,
|
||||
@@ -2732,9 +2727,9 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Isurf);
|
||||
SolidInterfs.Append(SSI);
|
||||
|
||||
// calcul de l'orientation orien des pcurves de Plate
|
||||
// les courbes allant de ic a icplus les pcurves de Plate
|
||||
// ont toutes la meme orientation
|
||||
// calculate orientation orien of pcurves of Plate
|
||||
// the curves from ic to icplus the pcurves of Plate
|
||||
// all have the same orientation
|
||||
Standard_Integer Ishape1,Ishape2;
|
||||
#ifndef DEB
|
||||
TopAbs_Orientation trafil1 = TopAbs_FORWARD, trafil2 = TopAbs_FORWARD;
|
||||
@@ -2822,7 +2817,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
|
||||
isfirst=(sens.Value(ic)==1);
|
||||
// calcul des curves interference relatives aux stripes
|
||||
// calculate curves interference relative to stripes
|
||||
|
||||
apperror=Mapp.CriterionError()*coef;
|
||||
pardeb=CD.Value(ic)->PCurve(isfirst)->FirstParameter();
|
||||
@@ -2842,7 +2837,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
tpt1.Tolerance (tpt1.Tolerance()+apperror);
|
||||
tpt2.Tolerance (tpt2.Tolerance()+apperror );
|
||||
|
||||
// calcul de la surfaceinterference
|
||||
// calculate surfaceinterference
|
||||
Interfc=ChFi3d_FilCurveInDS(indcurve3d.Value(n3d),Isurf,
|
||||
PSurf.Curves2d()->Value(n3d),orien);
|
||||
DStr.ChangeSurfaceInterferences(Isurf).Append(Interfc);
|
||||
@@ -2854,13 +2849,13 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// stockages des courbes de raccords
|
||||
// storage of connection curves
|
||||
|
||||
for (ic=0; ic<nedge;ic++) {
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
if (!oksea.Value(ic)) {
|
||||
if (sharp.Value(ic) &&!deuxconges) {
|
||||
// limitation de l'arete vive
|
||||
// limitation of the alive edge
|
||||
TopAbs_Orientation ori;
|
||||
gp_Pnt Pf,Pl,sommet1;
|
||||
TopoDS_Vertex Vd = TopExp::FirstVertex(TopoDS::Edge(Evive.Value(ic)));
|
||||
@@ -2878,7 +2873,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
|
||||
if (!ponctuel.Value(ic) && !libre.Value(ic)) {
|
||||
// raccord effectif
|
||||
// actual connection
|
||||
if (!moresurf.Value(ic)){
|
||||
n3d++;
|
||||
TopOpeBRepDS_Curve& tcourb1 = DStr.ChangeCurve(indcurve3d.Value(n3d));
|
||||
@@ -2903,7 +2898,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
//stockage des courbes projetees sur plusieurs faces
|
||||
//storage of curves projected on several faces
|
||||
for (ic=0; ic<nedge;ic++) {
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
if (moresurf(ic))
|
||||
@@ -2929,7 +2924,7 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
|
||||
// stockage des courbes dans le cas de bords libres tangents
|
||||
// storage of curves in case of tangent free borders
|
||||
if (droit)
|
||||
for (ic=0; ic<nedge;ic++) {
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
@@ -2945,14 +2940,14 @@ void ChFi3d_Builder::PerformMoreThreeCorner(const Standard_Integer Jndex,
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // il n'y a qu'un resultat partiel
|
||||
else { // there is only one partial result
|
||||
done=Standard_False;
|
||||
hasresult=Standard_True;
|
||||
for (ic=0; ic<nedge;ic++) {
|
||||
Indices(nedge,ic,icplus,icmoins);
|
||||
if (!oksea.Value(ic)) {
|
||||
if (sharp.Value(ic) &&!deuxconges) {
|
||||
// limitation de l'arete vive
|
||||
// limitation of the alive edge
|
||||
TopAbs_Orientation ori;
|
||||
gp_Pnt Pf,Pl,sommet1;
|
||||
TopoDS_Vertex Vd = TopExp::FirstVertex(TopoDS::Edge(Evive.Value(ic)));
|
||||
|
@@ -57,7 +57,7 @@ extern void ChFi3d_CheckSurfData(const TopOpeBRepDS_DataStructure& DStr,
|
||||
#endif
|
||||
//=======================================================================
|
||||
//function : CompTra
|
||||
//purpose : Calcule la Transition d'un point de debut.
|
||||
//purpose : Calculate the Transition from start point.
|
||||
//=======================================================================
|
||||
|
||||
static TopAbs_Orientation CompTra (const TopAbs_Orientation O1,
|
||||
@@ -71,7 +71,7 @@ static TopAbs_Orientation CompTra (const TopAbs_Orientation O1,
|
||||
|
||||
//=======================================================================
|
||||
//function : CompCommonpoint
|
||||
//purpose : Remplit le commonpoint dans le cas d un vertex.
|
||||
//purpose : Fill the commonpoint in case of a vertex.
|
||||
//=======================================================================
|
||||
|
||||
static void CompCommonPoint (ChFiDS_CommonPoint& FilPoint,
|
||||
@@ -95,8 +95,7 @@ static void CompCommonPoint (ChFiDS_CommonPoint& FilPoint,
|
||||
|
||||
//=======================================================================
|
||||
//function : CpInterf
|
||||
//purpose : Construit une nouvelle SurfData partageant les faces,
|
||||
// la surface et les courbes.
|
||||
//purpose : Construct new SurfData sharing faces, surface and curves.
|
||||
//=======================================================================
|
||||
|
||||
static ChFiDS_FaceInterference CpInterf (TopOpeBRepDS_DataStructure& DStr,
|
||||
@@ -121,8 +120,7 @@ static ChFiDS_FaceInterference CpInterf (TopOpeBRepDS_DataStructure& DStr,
|
||||
|
||||
//=======================================================================
|
||||
//function : CpSD
|
||||
//purpose : Construit une nouvelle SurfData partageant les faces,
|
||||
// la surface et les courbes.
|
||||
//purpose : Construct new SurfData sharing faces, surface and curves.
|
||||
//=======================================================================
|
||||
|
||||
static Handle(ChFiDS_SurfData) CpSD ( TopOpeBRepDS_DataStructure& DStr,
|
||||
@@ -185,7 +183,7 @@ static Standard_Real ComputeAbscissa(const BRepAdaptor_Curve& C,
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
Standard_NotImplemented::Raise("calcul abscisse non traite ");
|
||||
Standard_NotImplemented::Raise("calculate abscisse non-processed");
|
||||
return 0.;
|
||||
}
|
||||
|
||||
@@ -215,7 +213,7 @@ static Standard_Real ParamOnSpine(const TopOpeBRepDS_DataStructure& DStr,
|
||||
return Nl;
|
||||
}
|
||||
else {
|
||||
//construction du plan contenant la section de CD au parametre ptg.
|
||||
//construction of the plane containing the section of CD with parameter ptg.
|
||||
gp_Pnt PP;
|
||||
gp_Vec VV;
|
||||
Handle(Geom_Curve) c3d;
|
||||
@@ -232,7 +230,7 @@ static Standard_Real ParamOnSpine(const TopOpeBRepDS_DataStructure& DStr,
|
||||
Handle(GeomAdaptor_HSurface)
|
||||
plan = new GeomAdaptor_HSurface(GeomAdaptor_Surface(pln));
|
||||
|
||||
// intersection plan spine.
|
||||
// intersection plane spine.
|
||||
Standard_Boolean found = Standard_False;
|
||||
Standard_Boolean fini = Standard_False;
|
||||
Standard_Integer sens = 1;
|
||||
@@ -322,7 +320,7 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD,
|
||||
const Standard_Integer cntlFiOnS)
|
||||
{
|
||||
TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS();
|
||||
//On recupere points et tangentes sur edge et spine.
|
||||
// Return points and tangents on edge and spine.
|
||||
Standard_Real wtg = SD->InterferenceOnS1().Parameter(isfirst);
|
||||
Standard_Boolean bid;
|
||||
Standard_Real wsp = ParamOnSpine(DStr,wtg,SD,Spine,iedge,0,0,tolesp,bid);
|
||||
@@ -332,7 +330,7 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD,
|
||||
|
||||
|
||||
const BRepAdaptor_Curve& bc = Spine->CurrentElementarySpine(iedge);
|
||||
//Modif contre Vertex isole sur spine
|
||||
//Modif against Vertex isolated on spine
|
||||
TopoDS_Edge support = bc.Edge();
|
||||
TopExp::Vertices(support,bout1,bout2);
|
||||
if (support.Orientation() == TopAbs_REVERSED) {
|
||||
@@ -383,7 +381,7 @@ void ChFi3d_Builder::Trunc(const Handle(ChFiDS_SurfData)& SD,
|
||||
}
|
||||
}
|
||||
}
|
||||
//modif de lvt contre vertex isole
|
||||
//modification of lvt against isolated vertex
|
||||
if(!tron && YaUnVoisin(Spine,iedge,ivois,isfirst)) {
|
||||
TopTools_ListIteratorOfListOfShape It;
|
||||
Standard_Integer nbed = -2;
|
||||
@@ -503,7 +501,7 @@ static Standard_Boolean Tri(const Geom2dHatch_Hatcher& H,
|
||||
if (iSansFirst != 0) {
|
||||
if (iSansLast == 0) {
|
||||
#ifdef DEB
|
||||
cout<<"Tri : Pb de Hatcher"<<endl;
|
||||
cout<<"Parsing : Pb of Hatcher"<<endl;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
@@ -561,7 +559,7 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr,
|
||||
CD->ChangeVertex(isFirst,ons).SetPoint(Surf->Value(x,y));
|
||||
}
|
||||
else {
|
||||
//Modification pour tromper les vertex deja existants
|
||||
//Modification to find already existing vertexes
|
||||
Standard_Integer LeType = 1;
|
||||
Standard_Integer NbInt = pPH->NbPoints();
|
||||
if (NbInt>1) {
|
||||
@@ -626,8 +624,7 @@ static void FillSD (TopOpeBRepDS_DataStructure& DStr,
|
||||
|
||||
//=======================================================================
|
||||
//function : SplitKPart
|
||||
//purpose : Reconstitue les SurfData en fonction des restrictions
|
||||
// des faces.
|
||||
//purpose : Reconstruct SurfData depending on restrictions of faces.
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
@@ -642,7 +639,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
Standard_Boolean& intf,
|
||||
Standard_Boolean& intl)
|
||||
{
|
||||
//On lance le hachurage de chacune des faces par les lignes de tangence.
|
||||
//The the hatching of each faces is started by tangency lines.
|
||||
|
||||
Standard_Real pitol = Precision::PIntersection();
|
||||
|
||||
@@ -654,7 +651,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
#endif
|
||||
Standard_Integer Nb1 = 1,Nb2 = 1;
|
||||
|
||||
// Decoupe des lignes de tangence (hachurage).
|
||||
// Cutting of tangency lines (hatching).
|
||||
Geom2dHatch_Intersector Inter(pitol,pitol);
|
||||
Geom2dHatch_Hatcher H1(Inter,tol2d,tolesp), H2(Inter,tol2d,tolesp);
|
||||
Standard_Integer ie;
|
||||
@@ -678,7 +675,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
Nb1 = H1.NbDomains(iH1);
|
||||
if(Nb1 == 0) {
|
||||
#ifdef DEB
|
||||
cout<<"SplitKPart : ligne de tangence en dehors de la face"<<endl;
|
||||
cout<<"SplitKPart : tangency line out of the face"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -704,13 +701,13 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
Nb2 = H2.NbDomains(iH2);
|
||||
if(Nb2 == 0) {
|
||||
#ifdef DEB
|
||||
cout<<"SplitKPart : ligne de tangence en dehors de la face"<<endl;
|
||||
cout<<"SplitKPart : tangency line out of the face"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
|
||||
//Recuperation des vertex deb et fin de Spine
|
||||
//Return start and end vertexes of the Spine
|
||||
TopoDS_Vertex bout1,bout2,boutemp;
|
||||
const BRepAdaptor_Curve& bc = Spine->CurrentElementarySpine(Iedge);
|
||||
TopoDS_Edge support = bc.Edge();
|
||||
@@ -721,7 +718,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
bout1 = boutemp;
|
||||
}
|
||||
|
||||
// Recuperation des faces.
|
||||
// Return faces.
|
||||
TopoDS_Face F1, F2;
|
||||
Handle(BRepAdaptor_HSurface)
|
||||
bhs = Handle(BRepAdaptor_HSurface)::DownCast(S1);
|
||||
@@ -730,7 +727,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
if(!bhs.IsNull()) F2 = bhs->ChangeSurface().Face();
|
||||
TopoDS_Face FBID;
|
||||
|
||||
// Restriction des SurfDatas par les lignes decoupees.
|
||||
// Restriction of SurfDatas by cut lines.
|
||||
TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS();
|
||||
Handle(ChFiDS_SurfData) CD = Data;
|
||||
CD->ChangeIndexOfS1(DStr.AddShape(F1));
|
||||
@@ -746,22 +743,21 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
|
||||
if (C1.IsNull() && C2.IsNull()) {
|
||||
#ifdef DEB
|
||||
cout<<"SplitData : 2 lignes nulles hachurage impossible"<<endl;
|
||||
cout<<"SplitData : 2 zero lines hatching impossible"<<endl;
|
||||
#endif
|
||||
return Standard_False;
|
||||
}
|
||||
else if (C1.IsNull() || (Nb1 == 1 && !H1.Domain(iH1,1).HasFirstPoint())) {
|
||||
// On verifie que le point 2d de l arete degeneree est bien dans
|
||||
// la face.
|
||||
// It is checked if the point 2d of the degenerated edge is in the face.
|
||||
if (C1.IsNull()) {
|
||||
gp_Pnt2d p2d1 = CD->Get2dPoints(0,1);
|
||||
TopAbs_State situ = I1->Classify(p2d1,1.e-8,0);
|
||||
if(situ == TopAbs_OUT) return Standard_False;
|
||||
}
|
||||
|
||||
// Tri des domaines par parametres croissants,
|
||||
// Parsing of domains by increasing parameters,
|
||||
if(!Tri(H2,iH2,Ind2,wref,0.,pitol,Nb2)) return 0;
|
||||
// Remplissage des SurfData
|
||||
// Filling of SurfData
|
||||
for(Standard_Integer i = 1; i <= Nb2; i++) {
|
||||
const HatchGen_Domain& Dom2 = H2.Domain(iH2,Ind2(i));
|
||||
FillSD(DStr,CD,M2,Dom2,Dom2.FirstPoint().Parameter(),1,2,pitol,bout1);
|
||||
@@ -787,17 +783,16 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
}
|
||||
else if (C2.IsNull() || (Nb2 == 1 && !H2.Domain(iH2,1).HasFirstPoint())) {
|
||||
// On verifie que le point 2d de l arete degeneree est bien dans
|
||||
// la face.
|
||||
// It is checked if the point 2d of the degenerated is in the face.
|
||||
if (C2.IsNull()) {
|
||||
gp_Pnt2d p2d2 = CD->Get2dPoints(0,2);
|
||||
TopAbs_State situ = I2->Classify(p2d2,1.e-8,0);
|
||||
if(situ == TopAbs_OUT) return Standard_False;
|
||||
}
|
||||
|
||||
// Tri des domaines par parametres croissants,
|
||||
// Parsing of domains by increasing parameters,
|
||||
if(!Tri(H1,iH1,Ind1,wref,0.,pitol,Nb1)) return 0;
|
||||
// Remplissage des SurfData
|
||||
// Filling of SurfData
|
||||
for(Standard_Integer i = 1; i <= Nb1; i++) {
|
||||
const HatchGen_Domain& Dom1 = H1.Domain(iH1,Ind1(i));
|
||||
FillSD(DStr,CD,M1,Dom1,Dom1.FirstPoint().Parameter(),1,1,pitol,bout1);
|
||||
@@ -824,9 +819,8 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
else {
|
||||
|
||||
// Tri des domaines par parametres croissants,
|
||||
// lorsqu il y a un cercle 2d sur un plan, on
|
||||
// se cale sur la ligne 2d d en face.
|
||||
// Parsing of domains by increasing parameters,
|
||||
// if there is a 2d circle on a plane, one goes on 2D line of opposite face.
|
||||
Standard_Real period1 = 0., period2 = 0.;
|
||||
if(ll1.IsPeriodic()) {
|
||||
if(!Tri(H2,iH2,Ind2,wref,0.,pitol,Nb2)) return 0;
|
||||
@@ -840,7 +834,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
|
||||
|
||||
// Remplissage des SurfData
|
||||
// Filling of SurfData
|
||||
TColStd_SequenceOfInteger ion1, ion2;
|
||||
for(Standard_Integer i = 1; i <= Nb1; i++) {
|
||||
const HatchGen_Domain& Dom1 = H1.Domain(iH1,Ind1(i));
|
||||
@@ -878,15 +872,15 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
}
|
||||
|
||||
// Traitement des prolongements.
|
||||
// Ne pas tronquer, sinon, pb d'intersection pour les PerformCorner
|
||||
// Processing of extensions.
|
||||
// Do not truncate, otherwise, problems of intersection for PerformCorner
|
||||
// -----------------------------------------------------------------
|
||||
// A l'appel de SplitKPart dans PerformSetOfKPart, les spines ont ete
|
||||
// justement, prolongees aux extremites par les methodes Extent pour permettre
|
||||
// les intersections. On conserve les extensions des SurfData.
|
||||
// After call of SplitKPart in PerformSetOfKPart, spines have been
|
||||
// extended to the extremities by methods Extent to permit
|
||||
// intersections. Extensions of SurfData are preserved.
|
||||
|
||||
if(intf) {
|
||||
// On est en debut de spine
|
||||
// We are at the beginning of the spine
|
||||
//-------------------------
|
||||
Standard_Integer ifirst = 0;
|
||||
Standard_Real dist = RealLast(), ptg, dsp;
|
||||
@@ -978,7 +972,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
}
|
||||
if(intl) {
|
||||
// on est en fin de spine
|
||||
// we are at the end of the spine
|
||||
//-----------------------
|
||||
Standard_Integer ilast = 0;
|
||||
Standard_Real dist = RealLast(), ptg, dsp;
|
||||
@@ -1075,7 +1069,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
|
||||
if(!intf) {
|
||||
// On vire les SurfData entierement avant le debut de l'arete.
|
||||
// SurfData are entirely suspended before the beginning of the edge.
|
||||
Standard_Boolean okdoc = SetData.IsEmpty();
|
||||
Standard_Integer i = 1;
|
||||
while(!okdoc) {
|
||||
@@ -1088,7 +1082,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
}
|
||||
if(!intl) {
|
||||
// On vire les SurfData entierement apres la fin de l'arete.
|
||||
// SurfData are entirely suspended after the end of the edge.
|
||||
Standard_Boolean okdoc = SetData.IsEmpty();
|
||||
Standard_Integer i = 1;
|
||||
while(!okdoc) {
|
||||
@@ -1102,7 +1096,7 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
okdoc = (SetData.IsEmpty() || i > SetData.Length());
|
||||
}
|
||||
}
|
||||
// Ajout des parametres de la spine sur les SurfDatas.
|
||||
// Add parameters of the spine on SurfDatas.
|
||||
// for (Standard_Integer i = 1; i <= SetData.Length(); i++) {
|
||||
Standard_Integer i;
|
||||
for ( i = 1; i <= SetData.Length(); i++) {
|
||||
@@ -1125,11 +1119,11 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
}
|
||||
|
||||
if (intf && !SetData.IsEmpty()) {
|
||||
// prolongement de la spine par extension
|
||||
// extension of the spine
|
||||
Spine->SetFirstParameter(SetData.First()->FirstSpineParam());
|
||||
}
|
||||
else {
|
||||
// Troncature au debut.
|
||||
// Trnncation at the beginning.
|
||||
for (i = 1; i <= SetData.Length(); i++) {
|
||||
Handle(ChFiDS_SurfData)& CD8 = SetData.ChangeValue(i);
|
||||
Standard_Real fsp = CD8->FirstSpineParam();
|
||||
@@ -1151,11 +1145,11 @@ Standard_Boolean ChFi3d_Builder::SplitKPart
|
||||
|
||||
|
||||
if (intl && !SetData.IsEmpty()) {
|
||||
// prolongement de la spine par extension
|
||||
// extension of the spine
|
||||
Spine->SetLastParameter(SetData.Last()->LastSpineParam());
|
||||
}
|
||||
else {
|
||||
// Troncature a la fin.
|
||||
// Truncation at the end.
|
||||
for (i = SetData.Length(); i >= 1; i--) {
|
||||
Handle(ChFiDS_SurfData)& CD9 = SetData.ChangeValue(i);
|
||||
Standard_Real fsp = CD9->FirstSpineParam();
|
||||
|
@@ -80,10 +80,10 @@ void SearchCommonFaces(const ChFiDS_Map& EFMap,
|
||||
|
||||
//=======================================================================
|
||||
//function : ExtentSpinesOnCommonFace
|
||||
//purpose : Etend les spines des deux chanfreins de distances dis1,dis2
|
||||
// sur leur face commune
|
||||
// Les deux lignes guides Spine1 et Spine2 qui se coupent en V
|
||||
// isfirst(i) = False si Spine(i) est orientee vers V (i = 1,2)
|
||||
//purpose : Extend spines of two chamfers by distance dis1,dis2
|
||||
// on their common face
|
||||
// Two guide lines Spine1 and Spine2 cross in V
|
||||
// isfirst(i) = False if Spine(i) is oriented to V (i = 1,2)
|
||||
//=======================================================================
|
||||
|
||||
void ExtentSpineOnCommonFace(Handle(ChFiDS_Spine)& Spine1,
|
||||
@@ -96,8 +96,8 @@ void ExtentSpineOnCommonFace(Handle(ChFiDS_Spine)& Spine1,
|
||||
{
|
||||
Standard_Real tolesp = 1.e-7;
|
||||
|
||||
// On determine alpha, l'angle d'ouverture entre les
|
||||
// tangentes des deux lignes guides en V
|
||||
// alpha, the opening angle between two
|
||||
// tangents of two guidelines in V is found
|
||||
Standard_Real tga1,tga2;
|
||||
Standard_Real d1plus = 0., d2plus = 0.;
|
||||
|
||||
@@ -129,7 +129,7 @@ void ExtentSpineOnCommonFace(Handle(ChFiDS_Spine)& Spine1,
|
||||
d2plus = dis2/tga2;
|
||||
}
|
||||
|
||||
//on prolonge avec les distances calculees
|
||||
//extension by the calculated distance
|
||||
if (d1plus > 0.) {
|
||||
d1plus *= 3.;
|
||||
if (isfirst1){
|
||||
@@ -286,7 +286,7 @@ void ChFi3d_ChBuilder::SetDist(const Standard_Real Dis,
|
||||
|
||||
}
|
||||
else
|
||||
Standard_DomainError::Raise("la face n'est commune a aucune des edges du contour");
|
||||
Standard_DomainError::Raise("the face is not common to any of edges of the contour");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,7 @@ void ChFi3d_ChBuilder::SetDists(const Standard_Real Dis1,
|
||||
else csp->SetDists(Dis1,Dis2);
|
||||
}
|
||||
else
|
||||
Standard_DomainError::Raise("la face n'est commune a aucune des edges du contour");
|
||||
Standard_DomainError::Raise("the face is not common to any of edges of the contour");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -574,7 +574,7 @@ void ChFi3d_ChBuilder::SetDistAngle(const Standard_Real Dis,
|
||||
}
|
||||
}
|
||||
else
|
||||
Standard_DomainError::Raise("la face n'est commune a aucune des edges du contour");
|
||||
Standard_DomainError::Raise("the face is not common to any edges of the contour");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -647,11 +647,11 @@ void ChFi3d_ChBuilder::Simulate (const Standard_Integer IC)
|
||||
#ifdef DEB
|
||||
if(ChFi3d_GettraceCHRON()){
|
||||
simul.Stop();
|
||||
cout<<"Temps total simulation : ";
|
||||
cout<<"Total simulation time : ";
|
||||
simul.Show();
|
||||
cout<<"dont temps construction spine : ";
|
||||
cout<<"Spine construction time : ";
|
||||
elspine.Show();
|
||||
cout<<"et temps cheminement : ";
|
||||
cout<<"and progression time : ";
|
||||
chemine.Show();
|
||||
}
|
||||
#endif
|
||||
@@ -798,19 +798,19 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
|
||||
if (chsp.IsNull())
|
||||
Standard_ConstructionError::Raise
|
||||
("SimulSurf : la spine n est pas celle d un chanfrein");
|
||||
("SimulSurf : this is not the spine of a chamfer");
|
||||
|
||||
|
||||
Standard_Real radius;
|
||||
// Des parametres souples!!!
|
||||
// Flexible parameters!
|
||||
Standard_Real la = HGuide->LastParameter(), fi = HGuide->FirstParameter();
|
||||
Standard_Real longueur = la - fi;
|
||||
Standard_Real MaxStep = longueur * 0.05;
|
||||
Standard_Real radiusspine = 0, locfleche, w;
|
||||
gp_Pnt Pbid;
|
||||
gp_Vec d1,d2;
|
||||
// Puisque l ElSpine est parametree par une quasi-abscissecurviligne,
|
||||
// on evalue le rayon min par 1/D2 max;
|
||||
// As ElSpine is parameterized by a curvilinear quasi-abscissa,
|
||||
// the min radius is estimated as 1/D2 max;
|
||||
//for(Standard_Integer i = 0; i <= 20; i++){
|
||||
Standard_Integer i;
|
||||
for( i = 0; i <= 20; i++){
|
||||
@@ -831,7 +831,7 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
Standard_Real dis;
|
||||
chsp->GetDist(dis);
|
||||
radius = Max(dis, radiusspine);
|
||||
locfleche = radius*1.e-2; //critere graphique
|
||||
locfleche = radius*1.e-2; //graphic criterion
|
||||
|
||||
BRepBlend_Chamfer Func(S1,S2,HGuide);
|
||||
BRepBlend_ChamfInv FInv(S1,S2,HGuide);
|
||||
@@ -911,7 +911,7 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
chsp->Dists(dis1, dis2);
|
||||
radius = Max(dis1, dis2);
|
||||
radius = Max(radius, radiusspine);
|
||||
locfleche = radius*1.e-2; //critere graphique
|
||||
locfleche = radius*1.e-2; //graphic criterion
|
||||
|
||||
BRepBlend_Chamfer Func(S1,S2,HGuide);
|
||||
BRepBlend_ChamfInv FInv(S1,S2,HGuide);
|
||||
@@ -992,7 +992,7 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
chsp->GetDistAngle(dis, angle, disonF1);
|
||||
radius = Max(dis, dis * tan(angle));
|
||||
radius = Max(radius, radiusspine);
|
||||
locfleche = radius*1.e-2; //critere graphique
|
||||
locfleche = radius*1.e-2; //graphic criterion
|
||||
|
||||
Standard_Integer Ch = FindChoiceDistAngle(Choix, disonF1);
|
||||
|
||||
@@ -1271,7 +1271,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection
|
||||
|
||||
if (chsp.IsNull())
|
||||
Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un chanfrein");
|
||||
("PerformSurf : this is not the spine of a chamfer");
|
||||
|
||||
Standard_Real TolGuide = HGuide->Resolution(tolesp) ;
|
||||
|
||||
@@ -1284,7 +1284,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection
|
||||
Func.Set(dis,dis,Choix);
|
||||
BRepBlend_Walking TheWalk(S1,S2,I1,I2);
|
||||
|
||||
//calcul d'une solution de depart approchee
|
||||
//calculate an approximate starting solution
|
||||
gp_Vec TgF, TgL, tmp1, tmp2, d1gui;
|
||||
gp_Pnt pt1, pt2, ptgui;
|
||||
gp_XYZ temp;
|
||||
@@ -1341,7 +1341,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection
|
||||
Func.Set(dis1,dis2,Choix);
|
||||
BRepBlend_Walking TheWalk(S1,S2,I1,I2);
|
||||
|
||||
//calcul d'une solution de depart approchee
|
||||
//calculate an approximate starting solution
|
||||
gp_Vec TgF, TgL, tmp1, tmp2, d1gui;
|
||||
gp_Pnt pt1, pt2, ptgui;
|
||||
gp_XYZ temp;
|
||||
@@ -1402,7 +1402,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection
|
||||
Func.Set(dis1, angle, Ch);
|
||||
BRepBlend_Walking TheWalk(S1,S2,I1,I2);
|
||||
|
||||
//calcul d'une solution de depart approchee
|
||||
//calculate an approximate starting solution
|
||||
gp_Vec TgF, TgL, tmp1, tmp2, d1gui;
|
||||
gp_Pnt pt1, pt2, ptgui;
|
||||
gp_XYZ temp;
|
||||
@@ -1464,7 +1464,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection
|
||||
Func.Set(dis1, angle, Ch);
|
||||
BRepBlend_Walking TheWalk(S2,S1,I2,I1);
|
||||
|
||||
//calcul d'une solution de depart approchee
|
||||
//calculate an approximate starting solution
|
||||
gp_Vec TgF, TgL, tmp1, tmp2, d1gui;
|
||||
gp_Pnt pt1, pt2, ptgui;
|
||||
gp_XYZ temp;
|
||||
@@ -1573,7 +1573,7 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
|
||||
if (chsp.IsNull())
|
||||
Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un chanfrein");
|
||||
("PerformSurf : this is not the spine of a chamfer");
|
||||
|
||||
Standard_Boolean gd1,gd2,gf1,gf2;
|
||||
Handle(BRepBlend_Line) lin;
|
||||
@@ -1596,7 +1596,7 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
gd1,gd2,gf1,gf2,RecOnS1,RecOnS2);
|
||||
if(!done) return Standard_False; // ratrappage possible PMN 14/05/1998
|
||||
done = CompleteData(Data,Func,lin,S1,S2,Or,gd1,gd2,gf1,gf2);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Fail of approximation!");
|
||||
}
|
||||
else if (chsp->IsChamfer() == ChFiDS_TwoDist) {
|
||||
BRepBlend_Chamfer Func(S1,S2,HGuide);
|
||||
@@ -1612,7 +1612,7 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
gd1,gd2,gf1,gf2,RecOnS1,RecOnS2);
|
||||
if(!done) return Standard_False; // ratrappage possible PMN 14/05/1998
|
||||
done = CompleteData(Data,Func,lin,S1,S2,Or,gd1,gd2,gf1,gf2);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Fail of approximation!");
|
||||
}
|
||||
else {
|
||||
Standard_Real d1, angle;
|
||||
@@ -1634,7 +1634,7 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
|
||||
if(!done) return Standard_False; // ratrappage possible PMN 14/05/1998
|
||||
done = CompleteData(Data,Func,lin,S1,S2,Or,gd1,gd2,gf1,gf2);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Fail of approximation!");
|
||||
}
|
||||
else {
|
||||
Standard_Real Rtemp;
|
||||
@@ -1665,7 +1665,7 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
Data->ChangeVertexLastOnS2() = tmp;
|
||||
if(!done) return Standard_False; // ratrappage possible PMN 14/05/1998
|
||||
done = CompleteData(Data,Func,lin,S1,S2,Or2,gd1,gd2,gf1,gf2, Standard_True);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Fail of approximation!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1766,7 +1766,7 @@ void ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& ,
|
||||
//=======================================================================
|
||||
//function : ExtentOneCorner
|
||||
//purpose : extends the spine of the stripe S on the side of the vertex V
|
||||
// PMN : 28/11/97 : Reprend le code des conges, et cela semble marcher mieux...
|
||||
// PMN : 28/11/97 : Reproduces the code of fillets, and it seems to work better...
|
||||
//=======================================================================
|
||||
|
||||
void ChFi3d_ChBuilder::ExtentOneCorner(const TopoDS_Vertex& V,
|
||||
@@ -1776,7 +1776,7 @@ void ChFi3d_ChBuilder::ExtentOneCorner(const TopoDS_Vertex& V,
|
||||
Standard_Real Coeff = 0.5;
|
||||
Handle(ChFiDS_Spine) Spine = S->Spine();
|
||||
ChFi3d_IndexOfSurfData(V,S,Sens);
|
||||
if (Spine->IsTangencyExtremity((Sens == 1))) return; //Pas de prolongement sur queue
|
||||
if (Spine->IsTangencyExtremity((Sens == 1))) return; //No extension on queue
|
||||
Standard_Real dU = Spine->LastParameter(Spine->NbEdges());
|
||||
if (Sens == 1) {
|
||||
Spine->SetFirstParameter(-dU*Coeff);
|
||||
@@ -1939,7 +1939,7 @@ void ChFi3d_ChBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
}
|
||||
else {
|
||||
chsp[i]->GetDistAngle(tmd, tmpang, disonF1);
|
||||
// on fait un calcul grossier de la distance 2
|
||||
// an approximate calculation of distance 2 is done
|
||||
if (disonF1) {
|
||||
d[j] = tmd;
|
||||
d[j+1] = tmd * tan(tmpang);
|
||||
@@ -1983,8 +1983,8 @@ void ChFi3d_ChBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
|
||||
if (State[0] == ChFiDS_AllSame ){
|
||||
/*
|
||||
// On cherche l'intersection du chanfrein le plus gros (sur l'arete incidente)
|
||||
// avec la face en bout
|
||||
// The greatest intersection of the chamfer is found (on the incident edge)
|
||||
// with the face at end
|
||||
i = 0;
|
||||
j = 1;
|
||||
if(dOnArc[j] > dOnArc[i]) {
|
||||
@@ -1994,7 +1994,7 @@ void ChFi3d_ChBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
}
|
||||
ExtentOneCorner( V, Stripe[i] ); */
|
||||
|
||||
// il faut que les deux chanfreins touchent la face en bout
|
||||
// it is necessary that two chamfers touch the face at end
|
||||
for (j=0; j<2; j++)
|
||||
ExtentOneCorner( V, Stripe[j] );
|
||||
}
|
||||
@@ -2066,7 +2066,7 @@ void ChFi3d_ChBuilder::ExtentThreeCorner(const TopoDS_Vertex& V,
|
||||
}
|
||||
else {
|
||||
chsp[i]->GetDistAngle(tmd, tmpangle, disonF1);
|
||||
// on fait un calcul grossier de la distance 2
|
||||
// an approximate calculation of distance 2 is done
|
||||
|
||||
if (disonF1) {
|
||||
d[i][0] = tmd;
|
||||
@@ -2080,8 +2080,8 @@ void ChFi3d_ChBuilder::ExtentThreeCorner(const TopoDS_Vertex& V,
|
||||
}
|
||||
|
||||
|
||||
// dis[i][j] la distance du chanfrein i sur la face commune avec
|
||||
// le chanfrein j
|
||||
// dis[i][j] distance from chamfer i on the common face with
|
||||
// chamfer j
|
||||
Standard_Real dis[3][3];
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
@@ -2176,8 +2176,7 @@ void ChFi3d_ChBuilder::SetRegul()
|
||||
|
||||
//=======================================================================
|
||||
//function : ConexFaces
|
||||
//purpose : F1, F2 connexes a l'edge telles que F1 corresponde
|
||||
// a dis
|
||||
//purpose : F1, F2 are connected to edge so that F1 corresponds to distance
|
||||
//=======================================================================
|
||||
|
||||
void ChFi3d_ChBuilder::ConexFaces (const Handle(ChFiDS_Spine)& Spine,
|
||||
@@ -2190,7 +2189,7 @@ void ChFi3d_ChBuilder::ConexFaces (const Handle(ChFiDS_Spine)& Spine,
|
||||
Standard_Integer RC,Choix;
|
||||
TopoDS_Face f1,f2,ff1,ff2;
|
||||
|
||||
//calcul de l'orientation de reference
|
||||
//calculate the reference orientation
|
||||
// ChFi3d_Builder::StripeOrientations is private
|
||||
SearchCommonFaces(myEFMap,Spine->Edges(1),ff1,ff2);
|
||||
ff1.Orientation(TopAbs_FORWARD);
|
||||
@@ -2199,7 +2198,7 @@ void ChFi3d_ChBuilder::ConexFaces (const Handle(ChFiDS_Spine)& Spine,
|
||||
Sb2.Initialize(ff2);
|
||||
RC = ChFi3d::ConcaveSide(Sb1,Sb2,Spine->Edges(1),tmp1,tmp2);
|
||||
|
||||
//calcul des faces connexes
|
||||
//calculate the connected faces
|
||||
SearchCommonFaces(myEFMap,Spine->Edges(IEdge),f1,f2);
|
||||
Sb1.Initialize(f1);
|
||||
Sb2.Initialize(f2);
|
||||
@@ -2218,8 +2217,7 @@ void ChFi3d_ChBuilder::ConexFaces (const Handle(ChFiDS_Spine)& Spine,
|
||||
|
||||
//=======================================================================
|
||||
//function : FindChoiceDistAngle
|
||||
//purpose : F1, F2 connexes a l'edge telles que F1 corresponde
|
||||
// a dis
|
||||
//purpose : F1, F2 connected to the edge so that F1 corresponds to distance
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer ChFi3d_ChBuilder::FindChoiceDistAngle(const Standard_Integer Choice,
|
||||
|
@@ -33,7 +33,7 @@ OSD_Chronometer simul,elspine,chemine;
|
||||
#endif
|
||||
|
||||
//*********************************
|
||||
// chronometrage de la simulation
|
||||
// timing of the simulation
|
||||
//*********************************
|
||||
|
||||
static Standard_Boolean ChFi3d_traceCHRON = Standard_False;
|
||||
@@ -43,7 +43,7 @@ Standard_Boolean ChFi3d_GettraceCHRON()
|
||||
{ return ChFi3d_traceCHRON; }
|
||||
|
||||
//*********************************
|
||||
// trace d une ligne de cheminement
|
||||
// trace a line of path
|
||||
//*********************************
|
||||
|
||||
static Standard_Boolean ChFi3d_traceDRAWWALK = Standard_False;
|
||||
@@ -53,7 +53,7 @@ Standard_Boolean ChFi3d_GettraceDRAWWALK()
|
||||
{ return ChFi3d_traceDRAWWALK; }
|
||||
|
||||
//**********************************
|
||||
// trace d une ligne d intersection
|
||||
// trace a line of intersection
|
||||
//**********************************
|
||||
|
||||
static Standard_Boolean ChFi3d_traceDRAWINT = Standard_False;
|
||||
@@ -63,7 +63,7 @@ Standard_Boolean ChFi3d_GettraceDRAWINT()
|
||||
{ return ChFi3d_traceDRAWINT; }
|
||||
|
||||
//*************************************************
|
||||
// recuperation des surfaces des conges approximes.
|
||||
// return surfaces of approximated fillets.
|
||||
//*************************************************
|
||||
|
||||
static Standard_Boolean ChFi3d_traceDRAWFIL = Standard_False;
|
||||
@@ -74,7 +74,7 @@ Standard_Boolean ChFi3d_GettraceDRAWFIL()
|
||||
|
||||
|
||||
//*************************************************
|
||||
// recuperation des faces elargie pour le cheminement.
|
||||
// return extended faces for the path.
|
||||
//*************************************************
|
||||
|
||||
static Standard_Boolean ChFi3d_traceDRAWENLARGE = Standard_False;
|
||||
@@ -84,7 +84,7 @@ Standard_Boolean ChFi3d_GettraceDRAWENLARGE()
|
||||
{ return ChFi3d_traceDRAWENLARGE; }
|
||||
|
||||
//*************************************************
|
||||
// recuperation de la ligne guide pour les coins triples.
|
||||
// return the guideline for the triple corners.
|
||||
//*************************************************
|
||||
|
||||
static Standard_Boolean ChFi3d_traceDRAWSPINE = Standard_False;
|
||||
@@ -94,7 +94,7 @@ Standard_Boolean ChFi3d_GettraceDRAWSPINE()
|
||||
{ return ChFi3d_traceDRAWSPINE; }
|
||||
|
||||
//*************************************************
|
||||
// set du type de ligne guide pour les coins triples.
|
||||
// set the type of guideline for the triple corners.
|
||||
//*************************************************
|
||||
|
||||
void ChFi3d_SetcontextSPINEBEZIER(const Standard_Boolean b);
|
||||
@@ -135,7 +135,7 @@ Standard_Boolean ChFi3d_GetcontextSPINECE()
|
||||
{ return ChFi3d_contextSPINECE; }
|
||||
|
||||
//*************************************************
|
||||
// Passage force par le cheminement pour les KPart
|
||||
// Forced passage by the path for KPart
|
||||
//*************************************************
|
||||
static Standard_Boolean ChFi3d_contextFORCEBLEND = Standard_False;
|
||||
void ChFi3d_SetcontextFORCEBLEND(const Standard_Boolean b)
|
||||
@@ -150,7 +150,7 @@ Standard_Boolean ChFi3d_GetcontextFORCEFILLING()
|
||||
{ return ChFi3d_contextFORCEFILLING; }
|
||||
|
||||
//*************************************************
|
||||
// Pas d optimisation pour les approx
|
||||
// No optimization for approx
|
||||
//*************************************************
|
||||
static Standard_Boolean ChFi3d_contextNOOPT = Standard_False;
|
||||
void ChFi3d_SetcontextNOOPT(const Standard_Boolean b)
|
||||
@@ -159,7 +159,7 @@ Standard_Boolean ChFi3d_GetcontextNOOPT()
|
||||
{ return ChFi3d_contextNOOPT; }
|
||||
|
||||
// ***********************************************
|
||||
// initialisation et resultat d'un chrono
|
||||
// initialization and result of a chrono
|
||||
//************************************************
|
||||
Standard_EXPORT void ChFi3d_InitChron(OSD_Chronometer& ch)
|
||||
{
|
||||
@@ -179,9 +179,8 @@ Standard_EXPORT void ChFi3d_ResultChron( OSD_Chronometer & ch,
|
||||
|
||||
//==============================================================
|
||||
// function : ChFi3d_CheckSurfData
|
||||
// purpose : fonction permettant de tracer une SurfData afin
|
||||
// de verifier la bonne construction de tous les
|
||||
// elements, notamment des pcurves
|
||||
// purpose : function allows to trace SurfData to check
|
||||
// construction of all elements, namely pcurves
|
||||
//==============================================================
|
||||
#ifdef DRAW
|
||||
static Standard_Integer NbSD = 0;
|
||||
@@ -189,8 +188,8 @@ static Standard_Integer NbSD = 0;
|
||||
void ChFi3d_CheckSurfData(const TopOpeBRepDS_DataStructure& DStr,
|
||||
const Handle(ChFiDS_SurfData)& Data)
|
||||
{
|
||||
//trace de la surface definie par le chanfrein ou le conge
|
||||
// correspondant a la SurfData
|
||||
//trace of the surface defined by the chamfer or the fillet
|
||||
// corresponding to SurfData
|
||||
|
||||
Handle(Geom_Surface) surf = (DStr.Surface( Data->Surf())).Surface();
|
||||
if (!surf.IsNull()){
|
||||
|
@@ -417,7 +417,7 @@ void ChFi3d_FilBuilder::SetLaw(const Standard_Integer IC,
|
||||
const TopoDS_Edge& E,
|
||||
const Handle(Law_Function)& L)
|
||||
{
|
||||
// Voir si il ne faut pas faire un controle des bounds ici!!!!!
|
||||
// Check if it is necessary to check borders!
|
||||
if(IC <= NbElements()) {
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Value(IC));
|
||||
fsp->ChangeLaw(E) = L;
|
||||
@@ -448,11 +448,11 @@ void ChFi3d_FilBuilder::Simulate (const Standard_Integer IC)
|
||||
#ifdef DEB
|
||||
if(ChFi3d_GettraceCHRON()){
|
||||
simul.Stop();
|
||||
cout<<"Temps total simulation : ";
|
||||
cout<<"Total simulation time : ";
|
||||
simul.Show();
|
||||
cout<<"dont temps construction spine : ";
|
||||
cout<<"Spine construction time : ";
|
||||
elspine.Show();
|
||||
cout<<"et temps cheminement : ";
|
||||
cout<<"and process time : ";
|
||||
chemine.Show();
|
||||
}
|
||||
#endif
|
||||
@@ -613,12 +613,12 @@ ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
{
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("SimulSurf : la spine n est pas celle d un conge");
|
||||
("SimulSurf : this is not the spine of the fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
#ifdef DEB
|
||||
// TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation();
|
||||
#endif
|
||||
// Des parametres souples!!!
|
||||
// Flexible parameters!!!
|
||||
Standard_Real locfleche, MaxStep;
|
||||
SimulParams(HGuide,fsp,MaxStep,locfleche);
|
||||
Handle(ChFiDS_SecHArray1) sec;
|
||||
@@ -757,10 +757,10 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
{
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : this is not the spine of the fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
|
||||
// Des parametres souples!!!
|
||||
// Flexible parameters!
|
||||
Standard_Real locfleche, MaxStep;
|
||||
SimulParams(HGuide,fsp,MaxStep,locfleche);
|
||||
Handle(ChFiDS_SecHArray1) sec;
|
||||
@@ -793,7 +793,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
PFirst,MaxStep,locfleche,TolGuide,First,Last,
|
||||
Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) {
|
||||
Standard_Failure::Raise("SimulSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("SimulSurf : Failed process!");
|
||||
}
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
sec = new ChFiDS_SecHArray1(1,nbp);
|
||||
@@ -832,7 +832,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
func,finv,finvp,finvc,
|
||||
PFirst,MaxStep,locfleche,TolGuide,First,Last,
|
||||
Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Echec !");
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Fail !");
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
sec = new ChFiDS_SecHArray1(1,nbp);
|
||||
for(Standard_Integer i = 1; i <= nbp; i++){
|
||||
@@ -880,7 +880,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
const Handle(BRepAdaptor_HSurface)& HSref2,
|
||||
const Handle(BRepAdaptor_HCurve2d)& PCref2,
|
||||
Standard_Boolean& Decroch2,
|
||||
const Standard_Real /*Fleche*/,
|
||||
const Standard_Real /*Arrow*/,
|
||||
const Standard_Real TolGuide,
|
||||
Standard_Real& First,
|
||||
Standard_Real& Last,
|
||||
@@ -894,10 +894,10 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
{
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : it is not the spine of a fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
|
||||
// Des parametres souples!!!
|
||||
// Flexible parameters!
|
||||
Standard_Real locfleche, MaxStep;
|
||||
SimulParams(HGuide,fsp,MaxStep,locfleche);
|
||||
Handle(ChFiDS_SecHArray1) sec;
|
||||
@@ -929,7 +929,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
func,finv,finvp,finvc,
|
||||
PFirst,MaxStep,locfleche,TolGuide,First,Last,
|
||||
Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Echec cheminement!");
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Failed Processing!");
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
sec = new ChFiDS_SecHArray1(1,nbp);
|
||||
for(Standard_Integer i = 1; i <= nbp; i++){
|
||||
@@ -967,7 +967,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
func,finv,finvp,finvc,
|
||||
PFirst,MaxStep,locfleche,TolGuide,First,Last,
|
||||
Soldep,4,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Echec !");
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Fail !");
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
sec = new ChFiDS_SecHArray1(1,nbp);
|
||||
for(Standard_Integer i = 1; i <= nbp; i++){
|
||||
@@ -1037,10 +1037,10 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
{
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : it is not the spine of a fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
|
||||
// Des parametres souples!!!
|
||||
// Flexible parameters!
|
||||
Standard_Real locfleche, MaxStep;
|
||||
SimulParams(HGuide,fsp,MaxStep,locfleche);
|
||||
Handle(ChFiDS_SecHArray1) sec;
|
||||
@@ -1082,7 +1082,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
func, finv1, finvp1, finv2, finvp2,
|
||||
PFirst, MaxStep, locfleche, TolGuide, First, Last,
|
||||
Soldep, 4, Inside, Appro, Forward, RecP1, RecRst1, RecP2, RecRst2);
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Echec cheminement!");
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Failed processing!");
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
sec = new ChFiDS_SecHArray1(1,nbp);
|
||||
for(Standard_Integer i = 1; i <= nbp; i++){
|
||||
@@ -1135,7 +1135,7 @@ void ChFi3d_FilBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data,
|
||||
PFirst, MaxStep, locfleche, TolGuide, First, Last,
|
||||
Soldep, 4, Inside, Appro, Forward, RecP1, RecRst1, RecP2, RecRst2);
|
||||
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Echec !");
|
||||
if(!done) Standard_Failure::Raise("SimulSurf : Fail !");
|
||||
Standard_Integer nbp = lin->NbPoints();
|
||||
sec = new ChFiDS_SecHArray1(1, nbp);
|
||||
for(Standard_Integer i = 1; i <= nbp; i++){
|
||||
@@ -1192,7 +1192,7 @@ Standard_Boolean ChFi3d_FilBuilder::PerformFirstSection
|
||||
{
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : this is not the spine of a fillet");
|
||||
Standard_Real TolGuide = HGuide->Resolution(tolesp);
|
||||
if(fsp->IsConstant()){
|
||||
BRepBlend_ConstRad Func(S1,S2,HGuide);
|
||||
@@ -1246,7 +1246,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
Handle(ChFiDS_SurfData) Data = SeqData(1);
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : this is not the spine of a fillet");
|
||||
Standard_Boolean gd1,gd2,gf1,gf2, maybesingular;
|
||||
Handle(BRepBlend_Line) lin;
|
||||
TopAbs_Orientation Or = S1->ChangeSurface().Face().Orientation();
|
||||
@@ -1273,7 +1273,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
ChFi3d_ResultChron(ch , t_computedata);// result perf ComputeData
|
||||
#endif
|
||||
|
||||
if(!done) return Standard_False; // ratrappage possible PMN 14/05/1998
|
||||
if(!done) return Standard_False; // recovery is possible PMN 14/05/1998
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch);// init perf CompleteData
|
||||
@@ -1285,7 +1285,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
ChFi3d_ResultChron(ch , t_completedata);// result perf CompleteData
|
||||
#endif
|
||||
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (Func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
else {
|
||||
@@ -1319,7 +1319,7 @@ ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
ChFi3d_ResultChron(ch , t_completedata);// result perf CompleteData
|
||||
#endif
|
||||
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (Func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
if (maybesingular) SplitSurf(SeqData, lin);
|
||||
@@ -1360,7 +1360,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Handle(ChFiDS_SurfData) Data = SeqData(1);
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : this is not the spine of a fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
Standard_Real PFirst = First;
|
||||
Standard_Boolean maybesingular;
|
||||
@@ -1392,11 +1392,11 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) {
|
||||
Spine->SetErrorStatus(ChFiDS_WalkingFailure);
|
||||
Standard_Failure::Raise("PerformSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("PerformSurf : Failed processing!");
|
||||
}
|
||||
TopAbs_Orientation Or = HS2->ChangeSurface().Face().Orientation();
|
||||
done = CompleteData(Data,func,lin,HS1,HS2,Or,1);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
else {
|
||||
@@ -1426,11 +1426,11 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) {
|
||||
Spine->SetErrorStatus(ChFiDS_WalkingFailure);
|
||||
Standard_Failure::Raise("PerformSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("PerformSurf : Failed processing!");
|
||||
}
|
||||
TopAbs_Orientation Or = HS2->ChangeSurface().Face().Orientation();
|
||||
done = CompleteData(Data,func,lin,HS1,HS2,Or,1);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
if (maybesingular) SplitSurf(SeqData, lin);
|
||||
@@ -1470,7 +1470,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Handle(ChFiDS_SurfData) Data = SeqData(1);;
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : this is not the spine of a fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
Standard_Real PFirst = First;
|
||||
Standard_Boolean maybesingular;
|
||||
@@ -1502,11 +1502,11 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) {
|
||||
Spine->SetErrorStatus(ChFiDS_WalkingFailure);
|
||||
Standard_Failure::Raise("PerformSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("PerformSurf : Failed processing!");
|
||||
}
|
||||
TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
|
||||
done = CompleteData(Data,func,lin,HS1,HS2,Or,0);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
else {
|
||||
@@ -1534,11 +1534,11 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Soldep,Inside,Appro,Forward,RecP,RecS,RecRst);
|
||||
if(!done) {
|
||||
Spine->SetErrorStatus(ChFiDS_WalkingFailure);
|
||||
Standard_Failure::Raise("PerformSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("PerformSurf : Failed processing!");
|
||||
}
|
||||
TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
|
||||
done = CompleteData(Data,func,lin,HS1,HS2,Or,0);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
if (maybesingular) SplitSurf(SeqData, lin);
|
||||
@@ -1589,7 +1589,7 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Handle(ChFiDS_SurfData) Data = SeqData(1);;
|
||||
Handle(ChFiDS_FilSpine) fsp = Handle(ChFiDS_FilSpine)::DownCast(Spine);
|
||||
if(fsp.IsNull()) Standard_ConstructionError::Raise
|
||||
("PerformSurf : la spine n est pas celle d un conge");
|
||||
("PerformSurf : this is not the spine of a fillet");
|
||||
Handle(BRepBlend_Line) lin;
|
||||
Standard_Real PFirst = First;
|
||||
Standard_Boolean maybesingular;
|
||||
@@ -1629,11 +1629,11 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
Soldep, Inside, Appro, Forward, RecP1, RecRst1, RecP2, RecRst2);
|
||||
if(!done) {
|
||||
Spine->SetErrorStatus(ChFiDS_WalkingFailure);
|
||||
Standard_Failure::Raise("PerformSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("PerformSurf : Failed processing!");
|
||||
}
|
||||
TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
|
||||
done = CompleteData(Data, func, lin, HS1, HS2, Or);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);
|
||||
}
|
||||
else {
|
||||
@@ -1674,11 +1674,11 @@ void ChFi3d_FilBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData
|
||||
|
||||
if(!done) {
|
||||
Spine->SetErrorStatus(ChFiDS_WalkingFailure);
|
||||
Standard_Failure::Raise("PerformSurf : Echec cheminement!");
|
||||
Standard_Failure::Raise("PerformSurf : Failed processing!");
|
||||
}
|
||||
TopAbs_Orientation Or = HS1->ChangeSurface().Face().Orientation();
|
||||
done = CompleteData(Data, func, lin, HS1, HS2, Or);
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Echec approximation!");
|
||||
if(!done) Standard_Failure::Raise("PerformSurf : Failed approximation!");
|
||||
maybesingular = (func.GetMinimalDistance()<=100*tolapp3d);
|
||||
|
||||
|
||||
@@ -1716,13 +1716,13 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
Standard_Real precedant, suivant, courant;
|
||||
Standard_Real a, b, c;
|
||||
|
||||
// (1) Rechecheche des vi tel que l'iso v=vi soit ponctuelles
|
||||
// (1) Finds vi so that iso v=vi is punctual
|
||||
VFirst = Min( ref->InterferenceOnS1().FirstParameter(),
|
||||
ref->InterferenceOnS2().FirstParameter() );
|
||||
VLast = Max( ref->InterferenceOnS1().LastParameter(),
|
||||
ref->InterferenceOnS2().LastParameter() );
|
||||
|
||||
// (1.1) Recherche du premier point a l'interieur
|
||||
// (1.1) Finds the first point inside
|
||||
for (ii=1; ii<=Nbpnt && Line->Point(ii).Parameter()<VFirst; ii++) {}
|
||||
if (ii==1) ii++;
|
||||
P = Line->Point(ii);
|
||||
@@ -1733,7 +1733,7 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
precedant = P.PointOnS1().Distance(P.PointOnS2());
|
||||
ii ++;
|
||||
|
||||
// (1.2) Recherche d'un minimum par "points"
|
||||
// (1.2) Find a minimum by "points"
|
||||
for ( ; ii<=Nbpnt && Line->Point(ii).Parameter()<=VLast; ii++) {
|
||||
for (;ii<=Nbpnt &&
|
||||
Line->Point(ii).Parameter()<VLast &&
|
||||
@@ -1743,7 +1743,7 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
c = pnt.Parameter();
|
||||
suivant = pnt.PointOnS1().Distance(pnt.PointOnS2());
|
||||
if ( (courant < precedant) && (courant < suivant) ) {
|
||||
// (1.3) Recherche du minimum exact
|
||||
// (1.3) Find the exact minimum
|
||||
math_FunctionRoot Resol(Fonc, (a+c)/2,
|
||||
tol2d,//Surf->VResolution(toleps),
|
||||
a, c,
|
||||
@@ -1753,7 +1753,7 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
|
||||
Fonc.Value(Resol.Root(), Val);
|
||||
if (Val< tolapp3d) {
|
||||
// On insere la solution (en evitant les risques de confusion)
|
||||
// the solution (avoiding the risks of confusion)
|
||||
if (LesVi.Length()==0) {
|
||||
if ( (racine > VFirst+tol2d) &&
|
||||
(racine < VLast -tol2d) ) {
|
||||
@@ -1770,18 +1770,18 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
}
|
||||
else {
|
||||
# if DEB
|
||||
cout << "Echec calcul de la longeur minimum" << endl;
|
||||
cout << "Failed calculation of the minimum length" << endl;
|
||||
# endif
|
||||
}
|
||||
}
|
||||
// mise a jour si non duplication
|
||||
// update if non duplication
|
||||
a = b;
|
||||
precedant = courant;
|
||||
b = c;
|
||||
courant = suivant;
|
||||
}
|
||||
|
||||
// (2) Mise a jour de la sequence de SurfData
|
||||
// (2) Update of the sequence of SurfData
|
||||
if (LesVi.Length()>0) {
|
||||
TopOpeBRepDS_DataStructure& DStru = myDS->ChangeDS();
|
||||
Handle(ChFiDS_SurfData) SD;
|
||||
@@ -1793,7 +1793,7 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
for (ii=1 ; ii<=LesVi.Length(); ii++) {
|
||||
|
||||
T = LesVi(ii);
|
||||
// (2.0) copie et insertion
|
||||
// (2.0) copy and insertion
|
||||
SD = new (ChFiDS_SurfData);
|
||||
SD->Copy(ref);
|
||||
SeqData.InsertBefore(ii, SD);
|
||||
@@ -1804,7 +1804,7 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
C2 = DStru.Curve(SD->InterferenceOnS2().LineIndex());
|
||||
SD->ChangeInterferenceOnS2().SetLineIndex(DStru.AddCurve(C2));
|
||||
|
||||
// (2.1) Modif des common Point
|
||||
// (2.1) Modification of common Point
|
||||
SD-> ChangeVertexLastOnS1().Reset();
|
||||
SD-> ChangeVertexLastOnS2().Reset();
|
||||
ref->ChangeVertexFirstOnS1().Reset();
|
||||
@@ -1824,13 +1824,13 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
ref->ChangeVertexFirstOnS1().SetTolerance(VertexTol);
|
||||
ref->ChangeVertexFirstOnS2().SetTolerance(VertexTol);
|
||||
|
||||
// (2.2) Modif des interferences
|
||||
// (2.2) Modification of interferences
|
||||
SD->ChangeInterferenceOnS1().SetLastParameter(T);
|
||||
SD->ChangeInterferenceOnS2().SetLastParameter(T);
|
||||
ref->ChangeInterferenceOnS1().SetFirstParameter(T);
|
||||
ref->ChangeInterferenceOnS2().SetFirstParameter(T);
|
||||
|
||||
// Les parametres sur l ElSpine
|
||||
// Parameters on ElSpine
|
||||
SD->LastSpineParam(T);
|
||||
ref->FirstSpineParam(T);
|
||||
}
|
||||
@@ -1845,8 +1845,8 @@ void ChFi3d_FilBuilder::SplitSurf(ChFiDS_SequenceOfSurfData& SeqData,
|
||||
void ChFi3d_FilBuilder::ExtentOneCorner(const TopoDS_Vertex& V,
|
||||
const Handle(ChFiDS_Stripe)& S)
|
||||
{
|
||||
// revoir en utilisant les donnees au bout des conges (point,rayon,normale
|
||||
// aux faces et tangentes a la ligne guide.
|
||||
// review by using the data at end of fillets (point, radius, normal
|
||||
// to the faces and tangents of the guideline).
|
||||
#ifndef DEB
|
||||
Standard_Integer Sens = 0;
|
||||
#else
|
||||
@@ -1857,10 +1857,10 @@ void ChFi3d_FilBuilder::ExtentOneCorner(const TopoDS_Vertex& V,
|
||||
ChFi3d_IndexOfSurfData(V,S,Sens);
|
||||
Standard_Real dU = Spine->LastParameter(Spine->NbEdges());
|
||||
if (Spine->IsTangencyExtremity((Sens == 1)))
|
||||
return; //Pas de prolongement sur queue de billard
|
||||
return; //No extension in the queue
|
||||
|
||||
if (Spine->Status((Sens == 1)) == ChFiDS_FreeBoundary) {
|
||||
Coeff *= 2; // Il faut aller j'usquau bout.Il faudrait evaluer la longeur
|
||||
Coeff *= 2; // It is necessary to go to the end and to evaluate the length
|
||||
}
|
||||
|
||||
if (Sens == 1) {
|
||||
@@ -1881,8 +1881,8 @@ void ChFi3d_FilBuilder::ExtentOneCorner(const TopoDS_Vertex& V,
|
||||
void ChFi3d_FilBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
const ChFiDS_ListOfStripe& LS)
|
||||
{
|
||||
// revoir en utilisant les donnees au bout des conges (point,rayon,normale
|
||||
// aux faces et tangentes a la ligne guide.
|
||||
// Review by using the data at end of fillets (point, radius, normal
|
||||
// to faces and tangents to the guideline.
|
||||
Standard_Integer Sens;
|
||||
Standard_Real Coeff = 0.3, Eval=0.0, dU, rad;
|
||||
Standard_Integer IE;
|
||||
@@ -1891,7 +1891,7 @@ void ChFi3d_FilBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
Handle(ChFiDS_Stripe) Stripe;
|
||||
Handle(ChFiDS_Spine) Spine;
|
||||
|
||||
// On calcul une valeur de prolongement symetrique
|
||||
// A value of symetric extension is calculated
|
||||
for ( ; itel.More(); itel.Next()) {
|
||||
Stripe = itel.Value();
|
||||
Spine = Stripe->Spine();
|
||||
@@ -1913,13 +1913,13 @@ void ChFi3d_FilBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
if (dU > Eval) Eval = dU;
|
||||
}
|
||||
|
||||
// On applique
|
||||
// One applies
|
||||
for (itel.Initialize(LS) ; itel.More(); itel.Next()) {
|
||||
IE = ChFi3d_IndexOfSurfData(V,itel.Value(),Sens);
|
||||
if (!FF && Stripe == itel.Value()) Sens = -Sens;
|
||||
Stripe = itel.Value();
|
||||
Spine = Stripe->Spine();
|
||||
if (! Spine->IsTangencyExtremity((Sens == 1))) { //Pas de prolongement sur queue
|
||||
if (! Spine->IsTangencyExtremity((Sens == 1))) { //No extension on queue
|
||||
if (Sens == 1){
|
||||
Spine->SetFirstParameter(-Eval);
|
||||
Spine->SetFirstTgt(0.);
|
||||
@@ -1943,8 +1943,8 @@ void ChFi3d_FilBuilder::ExtentTwoCorner(const TopoDS_Vertex& V,
|
||||
void ChFi3d_FilBuilder::ExtentThreeCorner(const TopoDS_Vertex& V,
|
||||
const ChFiDS_ListOfStripe& LS)
|
||||
{
|
||||
// revoir en utilisant les donnees au bout des conges (point,rayon,normale
|
||||
// aux faces et tangentes a la ligne guide.
|
||||
// Review by using the data at end of fillets (point, radius, normal
|
||||
// to faces and tangents to the guideline.
|
||||
#ifndef DEB
|
||||
Standard_Integer Sens = 0;
|
||||
#else
|
||||
@@ -1963,7 +1963,7 @@ void ChFi3d_FilBuilder::ExtentThreeCorner(const TopoDS_Vertex& V,
|
||||
}
|
||||
}
|
||||
Handle(ChFiDS_Spine) Spine = Stripe->Spine();
|
||||
if (Spine->IsTangencyExtremity((Sens == 1))) return; //Pas de prolongement sur queue
|
||||
if (Spine->IsTangencyExtremity((Sens == 1))) return; //No extension on queue
|
||||
Standard_Real dU = Spine->LastParameter(Spine->NbEdges());
|
||||
if (Sens == 1){
|
||||
Spine->SetFirstParameter(-dU*Coeff);
|
||||
|
@@ -99,10 +99,10 @@ extern void ChFi3d_ResultChron(OSD_Chronometer & ch,Standard_Real& time);
|
||||
|
||||
//=======================================================================
|
||||
//function : ToricRotule
|
||||
//purpose : Teste si on est dans un cas particulier de rotule torique.
|
||||
// Il faut trois plans avec deux conges incidents constants
|
||||
// de meme rayon et la troisieme face perpendiculaire aux
|
||||
// deux autres.
|
||||
//purpose : Test if it is a particular case of torus routine.
|
||||
// Three planes with two constant incident fillets
|
||||
// of the same radius and the third face perpendicular to
|
||||
// two others are required.
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean ToricRotule(const BRepAdaptor_Surface& fac,
|
||||
@@ -179,17 +179,17 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
// gp_Pnt P1,P2;
|
||||
Standard_Integer nbsurf1,nbsurf2,deb1,fin1,deb2,fin2;
|
||||
Standard_Real parE1,parE2;
|
||||
//On extrait les informations necessaires sur les conges
|
||||
//Necessary information on fillets is extracted
|
||||
//------------------------------------------------------
|
||||
|
||||
//le premier
|
||||
//the first
|
||||
//----------
|
||||
|
||||
st1 = It.Value();
|
||||
Isd1 = ChFi3d_IndexOfSurfData(Vtx,st1,Sens1);
|
||||
|
||||
|
||||
//le deuxieme
|
||||
//the second
|
||||
//----------
|
||||
It.Next();
|
||||
st2 = It.Value();
|
||||
@@ -199,7 +199,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
}
|
||||
else{ Isd2 = ChFi3d_IndexOfSurfData(Vtx,st2,Sens2); }
|
||||
|
||||
// Si les deux aretes a arrondir sont tangentes on appelle GeomPlate
|
||||
// If two edges to rounded are tangent GeomPlate is called
|
||||
|
||||
if (Sens1==1) E1= st1->Spine()->Edges(1);
|
||||
else E1= st1->Spine()->Edges( st1->Spine()->NbEdges());
|
||||
@@ -234,8 +234,8 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
if (!Okvisavis) {
|
||||
|
||||
|
||||
// on ne se limite plus aux premieres ou aux dernieres surfdata
|
||||
// pour rechercher celles qui son en vis a vis
|
||||
// one is not limited to the first or the last surfdata
|
||||
// to find the opposing data
|
||||
nbsurf1=st1->SetOfSurfData()->Length();
|
||||
nbsurf2=st2->SetOfSurfData()->Length();
|
||||
deb1=1;
|
||||
@@ -289,7 +289,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
Isd1=ChFi3d_IndexOfSurfData(Vtx,st1,Sens1);
|
||||
Isd2=ChFi3d_IndexOfSurfData(Vtx,st2,Sens2);
|
||||
}
|
||||
// StdFail_NotDone::Raise("TwoCorner : pas de face commune");
|
||||
// StdFail_NotDone::Raise("TwoCorner : no common face");
|
||||
Standard_Integer IFaArc1 = 3-IFaCo1, IFaArc2 = 3-IFaCo2;
|
||||
SeqFil1 = st1->ChangeSetOfSurfData()->ChangeSequence();
|
||||
SeqFil2 = st2->ChangeSetOfSurfData()->ChangeSequence();
|
||||
@@ -298,8 +298,8 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
sd2 = SeqFil2.ChangeValue(Isd2);
|
||||
surf2 = DStr.Surface(sd2->Surf()).Surface();
|
||||
TopAbs_Orientation OFaCo = FaCo.Orientation();
|
||||
// On analyse les concavites et on recherche la face en vis a vis
|
||||
// et l intersection eventuelle des 2 pcurves sur cette face.
|
||||
// The concavities are analyzed and the opposite face and the
|
||||
// eventual intersection of 2 pcurves on this face are found.
|
||||
|
||||
ChFiDS_State Stat1,Stat2;
|
||||
Standard_Boolean isfirst1 = (Sens1 == 1);
|
||||
@@ -309,9 +309,8 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
Standard_Boolean c1biseau = (Stat1 == ChFiDS_AllSame);
|
||||
Standard_Boolean c1rotule = (Stat1 == ChFiDS_OnSame && Stat2 == ChFiDS_OnSame);
|
||||
|
||||
// On verifie que les conges ont bien un commonpoint
|
||||
// sur un arc commun.
|
||||
// Cet edge est le pivot du biseau ou de la rotule.
|
||||
// It is checked if the fillets have a commonpoint on a common arc.
|
||||
// This edge is the pivot of the bevel or the knee.
|
||||
|
||||
ChFiDS_CommonPoint& CP1 = sd1->ChangeVertex(isfirst1,IFaArc1);
|
||||
ChFiDS_CommonPoint& CP2 = sd2->ChangeVertex(isfirst2,IFaArc2);
|
||||
@@ -386,7 +385,6 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
}
|
||||
}
|
||||
if(!ok1 || !ok2){
|
||||
//On est dans un contexte merdique
|
||||
PerformMoreThreeCorner(Index,2);
|
||||
done=1;
|
||||
return;
|
||||
@@ -397,7 +395,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
ChFi3d_ResultChron(ch ,t_t2cornerinit);//result perf initialisation
|
||||
#endif
|
||||
|
||||
//biseau
|
||||
//bevel
|
||||
//------
|
||||
ChFiDS_CommonPoint cp11,cp12,cp21,cp22;
|
||||
ChFiDS_FaceInterference intf11,intf12,intf21,intf22;
|
||||
@@ -419,7 +417,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(c1rotule){//on sauve.
|
||||
else if(c1rotule){//save.
|
||||
cp11 = sd1->Vertex(isfirst1,1);
|
||||
cp12 = sd1->Vertex(isfirst1,2);
|
||||
cp21 = sd2->Vertex(isfirst2,1);
|
||||
@@ -438,7 +436,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
ChFi3d_ResultChron(ch , t_perf2cornerbyinter); // result perf PerformTwoCornerbyInter
|
||||
#endif
|
||||
if (!done) {
|
||||
//on restore
|
||||
// restore
|
||||
sd1->ChangeVertex(isfirst1,1) = cp11;
|
||||
sd1->ChangeVertex(isfirst1,2) = cp12;
|
||||
sd2->ChangeVertex(isfirst2,1) = cp21;
|
||||
@@ -452,7 +450,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
}
|
||||
|
||||
if(!c1biseau && !done){
|
||||
//on cree une nouvelle cornerdata
|
||||
//new cornerdata is created
|
||||
//-------------------------------
|
||||
Handle(ChFiDS_Stripe) corner = new ChFiDS_Stripe();
|
||||
Handle(ChFiDS_HData)& cornerset = corner->ChangeSetOfSurfData();
|
||||
@@ -462,11 +460,9 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
|
||||
if (SameSide) {
|
||||
if(ToricRotule(BRFaCo,BRS1,BRS2,st1,st2)){
|
||||
// Construction directe.
|
||||
// Direct construction.
|
||||
// ---------------------
|
||||
|
||||
//un petit coup de NextSide, leger....
|
||||
//------------------------------------
|
||||
Standard_Integer bid;
|
||||
TopAbs_Orientation ori = OFaCo;
|
||||
TopAbs_Orientation oriS = st1->Orientation(IFaCo1);
|
||||
@@ -490,7 +486,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
// Construction par remplissage
|
||||
// Construction by filling remplissage
|
||||
// ----------------------------
|
||||
Standard_Real uPCArc1, uPCArc2;
|
||||
gp_Pnt2d p2da1,p2df1,p2da2,p2df2,p2dfac1,p2dfac2;
|
||||
@@ -505,7 +501,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
p2df2 = sd2->Interference(IFaCo2).PCurveOnSurf()->Value(uPCArc2);
|
||||
sd2->Interference(IFaCo2).PCurveOnFace()->D1(uPCArc2,p2dfac2,v2dfac2);
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch ); // init perf remplissage
|
||||
ChFi3d_InitChron(ch ); // init perf filling
|
||||
#endif
|
||||
B1 = ChFi3d_mkbound(surf1,p2df1,p2da1,tolesp,2.e-4);
|
||||
B2 = ChFi3d_mkbound(surf2,p2df2,p2da2,tolesp,2.e-4);
|
||||
@@ -577,14 +573,14 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
HFaPiv,PCurveOnPiv,OFaCo,1,
|
||||
0,0,0,0);
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_remplissage);// result perf remplissage
|
||||
ChFi3d_ResultChron(ch , t_remplissage);// result perf filling
|
||||
#endif
|
||||
}
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch); // init perf mise a jour DS
|
||||
ChFi3d_InitChron(ch); // init perf update DS
|
||||
#endif
|
||||
if (done){
|
||||
// Mise a jour des 3 CornerData et de la DS
|
||||
// Update 3 CornerData and the DS
|
||||
// ----------------------------------------
|
||||
if(resetcp1){
|
||||
gp_Pnt pjyl = CP1.Point();
|
||||
@@ -609,7 +605,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
Pf2 = CP1;
|
||||
Pl2 = CP2;
|
||||
|
||||
// le coin pour commencer,
|
||||
// the corner to start,
|
||||
// -----------------------
|
||||
ChFiDS_Regul regdeb, regfin;
|
||||
If1 = ChFi3d_IndexPointInDS(Pf1,DStr);
|
||||
@@ -683,7 +679,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
}
|
||||
corner->SetSolidIndex(st1->SolidIndex());
|
||||
|
||||
// puis la Stripe du debut,
|
||||
// then the starting Stripe,
|
||||
// ------------------------
|
||||
st1->SetCurve(Icf,isfirst1);
|
||||
st1->SetIndexPoint(If1,isfirst1,IFaCo1);
|
||||
@@ -694,7 +690,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
sd1->ChangeInterference(IFaCo1).SetParameter(par1,isfirst1);
|
||||
if (IFaCo1 == 2) st1->SetOrientation(TopAbs_REVERSED,isfirst1);
|
||||
|
||||
// puis la Stripe de la fin,
|
||||
// then the end Stripe,
|
||||
// -------------------------
|
||||
st2->SetCurve(Icl,isfirst2);
|
||||
st2->SetIndexPoint(Il1,isfirst2,IFaCo2);
|
||||
@@ -706,13 +702,13 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
if (IFaCo2 == 2) st2->SetOrientation(TopAbs_REVERSED,isfirst2);
|
||||
}
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_t2cornerDS);// result perf mise a jour DS
|
||||
ChFi3d_ResultChron(ch , t_t2cornerDS);// result perf update DS
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
//ici il faut distinguer celui ondiff
|
||||
//it is necessary to make difference with
|
||||
if(!OkinterCC) {
|
||||
Standard_Failure::Raise("TwoCorner : Pas d intersetion pc pc");
|
||||
Standard_Failure::Raise("TwoCorner : No intersection pc pc");
|
||||
}
|
||||
Handle(ChFiDS_Stripe) stsam, stdif;
|
||||
Handle(ChFiDS_SurfData) sdsam, sddif;
|
||||
@@ -738,15 +734,15 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
ifacodif = IFaCo1; ifaopdif = IFaArc1; isfirstdif = isfirst1;
|
||||
}
|
||||
else {
|
||||
Standard_Failure::Raise("TwoCorner : Config inconnue");
|
||||
Standard_Failure::Raise("TwoCorner : Config unknown");
|
||||
}
|
||||
//On verifie que la surface ondiff a un point sur arc du cote oppose
|
||||
//a la face commune et que cet arc est connexe a la face d appui
|
||||
//oppose a la face commune de la surface onsame.
|
||||
//It is checked if surface ondiff has a point on arc from the side opposed
|
||||
//to the common face and if this arc is connected to the base face
|
||||
//opposed to common face of the surface onsame.
|
||||
ChFiDS_CommonPoint& cpopdif = sddif->ChangeVertex(isfirstdif,ifaopdif);
|
||||
if(!cpopdif.IsOnArc()) {
|
||||
Standard_Failure::Raise
|
||||
("TwoCorner : Pas de point sur restriction sur la surface OnDiff");
|
||||
("TwoCorner : No point on restriction on surface OnDiff");
|
||||
}
|
||||
const TopoDS_Edge& Arcopdif = cpopdif.Arc();
|
||||
const TopoDS_Face& Fopsam = TopoDS::Face(DStr.Shape(sdsam->Index(ifaopsam)));
|
||||
@@ -757,11 +753,11 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
}
|
||||
else if(!ex.More()) {
|
||||
Standard_Failure::Raise
|
||||
("TwoCorner : Pas de face commune pour boucler le contour");
|
||||
("TwoCorner : No common face to loop the contour");
|
||||
}
|
||||
}
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch ); // init perf remplissage
|
||||
ChFi3d_InitChron(ch ); // init perf filling
|
||||
#endif
|
||||
Handle(GeomFill_Boundary) Bsam,Bdif,Bfac;
|
||||
gp_Pnt2d ppopsam =
|
||||
@@ -818,15 +814,15 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
HBRFopsam,pcnul,Osurfsam,1,
|
||||
0,0,0,0);
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_remplissage);// result perf remplissage
|
||||
ChFi3d_ResultChron(ch , t_remplissage);// result perf filling
|
||||
#endif
|
||||
if(!done) Standard_Failure::Raise("concavites inverses : echec");
|
||||
if(!done) Standard_Failure::Raise("concavites inverted : fail");
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch); // init perf mise a jour DS
|
||||
ChFi3d_InitChron(ch); // init perf update DS
|
||||
#endif
|
||||
// Mise a jour des 3 CornerData et de la DS
|
||||
// Update 3 CornerData and the DS
|
||||
// ----------------------------------------
|
||||
// le coin pour commencer,
|
||||
// the corner to start,
|
||||
// -----------------------
|
||||
Standard_Real P1deb,P2deb,P1fin,P2fin;
|
||||
Standard_Integer If1,If2,Il1,Il2,Icf,Icl;
|
||||
@@ -859,7 +855,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
tolreached = Max(tolreached,tolr1);
|
||||
TopOpeBRepDS_Curve Tcurv1(C3d,tolreached);
|
||||
Icf = DStr.AddCurve(Tcurv1);
|
||||
// ici petite veru pour mettre la pcurve on face dans la DS
|
||||
// place the pcurve on face in the DS
|
||||
TopAbs_Orientation OpcFopsam = sdsam->Interference(ifaopsam).Transition();
|
||||
Standard_Integer IFopsam = sdsam->Index(ifaopsam);
|
||||
if(isfirstsam) OpcFopsam = TopAbs::Reverse(OpcFopsam);
|
||||
@@ -904,11 +900,11 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
|
||||
corner->SetSolidIndex(stsam->SolidIndex());
|
||||
|
||||
// puis la Stripe OnSame
|
||||
// then Stripe OnSame
|
||||
// ---------------------
|
||||
const ChFiDS_FaceInterference& intcoin1 = coin->InterferenceOnS1();
|
||||
stsam->SetCurve(intcoin1.LineIndex(),isfirstsam);
|
||||
stsam->InDS(isfirstsam); // filDS fait deja le boulot depuis le coin.
|
||||
stsam->InDS(isfirstsam); // filDS already works from the corner.
|
||||
stsam->ChangePCurve(isfirstsam) = coin->InterferenceOnS1().PCurveOnFace();
|
||||
stsam->SetIndexPoint(If1,isfirstsam,ifaopsam);
|
||||
stsam->SetIndexPoint(Il1,isfirstsam,ifacosam);
|
||||
@@ -921,7 +917,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
sdsam->ChangeInterferenceOnS2().SetParameter(uintpcsam,isfirstsam);
|
||||
if (ifaopsam == 2) stsam->SetOrientation(TopAbs_REVERSED,isfirstsam);
|
||||
|
||||
// puis la Stripe OnDiff
|
||||
// then Stripe OnDiff
|
||||
// ---------------------
|
||||
stdif->SetCurve(Icl,isfirstdif);
|
||||
stdif->ChangePCurve(isfirstdif) = pcsurfdif;
|
||||
@@ -933,7 +929,7 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const Standard_Integer Index)
|
||||
sddif->ChangeInterference(ifacodif).SetParameter(uintpcdif,isfirstdif);
|
||||
if (ifaopdif == 1) stdif->SetOrientation(TopAbs_REVERSED,isfirstdif);
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_t2cornerDS);// result perf mise a jour DS
|
||||
ChFi3d_ResultChron(ch , t_t2cornerDS);// result perf update DS
|
||||
#endif
|
||||
}
|
||||
if(!myEVIMap.IsBound(Vtx)){
|
||||
|
@@ -185,8 +185,8 @@ static Standard_Boolean SearchFD(TopOpeBRepDS_DataStructure& DStr,
|
||||
|
||||
//=======================================================================
|
||||
//function : ToricCorner
|
||||
//purpose : Teste si on est dans le cas pariculier d un coin torique
|
||||
// (ou spherique limite par des isos).
|
||||
//purpose : Test if this is a paricular cas of a torus corner
|
||||
// (or spherical limited by isos).
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean ToricCorner(const TopoDS_Face& F,
|
||||
@@ -205,8 +205,8 @@ static Standard_Boolean ToricCorner(const TopoDS_Face& F,
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformThreeCorner
|
||||
//purpose : Calcul du conge sur un sommet avec trois aretes
|
||||
// incidentes portant chacune un conge.
|
||||
//purpose : Calculate fillet on a top with three edges
|
||||
// incident carrying each edge.
|
||||
//=======================================================================
|
||||
|
||||
void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
@@ -241,9 +241,9 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
Index[ii] = ChFi3d_IndexOfSurfData(Vtx,It.Value(),sens[ii]);
|
||||
CD[ii] = It.Value();
|
||||
}
|
||||
// On verifie que l une des CD ne figure pas deux fois, au quel cas
|
||||
// il faut modifier le retour de IndexOfSurfData qui prend la
|
||||
// premiere des solutions.
|
||||
// It is checked if one of CD is not present twice in which
|
||||
// case it is necessary to modify the return of IndexOfSurfData
|
||||
// that takes the first solution.
|
||||
if(CD[0] == CD[1]){
|
||||
Index[1] = CD[1]->SetOfSurfData()->Length();
|
||||
sens[1] = -1;
|
||||
@@ -266,9 +266,9 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
p[1][2],p[2][1],Index[1],Index[2],face[0],sameside[0],
|
||||
jf[1][2],jf[2][1]);
|
||||
//
|
||||
// Analyse des concavites des 3 conges :
|
||||
// - 2 concavites identiques et 1 inverse.
|
||||
// - 3 concavites identiques
|
||||
// Analyze concavities of 3 fillets :
|
||||
// - 2 concavities identic and 1 inverted.
|
||||
// - 3 concavities identic
|
||||
//
|
||||
if(oksea[2] && oksea[1] && !sameside[2] && !sameside[1])
|
||||
{ pivot = 0; deb = 1; fin = 2;}
|
||||
@@ -277,11 +277,11 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
else if(oksea[1] && oksea[0] && !sameside[1] && !sameside[0])
|
||||
{ pivot = 2; deb = 0; fin = 1;}
|
||||
else if(oksea[0] && oksea[1] && oksea[2]){
|
||||
// 3 concavites identiques.
|
||||
// 3 concavities identic.
|
||||
pivot = SearchPivot(sens,p,tol2d);
|
||||
if(pivot < 0){
|
||||
#ifdef DEB
|
||||
cout<<"pivot non trouve, on appelle plate"<<endl;
|
||||
cout<<"pivot not found, plate is called"<<endl;
|
||||
#endif
|
||||
PerformMoreThreeCorner(Jndex, 3);
|
||||
return;
|
||||
@@ -303,14 +303,14 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
ifacfin = CD[fin]->ChangeSetOfSurfData()->Value(i[fin][pivot])->Index(3-jf[fin][pivot]);
|
||||
if(ifacfin != ifacdeb){
|
||||
#ifdef DEB
|
||||
cout<<"plusieurs faces d'appui, on appelle plate"<<endl;
|
||||
cout<<"several base faces, plate is called"<<endl;
|
||||
#endif
|
||||
PerformMoreThreeCorner(Jndex, 3);
|
||||
return;
|
||||
}
|
||||
if(i[pivot][deb] != i[pivot][fin]){
|
||||
#ifdef DEB
|
||||
cout<<"changement de surfdata sur le pivot, on appelle plate"<<endl;
|
||||
cout<<"load surfdata on the pivot, plate is called"<<endl;
|
||||
#endif
|
||||
PerformMoreThreeCorner(Jndex, 3);
|
||||
return;
|
||||
@@ -338,9 +338,9 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
if(!c1toric)c1spheric=(Abs(qr[0]-qr[1])<tolesp && Abs(qr[0]-qr[2])<tolesp);
|
||||
}
|
||||
|
||||
// Autrefois pour eviter les bouclages on mettait toujours les
|
||||
// points a l interieur, ca pouvait gener la construction de la
|
||||
// ligne guide du coin qui aujourd hui est un cercle.
|
||||
// Previously to avoid loops the points were always located
|
||||
// inside, which could impede the construction of the
|
||||
// guideline of the corner which now is a circle.
|
||||
// Standard_Integer jjjd = jf[deb][fin], jjjf = jf[fin][deb];
|
||||
// if (pivdif) jjjd = jf[deb][pivot], jjjf = jf[fin][pivot];
|
||||
Standard_Integer jjjd = jf[deb][pivot], jjjf = jf[fin][pivot];
|
||||
@@ -352,8 +352,8 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
0,sens[pivot],Pdp,Vdp,Rdp);
|
||||
ChFi3d_ExtrSpineCarac(DStr,CD[pivot],i[pivot][fin],p[pivot][fin],
|
||||
0,sens[pivot],Pfp,Vfp,Rfp);
|
||||
//dans le cas allsame on controle que les points sur la face ne
|
||||
//sont pas trop pres ce qui risque de faire foirer le cheminement.
|
||||
//in cas of allsame it is checked that points on the face are not
|
||||
//too close, which can stop the work.
|
||||
if(!pivdif) {
|
||||
gp_Pnt ptestdeb,ptestfin; gp_Vec bidvec; Standard_Real bidr;
|
||||
ChFi3d_ExtrSpineCarac(DStr,CD[deb],i[deb][pivot],p[deb][pivot],
|
||||
@@ -371,14 +371,14 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
if(Abs(p[pivot][deb] - p[pivot][fin]) <= tol2d)
|
||||
c1toric = ToricCorner(face[pivot],Rdeb,Rfin,Vdp);
|
||||
}
|
||||
// on a le pivot, le CD deb et le CD fin (enfin on espere !?!) :
|
||||
// there is a pivot, the start and the end CD (finally !?!) :
|
||||
// -------------------------------------------------------------
|
||||
// les criteres determinant si le coin est un tore ou une sphere
|
||||
// sont uniquement fondes sur la configuration des sections en
|
||||
// bout et la nature des faces, il faudra faire des tests pour
|
||||
// determiner si une analyse plus subtile des conges incidents
|
||||
// n est pas necessaire pour assurer la tangence entre ceux-ci
|
||||
// et le coin (en particulier dans les cas a rayon variable).
|
||||
// the criterions determining if the corner is a torus or a sphere
|
||||
// are based only on the configuration of sections at end and the
|
||||
// nature of faces, it is necessary to make tests to
|
||||
// determine if a more detailed analysis of incident fillets
|
||||
// is necessare to provide tangency between them and
|
||||
// the corner (in particular in the case with variable radius).
|
||||
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
fdpiv = CD[pivot]->ChangeSetOfSurfData()->ChangeValue(i[pivot][deb]);
|
||||
|
||||
|
||||
// On construit les HSurfaces et autres outils qui vont bien.
|
||||
// HSurfaces and other suitable tools are constructed.
|
||||
// ----------------------------------------------------------
|
||||
|
||||
TopAbs_Orientation OFac = face[pivot].Orientation();
|
||||
@@ -431,13 +431,13 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
|
||||
Handle(GeomAdaptor_HSurface) Surf = new GeomAdaptor_HSurface(gasurf);
|
||||
// Handle(BRepTopAdaptor_TopolTool) IFac = new BRepTopAdaptor_TopolTool(Fac);
|
||||
// Essai de ne pas classifier sur la face pour les cas de conges rentrants
|
||||
// qui debordent naturellement.
|
||||
// Try to not classify on the face for cases of reentering fillets which naturally depass
|
||||
// the border.
|
||||
Handle(GeomAdaptor_HSurface)
|
||||
bidsurf = new GeomAdaptor_HSurface(Fac->ChangeSurface().Surface());
|
||||
Handle(Adaptor3d_TopolTool)
|
||||
IFac = new Adaptor3d_TopolTool(bidsurf);
|
||||
// fin de l essai.
|
||||
// end of the attempt.
|
||||
Handle(Adaptor3d_TopolTool) ISurf = new Adaptor3d_TopolTool(Surf);
|
||||
Handle(ChFiDS_Stripe) corner = new ChFiDS_Stripe();
|
||||
Handle(ChFiDS_HData)& cornerset = corner->ChangeSetOfSurfData();
|
||||
@@ -489,30 +489,30 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
if (c1toric){
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch); // init perf cas torique
|
||||
ChFi3d_InitChron(ch); // init perf case torus
|
||||
#endif
|
||||
|
||||
// Construction directe.
|
||||
// Direct Construction.
|
||||
// ---------------------
|
||||
done = ChFiKPart_ComputeData::ComputeCorner
|
||||
(DStr,coin,Fac,Surf,oo1,oo2,o1,o2,Rdeb,Rdp,pfac1,pfac2,psurf1,psurf2);
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_torique); // result perf cas torique
|
||||
ChFi3d_ResultChron(ch , t_torique); // result perf case torus
|
||||
#endif
|
||||
|
||||
}
|
||||
else if(c1spheric){
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch); //init perf cas spherique
|
||||
ChFi3d_InitChron(ch); //init perf case sphere
|
||||
#endif
|
||||
|
||||
done = ChFiKPart_ComputeData::ComputeCorner
|
||||
(DStr,coin,Fac,Surf,oo1,oo2,o1,o2,Rdp,pfac1,psurf1,psurf2);
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_spherique);// result perf cas spherique
|
||||
ChFi3d_ResultChron(ch , t_spherique);// result perf cas sphere
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -526,14 +526,14 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
ChFi3d_InitChron(ch);// init perf not filling
|
||||
#endif
|
||||
|
||||
//on se calcule une ligne guide,
|
||||
//Calculate a guideline,
|
||||
//------------------------------
|
||||
//Problemes nombreux de bouclages et demi-tours lies
|
||||
//a la courbure de la ligne guide !!!!!!
|
||||
//POUR L INSTANT CERCLE.
|
||||
//Si un jour on change de nature de ligne guide il faudra
|
||||
//remettre les points Pdeb et Pfin a l interieur (voir le
|
||||
//commentaire a ce sujet a la ligne du calcul de Pdeb et Pfin).
|
||||
//Numerous problems with loops and half-turns connected to
|
||||
//the curvature of the guideline !!!!!!
|
||||
//FOR CIRCLE.
|
||||
//If the nature of guideline is changed it is necessary to
|
||||
//reset points Pdeb and Pfin at the inside (see the
|
||||
//comments about it in the calculation of Pdeb and Pfin).
|
||||
|
||||
Standard_Real radpondere = (Rdp+Rfp)/2.;
|
||||
Standard_Real locfleche = fleche;
|
||||
@@ -543,8 +543,8 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
Pdeb,Vdeb,
|
||||
Pfin,Vfin,radpondere);
|
||||
if(spinecoin.IsNull()){
|
||||
// On est dans un cas pourri ou l intersection des plans
|
||||
// de section se fait en dehors du secteur.
|
||||
// This is a bad case when the intersection of
|
||||
// section planes is done out of the sector.
|
||||
spinecoin = ChFi3d_Spine(Pdeb,Vdeb,
|
||||
Pfin,Vfin,radpondere);
|
||||
WFirst = 0.; WLast = 1.;
|
||||
@@ -555,11 +555,11 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
cornerspine->ChangeCurve().SetCurve(spinecoin);
|
||||
cornerspine->ChangeCurve().FirstParameter(WFirst - pasmax);
|
||||
cornerspine->ChangeCurve().LastParameter(WLast + pasmax);
|
||||
// Juste pour leurrer le Compute data qui ne doit pas
|
||||
// en avoir besoin dans ce cas precis ...
|
||||
// Just to confuse Compute that should not require this
|
||||
// in this exact case ...
|
||||
Handle(ChFiDS_Spine) NullSpine;
|
||||
// On calcule le conge : - de deb vers fin
|
||||
// - de la face vers la surface
|
||||
// The fillet is calculated - from beginning to end
|
||||
// - from the face to the surface
|
||||
//
|
||||
math_Vector Soldep(1,4);
|
||||
Soldep(1) = pfac1.X();
|
||||
@@ -628,9 +628,9 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
ChFi3d_InitChron(ch); // init perf filling
|
||||
#endif
|
||||
|
||||
// le contour a remplir est constitue de droites uv sur deb et fin
|
||||
// de deux pcurves (une seule si c1pointu) calculees comme on peut
|
||||
// sur piv et la face opposee.
|
||||
// the contour to be fillet consists of straight lines uv in beginning and end
|
||||
// of two pcurves (only one if c1pointu) calculted as possible
|
||||
// on piv and the opposite face.
|
||||
Handle(GeomFill_Boundary) Bdeb,Bfin,Bpiv,Bfac;
|
||||
Handle(Geom2d_Curve) PCurveOnFace;
|
||||
if(!c1pointu)
|
||||
@@ -678,7 +678,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
else fil.Init(Bpiv,Bfin,Bfac,Bdeb,1);
|
||||
|
||||
Handle(Geom_Surface) Surfcoin = fil.Surface();
|
||||
Surfcoin->VReverse(); // on se ramene au sens face surf;
|
||||
Surfcoin->VReverse(); // revert to direction face surface;
|
||||
done = CompleteData(coin,Surfcoin,
|
||||
Fac,PCurveOnFace,
|
||||
Surf,PCurveOnPiv,fdpiv->Orientation(),0,
|
||||
@@ -697,11 +697,11 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
}
|
||||
|
||||
if (done){
|
||||
// Mise a jour des 4 Stripes et de la DS
|
||||
// Update of 4 Stripes and the DS
|
||||
// -------------------------------------
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_InitChron(ch);// init perf mise a jour DS
|
||||
ChFi3d_InitChron(ch);// init perf update DS
|
||||
#endif
|
||||
|
||||
gp_Pnt2d pp1,pp2;
|
||||
@@ -719,7 +719,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
pbf1->Add(Pf1.Point());pbf2->Add(Pf2.Point());
|
||||
pbl1->Add(Pl1.Point());pbl2->Add(Pl2.Point());
|
||||
|
||||
// le coin pour commencer,
|
||||
// the start corner,
|
||||
// -----------------------
|
||||
ChFiDS_Regul regdeb, regfin;
|
||||
If1 = ChFi3d_IndexPointInDS(Pf1,DStr);
|
||||
@@ -773,8 +773,8 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
corner->ChangeIndexLastPointOnS2(Il2);
|
||||
ChFi3d_EnlargeBox(DStr,corner,coin,*pbl1,*pbl2,0);
|
||||
|
||||
// puis la CornerData du debut,
|
||||
// ----------------------------
|
||||
// then CornerData of the beginning,
|
||||
// --------------------------------
|
||||
Standard_Boolean isfirst = (sens[deb] == 1), rev = (jf[deb][fin] == 2);
|
||||
Standard_Integer isurf1 = 1, isurf2 = 2;
|
||||
parpp1 = p[deb][fin]; parpp2 = p[deb][pivot];
|
||||
@@ -803,8 +803,8 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
if(rev) ChFi3d_EnlargeBox(DStr,CD[deb],fddeb,*pbf2,*pbf1,isfirst);
|
||||
else ChFi3d_EnlargeBox(DStr,CD[deb],fddeb,*pbf1,*pbf2,isfirst);
|
||||
|
||||
// puis la CornerData de la fin,
|
||||
// -----------------------------
|
||||
// then the end CornerData,
|
||||
// ------------------------
|
||||
isfirst = (sens[fin] == 1); rev = (jf[fin][deb] == 2);
|
||||
isurf1 = 1; isurf2 = 2;
|
||||
parpp1 = p[fin][deb]; parpp2 = p[fin][pivot];
|
||||
@@ -833,7 +833,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
if(rev) ChFi3d_EnlargeBox(DStr,CD[fin],fdfin,*pbl2,*pbl1,isfirst);
|
||||
else ChFi3d_EnlargeBox(DStr,CD[fin],fdfin,*pbl1,*pbl2,isfirst);
|
||||
|
||||
// et enfin le pivot.
|
||||
// anf finally the pivot.
|
||||
// ------------------
|
||||
ChFiDS_FaceInterference& fi = coin->ChangeInterferenceOnS2();
|
||||
isfirst = (sens[pivot] == 1); rev = (jf[pivot][deb] == 2);
|
||||
@@ -861,18 +861,18 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
fdpiv->ChangeVertex(isfirst,isurf2) = Pl2;
|
||||
fdpiv->ChangeInterference(isurf1).SetParameter(p[pivot][deb],isfirst);
|
||||
fdpiv->ChangeInterference(isurf2).SetParameter(p[pivot][fin],isfirst);
|
||||
CD[pivot]->InDS(isfirst); // filDS fait deja le boulot depuis le coin.
|
||||
CD[pivot]->InDS(isfirst); // filDS already does it from the corner.
|
||||
if(rev) ChFi3d_EnlargeBox(DStr,CD[pivot],fdpiv,*pbl2,*pbf2,isfirst);
|
||||
else ChFi3d_EnlargeBox(DStr,CD[pivot],fdpiv,*pbf2,*pbl2,isfirst);
|
||||
|
||||
//Pour finir on recale les tolerances des points.
|
||||
//To end the tolerances of points are rescaled.
|
||||
ChFi3d_SetPointTolerance(DStr,*pbf1,If1);
|
||||
ChFi3d_SetPointTolerance(DStr,*pbf2,If2);
|
||||
ChFi3d_SetPointTolerance(DStr,*pbl1,Il1);
|
||||
ChFi3d_SetPointTolerance(DStr,*pbl2,Il2);
|
||||
}
|
||||
|
||||
//On tronque les corners data et met a jour les index.
|
||||
//The data corners are truncated and index is updated.
|
||||
//----------------------------------------------------
|
||||
|
||||
if(i[deb][pivot] < Index[deb]){
|
||||
@@ -891,7 +891,7 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
CD[fin]->ChangeSetOfSurfData()->Remove(Index[fin],i[fin][pivot]-1);
|
||||
i[fin][pivot] = Index[fin];
|
||||
}
|
||||
// il faudra ici tenir compte des coins mutants.
|
||||
// it is necessary to take into account mutant corners.
|
||||
if(i[pivot][deb] < Index[pivot]) {
|
||||
CD[pivot]->ChangeSetOfSurfData()->Remove(i[pivot][deb]+1,Index[pivot]);
|
||||
Index[pivot] = i[pivot][deb];
|
||||
@@ -909,6 +909,6 @@ void ChFi3d_FilBuilder::PerformThreeCorner(const Standard_Integer Jndex)
|
||||
myListStripe.Append(corner);
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(ch , t_t3cornerDS);// result perf mise a jour DS
|
||||
ChFi3d_ResultChron(ch , t_t3cornerDS);// result perf update DS
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user