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

0022312: Translation of french commentaries in OCCT files

This commit is contained in:
YSN 2011-10-27 07:50:55 +00:00 committed by bugmaster
parent b2342827fa
commit 0d9695538c
214 changed files with 8746 additions and 10449 deletions

View File

@ -461,11 +461,11 @@ Standard_Boolean AIS::ComputeGeometry(const TopoDS_Edge& anEdge1,
if (isOnPlanC1 && isOnPlanC2) return Standard_True;
if (!isOnPlanC1 && isOnPlanC2) {// courbe 2 seulement dans le plan
if (!isOnPlanC1 && isOnPlanC2) {// curve 2 only in the plane
indexExt = 1;
extCurve = aSov1;
}
else if (isOnPlanC1 && !isOnPlanC2) {// courbe 1 seulement dans le plan
else if (isOnPlanC1 && !isOnPlanC2) {// curve 1 only in the plane
indexExt = 2;
extCurve = aSov2;
}
@ -742,7 +742,7 @@ void AIS::ComputeLengthBetweenPlanarFaces( const TopoDS_Face & FirstFace,
gp_Pnt & Position )
{
TopExp_Explorer aExp( FirstFace, TopAbs_VERTEX );
// cas des plans infinis . SMO.
// case of infinite planes. SMO.
if (!aExp.More())
FirstAttach = Plane1.Location();
else
@ -808,7 +808,7 @@ static gp_Pnt FindFarPoint (const gp_Ax1 & anAxis,
TopExp_Explorer Explo (aFace, TopAbs_VERTEX);
if (!Explo.More()) {
// Cas des plans infinis (pas de Vertex, pas d'arete)
// Case of infinite planes (no Vertex, no edge)
gp_Pln plane;
Handle( Geom_Surface ) aSurf;
AIS_KindOfSurface KOS;
@ -1370,7 +1370,7 @@ void AIS::ComputeProjEdgePresentation( const Handle( Prs3d_Presentation )& aPres
TopoDS_Edge E;
// Calcul de la presentation de l'edge
// Calculate presentation of the edge
if (ProjCurve->IsInstance(STANDARD_TYPE(Geom_Line)) ) {
// CLE
// const Handle(Geom_Line) & gl = (Handle(Geom_Line)&) ProjCurve;
@ -1399,7 +1399,7 @@ void AIS::ComputeProjEdgePresentation( const Handle( Prs3d_Presentation )& aPres
}
StdPrs_WFDeflectionShape::Add(aPresentation, E, aDrawer);
//Calcul de la presentation des lignes de raccord
//Calculate the presentation of line connections
aDrawer->WireAspect()->SetTypeOfLine(aCallTOL);
if (!isInfinite) {
gp_Pnt ppf(0.0,0.0,0.0), ppl(0.0,0.0,0.0);
@ -1461,7 +1461,7 @@ void AIS::ComputeProjVertexPresentation( const Handle( Prs3d_Presentation )& aPr
pa->SetTypeOfMarker(aProjTOM);
}
// calcul du projete
// calculate the projection
StdPrs_Point::Add(aPresentation, new Geom_CartesianPoint(ProjPoint), aDrawer);
if (!aDrawer->HasWireAspect()){
@ -1476,9 +1476,9 @@ void AIS::ComputeProjVertexPresentation( const Handle( Prs3d_Presentation )& aPr
li->SetWidth(aWidth);
}
// Si les points ne sont pas confondus...
// If the points are not mixed...
if (!ProjPoint.IsEqual (BRep_Tool::Pnt(aVertex),Precision::Confusion())) {
// calcul des lignes de rappel
// calculate the lines of recall
BRepBuilderAPI_MakeEdge MakEd(ProjPoint,BRep_Tool::Pnt(aVertex));
StdPrs_WFDeflectionShape::Add(aPresentation, MakEd.Edge(), aDrawer);
}

View File

@ -70,7 +70,7 @@
// is always equal to 0 if it is -1.
#define BUC61051
// On close the local context the method ::ResetOriginalState() sets the selection mode equal to 0
// The local context is closed the method ::ResetOriginalState() sets the selection mode equal to 0
// in spite of the selection mode of the interactive object in Natural Point.
#define OCC166
@ -226,7 +226,7 @@ void AIS_InteractiveContext::UpdateCurrentViewer()
void AIS_InteractiveContext::OpenCollector()
{
myIsCollClosed =Standard_True;
// a completer....
// to be completed....
}
@ -263,7 +263,7 @@ void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
}
else{
TColStd_MapOfTransient theMap;
// point neutre
// neutral point
for(;It.More();It.Next()){
if(It.Value()->GraphicStatus()==AIS_DS_Displayed)
theMap.Add(It.Key());
@ -272,7 +272,7 @@ void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
cout<<"\tFrom Neutral Point : "<<theMap.Extent()<<endl;
#endif
//balayons tous les contextes locaux...
//parse all local contexts...
Standard_Integer NbDisp;
for(AIS_DataMapIteratorOfDataMapOfILC it1(myLocalContexts);it1.More();it1.Next()){
const Handle(AIS_LocalContext)& LC = it1.Value();
@ -457,7 +457,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj
if(!anIObj->HasInteractiveContext())
anIObj->SetContext(aThis);
//PAS DE CONTEXTE LOCAL OUVERT
//NO LOCAL CONTEXT OPEN
if(!HasOpenedContext()) {
#ifndef OCC4373
// SAN : Do not return here. Perform advanced display mode analysis a bit later...
@ -465,7 +465,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj
#endif
Standard_Boolean updcol = Standard_False;
// il n'existait pas encore
// it did not yet exist
if(!myObjects.IsBound(anIObj)){
Handle(AIS_GlobalStatus) STATUS=
@ -485,7 +485,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj
if(updateviewer) myMainVwr->Update();
}
// il est quelque part ailleurs....
// it is somewhere else...
else {
// CLE
// const Handle(AIS_GlobalStatus)& STATUS = myObjects(anIObj);
@ -498,7 +498,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj
myCollectorPM->Erase(anIObj,HiMod);
mgrSelector->Deactivate(anIObj,myCollectorSel);
updcol = updateviewer;
}// attention on fait expres de ne pas mettre de break..
}// attention the break is not set on purpose...
case AIS_DS_FullErased:{
TColStd_ListIteratorOfListOfInteger ItL (STATUS->DisplayedModes());
for (;ItL.More();ItL.Next()){
@ -565,7 +565,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj
if(updcol && !myCollectorVwr.IsNull()) myCollectorVwr->Update();
}
// CONTEXTE LOCAL OUVERT
// LOCAL CONTEXT OPEN
else
{
myLocalContexts(myCurLocalIndex)->Display(anIObj,DispMode,anIObj->AcceptShapeDecomposition(),SelMode);
@ -593,7 +593,7 @@ void AIS_InteractiveContext::Display(const Handle(AIS_InteractiveObject)& anIObj
if(!anIObj->HasInteractiveContext()) anIObj->SetContext(this);
// si aucun contexte local...
// if no local context...
if(!HasOpenedContext()) {
// if(!anIObj->HasDisplayMode())
// anIObj->SetDisplayMode(aDisplayMode);
@ -685,9 +685,8 @@ void AIS_InteractiveContext::Erase(const Handle(AIS_InteractiveObject)& anIObj,
}
else
{
// d'abors on regarde si on peut effacer dans le contexte local courant
// ensuite, on essaye d'effacer dans les autres contextes locaux,
// s'ils le permettent...
// First it is checked if it is possible to remove in the current local context
// then one tries to remove in other local contexts, if they allow it...
Standard_Boolean WasInCtx = myLocalContexts(myCurLocalIndex)->Erase(anIObj);
// if(!WasInCtx) {
@ -1488,7 +1487,7 @@ void AIS_InteractiveContext::RecomputeSelectionOnly(const Handle(AIS_Interactive
mgrSelector->RecomputeSelection(anIObj);
// A VOIR SI ENCORE UTILE...
TColStd_ListOfInteger LI;
TColStd_ListIteratorOfListOfInteger Lit;
ActivatedModes(anIObj,LI);
@ -1576,7 +1575,7 @@ void AIS_InteractiveContext::SetLocation(const Handle(AIS_InteractiveObject)& an
}
if(aLoc.IsIdentity()) return ;
// d'abord faire un reset de la precedente location pour tout nettoyer proprement...
// first reset the previous location to properly clean everything...
if(anIObj->HasLocation())
anIObj->ResetLocation();
@ -1950,7 +1949,7 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
}
anIObj->SetRecomputeOk();
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
@ -2025,7 +2024,7 @@ void AIS_InteractiveContext::SetDeviationCoefficient(
}
anIObj->SetRecomputeOk();
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
if(updateviewer) UpdateCurrentViewer();
@ -2069,7 +2068,7 @@ void AIS_InteractiveContext::SetHLRDeviationCoefficient(
}
anIObj->SetRecomputeOk();
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
if(updateviewer) UpdateCurrentViewer();
@ -2112,7 +2111,7 @@ void AIS_InteractiveContext::SetDeviationAngle(
}
anIObj->SetRecomputeOk();
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
if(updateviewer) UpdateCurrentViewer();
@ -2183,7 +2182,7 @@ void AIS_InteractiveContext::SetHLRAngleAndDeviation(
}
anIObj->SetRecomputeOk();
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
if(updateviewer) UpdateCurrentViewer();
@ -2225,7 +2224,7 @@ void AIS_InteractiveContext::SetHLRDeviationAngle(
}
anIObj->SetRecomputeOk();
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
if(updateviewer) UpdateCurrentViewer();
@ -2253,7 +2252,7 @@ void AIS_InteractiveContext::UnsetColor(const Handle(AIS_InteractiveObject)& anI
NbDisp++;
}
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
anIObj->SetRecomputeOk();
}
@ -2326,7 +2325,7 @@ void AIS_InteractiveContext::SetWidth(const Handle(AIS_InteractiveObject)& anIOb
NbDisp++;
}
#ifdef DEB
cout<<"nb de modes a recalculer : "<<NbDisp<<endl;
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
anIObj->SetRecomputeOk();
}

View File

@ -868,14 +868,13 @@ void AIS_LengthDimension::ComputeOneEdgeOneVertexLength( const Handle( Prs3d_Pre
Position,
SymbolPrs);
//Display des morceaux de raccordement vers la curve si elle
// n'est pas dans le WP
//Display the pieces connecting to the curve if it is not in the WP
if (ExtShape != 0) {
if (!extCurv.IsNull()) { // c'est l'edge qui n'est pas dans le WP
if (!extCurv.IsNull()) { // this is the edge that is not in the WP
AIS::ComputeProjEdgePresentation(aPresentation,aDrawer,theedge,geom_lin,ptonedge1,ptonedge2);
}
else { // c'est le point qui n'est pas dans le WP
else { // this is the point that is not in the WP
AIS::ComputeProjVertexPresentation(aPresentation,aDrawer,thevertex,FirstAttach);
}
}

View File

@ -297,7 +297,7 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
}
else return;
//On cherche d'abord le vertex de tangence s'il existe
//First find the tangengy vector if exists
TopoDS_Vertex VCom;
TopExp_Explorer expF(TopoDS::Edge(myFShape),TopAbs_VERTEX);
TopExp_Explorer expS(TopoDS::Edge(mySShape),TopAbs_VERTEX);

View File

@ -399,7 +399,7 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
TopLoc_Location aLocation = myFace.Location();
#ifdef DEBUG
cout << "J\'explore actuellement la face " << NumFace << "\n" << endl;
cout << "The face is being processed" << NumFace << "\n" << endl;
#endif
Handle(Poly_Triangulation) myT = BRep_Tool::Triangulation(myFace, aLocation);
// Returns the Triangulation of the face. It is a null handle if there is no triangulation.
@ -429,7 +429,7 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
for (nt = 1; nt <= nnn; nt++)
{
#ifdef DEBUG
cout << "On traite actuellement le triangle : "<< nt <<"\n";
cout << "The triangle is being processed: "<< nt <<"\n";
#endif
if (SST.Orientation(myFace) == TopAbs_REVERSED) // if the face is "reversed"
triangles(nt).Get(n1,n3,n2); // the triangle is n1,n3,n2
@ -437,7 +437,7 @@ void AIS_TexturedShape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
triangles(nt).Get(n1,n2,n3); // the triangle is n1,n2,n3
if (TriangleIsValid (Nodes(n1),Nodes(n2),Nodes(n3)) )
{ // Associates vertexNT to each node
{ // vertexNT associated to each node
Graphic3d_Array1OfVertexNT Points(1,3);
Aspect_Array1OfEdge aretes(1,3);

View File

@ -22,7 +22,7 @@
#include <Interface_Version.hxx>
#include <Interface_Macros.hxx>
// IL S AGIT ICI DU HEADER GENERIQUE pour tout schema STEP ...
// This is a generic header for any STEP sheme
static Handle(TCollection_HAsciiString) nulstr;
@ -71,7 +71,7 @@ void APIHeaderSection_MakeHeader::Init (const Standard_CString nameval)
if (fn.IsNull()) fn = new HeaderSection_FileName;
Handle(TCollection_HAsciiString) name = new TCollection_HAsciiString(nameval);
fn->SetName(name);
Interface_MSG::TDate (timestamp,0,0,0,0,0,1,"C:%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d"); // maintenant
Interface_MSG::TDate (timestamp,0,0,0,0,0,1,"C:%4.4d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2d"); // actually
Handle(TCollection_HAsciiString) tst =
new TCollection_HAsciiString(timestamp);
fn->SetTimeStamp(tst);
@ -142,7 +142,7 @@ void APIHeaderSection_MakeHeader::Apply
header.AddItem(fn);
if (HasFs() && !model->HasHeaderEntity (STANDARD_TYPE(HeaderSection_FileSchema))) {
// Schema defini ? Sinon le prendre depuis le protocole
// Schema defined? If not take it from the protocole
Handle(TCollection_HAsciiString) sch;
Handle(Interface_HArray1OfHAsciiString) schid = fs->SchemaIdentifiers();
if (!schid.IsNull()) sch = schid->Value(1);
@ -150,7 +150,7 @@ void APIHeaderSection_MakeHeader::Apply
schid = new Interface_HArray1OfHAsciiString(1,1);
fs->SetSchemaIdentifiers(schid);
}
if (!sch.IsNull()) { if (sch->Length() < 2) sch.Nullify(); } // non defini
if (!sch.IsNull()) { if (sch->Length() < 2) sch.Nullify(); } // not defined
if (sch.IsNull()) {
Handle(StepData_Protocol) stepro = Handle(StepData_Protocol)::DownCast
( model->Protocol());

View File

@ -24,7 +24,7 @@ static void GetConeApexParam(const gp_Cone& C, Standard_Real& U, Standard_Real&
U = 0.0;
}
else if ( -Radius > Ploc.Z()* Tan(SAngle) ) {
// le point est du `mauvais` cote de l`apex
// the point is at the `wrong` side of the apex
U = atan2(-Ploc.Y(), -Ploc.X());
}
else {
@ -60,7 +60,7 @@ void Adaptor3d_TopolTool::Initialize (const Handle(Adaptor3d_HSurface)& S)
//Adaptor2d_Line2d * Line2dPtr ;
myNbSamplesU=-1;
Uinf = S->FirstUParameter(); // ou UIntervalFirst ??
Uinf = S->FirstUParameter(); // where UIntervalFirst ??
Vinf = S->FirstVParameter();
Usup = S->LastUParameter();
Vsup = S->LastVParameter();
@ -580,7 +580,7 @@ static void Analyse(const TColgp_Array2OfPnt& array2,
C.Y()-B.Y()-B.Y()+A.Y(),
C.Z()-B.Z()-B.Z()+A.Z());
Standard_Integer locnbch=0;
for(j=3; j<nbvp;j++) { //-- essai
for(j=3; j<nbvp;j++) { //-- try
const gp_Pnt& A1=array2.Value(i,j-1);
const gp_Pnt& B1=array2.Value(i,j);
const gp_Pnt& C1=array2.Value(i,j+1);
@ -611,7 +611,7 @@ static void Analyse(const TColgp_Array2OfPnt& array2,
C.Y()-B.Y()-B.Y()+A.Y(),
C.Z()-B.Z()-B.Z()+A.Z());
Standard_Integer locnbch=0;
for(i=3; i<nbup;i++) { //-- essai
for(i=3; i<nbup;i++) { //-- try
const gp_Pnt& A1=array2.Value(i-1,j);
const gp_Pnt& B1=array2.Value(i,j);
const gp_Pnt& C1=array2.Value(i+1,j);
@ -665,7 +665,7 @@ void Adaptor3d_TopolTool::ComputeSamplePoints() {
default: { nbsu = 10; nbsv=10; } break;
}
//-- Si le nb de points est trop grand on analyse
//-- If the number of points is too great... analyze
//--
//--
@ -863,7 +863,7 @@ void Adaptor3d_TopolTool::SamplePnts(const Standard_Real theDefl,
// break;
// case GeomAbs_BSplineSurface: {
if(typS == GeomAbs_BSplineSurface) {
// Treatment BSpline surface
// Processing BSpline surface
BSplSamplePnts(theDefl, theNUmin, theNVmin);
return;
}

View File

@ -2,18 +2,6 @@
// Created: Wed Jul 3 15:34:08 1996
// Author: Joelle CHAUVET
// <jct@sgi38>
// Modified: Wed Jan 15 10:04:41 1997
// by: Joelle CHAUVET
// G1135 : Constructor with criterion
// Private methods 'Init','InitGrid','Perform','ConvertBS',
// 'ComputePatches','ComputeConstraints',
// 'Compute3DErrors','ComputeCritError'
// Public method 'CritError'
// Fields 'myConditions','myResults','myConstraints'
// Modified: Fri Oct 3 14:58:05 1997
// by: Joelle CHAUVET
// GeomConvert_CompBezierSurfacesToBSplineSurface est remplace par
// Convert_GridPolynomialToPoles dans ConvertBS
#include <AdvApp2Var_ApproxAFunc2Var.hxx>
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
@ -291,7 +279,7 @@ void AdvApp2Var_ApproxAFunc2Var::InitGrid(const Standard_Integer NbInt)
AdvApp2Var_Framework Constraints(Bag,UStrip,VStrip);
// decoupes regulieres si NbInt>1
// regular cutting if NbInt>1
Standard_Real deltu = (myLastParInU-myFirstParInU)/NbInt,
deltv = (myLastParInV-myFirstParInV)/NbInt;
for (iint=1;iint<=NbInt-1;iint++) {
@ -350,10 +338,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
while (myResult.FirstNotApprox(FirstNA)) {
// completude de l'ensemble des contraintes
// complete the set of constraints
ComputeConstraints(UChoice, VChoice, Func);
// discretisation des contraintes relatives au carreau
// discretization of constraints relative to the square
myResult(FirstNA).Discretise(myConditions,myConstraints,Func);
if ( ! myResult(FirstNA).IsDiscretised() ) {
myHasResult = myDone = Standard_False;
@ -361,8 +349,8 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error");
}
// calcul du nombre et du type de decoupes autorisees
// en fonction du nombre de carreaux max et de la validite des decoupes suiv.
// calculate the number and the type of autorized cuts
// depending on the max number of squares and the validity of next cuts.
NbU = myResult.NbPatchInU();
NbV = myResult.NbPatchInV();
NbPatch = NbU*NbV;
@ -385,13 +373,13 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
if ( Umore && Vmore ) NumDec=5;
}
// approximation du carreau
// approximation of the square
myResult(FirstNA).MakeApprox(myConditions,myConstraints,NumDec);
if ( ! myResult(FirstNA).IsApproximated() ) {
switch (myResult(FirstNA).CutSense()) {
case 0 :
// On ne peut plus decouper : on garde le resultat
// It is not possible to cut : the result is preserved
if ( myResult(FirstNA).HasResult()) {
myResult(FirstNA).OverwriteApprox();
}
@ -402,17 +390,17 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
}
break;
case 1 :
// Il faut decouper en U
// It is necessary to cut in U
myResult.UpdateInU(Udec);
myConstraints.UpdateInU(Udec);
break;
case 2 :
// Il faut decouper en V
// It is necessary to cut in V
myResult.UpdateInV(Vdec);
myConstraints.UpdateInV(Vdec);
break;
case 3 :
// Il faut decouper en U et en V
// It is necesary to cut in U and V
myResult.UpdateInU(Udec);
myConstraints.UpdateInU(Udec);
myResult.UpdateInV(Vdec);
@ -444,14 +432,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
while (myResult.FirstNotApprox(FirstNA)) {
// completude de l'ensemble des contraintes
// complete the set of constraints
ComputeConstraints(UChoice, VChoice, Func, Crit);
if (decision>0) {
m0 = m1;
m1 = 0.;
}
// discretisation des contraintes relatives au carreau
// discretize the constraints relative to the square
myResult(FirstNA).Discretise(myConditions,myConstraints,Func);
if ( ! myResult(FirstNA).IsDiscretised() ) {
myHasResult = myDone = Standard_False;
@ -459,8 +447,8 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error");
}
// calcul du nombre et du type de decoupes autorisees
// en fonction du nombre de carreaux max et de la validite des decoupes suiv.
// calculate the number and type of autorized cuts
// depending on the max number of squares and the validity of next cuts
NbU = myResult.NbPatchInU();
NbV = myResult.NbPatchInV();
NbPatch = NbU*NbV;
@ -484,7 +472,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
if ( Umore && Vmore ) NumDec=5;
}
// approximation du carreau
// approximation of the square
if ( CritAbs ) {
myResult(FirstNA).MakeApprox(myConditions,myConstraints,0);
}
@ -493,13 +481,13 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
}
if (NumDec>=3) NumDec = NumDec - 2;
// evaluation du critere sur le carreau
// evaluation of the criterion on the square
if ( myResult(FirstNA).HasResult() ) {
Crit.Value(myResult(FirstNA),myConditions);
CritValue = myResult(FirstNA).CritValue();
if (m1<CritValue) m1 = CritValue;
}
// doit-on decouper ?
// is it necessary to cut ?
decision = myResult(FirstNA).CutSense(Crit,NumDec);
Standard_Boolean Regular = (Crit.Repartition() == AdvApp2Var_Regular);
// Standard_Boolean Regular = Standard_True;
@ -510,7 +498,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
else {
switch (decision) {
case 0 :
// On ne peut plus decouper : on garde le resultat
// Impossible to cut : the result is preserved
if ( myResult(FirstNA).HasResult() ) {
myResult(FirstNA).OverwriteApprox();
}
@ -521,17 +509,17 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
}
break;
case 1 :
// Il faut decouper en U
// It is necessary to cut in U
myResult.UpdateInU(Udec);
myConstraints.UpdateInU(Udec);
break;
case 2 :
// Il faut decouper en V
// It is necessary to cut in V
myResult.UpdateInV(Vdec);
myConstraints.UpdateInV(Vdec);
break;
case 3 :
// Il faut decouper en U et en V
// It is necessary to cut in U and V
myResult.UpdateInU(Udec);
myConstraints.UpdateInU(Udec);
myResult.UpdateInV(Vdec);
@ -565,7 +553,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
while ( myConstraints.FirstNotApprox(ind1, ind2, Is) ) {
// approximation de l'iso et calcul des contraintes aux extremites
// approximation of iso and calculation of constraints at extremities
indN1 = myConstraints.FirstNode(Is.Type(),ind1,ind2);
N1 = myConstraints.Node(indN1);
indN2 = myConstraints.LastNode(Is.Type(),ind1,ind2);
@ -577,14 +565,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
Func, N1 , N2);
if (Is.IsApproximated()) {
// L'iso est approchee a la tolerance voulue
// iso is approached at the required tolerance
myConstraints.ChangeIso(ind1,ind2,Is);
myConstraints.ChangeNode(indN1) = N1;
myConstraints.ChangeNode(indN2) = N2;
}
else {
// Pas d'approximation satisfaisante
// Approximation is not satisfactory
NbU = myResult.NbPatchInU();
NbV = myResult.NbPatchInV();
if (Is.Type()==GeomAbs_IsoV) {
@ -597,7 +585,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
}
if (NbPatch<=myMaxPatches && more) {
// On peut decouper l'iso
// It is possible to cut iso
if (Is.Type()==GeomAbs_IsoV) {
myResult.UpdateInU(dec);
myConstraints.UpdateInU(dec);
@ -609,7 +597,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
}
else {
// On ne peut plus decouper : on garde le resultat
// It is not possible to cut : the result is preserved
if (Is.HasResult()) {
Is.OverwriteApprox();
myConstraints.ChangeIso(ind1,ind2,Is);
@ -647,7 +635,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
while ( myConstraints.FirstNotApprox(ind1, ind2, Is) ) {
// approximation de l'iso et calcul des contraintes aux extremites
// approximation of the iso and calculation of constraints at the extremities
indN1 = myConstraints.FirstNode(Is.Type(),ind1,ind2);
N1 = myConstraints.Node(indN1);
indN2 = myConstraints.LastNode(Is.Type(),ind1,ind2);
@ -659,14 +647,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
Func, N1 , N2);
if (Is.IsApproximated()) {
// L'iso est approchee a la tolerance voulue
// iso is approached at the required tolerance
myConstraints.ChangeIso(ind1,ind2,Is);
myConstraints.ChangeNode(indN1) = N1;
myConstraints.ChangeNode(indN2) = N2;
}
else {
// Pas d'approximation satisfaisante
// Approximation is not satisfactory
NbU = myResult.NbPatchInU();
NbV = myResult.NbPatchInV();
if (Is.Type()==GeomAbs_IsoV) {
@ -678,11 +666,11 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
more = VChoice.Value(Is.T0(),Is.T1(),dec);
}
// Pour forcer l'Overwrite si le critere est Absolu
// To force Overwrite if the criterion is Absolute
more = more && (CritRel);
if (NbPatch<=myMaxPatches && more) {
// On peut decouper l'iso
// It is possible to cut iso
if (Is.Type()==GeomAbs_IsoV) {
myResult.UpdateInU(dec);
myConstraints.UpdateInU(dec);
@ -694,7 +682,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
}
else {
// On ne peut plus decouper : on garde le resultat
// It is not possible to cut: the result is preserved
if (Is.HasResult()) {
Is.OverwriteApprox();
myConstraints.ChangeIso(ind1,ind2,Is);
@ -790,14 +778,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeCritError()
void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
{
// Homogeneisation des degres
// Homogeneization of degrees
Standard_Integer iu = myConditions.UOrder(), iv = myConditions.VOrder();
Standard_Integer ncfu = myConditions.ULimit(), ncfv = myConditions.VLimit();
myResult.SameDegree(iu,iv,ncfu,ncfv);
myDegreeInU = ncfu - 1;
myDegreeInV = ncfv - 1;
// Calcul des surfaces resultats
// Calculate resulting surfaces
mySurfaces = new ( TColGeom_HArray1OfSurface) (1, myNumSubSpaces[2]);
Standard_Integer j;
@ -807,7 +795,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
TColStd_Array1OfReal VKnots (1, myResult.NbPatchInV()+1);
for (j=1; j<=VKnots.Length(); j++) { VKnots.SetValue(j, myResult.VParameter(j)); }
// Preparation des donnees pour la conversion grille de polynomes --> poles
// Prepare data for conversion grid of polynoms --> poles
Handle(TColStd_HArray1OfReal) Uint1 =
new (TColStd_HArray1OfReal) (1,2);
Uint1->SetValue(1, -1);
@ -835,7 +823,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
Standard_Integer SSP, i;
for (SSP=1; SSP <= myNumSubSpaces[2]; SSP++) {
// Creation de la grille de polynomes
// Creation of the grid of polynoms
Standard_Integer n=0,icf=1,ieq;
for (j=1; j<=myResult.NbPatchInV(); j++) {
for (i=1; i<=myResult.NbPatchInU(); i++) {
@ -850,13 +838,13 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
}
}
// Conversion en poles
// Conversion into poles
Convert_GridPolynomialToPoles CvP (myResult.NbPatchInU(),myResult.NbPatchInV(),
iu,iv,myMaxDegInU,myMaxDegInV,NbCoeff,
Poly,Uint1,Vint1,Uint2,Vint2);
if ( !CvP.IsDone() ) { myDone = Standard_False; }
// Conversion en BSpline
// Conversion into BSpline
mySurfaces->ChangeValue(SSP) = new (Geom_BSplineSurface)
( CvP.Poles()->Array2(),
CvP.UKnots()->Array1(), CvP.VKnots()->Array1(),

File diff suppressed because it is too large Load Diff

View File

@ -2,50 +2,44 @@
// Created: Tue Jul 2 10:31:42 1996
// Author: Joelle CHAUVET
// <jct@sgi38>
// Modified: Mon Dec 9 11:39:13 1996
// by: Joelle CHAUVET
// G1135 : empty constructor
// G1134 : option 0 for precision code
// by PMN
// PRO9093 on remplace MA1NPB par une gestion contextuelle
// pour determiner le degree de Jacobbi.
#include <AdvApp2Var_Context.ixx>
#include <Standard_ConstructionError.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
// Calcul des parametres
// Calculaton of parameters
static Standard_Boolean lesparam(const Standard_Integer iordre,
const Standard_Integer ncflim,
const Standard_Integer icodeo,
Standard_Integer& nbpnts,
Standard_Integer& ndgjac)
{
// degree de jacobi
ndgjac = ncflim; // il toujours garder un coeff en reserve
// jacobi degree
ndgjac = ncflim; // it always keeps a reserve coefficient
if (icodeo< 0) return Standard_False;
if (icodeo > 0) {
ndgjac += (9 - (iordre+1)); //iordre decale les frequences vers le haut
ndgjac += (9 - (iordre+1)); //iordre rescales the frequences upwards
ndgjac += (icodeo-1)*10;
}
// ---> Nbre mini de points necessaires.
// ---> Min Number of required pointss.
if (ndgjac < 8) { nbpnts = 8; }
else if (ndgjac < 10) { nbpnts = 10; }
// else if (ndgjac < 15) { nbpnt = 15; } Bug Nombre impairs
// else if (ndgjac < 15) { nbpnt = 15; } Bug Uneven number
else if (ndgjac < 20) { nbpnts = 20;}
// else if (ndgjac < 25) { nbpnt = 25; } Bug Nombre impairs
// else if (ndgjac < 25) { nbpnt = 25; } Bug Uneven number
else if (ndgjac < 30) { nbpnts = 30;}
else if (ndgjac < 40) { nbpnts = 40;}
else if (ndgjac < 50) { nbpnts = 50;}
// else if (*ndgjac < 61) { nbpnt = 61;} Bug Nombre impairs
// else if (*ndgjac < 61) { nbpnt = 61;} Bug Uneven number
else {
nbpnts = 50;
#if DEB
cout << "F(U, V) : Pas assez de point de discretisation" << endl;
cout << "F(U, V) : Not enough points of discretization" << endl;
#endif
}
// Si contraintes aux bords, cela fait 2 points de plus
// If constraints are on borders, this adds 2 points
if (iordre>-1) { nbpnts += 2;}
return Standard_True;

View File

@ -103,26 +103,26 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
AdvApp2Var_Node& NodeBegin,
AdvApp2Var_Node& NodeEnd)
{
// les valeurs fixes
// fixed values
Standard_Integer NBCRMX=1, NBCRBE;
// les donnees stockees dans le Context
// data stored in the Context
Standard_Integer NDIMEN, NBSESP, NDIMSE;
NDIMEN = Conditions.TotalDimension();
NBSESP = Conditions.TotalNumberSSP();
// Attention : ne marche que pour le 3D
// Attention : works only in 3D
NDIMSE = 3;
// le domaine de la grille
// the domain of the grid
Standard_Real UVFONC[4];
UVFONC[0] = U0;
UVFONC[1] = U1;
UVFONC[2] = V0;
UVFONC[3] = V1;
// les donnees relatives a l'iso a approcher
// data related to the processed iso
Standard_Integer IORDRE = myExtremOrder, IDERIV = myDerivOrder;
Standard_Real TCONST = myConstPar;
// les donnees relatives au type de l'iso
// data related to the type of the iso
Standard_Integer ISOFAV,NBROOT,NDGJAC,NCFLIM;
Standard_Real TABDEC[2];
Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots();
@ -162,7 +162,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
//#endif
}
// les donnees relatives a la position de l'iso (frontiere ou ligne de decoupe)
// data relative to the position of iso (front or cut line)
Handle (TColStd_HArray1OfReal) HEPSAPR = new TColStd_HArray1OfReal(1,NBSESP);
Standard_Integer iesp;
switch(myPosition) {
@ -195,7 +195,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
Standard_Real *EPSAPR
= (Standard_Real *) &HEPSAPR ->ChangeArray1()(HEPSAPR ->Lower());
// les tableaux des approximations
// the tables of approximations
Standard_Integer SZCRB = NDIMEN*NCFLIM;
Handle (TColStd_HArray1OfReal) HCOURBE =
new TColStd_HArray1OfReal(1,SZCRB*(IDERIV+1));
@ -233,13 +233,13 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
(HERRMOY ->LowerRow(),HERRMOY ->LowerCol());
Standard_Real *EMYAPP = new Standard_Real[NBSESP];
//
// les approximations
// the approximations
//
Standard_Integer IERCOD=0, NCOEFF=0;
Standard_Integer iapp,ncfapp,ierapp;
// Standard_Integer id,ic,ideb;
for (iapp=0;iapp<=IDERIV;iapp++) {
// approximation de la derivee d'ordre iapp
// approximation of the derivative of order iapp
ncfapp = 0;
ierapp = 0;
// GCC 3.0 would not accept this line without the void
@ -271,7 +271,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
EMXAPP,
EMYAPP,
&ierapp);
// gestion des erreurs et du nombre de coeff.
// error and coefficient management.
if (ierapp>0) {
myApprIsDone = Standard_False;
myHasResult = Standard_False;
@ -279,7 +279,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
}
if (NCOEFF<=ncfapp) NCOEFF=ncfapp;
if (ierapp==-1) IERCOD = -1;
// recuperation des contraintes d'ordre 0 a IORDRE aux extremites
// return constraints of order 0 to IORDRE of extremities
Standard_Integer ider, jpos=HCONTR1->Lower();
for (ider=0; ider<=IORDRE;ider++) {
gp_Pnt pt(HCONTR1->Value(jpos),
@ -306,25 +306,25 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
}
jpos+=3;
}
// recuperation des erreurs
// return errors
for (iesp=1; iesp<=NBSESP;iesp++) {
HERRMAX->SetValue(iesp,iapp+1,EMXAPP[iesp-1]);
HERRMOY->SetValue(iesp,iapp+1,EMYAPP[iesp-1]);
}
// passage a l'approximation d'ordre superieur
// passage to the approximation of higher order
CRBAPP += SZCRB;
SOMAPP += SZTAB;
DIFAPP += SZTAB;
}
// gestion des resultats
// management of results
if (IERCOD == 0) {
// toutes les approx. sont bonnes
// all approximations are correct
myApprIsDone = Standard_True;
myHasResult = Standard_True;
}
else if (IERCOD == -1) {
// une approx. au moins n'est pas bonne
// at least one approximation is not correct
myApprIsDone = Standard_False;
myHasResult = Standard_True;
}

File diff suppressed because it is too large Load Diff

View File

@ -96,15 +96,15 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
const AdvApp2Var_EvaluatorFunc2Var& Func)
{
// les donnees stockees dans le Context
// data stored in the Context
Standard_Integer NDIMEN, NBSESP, NDIMSE, ISOFAV;
NDIMEN = Conditions.TotalDimension();
NBSESP = Conditions.TotalNumberSSP();
// Attention : ne marche que pour le 3D
// Attention : works only for 3D
NDIMSE = 3;
ISOFAV = Conditions.FavorIso();
// les donnees relatives au patch a discretiser
// data related to the patch to be discretized
Standard_Integer NBPNTU, NBPNTV;
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV;
Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots();
@ -118,8 +118,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
NBPNTV = (Conditions.VRoots())->Length();
if (myOrdInV>-1) NBPNTV -= 2;
// les donnees stockees dans le Framework Constraints cad Noeuds et Isos
// C1, C2, C3 et C4 sont dimensionnes en FORTRAN a (NDIMEN,IORDRU+2,IORDRV+2)
// data stored in the Framework Constraints cad Nodes and Isos
// C1, C2, C3 and C4 are dimensionnes in FORTRAN with (NDIMEN,IORDRU+2,IORDRV+2)
Standard_Integer SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2);
Handle (TColStd_HArray1OfReal) HCOINS =
new TColStd_HArray1OfReal(1,SIZE*4);
@ -130,10 +130,10 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
for (iu=0;iu<=myOrdInU;iu++) {
for (iv=0;iv<=myOrdInV;iv++) {
// facteur de normalisation
// factor of normalization
rho = pow(du,iu)*pow(dv,iv);
// F(U0,V0) et ses derivees normalisees sur (-1,1)
// F(U0,V0) and its derivatives normalized on (-1,1)
valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).X();
HCOINS->SetValue( 1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv , valnorm );
valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Y();
@ -141,7 +141,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Z();
HCOINS->SetValue( 3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
// F(U1,V0) et ses derivees normalisees sur (-1,1)
// F(U1,V0) and its derivatives normalized on (-1,1)
valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).X();
HCOINS->SetValue( SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Y();
@ -149,7 +149,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Z();
HCOINS->SetValue( SIZE+3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
// F(U0,V1) et ses derivees normalisees sur (-1,1)
// F(U0,V1) and its derivatives normalized on (-1,1)
valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).X();
HCOINS->SetValue( 2*SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Y();
@ -157,7 +157,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Z();
HCOINS->SetValue( 2*SIZE+3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
// F(U1,V1) et ses derivees normalisees sur (-1,1)
// F(U1,V1) and its derivatives normalized on (-1,1)
valnorm = rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).X();
HCOINS->SetValue( 3*SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
valnorm = rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).Y();
@ -172,8 +172,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
Standard_Real *C3 = C2 + SIZE;
Standard_Real *C4 = C3 + SIZE;
// tableaux SomTab et Diftab de discretisation des isos U=U0 et U=U1
// SU0, SU1, DU0 et DU1 sont dimensionnes en FORTRAN a
// tables SomTab and Diftab of discretization of isos U=U0 and U=U1
// SU0, SU1, DU0 and DU1 are dimensioned in FORTRAN to
// (1+NBPNTV/2)*NDIMEN*(IORDRU+1)
SIZE = (1+NBPNTV/2)*NDIMEN;
@ -198,7 +198,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
HDU1 ->ChangeArray1() =
( (Constraints.IsoU(myU1,myV0,myV1)).DifTab() ) ->Array1();
// normalisation
// normalization
Standard_Integer ideb1,ideb2,ideb3,ideb4,jj;
for (iu=1;iu<=IORDRU;iu++) {
rho = pow(du,iu);
@ -223,8 +223,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
Standard_Real *DU1 =
(Standard_Real *) &HDU1 ->ChangeArray1()(HDU1 ->Lower());
// tableaux SomTab et Diftab de discretisation des isos V=V0 et V=V1
// SU0, SU1, DU0 et DU1 sont dimensionnes en FORTRAN a
// tables SomTab and Diftab of discretization of isos V=V0 and V=V1
// SU0, SU1, DU0 and DU1 are dimensioned in FORTRAN at
// (1+NBPNTU/2)*NDIMEN*(IORDRV+1)
SIZE = (1+NBPNTU/2)*NDIMEN;
@ -273,7 +273,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
Standard_Real *DV1 =
(Standard_Real *) &HDV1 ->ChangeArray1()(HDV1 ->Lower());
// SOSOTB et DIDITB sont dimensionnes en FORTRAN a
// SOSOTB and DIDITB are dimensioned in FORTRAN at
// (0:NBPNTU/2,0:NBPNTV/2,NDIMEN)
SIZE=(1+NBPNTU/2)*(1+NBPNTV/2)*NDIMEN;
@ -289,7 +289,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
(Standard_Real *) &HDIDI ->ChangeArray1()(HDIDI ->Lower());
HDIDI->Init(0.);
// SODITB et DISOTB sont dimensionnes en FORTRAN a
// SODITB and DISOTB are dimensioned in FORTRAN at
// (1:NBPNTU/2,1:NBPNTV/2,NDIMEN)
SIZE=(NBPNTU/2)*(NBPNTV/2)*NDIMEN;
@ -307,12 +307,12 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
Standard_Integer IERCOD=0;
// discretisation des polynomes d'interpolation
// discretization of polynoms of interpolation
AdvApp2Var_ApproxF2var::mma2cdi_(&NDIMEN,&NBPNTU,UROOT,&NBPNTV,VROOT,&IORDRU,&IORDRV,
C1,C2,C3,C4,SU0,SU1,DU0,DU1,SV0,SV1,DV0,DV1,
SOSOTB,SODITB,DISOTB,DIDITB,&IERCOD);
// discretisation du carreau
// discretization of the square
Standard_Real UDBFN[2],VDBFN[2];
UDBFN[0] = myU0;
UDBFN[1] = myU1;
@ -350,7 +350,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
TAB,
&IERCOD);
// on stocke les resultats
// the results are stored
if (IERCOD == 0) {
myDiscIsDone = Standard_True;
mySosoTab = HSOSO;
@ -391,24 +391,24 @@ Standard_Boolean AdvApp2Var_Patch::IsApproximated() const
void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
const AdvApp2Var_Framework& Constraints)
{
// les donnees stockees dans le Context
// data stored in the Context
Standard_Integer NDIMEN, NBSESP, NDIMSE;
Standard_Integer IERCOD, NCFLMU, NCFLMV, NDegU, NDegV;
NDIMEN = Conditions.TotalDimension();
NBSESP = Conditions.TotalNumberSSP();
// Attention : ne marche que pour le 3D
// Attention : works only for 3D
NDIMSE = 3;
NCFLMU = Conditions.ULimit();
NCFLMV = Conditions.VLimit();
NDegU = NCFLMU - 1;
NDegV = NCFLMV - 1;
// les donnees relatives au patch a approcher
// data relative to the patch
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV;
Standard_Real *PATCAN =
(Standard_Real *) &myEquation ->ChangeArray1()(myEquation ->Lower());
// les courbes d'approximation des Isos U
// curves of approximation of Isos U
Standard_Integer SIZE = NCFLMV*NDIMEN;
Handle (TColStd_HArray1OfReal) HIsoU0
= new TColStd_HArray1OfReal(1,SIZE*(IORDRU+1));
@ -434,7 +434,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
(Standard_Integer *) &HCFU1 ->ChangeArray1()(HCFU1 ->Lower());
HCFU1->Init( (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff() );
// normalisation des Isos U
// normalization of Isos U
Standard_Integer iu,iv;
Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm;
Standard_Integer ideb0,ideb1,jj;
@ -449,7 +449,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
}
}
// les courbes d'approximation des Isos V
// curves of approximation of Isos V
SIZE = NCFLMU*NDIMEN;
Handle (TColStd_HArray1OfReal) HIsoV0
= new TColStd_HArray1OfReal(1,SIZE*(IORDRV+1));
@ -475,7 +475,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
(Standard_Integer *) &HCFV1 ->ChangeArray1()(HCFV1 ->Lower());
HCFV1->Init( (Constraints.IsoV(myU0,myU1,myV1)).NbCoeff() );
// normalisation des Isos V
// normalization of Isos V
for (iv=1;iv<=IORDRV;iv++) {
rho = pow(dv,iv);
ideb0 = HIsoV0->Lower() + iv*SIZE -1;
@ -486,7 +486,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
}
}
// ajout des contraintes a V constant
// add constraints to constant V
Handle (TColStd_HArray1OfReal) HHERMV
= new TColStd_HArray1OfReal(1,(2*IORDRV+2)*(2*IORDRV+2));
Standard_Real *HermV =
@ -510,7 +510,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
PATCAN);
}
// ajout des contraintes a U constant
// add constraints to constant U
Handle (TColStd_HArray1OfReal) HHERMU
= new TColStd_HArray1OfReal(1,(2*IORDRU+2)*(2*IORDRU+2));
Standard_Real *HermU =
@ -525,7 +525,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
NCFU0,IsoU0,NCFU1,IsoU1,HermU,PATCAN);
}
// ajout des contraintes de coins
// add constraints at the corners
Standard_Integer ideb;
SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2);
Handle (TColStd_HArray1OfReal) HCOINS =
@ -535,7 +535,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
for (iv=0;iv<=myOrdInV;iv++) {
rho = pow(du,iu)*pow(dv,iv);
// -F(U0,V0) et ses derivees normalisees sur (-1,1)
// -F(U0,V0) and its derivatives normalized on (-1,1)
ideb = HCOINS->Lower() + NDIMEN*iu+NDIMEN*(IORDRU+2)*iv - 1;
valnorm = -rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).X();
HCOINS->SetValue( 1+ideb , valnorm );
@ -544,7 +544,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
valnorm = -rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Z();
HCOINS->SetValue( 3+ideb , valnorm );
// -F(U1,V0) et ses derivees normalisees sur (-1,1)
// -F(U1,V0) and its derivatives normalized on (-1,1)
ideb += SIZE;
valnorm = -rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).X();
HCOINS->SetValue( 1+ideb , valnorm );
@ -553,7 +553,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
valnorm = -rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Z();
HCOINS->SetValue( 3+ideb , valnorm );
// -F(U0,V1) et ses derivees normalisees sur (-1,1)
// -F(U0,V1) and its derivatives normalized on (-1,1)
ideb += SIZE;
valnorm = -rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).X();
HCOINS->SetValue( 1+ideb , valnorm );
@ -562,7 +562,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
valnorm = -rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Z();
HCOINS->SetValue( 3+ideb , valnorm );
// -F(U1,V1) et ses derivees normalisees sur (-1,1)
// -F(U1,V1) and its derivatives normalized on (-1,1)
ideb += SIZE;
valnorm = -rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).X();
HCOINS->SetValue( 1+ideb , valnorm );
@ -573,7 +573,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
}
}
// tableaux necessaires pour le FORTRAN
// tables required for FORTRAN
Standard_Integer IORDMX = Max(IORDRU,IORDRV);
Handle (TColStd_HArray1OfReal) HEXTR =
new TColStd_HArray1OfReal(1,2*IORDMX+2);
@ -587,7 +587,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
Standard_Integer idim,ncf0,ncf1,iun=1;
Standard_Real *Is;
// ajout des extremites des isos U
// add extremities of isos U
for (iu=1;iu<=IORDRU+1;iu++) {
ncf0 = HCFU0->Value(HCFU0->Lower()+iu-1);
ncf1 = HCFU1->Value(HCFU1->Lower()+iu-1);
@ -609,7 +609,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
}
}
// ajout des extremites des isos V
// add extremities of isos V
for (iv=1;iv<=IORDRV+1;iv++) {
ncf0 = HCFV0->Value(HCFV0->Lower()+iv-1);
ncf1 = HCFV1->Value(HCFV1->Lower()+iv-1);
@ -631,7 +631,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
}
}
// ajout du tout a PATCAN
// add all to PATCAN
Standard_Real *C1 =
(Standard_Real *) &HCOINS ->ChangeArray1()(HCOINS ->Lower());
Standard_Real *C2 = C1 + SIZE;
@ -660,7 +660,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
hmax[3] = 1.75;
for (iesp=1;iesp<=NBSESP;iesp++) {
// erreur max dans le sous-espace iesp
// error max in sub-space iesp
errU=0.;
for (iv=1;iv<=myOrdInV+1;iv++) {
error = ((Constraints.IsoV(myU0,myU1,myV0)).MaxErrors())->Value(iesp,iv);
@ -678,7 +678,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
myMaxErrors->ChangeValue(iesp) +=
errU * hmax[myOrdInV+1] + errV * hmax[myOrdInU+1];
// erreur moyenne dans le sous-espace iesp
// average error in sub-space iesp
errU=0.;
for (iv=1;iv<=myOrdInV+1;iv++) {
error = ((Constraints.IsoV(myU0,myU1,myV0)).MoyErrors())->Value(iesp,iv);
@ -699,7 +699,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
+ errV*hmax[myOrdInU+1] * errV*hmax[myOrdInU+1];
myMoyErrors->SetValue(iesp,Sqrt(error));
// erreurs maxi aux iso-frontieres
// max errors at iso-borders
Handle (TColStd_HArray2OfReal) HERISO
= new TColStd_HArray2OfReal(1,NBSESP,1,4);
HERISO->SetValue(iesp,1,
@ -711,7 +711,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
HERISO->SetValue(iesp,4,
((Constraints.IsoU(myU1,myV0,myV1)).MaxErrors())->Value(iesp,1));
// calcul des erreurs max aux coins
// calculate max errors at the corners
Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1,err2,err3,err4;
for (iu=0;iu<=myOrdInU;iu++) {
for (iv=0;iv<=myOrdInV;iv++) {
@ -726,13 +726,13 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
}
}
// calcul des erreurs max sur les bords
// calculate max errors on borders
err1 = Max(emax1,emax2);
err2 = Max(emax3,emax4);
err3 = Max(emax1,emax3);
err4 = Max(emax2,emax4);
// calcul des erreurs finales sur les isos internes
// calculate final errors on internal isos
if ( (Constraints.IsoV(myU0,myU1,myV0)).Position() == 0 ) {
HERISO ->ChangeValue(iesp,1) += err1*hmax[myOrdInU+1];
}
@ -759,7 +759,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
const Standard_Integer NumDec)
{
// les donnees stockees dans le Context
// data stored in the Context
Standard_Integer NDIMEN, NBSESP, NDIMSE;
Standard_Integer NBPNTU, NBPNTV, NCFLMU, NCFLMV, NDJACU, NDJACV;
Standard_Integer NDegU, NDegV, NJacU, NJacV;
@ -779,11 +779,11 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
NJacU = NDJACU + 1;
NJacV = NDJACV + 1;
// les donnees relatives au patch a approcher
// data relative to the processed patch
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV,
NDMINU = 1, NDMINV = 1, NCOEFU, NCOEFV;
// NDMINU et NDMINV dependent du nb de coeff des isos voisines
// et de l'ordre de continuite souhaite
// NDMINU and NDMINV depend on the nb of coeff of neighboring isos
// and of the required order of continuity
NDMINU = Max(1,2*IORDRU+1);
NCOEFU = (Constraints.IsoV(myU0,myU1,myV0)).NbCoeff()-1;
NDMINU = Max(NDMINU,NCOEFU);
@ -796,7 +796,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
NCOEFV = (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff()-1;
NDMINV = Max(NDMINV,NCOEFV);
// les tableaux des approximations
// tables of approximations
Handle (TColStd_HArray1OfReal) HEPSAPR =
new TColStd_HArray1OfReal(1,NBSESP);
Handle (TColStd_HArray1OfReal) HEPSFRO =
@ -842,7 +842,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
Standard_Real *ERRMOY =
(Standard_Real *) &HERRMOY ->ChangeArray1()(HERRMOY ->Lower());
// les tableaux de discretisation du carreau
// tables of discretization of the square
Standard_Real *SOSOTB =
(Standard_Real *) &mySosoTab ->ChangeArray1()(mySosoTab ->Lower());
Standard_Real *DISOTB =
@ -884,7 +884,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
&ITYDEC,
&IERCOD);
// les resultats
// results
myCutSense = ITYDEC;
if (ITYDEC == 0 && IERCOD<=0) {
myHasResult = Standard_True;
@ -894,7 +894,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
myMaxErrors = HERRMAX;
myMoyErrors = HERRMOY;
// Passage en canonique sur [-1,1]
// Passage to canonic on [-1,1]
AdvApp2Var_MathBase::mmfmca9_(&NJacU,&NJacV,&NDIMEN,&myNbCoeffInU,&myNbCoeffInV,
&NDIMEN,PATJAC,PATJAC);
AdvApp2Var_ApproxF2var::mma2can_(&NCFLMU,&NCFLMV,&NDIMEN,
@ -907,11 +907,11 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
}
myEquation = HPCAN;
// Ajout des contraintes et des erreurs
// Add constraints and errors
AddConstraints(Conditions,Constraints);
AddErrors(Constraints);
// Reduction des degres si possible
// Reduction of degrees if possible
PATCAN = (Standard_Real *)
&myEquation->ChangeArray1()(myEquation ->Lower());
@ -969,7 +969,7 @@ void AdvApp2Var_Patch::ChangeDomain(const Standard_Real a,
//============================================================================
//function : ResetApprox
//purpose : permet d'effacer un resultat lorsqu'il faut decouper
//purpose : allows removing a result when it is necessary to cut
//============================================================================
void AdvApp2Var_Patch::ResetApprox()
@ -980,8 +980,7 @@ void AdvApp2Var_Patch::ResetApprox()
//============================================================================
//function : OverwriteApprox
//purpose : permet de conserver un resultat
// meme si la precision n'est pas satisfaite
//purpose : allows preserving a result even if the precision is not satisfactory
//============================================================================
void AdvApp2Var_Patch::OverwriteApprox()
@ -1052,9 +1051,9 @@ Standard_Integer AdvApp2Var_Patch::VOrder() const
//============================================================================
//function : CutSense sans Critere
//purpose : 0 : OK; 1 : decoupe necessaire en U;
// 2 : dec. nec. en V; 3 : dec. nec. en U et en V
//function : CutSense without Critere
//purpose : 0 : OK; 1 : required cut by U;
// 2 : required cut by V; 3 : required cut by U and by V
//============================================================================
Standard_Integer AdvApp2Var_Patch::CutSense() const
@ -1064,9 +1063,9 @@ Standard_Integer AdvApp2Var_Patch::CutSense() const
//============================================================================
//function : CutSense avec critere
//purpose : 0 : OK; 1 : decoupe necessaire en U;
// 2 : dec. nec. en V; 3 : dec. nec. en U et en V
//function : CutSense with critere
//purpose : 0 : OK; 1 : required cut by U;
// 2 : required cut by V; 3 : required cut by U and by V
//============================================================================
Standard_Integer AdvApp2Var_Patch::CutSense(const AdvApp2Var_Criterion& Crit,
@ -1109,7 +1108,7 @@ Standard_Integer AdvApp2Var_Patch::NbCoeffInV() const
//============================================================================
//function : ChangeNbCoeff
//purpose : permet d'augmenter le nombre de coeff (cf Network)
//purpose : allows increasing the nb of coeff (cf Network)
//============================================================================
void AdvApp2Var_Patch::ChangeNbCoeff(const Standard_Integer NbCoeffU,
@ -1121,7 +1120,7 @@ void AdvApp2Var_Patch::ChangeNbCoeff(const Standard_Integer NbCoeffU,
//============================================================================
//function : MaxErrors
//purpose : retourne les erreurs max de l'approximation polynomiale
//purpose : returns max errors of polynomial approximation
//============================================================================
Handle(TColStd_HArray1OfReal)
@ -1132,7 +1131,7 @@ AdvApp2Var_Patch::MaxErrors() const
//============================================================================
//function : AverageErrors
//purpose : retourne les erreurs moyennes de l'approximation polynomiale
//purpose : returns average errors of polynomial approximation
//============================================================================
Handle(TColStd_HArray1OfReal)
@ -1143,7 +1142,7 @@ AdvApp2Var_Patch::AverageErrors() const
//============================================================================
//function : IsoErrors
//purpose : retourne les erreurs max sur les frontieres de l'approx. polyn.
//purpose : returns max errors on borders of polynomial approximation
//============================================================================
Handle(TColStd_HArray2OfReal)
@ -1154,7 +1153,7 @@ AdvApp2Var_Patch::IsoErrors() const
//============================================================================
//function : Poles
//purpose : retourne les poles de l'approximation polynomiale
//purpose : returns poles of the polynomial approximation
//============================================================================
Handle(TColgp_HArray2OfPnt)
@ -1195,7 +1194,7 @@ AdvApp2Var_Patch::Poles(const Standard_Integer SSPIndex,
//============================================================================
//function : Coefficients
//purpose : retourne les coeff. de l'equation de l'approximation polynomiale
//purpose : returns coeff. of the equation of polynomial approximation
//============================================================================
Handle(TColStd_HArray1OfReal)

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
#endif /*__AppBlend_API*/
//****************************************************
// Fonctions permettant de changer le type des approx.
// Functions to change the type of approx.
//****************************************************
static Standard_Boolean AppBlend_ContextSplineApprox = Standard_False;

View File

@ -1,6 +1,4 @@
// AppDef_MyLineTool.cxx
// 24-06-96 : JPI : implementation des methodes AppDef_MyLineTool::Curvature
// pour le lissage variationnel
#include <AppDef_MyLineTool.ixx>
#include <AppDef_MultiPointConstraint.hxx>

View File

@ -1,5 +1,5 @@
//File AppParCurves_MultiCurve.cxx
//Lpa, le 3/12/91
#include <AppParCurves_MultiCurve.ixx>
#include <TColgp_Array1OfPnt.hxx>

View File

@ -1,5 +1,4 @@
//File AppParCurves_MultiPoint.cxx
//Lpa, le 3/12/91
#include <AppParCurves_MultiPoint.ixx>

View File

@ -35,8 +35,7 @@ static Standard_Boolean AffichFw = Standard_False;
static Standard_Integer NbCurve = 0;
#endif
//
// sert a tester si Extrema raconte pas des betises
//
// allows testing if Extrema produces correct results/
static void ProjectPointOnCurve(const Standard_Real InitValue,
@ -204,9 +203,9 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots,
#ifdef DEB
if (Voir) {
cout<<endl;
cout<<"Controle du changement de variable : "<<endl;
cout<<"baillement mesure par projection : "<<d<<endl;
cout<<"Nombre de points : "<<nbp<<endl;
cout<<"Control the change of variable : "<<endl;
cout<<"yawn mesured by projection : "<<d<<endl;
cout<<"Number of points : "<<nbp<<endl;
}
#endif
#if 0
@ -226,8 +225,8 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots,
dglis = sqrt(dglis);
#ifdef DEB
if ( Voir) {
cout<<"glissement de parametre aux points imposes : "<<glis<<endl;
cout<<"distance de glissement aux points imposes : "<<dglis<<endl;
cout<<"shift of parameter to the imposed points : "<<glis<<endl;
cout<<"shift distance at the imposed points : "<<dglis<<endl;
}
#endif
dglis = 0.;
@ -281,7 +280,7 @@ static Standard_Boolean Check(const TColStd_Array1OfReal& FlatKnots,
tol = sqrt(d2);
#ifdef DEB
if (Voir)
cout<<"distance max sur "<<nn<<" points : "<<tol<<endl<<endl;
cout<<"distance max on "<<nn<<" points : "<<tol<<endl<<endl;
#endif
return ((tol <= d) || (tol > 0.8 * oldtol));
}
@ -359,9 +358,9 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
if(Continuity > GeomAbs_C1) Continuity = GeomAbs_C1;
//On controle les tangentes aux extremites pour savoir si le
//reparametrage est possible et on calcule les tangentes aux
//extremites de la fonction de changement de variable.
//Control tangents at the extremities to know if the
//reparametring is possible and calculate the tangents
//at the extremities of the function of change of variable.
Standard_Real tangent[2];
gp_Pnt Pcons,Pc3d;
gp_Vec Vcons,Vc3d;
@ -399,8 +398,8 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
if(dmax2 > besttol2) besttol2 = dmax2;
//On prend un multiple de l echantillon du CheckShape,
//au moins les points de controle seront bons. No comment!!!
//Take a multiple of the sample pof CheckShape,
//at least the control points will be correct. No comment!!!
Standard_Integer NCONTROL = 22;
#ifdef DEB
@ -409,8 +408,8 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
Standard_Boolean interpolok = 0;
Standard_Real tolsov = 1.e200;
//On prend des parametres a pas constant sur la curve on surface
//et sur la courbe 3d.
//Take parameters with constant step on the curve on surface
//and on curve 3d.
Standard_Real deltacons = lcons - fcons;
deltacons /= (NCONTROL);
Standard_Real deltac3d = lc3d - fc3d;
@ -530,10 +529,10 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
return;
}
if(!extrok) { // Si pas deja SameP et tgte aux fraise, on abandonne.
if(!extrok) { // If not already SameP and tangent to mill, abandon.
mySameParameter = Standard_False;
#ifdef DEB
cout<<"SameParameter probleme : tangente nulle aux extremites"<<endl;
cout<<"SameParameter problem : zero tangent to extremities"<<endl;
#endif
return;
}
@ -563,7 +562,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
#endif
while(!interpolok){
// Les tableaux et leurs bornes pour l interpolation.
// The tables and their limits for the interpolation.
Standard_Integer num_knots = count + 7;
Standard_Integer num_poles = count + 3;
TColStd_Array1OfReal Paramc3d(*pc3d,1,count+1);
@ -573,7 +572,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
TColStd_Array1OfReal InterpolationParameters(1,num_poles) ;
TColStd_Array1OfReal FlatKnots(1,num_knots) ;
// On remplit les tableaux en faisant attention aux valeurs des bouts.
// Fill tables taking attention to end values.
ContactOrder.Init(0);
ContactOrder(2) = ContactOrder(num_poles - 1) = 1;
@ -721,7 +720,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
if (Precision::IsInfinite(algtol)) {
mySameParameter = Standard_False;
#ifdef DEB
cout<<"SameParameter probleme : fonction d'interpolation du parametrage aux fraises !!"<<endl;
cout<<"SameParameter problem : function of interpolation of parametration at mills !!"<<endl;
#endif
return;
}
@ -735,7 +734,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
#ifdef DEB
if (Voir) {
if(algtol > besttol){
cout<<"SameParameter : Tol non atteinte avant approx"<<endl;
cout<<"SameParameter : Tol can't be reached before approx"<<endl;
}
}
#endif
@ -760,7 +759,7 @@ void Approx_SameParameter::Build(const Standard_Real Tolerance)
else {
#ifdef DEB
if (Voir)
cout<<"SameParameter : Pas assez de points, on enrichit"<<endl;
cout<<"SameParameter : Not enough points, enrich"<<endl;
#endif
Standard_Integer newcount = 0;

View File

@ -58,7 +58,7 @@ Approx_SweepApproximation::
Approx_SweepApproximation(const Handle(Approx_SweepFunction)& Func)
{
myFunc = Func;
// Init des variables de controles
// Init of variables of control
myParam = 0;
myOrder = -1;
first = 1.e100; last = -1.e100;
@ -79,7 +79,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
Standard_Real Tol, Tol3dMin = Tol3d, The3D2DTol=0 ;
GeomAbs_Shape continuity = Continuity;
// (1) Caracteristiques d'une section
// (1) Characteristics of a section
myFunc->SectionShape(NbPolSect, NbKnotSect, udeg);
Num2DSS = myFunc->Nb2dCurves();
tabUKnots = new (TColStd_HArray1OfReal) (1, NbKnotSect);
@ -87,11 +87,11 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
myFunc->Knots(tabUKnots->ChangeArray1());
myFunc->Mults(tabUMults->ChangeArray1());
// (2) Decompositition en sous espaces
// (2) Decompositition into sub-spaces
Handle(TColStd_HArray1OfReal) OneDTol, TwoDTol, ThreeDTol;
Num3DSS = NbPolSect;
// (2.1) Tolerance 3d et 1d
// (2.1) Tolerance 3d and 1d
OneDTol = new (TColStd_HArray1OfReal) (1, Num3DSS);
ThreeDTol = new (TColStd_HArray1OfReal) (1, Num3DSS);
@ -110,24 +110,24 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
Translation.SetXYZ
(myFunc->BarycentreOfSurf().XYZ());
for (ii=1; ii<=Num3DSS; ii++) {
Tol = ThreeDTol->Value(ii)/2; //Afin de respecter l'erreur sur le resultat final.
Tol = ThreeDTol->Value(ii)/2; // To take accout of the error on the final result.
OneDTol->SetValue(ii, Tol * Wmin(ii) / Size);
Tol *= Wmin(ii); //Facteur de projection
Tol *= Wmin(ii); //Factor of projection
ThreeDTol->SetValue(ii, Max(Tol, 1.e-20) );
}
}
else { Num1DSS = 0; }
// (2.2) Tolerance et Transformation 2d.
// (2.2) Tolerance and Transformation 2d.
if (Num2DSS == 0) {TwoDTol.Nullify();}
else {
// pour le 2d on definit une affinite a partir des resolutions, afin
// d'avoir une tolerance d'approximation homogene (u/v et 2d/3d)
// for 2d define affinity using resolutions, to
// avoid homogenuous tolerance of approximation (u/v and 2d/3d)
Standard_Real res, tolu, tolv;
TwoDTol = new (TColStd_HArray1OfReal) (1, Num2DSS);
AAffin = new (Approx_HArray1OfGTrsf2d) (1, Num2DSS);
The3D2DTol= 0.9*BoundTol; // 10% de securite
The3D2DTol= 0.9*BoundTol; // 10% of security
for (ii=1; ii<=Num2DSS; ii++) {
myFunc->Resolution(ii, The3D2DTol, tolu, tolv);
if ( tolu> tolv ) {
@ -159,7 +159,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
myD2Poles2d = new (TColgp_HArray1OfVec2d)(1, Num2DSS);
COnSurfErr = new (TColStd_HArray1OfReal)(1, Num2DSS);
}
// Controle que myFunc->D2 est implemente
// Checks if myFunc->D2 is implemented
if (continuity >= GeomAbs_C2) {
Standard_Boolean B;
B = myFunc->D2(First, First, Last,
@ -171,7 +171,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
myD2Weigths->ChangeArray1());
if (!B) continuity = GeomAbs_C1;
}
// Controle que myFunc->D1 est implemente
// Checks if myFunc->D1 is implemented
if (continuity == GeomAbs_C1) {
Standard_Boolean B;
B = myFunc->D1(First, First, Last,
@ -181,14 +181,14 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
if (!B) continuity = GeomAbs_C0;
}
//Pour que F soit au moins 20 fois plus precise que son approx
// So that F was at least 20 times more exact than its approx
myFunc->SetTolerance(Tol3dMin/20, Tol2d/20);
Standard_Integer NbIntervalC2 = myFunc->NbIntervals(GeomAbs_C2);
Standard_Integer NbIntervalC3 = myFunc->NbIntervals(GeomAbs_C3);
if (NbIntervalC3 > 1) {
// (3.1) Approximation avec decoupe preferentiel
// (3.1) Approximation with preferential cut
TColStd_Array1OfReal Param_de_decoupeC2 (1, NbIntervalC2+1);
myFunc->Intervals(Param_de_decoupeC2, GeomAbs_C2);
TColStd_Array1OfReal Param_de_decoupeC3 (1, NbIntervalC3+1);
@ -208,7 +208,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
Preferentiel);
}
else {
// (3.2) Approximation sans decoupe preferentiel
// (3.2) Approximation without preferential cut
AdvApprox_DichoCutting Dichotomie;
Approx_SweepApproximation_Eval ev (*this);
Approximation(OneDTol, TwoDTol, ThreeDTol,
@ -223,7 +223,7 @@ void Approx_SweepApproximation::Perform(const Standard_Real First,
//========================================================================
//function : Approximation
//purpose : Appel F(t) et stocke les resultats
//purpose : Call F(t) and store the results
//========================================================================
void Approx_SweepApproximation::
Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
@ -252,14 +252,13 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
done = Approx.HasResult();
if (done) {
// --> Remplissage des Champs de la surface ----
// --> Fill Champs of the surface ----
Standard_Integer ii, jj;
vdeg = Approx.Degree();
// Malheureusement Adv_Approx stock la transpose de
// ce que l'on souhaite, donc l'ecriture
// tabPoles = Approx.Poles() donnerait un resultat errone
// Il n'y a plus qu'a allouer et recopier termes a termes...
// Unfortunately Adv_Approx stores the transposition of the required
// so, writing tabPoles = Approx.Poles() will give an erroneous result
// It is only possible to allocate and recopy term by term...
tabPoles = new (TColgp_HArray2OfPnt)
(1, Num3DSS, 1, Approx.NbPoles());
tabWeights = new (TColStd_HArray2OfReal)
@ -272,7 +271,7 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
for (jj=1; jj <=Approx.NbPoles() ; jj++) {
P = Approx.Poles()->Value(jj,ii);
wpoid = Approx.Poles1d()->Value(jj,ii);
P.ChangeCoord() /= wpoid; // Il faut diviser les poles par les poids
P.ChangeCoord() /= wpoid; // It is necessary to divide poles by weight
P.Translate(Translation);
tabPoles->SetValue (ii, jj, P);
tabWeights->SetValue(ii, jj, wpoid );
@ -288,13 +287,13 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
}
}
// ici cela va mieux
// this is better
tabVKnots = Approx.Knots();
tabVMults = Approx.Multiplicities();
// --> Remplissage des courbes 2d ----------
// --> Filling of curves 2D ----------
if (Num2DSS>0) {
gp_GTrsf2d TrsfInv;
deg2d = vdeg;
@ -306,14 +305,14 @@ Approximation(const Handle(TColStd_HArray1OfReal)& OneDTol,
Handle(TColgp_HArray1OfPnt2d) P2d =
new (TColgp_HArray1OfPnt2d) (1, Approx.NbPoles());
Approx.Poles2d( ii, P2d->ChangeArray1() );
// On n'oublie pas d'appliquer l'homothetie inverse.
// do not forget to apply inverted homothety.
for (jj=1; jj<=Approx.NbPoles(); jj++) {
TrsfInv.Transforms(P2d->ChangeValue(jj).ChangeCoord());
}
seqPoles2d.Append(P2d);
}
}
// ---> Remplissage des erreurs
// ---> Filling of errors
MError3d = new (TColStd_HArray1OfReal) (1,Num3DSS);
AError3d = new (TColStd_HArray1OfReal) (1,Num3DSS);
for (ii=1; ii<=Num3DSS; ii++) {
@ -375,21 +374,20 @@ Standard_Boolean Approx_SweepApproximation::D0(const Standard_Real Param,
Standard_Boolean Ok=Standard_True;
Standard_Real * LocalResult = &Result;
// Gestion des Bornes
// Management of limits
if ((first!=First) || (Last!=last)) {
myFunc->SetInterval(First, Last);
}
if (! ( (Param==myParam) && (myOrder>=0)
&& (first==First) && (Last==last)) ) {
// Positionement dans le cas ou l'on ne repete pas
// la derniere operation
// Positioning in case when the last operation is not repeated.
Ok = myFunc->D0(Param, First, Last,
myPoles->ChangeArray1(),
myPoles2d->ChangeArray1(),
myWeigths->ChangeArray1());
// On multiplie les poles3d par les poids apres tranlations.
// poles3d are multiplied by weight after tranlation.
for (ii=1; ii<=Num1DSS; ii++) {
myPoles->ChangeValue(ii).ChangeCoord()
-= Translation.XYZ();
@ -397,19 +395,19 @@ Standard_Boolean Approx_SweepApproximation::D0(const Standard_Real Param,
*= myWeigths->Value(ii);
}
// On applique la transformation aux poles 2d.
// The transformation is applied to poles 2d.
for (ii=1; ii<=Num2DSS; ii++) {
AAffin->Value(ii).Transforms(myPoles2d->ChangeValue(ii).ChangeCoord());
}
// Mise a jour des variable de controles et retour
// Update variables of controle and return
first = First;
last = Last;
myOrder = 0;
myParam = Param;
}
// Extraction des resultats
// Extraction of results
index = 0;
for (ii=1; ii<=Num1DSS; ii++) {
LocalResult[index] = myWeigths->Value(ii);
@ -448,7 +446,7 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param,
if (! ( (Param==myParam) && (myOrder>=1)
&& (first==First) && (Last==last)) ){
// Positionement
// Positioning
Ok = myFunc->D1(Param, First, Last,
myPoles->ChangeArray1(),
myDPoles->ChangeArray1(),
@ -457,22 +455,22 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param,
myWeigths->ChangeArray1(),
myDWeigths->ChangeArray1());
// On tient compte de la multiplication des poles3d par les poids.
// et de la translation.
// Take into account the multiplication of poles3d by weights.
// and the translation.
for ( ii=1; ii<=Num1DSS; ii++) {
//Translation sur la section
//Translation on the section
myPoles->ChangeValue(ii).ChangeCoord()
-= Translation.XYZ();
// Homothetie sur tout
// Homothety on all.
myDPoles->ChangeValue(ii) *= myWeigths->Value(ii);
Vaux.SetXYZ( myPoles->Value(ii).Coord());
myDPoles->ChangeValue(ii) += myDWeigths->Value(ii)*Vaux;
myPoles->ChangeValue(ii).ChangeCoord()
*= myWeigths->Value(ii); // Pour le cache
*= myWeigths->Value(ii); // for the cash
}
// On applique les transformation 2d aux vecteurs idoines
// Apply transformation 2d to suitable vectors
for (ii=1; ii<=Num2DSS; ii++) {
Vcoord = myDPoles2d->Value(ii).XY();
AAffin->Value(ii).Transforms(Vcoord);
@ -480,14 +478,14 @@ Standard_Boolean Approx_SweepApproximation::D1(const Standard_Real Param,
AAffin->Value(ii).Transforms(myPoles2d->ChangeValue(ii).ChangeCoord());
}
// Mise a jour des variable de controles et retour
// Update control variables and return
first = First;
last = Last;
myOrder = 1;
myParam = Param;
}
// Extraction des resultats
// Extraction of results
index = 0;
for (ii=1; ii<=Num1DSS; ii++) {
LocalResult[index] = myDWeigths->Value(ii);
@ -517,15 +515,14 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param,
Standard_Boolean Ok=Standard_True;
Standard_Real * LocalResult = &Result;
// Gestion des Bornes
// management of limits
if ((first!=First) || (Last!=last)) {
myFunc->SetInterval(First, Last);
}
if (! ( (Param==myParam) && (myOrder>=2)
&& (first==First) && (Last==last)) ) {
// Positionement dans le cas ou l'on ne repete pas
// la derniere operation
// Positioning in case when the last operation is not repeated
Ok = myFunc->D2(Param, First, Last,
myPoles->ChangeArray1(),
myDPoles->ChangeArray1(),
@ -537,20 +534,20 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param,
myDWeigths->ChangeArray1(),
myD2Weigths->ChangeArray1());
// On multiplie les poles3d par les poids apres tranlations.
// Multiply poles3d by the weight after tranlations.
for (ii=1; ii<=Num1DSS; ii++) {
// D'abord on translate
// First translate
myPoles->ChangeValue(ii).ChangeCoord()
-= Translation.XYZ();
//On calcul la derive seconde
//Calculate the second derivative
myD2Poles->ChangeValue(ii) *= myWeigths->Value(ii);
Vaux.SetXYZ( myDPoles->Value(ii).XYZ());
myD2Poles->ChangeValue(ii) += (2*myDWeigths->Value(ii))*Vaux;
Vaux.SetXYZ( myPoles->Value(ii).Coord());
myD2Poles->ChangeValue(ii) += myD2Weigths->Value(ii)*Vaux;
//Puis le reste pour le cache
//Then the remainder for the cash
myDPoles->ChangeValue(ii) *= myWeigths->Value(ii);
Vaux.SetXYZ( myPoles->Value(ii).Coord());
myDPoles->ChangeValue(ii) += myDWeigths->Value(ii)*Vaux;
@ -558,7 +555,7 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param,
*= myWeigths->Value(ii);
}
// On applique la transformation aux poles 2d.
// Apply transformation to poles 2d.
for (ii=1; ii<=Num2DSS; ii++) {
Vcoord = myD2Poles2d->Value(ii).XY();
AAffin->Value(ii).Transforms(Vcoord);
@ -569,14 +566,14 @@ Standard_Boolean Approx_SweepApproximation::D2(const Standard_Real Param,
AAffin->Value(ii).Transforms(myPoles2d->ChangeValue(ii).ChangeCoord());
}
// Mise a jour des variable de controles et retour
// Update variables of control and return
first = First;
last = Last;
myOrder = 2;
myParam = Param;
}
// Extraction des resultats
// Extraction of results
index = 0;
for (ii=1; ii<=Num1DSS; ii++) {
LocalResult[index] = myD2Weigths->Value(ii);

View File

@ -8,13 +8,13 @@
//-Version
//-Design Declaration des variables specifiques au contexte
// de trace des facettes
//-Design Declaration of variables specific to the context
// of tracing facets
//-Warning Un contexte de trace de facette est defini par :
// - le style de l'interieur de la facette
// - le style du bord de la facette
// - la couleur
//-Warning Context of tracing facets id defined by:
// - the style of the interior of the facet
// - the style of the border of the facet
// - the color
//-References
@ -29,16 +29,16 @@
//-Global data definitions
// -- l'interieur
// -- interior
// MyInteriorStyle : InteriorStyle;
// MyInteriorColor : Color;
// -- le bord
// -- border
// MyEdgeColor : Color;
// MyEdgeType : TypeOfLine;
// MyEdgeWidth : Standard_Real;
// -- les hachures
// -- shading
// MyHatchStyle : HatchStyle;

View File

@ -7,13 +7,13 @@
//-Version
//-Design Declaration des variables specifiques au contexte
// de trace de lignes
//-Design Declaration of variables specific to the context
// of line tracing
//-Warning Un contexte de trace de ligne est defini par :
// - la couleur
// - le type de trait
// - l'epaisseur
//-Warning A context of line tracing is defined by :
// - the color
// - the type of line
// - the thickness
//-References
@ -28,13 +28,13 @@
//-Global data definitions
// -- la couleur
// -- color
// MyColor : Color;
// -- le type de trait
// -- type of line
// MyType : TypeOfLine;
// -- l'epaisseur
// -- thickness
// MyWidth : Standard_Real;
//-Constructors

View File

@ -7,13 +7,13 @@
//-Version
//-Design Declaration des variables specifiques au contexte
// de trace de markers
//-Design Declaration of variables specific to the context
// of tracing of markers
//-Warning Un contexte de trace de marker est defini par :
// - la couleur
// - le type
// - l'echelle
//-Warning Context of tracing of markers is defined by :
// - the color
// - the type
// - the scale
//-References
@ -28,13 +28,13 @@
//-Global data definitions
// -- la couleur
// -- color
// MyColor : Color;
// -- le type
// -- type
// MyType : TypeOfMarker;
// -- l'echelle
// -- scale
// MyScale : Standard_Real;
//-Constructors

View File

@ -1,10 +1,10 @@
/***********************************************************************
FONCTION :
FUNCTION :
----------
Classe Aspect_Driver :
Class Aspect_Driver :
HISTORIQUE DES MODIFICATIONS :
HISTORY OF MODIFICATIONS :
--------------------------------
14-05-98 : GG ; Disable using MFT when the symbol
@ -12,13 +12,13 @@
See dirMFTisDefined changes.
30-01-98 : GG ; SPEC_MFT
L'utilisation des polices MFT devient parametrable.
Le driver doit utiliser la methode UseMFT() pour
savoir s'il doit utiliser ou non les polices
MDTV a la place des polices system.
Use of polices MFT becomes parameterized.
The driver should use method UseMFT() to
know if it is necessary or not to use MDTV policies
instead of system policies.
-> Modifications dans SetFontMap()
-> Nouvelle methode UseMFT()
-> Modifications in SetFontMap()
-> New method UseMFT()
***********************************************************************/

View File

@ -314,7 +314,7 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
TopLoc_Location LC;
Standard_Real f, l;// pour les malins qui appellent avec (u,u).
Standard_Real f, l;// for those who call with (u,u).
Handle(Geom_Curve) C3d =
BRep_Tool::Curve(E,/*LC,*/f,l); // transforming plane instead of curve
// we can loose scale factor of Curve transformation (eap 13 May 2002)
@ -418,9 +418,9 @@ void BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
if (i > Index) break;
if (i == Index) {
// JMB le 21 Mai 1999
// on fait comme dans les autres methodes CurveOnSurface. c.a.d on tient
// compte de l'orientation dans le cas des aretes de coutures (renvoi de PCurve2)
// sinon on risque de louper des curves ou de ne pas obtenir la bonne.
// it is done as in the other CurveOnSurface methods, ie. take into account
// the orientation in case of cut edges (return PCurve2)
// otherwise there is a risk to loop curves or to not get the prover one.
if (GC->IsCurveOnClosedSurface() && Eisreversed)
C = GC->PCurve2();
else
@ -1372,7 +1372,7 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V,
L = L.Predivided(V.Location());
BRep_ListIteratorOfListOfPointRepresentation itpr
((*((Handle(BRep_TVertex)*) &V.TShape()))->Points());
// On regarde dabord si il y des PointRepresentation (cas non Manifold)
// It is checked if there is PointRepresentation (case non Manifold)
while (itpr.More()) {
if (itpr.Value()->IsPointOnSurface(S,L)) {
@ -1384,8 +1384,8 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V,
TopoDS_Vertex Vf,Vl;
TopoDS_Edge E;
// Sinon on explore les aretes (PMN 4/06/97) On ne peut pas faire un raise 999/1000!
// meme si souvent il y a moyen de faire plus economique au dessus...
// Otherwise the edges are searched (PMN 4/06/97) It is not possible to succeed 999/1000!
// even if often there is a way to make more economically than above...
TopExp_Explorer exp;
for (exp.Init(F, TopAbs_EDGE); exp.More(); exp.Next()) {
E = TopoDS::Edge(exp.Current());
@ -1394,7 +1394,7 @@ gp_Pnt2d BRep_Tool::Parameters(const TopoDS_Vertex& V,
gp_Pnt2d Pf, Pl;
UVPoints(E, F, Pf, Pl);
if (V.IsSame(Vf)) return Pf;
else return Pl;//Ambiguite (naturelle) pour les edges degenerees.
else return Pl;//Ambiguity (natural) for degenerated edges.
}
}
Standard_NoSuchObject::Raise("BRep_Tool:: no parameters on surface");

View File

@ -73,8 +73,7 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W,
}
}
Forward = Standard_True; // Defaut ; Les Edge Reverse seront parcourue
// a rebourt.
Forward = Standard_True; // Defaut ; The Reverse Edges are parsed.
if((NbEdge > 2) || ((NbEdge==2) && (!myWire.Closed())) ) {
TopAbs_Orientation Or = myCurves->Value(1).Edge().Orientation();
Standard_Boolean B;
@ -83,11 +82,11 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W,
myCurves->Value(2).Edge(),
VI);
VL = TopExp::LastVertex(myCurves->Value(1).Edge());
if (VI.IsSame(VL)) { // On Garde toujours le sens de parcout
if (VI.IsSame(VL)) { // The direction of parsing is always preserved
if (Or == TopAbs_REVERSED)
Forward = Standard_False;
}
else {// On renverse toujours le sens de parcout
else {// The direction of parsing is always reversed
if (Or != TopAbs_REVERSED)
Forward = Standard_False;
}
@ -115,14 +114,14 @@ BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W,
TLast = Last;
PTol = Tol;
// Trim des courbes extremes.
// Trim the extremal curves.
Handle (BRepAdaptor_HCurve) HC;
Standard_Integer i1, i2;
Standard_Real f=TFirst, l=TLast, d;
i1 = i2 = CurIndex;
Prepare(f, d, i1);
Prepare(l, d, i2);
CurIndex = (i1+i2)/2; // Petite optimisation
CurIndex = (i1+i2)/2; // Small optimization
if (i1==i2) {
if (l > f)
HC = Handle(BRepAdaptor_HCurve)::DownCast(myCurves->Value(i1).Trim(f, l, PTol));
@ -207,14 +206,14 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
Standard_Integer ii, jj, kk, n;
Standard_Real f, F, delta;
// Premiere courbe (sens de parcourt de le edge)
// First curve (direction of parsing of the edge)
n = myCurves->ChangeValue(1).NbIntervals(S);
Handle(TColStd_HArray1OfReal) Ti = new (TColStd_HArray1OfReal) (1, n+1);
myCurves->ChangeValue(1).Intervals(Ti->ChangeArray1(), S);
InvPrepare(1, f, delta);
F = myKnots->Value(1);
if (delta < 0) {
//sens de parcourt inverser
// invert the direction of parsing
for (kk=1,jj=Ti->Length(); jj>0; kk++, jj--)
T(kk) = F + (Ti->Value(jj)-f)*delta;
}
@ -223,7 +222,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
T(kk) = F + (Ti->Value(kk)-f)*delta;
}
// et les suivante
// and the next
for (ii=2; ii<=myCurves->Length(); ii++) {
n = myCurves->ChangeValue(ii).NbIntervals(S);
if (n != Ti->Length()-1) Ti = new (TColStd_HArray1OfReal) (1, n+1);
@ -231,7 +230,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
InvPrepare(ii, f, delta);
F = myKnots->Value(ii);
if (delta < 0) {
//sens de parcourt inverser
// invert the direction of parcing
for (jj=Ti->Length()-1; jj>0; kk++, jj--)
T(kk) = F + (Ti->Value(jj)-f)*delta;
}
@ -346,7 +345,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
GeomAbs_CurveType BRepAdaptor_CompCurve::GetType() const
{
return GeomAbs_OtherCurve; //temporaire
return GeomAbs_OtherCurve; //temporary
// if ( myCurves->Length() > 1) return GeomAbs_OtherCurve;
// return myCurves->Value(1).GetType();
}
@ -409,10 +408,10 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
//=======================================================================
//function : Prepare
//purpose :
// Lorsque le parametre est pres de un "noeud" on determine la loi en
// fonction du signe de tol:
// - negatif -> Loi precedente au noeud.
// - positif -> Loi consecutive au noeud.
// When the parameter is close to "node" the rule is determined
// depending on the sign of tol:
// - negative -> Rule preceding to the node.
// - positive -> Rule following after the node.
//=======================================================================
void BRepAdaptor_CompCurve::Prepare(Standard_Real& W,
@ -425,7 +424,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
else { Eps = -PTol;}
Wtest = W+Eps; //Decalage pour discriminer les noeuds
Wtest = W+Eps; //Offset to discriminate the nodes
if(Periodic){
Wtest = ElCLib::InPeriod(Wtest,
0,
@ -433,7 +432,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
W = Wtest-Eps;
}
// Recheche de le index
// Find the index
Standard_Boolean Trouve = Standard_False;
if (myKnots->Value(CurIndex) > Wtest) {
for (ii=CurIndex-1; ii>0 && !Trouve; ii--)
@ -441,7 +440,7 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
CurIndex = ii;
Trouve = Standard_True;
}
if (!Trouve) CurIndex = 1; // En dehors des bornes ...
if (!Trouve) CurIndex = 1; // Out of limits...
}
else if (myKnots->Value(CurIndex+1) <= Wtest) {
@ -450,17 +449,17 @@ const TopoDS_Wire& BRepAdaptor_CompCurve::Wire() const
CurIndex = ii;
Trouve = Standard_True;
}
if (!Trouve) CurIndex = myCurves->Length(); // En dehors des bornes ...
if (!Trouve) CurIndex = myCurves->Length(); // Out of limits...
}
// Reverse ?
// Invert ?
const TopoDS_Edge& E = myCurves->Value(CurIndex).Edge();
TopAbs_Orientation Or = E.Orientation();
Standard_Boolean Reverse;
Reverse = (Forward && (Or == TopAbs_REVERSED)) ||
(!Forward && (Or != TopAbs_REVERSED));
// Calcul du parametre local
// Calculate the local parameter
BRep_Tool::Range(E, f, l);
Delta = myKnots->Value(CurIndex+1) - myKnots->Value(CurIndex);
if (Delta > PTol*1.e-9) Delta = (l-f)/Delta;
@ -478,15 +477,15 @@ void BRepAdaptor_CompCurve::InvPrepare(const Standard_Integer index,
Standard_Real& First,
Standard_Real& Delta) const
{
// Reverse ?
// Invert?
const TopoDS_Edge& E = myCurves->Value(index).Edge();
TopAbs_Orientation Or = E.Orientation();
Standard_Boolean Reverse;
Reverse = (Forward && (Or == TopAbs_REVERSED)) ||
(!Forward && (Or != TopAbs_REVERSED));
// Calcul des parametres de reparametrisation
// tel que : T = Ti + (t-First)*Delta
// Calculate the parameters of reparametrisation
// such as : T = Ti + (t-First)*Delta
Standard_Real f, l;
BRep_Tool::Range(E, f, l);
Delta = myKnots->Value(index+1) - myKnots->Value(index);

View File

@ -86,14 +86,14 @@
BRepCheck_Analyzer ana(toCheck, Standard_True);
if (!ana.IsValid()) {
// On verifie que le probleme ne soit pas juste BRepCheck_InvalidSameParameterFlag
// Check if the problem is not just BRepCheck_InvalidSameParameterFlag
BRepCheck_ListIteratorOfListOfStatus itl;
BRepCheck_Status sta;
for (tEx.Init(toCheck, TopAbs_FACE); tEx.More(); tEx.Next()) {
if (!ana.Result(tEx.Current()).IsNull()) {
for (itl.Initialize(ana.Result(tEx.Current())->Status()); itl.More(); itl.Next()) {
sta=itl.Value();
// Si une face est en erreur
// If a face is incorrect
if (sta != BRepCheck_NoError) {
BRepCheck_ListIteratorOfListOfStatus ilt;
TopExp_Explorer exp;
@ -103,7 +103,7 @@
if (res->ContextualShape().IsSame(tEx.Current())) {
for (ilt.Initialize(res->StatusOnShape()); ilt.More(); ilt.Next()) {
sta=ilt.Value();
// Si une edge est BRepCheck_InvalidSameParameterFlag ou BRepCheck_InvalidSameRangeFlag on force
// If an edge is BRepCheck_InvalidSameParameterFlag or BRepCheck_InvalidSameRangeFlag, it is forced
if (sta == BRepCheck_InvalidSameParameterFlag ||
sta == BRepCheck_InvalidSameRangeFlag) {
bB.SameRange(TopoDS::Edge(exp.Current()), Standard_False);
@ -121,7 +121,7 @@
}
}
}
// On refait un controle (il pourrait y avoir un probleme d'un autre type ou non rectifiable.
// Remake control (there can be a problem of another type orb the one that cannot be corrected
ana.Init(toCheck, Standard_True);
if (!ana.IsValid()) return Standard_False;
}
@ -151,10 +151,6 @@
{
//
// pour permettre a Moliner de travailler jusqu'au 18/10/96 le temps que
// l'on trouve une solution reflechie au probleme de performance de BRepCheck
//
//POP ON n'utilise plus la varaible d'environnement
// if (getenv("DONT_SWITCH_IS_VALID") != NULL) {
// return Standard_True ;
// }

View File

@ -21,7 +21,7 @@
#include <BRep_Tool.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
// couture
// sewing
#include <BRepTools_Substitution.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <BRepCheck.hxx>
@ -127,8 +127,8 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
}
DSFiller.Insert(myS1,myS2,HDS);
// 020499 : JYL : rejet si il existe une arete de la SD
// codee non sameparameter et non degeneree
// 020499 : JYL : reject if there is an edge of the SD
// not coded sameparameter and not degenerated
Standard_Boolean esp = HDS->EdgesSameParameter();
Standard_Boolean tede = Standard_True;
if (!esp) {
@ -204,10 +204,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
#if MODIF
//======================================================================
//== Exploration des shapes en entree
//== Creation de la liste des solides
//== Creation de la liste des faces HORS solide
//== Creation de la liste des edges HORS face
//== Exploration of input shapes
//== Creation of the list of solids
//== Creation of the list of faces OUT OF solid
//== Creation of the list of edges OUT OF face
Standard_Integer nbs1,nbs2,nbf1,nbf2,nbe1,nbe2,nbv1,nbv2;
TopTools_ListOfShape Solids1,Solids2,Faces1,Faces2,Edges1,Edges2,Vertex1,Vertex2;
@ -218,21 +218,21 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
for(Ex.Init(myS2,TopAbs_SOLID),nbs2=0; Ex.More(); Ex.Next()) {
Solids2.Append(Ex.Current()); nbs2++;
}
//== Les faces non ds un solide
//== Faces not in a solid
for(Ex.Init(myS1,TopAbs_FACE,TopAbs_SOLID),nbf1=0; Ex.More(); Ex.Next()) {
Faces1.Append(Ex.Current()); nbf1++;
}
for(Ex.Init(myS2,TopAbs_FACE,TopAbs_SOLID),nbf2=0; Ex.More(); Ex.Next()) {
Faces2.Append(Ex.Current()); nbf2++;
}
//== Les Edges non ds un solide
//== Edges not in a solid
for(Ex.Init(myS1,TopAbs_EDGE,TopAbs_FACE),nbe1=0; Ex.More(); Ex.Next()) {
Edges1.Append(Ex.Current()); nbe1++;
}
for(Ex.Init(myS2,TopAbs_EDGE,TopAbs_FACE),nbe2=0; Ex.More(); Ex.Next()) {
Edges2.Append(Ex.Current()); nbe2++;
}
//== Les Vertex non ds un edge
//== Vertices not in an edge
for(Ex.Init(myS1,TopAbs_VERTEX,TopAbs_EDGE),nbv1=0; Ex.More(); Ex.Next()) {
Vertex1.Append(Ex.Current()); nbv1++;
}
@ -245,10 +245,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
//==
//== Rejet des orerations sans sens
//== Reject operations without direction
//-- Coupe Solide par Edge
//-- Cut Solid by Edge
// Standard_Boolean Correct = Standard_True;
if( (nbs1 && nbs2==0 && St1==TopAbs_OUT && St2==TopAbs_IN)
|| (nbs2 && nbs1==0 && St2==TopAbs_OUT && St1==TopAbs_IN)) {
@ -302,10 +302,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
BB.Add(myShape,LV);
}
else {
//-- On classifie :
//-- Classify :
Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape);
}
//-- Fin Classification
//-- End Classification
}
}
} // nbf1
@ -326,10 +326,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
BB.Add(myShape,LV);
}
else {
//-- On classifie :
//-- Classify :
Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape);
}
//-- Fin Classification
//-- End Classification
}
}
} // nbf2
@ -371,10 +371,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
BB.Add(myShape,LV);
}
else {
//-- On classifie :
//-- Classify :
Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape);
}
//-- Fin Classification
//-- End Classification
}
}
}
@ -411,10 +411,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
BB.Add(myShape,LV);
}
else {
//-- On classifie :
//-- Classify :
Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape);
}
//-- Fin Classification
//-- End Classification
}
}
}
@ -440,10 +440,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
BB.Add(myShape,LV);
}
else {
//-- On classifie :
//-- Classify :
Sub_Classify(Ex,St1,Solids2,BB,LIter,myShape);
}
//-- Fin Classification
//-- End Classification
}
}
}
@ -465,16 +465,16 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
BB.Add(myShape,LV);
}
else {
//-- On classifie :
//-- Classify :
Sub_Classify(Ex,St2,Solids1,BB,LIter,myShape);
}
//-- Fin Classification
//-- End Classification
}
}
}
//----------------------------------------------------------------------
//-- V1:Vertex1 state1 = OUT -> On garde V1 si V1 est Out Tous les S2
//-- V1:Vertex1 state1 = IN -> On garde V1 si V1 est In un des S2
//-- V1:Vertex1 state1 = OUT -> Preserve V1 if V1 is Out all S2
//-- V1:Vertex1 state1 = IN -> Preserve V1 if V1 is In one of S2
if(nbv1 && nbs2) {
if(St1 == TopAbs_IN) {
for(LIter.Initialize(Vertex1);LIter.More();LIter.Next()) {
@ -610,10 +610,10 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
TopExp_Explorer ex;
ex.Init(myShape,TopAbs_FACE);
for (; ex.More(); ex.Next()) myMap.Add(ex.Current());
ex.Init(myShape,TopAbs_EDGE); // pour le FRIKO
ex.Init(myShape,TopAbs_EDGE); // for FRIKO
for (; ex.More(); ex.Next()) myMap.Add(ex.Current());
// Verification same parameter des nouvelles edges de section
// Checking same parameter of new edges of section
Standard_Real eTol,cTol;
for (myHBuilder->InitSection(1);
myHBuilder->MoreSection();
@ -628,8 +628,8 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
for (ex.Init(cur, TopAbs_VERTEX); ex.More(); ex.Next()) {
eTol = BRep_Tool::Tolerance(TopoDS::Vertex(ex.Current()));
if (eTol<cTol) {
// Update ne peut que augmenter la tolerance, donc si le vertex a
// une tolerance + grande que ses edges on y touche pas
// Update can only increase tolerance, so if the vertex
// has a greater tolerance thanits edges it is not touched
BB.UpdateVertex(TopoDS::Vertex(ex.Current()), cTol);
}
}
@ -654,7 +654,7 @@ Standard_IMPORT void FDSSDM_Close();// see TopOpeBRepDS_samdom.cxx
for (ex1.Init(myShape, TopAbs_SHELL); ex1.More(); ex1.Next()) {
BRepCheck_Shell bcs(TopoDS::Shell(ex1.Current()));
if (bcs.Closed()==BRepCheck_NotClosed) {
// il faut les ajouter face par face pour avoir linfo IsModified sur les faces
// it is required to add them face by face to avoid IsModified on faces
BRepBuilderAPI_Sewing brts;
for (ex3.Init(ex1.Current(), TopAbs_FACE); ex3.More(); ex3.Next()) {
brts.Add(ex3.Current());
@ -815,7 +815,7 @@ void Sub_Classify(TopExp_Explorer& Ex,
//=======================================================================
//function : InitParameters
//purpose : Info sur la geometrie : PCurve, Approx, ...
//purpose : Info on geometry : PCurve, Approx, ...
//=======================================================================
void BRepAlgo_BooleanOperation::InitParameters()
{

View File

@ -537,11 +537,11 @@ void BRepAlgo_DSAccess::ChangeEdgeSet
iC = myHB->GetDSCurveFromSectEdge(Edge);
if (!iC) {
#if DEB
cout << "Warning DSAccess:Modifs d'une Edge non implemente" << endl;
cout << "Warning DSAccess: Modifications of Edge are not implemented" << endl;
#endif
}
else {
// Complement on the interferences Curve/Face
// Complete the interferences Curve/Face
Standard_Integer iF;
Handle(TopOpeBRepDS_Interference) interf;
@ -573,7 +573,7 @@ void BRepAlgo_DSAccess::ChangeEdgeSet
}
// Netoyage
// Cleaning
Suppress(C, New);
// Is it necessary to invert the Interferences "Edge on Fa"
@ -639,7 +639,7 @@ void BRepAlgo_DSAccess::Suppress(const TopoDS_Shape& C,
// during the parsing the Edges which come from Edge are found
// (= MapOfInteger : ESE)
// En premier, les interferences de support 1d.
// First, the interferences of support 1d.
TopExp_Explorer exp(C, TopAbs_EDGE);
for(; exp.More(); exp.Next()) {
const TopoDS_Shape& SectEdge = exp.Current();
@ -855,7 +855,7 @@ const TopoDS_Shape& BRepAlgo_DSAccess::Propagate
// myHB->MergeShapes(myS1,t1,myS2,t2);
//POP pour NT;
//POP for NT;
static TopoDS_Shape bid;
return bid;
}
@ -951,9 +951,9 @@ const TopTools_ListOfShape& BRepAlgo_DSAccess::Modified (const TopoDS_Shape& Sha
BRepAlgo_CheckStatus BRepAlgo_DSAccess::Check()
{
// TopOpeBRepDS_Check Ck(HDS);
// to be precised : in Ck, there is a possibility to know
// exactly the n*n of shapes/points/curves/surfaces,
// which are not correct in the DS.
// to be precised : in Ck, there is a possibility to know
// exactly the n*n of shapes/points/curves/surfaces,
// which are not correct in the DS.
// Standard_Boolean IsOK = Ck.ChkIntgSamDom() ;
// IsOK = IsOK && Ck.OneVertexOnPnt();
// IsOK = IsOK && Ck.ChkIntg();
@ -975,7 +975,7 @@ BRepAlgo_CheckStatus BRepAlgo_DSAccess::Check()
//
// if iE1 and iE2 are Faces :
// for each of faces F1 and F2, explode into Edges
// for each Edge :
// for each Edge :
// remove the interferences of a SectEdge vertex
// on geometry. If there is no other interferences attached to
// these Edges, and if these Edges are not SameDomain,
@ -1063,8 +1063,8 @@ void BRepAlgo_DSAccess::RemoveEdgeInterferences
//=======================================================================
//function : RemoveEdgeInterferences
//purpose : case of SectEdge coming from Curve
// for each of faces F1 and F2, explode into Edges
// for each Edge :
// for each of faces F1 and F2, explode into Edges
// for each Edge :
// remove the interferences that have a vertex of SectEdge
// as a geometry. If no other interferences are attached to
// these Edges, and if the Edges are not SameDomain,
@ -1097,8 +1097,8 @@ void BRepAlgo_DSAccess::RemoveEdgeInterferences
// DSEdge (= E1 or E2) :
// a) if DSEdge is not SameDomain -> the edge is Removed
// b) if among other interferences of DSEdge of
// GeomtryType == VERTEX, il n'en existe pas qui soient
// avec une Edge de DSFace(= F1 ou F2)
// GeomtryType == VERTEX, there is none
// with Edge of DSFace(= F1 or F2)
// if DSFace has no more interferences and is not SameDomain,
// make unkeep DSFace.
//=======================================================================

View File

@ -127,14 +127,14 @@ void BRepAlgo_FaceRestrictor::Perform()
TopTools_ListIteratorOfListOfShape it(wires);
//--------------------------------------------------------------------
// recuperation la geometrie de la face de reference.
// return geometry of the reference face.
//--------------------------------------------------------------------
TopLoc_Location L;
const Handle(Geom_Surface)& S = BRep_Tool::Surface(myFace,L);
//-----------------------------------------------------------------------
// test si les edges sont sur S. sinon ajout de S sur la premiere pcurve.
// ou projection de l edge sur F.
// test if edges are on S. otherwise add S to the first pcurve.
// or projection of the edge on F.
//----------------------------------------------------------------------
TopExp_Explorer Exp;
// BRep_Builder BB;
@ -143,7 +143,7 @@ void BRepAlgo_FaceRestrictor::Perform()
TopOpeBRepBuild_WireToFace WTF;
for ( ; it.More(); it.Next()) {
// mise a jour de la surface sur les edges.
// update the surface on edges.
const TopoDS_Wire& W = TopoDS::Wire(it.Value());
for (Exp.Init(W,TopAbs_EDGE); Exp.More(); Exp.Next()) {
@ -152,13 +152,13 @@ void BRepAlgo_FaceRestrictor::Perform()
Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E,S,L,f,l);
if (C2.IsNull()) {
// pas de pcurve sur la surface de reference.
// no pcurve on the reference surface.
if (modeProj) {
// Projection de la courbe 3d sur la surface.
// Projection of the 3D curve on surface.
ProjCurve3d ( E, S, L);
}
else {
// recuperation de la premiere pcurve qui est colle sur <S>
// return the first pcurve glued on <S>
Standard_Boolean YaPCurve = ChangePCurve (E, S, L);
if (!YaPCurve) {
ProjCurve3d (E, S, L);
@ -315,7 +315,7 @@ static void BuildFaceIn( TopoDS_Face& F,
if (!KeyContains.IsBound(W) || KeyContains(W).IsEmpty()) return;
// Suppression de W dans les KeyIsIn.
// Removal of W in KeyIsIn.
// for (TopTools_ListIteratorOfListOfShape it(KeyContains(W)); it.More(); it.Next()) {
TopTools_ListIteratorOfListOfShape it;
@ -377,7 +377,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection()
myDone = Standard_False;
TopTools_ListIteratorOfListOfShape it(wires);
//---------------------------------------------------------
// Reorientation de tous les wires fermes matiere a gauche.
// Reorientation of all closed wires to the left.
//---------------------------------------------------------
for (; it.More(); it.Next()) {
TopoDS_Wire& W = TopoDS::Wire(it.Value());
@ -395,7 +395,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection()
}
}
//---------------------------------------------------------
// Classification des wires les uns par rapport aux autres.
// Classification of wires ones compared to the others.
//---------------------------------------------------------
Standard_Integer j,i = 1;
@ -442,7 +442,7 @@ void BRepAlgo_FaceRestrictor::PerformWithCorrection()
B.Add (NewFace,W);
faces.Append(NewFace);
//--------------------------------------------
// Construction d une face par wire exterieur.
// Construction of a face by exterior wire.
//--------------------------------------------
BuildFaceIn(NewFace,W, keyContains, keyIsIn, TopAbs_FORWARD, faces);
}

View File

@ -69,7 +69,7 @@ void BRepAlgo_Loop::Init(const TopoDS_Face& F)
//=======================================================================
//function : Bubble
//purpose : Ordonne la sequence de vertex en parametre croissant.
//purpose : Orders the sequence of vertices by increasing parameter.
//=======================================================================
static void Bubble(const TopoDS_Edge& E,
@ -140,9 +140,9 @@ void BRepAlgo_Loop::AddConstEdges(const TopTools_ListOfShape& LE)
//=======================================================================
//function : UpdateClosedEdge
//purpose : Si le premier ou dernier vertex d intersection
// coincide avec le vertex de fermeture il est supprime de SV.
// il sera ajoute au debut et a la fin de SV par l appelant.
//purpose : If the first or the last vertex of intersection
// coincides with the closing vertex, it is removed from SV.
// it will be added at the beginning and the end of SV by the caller.
//=======================================================================
static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E,
@ -175,7 +175,7 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E,
if (!VB[0].IsSame(VB[1])) {
#ifdef DEB
if (AffichLoop)
cout <<" Deux vertex different sur vertex de fermeture"<<endl;
cout <<"Two different vertices on the closing vertex"<<endl;
#endif
}
else {
@ -199,7 +199,7 @@ static TopoDS_Vertex UpdateClosedEdge(const TopoDS_Edge& E,
static void RemovePendingEdges(TopTools_DataMapOfShapeListOfShape& MVE)
{
//--------------------------------
// Suppression des edges pendants.
// Remove hanging edges.
//--------------------------------
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape Mapit;
TopTools_ListOfShape ToRemove;
@ -276,10 +276,10 @@ static Standard_Boolean SamePnt2d(TopoDS_Vertex V,
//=======================================================================
//function : SelectEdge
//purpose : Trouve l edge <NE> connexe a <CE> par le vertex <CV> dans
// la liste <LE>. <NE> est supprime de la liste. Si <CE> est
// aussi dans la liste <LE> avec la meme orientation, il est
// supprime de la liste.
//purpose : Find edge <NE> connected to <CE> by vertex <CV> in the
// list <LE>. <NE> is removed from the list. If <CE> is
// also in the list <LE> with the same orientation, it is
// removed from the list.
//=======================================================================
static Standard_Boolean SelectEdge(const TopoDS_Face& F,
@ -293,7 +293,7 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F,
#ifdef DEB
if (AffichLoop) {
if ( LE.Extent() > 2) {
cout <<"vertex sur plus de 2 edges dans une face."<<endl;
cout <<"vertex on more than 2 edges in a face."<<endl;
}
}
#endif
@ -305,12 +305,12 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F,
}
if (LE.Extent() > 1) {
//--------------------------------------------------------------
// Plusieurs edges possibles.
// - Test les edges differentes de CE , Selection de l edge
// pour lequel CV a les U,V les plus proches dans la face
// que ceux correspondant a CE.
// - Si plusieurs edge donne des representation < la tolerance.
// discrimination sur les tangentes.
// Several edges possible.
// - Test edges different from CE , Selection of edge
// for which CV has U,V closer to the face
// than corresponding to CE.
// - If several edges give representation less than the tolerance.
// discrimination on tangents.
//--------------------------------------------------------------
TopLoc_Location L;
Standard_Real f,l;
@ -518,7 +518,7 @@ void BRepAlgo_Loop::Perform()
#endif
//------------------------------------------------
// Decoupe des edges
// Cut edges
//------------------------------------------------
for (Mapit.Initialize(myVerOnEdges); Mapit.More(); Mapit.Next()) {
TopTools_ListOfShape LCE;
@ -532,7 +532,7 @@ void BRepAlgo_Loop::Perform()
//-----------------------------------
TopTools_DataMapOfShapeListOfShape MVE;
// ajout des edges decoupees.
// add cut edges.
for (Mapit.Initialize(myNewEdges); Mapit.More(); Mapit.Next()) {
for (itl.Initialize(myNewEdges(Mapit.Key())); itl.More(); itl.Next()) {
TopoDS_Edge& E = TopoDS::Edge(itl.Value());
@ -540,9 +540,9 @@ void BRepAlgo_Loop::Perform()
}
}
// ajout des edges const
// Les edges de couture peuvent etre doubles ou non dans myConstEdges
// => appel une seule fois StoreInMVE qui se charge de les doubler
// add const edges
// Sewn edges can be doubled or not in myConstEdges
// => call only once StoreInMVE which should double them
TopTools_MapOfShape DejaVu;
for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) {
TopoDS_Edge& E = TopoDS::Edge(itl.Value());
@ -568,7 +568,7 @@ void BRepAlgo_Loop::Perform()
#endif
//-----------------------------------------------
// Construction des wires et des nouvelles faces.
// Construction of wires and new faces.
//----------------------------------------------
TopoDS_Vertex VF,VL,CV;
TopoDS_Edge CE,NE,EF;
@ -581,19 +581,19 @@ void BRepAlgo_Loop::Perform()
while (!MVE.IsEmpty()) {
B.MakeWire(NW);
//--------------------------------
// Suppression des edges pendants.
// Removal of hanging edges.
//--------------------------------
RemovePendingEdges(MVE);
if (MVE.IsEmpty()) break;
//--------------------------------
// Edge de depart.
// Start edge.
//--------------------------------
Mapit.Initialize(MVE);
EF = CE = TopoDS::Edge(Mapit.Value().First());
TopExp::Vertices(CE,V1,V2);
//--------------------------------
// VF vertex debut du nouveau wire
// VF vertex start of new wire
//--------------------------------
if (CE.Orientation() == TopAbs_FORWARD) { CV = VF = V1;}
else { CV = VF = V2;}
@ -608,7 +608,7 @@ void BRepAlgo_Loop::Perform()
while (!End) {
//-------------------------------
// Construction d un wire.
// Construction of a wire.
//-------------------------------
TopExp::Vertices(CE,V1,V2);
if (!CV.IsSame(V1)) CV = V1; else CV = V2;
@ -628,7 +628,7 @@ void BRepAlgo_Loop::Perform()
}
}
//--------------------------------------------------
// Ajout du nouveau wire dans l ensemble des wires
// Add new wire to the set of wires
//------------------------------------------------
Standard_Real Tol = 0.001; //5.e-05; //5.e-07;
TopExp_Explorer explo( NW, TopAbs_VERTEX );
@ -690,15 +690,15 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
SV.Append(it.Value());
}
//--------------------------------
// Tri des vertex sur l edge.
// Parse vertices on the edge.
//--------------------------------
Bubble (WE,SV);
Standard_Integer NbVer = SV.Length();
//----------------------------------------------------------------
// Construction des nouvelles edges.
// Remarque : les vertex extremites de l edges ne sont pas
// forcement dans la liste des vertex
// Construction of new edges.
// Note : vertices at the extremities of edges are not
// onligatorily in the list of vertices
//----------------------------------------------------------------
if (SV.IsEmpty()) {
NE.Append(E);
@ -721,9 +721,9 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
}
}
//----------------------------------------------------
// Traitement des edges fermes
// Si un vertex d intersection est sur le vertex
// commun il doit apparaitre eb debut et en fin de SV.
// Processing of closed edges
// If a vertex of intersection is on the common vertex
// it should appear at the beginning and end of SV.
//----------------------------------------------------
TopoDS_Vertex VCEI;
if (!VF.IsNull() && VF.IsSame(VL)) {
@ -741,7 +741,7 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
}
else {
//-----------------------------------------
// Ajout eventuel des extremites de l edge.
// Eventually all extremities of the edge.
//-----------------------------------------
if (!VF.IsNull() && !VF.IsSame(SV.First())) SV.Prepend(VF);
if (!VL.IsNull() && !VL.IsSame(SV.Last ())) SV.Append (VL);
@ -762,7 +762,7 @@ void BRepAlgo_Loop::CutEdge (const TopoDS_Edge& E,
V2 = TopoDS::Vertex(SV.First());
SV.Remove(1);
//-------------------------------------------
// Copie de l edge et restriction par V1 V2.
// Copy the edge and restriction by V1 V2.
//-------------------------------------------
TopoDS_Shape NewEdge = WE.EmptyCopied();
TopoDS_Shape aLocalEdge = V1.Oriented(TopAbs_FORWARD);

View File

@ -375,17 +375,17 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
prj = MKed.Edge();
}
else {
// On teste si la solution n'est pas degeneree pour mettre le
// flag a l'edge, on prend quelques points, on regarde si le nuage de
// points a un diametre inferieur a la tolerance 3D
// It is tested if the solution is not degenerated to set the
// flag on edge, one takes several points, checks if the cloud of
// points has less diameter than the tolerance 3D
Degenerated = Standard_True;
Standard_Real Dist;
Handle(Geom_BSplineCurve) BS3d = Handle(Geom_BSplineCurve)::DownCast( appr.Curve3d());
gp_Pnt P1(0.,0.,0.),PP; // skl : I change "P" to "PP"
Standard_Integer NbPoint,ii ; // skl : I change "i" to "ii"
Standard_Real Par,DPar;
// on commence avec 3 points pour rejeter les aretes non degenerees
// tres rapidement
// start from 3 points to reject non degenerated edges
// very fast
NbPoint =3;
DPar = (BS3d->LastParameter()-BS3d->FirstParameter())/(NbPoint-1);
for (ii=0;ii<NbPoint;ii++)
@ -404,8 +404,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
break;
}
}
// si le test passe on fait un test plus precis
// avec 10 points
// if the test passes a more exact test with 10 points
if (Degenerated) {
P1.SetCoord(0.,0.,0.);
NbPoint =10;
@ -460,8 +459,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
if(myFaceBounds) {
// Trimming edges by face bounds
// si la solution est degeneree, on evite d'utiliser le BoolTool
// qui n'aime pas ca.
// if the solution is degenerated, use of BoolTool is avoided
#ifdef DEBUG
InitChron(chr_booltool);
#endif
@ -509,7 +507,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
}
else {
#ifdef DEB
cout << " BooleanOperations : pas de solution " << endl;
cout << " BooleanOperations : no solution " << endl;
#endif
BRepTopAdaptor_FClass2d classifier(TopoDS::Face(Faces->Value(j)),
@ -544,9 +542,9 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
}
myDescendants.Bind(Edges->Value(i), DescenList);
}
// JPI : la creation eventuelle d'un wire est reportee dans une methode specifique
// BuilWire qui pourra etre appelee par l'utilisateur. Sinon, on perdait les
// relations des map myAncestorMap, myCorresp.
// JPI : eventual wire creation is reported in a specific method
// BuilWire that can be called by the user. Otherwise, the
// relations of map myAncestorMap, myCorresp will be lost.
if(YaVertexRes) BB.Add(myRes, VertexRes);
@ -675,8 +673,8 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
if (MW.IsDone())
{
const TopoDS_Shape& Wire = MW.Shape();
// Si le wire resultat contient le meme d'arete qu'au depart OK
// sinon le resultat est vraisemblablement constitue de plusieurs wires.
// If the resulting wire contains the same edge as at the beginning OK
// otherwise the result really consists of several wires.
TopExp_Explorer exp2(Wire,TopAbs_EDGE);
Standard_Integer NbEdges = 0;
for (;exp2.More(); exp2.Next()) NbEdges++;

View File

@ -35,8 +35,8 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
break;
case TopAbs_SHELL:
{
// si le shell contient des bords libres qui n'appartiennent pas aux
// bord libres des bouchons ( Boundary) on l'enleve.
// if the shell contains free borders that do not belong to the
// free borders of caps ( Boundary) it is removed.
TopTools_IndexedDataMapOfShapeListOfShape Map;
TopExp::MapShapesAndAncestors(S,TopAbs_EDGE,TopAbs_FACE,Map);
@ -55,7 +55,7 @@ TopoDS_Shape BRepAlgo_Tool::Deboucle3D(const TopoDS_Shape& S,
case TopAbs_COMPOUND:
case TopAbs_SOLID:
{
// on itere sur les sous-shape et on ajoute les non vides.
// iterate on sub-shapes and add non-empty.
TopoDS_Iterator it(S);
TopoDS_Shape SubShape;
Standard_Boolean NbSub = 0;

View File

@ -3,8 +3,7 @@
// Author: Laurent BOURESCHE
// Author: Jacques GOUSSARD
// <lbo@pomalox.paris1.matra-dtv.fr>
// Modif : jlr le 28/07/97 modif de section pour Edge/Face
// modif de set (courbe bornee)
#include <BRepBlend_RstRstConstRad.ixx>
#include <math_Gauss.hxx>
#include <math_SVD.hxx>

View File

@ -3,8 +3,7 @@
// Author: Laurent BOURESCHE
// Author: Jacques GOUSSARD
// <lbo@pomalox.paris1.matra-dtv.fr>
// Modif : jlr le 28/07/97 modif de section pour Edge/Face
// modif de set (courbe bornee)
#include <BRepBlend_RstRstEvolRad.ixx>
#include <math_Gauss.hxx>
#include <math_SVD.hxx>
@ -357,7 +356,7 @@ Standard_Boolean BRepBlend_RstRstEvolRad::IsSolution(const math_Vector& Sol,
Sina = nplan.Dot(n1.Crossed(n2));
if (choix%2 != 0) {
Sina = -Sina; //nplan est change en -nplan
Sina = -Sina; //nplan is changed into -nplan
}
Angle = ACos(Cosa);
@ -1013,10 +1012,10 @@ Standard_Boolean BRepBlend_RstRstEvolRad::Section(const Blend_Point& P,
}
else {
d1rst1rst2 *= 0.5;
// Normale a la courbe en P1
// Normal to the curve in P1
d1n1 = - (d1rst1rst2 + Invdray * n1) / ray;
// Normale a la courbe en P2
// Normal to the curve in P2
d1n2 = (d1rst1rst2 - Invdray * n2) / ray;
}
}

View File

@ -3,8 +3,7 @@
// Author: Laurent BOURESCHE
// Author: Jacques GOUSSARD
// <lbo@pomalox.paris1.matra-dtv.fr>
// Modif : jlr le 28/07/97 modif de section pour Edge/Face
// modif de set (courbe bornee)
#include <BRepBlend_SurfRstConstRad.ixx>
#include <math_Gauss.hxx>
#include <math_SVD.hxx>

View File

@ -1287,7 +1287,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::CheckDeflectionOnSurf(const Blend_Poi
{
//Controls 3d of Blend_CSWalking.
// rule by tests in U4 corresponds to 11.478 d
//rule by tests in U4 corresponds to 11.478 d
const Standard_Real CosRef3D = 0.98;
Standard_Real Cosi=0, Cosi2=0;
Standard_Boolean curpointistangent = CurPoint.IsTangencyPoint();

View File

@ -138,7 +138,7 @@ void BRepBuilderAPI_FindPlane::Init(const TopoDS_Shape& S,
Standard_Real dist = p0.SquareDistance(points(i));
if (dist > disMax) {
disMax = dist;
p1 = points(i); // ca va plus vite de stocker le point, sinon il faut chercher une valeur dans une sequence
p1 = points(i); // it will be faster to store the point, otherwise it is necessary to find a value in a sequence
}
}

View File

@ -21,8 +21,8 @@
// Add of SameParameter call
//-- lbr le 1er avril 97
//-- dpf le 10 decembre 1997 Traitement des collections de pcurve
//-- lbr April 1 97
//-- dpf December 10 1997 Processing of pcurve collections
//rln 02.02.99 BUC60449 Making compilable on NT in DEB mode
//rln 02.02.99 BUC60449 Protection against exception on NT
@ -146,7 +146,7 @@ Handle(Geom2d_Curve) BRepBuilderAPI_Sewing::SameRange(const Handle(Geom2d_Curve)
//=======================================================================
//function : WhichFace
//purpose : Give the face dont ledge est le bord
//purpose : Give the face whose edge is the border
//=======================================================================
TopoDS_Face BRepBuilderAPI_Sewing::WhichFace(const TopoDS_Edge& theEdg, const Standard_Integer index) const

View File

@ -147,7 +147,7 @@ void BRepCheck_Face::InContext(const TopoDS_Shape& S)
void BRepCheck_Face::Blind()
{
if (!myBlind) {
// rien de plus que dans le minimum
// nothing more than in the minimum
myBlind = Standard_True;
}
}
@ -174,14 +174,14 @@ BRepCheck_Status BRepCheck_Face::IntersectWires(const Standard_Boolean Update)
TopExp_Explorer exp1,exp2;
// on mape les wires
// the wires are mapped
exp1.Init(myShape.Oriented(TopAbs_FORWARD),TopAbs_WIRE);
TopTools_ListOfShape theListOfShape;
while (exp1.More()) {
if (!myMapImb.IsBound(exp1.Current())) {
myMapImb.Bind(exp1.Current(), theListOfShape);
}
else { // on a 2 fois le meme wire...
else { // the same wire is met twice...
myIntres = BRepCheck_RedundantWire;
if (Update) {
BRepCheck::Add(myMap(myShape),myIntres);
@ -277,7 +277,7 @@ BRepCheck_Status BRepCheck_Face::ClassifyWires(const Standard_Boolean Update)
Standard_Boolean WireBienOriente = Standard_False;
if(FClass2d.PerformInfinitePoint() != TopAbs_OUT) {
WireBienOriente=Standard_True;
//le wire donne definit un trou
// the given wire defines a hole
myMapImb.UnBind(wir1);
myMapImb.Bind(wir1.Reversed(), theListOfShape);
}
@ -293,10 +293,10 @@ BRepCheck_Status BRepCheck_Face::ClassifyWires(const Standard_Boolean Update)
}
}
}
// On doit avoir 1 wire qui contient tous les autres, et les autres
// ne contenant rien (cas solide fini) ou
// que des wires ne contenant rien : dans ce cas les wires doivent etre
// des trous dans une face infinie.
// It is required to have 1 wire that contains all others, and the others should not
// contain anything (case solid ended) or
// the wires do not contain anything : in this case the wires should be
// holes in an infinite face.
TopoDS_Wire Wext;
for (TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(myMapImb);
itm.More();
@ -325,7 +325,7 @@ BRepCheck_Status BRepCheck_Face::ClassifyWires(const Standard_Boolean Update)
return myImbres;
}
}
// sortie sans erreurs
// quit without errors
if (Update) {
BRepCheck::Add(myMap(myShape),myImbres);
}
@ -393,7 +393,7 @@ BRepCheck_Status BRepCheck_Face::OrientationOfWires
const TopoDS_Wire& wir = TopoDS::Wire(exp.Current());
if (!Wext.IsNull() && wir.IsSame(Wext)) {
if (wir.Orientation() != Wext.Orientation()) {
//le wire exterieur definit un trou
//the exterior wire defines a hole
if( CheckThin(wir,myShape.Oriented(TopAbs_FORWARD)) )
return myOrires;
myOrires = BRepCheck_BadOrientationOfSubshape;
@ -409,9 +409,9 @@ BRepCheck_Status BRepCheck_Face::OrientationOfWires
break;
}
}
// Pas de controle sur More()
// No control on More()
if (itm.Key().Orientation() == wir.Orientation()) {
//le wire donne ne definit pas un trou
// the given wire does not define a hole
myOrires = BRepCheck_BadOrientationOfSubshape;
if (Update) {
BRepCheck::Add(myMap(myShape),myOrires);
@ -420,7 +420,7 @@ BRepCheck_Status BRepCheck_Face::OrientationOfWires
}
}
}
// sortie sans erreur
// quit withour error
if (Update) {
BRepCheck::Add(myMap(myShape),myOrires);
}

View File

@ -70,7 +70,7 @@ const BRepCheck_ListOfStatus& BRepCheck_Result::StatusOnShape
void BRepCheck_Result::InitContextIterator()
{
myIter.Initialize(myMap);
// Au minimum 1 element : le Shape lui meme
// At least 1 element : the Shape itself
if (myIter.Key().IsSame(myShape)) {
myIter.Next();
}

View File

@ -54,7 +54,7 @@ BRepCheck_Vertex::BRepCheck_Vertex(const TopoDS_Vertex& V)
void BRepCheck_Vertex::Minimum()
{
if (!myMin) {
// consisterait a verifier l`existence d`un point 3D
// checks the existence of a point 3D
BRepCheck_ListOfStatus thelist;
myMap.Bind(myShape, thelist);
myMap(myShape).Append(BRepCheck_NoError);
@ -85,7 +85,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
}
if (!exp.More()) {
BRepCheck::Add(myMap(S),BRepCheck_SubshapeNotInShape);
return; // on sort
return; // leaves
}
@ -98,7 +98,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
case TopAbs_EDGE:
{
// On essaie de retrouver le vertex sur l`edge
// Try to find the vertex on the edge
const TopoDS_Edge& E = TopoDS::Edge(S);
TopoDS_Iterator itv(E.Oriented(TopAbs_FORWARD));
@ -115,7 +115,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
VF.Orientation() == TopAbs_REVERSED) ||
(VFind.Orientation() == TopAbs_REVERSED &&
VF.Orientation() == TopAbs_FORWARD)) {
// on a le vertex a la fois F et R sur l`edge
// the vertex on the edge is at once F and R
multiple = Standard_True;
}
if (VFind.Orientation() != TopAbs_FORWARD &&
@ -130,11 +130,11 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
itv.Next();
}
// on est sur que VFind n`est pas nul
// VFind is not null for sure
TopAbs_Orientation orv = VFind.Orientation();
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Vertex(myShape));
Tol = Max(Tol,BRep_Tool::Tolerance(E)); // a voir
Tol = Max(Tol,BRep_Tool::Tolerance(E)); // to check
Tol *= Tol;
Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&E.TShape());
@ -143,14 +143,14 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
BRep_ListIteratorOfListOfPointRepresentation itpr;
while (itcr.More()) {
// Pour chaque CurveRepresentation, on verifie le parametre fourni
// For each CurveRepresentation, the provided parameter is checked
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
const TopLoc_Location& loc = cr->Location();
TopLoc_Location L = (Eloc * loc).Predivided(myShape.Location());
if (cr->IsCurve3D()) {
const Handle(Geom_Curve)& C = cr->Curve3D();
if (!C.IsNull()) { // edge non degenere
if (!C.IsNull()) { // edge non degenerated
itpr.Initialize(TV->Points());
while (itpr.More()) {
const Handle(BRep_PointRepresentation)& pr = itpr.Value();
@ -232,7 +232,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Vertex(myShape));
Tol = Max(Tol,BRep_Tool::Tolerance(TopoDS::Face(S))); // a voir
Tol = Max(Tol,BRep_Tool::Tolerance(TopoDS::Face(S))); // to check
Tol *= Tol;
BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
@ -270,11 +270,11 @@ void BRepCheck_Vertex::Blind()
if (myBlind) {
return;
}
// modified by NIZHNY-MKK Fri May 7 16:43:38 2004.BEGIN
// The body of this function is removed because of its useless
// (see specification "Substitution existing set of evaluation DRAW commands to one").
// modified by NIZHNY-MKK Fri May 7 16:43:38 2004.BEGIN
// The body of this function is removed because of its useless
// (see specification "Substitution existing set of evaluation DRAW commands to one").
// Check all the representations of the vertex. (i-e checks the TVertex
// Check all the representations of the vertex. (i-e checks the TVertex
// BRepCheck_ListOfStatus& lst = myMap(myShape);
// lst.Clear(); // there was NoError...

View File

@ -3,7 +3,7 @@
// Author: Jacques GOUSSARD
// <jag@bravox>
// Modified by dpf, Fri Dec 19 15:31:03 1997
// Taitement de la fermeture en 2d.
// Processing of closing in 2d.
//
// modified by eap Tue Dec 18 14:14:25 2001 (bug OCC23)
// Check self-intersection in case of closed edge
@ -137,7 +137,7 @@ void BRepCheck_Wire::Minimum()
myMap.Bind(myShape, thelist);
BRepCheck_ListOfStatus& lst = myMap(myShape);
// on verifie que le wire est "connexe" == check that the wire is "connex"
// check that the wire is "connex"
TopExp_Explorer exp(myShape,TopAbs_EDGE);
Standard_Integer nbedge = 0;
myMapVE.Clear();
@ -212,7 +212,7 @@ void BRepCheck_Wire::InContext(const TopoDS_Shape& S)
case TopAbs_FACE:
{
TopoDS_Edge ed1,ed2; // bidon
TopoDS_Edge ed1,ed2;
if (myGctrl)
st = SelfIntersect(TopoDS::Face(S),ed1,ed2,Standard_True);
if (st != BRepCheck_NoError) break;
@ -240,7 +240,7 @@ void BRepCheck_Wire::InContext(const TopoDS_Shape& S)
void BRepCheck_Wire::Blind()
{
if (!myBlind) {
// rien de plus que dans le minimum
// nothing more that the minimum
myBlind = Standard_True;
}
}
@ -258,12 +258,12 @@ BRepCheck_Status BRepCheck_Wire::Closed(const Standard_Boolean Update)
return myCstat;
}
myCdone = Standard_True; // ce sera fait...
myCdone = Standard_True;
BRepCheck_ListIteratorOfListOfStatus itl(myMap(myShape));
if (itl.Value() != BRepCheck_NoError) {
myCstat = itl.Value();
return myCstat; // deja enregistre
return myCstat; // already saved
}
myCstat = BRepCheck_NoError;
@ -583,8 +583,8 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
while (Index < nbOriNoDegen) {
ledge.Clear();
ListOfPassedEdge.Clear();
// on cherche les edges qui s`enchainent sur VL si !VL.IsNull
// sinon sur VF.
// find edges that make a chain on VL if !VL.IsNull
// otherwise on VF.
Standard_Integer ind;
if (!VL.IsNull()) {
@ -633,17 +633,17 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
TopAbs_Orientation vto = vte.Current().Orientation();
if (!VL.IsNull()) {
if (vto == TopAbs_FORWARD && VL.IsSame(vte.Current())) {
// Si on travaille en 2d (face non nulle) ou
// si l'edge n'est pas degenere on l'ajoute
// If the processing is in 2d (face not null) or
// if the edge is not degenerated it is added
if (!F.IsNull() || !BRep_Tool::Degenerated(edg))
ledge.Append(edg);
break;
}
}
else { // VF n`est pas nul
else { // VF is not null
if (vto == TopAbs_REVERSED && VF.IsSame(vte.Current())) {
// Si on travaille en 2d (face non nulle) ou
// si l'edge n'est pas degenere on l'ajoute
// // If the processing is in 2d (face not null) or
// if the edge is not degenerated it is added
if (!F.IsNull() || !BRep_Tool::Degenerated(edg))
ledge.Append(edg);
break;
@ -660,11 +660,11 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
if (Update) {
BRepCheck::Add(myMap(myShape),theOstat);
}
return theOstat; // on sort
return theOstat; // leave
}
else {
Index--; // parce que apres Index++ et on n`a pas enchaine
VL.Nullify(); // on force a enchainer sur VF
Index--; // because after Index++ and if there is no chain,
VL.Nullify(); // chain on VF is forced
theEdge = theRef;
Changedesens = Standard_True;
}
@ -678,8 +678,8 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
}
}
// JAG 03/07 else if (nbconnex >= 2 && !F.IsNull()) // On essaie de voir en 2d
else if (!F.IsNull()) { // On essaie de voir en 2d
// JAG 03/07 else if (nbconnex >= 2 && !F.IsNull()) // Try to see in 2d
else if (!F.IsNull()) { // Try to see in 2d
TopoDS_Vertex pivot;
if (!VL.IsNull()) {
pivot = VL;
@ -710,7 +710,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
return theOstat;
}
else if (nbconnex == 1) {
// decaler le vertex
// offset the vertex
for (vte.Init(ledge.First(),TopAbs_VERTEX);vte.More(); vte.Next()) {
TopAbs_Orientation vto = vte.Current().Orientation();
if (!VL.IsNull()) {
@ -719,7 +719,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
break;
}
}
else { // VF n`est pas nul
else { // VF is not null
if (vto == TopAbs_FORWARD) {
VF = TopoDS::Vertex(vte.Current());
break;
@ -745,7 +745,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
return theOstat;
}
// On verifie la fermeture du wire en 2d (pas fait dans Closed())
// Check the closure of the wire in 2d (not done in Closed())
TopoDS_Vertex aVRef;
Standard_Boolean isCheckClose = Standard_False;
@ -790,7 +790,7 @@ BRepCheck_Status BRepCheck_Wire::Orientation(const TopoDS_Face& F,
return theOstat;
}
}
// Fin controle fermeture 2d
// End control closure 2d
Index ++;
}
@ -824,8 +824,8 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
TopTools_MapOfOrientedShape auxmape;
//
ok=Standard_True;
//-- on verifie plus loin avec les bonnes tolerances si on n a
//-- pas un point dans la tolerance d un vertex.
//-- check with proper tolerances if there is no
//-- point in the tolerance of a vertex.
tolint = 1.e-10;
HS = new BRepAdaptor_HSurface();
HS->ChangeSurface().Initialize(F,Standard_False);
@ -895,15 +895,15 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
const IntRes2d_Transition& Tr2 = IP.TransitionOfSecond();
if( Tr1.PositionOnCurve() == IntRes2d_Middle
|| Tr2.PositionOnCurve() == IntRes2d_Middle) {
//-- Verification des points avec les vraies tolerances (ie Tol en 3d)
//-- Si le point d intersection est dans la tolearnce d un des vertex
//-- on considere que cette intersection est bonne (pas d erreur)
//-- Checking of points with true tolerances (ie Tol in 3d)
//-- If the point of intersection is within the tolearnce of a vertex
//-- this intersection is considered correct (no error)
Standard_Boolean localok = Standard_False;
Standard_Real f,l;
TopLoc_Location L;
const Handle(Geom_Curve) ConS = BRep_Tool::Curve(E1,L,f,l);
if(!ConS.IsNull()) {
//-- on va tester en 3d. (ParamOnSecond donne le m resultat)
//-- try to test in 3d. (ParamOnSecond gives the same result)
P3d = ConS->Value(IP.ParamOnFirst());
P3d.Transform(L.Transformation());
// Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 Begin
@ -992,7 +992,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
//modified by NIZNHY-PKV Fri Oct 29 10:09:02 2010t
//
//-- ************************************************************
//-- ******* I n t e r s e c t i o n C 1 e t C 2 ********
//-- ******* I n t e r s e c t i o n C 1 and C 2 ********
//-- ************************************************************
Inter.Perform(C1,myDomain1,C2,tabDom[j-1],tolint,tolint);
//
@ -1031,9 +1031,9 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
Tr2 = IP.TransitionOfSecond();
if( Tr1.PositionOnCurve() == IntRes2d_Middle
|| Tr2.PositionOnCurve() == IntRes2d_Middle) {
//-- Verification des points avec les vraies tolerances (ie Tol en 3d)
//-- Si le point d intersection est dans la tolearnce d un des vertex
//-- on considere que cette intersection est bonne (pas d erreur)
//-- Checking of points with true tolerances (ie Tol in 3d)
//-- If the point of intersection is within the tolerance of a vertex
//-- this intersection is considered correct (no error)
Standard_Boolean localok = Standard_False;
Standard_Real f1,l1, f2, l2;
TopLoc_Location L, L2;
@ -1086,10 +1086,10 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
}
//-- --------------------------------------------------------
//-- Verification sur le baillement maximum entre les 2 edges
//-- Check maximum yawn between 2 edges
//--
//-- On verifie la distance des edges a la courbe joignant
//-- le point d intersection au vertex (s il existe)
//-- Check distance from edges to the curve joining
//-- the point of intersection with vertex (if exists)
if (localok == Standard_False && !CommonVertices.IsEmpty()) {
#ifdef DEB
cout << "\n------------------------------------------------------\n" <<endl;
@ -1151,7 +1151,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
localok = Standard_True;
Standard_Real tole1 = BRep_Tool::Tolerance(E1);
for (k = 2; localok && k < 9; k++) {
Standard_Real u = VParaOnEdge1 + k*du1; // voyons deja voir si ca marche
Standard_Real u = VParaOnEdge1 + k*du1; // check if it works
gp_Pnt P1;
// Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 Begin
if (!ConS.IsNull()) {
@ -1171,7 +1171,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
localok = Standard_False;
}
}
//-- meme chose pour edge2
//-- same for edge2
// Modified by skv - Wed Jul 23 12:22:20 2003 OCC1764 Begin
gp_Dir aTmpDir(P3d2.XYZ().Subtracted(VertexLePlusProche.XYZ()));
@ -1179,7 +1179,7 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
// Modified by skv - Wed Jul 23 12:22:23 2003 OCC1764 End
Standard_Real tole2 = BRep_Tool::Tolerance(E2);
for (k = 2; localok && k < 9; k++) {
Standard_Real u = VParaOnEdge2 + k*du2; // voyons deja voir si ca marche
Standard_Real u = VParaOnEdge2 + k*du2; // check if it works
gp_Pnt P2;
// Modified by Sergey KHROMOV - Mon Apr 15 12:34:22 2002 Begin
if (!ConS2.IsNull()) {
@ -1416,8 +1416,8 @@ static void Propagate(const TopTools_IndexedDataMapOfShapeListOfShape& mapVE,
if (mapE.Contains(edg)) {
return;
}
mapE.Add(edg); // attention, si oriented == Standard_True, edg doit
// etre FORWARD ou REVERSED. Ce n`est pas verifie.
mapE.Add(edg); // attention, if oriented == Standard_True, edge should
// be FORWARD or REVERSED. It is not checked.
// =============
// attention, if oriented == Standard_True, <edg> must
// be FORWARD or REVERSED. That is not checked.
@ -1425,7 +1425,7 @@ static void Propagate(const TopTools_IndexedDataMapOfShapeListOfShape& mapVE,
TopExp_Explorer ex;
for (ex.Init(edg,TopAbs_VERTEX); ex.More(); ex.Next()) {
const TopoDS_Vertex& vtx = TopoDS::Vertex(ex.Current());
// debug jag sur vertex
// debug on vertex
Standard_Integer indv = mapVE.FindIndex(vtx);
if (indv != 0) {
for (TopTools_ListIteratorOfListOfShape itl(mapVE(indv)); itl.More(); itl.Next()) {
@ -1491,12 +1491,12 @@ static TopAbs_Orientation GetOrientation(const TopTools_MapOfShape& mapE,
Standard_Real tol = Max(ures,vres);
if(tol<=0.0) {
#ifdef DEB
//-- lbr le 29 jan 98
cout<<"BRepCheck_Wire : UResolution et VResolution = 0.0 (Face trop petite ?)"<<endl;cout.flush();
cout<<"BRepCheck_Wire : UResolution and VResolution = 0.0 (Face too small ?)"<<endl;cout.flush();
#endif
}
else {
tol += tol; //pour YFR.
tol += tol;
}
//
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(Edg, F, f, l);
@ -1565,14 +1565,14 @@ static TopAbs_Orientation GetOrientation(const TopTools_MapOfShape& mapE,
}
}//end of for
//
// Mise a jour ledge
// Update edge
if (imin == 0)
if (L.Extent() == 1) {
Standard_Boolean onjette = 0; //all right
Evois = TopoDS::Edge(L.First());
if (dist2d > tol) {
#ifdef DEB
cout<<"BRepCheckWire : controle fermeture en 2d --> faux"<<endl;cout.flush();
cout<<"BRepCheckWire : control closure in 2d --> false"<<endl;cout.flush();
#endif
if(Evois.IsNull() || BRep_Tool::Degenerated(Edg) ||
BRep_Tool::Degenerated(Evois)){
@ -1605,7 +1605,7 @@ static TopAbs_Orientation GetOrientation(const TopTools_MapOfShape& mapE,
}
#ifdef DEB
else
cout<<"controle fermeture en 3d --> ok"<<endl;cout.flush();
cout<<"control closure in 3d --> ok"<<endl;cout.flush();
#endif
}
}
@ -1615,7 +1615,7 @@ static TopAbs_Orientation GetOrientation(const TopTools_MapOfShape& mapE,
}
if(onjette) {
#ifdef DEB
cout<<"controle fermeture en 3d --> faux"<<endl;cout.flush();
cout<<"control closure in 3d --> false"<<endl;cout.flush();
#endif
L.Clear();
}

View File

@ -2,16 +2,16 @@
// Created: Thu Mar 10 14:52:22 1994
// Author: Laurent BUCHARD
// <lbr@fuegox>
// Modifed: Portage NT 7-5-97 DPF (stdio.h)
// Modifed: Porting NT 7-5-97 DPF (stdio.h)
// Apr 16 2002 eap, classification against infinite solid (occ299)
// Modified by skv - Thu Sep 4 12:29:30 2003 OCC578
//-- Traiter le cas d un trou !!
//-- Process the case of a hole!!
#define REJECTION 1
//-- Pour printf sur NT
//-- To printf on NT
#include <stdio.h>
#include <BRepClass3d_SolidExplorer.ixx>
@ -48,7 +48,7 @@ static gp_Vec staticd1v_gp_vec;
//=======================================================================
//function : FindAPointInTheFace
//purpose : compute a point P in the face F. Param is a Real in
//purpose : Compute a point P in the face F. Param is a Real in
// ]0,1[ and is used to initialise the algorithm. For
// different values , different points are returned.
//=======================================================================
@ -111,7 +111,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace
T.Normalize();
P.SetCoord(P.X()+TolInit*T.X(),P.Y()+TolInit*T.Y());
FClassifier.Reset(gp_Lin2d(P,T),ParamInit,RealEpsilon()); //-- Longueur et Tolerance #######
FClassifier.Reset(gp_Lin2d(P,T),ParamInit,RealEpsilon()); //-- Length and Tolerance #######
TopExp_Explorer otherfaceexplorer;
// Modified by Sergey KHROMOV - Tue Apr 1 11:32:51 2003 Begin
@ -191,14 +191,14 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
void *ptr = (void*)(myMapOfInter.Find(Face));
if(ptr) {
const IntCurvesFace_Intersector& TheIntersector = (*((IntCurvesFace_Intersector *)ptr));
//-- On prend les 4 points dans chaque Quart de surface
//-- Take 4 points in each Quarter of surface
//-- -> Index : 1 -> 16
//--
//--
//-- Puis on prend une matrice de points sur une grille serree
//-- Then take a matrix of points on a tight grid
//--
for(u=du+(U1+U2)*0.5; u<U2; u+=du) { //-- 0 X u croit
for(v=dv+(V1+V2)*0.5; v<V2; v+=dv) { //-- 0 0 v croit
for(u=du+(U1+U2)*0.5; u<U2; u+=du) { //-- 0 X u increases
for(v=dv+(V1+V2)*0.5; v<V2; v+=dv) { //-- 0 0 v increases
if(++NbPntCalc>=IndexPoint) {
if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) {
u_=u; v_=v;
@ -210,8 +210,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
}
}
for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- 0 0 u decroit
for(v=-dv+(V1+V2)*0.5; v>V1; v-=dv) { //-- X 0 v decroit
for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- 0 0 u decreases
for(v=-dv+(V1+V2)*0.5; v>V1; v-=dv) { //-- X 0 v decreases
if(++NbPntCalc>=IndexPoint) {
if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) {
u_=u; v_=v;
@ -222,8 +222,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
}
}
}
for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- X 0 u decroit
for(v=dv+(V1+V2)*0.5; v<V2; v+=dv) { //-- 0 0 v croit
for(u=-du+(U1+U2)*0.5; u>U1; u-=du) { //-- X 0 u decreases
for(v=dv+(V1+V2)*0.5; v<V2; v+=dv) { //-- 0 0 v increases
if(++NbPntCalc>=IndexPoint) {
if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) {
u_=u; v_=v;
@ -234,8 +234,8 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
}
}
}
for(u=du+(U1+U2)*0.5; u<U2; u+=du) { //-- 0 0 u croit
for(v=-dv+(V1+V2)*0.5; v>V1; v-=dv) { //-- 0 X v decroit
for(u=du+(U1+U2)*0.5; u<U2; u+=du) { //-- 0 0 u increases
for(v=-dv+(V1+V2)*0.5; v>V1; v-=dv) { //-- 0 X v decreases
if(++NbPntCalc>=IndexPoint) {
if(TheIntersector.ClassifyUVPoint(gp_Pnt2d(u,v))==TopAbs_IN) {
u_=u; v_=v;
@ -246,7 +246,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
}
}
}
//-- le reste
//-- the remainder
du = (U2-U1)/37.0;
dv = (V2-V1)/37.0;
if(du<1e-12) du=1e-12;
@ -278,7 +278,7 @@ Standard_Boolean BRepClass3d_SolidExplorer::PointInTheFace
IndexPoint = NbPntCalc;
}
else {
//printf("BRepClass3d_SolidExplorer Face non trouvee ds la map \n");
//printf("BRepClass3d_SolidExplorer Face not found ds the map \n");
}
return(BRepClass3d_SolidExplorer::FindAPointInTheFace(Face,APoint_,u_,v_,param_));
@ -508,8 +508,8 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
Standard_Boolean encoreuneface = faceexplorer.More();
if(ptfound==Standard_False && encoreuneface==Standard_False) {
if(myParamOnEdge < 0.0001) {
//-- Ce cas se produit lorsque le point est sur le solide
//-- et ce solide est reduit a une face
//-- This case takes place when the point is on the solid
//-- and this solid is reduced to a face
gp_Pnt PBidon(P.X()+1.0,P.Y(),P.Z());
gp_Vec V(P,PBidon);
Par= 1.0;
@ -528,7 +528,7 @@ static Standard_Integer IsInfiniteUV (Standard_Real& U1, Standard_Real& V1,
_Par=0.0;
myReject=Standard_True;
#if DEB
cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid sans face)"<<endl;
cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid without face)"<<endl;
#endif
//modified by NIZNHY-PKV Thu Nov 14 12:25:28 2002 f
//return ;
@ -708,7 +708,7 @@ void BRepClass3d_SolidExplorer::InitShape(const TopoDS_Shape& S)
myShape = S;
myFirstFace = 0;
myParamOnEdge = 0.512345;
//-- Exploration de la Map et delete sur les objets alloues
//-- Exploring of the Map and removal of allocated objects
BRepClass3d_DataMapIteratorOfMapOfInter iter(myMapOfInter);
@ -722,7 +722,7 @@ void BRepClass3d_SolidExplorer::InitShape(const TopoDS_Shape& S)
myMapOfInter.Clear();
myReject = Standard_True; //-- cas de solide infini (sans aucune face)
myReject = Standard_True; //-- case of infinite solid (without any face)
TopExp_Explorer Expl;
for(Expl.Init(S,TopAbs_FACE);
@ -731,12 +731,12 @@ void BRepClass3d_SolidExplorer::InitShape(const TopoDS_Shape& S)
const TopoDS_Face Face = TopoDS::Face(Expl.Current());
void *ptr = (void *)(new IntCurvesFace_Intersector(Face,Precision::Confusion()));
myMapOfInter.Bind(Face,ptr);
myReject=Standard_False; //-- au moins une face dans le solide
myReject=Standard_False; //-- at least one face in the solid
}
#if DEB
if(myReject) {
cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid sans face)"<<endl;
cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid without face)"<<endl;
}
#endif
@ -753,7 +753,7 @@ void BRepClass3d_SolidExplorer::InitShape(const TopoDS_Shape& S)
//Standard_Boolean BRepClass3d_SolidExplorer::Reject(const gp_Pnt& P) const
Standard_Boolean BRepClass3d_SolidExplorer::Reject(const gp_Pnt& ) const
{
return(myReject); // cas de solide sans face
return(myReject); // case of solid without face
}
//=======================================================================
@ -919,6 +919,6 @@ void BRepClass3d_SolidExplorer::DumpSegment(const gp_Pnt&,
const TopAbs_State) const
{
#ifdef DEB
// rien pour le moment.
#endif
}

View File

@ -66,7 +66,7 @@ static void Descendants(const TopoDS_Shape&,
//=======================================================================
//function : Perform
//purpose : reconstruction topologique du resultat
//purpose : topological reconstruction of the result
//=======================================================================
void BRepFeat_Form::GlobalPerform ()
{
@ -111,7 +111,7 @@ static void Descendants(const TopoDS_Shape&,
Standard_Boolean ChangeOpe = Standard_False;
//--- Ajout Shape From et Until dans la map pour ne pas les mettre dans LShape
//--- Add Shape From and Until in the map to avoid setting them in LShape
Standard_Boolean FromInShape = Standard_False;
Standard_Boolean UntilInShape = Standard_False;
TopTools_MapOfShape M;
@ -163,14 +163,14 @@ static void Descendants(const TopoDS_Shape&,
}
//--- Ajout Faces de collage dans la map pour ne pas les mettre dans LShape
//--- Add Faces of glueing in the map to avoid setting them in LShape
TopTools_DataMapIteratorOfDataMapOfShapeShape itm;
for (itm.Initialize(myGluedF);itm.More();itm.Next()) {
M.Add(itm.Value());
}
//--- Recherche de la liste LShape des faces concernees par la feature
//--- Find in the list LShape faces concerned by the feature
TopTools_ListOfShape LShape;
TopTools_ListIteratorOfListOfShape it,it2;
@ -201,22 +201,22 @@ static void Descendants(const TopoDS_Shape&,
IntList.Clear();
//--- 1) par intersection
//--- 1) by intersection
// Intersection Outil Shape From
// Intersection Tool Shape From
if (!mySFrom.IsNull()) {
ASI1.Init(mySFrom);
ASI1.Perform(scur);
}
// Intersection Outil Shape Until
// Intersection Tool Shape Until
if (!mySUntil.IsNull()) {
ASI2.Init(mySUntil);
ASI2.Perform(scur);
}
#ifndef VREF
// Intersection Outil Shape de base
// Intersection Tool base Shape
if (!ASI3.IsDone()) {
theOpe = 2;
LShape.Clear();
@ -224,7 +224,7 @@ static void Descendants(const TopoDS_Shape&,
else
#endif
{
// Determination sens,locmin,locmax,FFrom,FUntil
// Find sens, locmin, locmax, FFrom, FUntil
tempo=0;
locmin = RealFirst();
locmax = RealLast();
@ -247,7 +247,7 @@ static void Descendants(const TopoDS_Shape&,
}
else {
Standard_Integer ku, kf;
if (! (mu > Mf || mf > Mu)) { //chevauchement des intervales
if (! (mu > Mf || mf > Mu)) { //overlapping intervals
sens = 1;
kf = 1;
ku = ASI2.NbPoints(jj);
@ -304,8 +304,8 @@ static void Descendants(const TopoDS_Shape&,
if (ASI2.NbPoints(jj) <= 0)
continue;
// pour cas base prism a cheval sur mySUntil -> sens ambigu
// -> on privilegie sens = 1
// for base case prism on mySUntil -> ambivalent direction
// -> preferrable direction = 1
if(sens != 1) {
if (ASI2.Point(jj,1).Parameter()*
ASI2.Point(jj,ASI2.NbPoints(jj)).Parameter()<=0)
@ -346,9 +346,9 @@ static void Descendants(const TopoDS_Shape&,
}
// Mise a jour LShape par ajout des faces du Shape de base
// qui sont OK pour (sens, locmin et locmax)
// qui ne sont pas deja dans la map (Shape From Until et faces collage)
// Update LShape by adding faces of the base Shape
// that are OK (sens, locmin and locmax)
// that are not yet in the map (Shape From Until and glue faces)
#ifndef VREF
if (theOpe == 2) {
for (Standard_Integer i=1; i<=ASI3.NbPoints(jj); i++) {
@ -399,7 +399,7 @@ static void Descendants(const TopoDS_Shape&,
#ifndef VREF
//--- 2) par section avec la boite englobante
//--- 2) by section with the bounding box
Bnd_Box prbox;
BRepBndLib::Add(myGShape,prbox);
@ -421,14 +421,14 @@ static void Descendants(const TopoDS_Shape&,
Standard_Integer counter = 0;
// On ne traite pas : la face de collage
// les faces du Shape From
// les faces du Shape Until
// les faces deja dans LShape
// les faces de myGluedF
// Si la face n'a pas ete eliminee ... on la garde si boite enblobante
// est en collision avec celle de myGShape = outil
// ou celle des faces limites (mySFrom mySUntil mySkface)
// Are not processed: the face of gluing
// the faces of Shape From
// the faces of Shape Until
// the faces already in LShape
// the faces of myGluedF
// If the face was not eliminated ... it is preserved if bounding box
// collides with the box of myGShape = outil
// or the box of limit faces (mySFrom mySUntil mySkface)
for(; exx1.More(); exx1.Next()) {
const TopoDS_Face& sh = TopoDS::Face(exx1.Current());
counter++;
@ -479,8 +479,8 @@ static void Descendants(const TopoDS_Shape&,
#endif
#ifdef VREF
// test de performance : ajout de toutes les faces du Shape de base dans LShape
// (pas de phase de tri mais plus de faces) -> pas concluant
// test of performance : add all faces of the base Shape in LShape
// (no phase of parsing, but more faces) -> no concluant
TopExp_Explorer exx1;
for (exx1.Init(mySbase, TopAbs_FACE);
exx1.More(); exx1.Next()) {
@ -494,14 +494,14 @@ static void Descendants(const TopoDS_Shape&,
LocOpe_Gluer theGlue;
//--- cas de collage
//--- case of gluing
if (theOpe == 1) {
#ifdef DEB
if (trc) cout << " Gluer" << endl;
#endif
Standard_Boolean Collage = Standard_True;
// on coupe par FFrom && FUntil
// cut by FFrom && FUntil
TopoDS_Shape Comp;
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(Comp));
@ -533,7 +533,7 @@ static void Descendants(const TopoDS_Shape&,
Collage = Standard_False;
}
else {// else X0
// On ne garde que les solides
// Only solids are preserved
TopoDS_Shape theGShape;
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(theGShape));
@ -662,7 +662,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
// On rajoute le collage sur face de depart et fin , si necessaire !!!
// Add gluing on start and end face if necessary !!!
if (FromInShape && Collage) {
TopExp_Explorer ex(mySFrom,TopAbs_FACE);
for(; ex.More(); ex.Next()) {
@ -693,8 +693,8 @@ static void Descendants(const TopoDS_Shape&,
theGlue.Bind(theFE.EdgeFrom(),theFE.EdgeTo());
}
}
//myMap.UnBind(fac2); // pour ne pas avoir fac2 dans la Map quand
// on .appelle UpdateDescendants(theGlue)
//myMap.UnBind(fac2); // to avoid fac2 in Map when
// UpdateDescendants(theGlue) is called
}
}
@ -708,7 +708,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
//--- si le collage est toujours applicable
//--- if the gluing is always applicable
if (theOpe == 1) {
#ifdef DEB
@ -842,7 +842,7 @@ static void Descendants(const TopoDS_Shape&,
}
//--- cas sans collage + Outil aux bonnes dimensions
//--- case without gluing + Tool with proper dimensions
if (theOpe == 2 && ChangeOpe && myJustGluer) {
#ifdef DEB
@ -854,7 +854,7 @@ static void Descendants(const TopoDS_Shape&,
// return;
}
//--- cas sans collage
//--- case without gluing
if (theOpe == 2) {
#ifdef DEB
@ -863,7 +863,7 @@ static void Descendants(const TopoDS_Shape&,
TopoDS_Shape theGShape = myGShape;
if (ChangeOpe) {
#ifdef DEB
if (trc) cout << " Passage en ope. topologique" << endl;
if (trc) cout << " Passage to topological operations" << endl;
#endif
for (itm.Initialize(myGluedF); itm.More();itm.Next()) {
const TopoDS_Face& fac = TopoDS::Face(itm.Value());
@ -877,7 +877,7 @@ static void Descendants(const TopoDS_Shape&,
if(found) break;
}
if(!found) {
// echec collage -> on remet les faces de collage dans LShape
// failed gluing -> reset faces of gluing in LShape
LShape.Append(fac);
}
}
@ -911,7 +911,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
// mise a jour type de selection
// update type of selection
if(myPerfSelection == BRepFeat_SelectionU && !UntilInShape) {
myPerfSelection = BRepFeat_NoSelection;
}
@ -930,14 +930,14 @@ static void Descendants(const TopoDS_Shape&,
//BRepAlgo_Cut trP(myGShape,Comp);
BRepAlgoAPI_Cut trP(myGShape, Comp);
//modified by NIZNHY-PKV Thu Mar 21 17:24:56 2002 t
// le resultat est necessairement un compound.
// the result is necessarily a compound.
exp.Init(trP.Shape(),TopAbs_SOLID);
if (!exp.More()) {
myStatusError = BRepFeat_EmptyCutResult;
NotDone();
return;
}
// On ne garde que les solides
// Only solids are preserved
theGShape.Nullify();
BRep_Builder B;
B.MakeCompound(TopoDS::Compound(theGShape));
@ -1063,7 +1063,7 @@ static void Descendants(const TopoDS_Shape&,
}
//--- generation de "just feature" pour assemblage = Parties d'outil
//--- generation of "just feature" for assembly = Parts of tool
TopTools_ListOfShape lshape;
LocOpe_Builder theTOpe;
Standard_Real pbmin, pbmax, prmin, prmax;
@ -1082,9 +1082,9 @@ static void Descendants(const TopoDS_Shape&,
theTOpe.PerformResult();
if (theTOpe.IsDone()) {
myShape = theTOpe.ResultingShape();
// UpdateDescendants(theTOpe.Builder(),myShape); // a priori bug de mise a jour
UpdateDescendants(theTOpe.History(),myShape); // a priori bug de mise a jour
// a faire apres selection des parties a garder
// UpdateDescendants(theTOpe.Builder(),myShape); // a priori bug of update
UpdateDescendants(theTOpe.History(),myShape); // a priori bug of update
// to be done after selection of parts to be preserved
myNewEdges = theTOpe.Edges();
myTgtEdges = theTOpe.TgtEdges();
TopExp_Explorer explo(theTOpe.ResultingShape(), TopAbs_SOLID);
@ -1099,12 +1099,12 @@ static void Descendants(const TopoDS_Shape&,
}
}
//--- Selection des morceaux d'outil a garder
//--- Selection of pieces of tool to be preserved
TopoDS_Solid thePartsOfTool;
if(!lshape.IsEmpty() && myPerfSelection != BRepFeat_NoSelection) {
//Recherche ParametricMinMax en fonction contraintes des Shape From et Until
// -> prmin, prmax, pbmin et pbmax
// Find ParametricMinMax depending on the constraints of Shape From and Until
// -> prmin, prmax, pbmin and pbmax
C = BarycCurve();
if (C.IsNull()) {
myStatusError = BRepFeat_EmptyBaryCurve;
@ -1125,7 +1125,7 @@ static void Descendants(const TopoDS_Shape&,
BRepFeat::ParametricMinMax(mySUntil,C,
prmin2, prmax2, prbmin2, prbmax2, flag1);
// cas des revol
// case of revolutions
if (C->IsPeriodic()) {
Standard_Real period = C->Period();
prmax = prmax2;
@ -1182,8 +1182,7 @@ static void Descendants(const TopoDS_Shape&,
return;
}
// On cherche les parties de l`outil contenant les descendants du
// Shape Until
// Find parts of the tool containing descendants of Shape Until
BRepFeat::ParametricMinMax(mySUntil,C,
prmin1, prmax1, prbmin1, prbmax1, flag1);
if (sens == 1) {
@ -1201,15 +1200,15 @@ static void Descendants(const TopoDS_Shape&,
}
// Choix plus fin des ParametricMinMax dans le cas ou l'outil
// intersecte les Shapes From et Until
// cas de plusieurs intersections (retenir PartsOfTool en accord avec selection)
// position de la face d`intersection dans PartsOfTool (avant ou arriere)
// Finer choice of ParametricMinMax in case when the tool
// intersects Shapes From and Until
// case of several intersections (keep PartsOfTool according to the selection)
// position of the face of intersection in PartsOfTool (before or after)
Standard_Real delta = Precision::Confusion();
if (myPerfSelection != BRepFeat_NoSelection) {
// modif du test pour cts21181 : (prbmax2 et prnmin2) -> (prbmin1 et prbmax1)
// correction prise en compte de flag2 pour pro15323 et de flag3 pour pro16060
// modif of the test for cts21181 : (prbmax2 and prnmin2) -> (prbmin1 and prbmax1)
// correction take into account flag2 for pro15323 and flag3 for pro16060
if (!mySUntil.IsNull()) {
TopTools_MapOfShape mapFuntil;
Descendants(mySUntil,theTOpe,mapFuntil);
@ -1335,7 +1334,7 @@ static void Descendants(const TopoDS_Shape&,
}
// Tri des PartsOfTool a garder ou non en fonction des ParametricMinMax
// Parse PartsOfTool to preserve or not depending on ParametricMinMax
if (!myJustFeat) {
Standard_Boolean KeepParts = Standard_False;
BRep_Builder BB;
@ -1384,7 +1383,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
// Cas ou on ne garde aucune partie d`outil
// Case when no part of the tool is preserved
if (!KeepParts) {
#ifdef DEB
if (trc) cout << " No parts of tool kept" << endl;
@ -1395,7 +1394,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
else {
// cas JustFeature -> on garde tous les PartsOfTool
// case JustFeature -> all PartsOfTool are preserved
Standard_Real prmin1, prmax1, prbmin1, prbmax1;
Standard_Real min, max, pmin, pmax;
Standard_Boolean flag2;
@ -1429,11 +1428,11 @@ static void Descendants(const TopoDS_Shape&,
}
//--- Generation du resultat myShape
//--- Generation of result myShape
if (!myJustFeat) {
// suppression des edges de section qui n'ont aucun vertex commun
// avec les PartsOfTool converves
// removal of edges of section that have no common vertices
// with PartsOfTool preserved
theTOpe.PerformResult();
if (theTOpe.IsDone()) {
Done();
@ -1441,7 +1440,7 @@ static void Descendants(const TopoDS_Shape&,
//
BRepLib::SameParameter(myShape, 1.e-7, Standard_True);
//
// mise a jour des new et tangent edges
// update new and tangent edges
// UpdateDescendants(theTOpe.Builder(),myShape);
UpdateDescendants(theTOpe.History(),myShape);
myNewEdges = theTOpe.Edges();
@ -1450,7 +1449,7 @@ static void Descendants(const TopoDS_Shape&,
}
// else myTgtEdges.Clear();
}
else {// dernier recours (attention new et tangent edges)
else {// last recourse (attention new and tangent edges)
if (!thePartsOfTool.IsNull()) {
#ifdef DEB
if (trc) cout << " Parts of Tool : direct Ope. Top." << endl;
@ -1493,7 +1492,7 @@ static void Descendants(const TopoDS_Shape&,
}
}
else {
// tout est deja fait
// all is already done
Done();
}
}
@ -1523,7 +1522,7 @@ const TopTools_ListOfShape& BRepFeat_Form::Modified
{
if (myMap.IsBound(F)) {
static TopTools_ListOfShape list;
list.Clear(); // Pour le second passage DPF
list.Clear(); // For the second passage DPF
TopTools_ListIteratorOfListOfShape ite(myMap(F));
for(; ite.More(); ite.Next()) {
const TopoDS_Shape& sh = ite.Value();
@ -1544,9 +1543,9 @@ const TopTools_ListOfShape& BRepFeat_Form::Generated
(const TopoDS_Shape& S)
{
if (myMap.IsBound(S) &&
S.ShapeType() != TopAbs_FACE) { // voir si on filtre sur face ou pas
S.ShapeType() != TopAbs_FACE) { // check if filter on face or not
static TopTools_ListOfShape list;
list.Clear(); // Pour le second passage DPF
list.Clear(); // For the second passage DPF
TopTools_ListIteratorOfListOfShape ite(myMap(S));
for(; ite.More(); ite.Next()) {
const TopoDS_Shape& sh = ite.Value();
@ -1644,7 +1643,7 @@ const TopTools_ListOfShape& BRepFeat_Form::TgtEdges() const
//=======================================================================
//function : TransformSUntil
//purpose : Limitation du shape until dans le cas des faces infinies
//purpose : Limitation of the shape until the case of infinite faces
//=======================================================================
Standard_Boolean BRepFeat_Form::TransformShapeFU(const Standard_Integer flag)
@ -1663,7 +1662,7 @@ Standard_Boolean BRepFeat_Form::TransformShapeFU(const Standard_Integer flag)
return Trf;
TopExp_Explorer exp(shapefu, TopAbs_FACE);
if (!exp.More()) { // pas de faces... Il faudrait renvoyer une erreur
if (!exp.More()) { // no faces... It is necessary to return an error
#ifdef DEB
if (trc) cout << " BRepFeat_Form::TransformShapeFU : invalid Shape" << endl;
#endif
@ -1671,7 +1670,7 @@ Standard_Boolean BRepFeat_Form::TransformShapeFU(const Standard_Integer flag)
}
exp.Next();
if (!exp.More()) { // une seule face. Est-elle infinie??
if (!exp.More()) { // the only face. Is it infinite?
exp.ReInit();
TopoDS_Face fac = TopoDS::Face(exp.Current());
@ -1895,7 +1894,7 @@ static void Descendants(const TopoDS_Shape& S,
}
myMap.ChangeFind(orig).Clear();
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
// on verifie l`appartenance au shape...
// check the appartenance to the shape...
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(itm.Key())) {
// const TopoDS_Shape& sh = itm.Key();
@ -1952,7 +1951,7 @@ static void Descendants(const TopoDS_Shape& S,
}
myMap.ChangeFind(orig).Clear();
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
// on verifie l`appartenance au shape...
// check the appartenance to the shape...
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(itm.Key())) {
// const TopoDS_Shape& sh = itm.Key();
@ -2008,7 +2007,7 @@ static void Descendants(const TopoDS_Shape& S,
}
myMap.ChangeFind(orig).Clear();
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
// on verifie l`appartenance au shape...
// check the appartenance to the shape...
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(itm.Key())) {
// const TopoDS_Shape& sh = itm.Key();

View File

@ -64,7 +64,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius)
theList.Append(theASI.Point(i).Face());
}
// On ne peut pas utiliser de cylindre infini pour les ope topologiques...
// It is not possible to use infinite cylinder for topological operations.
Standard_Real PMin,PMax;
BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax);
Standard_Real Heigth = 2.*(PMax-PMin);
@ -75,7 +75,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius)
Radius,
Heigth);
// Peut-etre vaudrait-il mieux faire directement une coupe
// Probably it is better to make cut directly
BRep_Builder B;
TopoDS_Solid theTool;
@ -164,7 +164,7 @@ void BRepFeat_MakeCylindricalHole::PerformThruNext(const Standard_Real Radius,
}
}
// On ne peut pas utiliser de cylindre infini pour les ope topologiques...
// It is not possible to use infinite cylinder for topological operations.
Standard_Real PMin,PMax;
BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax);
Standard_Real Heigth = 2.*(PMax-PMin);
@ -200,8 +200,8 @@ void BRepFeat_MakeCylindricalHole::PerformThruNext(const Standard_Real Radius,
return;
}
if (nbparts >= 2) { // on garde la plus petite en parametre
// le long de l`axe
if (nbparts >= 2) { // preserve the smallest as parameter
// along the axis
TopoDS_Shape tokeep;
Standard_Real parbar,parmin = Last;
gp_Pnt Barycentre;
@ -214,7 +214,7 @@ void BRepFeat_MakeCylindricalHole::PerformThruNext(const Standard_Real Radius,
}
}
if (tokeep.IsNull()) { // on garde le plus proche de l`intervalle
if (tokeep.IsNull()) { // preserve the closest interval
Standard_Real dmin = RealLast();
for (its.Initialize(myBuilder.PartsOfTool()); its.More(); its.Next()) {
@ -273,8 +273,8 @@ void BRepFeat_MakeCylindricalHole::PerformUntilEnd(const Standard_Real Radius,
if (ok) {
if (theOr == TopAbs_REVERSED) {
ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on remonte
// On pourrait aller chercher la suivante...
ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on reset
// It is possible to search for the next.
}
if ( ok && theOr == TopAbs_FORWARD) {
First = theASI.Point(IndFrom).Parameter();
@ -305,7 +305,7 @@ void BRepFeat_MakeCylindricalHole::PerformUntilEnd(const Standard_Real Radius,
}
}
// On ne peut pas utiliser de cylindre infini pour les ope topologiques...
// It is not possible to use infinite cylinder for topological operations.
Standard_Real PMin,PMax;
BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax);
Standard_Real Heigth = 2.*(PMax-PMin);
@ -341,7 +341,7 @@ void BRepFeat_MakeCylindricalHole::PerformUntilEnd(const Standard_Real Radius,
return;
}
if (nbparts >= 2) { // on garde tout ce qui est au dessus de First
if (nbparts >= 2) { // preserve everything above the First
Standard_Real parbar;
gp_Pnt Barycentre;
for (its.Initialize(myBuilder.PartsOfTool()); its.More(); its.Next()) {
@ -397,8 +397,8 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius,
Standard_Boolean ok = theASI.LocalizeAfter(thePFrom,theOr,IndFrom,IndTo);
if (ok) {
if (theOr == TopAbs_REVERSED) {
ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on remonte
// On pourrait aller chercher la suivante...
ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // reset
// It is possible to find the next.
}
if ( ok && theOr == TopAbs_FORWARD) {
First = theASI.Point(IndFrom).Parameter();
@ -430,7 +430,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius,
}
}
// On ne peut pas utiliser de cylindre infini pour les ope topologiques...
// // It is not possible to use infinite cylinder for topological operations.
Standard_Real PMin,PMax;
BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax);
Standard_Real Heigth = 2.*(PMax-PMin);
@ -467,7 +467,7 @@ void BRepFeat_MakeCylindricalHole::Perform(const Standard_Real Radius,
return;
}
if (nbparts >= 2) { // on garde les parties entre First et Last
if (nbparts >= 2) { // preserve parts between First and Last
TopoDS_Shape tokeep;
Standard_Real parbar;
@ -516,8 +516,8 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius,
if (ok) {
if (theOr == TopAbs_REVERSED) {
ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // on remonte
// on pourrait aller chercher la suivante...
ok = theASI.LocalizeBefore(IndFrom,theOr,IndFrom,IndTo); // reset
// it is possible to find the next
}
ok = ok && theOr == TopAbs_FORWARD;
}
@ -526,7 +526,7 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius,
return;
}
// on verifie a priori la longueur du trou
// check a priori the length of the hole
Standard_Integer IFNext,ITNext;
ok = theASI.LocalizeAfter(IndTo,theOr,IFNext,ITNext);
if (!ok) {
@ -544,14 +544,14 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius,
theList.Append(theASI.Point(i).Face());
}
*/
// version pour plus de controle
// version for advanced control
for (Standard_Integer i=IndFrom; i<= ITNext; i++) {
theList.Append(theASI.Point(i).Face());
}
First = theASI.Point(IndFrom).Parameter();
// On ne peut pas utiliser de cylindre infini pour les ope topologiques...
//// It is not possible to use infinite cylinder for topological operations.
Standard_Real PMin,PMax;
BoxParameters(myBuilder.OriginalShape(),myAxis,PMin,PMax);
if (PMin > Length) {
@ -592,8 +592,7 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius,
return;
}
if (nbparts >= 2) { // on garde la plus petite en parametre
// le long de l`axe
if (nbparts >= 2) { // preserve the smallest as parameter along the axis
TopoDS_Shape tokeep;
Standard_Real parbar,parmin = RealLast();
gp_Pnt Barycentre;
@ -606,7 +605,7 @@ void BRepFeat_MakeCylindricalHole::PerformBlind(const Standard_Real Radius,
}
}
if (tokeep.IsNull()) { // on garde le plus proche de l`intervalle
if (tokeep.IsNull()) { // preserve the closest interval
Standard_Real dmin = RealLast();
for (its.Initialize(myBuilder.PartsOfTool()); its.More(); its.Next()) {
@ -675,7 +674,7 @@ BRepFeat_Status BRepFeat_MakeCylindricalHole::Validate ()
{
BRepFeat_Status thestat = BRepFeat_NoError;
TopExp_Explorer ex(myBuilder.ResultingShape(),TopAbs_FACE);
if (myIsBlind) { // trou borgne
if (myIsBlind) { // limit of the hole
for (; ex.More(); ex.Next()) {
if (ex.Current().IsSame(myTopFace) ) {
break;
@ -712,7 +711,7 @@ void Baryc(const TopoDS_Shape& S, gp_Pnt& B)
Standard_Integer i, nbp= 0;
for (; exp.More(); exp.Next()) {
// On calcule 11 points par edges no degenerees
// Calculate points by non-degenerated edges
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
if (!BRep_Tool::Degenerated(E)) {
C = BRep_Tool::Curve(E,L,First,Last);
@ -735,7 +734,7 @@ void BoxParameters(const TopoDS_Shape& S,
Standard_Real& parmax)
{
// calcul des parametres d`une boite englobante selon l`axe du trou
// calculate the parameters of a bounding box in the direction of the axis of the hole
Bnd_Box B;
BRepBndLib::Add(S,B);
Standard_Real c[6];

View File

@ -181,7 +181,7 @@ void BRepFeat_MakeDPrism::Init(const TopoDS_Shape& Sbase,
//=======================================================================
//function : Add
//purpose : add faces et edges de glissement
//purpose : add sliding faces and edges
//=======================================================================
void BRepFeat_MakeDPrism::Add(const TopoDS_Edge& E,
@ -228,7 +228,7 @@ void BRepFeat_MakeDPrism::Add(const TopoDS_Edge& E,
//=======================================================================
//function : Perform
//purpose : feature de la hauteur Height
//purpose : feature of Height
//=======================================================================
void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
@ -296,20 +296,20 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
}
}
// gestion des faces de collage
// management of gluing faces
//SetGluedFaces(mySkface, mySbase, theBase, mySlface, theDPrism, myGluedF);
GluedFacesValid();
// VerifGluedFaces(mySkface, theBase, myBCurve, myCurves, theDPrism, myGluedF);
if(!myGluedF.IsEmpty()) { // cas collage
if(!myGluedF.IsEmpty()) { // case gluing
myJustGluer = Standard_True;
theDPrism.Curves(myCurves);
myBCurve = theDPrism.BarycCurve();
GlobalPerform();
}
// si il n'y a pas de collage -> appel des ope topo
// if there is no gluing -> call topological operations
if(!myJustGluer) {
if(myFuse == 1) {
//modified by NIZNHY-PKV Thu Mar 21 17:32:17 2002 f
@ -342,7 +342,7 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
//=======================================================================
//function : Perform
//purpose : feature limitee par le shape Until
//purpose : feature limited by the shape Until
//=======================================================================
void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until)
@ -481,7 +481,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until)
//=======================================================================
//function : Perform
//purpose : feature limitee par les deux shapes
//purpose : feature limited by two shapes
//=======================================================================
void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From,
@ -550,22 +550,22 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From,
if(!Trff) {
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
// On fait systematiquement le dprism
// Make systematically dprism
myGShape = VraiDPrism;
GeneratedShapeValid();
// gestion des faces de collage
// management of gluing faces
//SetGluedFaces(TopoDS_Face(), // on ne veut pas binder mySkface
// mySbase, myPbase, mySlface, theDPrism, myGluedF);
GluedFacesValid();
theDPrism.Curves(myCurves);
myBCurve = theDPrism.BarycCurve();
// reconstruction topologique
// topologic reconstruction
GlobalPerform();
}
else {
// gestion des descendants
// management of descendants
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
Handle(Geom_Curve) C1;
if(sens == -1) {
@ -583,7 +583,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From,
ASI2.Perform(scur);
TopAbs_Orientation OrU, OrF;
TopoDS_Face FFrom, FUntil;
//sens du dprism
//direction of dprism
if (ASI1.IsDone() && ASI1.NbPoints(1) >=1) {
if (myFuse == 1) {
OrU = ASI1.Point(1,1).Orientation();
@ -701,7 +701,7 @@ void BRepFeat_MakeDPrism::PerformUntilEnd()
//=======================================================================
//function : PerformFromEnd
//purpose : feature mi-infinie limitee par le shape Until de l'autre cote
//purpose : feature semiinfinite limited by the shape Until from the other side
//=======================================================================
void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until)
@ -743,7 +743,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until)
return;
}
if(!Trf) { // cas face finie
if(!Trf) { // case finite face
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
myGShape = VraiDPrism;
GeneratedShapeValid();
@ -753,7 +753,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until)
myBCurve = theDPrism.BarycCurve();
GlobalPerform();
}
else { // cas support
else { // case support
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
Handle(Geom_Curve) C2;
if(sens == -1) {
@ -864,7 +864,7 @@ void BRepFeat_MakeDPrism::PerformFromEnd(const TopoDS_Shape& Until)
//=======================================================================
//function : PerformThruAll
//purpose : feature a travers tout le shape initial
//purpose : feature throughout the entire initial shape
//=======================================================================
void BRepFeat_MakeDPrism::PerformThruAll()
@ -921,7 +921,7 @@ void BRepFeat_MakeDPrism::PerformThruAll()
//=======================================================================
//function : PerformUntilHeight
//purpose : feature jusqu'un shape de la hauteur donnee
//purpose : feature until the shape is of the given height
//=======================================================================
void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
@ -956,7 +956,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
LocOpe_DPrism theDPrism(myPbase,sens*Height,myAngle);
TopoDS_Shape VraiDPrism = theDPrism.Shape();
if(!Trf) { // cas face finie
if(!Trf) { // case face finished
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
myGShape = VraiDPrism;
GeneratedShapeValid();
@ -978,7 +978,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
myBCurve = theDPrism.BarycCurve();
GlobalPerform();
}
else { // cas support
else { // case support
MajMap(myPbase,theDPrism,myMap,myFShape,myLShape);
Handle(Geom_Curve) C1;
if(sens == -1) {
@ -1045,7 +1045,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
//=======================================================================
//function : Curves
//purpose : courbes paralleles a l'axe du prism
//purpose : curves parallel to the axis of the prism
//=======================================================================
void BRepFeat_MakeDPrism::Curves(TColGeom_SequenceOfCurve& scur)
@ -1090,7 +1090,7 @@ void BRepFeat_MakeDPrism::BossEdges (const Standard_Integer signature)
// Edges Bottom
if (signature < 0) {
// Attention voir si TgtEdges est important
// Attention check if TgtEdges is important
myLatEdges = NewEdges();
}
else if (signature > 0) {
@ -1180,7 +1180,7 @@ Handle(Geom_Curve) BRepFeat_MakeDPrism::BarycCurve()
//=======================================================================
//function : HeightMax
//purpose : Calcul de la hauteur du prisme selon les parametres d`une boite englobante
//purpose : Calculate the height of the prism following the parameters of the bounding box
//=======================================================================
static Standard_Real HeightMax(const TopoDS_Shape& theSbase, // shape initial
@ -1224,7 +1224,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase, // shape initial
//=======================================================================
//function : SensOfPrism
//purpose : determiner la direction de generation du prism
//purpose : determine the direction of prism generation
//=======================================================================
Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
const TopoDS_Shape& Until)
@ -1284,7 +1284,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
}
}
// Glissements
// Sliding
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
if(!theSlmap.IsEmpty()) {
for (; itm.More(); itm.Next()) {
@ -1307,8 +1307,8 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
//=======================================================================
//function : VerifGluedFaces
//purpose : Verification intersection Outil/theSkface = thePbase
// Si oui -> OK si non -> cas sans collage
//purpose : Checking intersection Tool/theSkface = thePbase
// if yes -> OK if no -> case without gluing
//=======================================================================
#ifdef DEB
static void VerifGluedFaces(const TopoDS_Face& theSkface,
@ -1360,7 +1360,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
if (!GluedFaces) {
#ifdef DEB
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << " Intersection DPrism/skface : pas de collage" << endl;
if (trc) cout << " Intersection DPrism/skface : no gluing" << endl;
#endif
theMap.Clear();
}
@ -1492,7 +1492,7 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1,
Standard_Boolean ValRet = Standard_False;
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
S1 = BRep_Tool::Surface(F1); // pour appliquer la location.
S1 = BRep_Tool::Surface(F1); // to apply the location.
S2 = BRep_Tool::Surface(F2);
gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());

View File

@ -139,8 +139,8 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
Done();
myGenerated.Clear();
// modify = 0 si on ne veut pas faire de glissement
// = 1 si on veut essayer de faire un glissement
// modify = 0 if there is no intention to make sliding
// = 1 if one tries to make sliding
Standard_Boolean Sliding = Modify;
myLFMap.Clear();
@ -176,7 +176,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
#endif
// ---Determination Tolerance : tolerance max sur les parametres
// ---Determine Tolerance : max tolerance on parameters
myTol = Precision::Confusion();
TopExp_Explorer exx;
@ -194,8 +194,8 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
if(tol > myTol) myTol = tol;
}
// ---Controle des directions
// le wire doit etre dans la nervure
// ---Control of directions
// the wire should be in the rib
gp_Vec nulldir(0, 0, 0);
if(!myDir1.IsEqual(nulldir, myTol, myTol)) {
Standard_Real ang = myDir1.Angle(myDir);
@ -225,7 +225,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
myPln->Transform(T);
}
// ---Calcul boite englobante
// ---Calculate bounding box
BRep_Builder BB;
TopTools_ListOfShape theList;
@ -240,7 +240,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Solid BndBox = Bndbox.Solid();
// ---Construction de la face plan de travail (section boite englobante)
// ---Construction of the face workplane (section bounding box)
BRepLib_MakeFace PlaneF(myPln->Pln(), -6.*myBnd,
6.*myBnd, -6.*myBnd, 6.*myBnd);
TopoDS_Face PlaneFace = TopoDS::Face(PlaneF.Shape());
@ -257,7 +257,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Face BndFace = TopoDS::Face(Bndface.Shape());
// ---Recherche des faces d'appui de la nervure
// ---Find support faces of the rib
TopoDS_Edge FirstEdge, LastEdge;
TopoDS_Face FirstFace, LastFace;
TopoDS_Vertex FirstVertex, LastVertex;
@ -286,23 +286,23 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
// ---Point detrompeur pour le cote du wire a remplir - cote matiere
// ---Proofing Point for the side of the wire to be filled - side material
gp_Pnt CheckPnt = CheckPoint(FirstEdge, bnd/10., myPln);
// Standard_Real f, l;
// ---Controle glissement valable
// Plein de cas ou on sort du glissement
Standard_Integer Concavite = 3; // a priori le profile n'est pas concave
// ---Control sliding valuable
// Many cases when the sliding is abandoned
Standard_Integer Concavite = 3; // a priori the profile is not concave
myFirstPnt = BRep_Tool::Pnt(FirstVertex);
myLastPnt = BRep_Tool::Pnt(LastVertex);
// SliList : liste des faces concernees par la nervure
// SliList : list of faces concerned by the rib
TopTools_ListOfShape SliList;
SliList.Append(FirstFace);
if(Sliding) { // glissement
if(Sliding) { // sliding
#ifdef DEB
if (trc) cout << " Sliding" << endl;
#endif
@ -315,15 +315,15 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
if(s->DynamicType() == STANDARD_TYPE(Geom_Plane) ||
s->DynamicType() == STANDARD_TYPE(Geom_CylindricalSurface)) {
// si plan ou cylindre : glissement possible
// if plane or cylinder : sliding is possible
Sliding = Standard_True;
}
}
// Controle uniquement points de depart et d'arrivee
// -> pas de controle au milieu - a ameliorer
// Si on faisait un controle entre Surface et sgement entre les 2 points limite
// -> tres cher - a ameliorer
// Control only start and end points
// -> no control at the middle - improve
// Controle between Surface and segment between 2 limit points
// is too expensive - improve
if(Sliding) {
gp_Pnt p1(myFirstPnt.X()+myDir.X(),myFirstPnt.Y()+myDir.Y(),
myFirstPnt.Z()+myDir.Z());
@ -333,7 +333,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
gp_Pnt p2(myLastPnt.X()+myDir.X(),myLastPnt.Y()+myDir.Y(),
myLastPnt.Z()+myDir.Z());
BRepLib_MakeEdge ee2(myLastPnt, p2);
BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : courbes et surfaces
BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : curves and surfaces
if(ext2.NbExt() == 1 && ext2.SquareDistance(1)<=BRep_Tool::Tolerance(LastFace) * BRep_Tool::Tolerance(LastFace)) {
Sliding = Standard_True;
}
@ -371,13 +371,13 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
// On construit un gros profil qui va jusqu`a la boite englobante
// -> par tangence avec premier et dernier edge du Wire
// -> par normales aux faces d'appui : statistiquement meilleur
// On intersecte le tout pour trouver le profil final
// Construct a great profile that goes till the bounding box
// -> by tangency with the first and the last edge of the Wire
// -> by normals to the support faces : statistically better
// Intersect everything to find the final profile
// ---cas de glissement : construction de la face profil
// ---case of sliding : construction of the profile face
if(Sliding) {
#ifdef DEB
if (trc) cout << " still Sliding" << endl;
@ -399,11 +399,11 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
// ---Propagation sur les faces du shape initial
// pour trouver les faces concernees par la nervure
// ---Propagation on faces of the initial shape
// to find the faces concerned by the rib
Standard_Boolean falseside = Standard_True;
Sliding = Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Controle si on a ce qu`il faut pour avoir la matiere du bon cote
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
#ifdef DEB
cout << "Verify plane and wire orientation" << endl;
@ -415,7 +415,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
// ---Generation du profile de base de la nervure
// ---Generation of the base of the rib profile
TopoDS_Wire w;
BB.MakeWire(w);
@ -423,10 +423,10 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Vertex theFV;
thePreviousEdge.Nullify();
// compteur du nombre d`edges pour remplir la map
// calculate the number of edges to fill the map
Standard_Integer counter = 1;
// ---cas de glissement
// ---case of sliding
if(Sliding && !myListOfEdges.IsEmpty()) {
BRepTools_WireExplorer EX1(myWire);
for(; EX1.More(); EX1.Next()) {
@ -480,7 +480,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
}
// Cas plusieurs edges
// Case of several edges
if(!FirstEdge.IsSame(LastEdge)) {
for(; EX1.More(); EX1.Next()) {
const TopoDS_Edge& E = EX1.Current();
@ -698,8 +698,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
mySlface = SlidMap;
}
// ---Arguments de LocOpe_LinearForm : arguments du prism
// glissement
// ---Arguments of LocOpe_LinearForm : arguments of the prism sliding
if(Sliding) {
TopoDS_Face F;
BB.MakeFace(F, myPln, myTol);
@ -711,7 +710,7 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
// ---Cas sans glissement : construction de la face profil
// ---Case without sliding : construction of the profile face
if(!Sliding) {
#ifdef DEB
if (trc) {
@ -737,11 +736,11 @@ void BRepFeat_MakeLinearForm::Init(const TopoDS_Shape& Sbase,
}
// ---Propagation sur les faces du shape initial
// pour trouver les faces concernees par la nervure
// ---Propagation on faces of the initial shape
// to find the faces concerned by the rib
Standard_Boolean falseside = Standard_True;
Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Controle si on a ce qu`il faut pour avoir la matiere du bon cote
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
#ifdef DEB
cout << "Verify plane and wire orientation" << endl;
@ -825,7 +824,7 @@ void BRepFeat_MakeLinearForm::Add(const TopoDS_Edge& E,
//=======================================================================
//function : Perform
//purpose : construction de nervure a partir d'un profile et du shape init
//purpose : construction of rib from a profile and the initial shape
//=======================================================================
void BRepFeat_MakeLinearForm::Perform()
@ -864,11 +863,11 @@ void BRepFeat_MakeLinearForm::Perform()
else
theForm.Perform(myPbase, V, myDir1, myFirstPnt, myLastPnt);
TopoDS_Shape VraiForm = theForm.Shape(); // primitive de la nervure
TopoDS_Shape VraiForm = theForm.Shape(); // primitive of the rib
myFacesForDraft.Append(theForm.FirstShape());
myFacesForDraft.Append(theForm.LastShape());
MajMap(myPbase,theForm,myMap,myFShape,myLShape); // gestion de descendants
MajMap(myPbase,theForm,myMap,myFShape,myLShape); // management of descendants
TopExp_Explorer exx(myPbase, TopAbs_EDGE);
for(; exx.More(); exx.Next()) {
@ -884,7 +883,7 @@ void BRepFeat_MakeLinearForm::Perform()
}
myGShape = VraiForm;
SetGluedFaces(mySlface, theForm, myGluedF); // gestion des faces de glissement
SetGluedFaces(mySlface, theForm, myGluedF); // management of sliding faces
if(!myGluedF.IsEmpty() && !mySUntil.IsNull()) {
#ifdef DEB
@ -937,8 +936,8 @@ void BRepFeat_MakeLinearForm::Perform()
//=======================================================================
//function : Propagate
//purpose : propagation sur les faces du shape initial, recherche
// des faces concernees par la nervure
//purpose : propagation on faces of the initial shape, find
// faces concerned by the rib
//=======================================================================
Standard_Boolean BRepFeat_MakeLinearForm::Propagate(TopTools_ListOfShape& SliList,
const TopoDS_Face& fac,
@ -1013,7 +1012,7 @@ void BRepFeat_MakeLinearForm::Perform()
myListOfEdges.Clear();
myListOfEdges.Append(eb);
// Les deux points sont sur la meme face.
// two points are on the same face.
if(LastOK && FirstOK) {
return result;
}
@ -1040,7 +1039,7 @@ void BRepFeat_MakeLinearForm::Perform()
tvp=t1;
}
// retrouver l'edge connexe a v1 ou v2:
// find edge connected to v1 or v2:
for (ex.Init(CurrentFace, TopAbs_EDGE); ex.More(); ex.Next()) {
const TopoDS_Edge& rfe = TopoDS::Edge(ex.Current());
@ -1058,8 +1057,8 @@ void BRepFeat_MakeLinearForm::Perform()
if (index != 0) {
if (dist2min <= BRep_Tool::Tolerance(rfe) * BRep_Tool::Tolerance(rfe)) {
FirstEdge = rfe;
// Si l'edge n'est pas perpendiculaire au plan de la nervure il
// faut mettre Sliding(result) a faux.
// If the edge is not perpendicular to the plane of the rib
// it is required to set Sliding(result) to false.
if (result) {
result=Standard_False;
ve1 = TopExp::FirstVertex(rfe,Standard_True);
@ -1146,7 +1145,7 @@ void BRepFeat_MakeLinearForm::Perform()
}
}
else {
// on arrive pas a chainer la section
// end by chaining the section
return Standard_False;
}
// #ifdef DEB
@ -1167,7 +1166,7 @@ void BRepFeat_MakeLinearForm::Perform()
//=======================================================================
//function : MajMap
//purpose : gestion de descendants
//purpose : management of descendants
//=======================================================================
static void MajMap(const TopoDS_Shape& theB,
@ -1211,14 +1210,14 @@ static void MajMap(const TopoDS_Shape& theB,
//=======================================================================
//function : SetGluedFaces
//purpose : gestion des faces de collage
//purpose : management of faces of gluing
//=======================================================================
static void SetGluedFaces(const TopTools_DataMapOfShapeListOfShape& theSlmap,
LocOpe_LinearForm& thePrism,
TopTools_DataMapOfShapeShape& theMap)
{
// Glissements
// Slidings
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
if(!theSlmap.IsEmpty()) {
for (; itm.More(); itm.Next()) {

View File

@ -131,7 +131,7 @@ void BRepFeat_MakePipe::Init(const TopoDS_Shape& Sbase,
//=======================================================================
//function : Add
//purpose : add faces de collage
//purpose : add faces of gluing
//=======================================================================
void BRepFeat_MakePipe::Add(const TopoDS_Edge& E,
@ -245,7 +245,7 @@ void BRepFeat_MakePipe::Perform()
//=======================================================================
//function : Perform
//purpose : jusqu'au shape Until
//purpose : till shape Until
//=======================================================================
void BRepFeat_MakePipe::Perform(const TopoDS_Shape& Until)
@ -289,7 +289,7 @@ void BRepFeat_MakePipe::Perform(const TopoDS_Shape& Until)
//=======================================================================
//function : Perform
//purpose : entre From et Until
//purpose : between From and Until
//=======================================================================
void BRepFeat_MakePipe::Perform(const TopoDS_Shape& From,
@ -350,7 +350,7 @@ void BRepFeat_MakePipe::Perform(const TopoDS_Shape& From,
//=======================================================================
//function : Curves
//purpose : courbes paralleles au wire-generarice du pipe
//purpose : curves parallel to the generating wire of the pipe
//=======================================================================
void BRepFeat_MakePipe::Curves(TColGeom_SequenceOfCurve& scur)
@ -360,7 +360,7 @@ void BRepFeat_MakePipe::Curves(TColGeom_SequenceOfCurve& scur)
//=======================================================================
//function : BarycCurve
//purpose : passe par le centre des masses
//purpose : pass through the center of mass
//=======================================================================
Handle(Geom_Curve) BRepFeat_MakePipe::BarycCurve()
@ -371,7 +371,7 @@ Handle(Geom_Curve) BRepFeat_MakePipe::BarycCurve()
//=======================================================================
//function : SetGluedFaces
//purpose : gestion des faces de collage et glissement
//purpose : management of faces of gluing and sliding
//=======================================================================
static void SetGluedFaces(const TopoDS_Face& theSkface,
@ -403,7 +403,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
}
}
// Glissements
// Sliding
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
if(!theSlmap.IsEmpty()) {
for (; itm.More(); itm.Next()) {
@ -427,7 +427,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
//=======================================================================
//function : MajMap
//purpose : gestion de descendants
//purpose : management of descendants
//=======================================================================
static void MajMap(const TopoDS_Shape& theB,

View File

@ -178,7 +178,7 @@ void BRepFeat_MakePrism::Init(const TopoDS_Shape& Sbase,
//=======================================================================
//function : Add
//purpose : add elements de glissemant (edge sur face)
//purpose : add elements of sliding (edge on face)
//=======================================================================
void BRepFeat_MakePrism::Add(const TopoDS_Edge& E,
@ -225,8 +225,8 @@ void BRepFeat_MakePrism::Add(const TopoDS_Edge& E,
//=======================================================================
//function : Perform
//purpose : construction du prism de longueur Length et
// appel de reconstruction topo
//purpose : construction of prism of length Length and
// call of reconstruction topo
//=======================================================================
void BRepFeat_MakePrism::Perform(const Standard_Real Length)
@ -244,24 +244,24 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length)
PerfSelectionValid();
gp_Vec V(Length*myDir);
//construction de prism de hauteur Length
//construction of prism of height Length
LocOpe_Prism thePrism(myPbase,V);
TopoDS_Shape VraiPrism = thePrism.Shape();
// gestion des descendants
// management of descendants
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
myGShape = VraiPrism; // la primitive
myGShape = VraiPrism; // the primitive
GeneratedShapeValid();
TopoDS_Face FFace;
Standard_Boolean found = Standard_False;
// essai de detecter des faces de collage
//cas le top du prism est tgt au shape initial
// try to detect the faces of gluing
// in case if the top of the prism is tangent to the initial shape
if(!mySkface.IsNull() || !mySlface.IsEmpty()) {
if(myLShape.ShapeType() == TopAbs_WIRE) {
@ -291,20 +291,20 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length)
}
}
// gestion des faces de collage donnees par l'utilisateur
// management of faces of gluing given by the user
// SetGluedFaces(mySkface, mySbase, myPbase, mySlface, thePrism, myGluedF);
GluedFacesValid();
// VerifGluedFaces(mySkface, myPbase, myBCurve, myCurves, thePrism, myGluedF);
if(!myGluedF.IsEmpty()) { // cas collage
if(!myGluedF.IsEmpty()) { // case gluing
myJustGluer = Standard_True;
thePrism.Curves(myCurves);
myBCurve = thePrism.BarycCurve();
GlobalPerform(); // reconstruction topologique
GlobalPerform(); // topological reconstruction
}
// si il n'y a pas de collage -> appel des ope topo
// if there is no gluing -> call of ope topo
if(!myJustGluer) {
if(myFuse == 1 && !myJustFeat) {
//modified by NIZNHY-PKV Thu Mar 21 17:55:30 2002 f
@ -338,8 +338,8 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length)
//=======================================================================
//function : Perform
//purpose : construction de prism oriente vers la face Until, suffisemment
// long; appel de reconstruction topo
//purpose : construction of prism oriented at the face Until, sufficiently
// long; call of topological reconstruction
//=======================================================================
void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
@ -368,11 +368,11 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil);
gp_Vec V(2*sens*Height*myDir);
// construction du prism long
// construction of long prism
LocOpe_Prism thePrism(myPbase,V);
TopoDS_Shape VraiPrism = thePrism.Shape();
// dans le cas de support de face Until
// in case of support of face Until
if(!Trf) {
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
myGShape = VraiPrism;
@ -386,13 +386,13 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
myBCurve = thePrism.BarycCurve();
GlobalPerform();
}
else { // until support -> passage en ope topo
else { // until support -> passage to topological operations
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
TColGeom_SequenceOfCurve scur;
scur.Clear();
scur.Append(C);
// sens du prism en fonction de Until
// direction of the prism depending on Until
LocOpe_CSIntersector ASI(mySUntil);
ASI.Perform(scur);
@ -447,7 +447,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
}
}
}
/* // boucle de controle de descendance
/* // loop of control of descendance
TopExp_Explorer expr(mySbase, TopAbs_FACE);
char nom1[20], nom2[20];
@ -487,8 +487,8 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
//=======================================================================
//function : Perform
//purpose : construction d'un prisme suffisemment long et bien oriente
// appel de reconstruction topo
//purpose : construction of a sufficiently long and properly oriented prism
// call of topological reconstruction
//=======================================================================
void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
@ -539,12 +539,12 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
return;
}
// longueur en fonction des boites englobantes
// length depending on bounding boxes
Standard_Real Height = HeightMax(mySbase, mySkface, mySFrom, mySUntil);
Handle(Geom_Curve) C = TestCurve(myPbase,myDir);
Standard_Integer sens; // sens de prism
Standard_Integer tran; // transfert de prism
Standard_Integer sens; // direction of prism
Standard_Integer tran; // transfer of prism
if(From.IsSame(Until)) {
sens = 1;
tran = -1;
@ -578,7 +578,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
myBCurve = thePrism.BarycCurve();
GlobalPerform();
}
else { // cas until support -> ope topo
else { // case until support -> topological operation
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
TColGeom_SequenceOfCurve scur;
scur.Clear();
@ -668,7 +668,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
Done();
}
}
// controle historique
// control history
/*
TopExp_Explorer expr(mySbase, TopAbs_FACE);
char nom1[20], nom2[20];
@ -709,7 +709,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
//=======================================================================
//function : PerformUntilEnd
//purpose : construction d'un prism et reconstruction
//purpose : construction of a prism and reconstruction
//=======================================================================
void BRepFeat_MakePrism::PerformUntilEnd()
@ -797,7 +797,7 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until)
LocOpe_Prism thePrism(myPbase,Vect,Vtra);
TopoDS_Shape VraiPrism = thePrism.Shape();
if(!Trf) { // cas face until
if(!Trf) { // case face until
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
myGShape = VraiPrism;
GeneratedShapeValid();
@ -807,7 +807,7 @@ void BRepFeat_MakePrism::PerformFromEnd(const TopoDS_Shape& Until)
myBCurve = thePrism.BarycCurve();
GlobalPerform();
}
else { // cas support
else { // case support
MajMap(myPbase,thePrism,myMap,myFShape,myLShape);
TColGeom_SequenceOfCurve scur;
scur.Clear();
@ -1075,7 +1075,7 @@ void BRepFeat_MakePrism::PerformUntilHeight(const TopoDS_Shape& Until,
//=======================================================================
//function : Curves
//purpose : sequence de courbes paralleles a l'axe de prism
//purpose : sequence of curves parallel to the axis of prism
//=======================================================================
void BRepFeat_MakePrism::Curves(TColGeom_SequenceOfCurve& scur)
@ -1085,8 +1085,8 @@ void BRepFeat_MakePrism::Curves(TColGeom_SequenceOfCurve& scur)
//=======================================================================
//function : BarycCurve
//purpose : courbe parallele a l'axe du prisme passant par le centre des
// masses
//purpose : curve parallel to the axis of the prism passing through the center
// of masses
//=======================================================================
Handle(Geom_Curve) BRepFeat_MakePrism::BarycCurve()
@ -1097,8 +1097,8 @@ Handle(Geom_Curve) BRepFeat_MakePrism::BarycCurve()
//=======================================================================
//function : HeightMax
//purpose : Calcul de la hauteur du prisme selon les parametres de
// boite englobante
//purpose : Calculate the height of the prism following the parameters of
// bounding box
//=======================================================================
static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
@ -1167,7 +1167,7 @@ static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
//=======================================================================
//function : SensOfPrism
//purpose : sens de prism en fonction du shape Until
//purpose : Direction of the prism depending on the shape Until
//=======================================================================
Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
const TopoDS_Shape& Until)
@ -1193,7 +1193,7 @@ Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
//=======================================================================
//function : SetGluedFaces
//purpose : gestion de faces de collage
//purpose : management of gluing faces
//=======================================================================
static void SetGluedFaces(const TopoDS_Face& theSkface,
@ -1224,7 +1224,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
}
}
// Glissements
// Sliding
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
if(!theSlmap.IsEmpty()) {
for (; itm.More(); itm.Next()) {
@ -1248,8 +1248,8 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
//=======================================================================
//function : VerifGluedFaces
//purpose : Verification intersection Outil/theSkface = thePbase
// Si oui -> OK si non -> cas sans collage
//purpose : Verification intersection Tool/theSkface = thePbase
// If yes -> OK otherwise -> case without gluing
//=======================================================================
#ifdef DEB
static void VerifGluedFaces(const TopoDS_Face& theSkface,
@ -1301,7 +1301,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
if (!GluedFaces) {
#ifdef DEB
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << " Intersection Prism/skface : pas de collage" << endl;
if (trc) cout << " Intersection Prism/skface : no gluing" << endl;
#endif
theMap.Clear();
}
@ -1311,7 +1311,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
//=======================================================================
//function : MajMap
//purpose : gestion des descendants
//purpose : management of descendants
//=======================================================================
static void MajMap(const TopoDS_Shape& theB,
@ -1352,7 +1352,7 @@ static void MajMap(const TopoDS_Shape& theB,
//=======================================================================
//function : MajMap
//purpose : gestion des descendants
//purpose : management of descendants
//=======================================================================
static Handle(Geom_Curve) TestCurve(const TopoDS_Shape& Base,
@ -1376,7 +1376,7 @@ static Handle(Geom_Curve) TestCurve(const TopoDS_Shape& Base,
//=======================================================================
//function : ToFuse
//purpose : face SameDomaine ou pas
//purpose : face SameDomaine or not
//=======================================================================
Standard_Boolean ToFuse(const TopoDS_Face& F1,
@ -1415,7 +1415,7 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1,
Standard_Boolean ValRet = Standard_False;
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
S1 = BRep_Tool::Surface(F1); // pour appliquer la location.
S1 = BRep_Tool::Surface(F1); // to apply the location.
S2 = BRep_Tool::Surface(F2);
gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());

View File

@ -166,7 +166,7 @@ void BRepFeat_MakeRevol::Init(const TopoDS_Shape& Sbase,
//=======================================================================
//function : Add
//purpose : add faces et edges de glissement
//purpose : add faces add edges of sliding
//=======================================================================
void BRepFeat_MakeRevol::Add(const TopoDS_Edge& E,
@ -342,7 +342,7 @@ void BRepFeat_MakeRevol::Perform(const Standard_Real Angle)
//=======================================================================
//function : Perform
//purpose : feature jusqu'au shape Until
//purpose : feature till shape Until
//=======================================================================
void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
@ -374,13 +374,13 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
Standard_Boolean Trf = TransformShapeFU(1);
ShapeUntilValid();
// On fait systematiquement un revol quasi-complet
// BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular());
// Do systematically almost complete revolution
// BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular());
LocOpe_Revol theRevol;
if(!TourComplet) {
Angle = 2.*PI- 3*PI/180.;
#ifdef DEB
if (trc) cout << " No complete Revol" << endl;
if (trc) cout << " No complete Revolution" << endl;
#endif
}
theRevol.Perform(myPbase, myAxis, Angle);
@ -471,7 +471,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
}
}
}
// boucle de controle de descendance
// Loop of control of descendance
/*
TopExp_Explorer expr(mySbase, TopAbs_FACE);
char nom1[20], nom2[20];
@ -511,7 +511,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& Until)
//=======================================================================
//function : Perform
//purpose : feature limitee par les deux shapes
//purpose : feature limited by two shapes
//=======================================================================
void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From,
@ -680,7 +680,7 @@ void BRepFeat_MakeRevol::Perform(const TopoDS_Shape& From,
//=======================================================================
//function : PerformThruAll
//purpose : feature a travers tout le shape initial
//purpose : feature throughout the initial shape
//=======================================================================
void BRepFeat_MakeRevol::PerformThruAll()
@ -694,7 +694,7 @@ void BRepFeat_MakeRevol::PerformThruAll()
//=======================================================================
//function : PerformUntilAngle
//purpose : feature jusqu'au shape Until definie avec l'angle
//purpose : feature till shape Until defined with the angle
//=======================================================================
void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
@ -727,7 +727,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
Standard_Boolean Trf = TransformShapeFU(1);
ShapeUntilValid();
// On fait systematiquement un revol quasi-complet
// Produce systematicallt an almost complete revolution
// BRepSweep_Revol theRevol(myPbase,myAxis,2.*PI-10.*Precision::Angular());
LocOpe_Revol theRevol;
theRevol.Perform(myPbase, myAxis, Angle);
@ -821,7 +821,7 @@ void BRepFeat_MakeRevol::PerformUntilAngle(const TopoDS_Shape& Until,
}
//=======================================================================
//function : Curves
//purpose : cercles parallels a la generatrice du revol
//purpose : circles parallel to the generating edge of revolution
//=======================================================================
void BRepFeat_MakeRevol::Curves(TColGeom_SequenceOfCurve& scur)
@ -831,7 +831,7 @@ void BRepFeat_MakeRevol::Curves(TColGeom_SequenceOfCurve& scur)
//=======================================================================
//function : BarycCurve
//purpose : passe par le centre des masses de la primitive
//purpose : pass through the center of mass of the primitive
//=======================================================================
Handle(Geom_Curve) BRepFeat_MakeRevol::BarycCurve()
@ -842,7 +842,7 @@ Handle(Geom_Curve) BRepFeat_MakeRevol::BarycCurve()
//=======================================================================
//function : SetGluedFaces
//purpose : gestion des faces de collage
//purpose : management of gluing faces
//=======================================================================
static void SetGluedFaces(const TopoDS_Face& theSkface,
@ -874,7 +874,7 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
}
}
// Glissements
// Sliding
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
if(!theSlmap.IsEmpty()) {
for (; itm.More(); itm.Next()) {
@ -897,8 +897,8 @@ static void SetGluedFaces(const TopoDS_Face& theSkface,
//=======================================================================
//function : VerifGluedFaces
//purpose : Verification intersection Outil/theSkface = thePbase
// Si oui -> OK si non -> cas sans collage
//purpose : Check intersection Tool/theSkface = thePbase
// if yes -> OK otherwise -> case without gluing
//=======================================================================
static void VerifGluedFaces(const TopoDS_Face& theSkface,
@ -950,7 +950,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
if (!GluedFaces) {
#ifdef DEB
Standard_Boolean trc = BRepFeat_GettraceFEAT();
if (trc) cout << " Intersection Revol/skface : pas de collage" << endl;
if (trc) cout << " Intersection Revol/skface : no gluing" << endl;
#endif
theMap.Clear();
}
@ -959,7 +959,7 @@ static void VerifGluedFaces(const TopoDS_Face& theSkface,
//=======================================================================
//function : MajMap
//purpose : gestion de descendants
//purpose : management of descendants
//=======================================================================
static void MajMap(const TopoDS_Shape& theB,
@ -1001,7 +1001,7 @@ static void MajMap(const TopoDS_Shape& theB,
//=======================================================================
//function : ToFuse
//purpose : deux faces samedomaine ou pas
//purpose : two faces samedomaine or not
//=======================================================================
Standard_Boolean ToFuse(const TopoDS_Face& F1,
@ -1040,7 +1040,7 @@ Standard_Boolean ToFuse(const TopoDS_Face& F1,
Standard_Boolean ValRet = Standard_False;
if (typS1 == STANDARD_TYPE(Geom_Plane)) {
S1 = BRep_Tool::Surface(F1); // pour appliquer la location.
S1 = BRep_Tool::Surface(F1); // to apply the location.
S2 = BRep_Tool::Surface(F2);
gp_Pln pl1( (*((Handle(Geom_Plane)*)&S1))->Pln());
gp_Pln pl2( (*((Handle(Geom_Plane)*)&S2))->Pln());

View File

@ -160,8 +160,8 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
Standard_Boolean RevolRib = Standard_True;
Done();
// modify = 0 si on ne veut pas faire de glissement
// = 1 si on veut essayer de faire un glissement
// modify = 0 if it is not required to make sliding
// = 1 if it is intended to try to make sliding
Standard_Boolean Sliding = Modify;
myAxe = Axis;
@ -243,7 +243,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
#endif
// ---Determination Tolerance : tolerance max sur les parametres
// ---Determination Tolerance : tolerance max on parameters
myTol = Precision::Confusion();
exx.Init(W, TopAbs_VERTEX);
@ -274,7 +274,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
myFShape.Nullify();
myLShape.Nullify();
// ---Calcul boite englobante
// ---Calculate bounding box
BRep_Builder BB;
TopTools_ListOfShape theList;
@ -289,7 +289,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Solid BndBox = Bndbox.Solid();
// ---Construction de la face plan de travail (section boite englobante)
// ---Construction of the working plane face (section bounding box)
BRepLib_MakeFace PlaneF(myPln->Pln(), -6.*myBnd,
6.*myBnd, -6.*myBnd, 6.*myBnd);
TopoDS_Face PlaneFace = TopoDS::Face(PlaneF.Shape());
@ -306,7 +306,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Face BndFace = TopoDS::Face(Bndface.Shape());
// ---Recherche des faces d'appui de la nervure
// ---Find base faces of the rib
TopoDS_Edge FirstEdge, LastEdge;
TopoDS_Face FirstFace, LastFace;
TopoDS_Vertex FirstVertex, LastVertex;
@ -335,23 +335,23 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
// ---Point detrompeur pour le cote du wire a remplir - cote matiere
// ---Proofing Point for the side of the wire to be filled - material side
gp_Pnt CheckPnt = CheckPoint(FirstEdge, bnd/10., myPln);
// Standard_Real f, l;
// ---Controle glissement valable
// Plein de cas ou on sort du glissement
Standard_Integer Concavite = 3; // a priori le profile n'est pas concave
// ---Control sliding valid
// Many cases when the sliding is abandoned
Standard_Integer Concavite = 3; // a priori the profile is not concave
myFirstPnt = BRep_Tool::Pnt(FirstVertex);
myLastPnt = BRep_Tool::Pnt(LastVertex);
// SliList : liste des faces concernees par la nervure
// SliList : list of faces concerned by the rib
TopTools_ListOfShape SliList;
SliList.Append(FirstFace);
if(Sliding) { // glissement
if(Sliding) { // sliding
#ifdef DEB
if (trc) cout << " Sliding" << endl;
#endif
@ -368,7 +368,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
Sliding = Standard_False;
}
if(Sliding) { // glissement
if(Sliding) { // sliding
Handle(Geom_Surface) ss = BRep_Tool::Surface(LastFace);
if (ss->DynamicType() ==
STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
@ -382,15 +382,14 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
Sliding = Standard_False;
}
// Controle uniquement points de depart et d'arrivee
// -> pas de controle au milieu - a ameliorer
// Si on faisait un controle entre Surface et sgement entre les 2 points limite
// -> tres cher - a ameliorer
// Control only start and end points no control at the middle to improve
// If make a control between Surface and segment 2 points limited
// -> too expensive - to improve
//gp_Pnt FirstCenter, LastCenter;
gp_Circ FirstCircle, LastCircle;
Handle(Geom_Curve) FirstCrv, LastCrv;
if(Sliding) { // glissement
if(Sliding) { // sliding
GeomAPI_ProjectPointOnCurve proj(myFirstPnt, Line);
if(proj.NbPoints() < 1) {
#ifdef DEB
@ -450,7 +449,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
Sliding = Standard_False;
}
if(Sliding && !PtOnLastEdge) {
BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : courbes et surfaces
BRepExtrema_ExtCF ext2(ee2, LastFace); // ExtCF : curves and surfaces
if(ext2.NbExt() < 1 || ext2.SquareDistance(1) > Precision::Confusion() * Precision::Confusion())
Sliding = Standard_False;
}
@ -507,13 +506,13 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
// On construit un gros profil qui va jusqu`a la boite englobante
// -> par tangence avec premier et dernier edge du Wire
// -> par normales aux faces d'appui : statistiquement meilleur
// On intersecte le tout pour trouver le profil final
// Construct a great profile that goes till the bounding box
// -> by tangency with first and last edge of the Wire
// -> by normals to base faces : statistically better
// Intersect everythin to find the final profile
// ---cas de glissement : construction de la face profil
// ---case of sliding : construction of the face profile
if(Sliding) {
#ifdef DEB
if (trc) cout << " still Sliding" << endl;
@ -535,11 +534,11 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
// ---Propagation sur les faces du shape initial
// pour trouver les faces concernees par la nervure
// ---Propagation on faces of the initial shape
// to find the faces concerned by the rib
Standard_Boolean falseside = Standard_True;
Sliding = Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Controle si on a ce qu`il faut pour avoir la matiere du bon cote
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
#ifdef DEB
cout << " Verify plane and wire orientation" << endl;
@ -551,7 +550,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
// ---Generation du profile de base de la nervure
// ---Generation of the base profile of the rib
TopoDS_Wire w;
BB.MakeWire(w);
@ -559,10 +558,10 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
TopoDS_Vertex theFV;
thePreviousEdge.Nullify();
// compteur du nombre d`edges pour remplir la map
// counter of the number of edges to fill the map
Standard_Integer counter = 1;
// ---cas de glissement
// ---case of sliding
if(Sliding && !myListOfEdges.IsEmpty()) {
BRepTools_WireExplorer EX1(myWire);
for(; EX1.More(); EX1.Next()) {
@ -615,7 +614,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
}
// Cas plusieurs edges
// Case of several edges
if(!FirstEdge.IsSame(LastEdge)) {
for(; EX1.More(); EX1.Next()) {
const TopoDS_Edge& E = EX1.Current();
@ -829,8 +828,8 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
mySlface = SlidMap;
}
// ---Arguments de LocOpe_LinearForm : arguments du prism
// glissement
// ---Arguments of LocOpe_LinearForm : arguments of the prism
// sliding
if(Sliding) {
TopoDS_Face F;
BB.MakeFace(F, myPln, myTol);
@ -841,7 +840,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
// ---Cas sans glissement : construction de la face profil
// ---Case without sliding : construction of the face profile
if(!Sliding) {
#ifdef DEB
if (trc) {
@ -969,11 +968,11 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
}
// ---Propagation sur les faces du shape initial
// pour trouver les faces concernees par la nervure
// ---Propagation on the faces of the initial shape
// to find the faces concerned by the rib
Standard_Boolean falseside = Standard_True;
Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Controle si on a ce qu`il faut pour avoir la matiere du bon cote
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
#ifdef DEB
cout << " Verify plane and wire orientation" << endl;
@ -1017,7 +1016,7 @@ void BRepFeat_MakeRevolutionForm::Init(const TopoDS_Shape& Sbase,
//=======================================================================
//function : Add
//purpose : add elements de collage
//purpose : add elements of gluing
//=======================================================================
void BRepFeat_MakeRevolutionForm::Add(const TopoDS_Edge& E,
@ -1125,16 +1124,16 @@ void BRepFeat_MakeRevolutionForm::Perform()
}
myPbase = Pbase;
trsf.Perform(mySkface, Standard_False);
// flo : verif si il faut bien reaffecter le champ mySkface
// flo : check if it is required to reattributr the field mySkface
// TopoDS_Face mySkface = TopoDS::Face(trsf.Shape());
mySkface = TopoDS::Face(trsf.Shape());
}
LocOpe_RevolutionForm theForm;
theForm.Perform(myPbase, myAxe, (myAngle1+myAngle2));
TopoDS_Shape VraiForm = theForm.Shape(); // la primitive non-coupe
TopoDS_Shape VraiForm = theForm.Shape(); // uncut primitive
// gestion de descendants
// management of descendants
MajMap(myPbase,theForm,myMap,myFShape,myLShape);
myGluedF.Clear();
@ -1198,7 +1197,7 @@ void BRepFeat_MakeRevolutionForm::Perform()
// coupe de la nervure par deux plans parallels
TopTools_DataMapOfShapeListOfShape SlidingMap;
// gestion de descendants
// management of descendants
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it1;
it1.Initialize(myMap);
@ -1252,10 +1251,10 @@ void BRepFeat_MakeRevolutionForm::Perform()
}
// gestion des faces de glissement
// gestion of faces of sliding
SetGluedFaces(mySlface, theForm, SlidingMap, myGluedF);
VraiForm = trP.Shape(); // primitive coupee
VraiForm = trP.Shape(); // primitive cut
if(!myGluedF.IsEmpty())
myPerfSelection = BRepFeat_NoSelection;
@ -1287,14 +1286,14 @@ void BRepFeat_MakeRevolutionForm::Perform()
return;
}
LFPerform(); // reconstruction topologique
LFPerform(); // topological reconstruction
}
//=======================================================================
//function : Propagate
//purpose : propagation sur les faces du shape inital, rechrche des faces
// concernees par la nervure
//purpose : propagation on the faces of the inital shape, find faces
// concerned by the rib
//=======================================================================
Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& SliList,
@ -1496,7 +1495,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
TopoDS_Vertex Vpreprevious; Vpreprevious.Nullify();
while(!FirstOK) {
// retrouver l'edge connexe a v1:
// find edge connected to v1:
gp_Pnt pt;
if(!v1.IsNull()) pt= BRep_Tool::Pnt(v1);
gp_Pnt ptprev;
@ -1600,7 +1599,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
Vpreprevious.Nullify();
while(!LastOK) {
// retrouver l'edge connexe a v2:
// find edge connected to v2:
gp_Pnt pt;
if(!v2.IsNull()) pt= BRep_Tool::Pnt(v2);
gp_Pnt ptprev;
@ -1700,7 +1699,7 @@ Standard_Boolean BRepFeat_MakeRevolutionForm::Propagate(TopTools_ListOfShape& Sl
//=======================================================================
//function : MajMap
//purpose : gestion de descendants
//purpose : management of descendants
//=======================================================================
static void MajMap(const TopoDS_Shape& theB,
@ -1747,7 +1746,7 @@ static void MajMap(const TopoDS_Shape& theB,
//=======================================================================
//function : SetGluedFaces
//purpose : gestion des faces de glissement
//purpose : managemnet of sliding faces
//=======================================================================
static void SetGluedFaces(const TopTools_DataMapOfShapeListOfShape& theSlmap,
@ -1755,7 +1754,7 @@ static void SetGluedFaces(const TopTools_DataMapOfShapeListOfShape& theSlmap,
const TopTools_DataMapOfShapeListOfShape& SlidingMap,
TopTools_DataMapOfShapeShape& theMap)
{
// Glissements
// Slidings
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
if(!theSlmap.IsEmpty()) {
for (; itm.More(); itm.Next()) {

View File

@ -99,7 +99,7 @@ Standard_IMPORT Standard_Boolean BRepFeat_GettraceFEATRIB();
//=======================================================================
//function : LFPerform
//purpose : reconstruction topologique des nervures
//purpose : topological reconstruction of ribs
//=======================================================================
void BRepFeat_RibSlot::LFPerform()
@ -127,7 +127,7 @@ void BRepFeat_RibSlot::LFPerform()
}
Standard_Boolean ChangeOpe = Standard_False;
// On espere qu`il n`y a qu`un solide dans le resultat
// Hope that there is just a solid in the result
Standard_Boolean UntilInShape = Standard_False;
TopTools_MapOfShape M;
@ -174,7 +174,7 @@ void BRepFeat_RibSlot::LFPerform()
LocOpe_Gluer theGlue;
//cas de collage
//case of gluing
if (theOpe == 1) {
Standard_Boolean Collage = Standard_True;
@ -216,12 +216,12 @@ void BRepFeat_RibSlot::LFPerform()
theOpe = 2;
ChangeOpe = Standard_True;
#ifdef DEB
cout << "Passage en ope. topologique" << endl;
cout << "Passage to topological operations" << endl;
#endif
}
}
// collage est toujours applicable
// gluing is always applicable
if (theOpe == 1) {
theGlue.Perform();
@ -232,7 +232,7 @@ void BRepFeat_RibSlot::LFPerform()
//TopTools_ListIteratorOfListOfShape itt1;
if (!LShape.IsEmpty()) {
LocOpe_Builder theTOpe(theGlue.ResultingShape());
// On utilise LTool en temporaire
// Use of LTool is temporary
for (it2.Initialize(LShape);it2.More();it2.Next()) {
const TopTools_ListOfShape& ldf = myMap(it2.Value());
if (ldf.Extent() == 1 && ldf.First().IsSame(it2.Value())) {
@ -318,7 +318,7 @@ void BRepFeat_RibSlot::LFPerform()
theOpe = 2;
ChangeOpe = Standard_True;
#ifdef DEB
cout << "Passage en ope. topologique" << endl;
cout << "Passage to. topologic operation" << endl;
#endif
}
@ -340,16 +340,16 @@ void BRepFeat_RibSlot::LFPerform()
theOpe = 2;
ChangeOpe = Standard_True;
#ifdef DEB
cout << "Passage en ope. topologique" << endl;
cout << "Passage to topologic operation" << endl;
#endif
}
}
// cas sans collage
// case without gluing
if (theOpe == 2) {
// Attention si echec de collage, myGShape avec collage n'est pas correct
// Attention, if gluing fails, myGShape with gluing is not correct
if (ChangeOpe) {
myStatusError = BRepFeat_NoGluer;
NotDone();
@ -504,7 +504,7 @@ void BRepFeat_RibSlot::LFPerform()
// myStatusError = BRepFeat_LocOpeNotDone;
// }
// else {
myStatusError = BRepFeat_LocOpeInvNotDone;// dernier recours (attention new et tangent edges)
myStatusError = BRepFeat_LocOpeInvNotDone;// last resort (attention to new and tangent edges)
#ifdef DEB
if (trc) cout << " Parts of Tool : direct Ope. Top." << endl;
#endif
@ -594,7 +594,7 @@ const TopTools_ListOfShape& BRepFeat_RibSlot::Generated
if(S.ShapeType() != TopAbs_FACE) {
myGenerated.Clear();
if(myLFMap.IsEmpty() || !myLFMap.IsBound(S)) {
if (myMap.IsBound(S)) { // voir si on filtre sur face ou pas
if (myMap.IsBound(S)) { // check if filter on face or not
static TopTools_ListOfShape list;
list.Clear();
TopTools_ListIteratorOfListOfShape ite(myMap(S));
@ -727,7 +727,7 @@ void BRepFeat_RibSlot::UpdateDescendants(const LocOpe_Gluer& G)
}
myMap.ChangeFind(orig).Clear();
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
// on verifie l`appartenance au shape...
// check the belonging to the shape...
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(itm.Key())) {
myMap.ChangeFind(orig).Append(itm.Key());
@ -812,7 +812,7 @@ BRepFeat_StatusError BRepFeat_RibSlot::CurrentStatusError() const
//=======================================================================
//function : CheckPoint
//purpose : point detrompeur cote matiere (cote d'extrusion)
//purpose : Proofing point material side (side of extrusion)
//=======================================================================
gp_Pnt BRepFeat_RibSlot::CheckPoint(const TopoDS_Edge& e,
@ -824,9 +824,9 @@ gp_Pnt BRepFeat_RibSlot::CheckPoint(const TopoDS_Edge& e,
Standard_Boolean trc = BRepFeat_GettraceFEATRIB();
if (trc) cout << "BRepFeat_RibSlot::CheckPoint" << endl;
#endif
// Produit vectoriel : normale au plan X direction Wire
// -> donne le cote matiere
// point detrompeur legerement a l'interieur cote matiere
// Vector product : normal to plane X direction Wire
// -> gives the material side
// Proofing point somewhat inside the material side
Standard_Real f, l;
Handle(Geom_Curve) cc = BRep_Tool::Curve(e, f, l);
@ -847,7 +847,7 @@ gp_Pnt BRepFeat_RibSlot::CheckPoint(const TopoDS_Edge& e,
//=======================================================================
//function : Normal
//purpose : calcul de la normale a une face dans un point
//purpose : calculate the normal to a face in a point
//=======================================================================
gp_Dir BRepFeat_RibSlot::Normal(const TopoDS_Face& F,const gp_Pnt& P)
@ -894,7 +894,7 @@ gp_Dir BRepFeat_RibSlot::Normal(const TopoDS_Face& F,const gp_Pnt& P)
//=======================================================================
//function : IntPar
//purpose : calcul du parametre d'un point sur une courbe
//purpose : calculate the parameter of a point on a curve
//=======================================================================
Standard_Real BRepFeat_RibSlot::IntPar(const Handle(Geom_Curve)& C,
@ -933,7 +933,7 @@ Standard_Real BRepFeat_RibSlot::IntPar(const Handle(Geom_Curve)& C,
//=======================================================================
//function : EdgeExtention
//purpose : extention d'un edge en tangence
//purpose : extention of a edge by tangence
//=======================================================================
void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e,
@ -993,7 +993,7 @@ void BRepFeat_RibSlot::EdgeExtention(TopoDS_Edge& e,
//=======================================================================
//function : ChoiceOfFaces
//purpose : choix de la face d'appui dans le cas d'appui sur un edge
//purpose : choose face of support in case of support on an edge
//=======================================================================
TopoDS_Face BRepFeat_RibSlot::ChoiceOfFaces(TopTools_ListOfShape& faces,
@ -1053,7 +1053,7 @@ TopoDS_Face BRepFeat_RibSlot::ChoiceOfFaces(TopTools_ListOfShape& faces,
//=======================================================================
//function : HeightMax
//purpose : Calcul de la hauteur du prisme selon les parametres d`une boite englobante
//purpose : Calculate the height of the prism following the parameters of a bounding box
//=======================================================================
Standard_Real BRepFeat_RibSlot::HeightMax(const TopoDS_Shape& theSbase,
@ -1083,7 +1083,7 @@ Standard_Real BRepFeat_RibSlot::HeightMax(const TopoDS_Shape& theSbase,
//=======================================================================
//function : ExtremeFaces
//purpose : Calcul des faces d'appui de la nervure
//purpose : Calculate the base faces of the rib
//=======================================================================
Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
@ -1130,7 +1130,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
NumberOfEdges++;
}
// ---Le wire comporte 1 seul edge
// ---the wire includes only one edge
if(NumberOfEdges == 1) {
#ifdef DEB
if (trc) cout << " One Edge" << endl;
@ -1139,7 +1139,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
Standard_Real f, l;//, f1, l1, temp;
gp_Pnt firstpoint, lastpoint;
// Points limite de l`unique edge
// Points limit the unique edge
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
Handle(Geom_Curve) cc = BRep_Tool::Curve(E, f, l);
gp_Pnt p1 = BRep_Tool::Pnt(TopExp::FirstVertex(E,Standard_True));
@ -1148,8 +1148,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
Standard_Real FirstPar = f; Standard_Real LastPar = l;
// ---Recherche si les 2 points limites de l`unique edge du wire
// sont sur un edge ou un vertex du shape de base
// ---Find if 2 points limiting the unique edge of the wire
// are on an edge or a vertex of the base shape
Standard_Boolean PtOnFirstVertex = Standard_False;
Standard_Boolean PtOnLastVertex = Standard_False;
TopoDS_Vertex OnFirstVertex, OnLastVertex;
@ -1162,8 +1162,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
if(PtOnFirstEdge) {
if (!PtOnFirstVertex) {
// Recherche de FirstFace : face du shape de base contenant OnFirstEdge
// satisfaisant ChoiceOfFaces
// Find FirstFace : face of the base shape containing OnFirstEdge
// meeting ChoiceOfFaces
TopExp_Explorer ex4, ex5;
ex4.Init(mySbase, TopAbs_FACE);
TopTools_ListOfShape faces;
@ -1186,8 +1186,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
}
}
else if(PtOnFirstVertex) {
// Recherche de FirstFace : face du shape de base contenant OnFirstVertex
// satisfaisant ChoiceOfFaces
// Find FirstFace : face of the base shape containing OnFirstVertex
// meeting ChoiceOfFaces
TopExp_Explorer ex4, ex5;
ex4.Init(mySbase, TopAbs_FACE);
TopTools_ListOfShape faces;
@ -1218,8 +1218,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
if(PtOnLastEdge) {
if (!PtOnLastVertex) {
// Recherche de LastFace : face du shape de base contenant OnLastEdge
// satisfaisant ChoiceOfFaces
// Find LastFace : face of the base shape containing OnLastEdge
// meeting ChoiceOfFaces
TopExp_Explorer ex4, ex5;
ex4.Init(mySbase, TopAbs_FACE);
TopTools_ListOfShape faces;
@ -1243,8 +1243,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
}
}
else if(PtOnLastEdge && PtOnLastVertex) {
// Recherche de LastFace : face du shape de base contenant OnLastVertex
// satisfaisant ChoiceOfFaces
// Find LastFace : face of the base shape containing OnLastVertex
// meeting ChoiceOfFaces
TopExp_Explorer ex4, ex5;
ex4.Init(mySbase, TopAbs_FACE);
TopTools_ListOfShape faces;
@ -1277,7 +1277,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
return Standard_True;
}
//--- On n'a pas trouve FirstFace ou LastFace
//--- FirstFace or LastFace was not found
#ifdef DEB
if (trc) cout << " FirstFace or LastFace null" << endl;
#endif
@ -1354,7 +1354,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
return Data;
}
// ---Le wire comporte plusieurs edges
// ---The wire consists of several edges
else {
#ifdef DEB
if (trc) cout << " Multiple Edges" << endl;
@ -1403,7 +1403,7 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
}
}
// ---Recherche thepoint est sur un edge ou un vertex de la face f
// ---Find thepoint on an edge or a vertex of face f
PtOnEdgeVertex(RevolRib, f, thePoint, FirstVertex, LastVertex,
PtOnEdge,OnEdge,PtOnVertex,OnVertex);
@ -1547,8 +1547,8 @@ Standard_Boolean BRepFeat_RibSlot::ExtremeFaces(const Standard_Boolean RevolRib,
//=======================================================================
//function : PtOnEdgeVertex
//purpose : Recherche si les 2 points limites de l`unique edge du wire
// sont sur un edge ou un vertex du shape de base
//purpose : Find if 2 limit points of the unique edge of a wire
// are on an edge or a vertex of the base shape
//=======================================================================
void BRepFeat_RibSlot::PtOnEdgeVertex(const Standard_Boolean RevolRib,
@ -1619,7 +1619,7 @@ void BRepFeat_RibSlot::PtOnEdgeVertex(const Standard_Boolean RevolRib,
//=======================================================================
//function : SlidingProfile
//purpose : construction de la face profil en cas de glissement
//purpose : construction of the profile face in case of sliding
//=======================================================================
Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
@ -1642,9 +1642,9 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
if (trc) cout << "BRepFeat_RibSlot::SlidingProfile" << endl;
#endif
Standard_Boolean ProfileOK = Standard_True;
// --cas de glissement : construction du wire du profil
// -> 1 partie boite englobante + 1 partie wire
// attention a la compatibilite des orientations
// --case of sliding : construction of the wire of the profile
// --> 1 part bounding box + 1 part wire
// attention to the compatibility of orientations
gp_Dir FN, LN;
BRepLib_MakeWire WW;
@ -1652,9 +1652,9 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
FN = Normal(FirstFace, myFirstPnt);
LN = Normal(LastFace, myLastPnt);
// Cas de la rainure (cut) <> nervure (fuse)
// -> on est dans la matiere
// -> on fait tout en 2d dans le plan de travail : plus facile
// Case of the groove (cut) <> rib (fuse)
// -> we are in the material
// -> make everything in 2d in the working plane : easier
if(!myFuse) {
FN = -FN;
LN = -LN;
@ -1681,7 +1681,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
Standard_Real par1 = ElCLib::Parameter(ln1->Lin(), myFirstPnt);
Standard_Real par2 = ElCLib::Parameter(ln2->Lin(), myLastPnt);
if(par1 >= myTol || par2 >= myTol) {
Concavite = 2; //paralelle et concave
Concavite = 2; //paralel and concave
BRepLib_MakeEdge e1(myLastPnt, myFirstPnt);
WW.Add(e1);
}
@ -1700,19 +1700,19 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
}
}
// ---Construction de la face profil
// ---Construction of the profile face
if(Concavite == 1) {
// Si concave : on peut prolonger les premiers et dernier edges du wire
// jusque boite englobante
// if concave : it is possible to extend first and last edges of the wire
// to the bounding box
BRepLib_MakeEdge e1(myLastPnt, Pt);
WW.Add(e1);
BRepLib_MakeEdge e2(Pt, myFirstPnt);
WW.Add(e2);
}
else if(Concavite == 3) {
// BndEdge : edges d'intersection avce la boite englobante
// BndEdge : edges of intersection with the bounding box
TopoDS_Edge BndEdge1, BndEdge2;
// Points d'intersection boite englobante / Profil recherche
// Points of intersection with the bounding box / Find Profile
gp_Pnt BndPnt1, BndPnt2, LastPnt;
TopExp_Explorer expl;
expl.Init(BndFace, TopAbs_WIRE);
@ -1767,7 +1767,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
WW.Add(e1);
if(BndEdge1.IsSame(BndEdge2)) {
// Cas particulier : meme edge -> cheminement simple a determiner
// Particular case : same edge -> simply determined path
BRepLib_MakeEdge e2(BndPnt1, BndPnt2);
WW.Add(e2);
BRepLib_MakeEdge e3(BndPnt2, myFirstPnt);
@ -1799,9 +1799,9 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
}
else explo.Init(BndWire);
// On controle si on est dans BndEdge2
// -> si oui : il faut tourner pour rejoindre FirstPnt
// -> si non : on ajoute les edges
// Check if this is BndEdge2
// -> if yes : it is required to turn to join FirstPnt
// -> if no : add edges
Standard_Boolean Fin = Standard_False;
while(!Fin) {
const TopoDS_Edge& e = TopoDS::Edge(explo.Current());
@ -1813,8 +1813,8 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
LastPnt = pp;
}
else {
// le chemin est ferme
// -> des que l'on recontre BndEdge2, fin des bords sur BndFace
// the path is closed
// -> since met BndEdge2, end of borders on BndFace
Fin = Standard_True;
BRepLib_MakeEdge ee(LastPnt, BndPnt2);
WW.Add(ee);
@ -1834,10 +1834,10 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
}
}
// ---Construction du profil
// ---Construction of the profile
// On explore le wire fourni par l'utilisateur
// BRepTools_WireExplorer : bon ordre - sans repetition <> TopExp : non ordonne
// Explore the wire provided by the user
// BRepTools_WireExplorer : correct order - without repetition <> TopExp : non ordered
BRepTools_WireExplorer EX(myWire);
Standard_Real ff, ll;
@ -1867,7 +1867,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
WW.Add(el);
}
else {
// 1 seul edge : traitement particulier
// only one edge : particular processing
Standard_Real fpar = IntPar(FirstCurve, myFirstPnt);
Standard_Real lpar = IntPar(FirstCurve, myLastPnt);
Handle(Geom_Curve) c;
@ -1892,19 +1892,19 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
}
if(Concavite != 3) {
// Si concave : fac est OK
// if concave : face is OK
Prof = fac;
}
else {
// Si non concave
// CheckPnt : point legerement a l'interieur cote matiere
// Bndface : face/coupe de la boite englobante dans le plen du profil
// if not concave
// CheckPnt : point slightly inside the material side
// Bndface : face/cut of the bounding box in the plane of the profile
BRepTopAdaptor_FClass2d Cl(fac, BRep_Tool::Tolerance(fac));
Standard_Real u, v;
ElSLib::Parameters(myPln->Pln(), CheckPnt, u, v);
gp_Pnt2d checkpnt2d(u, v);
if(Cl.Perform(checkpnt2d, Standard_True) == TopAbs_OUT) {
// Si fac n'est pas le bon morceau de BndFace on prend le complementaire
// If face is not the correct part of BndFace take the complementary
//modified by NIZNHY-PKV Fri Mar 22 16:46:20 2002 f
//BRepAlgo_Cut c(BndFace, fac);
BRepAlgoAPI_Cut c(BndFace, fac);
@ -1915,7 +1915,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
Prof = TopoDS::Face(ffx.Shape());
}
else {
// Si fac est le bon morceau de BndFace : fac est OK
// If face is the correct part of BndFace : face is OK
Prof = fac;
}
}
@ -1931,7 +1931,7 @@ Standard_Boolean BRepFeat_RibSlot::SlidingProfile(TopoDS_Face& Prof,
}
//=======================================================================
//function : NoSlidingProfile
//purpose : construction de la face profil en cas de glissement
//purpose : construction of the face profile in case of sliding
//=======================================================================
Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
@ -1995,7 +1995,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
Standard_Real par1 = ElCLib::Parameter(firstln->Lin(), myFirstPnt);
Standard_Real par2 = ElCLib::Parameter(lastln->Lin(), myLastPnt);
if(par1 >= myTol || par2 >= myTol)
Concavite = 2; //paralelle et concave
Concavite = 2; //parallel and concave
}
if(d1.IsEqual(d2, myTol)) {
if(Concavite == 3) TestOK = Standard_False;
@ -2011,7 +2011,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
}
}
// ---Construction de la face profil
// ---Construction of the face profile
if(Concavite == 3) {
if(OnFirstFace) {
Standard_Real f, l;
@ -2327,7 +2327,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
if(!theLastEdge.IsNull()) {
const TopoDS_Vertex& v1 = TopExp::LastVertex(theLastEdge,Standard_True);
TopoDS_Vertex v2;
// Attention cas Wire Reversed -> LastVertex sans Standard_True
// Attention case Wire Reversed -> LastVertex without Standard_True
const gp_Pnt& pp = BRep_Tool::Pnt(TopExp::LastVertex(FirstEdge));
if(!theFV.IsNull() && theFirstpoint.Distance(pp) <= myTol) {
v2 = theFV;
@ -2670,7 +2670,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
}
myMap.ChangeFind(orig).Clear();
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
// on verifie l`appartenance au shape...
// check the belonging to the shape...
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(itm.Key())) {
// const TopoDS_Shape& sh = itm.Key();
@ -2727,7 +2727,7 @@ Standard_Boolean BRepFeat_RibSlot::NoSlidingProfile(TopoDS_Face& Prof,
}
myMap.ChangeFind(orig).Clear();
for (itm.Initialize(newdsc); itm.More(); itm.Next()) {
// on verifie l`appartenance au shape...
// check the belonging to the shape...
for (exp.Init(S,TopAbs_FACE);exp.More();exp.Next()) {
if (exp.Current().IsSame(itm.Key())) {
// const TopoDS_Shape& sh = itm.Key();

View File

@ -55,7 +55,7 @@ Standard_Boolean BRepFeat_SplitShape::IsDeleted(const TopoDS_Shape& F)
{
TopTools_ListIteratorOfListOfShape itl
(((LocOpe_Spliter*) &mySShape)->DescendantShapes(F));
// tout ceci pour truander le const
// all that to swindle the constant
return (!itl.More());// a priori impossible

View File

@ -5,28 +5,28 @@
// Modified: Mon Jan 12 10:50:10 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// gestion automatique de l'origine et de l'orientation
// avec la methode Organize
// automatic management of origin and orientation
// with method Organize
// Modified: Mon Feb 23 09:28:46 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// methode Organize avec option de projection pour les wires fermes
// nouvelle methode SameNumber avec option de report des decoupes
// + utilitaires ComputeACR et InsertACR
// + traitement du cas derniere section ponctuelle
// method Organize with option of projection for closed wires
// new method SameNumber with option to report cuts
// + utilities ComputeACR and InsertACR
// + processing of the case of last point section
// Modified: Thu Apr 30 15:24:17 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// separation sections fermees / sections ouvertes + debug
// Organize devient ComputeOrigin et SearchOrigin
// separation closed / open sections + debug
// Organize becomes ComputeOrigin and SearchOrigin
// Modified: Tue Jul 21 16:48:35 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// cas limite pour Pnext d'ou vrillage (BUC60281)
// limited case for Pnext of a twist (BUC60281)
// Modified: Thu Jul 23 11:38:36 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// calcul de l'angle de la rotation dans SearchOrigin
// calculate the angle of rotation in SearchOrigin
// Modified: Fri Jul 31 15:14:19 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
@ -34,7 +34,7 @@
// Modified: Mon Oct 12 09:42:33 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// numero des aretes dans EdgesFromVertex (CTS21570)
// number of edges in EdgesFromVertex (CTS21570)
#include <BRepFill.ixx>
@ -167,11 +167,11 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
Vbid.Nullify();
if (SeqOrder) {
// de first vers last
// from first to last
m0 = first;
V0 = Vf;
for (j=1; j<=ndec; j++) {
// morceau d'edge
// piece of edge
m1 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first;
TopoDS_Edge CutE = BRepLib_MakeEdge(C,V0,Vbid,m0,m1);
CutE.Orientation(CurrentOrient);
@ -179,7 +179,7 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
m0 = m1;
V0 = TopExp::LastVertex(CutE);
if (j==ndec) {
// dernier morceau
// last piece
TopoDS_Edge LastE = BRepLib_MakeEdge(C,V0,Vl,m0,last);
LastE.Orientation(CurrentOrient);
S.Append(LastE);
@ -187,11 +187,11 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
}
}
else {
// de last vers first
// from last to first
m1 = last;
V1 = Vl;
for (j=ndec; j>=1; j--) {
// morceau d'edge
// piece of edge
m0 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first;
TopoDS_Edge CutE = BRepLib_MakeEdge(C,Vbid,V1,m0,m1);
CutE.Orientation(CurrentOrient);
@ -199,7 +199,7 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
m1 = m0;
V1 = TopExp::FirstVertex(CutE);
if (j==1) {
// dernier morceau
// last piece
TopoDS_Edge LastE = BRepLib_MakeEdge(C,Vf,V1,first,m1);
LastE.Orientation(CurrentOrient);
S.Append(LastE);
@ -243,7 +243,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
TopoDS_Vertex V1f,V1l,V2f,V2l;
// on cree un new Handle
// create a new Handle
if (Abs(f1 - C1->FirstParameter()) > Precision::PConfusion() ||
Abs(l1 - C1->LastParameter()) > Precision::PConfusion() ) {
C1 = new Geom_TrimmedCurve(C1,f1,l1);
@ -251,11 +251,11 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
else {
C1 = Handle(Geom_Curve)::DownCast(C1->Copy());
}
// eventuellement on bouge la courbe
// eventually the curve is concerned
if ( !SameLoc) {
C1->Transform(L1.Transformation());
}
// on la met dans le bon sens et on prend ses vertex
// it is set in the proper direction and its vertices are taken
if (Edge1.Orientation() == TopAbs_REVERSED) {
TopExp::Vertices(Edge1,V1l,V1f);
C1->Reverse();
@ -264,7 +264,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
TopExp::Vertices(Edge1,V1f,V1l);
}
// on cree un new Handle
// a new Handle is created
if (Abs(f2 - C2->FirstParameter()) > Precision::PConfusion() ||
Abs(l2 - C2->LastParameter()) > Precision::PConfusion() ) {
C2 = new Geom_TrimmedCurve(C2,f2,l2);
@ -272,11 +272,11 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
else {
C2 = Handle(Geom_Curve)::DownCast(C2->Copy());
}
// eventuellement on bouge la courbe
// eventually the curve is concerned
if ( !SameLoc) {
C2->Transform(L2.Transformation());
}
// on la met dans le bon sens et on prend ses vertex
// it is set in the proper direction and its vertices are taken
if (Edge2.Orientation() == TopAbs_REVERSED) {
TopExp::Vertices(Edge2,V2l,V2f);
C2->Reverse();
@ -285,7 +285,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
TopExp::Vertices(Edge2,V2f,V2l);
}
// Sont-ce des edges fermes
// Are they closed edges?
Standard_Boolean Closed = V1f.IsSame(V1l) && V2f.IsSame(V2l);
@ -642,7 +642,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
TopoDS_Face aFace;
// normale au Spine.
// normal to the Spine.
if (Spine.ShapeType() == TopAbs_FACE) {
aFace = TopoDS::Face(Spine);
S = BRep_Tool::Surface(TopoDS::Face(Spine), L);
@ -670,7 +670,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
Normal = Handle(Geom_Plane)::DownCast(S)->Pln().Axis().Direction();
// Recherche du vertex du profil le plus proche du spine.
// Find vertex of the profile closest to the spine.
Standard_Real DistMin = Precision::Infinite();
Standard_Real Dist;
// Standard_Real Tol2 = Tol*Tol;
@ -681,7 +681,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
// Standard_Real D1,D2;
gp_Pnt P1,P2;
// On cherche d'abord si il y a contact Vertex Vertex.
// First check if there is contact Vertex Vertex.
Standard_Boolean IsOnVertex = Standard_False;
SE.Init(aFace.Oriented(TopAbs_FORWARD),TopAbs_VERTEX);
// modified by NIZHNY-EAP Wed Feb 23 12:31:52 2000 ___BEGIN___
@ -780,7 +780,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
}
}
}
// sauvegarde minimum.
// save minimum.
if (Dist < DistMin) {
DistMin = Dist;
BRepAdaptor_Curve BAC(E);
@ -800,7 +800,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
//=======================================================================
//function : SearchOrigin
//purpose : Decoupe et oriente un wire ferme.
//purpose : Cut and orientate a closed wire.
//=======================================================================
void BRepFill::SearchOrigin(TopoDS_Wire & W,
@ -821,9 +821,9 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
W.Orientation(TopAbs_FORWARD); //pour ne pas composer les orientations
W.Orientation(TopAbs_FORWARD); //to avoid composing the orientations
// Calcul la distance
// Calculate the distance
B.MakeVertex(V, P, Tol);
BRepExtrema_DistShapeShape DSS(V, W);
if (DSS.IsDone()) {
@ -870,14 +870,14 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
Standard_Boolean forward;
BRepTools_WireExplorer exp;
// Calcul le nombre d'edges
// Calculate the number of edges
for(exp.Init(W); exp.More(); exp.Next()) NbEdges++;
if (NewVertex) {
NbEdges++;
Eref = E;
}
// Construit la Table et calcul rangdeb
// Construct the Table and calculate rangdeb
TopTools_Array1OfShape Edges(1, NbEdges);
for(exp.Init(W), ii=1; exp.More(); exp.Next(), ii++) {
E = exp.Current();
@ -898,7 +898,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
}
if (rangdeb == 0) rangdeb = NbEdges;
// Calcul du sens de parcourt
// Calculate the direction of parsing
E = TopoDS::Edge(Edges(rangdeb));
if (!NewVertex) {
// theparam = BT.Parameter(V, E);
@ -930,11 +930,11 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
void BRepFill::ComputeACR(const TopoDS_Wire& wire,
TColStd_Array1OfReal& ACR)
{
// calcul des abscisses curvilignes reduites et de la longueur du wire
// calculate the reduced curvilinear abscisses and the length of the wire
BRepTools_WireExplorer anExp;
Standard_Integer nbEdges=0, i;
// longueurs cumulees
// cumulated lengths
ACR.Init(0);
for(anExp.Init(wire); anExp.More(); anExp.Next()) {
nbEdges++;
@ -946,17 +946,17 @@ void BRepFill::ComputeACR(const TopoDS_Wire& wire,
}
}
// longueur totale du wire
// total length of the wire
ACR(0) = ACR(nbEdges);
// abscisses curvilignes reduites
// reduced curvilinear abscisses
if (ACR(0)>Precision::Confusion()) {
for (i=1; i<=nbEdges; i++) {
ACR(i) /= ACR(0);
}
}
else {
// wire ponctuel
// punctual wire
ACR(nbEdges) = 1;
}
@ -971,7 +971,7 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
const TColStd_Array1OfReal& ACRcuts,
const Standard_Real prec)
{
// calcul des ACR du wire a decouper
// calculate ACR of the wire to be cut
BRepTools_WireExplorer anExp;
Standard_Integer nbEdges=0;
for(anExp.Init(wire); anExp.More(); anExp.Next()) {
@ -987,13 +987,13 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
Standard_Real t0,t1=0;
nbEdges=0;
// traitement edge par edge
// processing edge by edge
for(anExp.Init(wire); anExp.More(); anExp.Next()) {
nbEdges++;
t0 = t1;
t1 = ACRwire(nbEdges);
// parametres de decoupe sur cette edge
// parameters of cut on this edge
Standard_Integer ndec=0;
for (i=1; i<=ACRcuts.Length(); i++ ) {
if (t0+prec<ACRcuts(i) && ACRcuts(i)<t1-prec) {
@ -1006,19 +1006,19 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
TopoDS_Vertex V = anExp.CurrentVertex();
if (ndec==0 || BRep_Tool::Degenerated(E)) {
// on copie l'edge
// copy the edge
MW.Add(E);
}
else {
// il faut couper l'edge
// en respectant le sens de parcours du wire
// it is necessary to cut the edge
// following the direction of parsing of the wire
Standard_Boolean SO = (V.IsSame(TopExp::FirstVertex(E)));
TopTools_SequenceOfShape SE;
SE.Clear();
TColStd_SequenceOfReal SR;
SR.Clear();
// le wire est toujours FORWARD
// il faut modifier le parametre de decoupe si l'edge est REVERSED
// the wire is always FORWARD
// it is necesary to modify the parameter of cut6 if the edge is REVERSED
if (E.Orientation() == TopAbs_FORWARD) {
for (j=1; j<=ndec; j++) SR.Append(paradec(j));
}
@ -1032,7 +1032,7 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
}
}
// resultat
// result
TopAbs_Orientation Orien = wire.Orientation();
TopoDS_Shape aLocalShape = MW.Wire();
aLocalShape.Orientation(Orien);

View File

@ -7,10 +7,9 @@
class ACRLaw from BRepFill inherits LocationLaw from BRepFill
---Purpose: Build Location Law, with a Wire. dans le cas du
-- contour guide et triedre par Abscisse Curviligne
-- Reduite
--
---Purpose: Build Location Law, with a Wire. In the case
-- of guided contour and trihedron by reduced
-- curvilinear abscissa

View File

@ -27,12 +27,12 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
{
Init(Path);
// calcul du nb d'edge du path
// calculate the nb of edge of the path
BRepTools_WireExplorer wexp;
Standard_Integer NbEdge = 0;
for (wexp.Init(myPath); wexp.More(); wexp.Next()) NbEdge++;
// tab pour memoriser les ACR pour chaque edge
// tab to memorize ACR for each edge
OrigParam = new (TColStd_HArray1OfReal)(0,NbEdge);
TColStd_Array1OfReal Orig (0,NbEdge);
BRepFill::ComputeACR(Path, Orig);
@ -46,12 +46,12 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
Handle(GeomAdaptor_HCurve) AC;
Standard_Real First, Last;
// on recupere les ACR des edges de la trajectoire
// return ACR of edges of the trajectory
OrigParam->SetValue(0,0);
for (ipath=1;ipath<=NbEdge;ipath++)
OrigParam->SetValue(ipath, Orig(ipath));
// on traite chaque edge de la trajectoire
// process each edge of the trajectory
for (ipath=0, wexp.Init(myPath);
wexp.More(); wexp.Next()) {
E = wexp.Current();
@ -64,14 +64,14 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
if (Or == TopAbs_REVERSED) {
Handle(Geom_TrimmedCurve) CBis =
new (Geom_TrimmedCurve) (C, First, Last);
CBis->Reverse(); // Pour eviter de deteriorer la topologie
CBis->Reverse(); // To avoid damaging the topology
C = CBis;
First = C->FirstParameter();
Last = C->LastParameter();
}
AC = new (GeomAdaptor_HCurve) (C, First, Last);
// on Set les parametres pour le cas multi-edges
// Set the parameters for the case multi-edges
Standard_Real t1 = OrigParam->Value(ipath-1);
Standard_Real t2 = OrigParam->Value(ipath);
Handle(GeomFill_LocationGuide) Loc;

View File

@ -87,7 +87,7 @@ static void ComputeTrsf(const TopoDS_Wire& W,
Bnd_Box& Box,
gp_Trsf& Tf)
{
// Calcul d'un barycentre approximatif
// Calculate approximate barycenter
BRepTools_WireExplorer Exp(W);
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
@ -101,19 +101,19 @@ static void ComputeTrsf(const TopoDS_Wire& W,
}
Bary /= nb;
// Calcul la Transfo
// Calculate the Transformation
gp_Ax3 N(Bary, D);
Tf.SetTransformation(N);
BRepAdaptor_Curve AC;
// BndLib_Add3dCurve BC;
// transfo du wire
// transformation to the wire
TopoDS_Wire TheW = W;
TopLoc_Location Loc(Tf);
TheW.Location(Loc);
// Calcul la boite
// Calculate the box
Box.SetVoid();
for (Exp.Init(TheW); Exp.More(); Exp.Next()) {
AC.Initialize(Exp.Current());
@ -123,7 +123,7 @@ static void ComputeTrsf(const TopoDS_Wire& W,
}
//=======================================================================
//function : Longueur
//function : Length
//purpose :
//======================================================================
static Standard_Real Longueur(const Bnd_Box& WBox,
@ -131,11 +131,11 @@ static Standard_Real Longueur(const Bnd_Box& WBox,
gp_Dir& D,
gp_Pnt& P)
{
// face de la boite la plus eloignee de la face entree dans
//la direction de depouille
// face of the box most remoted from the face input in
// the direction of skin
Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,WZmin,WZmax,L;
//"coord" de la boite
//"coord" of the box
WBox.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax);
WZmin = Zmin;
WZmax = Zmax;
@ -144,7 +144,7 @@ static Standard_Real Longueur(const Bnd_Box& WBox,
P.SetCoord( (Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmax);
if (Zmax < WZmin) {
// Depouille dans le mauvais sens. On inverse...
// Skin in the wrong direction. Invert...
D.Reverse();
L = WZmax - Zmin;
P.SetZ(Zmin);
@ -157,8 +157,7 @@ static Standard_Real Longueur(const Bnd_Box& WBox,
//=======================================================================
//function : GoodOrientation
//purpose : Regarde si la loi est oriente de maniere a avoir une depouille
// "exterieur"
//purpose : Check if the law is oriented to have an exterior skin
//======================================================================
static Standard_Boolean GoodOrientation(const Bnd_Box& B,
const Handle(BRepFill_LocationLaw)& Law,
@ -182,7 +181,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//#endif
r = l/Nb;
Nb++; // Nombre de points
Nb++; // Number of points
TColgp_Array1OfPnt Pnts(1, Nb);
Handle(Adaptor3d_HCurve) AC;
@ -266,7 +265,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
else {
#if DEB
cout << "Pas de Bords Libre !" << endl;
cout << "No Free Borders !" << endl;
#endif
Standard_ConstructionError::Raise("BRepFill_Draft");
}
@ -276,7 +275,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Standard_ConstructionError::Raise("BRepFill_Draft");
}
// Attention aux wire closed non declare !
// Attention to closed non declared wires !
if (!myWire.Closed()) {
TopoDS_Vertex Vf, Vl;
TopExp::Vertices(myWire, Vf, Vl);
@ -300,7 +299,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function :SetOptions
//purpose : Definit le style
//purpose : Defines the style
//======================================================================
void BRepFill_Draft::SetOptions(const BRepFill_TransitionStyle Style,
const Standard_Real Min,
@ -323,7 +322,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function :Perform
//purpose : calcul d'une surface de depouille
//purpose : calculate a surface of skinning
//======================================================================
void BRepFill_Draft::Perform(const Standard_Real LengthMax)
{
@ -341,7 +340,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function :Perform
//purpose : calcul d'une surface de depouille
//purpose : calculate a surface of skinning
//======================================================================
void BRepFill_Draft::Perform(const Handle(Geom_Surface)& Surface,
const Standard_Boolean KeepInsideSurface)
@ -353,7 +352,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
ComputeTrsf(myWire, myDir, WBox, Trsf);
// boite englobant la surface d'arret
// box with bounds of the stop surface
Handle(Geom_Surface) Surf;
Surf = Handle(Geom_Surface)::DownCast(Surface->Transformed(Trsf));
GeomAdaptor_Surface S1 (Surf);
@ -361,20 +360,20 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
// AS.Add(S1, 0.1, SBox);
BndLib_AddSurface::Add(S1, 0.1, SBox);
// on calcule la longueur maximum de la regle.
// calculate the maximum length of the rule.
L = Longueur(WBox, SBox, myDir, Pt);
L /= Abs(Cos(myAngle));
// Constructuion
// Construction
Init(Surface, L, WBox);
BuildShell(Surface, !KeepInsideSurface);
Sewing();
}
//=======================================================================
//================================================================
//function :Perform
//purpose : calcul de la surface de depouille, arretee par une shape
//======================================================================
//purpose : calculate the surface of skinning, stopped by a shape
//================================================================
void BRepFill_Draft::Perform(const TopoDS_Shape& StopShape,
const Standard_Boolean KeepOutSide)
{
@ -385,7 +384,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
ComputeTrsf(myWire, myDir, WBox, Trsf);
// boite englobant la shape d'arret
// bounding box of the stop shape
Bnd_Box BSurf;//, TheBox;
Standard_Real Umin, Umax, Vmin, Vmax;
#ifdef DEB
@ -400,28 +399,28 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
TopExp_Explorer Ex (StopShape, TopAbs_FACE);
SBox.SetVoid();
while (Ex.More()) { // on parcourt les faces de la shape d'arret
while (Ex.More()) { // parse faces of the stop shape
// B.UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax);
BRepTools::UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax);
Surf = Handle(Geom_Surface)::DownCast(
// BT.Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) );
BRep_Tool::Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) );
GeomAdaptor_Surface S1 (Surf);
// boite englobant la face courante
// bounding box of the current face
// AS.Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf);
BndLib_AddSurface::Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf);
SBox.Add(BSurf); // on regroupe les boites
SBox.Add(BSurf); // group boxes
Ex.Next();
}// while_Ex
// on calcule la longueur maximum de la regle.
// calculate the maximum length of the rule.
L = Longueur(WBox, SBox, myDir, Pt);
L /= Abs(Cos(myAngle));
// surface d'arret
// surface of stop
gp_Trsf Inv;
Inv = Trsf.Inverted(); // transfo inverse
Pt.Transform(Inv); // coord dans le repere absolu
Inv = Trsf.Inverted(); // inverted transformation
Pt.Transform(Inv); // coordinate in the absolute reference
Handle(Geom_Plane) Plan = new (Geom_Plane)(Pt, myDir);
Surf = new (Geom_RectangularTrimmedSurface) (Plan,-L, L, -L, L);
@ -433,7 +432,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
#endif
// Balayage et restriction
// Sweeping and restriction
Init(Plan, L*1.01, WBox);
BuildShell(Surf, Standard_False);
Fuse(StopShape, KeepOutSide);
@ -442,7 +441,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Init
//purpose : Construction des lois.
//purpose : Construction of laws.
//======================================================================
void BRepFill_Draft::Init(const Handle(Geom_Surface)& ,
const Standard_Real Length,
@ -450,7 +449,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
{
Standard_Boolean B;
// loi de positionnement
// law of positioning
Handle(GeomFill_LocationDraft) Loc
= new (GeomFill_LocationDraft) (myDir, myAngle);
myLoc = new (BRepFill_DraftLaw) (myWire, Loc);
@ -463,14 +462,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
myLoc = new (BRepFill_DraftLaw) (myWire, Loc);
}
myLoc->CleanLaw(angmin); // Nettoie les petites discontinuites.
myLoc->CleanLaw(angmin); // Clean small discontinuities.
// loi de section
// generatrice est une droite // a la binormal.
// law of section
// generating line is straight and parallel to binormal.
gp_Pnt P(0, 0, 0);
gp_Vec D (0., 1., 0.);
// Controle de l'orientation
// Control of the orientation
Standard_Real f,l;
myLoc->Law(1)->GetDomain(f,l);
gp_Mat M;
@ -504,12 +503,12 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : BuildShell
//purpose : Construction de la surface de depouille
//purpose : Construction of the skinning surface
//======================================================================
void BRepFill_Draft::BuildShell(const Handle(Geom_Surface)& Surf,
const Standard_Boolean KeepOutSide)
{
// construction de la surface
// construction of the surface
BRepFill_Sweep Sweep(mySec, myLoc, Standard_True);
Sweep.SetTolerance(myTol);
Sweep.SetAngularControl(angmin, angmax);
@ -520,7 +519,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
myFaces = Sweep.SubShape();
mySections = Sweep.Sections();
myDone = Standard_True;
// Controle de l'orientation
// Control of the orientation
Standard_Boolean out=Standard_True;
TopExp_Explorer ex(myShell,TopAbs_FACE);
TopoDS_Face F;
@ -547,10 +546,10 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
return;
}
if (!Surf.IsNull()) { // On ajoute la face en bout
if (!Surf.IsNull()) { // Add the face at end
// En attendant une utilisation des traces & retriction dans BRepFill_Sweep
// On fait un Fuse.
// Waiting the use of traces & retriction in BRepFill_Sweep
// Make Fuse.
BRepLib_MakeFace MkF;
MkF.Init(Surf, Standard_True, Precision::Confusion());
Fuse(MkF.Face(), KeepOutSide);
@ -560,8 +559,8 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Fuse
//purpose : Operation booleenne entre la depouille et
// la shape d'arret
//purpose : Boolean operation between the skin and the
// stop shape
//======================================================================
Standard_Boolean BRepFill_Draft::Fuse(const TopoDS_Shape& StopShape,
const Standard_Boolean KeepOutSide)
@ -578,7 +577,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
else {
B.MakeSolid(Sol1);
B.Add(Sol1, myShape); // shell => solid (pour fusion)
B.Add(Sol1, myShape); // shell => solid (for fusion)
}
@ -596,7 +595,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
case TopAbs_SHELL :
{
B.MakeSolid(Sol2);
B.Add(Sol2, StopShape); // shell => solid (pour fusion)
B.Add(Sol2, StopShape); // shell => solid (for fusion)
break;
}
@ -606,32 +605,32 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
B.MakeShell(S);
B.Add(S, StopShape);
B.MakeSolid(Sol2);
B.Add(Sol2, S); // shell => solid (pour fusion)
B.Add(Sol2, S); // shell => solid (for fusion)
break;
}
default :
{
return Standard_False; // On ne sait pas faire
return Standard_False; // Impossible to do
}
}
BRepAlgo_DSAccess DSA;
DSA.Load(Sol1, Sol2);
DSA.Intersect(Sol1, Sol2); // intersection des 2 solids
DSA.Intersect(Sol1, Sol2); // intersection of 2 solids
// suppression des aretes correspondant aux intersections "inutiles"
// removal of edges corresponding to "unused" intersections
Standard_Integer NbPaquet;
// gp_Pnt P1,P2;
TopoDS_Vertex V,V1;
TopTools_ListOfShape List;
List = DSA.GetSectionEdgeSet();// liste des aretes
List = DSA.GetSectionEdgeSet();// list of edges
NbPaquet = List.Extent();
if (NbPaquet == 0) {
#if DRAW
cout << "Pas de fusion" << endl;
cout << "No fusion" << endl;
DBRep::Set("DepPart", Sol1);
DBRep::Set("StopPart", Sol2);
#endif
@ -639,13 +638,13 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
if (NbPaquet > 1) {
// Il faut selectioner les paquets.
// It is required to select packs.
TColStd_Array1OfReal Dist(1, NbPaquet);
TopTools_ListIteratorOfListOfShape it(List);
Standard_Real D, Dmin = 1.e10;
Standard_Integer ii;
//On classe les paquets par eloignement.
//Classify the packs by distance.
BRepExtrema_DistShapeShape Dist2;
Dist2.LoadS1( myWire );
for (ii=1; it.More();it.Next(),ii++){
@ -660,7 +659,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Dist(ii) = 1.e10;
}
// on supprime les edges "plus loin" que Dmin
// remove edges "farther" than Dmin
for (ii=1, it.Initialize(List); it.More();it.Next(), ii++){
if (Dist(ii) > Dmin) {
DSA.SuppressEdgeSet(it.Value());
@ -674,15 +673,15 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
if (StopShape.ShapeType() != TopAbs_SOLID) {
// Il faut choisir le state par la geometrie
// It is required to choose the state by the geometry
//(1) On recupere une edge de section
List = DSA.GetSectionEdgeSet();// liste des aretes
//(1) Return an edge of section
List = DSA.GetSectionEdgeSet();// list of edges
TopTools_ListIteratorOfListOfShape it(List);
TopoDS_Iterator iter(it.Value());
TopoDS_Edge E = TopoDS::Edge(iter.Value());
// (2) On recupere sa geometrie sur StopShape
//(2) Return geometry on StopShape
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
Handle(Geom_Surface) S;
@ -693,7 +692,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
// BT.CurveOnSurface(E, C2d, S, L, f, l, 2);
BRep_Tool::CurveOnSurface(E, C2d, S, L, f, l, 2);
// On Trouve une normale.
// Find a normal.
C2d->D0((f+l)/2,P2d);
GeomLProp_SLProps SP(S, P2d.X(), P2d.Y(), 1, 1.e-12);
if (! SP.IsNormalDefined()) {
@ -705,17 +704,17 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
}
// On en deduit State1
// Subtract State1
if (myDir.Angle(SP.Normal()) < PI/2) State1 = TopAbs_IN;
else State1 = TopAbs_OUT;
}
if (! KeepOutSide) { // On inverse State2;
if (! KeepOutSide) { // Invert State2;
if (State2 == TopAbs_IN) State2 = TopAbs_OUT;
else State2 = TopAbs_IN;
}
//recalcul de la shape finale
//recalculate the final shape
TopoDS_Shape result = DSA.Merge(State1, State2);
if (issolid) myShape = result;
@ -725,7 +724,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
if (Exp.More()) myShape = Exp.Current();
}
// Mise a jour de l'Historique
// Update the History
Standard_Integer ii;
for (ii=1; ii<=myLoc->NbLaw(); ii++) {
const TopTools_ListOfShape& L = DSA.Modified(myFaces->Value(1,ii));
@ -743,7 +742,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Sewing
//purpose : Assemble la depouille avec la face du dessus
//purpose : Assemble the skin with the above face
//======================================================================
Standard_Boolean BRepFill_Draft::Sewing()
{
@ -753,8 +752,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
if ((!ToAss) || (!myDone)) return Standard_False;
// Assemblage
// on fait un shell a partir des faces de la shape + la shape en entree
// Assembly make a shell from the faces of the shape + the input shape
Handle(BRepBuilderAPI_Sewing) Ass = new BRepBuilderAPI_Sewing(5*myTol, Standard_True,
Standard_True, Standard_False);
Ass->Add(myShape);
@ -765,7 +763,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Standard_Integer NbCE;
Ass->Perform();
// On verifie que l'assemblage est effectif.
// Check if the assembly is real.
NbCE = Ass->NbContigousEdges();
if (NbCE > 0) {
@ -780,7 +778,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
TopoDS_Iterator It(res);
res = It.Value();
It.Next();
if (!It.More()) {//Une seule partie => c'est bon
if (!It.More()) {//Only one part => this is correct
myShape = res;
Ok = Standard_True;
}
@ -788,7 +786,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
if (Ok) {
// Mise a jour de l'Historique
// Update the History
Standard_Integer ii;
for (ii=1; ii<=myLoc->NbLaw(); ii++) {
if (Ass->IsModified(myFaces->Value(1,ii)))
@ -801,7 +799,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Ass->Modified(mySections->Value(1,ii)));
}
if (myShape.Closed()) { // On fait un Solid
if (myShape.Closed()) { // Make a Solid
TopoDS_Solid solid;
BRep_Builder BS;
BS.MakeSolid(solid);
@ -818,14 +816,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
}
#if DEB
else cout << "Draft : Pas d'assemblage !" << endl;
else cout << "Draft : No assembly !" << endl;
#endif
return Ok;
}
//=======================================================================
//function : Generated
//purpose : retourne une sous partie partie generes par balayage
//purpose : return a sub-part generated by sweeping
//======================================================================
const TopTools_ListOfShape&
BRepFill_Draft::Generated(const TopoDS_Shape& S)
@ -854,17 +852,17 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Shape
//purpose : retourne la shape complete
//purpose : return the complete shape
//======================================================================
TopoDS_Shape BRepFill_Draft::Shape()const
{
return myShape;
}
//=======================================================================
//=====================================================================
//function : Shell
//purpose : surface de depouille avec la face entree (=>shell)
//======================================================================
//purpose : surface of skinning with the input face (=>shell)
//=====================================================================
TopoDS_Shell BRepFill_Draft::Shell()const
{
return myShell;

View File

@ -65,7 +65,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path,
AS = new (BRepAdaptor_HSurface) (F);
}
}
if (!Trouve) { // Impossible de construire la loi.
if (!Trouve) { // Impossible to construct the law.
hasresult = Standard_False;
myLaws.Nullify();
return;
@ -75,7 +75,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path,
if (Or == TopAbs_REVERSED) {
Handle(Geom2d_TrimmedCurve) CBis =
new (Geom2d_TrimmedCurve) (C, First, Last);
CBis->Reverse(); // Pour eviter de deteriorer la topologie
CBis->Reverse(); // To avoid spoiling the topology
C = CBis;
First = C->FirstParameter();
Last = C->LastParameter();

View File

@ -7,7 +7,7 @@
class Evolved from BRepFill
---Purpose: Constructs a evolved volume from a spine (wire or face)
---Purpose: Constructs an evolved volume from a spine (wire or face)
-- and a profile ( wire).
uses
@ -45,10 +45,10 @@ is
returns Evolved from BRepFill
---Purpose: Creates an evolved shape by sweeping the <Profile>
-- along the <Spine>. <AxeProf> is used to set the
-- position of <Profile> along <Spine> as follow:
-- l <AxeProf> glisse sur le profil avec sa
-- direction colineaire a la normale au <Spine>, et sa
-- <XDirection> confondue avec la tangente au <Spine>.
-- position of <Profile> along <Spine> as follows:
-- <AxeProf> slides on the profile with direction
-- colinear to the normal to <Spine>, and its
-- <XDirection> mixed with the tangent to <Spine>.
--
raises
ConstructionError from Standard;

File diff suppressed because it is too large Load Diff

View File

@ -2,33 +2,6 @@
// Created: Mon Mar 7 10:01:42 1994
// Author: Bruno DUMORTIER
// <dub@fuegox>
// Modified: Mon Feb 23 09:28:46 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// traitement des wires ponctuels
// Modified: Tue Mar 10 17:08:58 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// suite traitement des KPart, calcul d'une BezierCurve
// au lieu d'une extraction d'iso pour Edge3 et Edge4
// Modified: Mon Apr 6 15:47:44 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// correction KPart (PRO12929)
// Modified: Thu Apr 30 15:24:17 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// debug KPart
// Modified: Fri Jul 31 15:14:19 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// KPart semi-cone pointe en bas : calcul de Edge4
//
// ajout des methodes Generated et GeneratedShapes
// Modified: Mon Nov 23 12:22:04 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// CTS21701 : orientation de l'edge dans DetectKPart
#include <BRepFill_Generator.ixx>
@ -88,10 +61,10 @@
Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
const TopoDS_Edge& Edge2)
{
// initialisations
// initializations
Standard_Integer IType = 0;
// caracteristiques de la premiere edge
// characteristics of the first edge
Standard_Real first1, last1, first2, last2, ff, ll;
TopLoc_Location loc;
TopoDS_Vertex V1, V2;
@ -99,7 +72,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
GeomAdaptor_Curve AdC1;
Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1);
// recherche de cas particulier
// find the particular case
gp_Pnt pos1, pos;
Standard_Real dist;
#ifndef DEB
@ -127,14 +100,14 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
AdC1.Load(curv1);
if (AdC1.GetType() == GeomAbs_Circle) {
// premiere section circulaire
// first circular section
IType = 1;
pos1 = AdC1.Circle().Location();
dist1 = AdC1.Circle().Radius();
axe1 = AdC1.Circle().Axis();
}
else if (AdC1.GetType() == GeomAbs_Line) {
// premiere section rectiligne
// first straight line section
IType = 4;
pos1 = AdC1.Line().Location();
dist1 = AdC1.Value(first1).Distance(AdC1.Value(last1));
@ -143,7 +116,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
axe1 = gp_Ax1(AdC1.Value(first1),dir);
}
else {
// premiere section quelconque
// first section of any type
IType = 0;
}
}
@ -155,9 +128,9 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
TopExp::Vertices(Edge2,V1,V2);
pos = BRep_Tool::Pnt(V1);
if (IType==1) {
// seul cas particulier avec une edge degeneree en bout : le cone
// the only particular case with degenerated edge at end : the cone
if (pos.IsEqual(pos1,Precision::Confusion())) {
// le sommet est confondu avec le centre du cercle
// the top is mixed with the center of the circle
IType = 0;
}
else {
@ -165,17 +138,17 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
gp_Dir dir(vec);
axe = gp_Ax1(pos1,dir);
if (axe.IsParallel(axe1,Precision::Angular())) {
// le sommet est bien sur l'axe du cercle
// the top is on the axis of the circle
IType = 2;
}
else {
// sommet incorrect --> pas de cas particulier
// incorrect top --> no particular case
IType = 0;
}
}
}
else if (IType != 4) { //not plane
// pas de cas particulier
else if (IType != 4) { //not a plane
// no particular case
IType = 0;
}
}
@ -194,15 +167,15 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
if (IType>0 && IType<4) {
if (AdC.GetType() != GeomAbs_Circle) {
// section non circulaire --> pas de cas particulier
// section not circular --> no particular case
IType = 0;
}
else {
if (AdC.Circle().Axis()
.IsCoaxial(axe1,Precision::Angular(),Precision::Confusion())) {
// meme axe
// same axis
if (Abs(AdC.Circle().Radius()-dist1)< Precision::Confusion()) {
// possibilite de cylindre ou de morceau de cylindre
// possibility of cylinder or a piece of cylinder
Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2);
Standard_Boolean Same,
SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() );
@ -214,16 +187,16 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
Same = SameParametricLength
&& ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ;
if (Same) {
// cylindre ou morceau de cylindre
// cylinder or piece of cylinder
IType = 1;
}
else {
// l'intervalle de definition n'est pas correct
// the interval of definition is not correct
IType = 0;
}
}
else {
// possibilite de tronc de cone
// possibility of cone truncation
Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2);
Standard_Boolean Same,
SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() );
@ -235,27 +208,27 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
Same = SameParametricLength
&& ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ;
if (Same) {
// tronc de cone
// truncation of cone
IType = 2;
}
else {
// l'intervalle de definition n'est pas correct
// the interval of definition is not correct
IType = 0;
}
}
if (AdC.Circle().Location().IsEqual(pos1,Precision::Confusion())) {
// les centres sont confondus
// the centers are mixed
IType = 0;
}
}
else {
// axe different
// different axis
if (AdC.Circle().Radius()==dist1) {
// tore ?
// torus ?
IType = 3;
}
else {
// rayon different --> pas de cas particulier
// different radius --> no particular case
IType = 0;
}
}
@ -263,7 +236,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
else if (IType>=4) {
if (AdC.GetType() != GeomAbs_Line) {
// section non rectiligne --> pas de cas particulier
// not a straight line section --> no particular case
IType = 0;
}
else {
@ -273,11 +246,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
gp_Dir dir(vec);
axe = gp_Ax1(AdC.Value(first2),dir);
if (axe.IsParallel(axe1,Precision::Angular())) {
// droite parallele
// parallel straight line
if (Abs(dist-dist1)<Precision::Confusion()) {
gp_Dir dir(gp_Vec(AdC1.Value(first1),AdC.Value(first2)));
if (dir.IsNormal(gp_Dir(vec),Precision::Angular())) {
// plan
// plane
IType = 4;
}
else {
@ -286,12 +259,12 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
}
else {
// longueur differente --> pas de cas particulier
// different length --> no particular case
IType = 0;
}
}
else {
// droite non parallele --> pas de cas particulier
// not parallel straight line --> no particular case
IType = 0;
}
}
@ -301,11 +274,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
IType = 4; //plane
else if (AdC.GetType() == GeomAbs_Circle)
{
// seul cas particulier avec une edge degeneree au debut : le cone
// the only particular case with degenerated edge at the beginning the cone
pos = AdC.Circle().Location();
axe = AdC.Circle().Axis();
if (pos1.IsEqual(pos,Precision::Confusion())) {
// le sommet est confondu avec le centre du cercle
// the top is mixed with the center of the circle
IType = 0;
}
else {
@ -313,11 +286,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
gp_Dir dir(vec);
axe1 = gp_Ax1(pos1,dir);
if (axe.IsParallel(axe1,Precision::Angular())) {
// le sommet est bien sur l'axe du cercle
// the top is on the axis of the circle
IType = -2;
}
else {
// sommet incorrect --> pas de cas particulier
// incorrect top --> no particular case
IType = 0;
}
}
@ -328,7 +301,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
}
// tore et extrusion ne sont pas des cas part.
// torus and extrusion are not particular cases.
if (IType == 3 || IType == 5) IType = 0;
return IType;
}
@ -354,7 +327,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
Handle(Geom_Curve) C1;
Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1);
if(degen1) {
// cone avec arete degeneree au sommet
// cone with degenerated edge at the top
TopExp::Vertices(Edge1,v1f,v1l);
}
else {
@ -377,7 +350,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
Handle(Geom_Curve) C2;
Standard_Boolean degen2 = BRep_Tool::Degenerated(Edge2);
if(degen2) {
// cone avec arete degeneree au sommet
// cone with degenerated edge at the top
TopExp::Vertices(Edge2,v2f,v2l);
}
else {
@ -419,7 +392,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
Handle(Geom_Surface) surface;
Standard_Real V, Rad;
if (IType==1) {
// surface cylindrique
// cylindrical surface
gp_Circ c1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
gp_Circ c2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
gp_Ax3 Ac1 = c1.Position();
@ -434,7 +407,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
( Cyl, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==2) {
// surface conique
// conical surface
gp_Circ k1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
gp_Ax3 Ak1 = k1.Position();
if (degen2) {
@ -460,7 +433,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
( Cone, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==-2) {
// surface conique avec le sommet au debut (degen1 est vrai)
// conical surface with the top at the beginning (degen1 is true)
gp_Circ k2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
gp_Ax3 Ak2 = k2.Position();
Ak2.SetLocation(BRep_Tool::Pnt(v1f));
@ -479,7 +452,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
( Cone, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==3) {
// surface torique ?
// torus surface ?
}
else if (IType==4) {
// surface plane
@ -508,7 +481,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
//( Plan, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==5) {
// surface d'extrusion ?
// surface of extrusion ?
}
else {
// IType incorrect
@ -638,12 +611,12 @@ void BRepFill_Generator::Perform()
Standard_Boolean Periodic
= (Edge1.Closed() || degen1) && (Edge2.Closed() || degen2);
// ATTENTION : un wire non ponctuel ne doit pas
// contenir une edge ponctuelle
// ATTENTION : a non-punctual wire should not
// contain a punctual edge
if (!wPoint1) ex1.Next();
if (!wPoint2) ex2.Next();
// initialisation des vertices
// initialization of vertices
Handle(Geom_Surface) Surf;
Standard_Real f1=0, l1=1, f2=0, l2=1;
if (Edge1.Orientation() == TopAbs_REVERSED)
@ -671,10 +644,10 @@ void BRepFill_Generator::Perform()
Periodic
= (E1IsReallyClosed || degen1) && (E2IsReallyClosed || degen2);
}
// traitement des KPart
// processing of KPart
Standard_Integer IType = DetectKPart(Edge1,Edge2);
if (IType==0) {
// pas de cas part
// no part cases
TopLoc_Location L,L1,L2;
Handle(Geom_Curve) C1, C2;
@ -735,7 +708,7 @@ void BRepFill_Generator::Perform()
B.MakeFace(Face,Surf,Precision::Confusion());
}
else {
// cas particulier
// particular case
CreateKPart(Edge1,Edge2,IType,Surf);
B.MakeFace(Face,Surf,Precision::Confusion());
}
@ -753,13 +726,13 @@ void BRepFill_Generator::Perform()
Handle(Geom_Curve) CC;
TColgp_Array1OfPnt Extremities(1,2);
if (IType==0) {
// cas general : Edge3 correspond a l'iso U=f1
// general case : Edge3 corresponds to iso U=f1
CC = Surf->UIso(f1);
first=f2;
last=l2;
}
else {
// cas particulier : il faut calculer la courbe 3d
// particular case : it is required to calculate the curve 3d
Extremities(1) = BRep_Tool::Pnt(V1f);
Extremities(2) = BRep_Tool::Pnt(V2f);
CC = new Geom_BezierCurve(Extremities);
@ -794,13 +767,13 @@ void BRepFill_Generator::Perform()
Handle(Geom_Curve) CC;
TColgp_Array1OfPnt Extremities(1,2);
if (IType==0) {
// cas general : Edge4 correspond a l'iso U=l1
// general case : Edge4 corresponds to iso U=l1
CC = Surf->UIso(l1);
first=f2;
last=l2;
}
else {
// cas particulier : il faut calculer la courbe 3d
// particular case : it is required to calculate the curve 3d
Extremities(1) = BRep_Tool::Pnt(V1l);
Extremities(2) = BRep_Tool::Pnt(V2l);
CC = new Geom_BezierCurve(Extremities);

View File

@ -30,7 +30,7 @@
//=======================================================================
//function : Norm
//purpose : Norme d'une Matrice
//purpose : Norm of a Matrix
//=======================================================================
static Standard_Real Norm(const gp_Mat& M) {
@ -50,7 +50,7 @@ static Standard_Real Norm(const gp_Mat& M) {
//=======================================================================
//function : ToG0
//purpose : Cacul une tranformation T tq T.M2 = M1
//purpose : Calculate tranformation T such as T.M2 = M1
//=======================================================================
static void ToG0(const gp_Mat& M1, const gp_Mat& M2, gp_Mat& T) {
@ -133,7 +133,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : TransformInCompatibleLaw
//purpose : Mise en continuite des loi
//purpose : Set in continuity of laws
//=======================================================================
void BRepFill_LocationLaw::TransformInCompatibleLaw(const Standard_Real TolAngular)
{
@ -168,7 +168,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
#if DEB
if (N2.Dot(T1) > 1.e-9) {
cout << "Imprecision dans TransformInCompatibleLaw" << endl;
cout << "Inprecision in TransformInCompatibleLaw" << endl;
cout << "--- T1.R(N2) = " << N2.Dot(T1) << endl;
gp_Vec tt;
tt = T1;
@ -186,7 +186,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : TransformInG0Law
//purpose : Mise en continuite des loi
//purpose : Set in continuity of laws
//=======================================================================
void BRepFill_LocationLaw::TransformInG0Law()
{
@ -204,7 +204,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
myLaws->Value(ipath)->SetTrsf(aux);
}
// La loi est elle periodique ?
// Is the law periodical ?
if (myPath.Closed()) {
myLaws->Value(myLaws->Length())->D0(Last, M1, V);
myLaws->Value(1)->GetDomain(First, Last);
@ -214,7 +214,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : DeleteTransform
//purpose : Supprime la Mise en continuite des loi
//purpose : Remove the setting in continuity of law.
//=======================================================================
void BRepFill_LocationLaw::DeleteTransform()
{
@ -228,7 +228,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : NbHoles
//purpose : Rechecherche des "Trous"
//purpose : Find "Holes"
//=======================================================================
Standard_Integer BRepFill_LocationLaw::NbHoles(const Standard_Real Tol)
{
@ -324,11 +324,11 @@ const TopoDS_Edge& BRepFill_LocationLaw::Edge(const Standard_Integer Index) cons
return V;
}
//=======================================================================
//===================================================================
//function : PerformVertex
//purpose : Calcul un vertex du balayage a partir d'un vertex d'une section
// et de l'indice de l'edge dans la trajectoire
//=======================================================================
//purpose : Calculate a vertex of sweeping from a vertex of section
// and the index of the edge in the trajectory
//===================================================================
void BRepFill_LocationLaw::PerformVertex(const Standard_Integer Index,
const TopoDS_Vertex& Input,
const Standard_Real TolMin,
@ -418,7 +418,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
{
First = myLength->Value(Index);
Last = myLength->Value(Index+1);
if (Last<0) { //Il faut effectuer le calcul
if (Last<0) { //It is required to carry out the calculation
Standard_Integer ii, NbE = myEdges->Length();
Standard_Real Length, f, l;
GCPnts_AbscissaPoint AbsC;
@ -441,7 +441,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
//=======================================================================
//function : IsG1
//purpose : Evalue la continuite de la loi en un vertex
//purpose : Evaluate the continuity of the law by a vertex
//=======================================================================
Standard_Integer
BRepFill_LocationLaw::IsG1(const Standard_Integer Index,
@ -506,23 +506,23 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
if (Norm(M1-M2) > SpatialTolerance) isG0 = Standard_False;
if (!isG0) return -1;
if (!Ok_D1) return 0; // Pas de controle de la derive
if (!Ok_D1) return 0; // No control of the derivative
if ( (DV1.Magnitude()>EpsNul) && (DV2.Magnitude()>EpsNul)
&& (DV1.Angle(DV2) > AngularTolerance) ) isG1 = Standard_False;
// Pour la suite, les test sont plutot empirique
// For the next, the tests are mostly empirical
Standard_Real Norm1 = Norm(DM1);
Standard_Real Norm2 = Norm(DM2);
// Si les 2 normes sont nulle c'est bon
// It two 2 norms are null, it is good
if ((Norm1 > EpsNul) || (Norm2 > EpsNul)) {
// sinon on compare les matrice normalise
// otherwise the normalized matrices are compared
if ((Norm1 > EpsNul) && (Norm2 > EpsNul)) {
DM1 /= Norm1;
DM2 /= Norm2;
if (Norm(DM1 - DM2) > AngularTolerance) isG1 = Standard_False;
}
else isG1 = Standard_False; // 1 Null l'autre pas
else isG1 = Standard_False; // 1 Null the other is not
}
if (isG1) return 1;
@ -541,13 +541,13 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
Standard_Integer iedge, NbE=myEdges->Length();
Standard_Boolean Trouve = Standard_False;
//Controle que les longueurs sont calcules
//Control that the lengths are calculated
if (myLength->Value(NbE+1) < 0) {
Standard_Real f, l;
CurvilinearBounds(NbE, f, l);
}
// Recherche de l'interval
// Find the interval
for (iedge=1; iedge<=NbE && !Trouve; ) {
if (myLength->Value(iedge+1) >= Abcissa) {
Trouve = Standard_True;
@ -581,10 +581,10 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
}
//=======================================================================
//===================================================================
//function : D0
//purpose : Positionement d'une section, a une abscisse curviligne donnee
//=======================================================================
//purpose : Position of a section, with a given curviline abscissa
//===================================================================
void BRepFill_LocationLaw::D0(const Standard_Real Abcissa,
TopoDS_Shape& W)
{
@ -608,7 +608,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
else {
W.Nullify();
#if DEB
cout << "BRepFill_LocationLaw::D0 : Attention positionement hors borne"
cout << "BRepFill_LocationLaw::D0 : Attention position out of limits"
<< endl;
#endif
}
@ -616,7 +616,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
//=======================================================================
//function : Abscissa
//purpose : Calcul l'abscisse d'un point
//purpose : Calculate the abscissa of a point
//=======================================================================
Standard_Real BRepFill_LocationLaw::Abscissa(const Standard_Integer Index,
const Standard_Real Param)

View File

@ -143,7 +143,7 @@ myKPart(0)
}
// recuperons les isos dans leur domaine de restriction.
// return isos in their domain of restriction.
Handle(Geom_Curve) UU1, UU2, VV1, VV2;
Handle(Geom_Surface) S;
S = BRep_Tool::Surface(myFace1,L);
@ -197,7 +197,7 @@ myKPart(0)
Vmax = dummyUmax;
}
// essai dub
// try duplication
GeomAdaptor_Surface GAS1(S);
GeomAbs_SurfaceType Type1 = GAS1.GetType();
@ -223,7 +223,7 @@ myKPart(0)
Precision::PConfusion(),
Vmin, Vmax);
}
// fin essai dub
// end try duplication
myU1 = Geom2dAdaptor_Curve(GeomProjLib::Curve2d(UU1, BasisPlane),
Umin, Umax);
@ -260,7 +260,7 @@ myKPart(0)
}
}
// recuperons les isos dans leur domaine de restriction.
// return isos in their domain of restriction.
S = BRep_Tool::Surface(myFace2,L);
if (!L.IsIdentity())
@ -313,7 +313,7 @@ myKPart(0)
Vmax = dummyUmax;
}
// essai dub
// try duplication
GeomAdaptor_Surface GAS2(S);
GeomAbs_SurfaceType Type2 = GAS2.GetType();
@ -339,7 +339,7 @@ myKPart(0)
Precision::PConfusion(),
Vmin, Vmax);
}
// fin essai dub
// end try duplication
myU2 = Geom2dAdaptor_Curve(GeomProjLib::Curve2d(UU2, BasisPlane),
Umin, Umax);
@ -350,12 +350,12 @@ myKPart(0)
Vmin, Vmax);
// eval if in a particular case.
// Cas Particulier si :
// 1) - Bissec droite
// - Bissec orthogonale a l`element de la base.
// ==> Iso sur les 2 faces.
// 2) - Bissec droite
// - les 2 surfaces sont des plans.
// Particular case if :
// 1) - Straight Bissectrice
// - Bissectrice orthogonal to the base element.
// ==> Iso on 2 faces.
// 2) - Straight Bissectrice
// - 2 surfaces are planes.
myCont = GeomAbs_C0;
if ( myBis.GetType() == GeomAbs_Line) {
@ -408,8 +408,8 @@ void BRepFill_MultiLine::Curves(Handle(Geom_Curve)& Curve,
P1 = ValueOnF1(myBis.FirstParameter());
P2 = ValueOnF1(myBis.LastParameter());
// on recherche la valeur de l iso avec le point milieu
// les bouts pouvant etre des points degeneres.
// find value of the with medium point
// the ends can be degenerated points.
PMil = ValueOnF1(0.5*(myBis.FirstParameter() + myBis.LastParameter()));
@ -600,7 +600,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
UU = Ext.LowerDistanceParameter();
Dist = Ext.LowerDistance();
}
// Controle avec les `bouts`
// Control with `ends`
D1 = P.Distance(TheU.Value(TheU.FirstParameter()));
D2 = P.Distance(TheU.Value(TheU.LastParameter()));
@ -646,7 +646,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
VV = TheV.LastParameter();
}
else {
// test si la courbe est du cote `Y negatif`.
// test if the curve is at the side `negative Y`.
if ( Min( PF.Y(),PL.Y()) < -Tol) Dist = -Dist;
Handle(Geom2d_Line) Line

View File

@ -109,7 +109,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
for (j=jdeb; j<=jfin; j++) {
// cas des sections bouclantes
// case of looping sections
if (j==jfin && vClosed) {
section.AddCurve(BS1);
}
@ -118,7 +118,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
// read the first edge to initialise CompBS;
edge = TopoDS::Edge(shapes.Value(1,j));
if (BRep_Tool::Degenerated(edge)) {
// edge degeneree : construction d'une courbe ponctuelle
// degenerated edge : construction of a point curve
TopExp::Vertices(edge,vl,vf);
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = BRep_Tool::Pnt(vf);
@ -129,7 +129,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curv->LastParameter());
}
else {
// recuperation de la courbe sur l'edge
// return the curve on the edge
Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last);
curvTrim = new Geom_TrimmedCurve(curv, first, last);
curvTrim->Transform(loc.Transformation());
@ -138,7 +138,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curvTrim->Reverse();
}
// transformation en BSpline reparametree sur [i-1,i]
// transformation into BSpline reparameterized on [i-1,i]
curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim);
if (curvBS.IsNull()) {
Handle(Geom_Curve) theCurve = curvTrim->BasisCurve();
@ -156,14 +156,14 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
BSplCLib::Reparametrize(0.,1.,BSK);
curvBS->SetKnots(BSK);
// initialisation
// initialization
GeomConvert_CompCurveToBSplineCurve CompBS(curvBS);
for (i=2; i<=NbEdges; i++) {
// read the edge
edge = TopoDS::Edge(shapes.Value(i,j));
if (BRep_Tool::Degenerated(edge)) {
// edge degeneree : construction d'une courbe ponctuelle
// degenerated edge : construction of a point curve
TopExp::Vertices(edge,vl,vf);
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = BRep_Tool::Pnt(vf);
@ -174,7 +174,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curv->LastParameter());
}
else {
// recuperation de la courbe sur l'edge
// return the curve on the edge
Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last);
curvTrim = new Geom_TrimmedCurve(curv, first, last);
curvTrim->Transform(loc.Transformation());
@ -183,7 +183,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curvTrim->Reverse();
}
// transformation en BSpline reparametree sur [i-1,i]
// transformation into BSpline reparameterized on [i-1,i]
curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim);
if (curvBS.IsNull()) {
Handle(Geom_Curve) theCurve = curvTrim->BasisCurve();
@ -213,11 +213,11 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
Standard_True, Standard_False, 1);
}
// recuperation de la section finale
// return the final section
BS = CompBS.BSplineCurve();
section.AddCurve(BS);
// cas des sections bouclantes
// case of looping sections
if (j==jdeb && vClosed) {
BS1 = BS;
}
@ -399,7 +399,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
//=======================================================================
//function : Init
//purpose : On cree une table de GeomFill_SectionLaw
//purpose : Create a table of GeomFill_SectionLaw
//=======================================================================
void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
const Standard_Boolean Build)
@ -415,7 +415,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
Standard_Real First, Last;
TopoDS_Wire W;
// On regarde si les wires debut et fin sont ponctuels
// Check if the start and end wires are punctual
W = TopoDS::Wire(myShapes(1));
for (wexp.Init(W); wexp.More(); wexp.Next())
// w1Point = w1Point && B.Degenerated(wexp.Current());
@ -427,10 +427,10 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
w2Point = w2Point && BRep_Tool::Degenerated(wexp.Current());
if (w2Point) ifin--;
// On regarde si les wires debut et fin sont identiques
// Check if the start and end wires are identical
vclosed = myShapes(1).IsSame(myShapes(NbSects));
// On compte le nombre d'aretes non degenerees
// Count the number of non-degenerated edges
W = TopoDS::Wire(myShapes(ideb));
for (NbEdge=0, wexp.Init(W); wexp.More(); wexp.Next())
// if (! B.Degenerated(wexp.Current())) NbEdge++;
@ -438,7 +438,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
myEdges = new (TopTools_HArray2OfShape) (1, NbEdge, 1, NbSects);
// On Remplit les tables
// Fill tables
uclosed = Standard_True;
for (jj=ideb;jj<=ifin;jj++){
@ -453,11 +453,11 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
}
}
// La loi est elle fermee en U ?
// Is the law closed by U ?
wClosed = W.Closed();
if (!wClosed) {
// le flag n'etant pas tres sur, on fait une verif
// if unsure about the flag, make check
TopoDS_Edge Edge1, Edge2;
TopoDS_Vertex V1,V2;
Edge1 = TopoDS::Edge (myEdges->Value(NbEdge,jj));
@ -492,7 +492,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
if (!wClosed) uclosed = Standard_False;
}
// sections en bout ponctuelles
// point sections at end
if (w1Point) {
W = TopoDS::Wire(myShapes(1));
wexp.Init(W);
@ -518,9 +518,9 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
mySurface = totalsurf(myEdges->Array2(),myShapes.Length(),NbEdge,
myParams,w1Point,w2Point,uclosed,vclosed,tol);
// On augmente le degre pour que le positionnement D2
// sur les GeomFill_NSections soit correct
// cf commentaires dans GeomFill_NSections
// Increase the degree so that the position D2
// on GeomFill_NSections could be correct
// see comments in GeomFill_NSections
if (mySurface->VDegree()<2) {
mySurface->IncreaseDegree(mySurface->UDegree(),2);
}
@ -532,7 +532,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
}
#endif
// On Remplit les tables
// Fill tables
if (Build) {
for (ii=1; ii<=NbEdge ; ii++) {
TColGeom_SequenceOfCurve NC;
@ -563,18 +563,18 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
if (E.Orientation() == TopAbs_REVERSED) {
Standard_Real aux;
Handle(Geom_Curve) CBis;
CBis = C->Reversed(); // Pour eviter de deteriorer la topologie
CBis = C->Reversed(); // To avoid the spoiling of the topology
aux = C->ReversedParameter(First);
First = C->ReversedParameter(Last);
Last = aux;
C = CBis;
}
if ((ii>1) || (!E.Closed()) ) { // On trimme C
if ((ii>1) || (!E.Closed()) ) { // Cut C
Handle(Geom_TrimmedCurve) TC =
new (Geom_TrimmedCurve) (C,First, Last);
C = TC;
}
// sinon On garde l'integrite de la courbe
// otherwise preserve the integrity of the curve
}
NC.Append(C);
}
@ -646,7 +646,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
///=======================================================================
//function : VertexTol
//purpose : Evalue le trou entre 2 edges de la section
//purpose : Evaluate the hole between 2 edges of the section
//=======================================================================
Standard_Real BRepFill_NSections::VertexTol(const Standard_Integer Index,
const Standard_Real Param) const
@ -654,7 +654,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
Standard_Real Tol = Precision::Confusion();
Standard_Integer I1, I2;
if ( (Index==0) || (Index==myEdges->ColLength()) ) {
if (!uclosed) return Tol; //Le moins faux possible
if (!uclosed) return Tol; //The least possible error
I1 = myEdges->ColLength();
I2 = 1;
}
@ -753,7 +753,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
TopoDS_Edge Edge1, Edge2;
if ( (Index==0) || (Index==myEdges->ColLength()) ) {
if (!uclosed) return GeomAbs_C0; //Le moins faux possible
if (!uclosed) return GeomAbs_C0; //The least possible error
Edge1 = TopoDS::Edge (myEdges->Value(myEdges->ColLength(),jj));
Edge2 = TopoDS::Edge (myEdges->Value(1,jj));

View File

@ -224,7 +224,7 @@ static Standard_Boolean KPartCircle
BRepFill_IndexedDataMapOfOrientedShapeListOfShape& myMap,
Standard_Boolean& myIsDone)
{
// Un seul contour qui est un cercle ferme
// The only contour which is a closed circle
TopExp_Explorer exp(mySpine,TopAbs_EDGE);
Standard_Integer NbEdges = 0;
TopoDS_Edge E;
@ -319,7 +319,7 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine,
myMap.Clear();
myMapSpine.Clear();
//------------------------------------------------------------------
// decoupe du spine pour les lieux bissecteurs.
// cut the spine for bissectors.
//------------------------------------------------------------------
// Modified by Sergey KHROMOV - Tue Nov 26 17:39:03 2002 Begin
static BRepMAT2d_Explorer Exp;
@ -339,8 +339,8 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine,
//-----------------------------------------------------
// Calcul de la carte des lieux bissecteurs a gauche.
// et des Liens Topologie -> elements de base de la carte.
// Calculate the map of bissectors to the left.
// and Links Topology -> base elements of the map.
//-----------------------------------------------------
// Modified by Sergey KHROMOV - Tue Nov 26 17:39:03 2002 Begin
@ -395,7 +395,7 @@ const TopTools_ListOfShape& BRepFill_OffsetWire::GeneratedShapes
{
if (!myCallGen) {
if (!myMapSpine.IsEmpty()) {
// myMapSpine peut etre vide si on est passe par PerformWithBilo.
// myMapSpine can be empty if passed by PerformWithBilo.
TopTools_DataMapIteratorOfDataMapOfShapeShape it(myMapSpine);
for (; it.More(); it.Next()) {
if (myMap.Contains(it.Key())) {
@ -632,7 +632,7 @@ void Compute (const TopoDS_Face& Spine,
TopoDS_Wire NewW = TopoDS::Wire(aLocalShape);
// TopoDS_Wire NewW = TopoDS::Wire(CurW.Moved(L));
B.Add(aShape,NewW);
// mise a jour de la Map.
// update Map.
TopoDS_Iterator it1( CurW);
TopoDS_Iterator it2( NewW);
for ( ; it1.More(); it1.Next(), it2.Next()) {
@ -675,32 +675,28 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
myMap.Clear();
//*****************************************
// si myOffset = 0, on ne s'emmerde pas !!
//*****************************************
if ( Abs(myOffset) < Precision::Confusion()) {
Compute(mySpine,myShape,myMap,Alt);
myIsDone = Standard_True;
return;
}
//******************************
// Calcul pour un offset non nul
//******************************
//********************************
// Calculate for a non null offset
//********************************
if (KPartCircle(mySpine,Offset,Alt,myShape,myMap,myIsDone)) return;
BRep_Builder myBuilder;
myBuilder.MakeCompound(TopoDS::Compound(myShape));
//---------------------------------------------------------------------
// MapNodeVertex : associe a chaque noeud de la carte (key1) et
// a chaque element du profil (key2) un vertex (item).
// MapBis : ensemble des edges ou vertex (item) generes par
// une bisectrice sur une face ou un edge (key)des
// tuyaux ou revol.
// MapVerPar : Map des parametres des vertex sur les edges paralleles
// la liste contenue dans MapVerPar (E) correspond aux
// parametres sur E des vertex contenu dans MapBis(E);
// MapNodeVertex : associate to each node of the map (key1) and to
// each element of the profile (key2) a vertex (item).
// MapBis : all edges or vertices (item) generated by
// a bisectrice on a face or an edge (key) of revolution tubes.
// MapVerPar : Map of parameters of vertices on parallel edges
// the list contained in MapVerPar (E) corresponds to
// parameters on E of vertices contained in MapBis(E);
//---------------------------------------------------------------------
@ -721,7 +717,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
(RefPlane->Translated( ALT * gp_Vec(RefPlane->Axis().Direction() )));
//---------------------------------------------------------------
// Construction des Cercles et des OffsetCurves
// Construction of Circles and OffsetCurves
//---------------------------------------------------------------
for (Standard_Integer ic = 1; ic <= Locus.NumberOfContours(); ic++) {
@ -743,13 +739,13 @@ void BRepFill_OffsetWire::PerformWithBiLo
#ifdef DEB
if (AffichEdge) {
cout << " Fin Construction des primitives geometriques"<<endl;
cout << " End Construction of geometric primitives "<<endl;
}
#endif
//---------------------------------------------------
// Constructions des vertex de l offset.
// Construction of offset vertices.
//---------------------------------------------------
BRepFill_DataMapOfOrientedShapeListOfShape Detromp;
Handle(MAT_Arc) CurrentArc;
@ -774,9 +770,9 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
#endif
//-----------------------------------------------------------------------
// Recuperation des elements du spine correspondant aux basicElts separes.
//-----------------------------------------------------------------------
//-------------------------------------------------------------------
// Return elements of the spine corresponding to separate basicElts.
//-------------------------------------------------------------------
S [0] = Link.GeneratingShape(CurrentArc->FirstElement());
S [1] = Link.GeneratingShape(CurrentArc->SecondElement());
@ -787,8 +783,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
BRepFill_DataMapOfShapeSequenceOfPnt MapSeqPar;
//-----------------------------------------------------------
// Recuperation des edges paralleles sur chaque face.
// Si pas d offset generees => saut a la bissectrice suivante.
// Return parallel edges on each face.
// If no offset generated => move to the next bissectrice.
//--------------------------------------------------------------
if (myMap.Contains(S[0]) && myMap.Contains(S[1])) {
E [0] = TopoDS::Edge(myMap.FindFromKey(S[0]).First());
@ -797,8 +793,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
else continue;
//-----------------------------------------------------------
// Construction des vertex correspondant au noeud de la carte.
// si ils sont sur l offset.
// Construction of vertices corresponding to the node of the map.
// if they are on the offset.
//-----------------------------------------------------------
TopoDS_Vertex VS,VE;
Handle(MAT_Node) Node1, Node2;
@ -828,7 +824,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
//---------------------------------------------
// Construction des geometries.
// Construction of geometries.
//---------------------------------------------
BRepFill_TrimEdgeTool Trim (Bisec,
Locus.GeomElt(CurrentArc->FirstElement()),
@ -836,7 +832,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
myOffset);
//-----------------------------------------------------------
// Construction des vertex sur les edges paralleles au spine.
// Construction of vertices on edges parallel to the spine.
//-----------------------------------------------------------
Trim.IntersectWith(E [0], E [1], Params);
@ -857,7 +853,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
Vertices.SetValue(1,VS);
else
// le point n avait pas ete trouve par IntersectWith
// the point was not found by IntersectWith
Vertices.Prepend(VS);
}
if (EndOnEdge) {
@ -867,17 +863,17 @@ void BRepFill_OffsetWire::PerformWithBiLo
Vertices.SetValue(Params.Length(),VE);
else
// le point n avait pas ete trouve par IntersectWith
// the point was not found by IntersectWith
Vertices.Append(VE);
}
//------------------------------------------------------------
// Mise a jour Detromp.
// Detromp permetra de supprimer les vertex sur l offset
// correspondant a des zones de tangences
// dans Detromp sont ranges les vertex qui limitent
// les portions de la bissectrices situes entre le spine et
// l offset.
// Update Detromp.
// Detromp allows to remove vertices on the offset
// corresponding to tangency zones
// Detromp ranks the vertices that limit
// the parts of the bissectrices located between the spine and the
// offset.
//------------------------------------------------------------
if (!Detromp.IsBound(S[0])) Detromp.Bind(S[0],EmptyList);
if (!Detromp.IsBound(S[1])) Detromp.Bind(S[1],EmptyList);
@ -886,8 +882,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
UpdateDetromp (Detromp(S[0]), Detromp(S[1]), Vertices, Params,
Bisec, StartOnEdge, EndOnEdge, Trim);
//----------------------------------------------
// Stockage des vertex sur les edges paralleles.
// on remplit MapBis et MapVerPar.
// Storage of vertices on parallel edges.
// fill MapBis and MapVerPar.
//----------------------------------------------
if (!Vertices.IsEmpty()) {
for (k = 0; k <= 1; k++) {
@ -904,11 +900,10 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
else {
//------------------------------------------------------------
//POUR LES CERCLES COMPLETS . la parallele peut etre contenue
// dans la zone sans intersection avec la frontiere
// pas d intersection
// si myoffset est < distance des noeuds la parallele peut etre
// valide.
// FOR COMPLETE CIRCLES. the parallel line can be contained
// in the zone without intersection with the border
// no intersection
// if myoffset is < distance of nodes the parallel can be valid.
//-------------------------------------------------------------
for (k = 0; k <= 1; k++) {
if (!MapBis.IsBound(E[k])) {
@ -923,12 +918,12 @@ void BRepFill_OffsetWire::PerformWithBiLo
#ifdef DEB
if (AffichEdge) {
cout << " Fin Construction des vertex sur les offsets"<<endl;
cout << " End Construction of vertices on offsets"<<endl;
}
#endif
//----------------------------------
// Construction des edges paralleles.
// Construction of parallel edges.
//----------------------------------
TopTools_IndexedDataMapOfShapeShape MapVV;
@ -955,7 +950,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
else {
//-----------------
// Cercles complets
// Complete circles
//-----------------
myMap(j).Append(CurrentEdge);
}
@ -992,11 +987,11 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
//----------------------------------
// Constructions des wires offset.
// Construction of offset wires.
//----------------------------------
MakeWires ();
// Mise a jour des vertex ( Construits dans le plan Z = 0) !!!
// Update vertices ( Constructed in the plane Z = 0) !!!
TopTools_MapOfShape MapVertex;
for ( TopExp_Explorer exp(myShape,TopAbs_VERTEX); exp.More(); exp.Next()) {
TopoDS_Vertex V = TopoDS::Vertex(exp.Current());
@ -1007,7 +1002,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
}
// Constructions des courbes 3d.
// Construction of curves 3d.
BRepLib::BuildCurves3d(myShape);
MapVertex.Clear();
TopExp_Explorer Explo( myShape, TopAbs_EDGE );
@ -1109,7 +1104,7 @@ void BRepFill_OffsetWire::PrepareSpine()
myMapSpine.Bind(V2,V2);
Cuts.Clear();
// Decoupe
// Cut
TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD);
// Modified by Sergey KHROMOV - Thu Nov 16 17:29:29 2000 Begin
if (nbEdges == 2 && nbResEdges == 0)
@ -1161,7 +1156,7 @@ void BRepFill_OffsetWire::PrepareSpine()
void BRepFill_OffsetWire::MakeWires()
{
//--------------------------------------------------------
// creation d une liste unique des edges paralelles crees.
// creation of a single list of created parallel edges.
//--------------------------------------------------------
TopTools_SequenceOfShape TheEdges;
TopTools_ListOfShape TheWires;
@ -1192,7 +1187,7 @@ void BRepFill_OffsetWire::MakeWires()
}
//--------------------------------------
// Creation des wires paralleles.
// Creation of parallel wires.
//--------------------------------------
BRep_Builder B;
@ -1227,7 +1222,7 @@ void BRepFill_OffsetWire::MakeWires()
while(!End) {
//-------------------------------
// Construction d un wire.
// Construction of a wire.
//-------------------------------
TopExp::Vertices(CE,V1,V2);
if (!CV.IsSame(V1)) CV = V1; else CV = V2;
@ -1250,7 +1245,7 @@ void BRepFill_OffsetWire::MakeWires()
if (!End) {
if (MVE.FindFromKey(CV).Extent() > 2) {
//cout <<"vertex sur plus de 2 edges dans une face."<<endl;
//cout <<"vertex on more that 2 edges in a face."<<endl;
}
for ( itl.Initialize(MVE.FindFromKey(CV)); itl.More(); itl.Next()) {
if (itl.Value().IsSame(CE)) {
@ -1281,9 +1276,9 @@ void BRepFill_OffsetWire::MakeWires()
TheWires.Append(NW);
}
// mise a jour de myShape :
// -- si un seul wire : myShape est un Wire
// -- si plusieurs wires : myShape est un Compound.
// update myShape :
// -- if only one wire : myShape is a Wire
// -- if several wires : myShape is a Compound.
if ( TheWires.Extent() == 1) {
myShape = TheWires.First();
}
@ -1572,13 +1567,11 @@ void BRepFill_OffsetWire::FixHoles()
//=======================================================================
//function : CutEdge
//purpose : Decoupe d une edge aux extrema de courbures et aux points
// d inflexion.
// Les cercles fermes sont aussi decoupes en deux.
// Si <Cuts> est vide l edge n est pas modifie.
// Le premier et le dernier vertex de l edge originale
// appartiennent respectivement a la premiere et derniere
// portions.
//purpose : Cut edge at the extrema of curvatures and points of inflexion.
// So, closed circles are cut in two.
// If <Cuts> is empty, the edge is not modified.
// The first and the last vertex of the initial edge
// belong to the first and the last parts respectively.
//=======================================================================
Standard_Integer CutEdge (const TopoDS_Edge& E,
const TopoDS_Face& F,
@ -1611,7 +1604,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
( Abs(f-l) >= PI) ) {
return 0;
//---------------------------
// Decoupe cercle ferme.
// Cut closed circle.
//---------------------------
Standard_Real m = (f + l)*0.5;
// Modified by Sergey KHROMOV - Wed Mar 6 17:37:28 2002 Begin
@ -1636,13 +1629,13 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
Cuts.Append(FE.Oriented(E.Orientation()));
Cuts.Append(LE.Oriented(E.Orientation()));
//--------
// Retour.
// Return.
//--------
return 2;
}
//-------------------------
// Decoupe de la courbe.
// Cut curve.
//-------------------------
Cuter.Perform(CT2d);
@ -1650,7 +1643,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
if (ForceCut == 0) {
if (Cuter.UnModified()) {
//-----------------------------
// edge non modifiee => retour.
// edge not modified => return.
//-----------------------------
return 0;
} else {
@ -1687,7 +1680,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
// Modified by Sergey KHROMOV - Thu Nov 16 17:28:37 2000 End
//--------------------------------------
// Creation des edges decoupees.
// Creation of cut edges.
//--------------------------------------
VF = V1;
@ -1779,7 +1772,7 @@ void MakeCircle (const TopoDS_Edge& E,
BRepFill_IndexedDataMapOfOrientedShapeListOfShape& Map,
const Handle(Geom_Plane)& RefPlane)
{
// eval the Axis of the Circle.
// evaluate the Axis of the Circle.
Standard_Real f,l;
Handle(Geom2d_Curve) GC = BRep_Tool::CurveOnSurface(E,F,f,l);
gp_Vec2d DX;
@ -1831,8 +1824,8 @@ void MakeOffset (const TopoDS_Edge& E,
Geom2dAdaptor_Curve AC(G2d,f,l);
if ( AC.GetType() == GeomAbs_Circle) {
// si l offset est superieur ou egal au rayon et du cote de la
// concavite du cercle => edge null.
// if the offset is greater otr equal to the radius and the side of the
// concavity of the circle => edge null.
gp_Circ2d C1(AC.Circle());
#ifdef DEB
Standard_Real radius =
@ -1845,7 +1838,7 @@ void MakeOffset (const TopoDS_Edge& E,
Standard_Real Signe = ( Crossed > 0.) ? 1. : -1.;
if (anOffset*Signe < AC.Circle().Radius()) {
// -anOffset vient d une Etrangete adaptoresque!
Handle(Geom2dAdaptor_HCurve) AHC =
new Geom2dAdaptor_HCurve(G2d);
Adaptor3d_OffsetCurve Off(AHC,-anOffset);
@ -1895,12 +1888,12 @@ void MakeOffset (const TopoDS_Edge& E,
//=======================================================================
//function : UpdateDetromp
//purpose : Pour chaque interval sur la bissectrice defini par params
// test si le point milieu est a une distance > offset
// dans ce cas les vertex correspondants aux extremites de l interval
// sont ranges dans le detrompeur.
// => Si un meme vertex apparait deux fois dans le detrompeur la
// frontiere de la zone de proximitee est tangente a l offset .
//purpose : For each interval on bissectrice defined by parameters
// test if the medium point is at a distance > offset
// in this case vertices corresponding to the extremities of the interval
// are ranked in the proofing.
// => If the same vertex appears in the proofing, the
// border of the zone of proximity is tangent to the offset .
//=======================================================================
void UpdateDetromp (TopTools_ListOfShape& Detromp1,
@ -1921,7 +1914,7 @@ void UpdateDetromp (TopTools_ListOfShape& Detromp1,
U1 = Bis->FirstParameter();
if (SOnE) {
// le premier point de la bissectrice est sur l offset
// the first point of the bissectrice is on the offset
V1 = TopoDS::Vertex(Vertices.Value(ii));
ii++;
}
@ -1944,7 +1937,7 @@ void UpdateDetromp (TopTools_ListOfShape& Detromp1,
ii ++;
}
// test point milieu entre le dernier params et la fin de la bissectrice.
// test medium point between the last parameter and the end of the bissectrice.
U2 = Bis->LastParameter();
if (!EOnE) {
if (!Precision::IsInfinite(U2)) {
@ -1982,7 +1975,7 @@ Standard_Boolean VertexFromNode (const Handle(MAT_Node)& aNode,
if (!aNode->Infinite() && Abs(aNode->Distance()-Offset) < Tol) {
//------------------------------------------------
// le Noeud donne un vertex sur l offset
// the Node gives a vertex on the offset
//------------------------------------------------
if (MapNodeVertex.IsBound(aNode)) {
VN = TopoDS::Vertex(MapNodeVertex(aNode));
@ -2043,7 +2036,7 @@ void TrimEdge (const TopoDS_Edge& E,
S.Clear();
//-----------------------------------------------------------
// Tri des deux sequences en fonction du parametre sur l edge.
// Parse two sequences depending on the parameter on the edge.
//-----------------------------------------------------------
while (Change) {
Change = Standard_False;
@ -2057,7 +2050,7 @@ void TrimEdge (const TopoDS_Edge& E,
}
//----------------------------------------------------------
// Si un vertex n est pas dans le detrompeur il est elimine.
// If a vertex is not in the proofing, it is eliminated.
//----------------------------------------------------------
if (!BRep_Tool::Degenerated(E)) {
for (Standard_Integer k = 1; k <= TheVer.Length(); k ++) {
@ -2071,9 +2064,9 @@ void TrimEdge (const TopoDS_Edge& E,
}
//----------------------------------------------------------
// Si un vertex_double apparait deux fois dans le detrompeur
// le vertex est elimine .
// sinon on garde une seule de ces representations.
// If a vertex_double appears twice in the proofing
// the vertex is removed.
// otherwise preserve only one of its representations.
//----------------------------------------------------------
if (!BRep_Tool::Degenerated(E)) {
for (Standard_Integer k = 1; k < TheVer.Length(); k ++) {
@ -2103,9 +2096,9 @@ void TrimEdge (const TopoDS_Edge& E,
}
}
//-----------------------------------------------------------
// Creation des edges.
// le nombre de vertex doit etre pair les edges a creer vont
// d un vertex d indice impair i au vertex i+1;
// Creation of edges.
// the number of vertices should be even. The created edges
// go from a vertex with uneven index i to vertex i+1;
//-----------------------------------------------------------
for (Standard_Integer k = 1; k < TheVer.Length(); k = k+2) {
TopoDS_Shape aLocalShape = E.EmptyCopied();
@ -2150,7 +2143,7 @@ void TrimEdge (const TopoDS_Edge& E,
//=======================================================================
//function : DoubleOrNotInside
//purpose : return True si V apparait 2 fois dans LV ou n est pas dedans.
//purpose : return True if V appears twice in LV or is not inside.
//=======================================================================
Standard_Boolean DoubleOrNotInside (const TopTools_ListOfShape& LV,
@ -2369,7 +2362,7 @@ static void QuasiFleche(const Adaptor3d_Curve& C,
Standard_Real theFleche=0;
Standard_Boolean flecheok = Standard_False;
if (Norme > Eps) {
// Evaluation de la fleche par interpolation . Voir IntWalk_IWalking_5.gxx
// Evaluation of the arrow by interpolation. See IntWalk_IWalking_5.gxx
Standard_Real N1 = Vdeb.SquareMagnitude();
Standard_Real N2 = Vdelta.SquareMagnitude();
if (N1 > Eps && N2 > Eps) {

View File

@ -98,9 +98,9 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
new (GeomFill_CurveAndTrihedron) (TLaw);
myLoc = new (BRepFill_Edge3DLaw) (mySpine, Loc);
if (myLoc->NbLaw() == 0) {
return; // Cas degenere
return; // Degenerated case
}
myLoc->TransformInG0Law(); // Mise en continuite
myLoc->TransformInG0Law(); // Set into continuity
BRepFill_SectionPlacement Place(myLoc, Profile);
myTrsf = Place.Transformation();
@ -111,7 +111,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
TheProf = myProfile;
TheProf.Location(Loc2.Multiplied(Loc1));
// Construit les Shape First && Last
// Construct First && Last Shape
Handle(GeomFill_LocationLaw) law;
gp_Mat M;
@ -134,7 +134,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
myLoc->Law(myLoc->NbLaw())->GetDomain(first, last);
myLoc->Law(myLoc->NbLaw())->D0(last,M, V);
// try { // Pas joli mais il n'y as pas d'autre moyens de tester SetValues
// try { // Not good, but there are no other means to test SetValues
fila.SetValues(M(1,1), M(1,2), M(1,3), V.X(),
M(2,1), M(2,2), M(2,3), V.Y(),
M(3,1), M(3,2), M(3,3), V.Z(),
@ -330,12 +330,12 @@ TopoDS_Shape BRepFill_Pipe::Section(const TopoDS_Vertex& VSpine) const
//=======================================================================
//function : PipeLine
//purpose : Construit un wire par balayage d'un point
//purpose : Construct a wire by sweeping of a point
//=======================================================================
TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) const
{
// Postionnement
// Postioning
gp_Pnt P;
P = Point;
P.Transform(myTrsf);
@ -344,7 +344,7 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) const
Handle(BRepFill_ShapeLaw) Section =
new (BRepFill_ShapeLaw) (MkV.Vertex());
// Balayage
// Sweeping
BRepFill_Sweep MkSw(Section, myLoc, Standard_True);
MkSw.Build( BRepFill_Modified, GeomFill_Location, GeomAbs_C2, myDegmax, mySegmax );
TopoDS_Shape aLocalShape = MkSw.Shape();
@ -486,7 +486,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
MkSw.Build( BRepFill_Modified, GeomFill_Location, GeomAbs_C2, myDegmax, mySegmax );
result = MkSw.Shape();
// Reperage des elements
// Labeling of elements
if (mySections.IsNull()) {
myFaces = MkSw.SubShape();
mySections = MkSw.Sections();
@ -582,11 +582,10 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
return result;
}
//=======================================================================
//============================================================================
//function : FindEdge
//purpose : Recherche le numero de bande correspondant a une edge du
// profil.
//=======================================================================
//purpose : Find the number of edge corresponding to the edge of the profile.
//============================================================================
Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S,
const TopoDS_Edge& E,
@ -640,8 +639,7 @@ Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S,
//=======================================================================
//function : FindVertex
//purpose : Recherche le numero de bande correspondant a une edge du
// profil.
//purpose : Find the number of edge corresponding to an edge of the profile.
//=======================================================================
Standard_Integer BRepFill_Pipe::FindVertex(const TopoDS_Shape& S,

View File

@ -44,7 +44,7 @@
#include <GeomFill_GuideTrihedronPlan.hxx>
#include <GeomFill_LocationGuide.hxx>
//Specif Guide
//Specification Guide
#include <GeomAdaptor_HCurve.hxx>
#include <gp_Trsf.hxx>
@ -80,7 +80,7 @@ static Standard_Boolean BuildBoundaries(const BRepFill_Sweep& theS
//=======================================================================
//function : ComputeSection
//purpose : Construit une section intermediaire
//purpose : Construct an intermediary section
//=======================================================================
static Standard_Boolean ComputeSection(const TopoDS_Wire& W1,
@ -112,7 +112,7 @@ static Standard_Boolean ComputeSection(const TopoDS_Wire& W1,
//=======================================================================
//function : PerformTransition
//purpose : Modifie une loi de loc en fonction de Transition
//purpose : Modify a law of location depending on Transition
//=======================================================================
static void PerformTransition(const BRepFill_TransitionStyle Mode,
@ -127,7 +127,7 @@ static void PerformTransition(const BRepFill_TransitionStyle Mode,
}
//=======================================================================
//function : PerformPlan
//purpose : Construit s'il existe un plan de remplissage
//purpose : Construct a plane of filling if exists
//=======================================================================
static Standard_Boolean PerformPlan(TopoDS_Shape& S)
@ -202,7 +202,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
myLaw.Nullify();
SetTolerance();
// Attention aux wire closed non declare !
// Attention to closed non-declared wire !
if (!mySpine.Closed()) {
TopoDS_Vertex Vf, Vl;
TopExp::Vertices(mySpine, Vf, Vl);
@ -212,7 +212,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Set
//purpose : Definie une loi de Frenet (Corrige)
//purpose : Define a law of Frenet (Correct)
//=======================================================================
void BRepFill_PipeShell::Set(const Standard_Boolean IsFrenet)
{
@ -228,12 +228,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Handle(GeomFill_CurveAndTrihedron) Loc =
new (GeomFill_CurveAndTrihedron) (TLaw);
myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc);
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize sections.
}
//=======================================================================
//function : Set
//purpose : Definie une loi Constante
//purpose : Define a law Constant
//=======================================================================
void BRepFill_PipeShell::Set(const gp_Ax2& Axe)
{
@ -245,12 +245,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Handle(GeomFill_CurveAndTrihedron) Loc =
new (GeomFill_CurveAndTrihedron) (TLaw);
myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc);
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize sections.
}
//=======================================================================
//function : Set
//purpose : Construit une loi de location de type binormal fixe
//purpose : Construct a law of location of binormal fixed type
//=======================================================================
void BRepFill_PipeShell::Set(const gp_Dir& BiNormal)
{
@ -266,40 +266,40 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Set
//purpose : Construit une loi de location de type Darboux
//purpose : Construct a law of location of Darboux type
//=======================================================================
Standard_Boolean BRepFill_PipeShell::Set(const TopoDS_Shape& SpineSupport)
{
Standard_Boolean B;
// Il faut une loi de location speciale
// A special law of location is required
Handle(BRepFill_EdgeOnSurfLaw) loc =
new (BRepFill_EdgeOnSurfLaw) (mySpine, SpineSupport);
B = loc->HasResult();
if (B) {
myLocation = loc;
myTrihedron = GeomFill_IsDarboux;
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize the sections.
}
return B;
}
//=======================================================================
//function : Set
//purpose : Definit une loi a l'aide d'un contour guide
//purpose : Defines a lawv with help of a guided contour
//=======================================================================
void BRepFill_PipeShell::Set(const TopoDS_Wire& AuxiliarySpine,
const Standard_Boolean CurvilinearEquivalence,
const Standard_Boolean KeepContact)
{
// Reorganisation du guide (pb d'orientation et d'origine)
// Reorganization of the guide (pb of orientation and origin)
TopoDS_Wire TheGuide;
TheGuide = AuxiliarySpine;
Standard_Boolean SpClose = mySpine.Closed(),
GuideClose = AuxiliarySpine.Closed();
if (!SpClose && !GuideClose) {
// Cas ouvert reorientation du guide
// Case open reorientation of the guide
TopoDS_Wire sp = mySpine;
TopTools_SequenceOfShape Seq;
Seq.Append(sp);
@ -311,8 +311,8 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
TheGuide = TopoDS::Wire(CW.Shape().Value(2));
}
else if (GuideClose) {
// Cas guide ferme : Determination de l'origine
// & reorientation du guide
// Case guide closed : Determination of the origin
// & reorientation of the guide
gp_Vec Dir;
gp_Pnt SpOr;
if (!SpClose) {
@ -336,16 +336,16 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
if (Affich)
DBRep::Set("theguide", TheGuide);
#endif
// on transforme le guide en 1 seule courbe (periodic si posssible)
// transform the guide in a single curve (periodic if posssible)
Handle(BRepAdaptor_HCompCurve) Guide =
new (BRepAdaptor_HCompCurve) (TheGuide);
Guide->ChangeCurve().SetPeriodic(Standard_True);
if (CurvilinearEquivalence) { // triedre par abscisse curviligne reduite
if (CurvilinearEquivalence) { // trihedron by curvilinear reduced abscissa
if (KeepContact)
myTrihedron = GeomFill_IsGuideACWithContact; // avec rotation
myTrihedron = GeomFill_IsGuideACWithContact; // with rotation
else
myTrihedron = GeomFill_IsGuideAC; // sans rotation
myTrihedron = GeomFill_IsGuideAC; // without rotation
Handle(GeomFill_GuideTrihedronAC) TLaw
= new (GeomFill_GuideTrihedronAC) (Guide);
@ -353,11 +353,11 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
new (GeomFill_LocationGuide) (TLaw);
myLocation = new (BRepFill_ACRLaw) (mySpine, Loc);
}
else {// triedre par plan
else {// trihedron by plane
if (KeepContact)
myTrihedron = GeomFill_IsGuidePlanWithContact; // avec rotation
myTrihedron = GeomFill_IsGuidePlanWithContact; // with rotation
else
myTrihedron = GeomFill_IsGuidePlan; // sans rotation
myTrihedron = GeomFill_IsGuidePlan; // without rotation
Handle(GeomFill_GuideTrihedronPlan) TLaw =
new (GeomFill_GuideTrihedronPlan) (Guide);
@ -365,12 +365,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
new (GeomFill_LocationGuide) (TLaw);
myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc);
}
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize the sections.
}
//=======================================================================
//function : Add
//purpose : Ajoute une Section
//purpose : Add a Section
//=======================================================================
void BRepFill_PipeShell::Add(const TopoDS_Shape& Profile,
const Standard_Boolean WithContact,
@ -384,14 +384,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Add
//purpose : Ajoute une Section
//purpose : Add a Section
//=======================================================================
void BRepFill_PipeShell::Add(const TopoDS_Shape& Profile,
const TopoDS_Vertex& Location,
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
Delete(Profile); // Pas de duplication
Delete(Profile); // No duplication
BRepFill_Section S (Profile, Location, WithContact, WithCorrection);
mySeq.Append(S);
mySection.Nullify();
@ -400,7 +400,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : SetLaw
//purpose : Section + Loi d'homothetie
//purpose : Section + law of homothety
//=======================================================================
void BRepFill_PipeShell::SetLaw(const TopoDS_Shape& Profile,
const Handle(Law_Function)& L,
@ -415,7 +415,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : SetLaw
//purpose : Section + Loi d'homothetie
//purpose : Section + Law of homothety
//=======================================================================
void BRepFill_PipeShell::SetLaw(const TopoDS_Shape& Profile,
const Handle(Law_Function)& L,
@ -434,7 +434,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Delete
//purpose : Supprime une section
//purpose : Delete a section
//=======================================================================
void BRepFill_PipeShell::Delete(const TopoDS_Shape& Profile)
{
@ -500,14 +500,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : SetTransition
//purpose : Definit le mode de traitement des coins
//purpose : Defines the mode of processing of corners
//=======================================================================
void BRepFill_PipeShell::SetTransition(const BRepFill_TransitionStyle Mode,
const Standard_Real Angmin,
const Standard_Real Angmax)
{
if (myTransition != Mode)
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize the sections.
myTransition = Mode;
angmin = Angmin;
angmax = Angmax;
@ -515,7 +515,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Simulate
//purpose : Calcul N Sections
//purpose : Calculate N Sections
//=======================================================================
void BRepFill_PipeShell::Simulate(const Standard_Integer N,
TopTools_ListOfShape& List)
@ -530,14 +530,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Standard_Boolean Finis=Standard_False;
TopoDS_Shape W;
// Calcul des parametres de digitalisation
// Calculate the parameters of digitalization
mySection->Law(1)->GetDomain(FirstS, Last);
DeltaS = Last - FirstS;
myLocation->CurvilinearBounds(NbL,First, Length);
Delta = Length;
if (N>1) Delta /= (N-1);
myLocation->CurvilinearBounds(1,First, Last); // Init de Last
myLocation->CurvilinearBounds(1,First, Last); // Initiation of Last
for (U=0.0, ii=1; !Finis ; U+=Delta) {
if (U >= Length) {
U = Length;
@ -545,7 +545,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
}
else {
if (ii < NbL) myLocation->CurvilinearBounds(NbL,First, Last);
if (U > Last) U = (Last+First)/2; // On ne saute pas une arete
if (U > Last) U = (Last+First)/2; // The edge is not skipped
if (U> First) ii++;
}
US = FirstS + (U/Length)*DeltaS;
@ -558,7 +558,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Build
//purpose : Construit le Shell et l'historique
//purpose : Construct the Shell and the history
//=======================================================================
Standard_Boolean BRepFill_PipeShell::Build()
{
@ -575,7 +575,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
return Standard_False;
}
// 2) Calcul de myFirst et myLast
// 2) Calculate myFirst and myLast
mySection->Law(1)->GetDomain(FirstS, LastS);
mySection->D0(FirstS, myFirst);
myLocation->D0(0, myFirst);
@ -671,7 +671,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Standard_Boolean BRepFill_PipeShell::MakeSolid()
{
if (myShape.IsNull())
StdFail_NotDone::Raise("PipeShell is not build");
StdFail_NotDone::Raise("PipeShell is not built");
Standard_Boolean B = myShape.Closed();
BRep_Builder BS;
@ -681,7 +681,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
B = (myFirst.Closed() && myLast.Closed());
}
if (B) {
// Il faut boucher les extremites
// It is necessary to block the extremities
B = PerformPlan(myFirst);
if (B) {
B = PerformPlan(myLast);
@ -721,7 +721,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Shape
//purpose : Renvoi le resultat
//purpose : Return the result
//=======================================================================
const TopoDS_Shape& BRepFill_PipeShell::Shape() const
{
@ -730,7 +730,7 @@ const TopoDS_Shape& BRepFill_PipeShell::Shape() const
//=======================================================================
//function : FirstShape
//purpose : Renvoi la section du debut
//purpose : Return the start section
//=======================================================================
const TopoDS_Shape& BRepFill_PipeShell::FirstShape() const
{
@ -739,7 +739,7 @@ const TopoDS_Shape& BRepFill_PipeShell::FirstShape() const
//=======================================================================
//function : LastShape
//purpose : Renvoi la section de fin
//purpose : Return the end section
//=======================================================================
const TopoDS_Shape& BRepFill_PipeShell::LastShape() const
{
@ -765,16 +765,16 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
//=======================================================================
//function : Prepare
//purpose : - Verifie que tout est pret
// - Construit la loi de section
// - Construit la loi de location si necessaire
// - Calcul First & Last
//purpose : - Check that everything is ready
// - Construct the law of section
// - Construct the law of location if required
// - Calculate First & Last
//=======================================================================
void BRepFill_PipeShell::Prepare()
{
TopoDS_Wire theSect;
if (!IsReady()) StdFail_NotDone::Raise("PipeShell");
if (!myLocation.IsNull() && !mySection.IsNull()) return; // C'est deja pret
if (!myLocation.IsNull() && !mySection.IsNull()) return; // It is ready
//Check set of section for right configuration of punctual sections
Standard_Integer i;
@ -803,7 +803,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
Standard_Failure::Raise("Wrong usage of punctual sections");
}
// Construction de la loi de location
// Construction of the law of location
if(myLocation.IsNull())
{
switch(myTrihedron)
@ -818,17 +818,17 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
break;
}
default :
{ // Pas prevu !
{ // Not planned!
Standard_ConstructionError::Raise("PipeShell");
}
}
}
//Transformation de la loi (Gestion Transition)
//Transformation of the law (Transition Management)
PerformTransition(myTransition, myLocation, angmin);
// Construction de la loi de section
// Construction of the section law
if (mySeq.Length() == 1) {
Standard_Real p1;
gp_Trsf aTrsf;
@ -867,20 +867,20 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
}
// sections bouclantes ?
// looping sections ?
if (myLocation->IsClosed()) {
if (ideb>0) {
// on place la section initiale en position finale
// place the initial section at the final position
Param.Append(V2);
WSeq.Append(WSeq(ideb));
}
else if (ifin>0) {
// on place la section finale en position initiale
// place the final section at the initial position
Param.Append(V1);
WSeq.Append(WSeq(ifin));
}
else {
// il faut trouver une section moyenne a imposer en V1 et en V2
// it is necessary to find a medium section to impose by V1 and by V2
Standard_Real pmin = Param.Value(1), pmax = Param.Value(1);
TopoDS_Wire Wmin = TopoDS::Wire(WSeq.Value(1)), Wmax;
for (iseq=2;iseq<=WSeq.Length();iseq++) {
@ -893,12 +893,12 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
Wmax = TopoDS::Wire(WSeq.Value(iseq));
}
}
// section moyenne entre Wmin et Wmax
// medium section between Wmin and Wmax
TopoDS_Wire Wres;
Standard_Real dmin = Abs(pmin-V1);
Standard_Real dmax = Abs(pmax-V2);
if (ComputeSection(Wmin,Wmax,dmin,dmax,Wres)) {
// on impose la section Wres au debut et a la fin
// impose section Wres at the beginning and the end
Param.Append(V1);
WSeq.Append(Wres);
Param.Append(V2);
@ -909,7 +909,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
}
}
// tri des sections par parametre croissant
// parse sections by increasing parameter
Standard_Boolean play_again = Standard_True;
while (play_again) {
play_again = Standard_False;
@ -938,7 +938,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
// Calcul des sections de travail
// Calculate work sections
TopTools_SequenceOfShape WorkingSections;
WorkingSections.Clear();
TopTools_DataMapOfShapeListOfShape WorkingMap;
@ -957,7 +957,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
}// else
// on modifie la loi de location si contact
// modify the law of location if contact
if ( (myTrihedron == GeomFill_IsGuidePlanWithContact)
|| (myTrihedron == GeomFill_IsGuideACWithContact) ) {
Standard_Real fs, f, l, Delta, Length;
@ -972,7 +972,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
myLocation->CurvilinearBounds(ipath, f, l);
Loc = Handle(GeomFill_LocationGuide)::DownCast(myLocation->Law(ipath));
Loc->Set(Sec, Standard_True, fs + f*Delta, fs + l*Delta,
old_angle, angle); // on force la rotation
old_angle, angle); // force the rotation
old_angle = angle;
}
}
@ -982,8 +982,8 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
//=======================================================================
//function : Place
//purpose : Met en Place une Section dans le repere local
// et retourne son parametre sur la trajectoire
//purpose : Implement a Section in the local refernce frame
// and return its parameter on the trajectory
//=======================================================================
void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
TopoDS_Wire& W,
@ -1006,7 +1006,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
//=======================================================================
//function : ResetLoc
//purpose : Supprime les references aux sections dans les loi de location
//purpose : Remove references to the sections in the laws of location
//=======================================================================
void BRepFill_PipeShell::ResetLoc()
{
@ -1015,7 +1015,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
Handle(GeomFill_LocationGuide) Loc;
for (Standard_Integer isec=1; isec<=myLocation->NbLaw(); isec++) {
Loc = Handle(GeomFill_LocationGuide)::DownCast(myLocation->Law(isec));
Loc->EraseRotation();// on supprime la rotation
Loc->EraseRotation();// remove the rotation
}
}
}

View File

@ -30,7 +30,7 @@
//=======================================================================
//function : NbLaw
//purpose : Donne le nombre de loi elementaire (ou Geometrique)
//purpose : Gives the number of elementary (or Geometric) law
//=======================================================================
Standard_Integer BRepFill_SectionLaw::NbLaw() const
{
@ -68,7 +68,7 @@
//=======================================================================
//function : Init
//purpose : Prepare le parcour d'un wire
//purpose : Prepare the parsing of a wire
//=======================================================================
void BRepFill_SectionLaw::Init(const TopoDS_Wire& W)
{
@ -77,7 +77,7 @@
//=======================================================================
//function :
//purpose : Parcourt d'un wire en sautant les Edges degenere
//purpose : Parses the wire omitting the degenerated Edges
//=======================================================================
TopoDS_Edge BRepFill_SectionLaw::CurrentEdge()
{
@ -87,14 +87,14 @@
Standard_Boolean Suivant = Standard_False;
if (myIterator.More()) {
E = myIterator.Current();
// Suivant = (B.Degenerated(E));
// Next = (B.Degenerated(E));
Suivant = (BRep_Tool::Degenerated(E));
}
while (Suivant) {
myIterator.Next();
E = myIterator.Current();
// Suivant = (B.Degenerated(E) && myIterator.More());
// Next = (B.Degenerated(E) && myIterator.More());
Suivant = (BRep_Tool::Degenerated(E) && myIterator.More());
}

View File

@ -144,7 +144,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
// modified by NIZHNY-629 Fri Jul 25 11:10:27 2003 b
// // section ponctuelle
// // punctual section
// Ex.Init(mySection, TopAbs_EDGE);
// Standard_Boolean isPonctual = Standard_False;
// if (Ex.More()) {
@ -270,7 +270,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
GeomFill_SectionPlacement Place(myLaw->Law(1), theSection);
// Dans le cas generale : Localisation via une concatenation de la spine
// In the general case : Localisation via concatenation of the spine
TColStd_Array1OfReal SuperKnot(1, myLaw->NbLaw()+1);
TColStd_Array1OfInteger Index(1, myLaw->NbLaw());
for (ii=1; ii<=myLaw->NbLaw(); ii++) {
@ -310,7 +310,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
Ind1 = Index(Ind1);
if (Ind2) Ind2 = Index(Ind2);
// Positionnement sur l'edge (ou les 2 Edges) localisee(s)
// Positioning on the localized edge (or 2 Edges)
Standard_Real Angle;
Place.SetLocation(myLaw->Law(Ind1));
if(TheV.IsNull())

View File

@ -33,8 +33,8 @@
//=======================================================================
//function : Create
//purpose : On traite le cas du Vertex en construisant, une line,
// ayant le vertex pour origine
//purpose : Process the case of Vertex by constructing a line
// with the vertex in the origin
//=======================================================================
BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V,
const Standard_Boolean Build)
@ -43,14 +43,14 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V,
{
TheLaw.Nullify();
uclosed = Standard_False;
vclosed = Standard_True; // loi constante
vclosed = Standard_True; // constant law
myEdges = new (TopTools_HArray1OfShape) (1, 1);
myEdges->SetValue(1, V);
if (Build) {
myLaws = new (GeomFill_HArray1OfSectionLaw) (1, 1);
// gp_Pnt Origine;
gp_Dir D(1,0,0); //Suivant la normal
gp_Dir D(1,0,0); //Following the normal
Handle(Geom_Line) L = new (Geom_Line)(BRep_Tool::Pnt(V), D);
Standard_Real Last = 2*BRep_Tool::Tolerance(V)+Precision::PConfusion();
Handle(Geom_TrimmedCurve) TC = new (Geom_TrimmedCurve) (L, 0, Last);
@ -78,7 +78,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
//=======================================================================
//function : Create
//purpose : Wire evolutif
//purpose : Evolutive Wire
//=======================================================================
BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
@ -94,7 +94,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
//=======================================================================
//function : Init
//purpose : Cas du wire : On cree une table de GeomFill_SectionLaw
//purpose : Case of the wire : Create a table of GeomFill_SectionLaw
//=======================================================================
void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
{
@ -132,7 +132,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
if (E.Orientation() == TopAbs_REVERSED) {
Standard_Real aux;
Handle(Geom_Curve) CBis;
CBis = C->Reversed(); // Pour eviter de deteriorer la topologie
CBis = C->Reversed(); // To avoid the deterioration of the topology
aux = C->ReversedParameter(First);
First = C->ReversedParameter(Last);
Last = aux;
@ -152,11 +152,11 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
}
}
if ((ii>1) || !IsReallyClosed ) { // On trimme C
if ((ii>1) || !IsReallyClosed ) { // Trim C
Handle(Geom_TrimmedCurve) TC = new Geom_TrimmedCurve(C,First, Last);
C = TC;
}
// sinon On garde l'integrite de la courbe
// otherwise preserve the integrity of the curve
if (TheLaw.IsNull()) {
myLaws->ChangeValue(ii) = new GeomFill_UniformSection(C);
}
@ -171,10 +171,10 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
// cout << "new law" << endl;
// La loi est elle ferme en U ?
// Is the law closed by U ?
uclosed = W.Closed();
if (!uclosed) {
// le flag n'etant pas tres sur, on fait une verif
// if not sure about the flag, make check
TopoDS_Edge Edge1, Edge2;
TopoDS_Vertex V1,V2;
Edge1 = TopoDS::Edge (myEdges->Value(myEdges->Length()));
@ -263,7 +263,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
///=======================================================================
//function : VertexTol
//purpose : Evalue le trou entre 2 edges de la section
//purpose : Evaluate the hole between 2 edges of the section
//=======================================================================
Standard_Real BRepFill_ShapeLaw::VertexTol(const Standard_Integer Index,
const Standard_Real Param) const
@ -271,7 +271,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
Standard_Real Tol = Precision::Confusion();
Standard_Integer I1, I2;
if ( (Index==0) || (Index==myEdges->Length()) ) {
if (!uclosed) return Tol; //Le moins faux possible
if (!uclosed) return Tol; //The least possible error
I1 = myEdges->Length();
I2 = 1;
}
@ -339,7 +339,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
TopoDS_Vertex V;
W = TopoDS::Wire(myShape);
if(!W.IsNull()) {
// Concatenation des aretes
// Concatenation of edges
Standard_Integer ii;
Standard_Real epsV, f, l;
Standard_Boolean Bof;
@ -388,7 +388,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
TopoDS_Edge Edge1, Edge2;
if ( (Index==0) || (Index==myEdges->Length()) ) {
if (!uclosed) return GeomAbs_C0; //Le moins faux possible
if (!uclosed) return GeomAbs_C0; //The least possible error
Edge1 = TopoDS::Edge (myEdges->Value(myEdges->Length()));
Edge2 = TopoDS::Edge (myEdges->Value(1));

View File

@ -192,7 +192,7 @@ static Standard_Boolean HasPCurves(const TopoDS_Edge& E)
//=======================================================================
//function : Translate
//purpose : Copy une colonne d'un tableau dans un autre.
//purpose : Copy a column from one table to another.
//=======================================================================
static void Translate(const Handle(TopTools_HArray2OfShape)& ArrayIn,
const Standard_Integer In,
@ -209,7 +209,7 @@ static void Translate(const Handle(TopTools_HArray2OfShape)& ArrayIn,
//=======================================================================
//function : Box
//purpose : Boite d'encombrement d'une section.
//purpose : Bounding box of a section.
//=======================================================================
static void Box(Handle(GeomFill_SectionLaw)& Sec,
const Standard_Real U,
@ -229,8 +229,8 @@ static void Box(Handle(GeomFill_SectionLaw)& Sec,
//=======================================================================
//function : Couture
//purpose : Controle si E est une arete de couture sur S
// et rend la representation HadHoc
//purpose : Check if E is an edge of sewing on S
// and make the representation HadHoc
//=======================================================================
static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
@ -261,7 +261,7 @@ static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E,
//=======================================================================
//function : CheckSameParameter
//purpose : Controle a posteriori que sameparameter a bien fait son boulot
//purpose : Check a posteriori that sameparameter has worked correctly
//=======================================================================
static Standard_Boolean CheckSameParameter
@ -298,9 +298,9 @@ static Standard_Boolean CheckSameParameter
//=======================================================================
//function : SameParameter
//purpose : Encapsulation de Sameparameter
// Le boolean dit si l'on a calcule la pcurve ou non...
// La tolerance est toujours Ok.
//purpose : Encapsulation of Sameparameter
// Boolean informs if the pcurve was computed or not...
// The tolerance is always OK.
//=======================================================================
static Standard_Boolean SameParameter(TopoDS_Edge& E,
@ -348,8 +348,8 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E,
ResTol = sp.TolReached();
if(ResTol > tolreached ){
#ifdef DEB
cout<<"SameParameter : Tol non atteinte!!!"<<endl;
cout<<"tol visee : "<<tol3d<<" tol obtenue : "<<ResTol<<endl;
cout<<"SameParameter : Tolerance not reached!"<<endl;
cout<<"tol visee : "<<tol3d<<" tol obtained : "<<ResTol<<endl;
#endif
return Standard_False;
}
@ -361,8 +361,8 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E,
}
//=======================================================================
//Objet : Oriente une arete de restriction naturelle
// : Cas generale
//Objet : Orientate an edge of natural restriction
// : General
//=======================================================================
static void Oriente(const Handle(Geom_Surface)& S,
TopoDS_Edge& E)
@ -417,10 +417,10 @@ static void UpdateEdgeOnPlane(const TopoDS_Face& F, const TopoDS_Edge& E,
//<-OCC500(apo)
//=======================================================================
//Function : BuildFace
//Objet : Construire une Face via, une surface et 4 Edge( Bords naturels)
// : Seule Hypothese : les iso u et v sont alternee :
// Edge1/3 sont des iso u (recp v)
// Edge2/4 sont des iso v (recp u)
//Objet : Construct a Face via a surface and 4 Edges (natural borders)
// : Only one Hypothesis : isos u and v are switched :
// Edge1/3 are iso u (recp v)
// Edge2/4 are iso v (recp u)
//=======================================================================
static void BuildFace(const Handle(Geom_Surface)& S,
const TopoDS_Edge& E1,
@ -442,7 +442,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
TopoDS_Iterator Iter;
//gp_Pnt2d P;
//La surface est elle plane ?
//Is the surface planar ?
Standard_Real Tol1, Tol2, Tol3, Tol4;
Tol1 = BRep_Tool::Tolerance( E1 );
Tol2 = BRep_Tool::Tolerance( E2 );
@ -492,7 +492,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
}
}
// Construction du wire
// Construction of the wire
// B.MakeWire(WW);
e1 = E1;
Oriente(S, e1);
@ -575,9 +575,9 @@ static void BuildFace(const Handle(Geom_Surface)& S,
}
#endif
// Construction de la face.
if (IsPlan) { // On vire les representation 2d
// et on constuit une face Plane
// Construction of the face.
if (IsPlan) { // Suspend representation 2d
// and construct face Plane
//BRepLib_MakeFace MkF(IsP.Plan(), WW);
gp_Pnt aPnt;
@ -638,7 +638,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
//=======================================================================
//Fonction : BuildEdge
//Objet : Construit une Edge non fermee
//Objet : Construct non-closed Edge
//=======================================================================
static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
Handle(Geom2d_Curve)& C2d,
@ -668,7 +668,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
if (VF.IsSame(VL) ||
(P1.Distance(P2) < Tol ) ) {
// Cas degenere
// Degenerated case
gp_Pnt2d P2d;
C2d->D0(f, P2d);
S->D0(P2d.X(), P2d.Y(), P);
@ -705,7 +705,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
B.UpdateVertex(VL, d);
BRepLib_MakeEdge MkE (C3d, VF, VL, f, l);
if (!MkE.IsDone()) { // Erreur de construction !!
if (!MkE.IsDone()) { // Error of construction !!
#ifdef DRAW
char name[100];
sprintf(name,"firstvertex_error");
@ -730,7 +730,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
//=======================================================================
//Fonction : Filling
//Objet : Construit les faces de remplisage
//Objet : Construct the faces of filling
//=======================================================================
static Standard_Boolean Filling(const TopoDS_Shape& EF,
const TopoDS_Shape& F1,
@ -751,7 +751,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
// Standard_Real Tol3d = Tol;
Standard_Boolean WithE3, WithE4;
// Recuperation des contraintes
// Return constraints
TopoDS_Vertex V1, V2, Vf, Vl;
TopoDS_Edge E1, E2, E3, E4;
E1 = TopoDS::Edge(EF);
@ -798,7 +798,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
}
#endif
// Construction d'une surface de revolution
// Construction of a surface of revolution
Handle(Geom_Curve) Prof1, Prof2;
//Standard_Integer ii, jj;//, Nb;
Standard_Real f1, f2, l1, l2,/*d1, d2,*/ Angle;//, Eps = 1.e-9;
@ -811,7 +811,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
gp_Trsf Tf;
Tf.SetTransformation(Axe);
// Choix d'un angle d'ouverture
// Choose the angle of opening
P1 = Prof1->Value((f1+l1)/2);
P2 = Prof2->Value((f2+l2)/2);
P1.Transform(Tf);
@ -838,11 +838,11 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
Handle(Geom_Surface) Surf =
new (Geom_RectangularTrimmedSurface) (Rev, 0, Angle, f1, l1);
// Controle le sens de la rotation
// Control the direction of the rotation
Standard_Boolean ToReverseResult = Standard_False;
gp_Vec d1u;
d1u = Surf->DN(0, (f1+l1)/2, 1, 0);
if (d1u.Angle(TangentOnPart1) > PI/2) { //On inverse tout
if (d1u.Angle(TangentOnPart1) > PI/2) { //Invert everything
ToReverseResult = Standard_True;
/*
axe.Reverse();
@ -862,7 +862,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
Handle(Geom2d_Curve) C1, C2, C3, C4;
/*
// Deformation de la surface de revolution.
// Deform the surface of revolution.
GeomPlate_BuildPlateSurface BPS;
Handle(BRepAdaptor_HSurface) AS;
@ -879,7 +879,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
L = new (Geom2d_Line) (P2d, gp::DY2d());
C2 = new (Geom2d_TrimmedCurve) (L, f1, l1);
// Ici il faut controler le sens et le range.
// It is required to control the direction and the range.
C2->D0(f1, P2d);
Surf->D0(P2d.X(), P2d.Y(), P1);
C2->D0(l1, P2d);
@ -887,7 +887,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
// P = BT.Pnt(V1);
P = BRep_Tool::Pnt(V1);
if (P.Distance(P2)+Tol < P.Distance(P1)) {
// E2 est (sans doute!) parcourue dans le sens inverse de E1
// E2 is parsed in the direction opposite to E1
C2->Reverse();
TopoDS_Vertex aux;
aux = V2;
@ -924,8 +924,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
L = new (Geom2d_Line) (P2d, gp::DX2d());
C4 = new (Geom2d_TrimmedCurve) (L, 0, Angle);
/*
// Determination des contraintes et
// de leur localisation parametrique.
// Determine the constraints and
// their parametric localisation.
if (!E1.IsNull()) {
AS = new BRepAdaptor_HSurface(TopoDS::Face(F1));
AC2d = new BRepAdaptor_HCurve2d();
@ -1113,16 +1113,16 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
}
}
//Construction de la face
//Construct face
BuildFace(Surf,E1, E3, E2, E4, EEmap,
Standard_False, Standard_False,
Result);
// Set Les continuites.
// Set the continuities.
B.Continuity(E1, TopoDS::Face(F1), Result, GeomAbs_G1);
B.Continuity(E2, TopoDS::Face(F2), Result, GeomAbs_G1);
// Rend les bords calcules.
// Render the calculated borders.
// if (!BT.Degenerated(E3))
if (!BRep_Tool::Degenerated(E3))
Aux1 = E3;
@ -1135,7 +1135,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
else
B.MakeEdge(Aux2);
// Set de l'orientation
// Set the orientation
gp_Vec D1U, D1V, N1, N2;
C1->D0( (f1+l1)/2, P2d);
Surf->D1(P2d.X(), P2d.Y(), P, D1U, D1V);
@ -1197,7 +1197,7 @@ static void Substitute(BRepTools_Substitution& aSubstitute,
//=======================================================================
//Function : SetCommonEdgeInFace
//Purpose : Replace an edge of the face by correspondent edge from
//Purpose : Replace an edge of the face by the corresponding edge from
// myUEdges
//=======================================================================
/*
@ -1236,7 +1236,7 @@ static void SetCommonEdgeInFace(BRepTools_Substitution& aSubstitute,
//=======================================================================
//Fonction : KeepEdge
//Objet : Recheche les edges de la face supporte par la meme Courbe.
//Objet : Find edges of the face supported by the same Curve.
//=======================================================================
static void KeepEdge(const TopoDS_Shape& Face,
const TopoDS_Shape& Edge,
@ -1263,7 +1263,7 @@ static void KeepEdge(const TopoDS_Shape& Face,
//=======================================================================
//Function :
//Objet : Construire un vertex via, une iso
//Objet : Construct a vertex via an iso
//=======================================================================
static void BuildVertex(const Handle(Geom_Curve)& Iso,
const Standard_Boolean isfirst,
@ -1283,7 +1283,7 @@ static void BuildVertex(const Handle(Geom_Curve)& Iso,
//=======================================================================
//Function :
//Objet : Construire une arete vide
//Objet : Construct an empty edge
//=======================================================================
static TopoDS_Edge NullEdge(TopoDS_Shape& Vertex)
{
@ -1300,7 +1300,7 @@ static TopoDS_Edge NullEdge(TopoDS_Shape& Vertex)
//=======================================================================
//Function :
//Objet : Construire une arete via, une iso
//Objet : Construct an edge via an iso
//=======================================================================
static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
const Standard_Boolean isUiso,
@ -1320,7 +1320,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
Iso = S->VIso(ValIso);
}
if (VFirst.IsSame(VLast)) { // Cas Singulier ?
if (VFirst.IsSame(VLast)) { // Singular case ?
gp_Pnt P;
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
@ -1337,7 +1337,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
}
if (sing) { // Cas Singulier
if (sing) { // Singular case
TopoDS_Shape V;
V = VFirst;
E = NullEdge(V);
@ -1347,7 +1347,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
}
else {
// Construction Via le 3d
// Construction Via 3d
// if (isUiso) {
// Iso = S->UIso(ValIso);
gp_Pnt P1,P2;
@ -1426,7 +1426,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
E = MkE.Edge();
}
// On associe le 2d
// Associate 2d
Handle(Geom2d_Line) L;
TopLoc_Location Loc;
if (isUiso) {
@ -1450,7 +1450,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
//=======================================================================
//Function :
//Objet : Completer une arete via, une iso
//Objet : Complete an edge via an iso
//=======================================================================
static void UpdateEdge(TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
@ -1475,7 +1475,7 @@ static void UpdateEdge(TopoDS_Edge& E,
TopoDS_Vertex Vf, Vl;
TopExp::Vertices(E, Vf, Vl);
if (Vf.IsSame(Vl)) { // Cas Singulier ?
if (Vf.IsSame(Vl)) { // Singular case ?
gp_Pnt Pmid;
Standard_Real tol = BRep_Tool::Tolerance(Vf);
Iso->D0((Iso->FirstParameter()+Iso->LastParameter())/2, Pmid);
@ -1501,7 +1501,7 @@ static void UpdateEdge(TopoDS_Edge& E,
}
CL = new (Geom2d_TrimmedCurve) (L, F2d, L2d);
// Controle sens & Range
// Control direction & Range
Standard_Real R, First, Last, Tol=1.e-4;
Standard_Boolean reverse = Standard_False;;
@ -1514,14 +1514,14 @@ static void UpdateEdge(TopoDS_Edge& E,
BRep_Tool::Range(E, First, Last);
if (!Vf.IsSame(Vl)) {
// On test les distance entre le "FirstPoint et les Vertex"
// Test distances between "FirstPoint" and "Vertex"
P2d = CL->Value(F2d);
POnS = S->Value(P2d.X(), P2d.Y());
// reverse = POnS.Distance(BT.Pnt(Vl)) < POnS.Distance(BT.Pnt(Vf));
reverse = POnS.Distance(BRep_Tool::Pnt(Vl)) < POnS.Distance(BRep_Tool::Pnt(Vf));
}
else if (!sing) {
// On test l'angle entre les "First Tangente"
// Test angle between "First Tangente"
gp_Vec2d V2d;
gp_Vec V3d, du, dv, dC3d;
BRepAdaptor_Curve C3d(E);
@ -1532,7 +1532,7 @@ static void UpdateEdge(TopoDS_Edge& E,
V3d.SetLinearForm(V2d.X(), du, V2d.Y(), dv);
reverse = ( dC3d.Angle(V3d) > Tol);
}
if (reverse ) { // On retourne la courbe 2d
if (reverse ) { // Return curve 2d
CL = new (Geom2d_TrimmedCurve)(L, F2d, L2d);
CL->Reverse();
F2d = CL->FirstParameter();
@ -1575,7 +1575,7 @@ static void UpdateEdge(TopoDS_Edge& E,
R = POnS.Distance(BRep_Tool::Pnt(V));
B.UpdateVertex(V, R);
// Update de l'Edge
// Update Edge
if (!sing && SameParameter(E, CL, S, Tol, R)) {
B.UpdateEdge(E, R);
}
@ -1583,7 +1583,7 @@ static void UpdateEdge(TopoDS_Edge& E,
PCurve = Couture(E, S, Loc);
if (PCurve.IsNull())
B.UpdateEdge(E, CL, S, Loc, Precision::Confusion());
else { // Arete de couture
else { // Sewing edge
TopoDS_Edge e = E;
Oriente(S, e);
if (e.Orientation() == TopAbs_REVERSED)
@ -1592,13 +1592,13 @@ static void UpdateEdge(TopoDS_Edge& E,
B.UpdateEdge(E, PCurve, CL, S, Loc, Precision::Confusion());
}
// Attention au cas non SameRange sur ces shapes (PRO13551)
// Attention to case not SameRange on its shapes (PRO13551)
// if (!BT.SameRange(E)) B.Range(E, S, Loc, First, Last);
if (!BRep_Tool::SameRange(E)) B.Range(E, S, Loc, First, Last);
}
//=======================================================================
//Objet : Voir si une surface est degenere
// Object : Check if a surface is degenerated
//=======================================================================
static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S,
const Standard_Real Tol)
@ -1613,7 +1613,7 @@ static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S,
S->Bounds(Umin, Umax, Vmin, Vmax);
// Controle la longeur des Iso-U
// Check the length of Iso-U
t = (Umin + Umax)/2;
S->D0(t, Vmin, P1);
S->D0(t, (Vmin+Vmax)/2, P2);
@ -1630,7 +1630,7 @@ static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S,
if (B) return Standard_True;
// Controle la longeur des Iso-V
// Check the length of Iso-V
t = (Vmin + Vmax)/2;
S->D0(Umin, t, P1);
S->D0((Umin+Umax)/2, t, P2);
@ -1676,7 +1676,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : SetBounds
//purpose : Definit les shapes de debut et fin
//purpose : Define start and end shapes
//======================================================================
void BRepFill_Sweep::SetBounds(const TopoDS_Wire& First,
const TopoDS_Wire& Last)
@ -1684,7 +1684,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
FirstShape = First;
LastShape = Last;
// Il faut verifier le SameRange sur ces shapes (PRO13551)
// It is necessary to check the SameRange on its (PRO13551)
Standard_Boolean issame = Standard_True;
BRep_Builder B;
BRepTools_WireExplorer wexp;
@ -1710,7 +1710,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
#if DEB
if (!issame)
cout<<"Sweep Warning : Edge non SameRange dans les bornes"<<endl;
cout<<"Sweep Warning : Edge not SameRange in the limits"<<endl;
#endif
}
@ -1772,7 +1772,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : BuildWire
//purpose : Construit un wire par balayage
//purpose : Construit a wire by sweeping
//======================================================================
Standard_Boolean BRepFill_Sweep::
BuildWire(const BRepFill_TransitionStyle /*Transition*/)
@ -1795,16 +1795,16 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TopoDS_Edge E;
B.MakeWire(wire);
// (1) Construction de toutes les courbes
// (1) Construction of all curves
// (1.1) Construction des Tables
// (1.1) Construction of Tables
myFaces = new (TopTools_HArray2OfShape) (1, 1, 1, NbPath);
myUEdges = new (TopTools_HArray2OfShape) (1, 2, 1, NbPath);
myVEdges = new (TopTools_HArray2OfShape) (1, 1, 1, NbPath+1);
// (1.2) Calcul des courbes / vertex / edge
// (1.2) Calculate curves / vertex / edge
for (ipath=1; ipath <=NbPath; ipath++) {
// Courbe par iso valeur
// Curve by iso value
GeomFill_Sweep Sweep(myLoc->Law(ipath), KPart);
Sweep.SetTolerance(myTol3d, myBoundTol, myTol2d, myTolAngular);
Sweep.Build(mySec->Law(isec), myApproxStyle, myContinuity, myDegmax, mySegmax);
@ -1821,7 +1821,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
else S->Bounds(val, bid, First, Last);
Iso = S->UIso(val);
}
// Vertex par positionement
// Vertex by position
if (ipath < NbPath)
BuildVertex(Iso, Standard_False, First, Last,
myVEdges->ChangeValue(1, ipath+1));
@ -1854,14 +1854,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
myVEdges->ChangeValue(1, 1));
}
// Construction de l'arete
// Construction of the edge
BRepLib_MakeEdge MkE;
MkE.Init(Iso,
TopoDS::Vertex(myVEdges->Value(1, ipath)),
TopoDS::Vertex(myVEdges->Value(1, ipath+1)),
Iso->FirstParameter(),
Iso->LastParameter());
if (!MkE.IsDone()) { // Erreur de construction !!
if (!MkE.IsDone()) { // Error of construction !!
#ifdef DRAW
char name[100];
sprintf(name,"firstvertex_error");
@ -1897,7 +1897,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : BuildShell
//purpose : Construit une Shell par balayage
//purpose : Construct a Shell by sweeping
//======================================================================
Standard_Boolean BRepFill_Sweep::
BuildShell(const BRepFill_TransitionStyle /*Transition*/,
@ -1920,15 +1920,15 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
(NbPath == myLoc->NbLaw()) && (myLoc->IsG1(0, myTol3d)>= 0);
Error = 0.;
// (1) Construction de toutes les surfaces
// (1) Construction of all surfaces
// (1.1) Construction des Tables
// (1.1) Construction of Tables
TColStd_Array2OfInteger ExchUV(1, NbLaw, 1, NbPath);
TColStd_Array2OfInteger UReverse(1, NbLaw, 1, NbPath);
TColStd_Array2OfInteger Degenerated(1, NbLaw, 1, NbPath);
Degenerated.Init(0);
// Pas de VReverse pour le moment...
// No VReverse for the moment...
TColStd_Array2OfReal TabErr(1, NbLaw , 1, NbPath);
TColGeom_Array2OfSurface TabS(1, NbLaw , 1, NbPath);
@ -1944,8 +1944,8 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TColStd_Array1OfReal VError(1, NbLaw+1);
TColStd_Array1OfReal Vi(1, NbPath+1);
//Initialisation de la gestion des intervalles parametrique
//(Cas des sections evolutive)
//Initialization of management of parametric intervals
//(Case of evolutionary sections)
Standard_Real Length, SecDom, SecDeb;
myLoc->CurvilinearBounds(myLoc->NbLaw(), SecDom, Length);
mySec->Law(1)->GetDomain(SecDeb, SecDom);
@ -1958,7 +1958,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
else
Vi(1) = SecDeb;
// Erreur a priori sur les vertex
// Error a priori on vertices
if (constSection) {
for (isec=1; isec<=NbLaw+1; isec++) {
VError(isec) = mySec->VertexTol(isec-1, 0.);
@ -1967,13 +1967,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
// (1.2) Calcul des surfaces
// (1.2) Calculate surfaces
for (ipath=1, IPath=IFirst; ipath <=NbPath; ipath++, IPath++) {
GeomFill_Sweep Sweep(myLoc->Law(IPath), KPart);
Sweep.SetTolerance(myTol3d, myBoundTol, myTol2d, myTolAngular);
// Cas des section evolutive, definition de la correspondance parametrique
// Case of evolutionary section, definition of parametric correspondence
if (!constSection) {
Standard_Real lf, ll, Lf, Ll;
myLoc->Law(IPath)->GetDomain(lf, ll);
@ -2024,13 +2024,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// (2) Construction des Edges
// (2) Construction of Edges
Standard_Real UFirst, ULast, VFirst, VLast;
Standard_Boolean exuv, singu, singv;
Handle(Geom_Surface) S;
if (! vclose) {
// (2.0) recuperation des Edges et vertex prexistant
// (2.0) return preexisting Edges and vertices
TopoDS_Edge E;
if (! FirstShape.IsNull() && (IFirst==1)) {
mySec->Init(FirstShape);
@ -2051,11 +2051,11 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
UpdateVertex(IFirst-1, 1,
TabErr(1, 1), Vi(1), Vertex(1, 1));
}
else { // Sinon on construit quand meme les vertex
else { // Otherwise construct vertices
Standard_Real u, v, aux;
Standard_Boolean ureverse;
for (isec=1; isec<=NbLaw+1; isec++) {
// Recuperation des donne
// Return data
if (isec >NbLaw) {
S = TabS(NbLaw, 1);
ureverse = UReverse(NbLaw, 1);
@ -2068,7 +2068,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
S->Bounds(UFirst, ULast, VFirst, VLast);
// Choix des parametres
// Choice of parameters
if (ureverse) {
if (exuv) {
aux = VFirst; VFirst = VLast; VLast = aux;
@ -2092,7 +2092,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// construction du vertex
// construction of vertices
B.MakeVertex(TopoDS::Vertex(Vertex(isec, 1)),
S->Value(u,v),
mySec->VertexTol(isec-1,Vi(1)));
@ -2124,7 +2124,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Standard_Real u, v, aux;
Standard_Boolean ureverse;
for (isec=1; isec<=NbLaw+1; isec++) {
// Recuperation des donne
// Return data
if (isec >NbLaw) {
S = TabS(NbLaw, NbPath);
ureverse = UReverse(NbLaw, NbPath);
@ -2137,7 +2137,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
S->Bounds(UFirst, ULast, VFirst, VLast);
// Choix des parametres
// Choice of parametres
if (ureverse) {
if (exuv) {
aux = VFirst; VFirst = VLast; VLast = aux;
@ -2161,7 +2161,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// construction du vertex
// construction of vertex
B.MakeVertex(TopoDS::Vertex(Vertex(isec, NbPath+1)),
S->Value(u,v),
mySec->VertexTol(isec-1, Vi(NbPath+1)));
@ -2170,7 +2170,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
// ---------- Creation de Vertex et edge ------------
// ---------- Creation of Vertex and edge ------------
for (ipath=1, IPath=IFirst; ipath<=NbPath;
ipath++, IPath++) {
for (isec=1; isec <=NbLaw; isec++) {
@ -2187,10 +2187,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// (2.1) Construction des nouveaux vertex
// (2.1) Construction of new vertices
if (isec == 1) {
if (ipath == 1 && Vertex(1, 1).IsNull()) {
// Le tout premier
// All first
if (constSection)
myLoc->PerformVertex(IPath-1,
TopoDS::Vertex(SecVertex(1)),
@ -2202,7 +2202,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
mySec->VertexTol(0,Vi(1)),
TopoDS::Vertex(Vertex(1, 1)));
}
// le premier de la colonne suivante
// the first and the next column
if (vclose &&(ipath == NbPath) ) {
Vertex(1, ipath+1) = Vertex(1, 1);
}
@ -2266,7 +2266,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TopoDS::Vertex(Vertex(isec+1, ipath+1)) );
}
// Cas Singuliers
// Singular cases
singv = MergeVertex(Vertex(isec,ipath+1), Vertex(isec+1,ipath+1));
singu = MergeVertex(Vertex(isec+1,ipath), Vertex(isec+1,ipath+1));
@ -2278,30 +2278,30 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
if (Degenerated(isec, ipath)) {
#if DEB
cout << "Sweep : Cas degenere" << endl;
cout << "Sweep : Degenerated case" << endl;
#endif
hasdegen = Standard_True;
// Construction particuliere des edge
// Particular construction of edges
if (UEdge(isec+1, ipath).IsNull()) {
if (singu) {
// Edge degenere
// Degenerated edge
UEdge(isec+1, ipath) = NullEdge(Vertex(isec+1,ipath));
}
else { // Copie de l'edge precedente
else { // Copy the previous edge
UEdge(isec+1, ipath) = UEdge(isec, ipath);
}
}
if (VEdge(isec, ipath+1).IsNull()) {
if (singv) {
// Edge degenere
// Degenerated Edge
VEdge(isec, ipath+1) = NullEdge(Vertex(isec,ipath+1));
}
else { // Copie de l'edge precedente
else { // Copy the previous edge
VEdge(isec, ipath+1) = VEdge(isec, ipath);
}
}
}
else { // Construction des edges par les isos
else { // Construction of edges by isos
if (exuv) {
Standard_Real UV;
UV = UFirst; UFirst = VFirst; VFirst = UV;
@ -2360,10 +2360,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
S, exuv, VLast);
}
}//Fin de contruction des edges
}// End of construction of edges
}
// (3) Construction des Faces
// (3) Construction of Faces
TopoDS_Face face;
#ifdef DRAW
@ -2413,10 +2413,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
// (4) Historique et Continuity
// (4) History and Continuity
if (hasdegen) {
//(4.1) // Cas degenere => Marteau Pilon
//(4.1) // Degenerated case => Sledgehammer
TopoDS_Compound Comp;
B.MakeCompound(Comp);
for (isec=1; isec <= NbLaw+1; isec++)
@ -2430,7 +2430,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
BRepLib::EncodeRegularity(Comp, myTolAngular);
}
else {
//(4.2) // Cas generale => Pince a epiler
//(4.2) // General case => Tweezers
Standard_Boolean isG1;
TopoDS_Face FF;
TopoDS_Edge E;
@ -2452,7 +2452,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
Standard_Integer nbpath = NbPath;
if (vclose) nbpath++; //Un test G1 en plus
if (vclose) nbpath++; //Another test G1
for (ipath=1, IPath=IFirst; ipath<= NbPath+1; ipath++, IPath++) {
if ((ipath > 1) && (ipath <=nbpath))
isG1 = (myLoc->IsG1(IPath-1, myTol3d, myTolAngular) >= 0);
@ -2475,7 +2475,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : Build
//purpose : Construit le resultat d'un balayage
//purpose : Construt the result of sweeping
//======================================================================
void BRepFill_Sweep::Build(const BRepFill_TransitionStyle Transition,
const GeomFill_ApproxStyle Approx,
@ -2507,20 +2507,20 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Handle(TColStd_HArray1OfInteger) Trous;
if (NbTrous>0) { // Combien de sous parties ?
if (NbTrous>0) { // How many sub-parts ?
Trous = new (TColStd_HArray1OfInteger) (1, NbTrous);
myLoc->Holes(Trous->ChangeArray1());
NbPart += NbTrous;
if (Trous->Value(NbTrous) == NbPath+1) NbPart--;
}
if (NbPart == 1) { // On le fait en un coup
if (NbPart == 1) { // This is done at once
Standard_Real Extend = 0.0;
if (NbTrous==1) Extend = EvalExtrapol(1, Transition);
isDone = BuildShell(Transition,
1, NbPath+1,
Extend, Extend);
}
else { // On le fait bout par bout
else { // This is done piece by piece
Standard_Integer IFirst = 1, ILast;
for (ii=1, isDone=Standard_True;
ii<=NbPart && isDone; ii++) {
@ -2539,7 +2539,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Translate(myVEdges, IFirst, Bounds, 1);
}
}
// Gestion des terminaisons bouclantes
// Management of looping ends
if ( (NbTrous>0) && (myLoc->IsClosed()) &&
(Trous->Value(NbTrous) == NbPath+1) ) {
Translate(myVEdges, NbPath+1, Bounds, 1);
@ -2547,7 +2547,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
PerformCorner(1, Transition, Bounds);
}
// Construction de la shell
// Construction of the shell
TopoDS_Shell shell;
B.MakeShell(shell);
for (ipath=1; ipath<=NbPath; ipath++)
@ -2634,9 +2634,9 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// Est ce Ferme ?
// Is it Closed ?
if (myLoc->IsClosed() && mySec->IsUClosed()) {
//On verifie
//Check
Standard_Boolean closed = Standard_True;
Standard_Integer iedge;
TopTools_IndexedDataMapOfShapeListOfShape EFmap;
@ -2684,7 +2684,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : SubShape
//purpose : Les faces obtenues par balayage
//purpose : Faces obtained by sweeping
//=======================================================================
Handle(TopTools_HArray2OfShape) BRepFill_Sweep::SubShape() const
{
@ -2693,7 +2693,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : InterFaces
//purpose : les Edges obtenues par balayage
//purpose : Edges obtained by sweeping
//=======================================================================
Handle(TopTools_HArray2OfShape) BRepFill_Sweep::InterFaces() const
{
@ -2702,7 +2702,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : Sections
//purpose : Les Edges ou Face (ou compound des 2) Transition entre 2 balayages.
//purpose : Edges or Face (or compound of 2) Transition between 2 sweepings
//=======================================================================
Handle(TopTools_HArray2OfShape) BRepFill_Sweep::Sections() const
{
@ -2711,14 +2711,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : PerformCorner
//purpose : Trim et/ou bouche un coin
//purpose : Trim and/or loop a corner
//======================================================================
void BRepFill_Sweep::PerformCorner(const Standard_Integer Index,
const BRepFill_TransitionStyle Transition,
const Handle(TopTools_HArray2OfShape)& Bounds)
{
if (Transition == BRepFill_Modified) return; // On ne fait rien.
if (Transition == BRepFill_Modified) return; // Do nothing.
BRepFill_TransitionStyle TheTransition = Transition;
Standard_Boolean isTangent=Standard_False;
@ -2740,7 +2740,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
I2 = 1;
}
// On Construit un axe supporte par la bissectrice
// Construct an axis supported by the bissectrice
myLoc->Law(I1)->GetDomain(F, L);
myLoc->Law(I1)->GetCurve()->D1(L, P1, T1);
T1.Normalize();
@ -2762,7 +2762,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
if (t1.Angle(t2) < myAngMin) {
#if DEB
cout << "BRepFill_Sweep::PerformCorner : Ce n'est pas un coin !" << endl;
cout << "BRepFill_Sweep::PerformCorner : This is not a corner !" << endl;
#endif
return;
}
@ -2774,15 +2774,15 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TheTransition = BRepFill_Round;
}
Tang = T1 + T2; //Direction moyenne
Tang = T1 + T2; //Average direction
gp_Dir NormalOfBisPlane = Tang;
if (isTangent) {
Sortant -= Tang.Dot(Tang)*Tang;
}
else {
Sortant = T2-T1; //Direction rentrente
Sortant *= -1; // " " sortante
Sortant = T2-T1; //Direction input
Sortant *= -1; // " " output
Tang -= (Tang.Dot(T2))*T2;
}
@ -2793,7 +2793,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
gp_Ax2 Axe (P1, N, Dx);
gp_Ax2 AxeOfBisPlane( P1, NormalOfBisPlane );
// On construit les 2 Shell a intersecter
// Construct 2 intersecting Shells
Handle (TopTools_HArray2OfShape) UEdges =
new TopTools_HArray2OfShape( 1, mySec->NbLaw()+1, 1, myLoc->NbLaw() );
UEdges->ChangeArray2() = myUEdges->Array2();
@ -2855,9 +2855,9 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
else if ((TheTransition == BRepFill_Right) ||
aTrim.HasSection() ) {
#if DEB
cout << "Echec de TrimCorner" << endl;
cout << "Fail of TrimCorner" << endl;
#endif
return; // On ne touche a rien
return; // Nothing is touched
}
if (mySec->IsUClosed())
@ -2867,7 +2867,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
if (TheTransition == BRepFill_Round) {
// Remplissage
// Filling
TopTools_ListOfShape list1, list2;
TopoDS_Edge Bord1, Bord2, BordFirst;
BordFirst.Nullify();
@ -2883,7 +2883,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TopTools_ListIteratorOfListOfShape It2(list2);
Standard_Boolean B;
for (; It1.More(); It1.Next(), It2.Next()) {
if (HasFilling) { // Choix des contraintes transversale
if (HasFilling) { // Transversal choice of constraints
TopoDS_Vertex VF, VL, VC;
TopoDS_Edge E = TopoDS::Edge(It1.Value());
TopoDS_Edge E1, E2;
@ -2909,7 +2909,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Bord2 = E2;
}
// Remplissage
// Filling
B = Filling(It1.Value(), myFaces->Value(ii, I1),
It2.Value(), myFaces->Value(ii, I2),
myVEdgesModified, myTol3d, Axe, T1, Bord1, Bord2, FF);
@ -2923,7 +2923,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
#if DEB
else cout << "PerformCorner : Disymetrie de bord libre" << endl;
else cout << "PerformCorner : Unsymmetry of free border" << endl;
#endif
}
}
@ -2979,8 +2979,8 @@ Standard_Real BRepFill_Sweep::
Standard_Real alpha = T1.Angle(T2);
if ((alpha > myAngMax) || (alpha < myAngMin)) {
//Angle trop grand => Pas de raccord "droit"
//Angle trop petit => Pas de raccord
//Angle too great => No "straight" connection
//Angle too small => No connection
return Extrap; // = 0.0
}
@ -3014,7 +3014,7 @@ Standard_Real BRepFill_Sweep::
//=======================================================================
//function : MergeVertex
//purpose : Fait V2 = V1 si V2 est trop proche de V1
//purpose : Make V2 = V1 if V2 is too close to V1
//======================================================================
Standard_Boolean BRepFill_Sweep::MergeVertex(const TopoDS_Shape& V1,
TopoDS_Shape& V2) const
@ -3038,7 +3038,7 @@ Standard_Boolean BRepFill_Sweep::MergeVertex(const TopoDS_Shape& V1,
//=======================================================================
//function : UpdateVertex
//purpose : Update la Tolerance des Vertexs en Fonction des Lois.
//purpose : Update the Tolerance of Vertices depending on Laws.
//======================================================================
void BRepFill_Sweep::UpdateVertex(const Standard_Integer ipath,
const Standard_Integer isec,

View File

@ -83,7 +83,7 @@ myBisec(Bisec)
isPoint1 = (S1->DynamicType() == STANDARD_TYPE(Geom2d_CartesianPoint));
isPoint2 = (S2->DynamicType() == STANDARD_TYPE(Geom2d_CartesianPoint));
// recuperation des geometries des shapes.
// return geometries of shapes.
// Standard_Real f,l;
if (isPoint1) {
myP1 = Handle(Geom2d_Point)::DownCast(S1)->Pnt2d();
@ -112,7 +112,7 @@ myBisec(Bisec)
}
#endif
}
// recuperer l expression simple de la bisectrice
// return the simple expression of the bissectrice
Handle(Geom2d_Curve) Bis;
SimpleExpression(myBisec, Bis);
myBis = Geom2dAdaptor_Curve(Bis);
@ -127,7 +127,7 @@ myBisec(Bisec)
//=======================================================================
//function : Bubble
//purpose : Ordonne la sequence de point en x croissant.
//purpose : Order the sequence of points by increasing x.
//=======================================================================
static void Bubble(TColgp_SequenceOfPnt& Seq)
@ -149,7 +149,7 @@ static void Bubble(TColgp_SequenceOfPnt& Seq)
//=======================================================================
//function : EvalParameters (lbr le 8 juillet, je duplique pour modifier)
//function : EvalParameters
//purpose :
//=======================================================================
@ -218,7 +218,7 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis,
}
}
// Ordonne la sequence en param croissant sur la bissectrice.
// Order the sequence by growing parameter on the bissectrice.
Bubble( Params);
}
@ -282,7 +282,7 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis,
}
}
// Ordonne la sequence en param croissant sur la bissectrice.
// Order the sequence by parameter growing on the bissectrice.
Bubble( Params);
}
@ -298,7 +298,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
{
Params.Clear();
// recuperer les courbes associees aux edges.
// return curves associated to edges.
TopLoc_Location L;
Standard_Real f,l;
Handle(Geom_Surface) Surf;
@ -333,7 +333,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
}
#endif
// Calcul intersection
// Calculate intersection
TColgp_SequenceOfPnt Points2;
gp_Pnt PSeq;
@ -359,7 +359,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
(Points2.Length() == 0 && Params.Length() == 0) ) ) {
#ifdef DEB
cout << "BRepFill_TrimEdgeTool: incoherent intersection. On essaie avec une tol plus grande" << endl;
cout << "BRepFill_TrimEdgeTool: incoherent intersection. Try with a greater tolerance" << endl;
#endif
Params.Clear();
@ -421,10 +421,10 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
}
}
// petite manip destinee a eliminer les intersections incoherentes:
// on ne renvoie que les intersections communes ( meme parametre sur
// la bissectrice.).
// La tolerance pourra eventuellement etre reglee.
// small manipulation to remove incorrect intersections:
// return only common intersections (same parameter
// on the bissectrice.).
// The tolerance can be eventually changed.
gp_Pnt P1,P2;
Standard_Real Tol = 4 * 100 * Precision::PConfusion();
@ -449,11 +449,11 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
if ( P1xP2x > Tol ) {
#ifdef DEB
cout << "BRepFill_TrimEdgeTool: Pas le meme parametre sur la bissectrice" << endl;
cout << "BRepFill_TrimEdgeTool: no same parameter on the bissectrice" << endl;
#endif
if(P1xP2x>TolInit) {
#ifdef DEB
cout << "BRepFill_TrimEdgeTool: On continue quand meme" << endl;
cout << "BRepFill_TrimEdgeTool: Continue somehow" << endl;
#endif
i++;
}
@ -482,9 +482,9 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
//=======================================================================
//function : AddOrConfuse
//purpose : le premier ou le dernier point de la bissectrice est sur la
// parallele si on ne l a pas trouve dans les intersections on
// le projette sur les paralleles et on l ajoute dans les params
//purpose : the first or the last point of the bissectrice is on the
// parallel if it was not found in the intersections,
// it is projected on parallel lines and added in the parameters
//=======================================================================
void BRepFill_TrimEdgeTool::AddOrConfuse(const Standard_Boolean Start,
@ -497,7 +497,7 @@ const
gp_Pnt2d PBis;
Standard_Real Tol = 10*Precision::Confusion();
// recuperer les courbes associees aux edges.
// return curves associated to edges.
TopLoc_Location L;
Standard_Real f,l;
Handle(Geom_Surface) Surf;
@ -510,7 +510,7 @@ const
if (Start) PBis = myBis.Value(myBis.FirstParameter());
else PBis = myBis.Value(myBis.LastParameter ());
// Test si le bout de la bissectrice est dans l ensemble des points d intersection.
// Test if the end of the bissectrice is in the set of intersection points.
if (!Params.IsEmpty()) {
gp_Pnt2d P;
if (Start) P = AC1.Value(Params.First().Y());
@ -520,10 +520,10 @@ const
if (ToProj) {
#ifdef DEB
cout << " projection extremite bissectrice sur parallele."<<endl;
cout << " project extremity bissectrice on parallel."<<endl;
#endif
// Projection du point sur les paralleles et ajout dans Params
// Project point on parallels and add in Params
Standard_Real f2,l2;
Handle(Geom2d_Curve) C2;
@ -534,19 +534,19 @@ const
if (Projector1.NbPoints() == 0) {
#ifdef DEB
cout << "Echec projection dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (!Projector1.NearestPoint().IsEqual(PBis,Tol)) {
#ifdef DEB
cout <<" Mauvaisesolution dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
cout <<"Incorrect solution in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (Projector2.NbPoints() == 0) {
#ifdef DEB
cout << "Echec projection dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}

View File

@ -61,12 +61,12 @@ static Standard_Integer NBCALL = 1;
//=======================================================================
//function : BRepFill_TrimSurfaceTool
//purpose : Initialisation avec les deux face voisines
// Edge1 et Edge2 sont les edges paralleles correspondant
// a une iso minimum sur F1 et F2 respectivement.
// ie Edge1 est Umin ou VMin sur F1.
// Inv1 et Inv2 indique si Edge1 et Edge2 sont des
// parallleles retournees.
//purpose : Initialisation with two neighbor faces
// Edge1 and Edge2 are parallel edges corresponding
// to minimum iso on F1 and F2 respectively.
// ie Edge1 is Umin or VMin on F1.
// Inv1 and Inv2 show if Edge1 and Edge2 are
// returned parallel.
//=======================================================================
BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool
@ -115,7 +115,7 @@ myBis (Bis)
//=======================================================================
//function : Bubble
//purpose : Ordonne la sequence de point en x croissant.
//purpose : Order the sequence of points by increasing x.
//=======================================================================
static void Bubble(TColgp_SequenceOfPnt& Seq)
@ -183,7 +183,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
TColgp_SequenceOfPnt& Seq )
{
Standard_Boolean Degener = BRep_Tool::Degenerated(Edge);
// recuperer les courbes 3d associees aux edges.
// return curves 3d associated to edges.
TopLoc_Location L;
Standard_Real f,l;
@ -205,7 +205,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Handle(Geom_Curve) C = BRep_Tool::Curve(Edge,L,f,l);
CT = new Geom_TrimmedCurve(C,f,l);
CT->Transform(L.Transformation());
// projection de ces courbes 3d dans le plan xOy
// projection of 3d curves in the plane xOy
Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(CT,Plane);
Geom2dAdaptor_Curve AC(C2d);
@ -268,7 +268,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
if (NbSegments > 0) {
#ifdef DEB
cout << " IntersectWith : " << NbSegments
<< " Segments d`intersection" << endl;
<< " Segments of intersection" << endl;
#endif
IntRes2d_IntersectionSegment Seg;
for ( Standard_Integer i = 1; i <= NbSegments; i++) {
@ -283,7 +283,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Seq.Append(P);
}
}
// Ordonne la sequence en param croissant sur la bissectrice.
// Order the sequence by increasing parameter on the bissectrice.
Bubble( Seq);
// modified by NIZHNY-EAP Fri Dec 24 18:47:24 1999 ___BEGIN___
@ -301,8 +301,8 @@ static void EvalParameters(const TopoDS_Edge& Edge,
// modified by NIZHNY-EAP Fri Dec 24 18:47:28 1999 ___END___
}
else {
// l`edge est degenere : on recupere le point et on cherche s`il est sur
// la bissectrice.
// the edge is degenerated : the point and it is found if it is
// on the bissectrice.
gp_Pnt P3d = BRep_Tool::Pnt( TopExp::FirstVertex(Edge));
gp_Pnt2d P2d( P3d.X(), P3d.Y());
@ -325,7 +325,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
if ( PBis.Distance(P2d) > Tol) return;
}
// eval parametre intersection.
// evaluate parameter intersection.
Handle(Geom_Surface) GS = BRep_Tool::Surface(Face);
GeomAdaptor_Surface GAS(GS);
@ -338,8 +338,8 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Axis = GAS.Sphere().Position(); break;
case GeomAbs_Cone: {
//----------------------------------------------------------
// si myFace1 n est pas du meme cote de l apex que le point
// de parametre 0 0 sur le cone => phase = PI.
// if myFace1 is not at the same side of the apex as the point
// of parameter 0 0 on the cone => phase = PI.
//----------------------------------------------------------
Axis = GAS.Cone().Position();
Phase = EvalPhase(Edge,Face,GAS,Axis);
@ -351,8 +351,8 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Axis = GAS.Cylinder().Position(); break;
case GeomAbs_SurfaceOfRevolution: {
//----------------------------------------------------------
// si myFace1 n est pas du meme cote de l apex que le point
// de parametre 0 0 sur le cone => phase = PI.
// if myFace1 is not at the same side of the apex as the point
// of parameter 0 0 on the cone => phase = PI.
//----------------------------------------------------------
Handle(Geom_SurfaceOfRevolution) GSRev =
Handle(Geom_SurfaceOfRevolution)::DownCast(GS);
@ -455,11 +455,11 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(C1,f,l);
CT->Transform(L.Transformation());
// projection de ces courbes 3d dans le plan xOy
// projection of curves 3d in the plane xOy
Handle(Geom_Plane) Plane = new Geom_Plane(0,0,1,0);
Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(CT,Plane);
// eval the projection of the point on the curve.
// evaluate the projection of the point on the curve.
Geom2dAPI_ProjectPointOnCurve Projector(Point, C2d);
#ifdef DEB
Standard_Real Dist =
@ -468,7 +468,7 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
#ifdef DEB
if ( Dist > Precision::Confusion() ) {
cout << " *** WARNING TrimSurfaceTool: *** " << endl;
cout << " --> le point n'est pas sur l'edge" <<endl;
cout << " --> the point is not on the edge" <<endl;
cout << " distance = " << Dist << endl;
}
#endif

View File

@ -90,7 +90,7 @@ void BRepIntCurveSurface_Inter::Find() {
Standard_Real U = intcs.Point(currentindex).U();
Standard_Real V = intcs.Point(currentindex).V();
//-------------------------------------------------------
//-- On Cherche a recadrer le point U,V ds la face UV
//-- Try to reframe point U,V in the face UV
//--
if(PeriodU) {
while(U>UMin)
@ -102,9 +102,9 @@ void BRepIntCurveSurface_Inter::Find() {
}
// Standard_Real UInit = U;
Standard_Real VInit = V;
do { //-- Boucle Sur U
do { //-- Loop on U
V = VInit;
do { //-- Boucle sur V
do { //-- Loop on V
gp_Pnt2d Puv(U,V);
//---
//-- classifier.Perform(TopoDS::Face(explorer.Current()),Puv,tolerance);
@ -135,7 +135,7 @@ void BRepIntCurveSurface_Inter::Find() {
brepadaptsurf.Initialize(face,Standard_True);
//----------------------------------------------
//-- Mise a jour des variables PeriodU,PeriodV
//-- Update variables PeriodU,PeriodV
//--
SurfForFastClass->ChangeSurface().Initialize(face); //-- MODIF

View File

@ -3,7 +3,7 @@
// Author: Remi LEQUETTE
// <rle@zerox>
// History: pmn 26/09/97 Ajout des parametres d'approx dans BuildCurve3d
// History: pmn 26/09/97 Add parameters of approximation in BuildCurve3d
// Modified by skv - Thu Jun 3 12:39:19 2004 OCC5898
#include <BRepLib.ixx>
@ -71,10 +71,6 @@
#include <Approx_CurvilinearParameter.hxx>
#include <Geom_BSplineSurface.hxx>
//
// comme on ne pas patcher en cdl GEOMLITE temporairement les GeomLib_ migrent
// dans BRepLib ...
//
static Standard_Real thePrecision = Precision::Confusion();
static Handle(Geom_Plane) thePlane;
@ -361,7 +357,7 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
B.UpdateEdge(AnEdge,C3d,LocalLoc,0.0e0);
BRep_Tool::Range(AnEdge, S, LC, First, Last);
B.Range(AnEdge, First, Last); //Ne pas oublier le range du 3d.(PRO6412)
B.Range(AnEdge, First, Last); //Do not forget 3D range.(PRO6412)
TopoDS_Edge E = AnEdge ;
E.Closed(is_closed) ;
@ -834,12 +830,12 @@ void BRepLib::SameParameter(const TopoDS_Shape& S,
BRepLib::UpdateTolerances(S);
}
//=======================================================================
//================================================================
//function : SameParameter
//WARNING : Nouvelle spec DUB LBO 9/9/97.
// On recode dans l arete la meilleure tolerance trouvee,
// pour les vertex extremites il faudra trouver autre chose.
//=======================================================================
//WARNING : New spec DUB LBO 9/9/97.
// Recode in the edge the best tolerance found,
// for vertex extremities it is required to find something else
//================================================================
static Standard_Boolean EvalTol(const Handle(Geom2d_Curve)& pc,
const Handle(Geom_Surface)& s,
const GeomAdaptor_Curve& gac,
@ -1287,13 +1283,13 @@ void BRepLib::SameParameter(const TopoDS_Edge& AnEdge,
B.Range(AnEdge,f3d,l3d);
B.SameRange(AnEdge,Standard_True);
if ( IsSameP) {
// On diminue eventuellement la tolerance de l arete, puisque
// l on a traite toutes ses representations ( Sauf celles associees
// a des plans et non stockees dans l'arete !)
// Il n'en va pas de meme des Vertex que l on ne peut que grossir
// ou laisser tels quels.
// Reduce eventually the tolerance of the edge, as
// all its representations are processed (except for some associated
// to planes and not stored in the edge !)
// The same cannot be done with vertices that cannot be enlarged
// or left as is.
if (YaPCu) {
// On evite de mettre des tol trop petites.
// Avoid setting too small tolerances.
maxdist = Max(maxdist,Precision::Confusion());
TopoDS_Vertex V1,V2;
TopExp::Vertices(AnEdge,V1,V2);
@ -1316,12 +1312,12 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
const Standard_Boolean verifyTolerance)
{
// On harmonise les tolerance
// avec la regle Tolerance(VERTEX)>=Tolerance(EDGE)>=Tolerance(FACE)
// Harmonize tolerances
// with rule Tolerance(VERTEX)>=Tolerance(EDGE)>=Tolerance(FACE)
BRep_Builder B;
Standard_Real tol=0;
if (verifyTolerance) {
// On force la tolerance a sa valeur minimale
// Set tolerance to its minimum value
Handle(Geom_Surface) S;
TopLoc_Location l;
TopExp_Explorer ex;
@ -1363,7 +1359,7 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
if (aYmin>dMax) dMax=aYmin;
if (aZmin>dMax) dMax=aZmin;
tol=tol*dMax;
// On ne traite pas les tolerance > 1.
// Do not process tolerances > 1.
if (tol>1.) tol=0.99;
}
const Handle(BRep_TFace)& Tf = *((Handle(BRep_TFace)*)&curf.TShape());
@ -1372,7 +1368,7 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
}
}
//On traite les edges
//Process edges
TopTools_IndexedDataMapOfShapeListOfShape parents;
TopExp::MapShapesAndAncestors(aShape, TopAbs_EDGE, TopAbs_FACE, parents);
TopTools_ListIteratorOfListOfShape lConx;
@ -1382,12 +1378,12 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
for (lConx.Initialize(parents(iCur)); lConx.More(); lConx.Next()) {
tol=Max(tol, BRep_Tool::Tolerance(TopoDS::Face(lConx.Value())));
}
// Update ne peut que augmenter la tolerance, donc si l'edge a
// une tolerance + grande que ses faces on y touche pas
// Update can only increase tolerance, so if the edge has a greater
// tolerance than its faces it is not concerned
B.UpdateEdge(TopoDS::Edge(parents.FindKey(iCur)), tol);
}
//On traite les Vertices
//Vertices are processed
parents.Clear();
TopExp::MapShapesAndAncestors(aShape, TopAbs_VERTEX, TopAbs_EDGE, parents);
TColStd_MapOfTransient Initialized;
@ -1410,13 +1406,13 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
const TopLoc_Location& Eloc = E.Location();
while (itcr.More()) {
// Pour chaque CurveRepresentation, on verifie le parametre fourni
// For each CurveRepresentation, check the provided parameter
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
const TopLoc_Location& loc = cr->Location();
TopLoc_Location L = (Eloc * loc);
if (cr->IsCurve3D()) {
const Handle(Geom_Curve)& C = cr->Curve3D();
if (!C.IsNull()) { // edge non degenere
if (!C.IsNull()) { // edge non degenerated
p3d = C->Value(par);
p3d.Transform(L.Transformation());
box.Add(p3d);
@ -1449,8 +1445,8 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
tol = Max(tol,sqrt(aXmax*aXmax+aYmax*aYmax+aZmax*aZmax));
tol += 2.*Epsilon(tol);
if (verifyTolerance) {
// On force la tolerance a sa valeur minimale
// Attention au partage du vertex par d'autre shapes
// ASet minimum value of the tolerance
// Attention to sharing of the vertex by other shapes
const Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*)&V.TShape());
if (Initialized.Add(TV))
TV->Tolerance(tol);
@ -1458,8 +1454,8 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
B.UpdateVertex(V, tol);
}
else {
// Update ne peut que augmenter la tolerance, donc si le vertex a
// une tolerance + grande que ses edges on y touche pas
// Update can only increase tolerance, so if the edge has a greater
// tolerance than its faces it is not concerned
B.UpdateVertex(V, tol);
}
}
@ -1471,7 +1467,7 @@ void BRepLib::UpdateTolerances(const TopoDS_Shape& aShape,
//=======================================================================
Standard_Boolean BRepLib::OrientClosedSolid(TopoDS_Solid& solid)
{
// On met la matiere a l'interieur du solid
// Set material inside the solid
BRepClass3d_SolidClassifier where(solid);
where.PerformInfinitePoint(Precision::Confusion());
if (where.State()==TopAbs_IN) {
@ -1485,8 +1481,8 @@ Standard_Boolean BRepLib::OrientClosedSolid(TopoDS_Solid& solid)
//=======================================================================
//function : tgtfaces
//purpose : controle de l angle a la frontiere entre 2 carreaux.
// Les deux carreaux doivent partager leur edge frontiere.
//purpose : check the angle at the border between two squares.
// Two shares should have a shared front edge.
//=======================================================================
static Standard_Boolean tgtfaces(const TopoDS_Edge& Ed,
@ -1526,8 +1522,8 @@ static Standard_Boolean tgtfaces(const TopoDS_Edge& Ed,
Standard_Boolean IsInitialized = Standard_False;
eps = (l - f)/100.;
f += eps; // pour eviter de faire des calculs sur les
l -= eps; // pointes des carreaux pointus.
f += eps; // to avoid calculations on
l -= eps; // points of pointed squares.
gp_Pnt2d p;
gp_Pnt pp1,pp2;//,PP;
gp_Vec du,dv;
@ -1537,7 +1533,7 @@ static Standard_Boolean tgtfaces(const TopoDS_Edge& Ed,
Standard_Integer i;
Standard_Boolean Nok;
for(i = 0; (i<= 20) && (angmax<=ta) ; i++){
// On suppose d'abord que c'est sameParameter
// First suppose that this is sameParameter
Nok = Standard_True;
u = f + (l-f)*i/20;
HC2d1->D0(u,p);
@ -1557,7 +1553,7 @@ static Standard_Boolean tgtfaces(const TopoDS_Edge& Ed,
if(rev2) d2.Reverse();
if (Nok) ang = d1.Angle(d2);
if (Nok &&(ang > ta)) { // On raffine par projection
if (Nok &&(ang > ta)) { // Refine by projection
if (! IsInitialized ) {
ext.Initialize(C2,f,l,Precision::PConfusion());
IsInitialized = Standard_True;
@ -1588,8 +1584,8 @@ static Standard_Boolean tgtfaces(const TopoDS_Edge& Ed,
//=======================================================================
// function : EncodeRegularity
// purpose : code les regularites sur tous les edges du shape,frontiere
// de deux faces qui n en ont pas.
// purpose : code the regularities on all edges of the shape, boundary of
// two faces that do not have it.
//=======================================================================
void BRepLib::EncodeRegularity(const TopoDS_Shape& S,
@ -1615,7 +1611,7 @@ void BRepLib::EncodeRegularity(const TopoDS_Shape& S,
}
}
}
if (!found && !F1.IsNull()){//est ce un edge de couture?
if (!found && !F1.IsNull()){//is it a sewing edge?
TopAbs_Orientation orE = E.Orientation();
TopoDS_Edge curE;
for(Ex.Init(F1,TopAbs_EDGE);Ex.More() && !found;Ex.Next()){
@ -1639,7 +1635,7 @@ void BRepLib::EncodeRegularity(const TopoDS_Shape& S,
//=======================================================================
// function : EncodeRegularity
// purpose : code la regularite entre 2 face sur une edge
// purpose : code the regularity between 2 faces on an edge
//=======================================================================
void BRepLib::EncodeRegularity(TopoDS_Edge& E,

View File

@ -128,22 +128,20 @@ void BRepLib_MakeWire::Add(const TopoDS_Wire& W)
//=======================================================================
//function : Add
//purpose :
// PMN 19/03/1998 Pour des Probleme de performances on n'utilise pas
// TopExp::Vertices sur des wire
// PMN 10/09/1998 Dans le cas ou le wire est precedament ferme (ou degenere)
// on emploie quand meme TopExp::Vertices ... Afin de lever
// les ambiguites.
// PMN 19/03/1998 For the Problem of performance TopExp::Vertices are not used on wire
// PMN 10/09/1998 In case if the wire is previously closed (or degenerated)
// TopExp::Vertices is used to reduce the ambiguity.
//=======================================================================
void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
{
Standard_Boolean forward = Standard_False;
// pour dire si on decider d'ajouter forward
// to tell if it has been decided to add forward
Standard_Boolean reverse = Standard_False;
// pour dire si on decide d'ajouter reversed
// to tell if it has been decided to add reversed
Standard_Boolean init = Standard_False;
// Pour savoir s'il on doit calculer VL, VF
// To know if it is necessary to calculate VL, VF
BRep_Builder B;
TopoDS_Iterator it;
@ -161,7 +159,7 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
}
else {
init = myShape.Closed(); // Si c'est ferme, on ne controle
init = myShape.Closed(); // If it is closed no control
TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD);
TopoDS_Edge EE = TopoDS::Edge(aLocalShape);
// TopoDS_Edge EE = TopoDS::Edge(E.Oriented(TopAbs_FORWARD));
@ -185,9 +183,9 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
connected = Standard_True;
myVertex = VE;
if (myError != BRepLib_NonManifoldWire) {
// l est on toujours ?
// is it always so ?
if (VF.IsSame(VL)) {
// Orientation indetermine (en 3d) : On garde l'init
// Orientation indetermined (in 3d) : Preserve the initial
if (!VF.IsSame(VE)) myError = BRepLib_NonManifoldWire;
}
else {
@ -224,9 +222,9 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
(l < BRep_Tool::Tolerance(VW))) {
copyedge = Standard_True;
if (myError != BRepLib_NonManifoldWire) {
// l est on toujours ?
// is it always so ?
if (VF.IsSame(VL)) {
// Orientation indetermine (en 3d) : On garde l'init
// Orientation indetermined (in 3d) : Preserve the initial
if (!VF.IsSame(VW)) myError = BRepLib_NonManifoldWire;
}
else {
@ -320,12 +318,12 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
}
}
}
// On decide ici de l'orientation de l'arete
// S'il y a ambiguite (en 3d) on garde l'orientation donnee en entree
// Cas d'ambiguite :
// reverse et forward sont faux car on n'a rien decider :
// wire ferme, vertex interne ...
// reverse et forward sont vrai : Edge ferme ou degenere
// Make a decision about the orientation of the edge
// If there is an ambiguity (in 3d) preserve the orientation given at input
// Case of ambiguity :
// reverse and forward are false as nothing has been decided :
// closed wire, internal vertex ...
// reverse and forward are true : closed or degenerated edge
if ( ((forward == reverse) && (E.Orientation() == TopAbs_REVERSED)) ||
( reverse && !forward) ) myEdge.Reverse();
}
@ -344,20 +342,20 @@ void BRepLib_MakeWire::Add(const TopoDS_Edge& E)
else if (V2.IsSame(myVertex)) VRef = V1;
else {
#if DEB
cout << "MakeWire : Y A UN PROBLEME !!" << endl;
cout << "MakeWire : There is a PROBLEM !!" << endl;
#endif
myError = BRepLib_NonManifoldWire;
}
if (VF.IsSame(VL)) {
// Cas particulier: il faut controler les orientations
// Particular case: it is required to control the orientation
#if DEB
if (!VF.IsSame(myVertex))
cout << "MakeWire : Y A UN PROBLEME !!" << endl;
cout << "MakeWire : There is a PROBLEM !!" << endl;
#endif
}
else { // Cas general
else { // General case
if (VF.IsSame(myVertex)) VF = VRef;
else if (VL.IsSame(myVertex)) VL = VRef;
else {

View File

@ -224,7 +224,7 @@ void BRepLib_MakeWire::Add(const TopTools_ListOfShape& L)
if (noCandidat) {
theEdges.Clear();
// Some Edges are not connected to first edge and the diagnosis is as follows
// but the le "Maker" is Done() because otherwise it is not possible to return the constructed connected part...
// but the "Maker" is Done() because otherwise it is not possible to return the constructed connected part...
myError=BRepLib_DisconnectedWire;
}
else theEdges.Remove(itMOS.Key());

View File

@ -171,14 +171,14 @@ void BRepMAT2d_LinkTopoBilo::LinkToWire(const TopoDS_Wire& W,
}
//-----------------------------------------------------
// Construction Liens BasicElt => Curve du contour IndC.
// Construction Links BasicElt => Curve of contour IndC.
//-----------------------------------------------------
LinkToContour(Explo,IndC,BiLo,LinkBECont);
//---------------------------------------------------------------
// Iteration sur les BasicElts. L indice associe est le meme pour
// les courbes du contour et les edges. .
// Iteration on BasicElts. The associated index is the same for
// the curves of the contour and the edges. .
//---------------------------------------------------------------
for (Ite.Initialize(LinkBECont); Ite.More(); Ite.Next()) {
BE = BiLo.Graph()->BasicElt(Ite.Key());
@ -210,8 +210,8 @@ void BRepMAT2d_LinkTopoBilo::LinkToWire(const TopoDS_Wire& W,
//=======================================================================
//function : LinkToContour
//purpose : Association a chaque basicElt de la courbe du contour initial
// dont il provient.
//purpose : Association to each basicElt of the curre of the initial
// contour from which it comes.
//=======================================================================
void LinkToContour (const BRepMAT2d_Explorer& Explo,
@ -227,14 +227,14 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo,
Standard_Integer NbSect,ISect;
//---------------------------------------------------
// NbSect : nombre de sections sur la courbe courrant.
// ISect : Compteur sur les sections.
// NbSect : number of sections on the current curve.
// ISect : Counter on sections.
//---------------------------------------------------
const TColGeom2d_SequenceOfCurve& Cont = Explo.Contour(IndC);
//------------------------------------------------------------------
//Initialisation de l explorateur sur la premiere courbe du contour.
//Initialization of the explorer on the first curve of the contour.
//------------------------------------------------------------------
Standard_Integer IndOnCont = 1;
Standard_Integer PrecIndOnCont = -1;
@ -242,8 +242,8 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo,
ISect = 0;
//------------------------------------------------------------------
// Parcours des elements de base associes au contour IndC.
// Rq : les elements de base sont ordonnes.
// Parsing of base elements associated to contour IndC.
// Rq : the base elements are ordered.
//------------------------------------------------------------------
for (Standard_Integer i = 1; i <= BiLo.NumberOfElts(IndC); i++) {
@ -253,9 +253,9 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo,
if (Type != STANDARD_TYPE(Geom2d_CartesianPoint)) {
ISect++;
//--------------------------------------------------------------------
// l element de base est une courbe on lui associe la courbe courante.
//--------------------------------------------------------------------
//----------------------------------------------------------------
// The base element is a curve associated with the current curve.
//----------------------------------------------------------------
if (DirectSense) {
Link.Bind(BE->Index(), IndOnCont);
}
@ -264,9 +264,9 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo,
}
}
else {
//--------------------------------------------------------------------
// l element de base est un point on lui associe la courbe precedente
//--------------------------------------------------------------------
//-----------------------------------------------------------------
// The base element is a point associated with the previous curve.
//-----------------------------------------------------------------
if (DirectSense || LastPoint) {
Link.Bind(BE->Index(), PrecIndOnCont);
}
@ -277,8 +277,8 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo,
PrecIndOnCont = IndOnCont;
//----------------------------------------------------------------------
// Passage a la courbe suivante dans Explo, lorsqu on a parcouru toutes
// les portions de courbes correspondante a la courbe initiale.
// Passage to the next curve in Explo, when all parts
// of curves corresponding to the initial curve have been parsed.
//---------------------------------------------------------------------
if (Type != STANDARD_TYPE(Geom2d_CartesianPoint) && ISect == NbSect) {
if (IndOnCont < Cont.Length() && DirectSense) {
@ -288,7 +288,7 @@ void LinkToContour (const BRepMAT2d_Explorer& Explo,
}
else {
//-----------------------------------------------------
// Pour les lignes ouvertes on repart dans l autre sens.
// For open lines restart in the other direction.
//-----------------------------------------------------
if (!DirectSense) {
IndOnCont--;

View File

@ -540,7 +540,7 @@ static void filterParameters(const TColStd_IndexedMapOfReal& theParams,
TCollection_CompareOfReal aCompare;
SortTools_ShellSortOfReal::Sort(aParamArray, aCompare);
// mandadory pre filtering using the first (minimal) filter value
// mandadory pre-filtering using the first (minimal) filter value
Standard_Real aP1, aP2;
aP1 = aParamArray(1);
aParamTmp.Append(aP1);
@ -625,7 +625,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac
gp_Pnt2d p2d;
gp_Pnt p3d;
// travail suivant le type de surface
// work following the type of surface
const BRepAdaptor_Surface& BS = *(BRepAdaptor_Surface*)&(theCaro->Surface());
GeomAbs_SurfaceType thetype = theCaro->GetType();
@ -792,12 +792,11 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac
if (R < r)
{
// comme on recupere les points des edges.
// dans ce cas, les points ne sont pas representatifs.
// As the points of edges are returned.
// in this case, the points are not representative.
//-- On choisit DeltaX et DeltaY de facon a ce qu on ne saute pas
//-- de points sur la grille
for (i = 0; i <= nbU; i++) ParamU.Append(umin + i* Du);
//-- Choose DeltaX and DeltaY so that to avoid skipping points on the grid
for (i = 0; i <= nbU; i++) ParamU.Append(umin + i* Du);
}//R<r
else //U if R > r
{
@ -808,7 +807,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac
TColStd_Array1OfReal Up(1,LenU);
for (j = 1; j <= LenU; j++) Up(j) = myUParam(j);
// Calculate DU, sort array of parameters
// Calculate DU, leave array of parameters
Standard_Real aDU = FUN_CalcAverageDUV(Up,LenU);
aDU = Max(aDU, Abs(umax - umin) / (Standard_Real) nbU / 2.);
Standard_Real dUstd = Abs(umax - umin) / (Standard_Real) LenU;
@ -1071,7 +1070,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac
}
}
// recuperation du tableau de parametres V:
// return table of parameters V:
Standard_Integer NV = tabGU[imax].NbPoints();
for (i = 1; i <= NV; i++) {
ParamV.Append(tabGU[imax].Parameter(i));
@ -1094,7 +1093,7 @@ void BRepMesh_FastDiscretFace::InternalVertices(const Handle(BRepAdaptor_HSurfac
}
}
// recuperation du tableau de parametres U:
// return table of parameters U:
Standard_Integer NU = tabGV[imax].NbPoints();
for (i = 1; i <= NU; i++) {
ParamU.Append(tabGV[imax].Parameter(i));
@ -1597,7 +1596,7 @@ void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face& theFace,
T->Deflection(theDefFace);
// stockage de la triangulation dans la BRep.
// storage of triangulation in BRep.
BRep_Builder B1;
//TopLoc_Location loc = theFace.Location();
if (!loc.IsIdentity()) {
@ -1608,7 +1607,7 @@ void BRepMesh_FastDiscretFace::AddInShape(const TopoDS_Face& theFace,
}
B1.UpdateFace(theFace, T);
// mise en place des polygones sur triangulation dans la face:
// implement polygons on triangulation in the face:
BRepMesh_DataMapIteratorOfDataMapOfShapePairOfPolygon It(myInternaledges);
for (; It.More(); It.Next()) {
@ -1754,7 +1753,7 @@ static Standard_Boolean GetVertexParameters(const TopoDS_Vertex& theVert,
L = L.Predivided(theVert.Location());
BRep_ListIteratorOfListOfPointRepresentation itpr =
((*((Handle(BRep_TVertex)*) &theVert.TShape()))->Points());
// On regarde dabord si il y des PointRepresentation (cas non Manifold)
// Check first if there are PointRepresentation (case non Manifold)
while (itpr.More()) {
if (itpr.Value()->IsPointOnSurface(S,L)) {
@ -1769,7 +1768,7 @@ static Standard_Boolean GetVertexParameters(const TopoDS_Vertex& theVert,
//=======================================================================
//function : Add
//purpose : method intended to addition internal myVertices in triangulation.
//purpose : method intended to add internal myVertices in triangulation.
//=======================================================================
void BRepMesh_FastDiscretFace::Add(const TopoDS_Vertex& theVert,
const TopoDS_Face& theFace,

View File

@ -85,7 +85,7 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
f = C.FirstParameter();
l = C.LastParameter();
// Tangent si la regularite estaum moins G1.
// Tangent if the regularity is at least G1.
if (BRep_Tool::HasContinuity(E,F1,F2)) {
if (BRep_Tool::Continuity(E,F1,F2) > GeomAbs_C0) {
BRepOffset_Interval I;
@ -95,9 +95,9 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
return;
}
}
// Premiere etape : Type determine par un des bout.
// Calcul des normales et tangentes sur les courbes et surface.
// normales sont dirigees vers l exterieur.
// First stage : Type determined by one of ends.
// Calculate normals and tangents on the curves and surface.
// normals are oriented outwards.
Standard_Real ParOnC = 0.5*(f+l);
gp_Vec T1 = C.DN(ParOnC,1).Transformed(L.Transformation());
@ -133,15 +133,15 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
I.First(f); I.Last(l);
if (Abs(NormProVec) < SinTol) {
// plat
// plane
if (DN1.Dot(DN2) > 0) {
//Tangent
I.Type(BRepOffset_Tangent);
}
else {
//Confondu pas fini!
//Mixed not finished!
#ifdef DEB
cout <<" face localement confondues"<<endl;
cout <<" faces locally mixed"<<endl;
#endif
I.Type(BRepOffset_Convex);
}
@ -151,11 +151,11 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
ProVec.Normalize();
Standard_Real Prod = T1.Dot(DN1^DN2);
if (Prod > 0.) {
//Saillant
//
I.Type(BRepOffset_Convex);
}
else {
//rentrant
//reenters
I.Type(BRepOffset_Concave);
}
}
@ -174,7 +174,7 @@ static void BuildAncestors (const TopoDS_Shape& S,
TopExp::MapShapesAndAncestors(S,TopAbs_VERTEX,TopAbs_EDGE,MA);
TopExp::MapShapesAndAncestors(S,TopAbs_EDGE ,TopAbs_FACE,MA);
// Purge des ancetres.
// Purge ancestors.
TopTools_MapOfShape Map;
for (Standard_Integer i = 1; i <= MA.Extent(); i++) {
Map.Clear();
@ -420,8 +420,8 @@ void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List,
TopoDS_Compound Co;
B.MakeCompound(Co);
B.Add(Co,Face);
// on ajoute a Co toutes les faces constituant la nappe de faces
// G1 creee a partir de <Face>
// add to Co all faces from the cloud of faces
// G1 created from <Face>
AddFaces(Face,Co,Map,T);
List.Append(Co);
}
@ -448,8 +448,8 @@ void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List,
TopoDS_Compound Co;
B.MakeCompound(Co);
B.Add(Co,Face);
// on ajoute a Co toutes les faces constituant la nappe de faces
// G1 creee a partir de <Face>
// add to Co all faces from the cloud of faces
// G1 created from <Face>
AddFaces(Face,Co,Map,T1,T2);
List.Append(Co);
}
@ -473,7 +473,7 @@ void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face,
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
const BRepOffset_ListOfInterval& LI = Type(E);
if (!LI.IsEmpty() && LI.First().Type() == T) {
// alors ca y est <NewFace> est raccordee G1 a <Face>
// so <NewFace> is attached to G1 by <Face>
const TopTools_ListOfShape& L = Ancestors(E);
if (L.Extent() == 2) {
TopoDS_Face F1 = TopoDS::Face(L.First());
@ -505,7 +505,7 @@ void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face,
const BRepOffset_ListOfInterval& LI = Type(E);
if (!LI.IsEmpty() &&
(LI.First().Type() == T1 || LI.First().Type() == T2)) {
// alors ca y est <NewFace> est raccordee G1 a <Face>
// so <NewFace> is attached to G1 by <Face>
const TopTools_ListOfShape& L = Ancestors(E);
if (L.Extent() == 2) {
TopoDS_Face F1 = TopoDS::Face(L.First());

View File

@ -122,10 +122,9 @@ static void Store (const TopoDS_Edge& E1,
Standard_Real Tol)
{
//-------------------------------------------------------------
// Test si les points d intersection correspondent a des vertex
// existants.Sinon ajout dans les descendants des edges.
// Remarque a ce stade seulement les vertex d intersection sont
// dans les descendants.
// Test if the points of intersection correspond to existing
// vertices. Otherwise add edges in the descendants.
// Note: at this stage only vertices of intersection are in the descendants.
//-------------------------------------------------------------
const TopTools_ListOfShape& VOnE1 = AsDes->Descendant(E1);
const TopTools_ListOfShape& VOnE2 = AsDes->Descendant(E2);
@ -154,7 +153,7 @@ static void Store (const TopoDS_Edge& E1,
if (!VOnE1.IsEmpty()) {
//-----------------------------------------------------------------
// Recherche si le point d intersection correspond a un vertex de E1.
// Find if the point of intersection corresponds to a vertex of E1.
//-----------------------------------------------------------------
for (it.Initialize(VOnE1); it.More(); it.Next()) {
P1 = BRep_Tool::Pnt(TopoDS::Vertex(it.Value()));
@ -169,7 +168,7 @@ static void Store (const TopoDS_Edge& E1,
if (!VOnE2.IsEmpty()) {
if (OnE1) {
//-----------------------------------------------------------------
// Recherche si le vertex trouve sur E1 n est pas deja sur E2.
// Find if the vertex found on E1 is not already on E2.
//-----------------------------------------------------------------
for (it.Initialize(VOnE2); it.More(); it.Next()) {
if (it.Value().IsSame(V)) {
@ -181,7 +180,7 @@ static void Store (const TopoDS_Edge& E1,
}
for (it.Initialize(VOnE2); it.More(); it.Next()) {
//-----------------------------------------------------------------
// Recherche si le point d intersection correspond a un vertex de E2.
// Find if the point of intersection corresponds to a vertex of E2.
//-----------------------------------------------------------------
P2 = BRep_Tool::Pnt(TopoDS::Vertex(it.Value()));
if (P.IsEqual(P2,Tol)) {
@ -195,9 +194,9 @@ static void Store (const TopoDS_Edge& E1,
if (OnE1 && OnE2) {
if (!V1.IsSame(V2)) {
//---------------------------------------------------------------
// Les deux vertex sont en fait les memes.
// on va remplacer V2 par V1.
// mis a jour des parametres des vertex sur les edges.
// Two vertices are actually the same.
// V2 will be replaced by V1.
// update the parameters of vertex on edges.
//---------------------------------------------------------------
Standard_Real UV2;
TopoDS_Edge EWE2;
@ -280,7 +279,7 @@ static void EdgeInter(const TopoDS_Face& F,
Standard_Real f[3],l[3];
Standard_Real MilTol2 = 1000*Tol*Tol;
Standard_Real TolDub = 1.e-7; // Faire un calcul plus malin !!! NYI
Standard_Real TolDub = 1.e-7;
Standard_Integer i;
BRep_Tool::Range(E1, f[1], l[1]);
@ -373,17 +372,17 @@ static void EdgeInter(const TopoDS_Face& F,
#ifdef DEB
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT1 = "<<aT1<<", f[1] = "<<f[1]<<", l[1] = "<<l[1]<<endl;
}
if (aT2 < f[2]-Tol || aT2 > l[2]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT2 = "<<aT2<<", f[2] = "<<f[2]<<", l[2] = "<<l[2]<<endl;
}
if (P1.SquareDistance(P) > MilTol2 || P2.SquareDistance(P) > MilTol2 || P1.Distance(P2) > 2.*Tol)
{
cout << "Inter2d : Solution rejete "<<endl;
cout << "Inter2d : Solution rejected "<<endl;
cout<<"P = "<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
cout<<"P1 = "<<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<endl;
cout<<"P2 = "<<P2.X()<<" "<<P2.Y()<<" "<<P2.Z()<<endl;
@ -421,7 +420,7 @@ static void EdgeInter(const TopoDS_Face& F,
}
//----------------------------------
// Test en bout.
// Test at end.
//---------------------------------
Standard_Real U1,U2;
Standard_Real TolConf = Tol;
@ -470,8 +469,8 @@ static void EdgeInter(const TopoDS_Face& F,
if ( !LV1.IsEmpty()) {
//----------------------------------
// Purge de l ensemble des vertex.
// il peut y avoir des doublons
// Remove all vertices.
// There can be doubles
//----------------------------------
TopTools_ListIteratorOfListOfShape it1LV1,it1LV2,it2LV1;
gp_Pnt P1,P2;
@ -497,7 +496,7 @@ static void EdgeInter(const TopoDS_Face& F,
// Modified by skv - Thu Jan 22 18:19:05 2004 OCC4455 End
LV1.Remove(it1LV1);
LV2.Remove(it1LV2);
if (AffichPurge) cout <<"Doublons purges dans EdgeInter."<<endl;
if (AffichPurge) cout <<"Doubles removed in EdgeInter."<<endl;
Purge = Standard_True;
break;
}
@ -509,7 +508,7 @@ static void EdgeInter(const TopoDS_Face& F,
}
}
//---------------------------------
// Stockage vertex en SD.
// Vertex storage in DS.
//---------------------------------
// Modified by skv - Tue Jan 13 15:14:30 2004 Begin
Standard_Real TolStore = BRep_Tool::Tolerance(E1) + BRep_Tool::Tolerance(E2);
@ -537,7 +536,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
{
#ifdef DRAW
if (AffichInt2d) {
//POP pour NT
//POP for NT
char* name = new char[100];
sprintf(name,"E2d_%d_%d",NbF2d,NbE2d++);
DBRep::Set(name,E1);
@ -551,7 +550,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
Standard_Real f[3],l[3];
Standard_Real MilTol2 = 1000*Tol*Tol;
Standard_Real TolDub = 1.e-7; // Faire un calcul plus malin !!! NYI
Standard_Real TolDub = 1.e-7;
Standard_Integer i;
//BRep_Tool::Range(E1, f[1], l[1]);
@ -641,17 +640,17 @@ static void RefEdgeInter(const TopoDS_Face& F,
#ifdef DEB
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT1 = "<<aT1<<", f[1] = "<<f[1]<<", l[1] = "<<l[1]<<endl;
}
if (aT2 < f[2]-Tol || aT2 > l[2]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT2 = "<<aT2<<", f[2] = "<<f[2]<<", l[2] = "<<l[2]<<endl;
}
if (P1.SquareDistance(P) > MilTol2 || P2.SquareDistance(P) > MilTol2 || P1.Distance(P2) > 2.*Tol)
{
cout << "Inter2d : Solution rejete "<<endl;
cout << "Inter2d : Solution rejected"<<endl;
cout<<"P = "<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
cout<<"P1 = "<<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<endl;
cout<<"P2 = "<<P2.X()<<" "<<P2.Y()<<" "<<P2.Z()<<endl;
@ -688,7 +687,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
}
//----------------------------------
// Test en bout.
// Test at end.
//---------------------------------
Standard_Real U1,U2;
Standard_Real TolConf = Tol;
@ -725,8 +724,8 @@ static void RefEdgeInter(const TopoDS_Face& F,
if ( !LV1.IsEmpty()) {
//----------------------------------
// Purge de l ensemble des vertex.
// il peut y avoir des doublons
// Remove all vertices.
// there can be doubles
//----------------------------------
TopTools_ListIteratorOfListOfShape it1LV1,it1LV2,it2LV1;
gp_Pnt P1,P2;
@ -745,7 +744,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
if (P1.IsEqual(P2,10*Tol)) {
LV1.Remove(it1LV1);
LV2.Remove(it1LV2);
if (AffichPurge) cout <<"Doublons purges dans EdgeInter."<<endl;
if (AffichPurge) cout <<"Doubles removed in EdgeInter."<<endl;
Purge = Standard_True;
break;
}
@ -757,7 +756,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
}
}
//---------------------------------
// Stockage vertex en SD.
// Vertex storage in SD.
//---------------------------------
////-----------------------------------------------------
if(LV1.Extent() > 1) {
@ -931,8 +930,8 @@ static void ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const Standard_Real
BRep_Tool::Range(E, anEf, anEl);
NE = TopoDS::Edge(aLocalShape);
// NE = TopoDS::Edge(E.EmptyCopied());
// Suffit pour les edges analytiques, pour le cas general reconstruire la
// la geometrie de l edge en recalculant l intersection des surfaces.
// Enough for analytic edges, for general case reconstruct the
// geometry of the edge recalculating the intersection of surfaces.
//BRepLib::BuildCurve3d(E);
@ -1412,14 +1411,14 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes,
EdgesOfFace.Add( Explo.Current() );
//-----------------------------------------------------------
// calcul des intersections2d sur les faces touchees par les
// calculate intersections2d on faces touched by
// intersection3d
//---------------------------------------------------------
TopTools_ListIteratorOfListOfShape it1LE ;
TopTools_ListIteratorOfListOfShape it2LE ;
//-----------------------------------------------
// Intersection des edges 2 a 2.
// Intersection of edges 2*2.
//-----------------------------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
TopoDS_Vertex V1,V2;
@ -1433,8 +1432,8 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes,
while (j < i && it2LE.More()) {
const TopoDS_Edge& E2 = TopoDS::Edge(it2LE.Value());
//--------------------------------------------------------------
// Intersectionns des Nouvelles edges obtenues par intersection
// entre elles et avec les edges de restictions
// Intersections of New edges obtained by intersection
// between them and with edges of restrictions
//------------------------------------------------------
if ( (!EdgesOfFace.Contains(E1) || !EdgesOfFace.Contains(E2)) &&
(NewEdges.Contains(E1) || NewEdges.Contains(E2)) ) {
@ -1471,7 +1470,7 @@ void BRepOffset_Inter2d::ConnexIntByInt
BRepOffset_Tool::MapVertexEdges(FI,MVE);
//---------------------
// Extension des edges.
// Extension of edges.
//---------------------
TopoDS_Edge NE;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it(MVE);
@ -1538,7 +1537,7 @@ void BRepOffset_Inter2d::ConnexIntByInt
// TopoDS_Edge CEO = TopoDS::Edge(OFI.Generated(CurE));
// TopoDS_Edge NEO = TopoDS::Edge(OFI.Generated(NextE));
//------------------------------------------
//traitement Inter des images de CurE NextE.
// Inter processing of images of CurE NextE.
//------------------------------------------
TopTools_ListOfShape LV1,LV2;
Standard_Boolean DoInter = 1;

View File

@ -60,8 +60,8 @@ static void ExtentEdge(const TopoDS_Face& F,
// NE = TopoDS::Edge(E.EmptyCopied());
// Suffit pour les edges analytiques, pour le cas general reconstruire la
// la geometrie de l edge en recalculant l intersection des surfaces.
// Enough for analytic edges, in general case reconstruct the
// geometry of the edge recalculating the intersection of surfaces.
NE.Orientation(TopAbs_FORWARD);
Standard_Real f,l;
@ -92,7 +92,7 @@ static void SelectEdge (const TopoDS_Face& F,
TopTools_ListOfShape& LInt)
{
//------------------------------------------------------------
// detrompeur sur les intersections sur les faces periodiques
// Proofing on the intersections on periodical faces
//------------------------------------------------------------
TopTools_ListIteratorOfListOfShape it(LInt);
// Modified by Sergey KHROMOV - Wed Jun 5 11:43:04 2002 Begin
@ -112,7 +112,7 @@ static void SelectEdge (const TopoDS_Face& F,
Extrema_ExtPC anExt;
// Modified by Sergey KHROMOV - Wed Jun 5 11:23:11 2002 End
//----------------------------------------------------------------------
// Selection de l edge qui couvre le plus le domaine de l edge initiale.
// Selection of edge that coversmost of the domain of the initial edge.
//----------------------------------------------------------------------
for (; it.More(); it.Next()) {
const TopoDS_Edge& EI = TopoDS::Edge(it.Value());
@ -198,14 +198,14 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces,
const BRepAlgo_Image& InitOffsetFace)
{
//---------------------------------------------------------------
// Calcul des intersections des offsetfaces entre elles
// Distinction des intersection entre faces // tangentes.
// Calculate the intersections of offset faces
// Distinction of intersection between faces // tangents.
//---------------------------------------------------------------
TopoDS_Face F1,F2;
TopTools_ListIteratorOfListOfShape it;
//---------------------------------------------------------------
// Construction des boites englobantes.
// Construction of bounding boxes
//---------------------------------------------------------------
TopOpeBRepTool_BoxSort BOS;
BRep_Builder B;
@ -219,7 +219,7 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces,
BOS.AddBoxesMakeCOB(CompOS,TopAbs_FACE);
//---------------------------
// Intersection des faces //
// Intersection of faces //
//---------------------------
for (it.Initialize(SetOfFaces); it.More(); it.Next()) {
const TopoDS_Face& F1 = TopoDS::Face(it.Value());
@ -257,13 +257,13 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
if (BRepOffset_Tool::HasCommonShapes(F1,F2,LE,LV) ||
myAsDes->HasCommonDescendant(F1,F2,LE)) {
//-------------------------------------------------
// F1 et F2 partagent des shapes.
// F1 and F2 share shapes.
//-------------------------------------------------
if ( LE.IsEmpty() && !LV.IsEmpty()) {
if (InterPipes) {
//----------------------------
// tuyaux partageant un vertex.
//----------------------------
//----------------------
// tubes share a vertex.
//----------------------
const TopoDS_Edge& EE1 = TopoDS::Edge(InitF1);
const TopoDS_Edge& EE2 = TopoDS::Edge(InitF2);
TopoDS_Vertex VE1[2],VE2[2];
@ -277,16 +277,16 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
}
}
}
if (!InitOffsetFace.HasImage(V)) { //pas de sphere
if (!InitOffsetFace.HasImage(V)) { //no sphere
BRepOffset_Tool::PipeInter(F1,F2,LInt1,LInt2,mySide);
}
}
else {
//--------------------------------------------------------
// Intersection de faces n ayant que des vertex en communs.
// et dont les supports avaient des edges en commun.
// INSUFFISANT mais critere plus large secoue trop
// les sections et le reste pour l instant.
// Intersection having only common vertices
// and supports having common edges.
// UNSUFFICIENT, but a larger criterion shakes too
// many sections.
//--------------------------------------------------------
if (InterFaces &&
BRepOffset_Tool::HasCommonShapes(TopoDS::Face(InitF1),
@ -326,16 +326,15 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
TopoDS_Edge NullEdge;
//---------------------------------------------------------------------
// etape 1 : Intersections des face // correspondant a des faces
// initiales separees par une edge concave si offset > 0,
// convexe sinon.
// etape 1 : Intersection of faces // corresponding to the initial faces
// separated by a concave edge if offset > 0, otherwise convex.
//---------------------------------------------------------------------
for (; Exp.More(); Exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(Exp.Current());
const BRepOffset_ListOfInterval& L = Analyse.Type(E);
if (!L.IsEmpty() && L.First().Type() == OT) {
//-----------------------------------------------------------
// l edge est du bon type , recuperation des faces adjacentes.
// edge is of the proper type , return adjacent faces.
//-----------------------------------------------------------
const TopTools_ListOfShape& Anc = Analyse.Ancestors(E);
if (Anc.Extent() == 2) {
@ -349,11 +348,9 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
}
}
//---------------------------------------------------------------------
// etape 2 : Intersections des tuyaux partageant un vertex sans
// sphere avec:
// - Soit les tuyaux sur chaque autre edge partageant le vertex
// - Soit avec les faces contenant une edge connexe au vertex
// qui n a pas de tuyaux.
// etape 2 : Intersections of tubes sharing a vertex without sphere with:
// - tubes on each other edge sharing the vertex
// - faces containing an edge connected to vertex that has no tubes.
//---------------------------------------------------------------------
TopoDS_Vertex V[2];
TopTools_ListIteratorOfListOfShape it;
@ -362,7 +359,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
const TopoDS_Edge& E1 = TopoDS::Edge(Exp.Current());
if (InitOffsetFace.HasImage(E1)) {
//---------------------------
// E1 a genere un tuyau.
// E1 generated a tube.
//---------------------------
F1 = TopoDS::Face(InitOffsetFace.Image(E1).First());;
TopExp::Vertices(E1,V[0],V[1]);
@ -371,7 +368,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
for (Standard_Integer i = 0; i < 2; i++) {
if (!InitOffsetFace.HasImage(V[i])) {
//-----------------------------
// le vertex n a pas de sphere.
// the vertex has no sphere.
//-----------------------------
const TopTools_ListOfShape& Anc = Analyse.Ancestors(V[i]);
TopTools_ListOfShape TangOnV;
@ -399,12 +396,12 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
// Modified by skv - Fri Jan 16 16:27:54 2004 OCC4455 End
if (InitOffsetFace.HasImage(E2)) {
//-----------------------------
// E2 a genere un tuyau.
// E2 generated a tube.
//-----------------------------
F2 = TopoDS::Face(InitOffsetFace.Image(E2).First());
if (!IsDone(F1,F2)) {
//---------------------------------------------------------------------
// Intersection tuyau/tuyau si les edges ne sont pas tangentes (AFINIR).
// Intersection tube/tube if the edges are not tangent (AFINIR).
//----------------------------------------------------------------------
BRepOffset_Tool::PipeInter (F1,F2,LInt1,LInt2,mySide);
Store (F1,F2,LInt1,LInt2);
@ -412,9 +409,9 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
}
else {
//-------------------------------------------------------
// Intersection du tuyau de E1 avec les faces //
// aux face contenant E2 si elles ne sont pas tangentes
// au tuyau. ou si E2 n est pas une edge tangente.
// Intersection of the tube of E1 with faces //
// to face containing E2 if they are not tangent
// to the tube or if E2 is not a tangent edge.
//-------------------------------------------------------
const BRepOffset_ListOfInterval& L = Analyse.Type(E2);
if (!L.IsEmpty() && L.First().Type() == BRepOffset_Tangent) {
@ -485,7 +482,7 @@ void BRepOffset_Inter3d::ConnexIntByInt
if (OT == BRepOffset_Concave) CurSide = TopAbs_IN;
else CurSide = TopAbs_OUT;
//-----------------------------------------------------------
// l edge est du bon type , recuperation des faces adjacentes.
// edge is of the proper type, return adjacent faces.
//-----------------------------------------------------------
const TopTools_ListOfShape& Anc = Analyse.Ancestors(E);
if (Anc.Extent() != 2) continue;
@ -517,7 +514,7 @@ void BRepOffset_Inter3d::ConnexIntByInt
BRepOffset_Tool::Inter3D (NF1,NF2,LInt1,LInt2,CurSide,E,Standard_True);
if (LInt1.Extent() > 1)
{
// l intersection est en plusieurs edges (franchissement de couture)
// intersection is in seceral edges (free sewing)
SelectEdge( NF1, NF2, E, LInt1 );
SelectEdge( NF1, NF2, E, LInt2 );
}
@ -610,8 +607,8 @@ void BRepOffset_Inter3d::ContextIntByInt
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
if (!Analyse.HasAncestor(E)) {
//----------------------------------------------------------------
// Les edges des faces de contexte qui ne sont pas dans le shape
// initiales peuvent apparaitre dans le resultat.
// the edges of faces of context that are not in the initial shape
// can appear in the result.
//----------------------------------------------------------------
if (!ExtentContext) {
myAsDes->Add(CF,E);
@ -753,14 +750,14 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
continue;
}
OE.Nullify();
//----------------------------------------------
// OF1 face parallele genere par l ancetre de E.
//----------------------------------------------
//---------------------------------------------------
// OF1 parallel facee generated by the ancestor of E.
//---------------------------------------------------
const TopoDS_Shape SI = Analyse.Ancestors(E).First();
OF1 = TopoDS::Face(InitOffsetFace.Image(SI).First());
OE = TopoDS::Edge(InitOffsetEdge.Image(E).First());
//--------------------------------------------------
// MAJ de OE sur bouchon CF.
// MAJ of OE on cap CF.
//--------------------------------------------------
// TopTools_ListOfShape LOE; LOE.Append(OE);
// BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide);
@ -777,7 +774,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
Store(CF,OF1,LInt1,LInt2);
//------------------------------------------------------
// Traitement des offsets sur les ancetres des vertices.
// Processing of offsets on the ancestors of vertices.
//------------------------------------------------------
TopoDS_Vertex V[2];
TopExp::Vertices (E,V[0],V[1]);
@ -790,12 +787,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
const TopoDS_Edge& EV = TopoDS::Edge(itLE.Value());
if (InitOffsetFace.HasImage(EV)) {
//-------------------------------------------------
// OF1 face parallele genere par une edge ancetre de V[i].
// OF1 parallel face generated by an ancester edge of V[i].
//-------------------------------------------------
OF1 = TopoDS::Face(InitOffsetFace.Image(EV).First());
OE = TopoDS::Edge(InitOffsetEdge.Image(V[i]).First());
//--------------------------------------------------
// MAj de OE sur bouchon CF.
// MAj of OE on cap CF.
//--------------------------------------------------
// LOE.Clear(); LOE.Append(OE);
// BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide);
@ -830,13 +827,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
for ( ; itLF.More(); itLF.Next()) {
const TopoDS_Face& FEV = TopoDS::Face(itLF.Value());
//-------------------------------------------------
// OF1 face parallele genere par uneFace ancetre de V[i].
// OF1 parallel face generated by uneFace ancestor of V[i].
//-------------------------------------------------
OF1 = TopoDS::Face(InitOffsetFace.Image(FEV).First());
if (!IsDone(OF1,CF)) {
//-------------------------------------------------------
//Recherche si une des edges de OF1 n a pas de trace dans
// CF.
// Find if one of edges of OF1 has no trace in CF.
//-------------------------------------------------------
TopTools_ListOfShape LOE;
TopExp_Explorer exp2(OF1.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
@ -845,7 +841,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
}
BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide,myTol);
//-------------------------------------------------------
// Si pas de trace essai intersection.
// If no trace try intersection.
//-------------------------------------------------------
if (LInt1.IsEmpty()) {
BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,NullEdge);

View File

@ -54,11 +54,11 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
for (; it.More(); it.Next()) {
const TopoDS_Face& F = TopoDS::Face(it.Value());
//---------------------------
// Initialisation de Loops.
// Initialization of Loops.
//---------------------------
Loops.Init(F);
//-----------------------------
// recuperation des edges de F.
// return edges of F.
//-----------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
TopTools_ListOfShape AddedEdges;
@ -67,10 +67,9 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
TopoDS_Edge E = TopoDS::Edge(itl.Value());
if (Image.HasImage(E)) {
//-------------------------------------------
// E a deja ete decoupeee dans une autre face.
// Recuperation des edges decoupees et reorientation
// de ces edges comme E.
// Voir pb pour les edges qui ont disparu?
// E was already cut in another face.
// Return the cut edges reorientate them as E.
// See pb for the edges that have disappeared?
//-------------------------------------------
const TopTools_ListOfShape& LCE = Image.Image(E);
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
@ -84,7 +83,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
}
}
//------------------------
// Debouclage.
// Unwind.
//------------------------
Loops.Perform();
Loops.WiresToFaces();
@ -93,7 +92,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
//------------------------
const TopTools_ListOfShape& NF = Loops.NewFaces();
//-----------------------
// F => Nouvelles faces;
// F => New faces;
//-----------------------
Image.Bind(F,NF);
@ -101,7 +100,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
//-----------------------
// E => Nouvelles edges;
// E => New edges;
//-----------------------
const TopTools_ListOfShape& LoopNE = Loops.NewEdges(E);
if (Image.HasImage(E)) {
@ -194,7 +193,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
const Standard_Boolean InSide)
{
//-----------------------------------------
// debouclage des bouchons.
// unwinding of caps.
//-----------------------------------------
TopTools_ListIteratorOfListOfShape it(LContext);
TopTools_ListIteratorOfListOfShape itl,itLCE;
@ -207,16 +206,16 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
const TopoDS_Face& F = TopoDS::Face(it.Value());
TopTools_MapOfShape MBound;
//-----------------------------------------------
// Initialisation de Loops.
// F est reversed elle sera ajoute dans myOffC.
// et myOffC sera reversed dans le resultat final.
// Initialisation of Loops.
// F is reversed it will be added in myOffC.
// and myOffC will be reversed in the final result.
//-----------------------------------------------
TopoDS_Shape aLocalShape = F.Reversed();
if (InSide) Loops.Init(TopoDS::Face(aLocalShape));
// if (InSide) Loops.Init(TopoDS::Face(F.Reversed()));
else Loops.Init(F);
//--------------------------------------------------------
// recuperation des edges de F non modifie par definition.
// return edges of F not modified by definition.
//--------------------------------------------------------
for (exp.Init(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
exp.More();
@ -224,7 +223,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
TopoDS_Edge CE = TopoDS::Edge(exp.Current());
MBound.Add(CE);
if (Analyse.HasAncestor(CE)) {
// les arretes des bouchons sauf les arretes de conexite entre bouchons.
// the stop of cups except for the connectivity stops between caps.
// if (!AsDes->HasAscendant(CE)) {
aLocalShape = CE.Reversed();
if (InSide) Loops.AddConstEdge(CE);
@ -233,7 +232,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
}
}
//------------------------------------------------------
// Trace des offsets + edge de connexite entre bouchons.
// Trace of offsets + connectivity edge between caps.
//------------------------------------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
TopTools_ListOfShape AddedEdges;
@ -242,10 +241,9 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
TopoDS_Edge E = TopoDS::Edge(itl.Value());
if (Image.HasImage(E)) {
//-------------------------------------------
// E a deja ete decoupeee dans une autre face.
// Recuperation des edges decoupees et reorientation
// de ces edges comme E.
// Voir pb pour les edges qui ont disparu?
// E was already cut in another face.
// Return cut edges and orientate them as E.
// See pb for the edges that have disappeared?
//-------------------------------------------
const TopTools_ListOfShape& LCE = Image.Image(E);
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
@ -266,7 +264,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
}
else {
if (IsBetweenCorks(E,AsDes,LContext) && AsDes->HasDescendant(E)) {
//conexite entre 2 bouchons
//connection between 2 caps
MapExtent.Add(E);
TopTools_ListOfShape LV;
if (InSide) {
@ -297,7 +295,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
}
}
//------------------------
// Debouclage.
// Unwind.
//------------------------
Loops.Perform();
Loops.WiresToFaces();
@ -306,7 +304,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
//------------------------
const TopTools_ListOfShape& NF = Loops.NewFaces();
//-----------------------
// F => Nouvelles faces;
// F => New faces;
//-----------------------
Image.Bind(F,NF);
@ -314,7 +312,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
//-----------------------
// E => Nouvelles edges;
// E => New edges;
//-----------------------
if (Image.HasImage(E)) {
Image.Add(E,Loops.NewEdges(E));
@ -385,7 +383,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
BRep_Builder B;
//----------------------------------
// Boucle sur toutes les faces //.
// Loop on all faces //.
//----------------------------------
for (itr.Initialize(LF); itr.More(); itr.Next()) {
TopoDS_Face F = TopoDS::Face(itr.Value());
@ -395,14 +393,13 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
if (!Image.HasImage(F)) {
//----------------------------------
// Face F non deja reconstruite.
// Face F not yet reconstructed.
//----------------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
//----------------------------------------------------------------
// premiere boucle pour determiner si des edges de la face ont ete
// reconstruite.
// - maj de la map MONV. certains vertex sur les edges reconstruites
// coincide geometriquement avec les anciens mais ne sont pas IsSame.
// first loop to find if the edges of the face were reconstructed.
// - maj on map MONV. Some vertices on reconstructed edges
// coincide geometrically with old but are not IsSame.
//----------------------------------------------------------------
TopTools_DataMapOfShapeShape MONV;
TopoDS_Vertex OV1,OV2,NV1,NV2;
@ -419,7 +416,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
continue;
}
//----------------------------------
// F doit etre reconstruite.
// F should be reconstructed.
//----------------------------------
ToRebuild = Standard_True;
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
@ -436,7 +433,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
}
if (ToRebuild) {
#ifdef DRAW
//POP pour NT
//POP for NT
if ( Affich) {
char* name = new char[100];
sprintf(name,"CF_%d",NbF++);
@ -445,9 +442,8 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
#endif
//-----------------------------------------------------------
// les edges non reconstruites dans d autre faces sont
// ajoutees .si leurs vertex ont ete reconstruits elles
// seront reconstruites.
// Non-reconstructed edges on other faces are added.
// If their vertices were reconstructed they are reconstructed.
//-----------------------------------------------------------
for (itl.Initialize(LE); itl.More(); itl.Next()) {
Standard_Real f,l;
@ -494,7 +490,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
//------------------------
const TopTools_ListOfShape& NF = Loops.NewFaces();
//-----------------------
// F => Nouvelles faces;
// F => New faces;
//-----------------------
Image.Bind(F,NF);
@ -502,7 +498,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
//-----------------------
// E => Nouvelles edges;
// E => New edges;
//-----------------------
if (Image.HasImage(E)) {
Image.Add(E,Loops.NewEdges(E));

View File

@ -101,7 +101,7 @@
#include <GeomFill_Generator.hxx>
// POP pour NT
// POP for NT
#include <stdio.h>
#ifdef DRAW
@ -145,7 +145,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
for (it1LE.Initialize(AsDes->Descendant(NE)); it1LE.More(); it1LE.Next()) {
if (AsDes->Ascendant(it1LE.Value()).Extent() < 3) {
LVP.Append(it1LE.Value());
cout <<"Vertex sur moins de 3 edges."<<endl;
cout <<"Vertex on at least 3 edges."<<endl;
#ifdef DRAW
if (AffichInt2d) {
sprintf (name,"VP_%d",NVP++);
@ -154,7 +154,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
#endif
}
else if (AsDes->Ascendant(it1LE.Value()).Extent() > 3) {
cout <<"Vertex sur plus de 3 edges."<<endl;
cout <<"Vertex on more than 3 edges."<<endl;
#ifdef DRAW
if (AffichInt2d) {
sprintf (name,"VM_%d",NVM++);
@ -175,7 +175,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
}
}
//------------------------------------------------
// Essai de confusion des vertex pourris.
// Try to mix spoiled vertices.
//------------------------------------------------
BRep_Builder B;
TopTools_ListIteratorOfListOfShape it1(LVP);
@ -220,7 +220,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
j++;
}
i++;
cout <<" distmin entre VP : "<<distmin<<endl;
cout <<" distmin between VP : "<<distmin<<endl;
}
}
#endif
@ -570,8 +570,8 @@ static void RemoveCorks (TopoDS_Shape& S,
BRep_Builder B;
B.MakeCompound (SS);
//-----------------------------------------------------
// Construction d un shape sans les bouchons.
// et Orientation des bouchons comme dans le shape S.
// Construction of a shape without caps.
// and Orientation of caps as in shape S.
//-----------------------------------------------------
TopExp_Explorer exp(S,TopAbs_FACE);
for (; exp.More(); exp.Next()) {
@ -581,7 +581,7 @@ static void RemoveCorks (TopoDS_Shape& S,
}
else {
Faces.Remove (Cork);
Faces.Add (Cork); // pour la remettre avec la bonne orientation.
Faces.Add (Cork); // to reset it with proper orientation.
}
}
S = SS;
@ -650,7 +650,7 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
{
myDone = Standard_False;
//------------------------------------------
// Constuction de myShape sans les bouchons.
// Construction of myShape without caps.
//------------------------------------------
RemoveCorks (myShape,myFaces);
@ -671,10 +671,10 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
Standard_Real TolAngle = 4*ASin(myTol/Abs(myOffset*0.5));
myAnalyse.Perform(myShape,TolAngle);
//---------------------------------------------------
// Construction des Offset a partir de la preanalyse.
// Construction of Offset from preanalysis.
//---------------------------------------------------
//----------------------------
// MaJ de la SD Face - Offset
// MaJ of SD Face - Offset
//----------------------------
UpdateFaceOffset();
@ -683,7 +683,7 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
else if (myJoin == GeomAbs_Intersection)
BuildOffsetByInter();
//-----------------
// Auto debouclage.
// Auto unwinding.
//-----------------
// if (mySelfInter) SelfInter(Modif);
//-----------------
@ -699,12 +699,12 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
if (!Modif.IsEmpty()) Intersection2D (Modif,NewEdges);
//-------------------------------------------------------
// Debouclage 2D et reconstruction des faces modifiees
// Unwinding 2D and reconstruction of modified faces
//----------------------------------------------------
MakeLoops (Modif);
//-----------------------------------------------------
// Reconstuction des faces non modifie mais qui partage
// des edges recontruits
// Reconstruction of non modified faces sharing
// reconstructed edges
//------------------------------------------------------
if (!Modif.IsEmpty()) MakeFaces (Modif);
@ -712,24 +712,24 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
MakeMissingWalls();
//-------------------------
// Construction des shells.
// Construction of shells.
//-------------------------
MakeShells ();
//--------------
// Debouclage3d.
// Unwinding 3D.
//--------------
SelectShells ();
//----------------------------------
// Codage ges regularites.
// Coding of regularities.
//----------------------------------
EncodeRegularity();
//----------------------
// Creation des solides.
// Creation of solids.
//----------------------
MakeSolid ();
//-----------------------------
// MAJ Tolerance edge et Vertex
// MAJ Tolerance edge and Vertex
// ----------------------------
if (!myOffsetShape.IsNull()) {
UpdateTolerance (myOffsetShape,myFaces);
@ -751,13 +751,13 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
void BRepOffset_MakeOffset::MakeThickSolid()
{
//--------------------------------------------------------------
// Construction shell parallele au shell (initial sans bouchon).
// Construction of shell parallel to shell (initial without cap).
//--------------------------------------------------------------
MakeOffsetShape ();
//--------------------------------------------------------------------
// Construction d un solide avec le shell initial le shell parallele
// limite par les bouchons.
// Construction of a solid with the initial shell, parallel shell
// limited by caps.
//--------------------------------------------------------------------
if (!myFaces.IsEmpty()) {
TopoDS_Solid Res;
@ -790,8 +790,8 @@ void BRepOffset_MakeOffset::MakeThickSolid()
Res.Closed(Standard_True);
myOffsetShape = Res;
// Test de Validite du resultat le Solide epais doit avoir
// plus de face que le solide initial.
// Test of Validity of the result of thick Solid
// more face than the initial solid.
Standard_Integer NbOF = 0;
for (exp.Init(myOffsetShape,TopAbs_FACE);exp.More(); exp.Next()) {
@ -840,8 +840,8 @@ const TopoDS_Shape& BRepOffset_MakeOffset::Shape() const
//=======================================================================
//function : TrimEdge
//purpose : Trim l edge au plus large par ses descendants dans AsDes2d.
// Range dans AsDes les deux vertex qui ont trimme l edge.
//purpose : Trim the edge of the largest of descendants in AsDes2d.
// Order in AsDes two vertices that have trimmed the edge.
//=======================================================================
static void TrimEdge (TopoDS_Edge& NE,
@ -912,7 +912,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
{
#ifdef DEB
if ( ChronBuild) {
cout << " CONSTRUCTION DES OFFSETS :" << endl;
cout << " CONSTRUCTION OF OFFSETS :" << endl;
Clock.Reset();
Clock.Start();
}
@ -922,7 +922,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
TopTools_MapOfShape Done;
Standard_Boolean OffsetOutside = (myOffset > 0.)? Standard_True : Standard_False;
//--------------------------------------------------------
// Construction des faces paralleles a des faces initiales
// Construction of faces parallel to initial faces
//--------------------------------------------------------
TopExp_Explorer Exp;
TopTools_ListOfShape LF;
@ -980,20 +980,20 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
Handle(BRepAlgo_AsDes) AsDes = new BRepAlgo_AsDes();
//-------------------------------------------------------------------
// Extension des faces et calcul des nouvelles edges d intersection.
// Extension of faces and calculation of new edges of intersection.
//-------------------------------------------------------------------
Standard_Boolean ExtentContext = 0;
if (myOffset > 0) ExtentContext = 1;
BRepOffset_Inter3d Inter3 (AsDes,Side,myTol);
// Intersection entre faces paralleles
// Intersection between parallel faces
Inter3.ConnexIntByInt(myShape,MapSF,myAnalyse,MES,Build,Failed );
// Intersection avec les bouchons.
// Intersection with caps.
Inter3.ContextIntByInt(myFaces,ExtentContext,MapSF,myAnalyse,MES,Build,Failed );
//---------------------------------------------------------------------------------
// Extension des edges voisines des nouvelles edges.et intersection entre les voisins.
// Extension of neighbor edges of new edges and intersection between neighbors.
//--------------------------------------------------------------------------------
Handle(BRepAlgo_AsDes) AsDes2d = new BRepAlgo_AsDes();
for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next()) {
@ -1004,7 +1004,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
// Modified by skv - Mon Jan 12 11:50:03 2004 OCC4455 End
}
//-----------------------------------------------------------
// Restriction large des nouvelles edges et mise a jour AsDes.
// Great restriction of new edges and update of AsDes.
//------------------------------------------ ----------------
TopTools_MapOfShape NewEdges;
TopExp_Explorer Exp2,ExpC;
@ -1030,9 +1030,9 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
else {
//------------------------------------------------------------
// Les Intersections sont en plusieurs edges.
// Les morceaux sans intersections avec les voisins
// sont supprimes de AsDes.
// The Intersections are on several edges.
// The pieces without intersections with neighbors
// are removed from AsDes.
//------------------------------------------------------------
for (ExpC.Init(NE,TopAbs_EDGE); ExpC.More(); ExpC.Next()) {
if (NewEdges.Add(ExpC.Current())) {
@ -1065,7 +1065,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
//---------------------------------
// Intersection2d sur les //
// Intersection 2D on //
//---------------------------------
TopTools_ListOfShape LFE;
BRepAlgo_Image IMOE;
@ -1085,7 +1085,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
BRepOffset_Inter2d::Compute(AsDes,NEF,NewEdges,myTol);
}
//----------------------------------------------
// Intersections 2d sur les bouchons.
// Intersections 2d on caps.
//----------------------------------------------
TopTools_MapIteratorOfMapOfShape itCork(myFaces);
for (; itCork.More(); itCork.Next()) {
@ -1094,7 +1094,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
//-------------------------------
// Debouclage des Faces etendues.
// Unwinding of extended Faces.
//-------------------------------
myMakeLoops.Build(LFE ,AsDes,IMOE);
@ -1102,7 +1102,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
TopTools_MapOfShape COES;
#endif
//---------------------------
// MAJ SD. pour les faces //
// MAJ SD. for faces //
//---------------------------
for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next()) {
const TopoDS_Shape& FI = Exp.Current();
@ -1288,7 +1288,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
// Modified by skv - Tue Mar 15 16:20:43 2005
//---------------------------
// MAJ SD. pour les bouchons
// MAJ SD. for caps
//---------------------------
TopTools_MapOfShape View;
for (itCork.Initialize(myFaces); itCork.More(); itCork.Next()) {
@ -1349,7 +1349,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
{
#ifdef DEB
if ( ChronBuild) {
cout << " CONSTRUCTION DES OFFSETS :" << endl;
cout << " CONSTRUCTION OF OFFSETS :" << endl;
Clock.Reset();
Clock.Start();
}
@ -1359,7 +1359,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
TopTools_MapOfShape Done;
Standard_Boolean OffsetOutside = (myOffset > 0.)? Standard_True : Standard_False;
//--------------------------------------------------------
// Construction des faces paralleles a des faces initiales
// Construction of faces parallel to initial faces
//--------------------------------------------------------
TopExp_Explorer Exp;
TopTools_ListOfShape LF;
@ -1406,7 +1406,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
MapSF.Bind(F,OF);
}
//--------------------------------------------------------
// Construction des tuyaux sur arete.
// Construction of tubes on edge.
//--------------------------------------------------------
BRepOffset_Type OT = BRepOffset_Convex;
if (myOffset < 0.) OT = BRepOffset_Concave;
@ -1463,7 +1463,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
}
else {
// ----------------------
// bord libre.
// free border.
// ----------------------
TopoDS_Shape aLocalShape = MapSF(Anc.First()).Generated(E);
TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape);
@ -1475,7 +1475,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
}
//--------------------------------------------------------
// Construction des shperes sur vertex.
// Construction of spheres on vertex.
//--------------------------------------------------------
Done.Clear();
TopTools_ListIteratorOfListOfShape it;
@ -1490,7 +1490,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
if (LE.Extent() >= 3 && LE.Extent() == LA.Extent()) {
TopTools_ListOfShape LOE;
//--------------------------------------------------------
// Recuperation des edges connexes sur les tuyaux.
// Return connected edges on tubes.
//--------------------------------------------------------
for (it.Initialize(LE) ; it.More(); it.Next()) {
LOE.Append(MapSF(it.Value()).Generated(V).Reversed());
@ -1508,7 +1508,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
MapSF.Bind(V,OF);
}
//--------------------------------------------------------------
// Traitemnet particulier si V est sur au moins un bord libre.
// Particular processing if V is at least a free border.
//-------------------------------------------------------------
TopTools_ListOfShape LBF;
myAnalyse.Edges(V,BRepOffset_FreeBoundary,LBF);
@ -1529,8 +1529,8 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
}
//------------------------------------------------------------
// Extension des faces paralleles jusq au contexte.
// Les faces etendues sont rangees en SD et Supprime de MapSF.
// Extension of parallel faces to the context.
// Extended faces are ordered in DS and removed from MapSF.
//------------------------------------------------------------
if (!myFaces.IsEmpty()) ToContext (MapSF);
@ -1549,8 +1549,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
if (SF.Status() == BRepOffset_Reversed ||
SF.Status() == BRepOffset_Degenerated ) {
//------------------------------------------------
// Les faces degenerees ou retournees ne sont pas
// stockes.
// Degenerated or returned faces are not stored.
//------------------------------------------------
continue;
}
@ -1558,15 +1557,15 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
const TopoDS_Face& OF = It.Value().Face();
myInitOffsetFace.Bind (SI,OF);
myInitOffsetFace.SetRoot (SI); // Initial<-> Offset
myImageOffset.SetRoot (OF); // FaceOffset racine des images
myImageOffset.SetRoot (OF); // FaceOffset root of images
if (SI.ShapeType() == TopAbs_FACE) {
for (Exp.Init(SI.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
Exp.More(); Exp.Next()) {
//--------------------------------------------------------------------
// A chaque face // on associe les edges qui la restreignent
// Les edges qui ne genere pas de tuyaux ou qui ne sont pas tangentes
// a deux faces sont supprimees.
// To each face are associatedthe edges that restrict that
// The edges that do not generate tubes or are not tangent
// to two faces are removed.
//--------------------------------------------------------------------
const TopoDS_Edge& E = TopoDS::Edge(Exp.Current());
const BRepOffset_ListOfInterval& L = myAnalyse.Type(E);
@ -1643,15 +1642,15 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
if (!myAnalyse.HasAncestor(E)) {
//----------------------------------------------------------------
// Les edges des faces de contexte qui ne sont pas dans le shape
// initiales peuvent apparaitre dans le resultat.
// The edges of context faces that are not in the initial shape
// can appear in the result.
//----------------------------------------------------------------
//myAsDes->Add(CF,E);
}
}
}
//--------------------------------------------------------
// Determination des edges et des faces a reconstruire par
//-------------------------------------------------------
// Determine the edges and faces reconstructed by
// intersection.
//---------------------------------------------------------
for ( it.Initialize(myFaces); it.More(); it.Next()) {
@ -1683,7 +1682,7 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
}
}
//---------------------------
// Reconstruction des faces.
// Reconstruction of faces.
//---------------------------
TopoDS_Face F,NF;
BRepOffset_Type RT = BRepOffset_Concave;
@ -1731,7 +1730,7 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
}
else {
//------------------
// Tuyau
// Tube
//---------------------
for (exp.Init(NF.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
exp.More(); exp.Next()) {
@ -1741,9 +1740,9 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
MapSF.UnBind(S);
}
//----------------
// MAJ bords libre
//----------------
//------------------
// MAJ free borders
//------------------
TopTools_DataMapIteratorOfDataMapOfShapeShape itc;
for (itc.Initialize(Created); itc.More(); itc.Next()) {
OE = itc.Key();
@ -1838,7 +1837,7 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
//Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &anEdge.TShape());
if (BRep_Tool::Degenerated(anEdge))
{
//Check wether anEdge is a really degenerated edge or not
//Check if anEdge is a really degenerated edge or not
BRepAdaptor_Curve BACurve(anEdge, aFace);
gp_Pnt Pfirst, Plast, Pmid;
Pfirst = BACurve.Value(BACurve.FirstParameter());
@ -2550,20 +2549,20 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter)
Clock.Start();
}
#endif
TopTools_ListOfShape OffsetFaces; // liste des faces // crees.
TopTools_ListOfShape OffsetFaces; // list of faces // created.
MakeList (OffsetFaces,myInitOffsetFace,myFaces);
if (!myFaces.IsEmpty()) {
Standard_Boolean InSide = (myOffset < 0.); // PROVISOIRE
// il faut calculer Inside en tenant compte de la concavite ou convexite des arretes
// entre le bouchon et la piece.
Standard_Boolean InSide = (myOffset < 0.); // Temporary
// it is necessary to calculate Inside taking account of the concavity or convexity of edges
// between the cap and the part.
if (myJoin == GeomAbs_Arc)
Inter.ContextIntByArc (myFaces,InSide,myAnalyse,myInitOffsetFace,myInitOffsetEdge);
}
if (myInter) {
//-------------
//Complet.
//Complete.
//-------------
Inter.CompletInt (OffsetFaces,myInitOffsetFace);
TopTools_MapOfShape& NewEdges = Inter.NewEdges();
@ -2573,7 +2572,7 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter)
}
else {
//--------------------------------
// Seulememt entre face voisines.
// Only between neighbor faces.
//--------------------------------
Inter.ConnexIntByArc(OffsetFaces,myShape,myAnalyse,myInitOffsetFace);
}
@ -2597,13 +2596,13 @@ void BRepOffset_MakeOffset::Intersection2D(const TopTools_MapOfShape& Modif,
Clock.Start();
}
#endif
//-----------------------------------------------------------
// calcul des intersections2d sur les faces touchees par les
//--------------------------------------------------------
// calculate intersections2d on faces concerned by
// intersection3d
//---------------------------------------------------------
//--------------------------------------------------------
TopTools_MapIteratorOfMapOfShape it(Modif);
//-----------------------------------------------
// Intersection des edges 2 a 2.
// Intersection of edges 2 by 2.
//-----------------------------------------------
for ( it.Initialize(Modif); it.More(); it.Next()) {
const TopoDS_Face& F = TopoDS::Face(it.Key());
@ -2636,7 +2635,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif)
TopTools_MapIteratorOfMapOfShape it(Modif);
TopTools_ListOfShape LF,LC;
//-----------------------------------------
// debouclage des faces // modifiees.
// unwinding of faces // modified.
//-----------------------------------------
for (; it.More(); it.Next()) {
if (!myFaces.Contains(it.Key())) LF.Append(it.Key());
@ -2644,7 +2643,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif)
myMakeLoops.Build(LF,myAsDes,myImageOffset);
//-----------------------------------------
// debouclage des bouchons.
// unwinding of caps.
//-----------------------------------------
for (it.Initialize(myFaces); it.More(); it.Next()) {
LC.Append(it.Key());
@ -2660,15 +2659,15 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif)
//=======================================================================
//function : MakeFaces
//purpose : Reconstruction des faces topologiquement inchangees qui
// partage des edges qui ont ete reconstruites.
//purpose : Reconstruction of topologically unchanged faces that
// share edges that were reconstructed.
//=======================================================================
void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif)
{
#ifdef DEb
if (ChronBuild) {
cout << " RECONSTRUCTION DES FACES:" << endl;
cout << " RECONSTRUCTION OF FACES:" << endl;
Clock.Reset();
Clock.Start();
}
@ -2677,7 +2676,7 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif)
const TopTools_ListOfShape& Roots = myInitOffsetFace.Roots();
TopTools_ListOfShape LOF;
//----------------------------------
// Boucle sur toutes les faces //.
// Loop on all faces //.
//----------------------------------
for (itr.Initialize(Roots); itr.More(); itr.Next()) {
TopoDS_Face F = TopoDS::Face(myInitOffsetFace.Image(itr.Value()).First());
@ -2692,7 +2691,7 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif)
//=======================================================================
//function : UpdateInitOffset
//purpose : mis a jour et purge de myInitOffset
//purpose : Update and cleaning of myInitOffset
//=======================================================================
static void UpdateInitOffset (BRepAlgo_Image& myInitOffset,
@ -3059,7 +3058,7 @@ void BRepOffset_MakeOffset::MakeShells ()
{
#ifdef DEB
if (ChronBuild) {
cout << " RECONSTRUCTION DES SHELLS:" << endl;
cout << " RECONSTRUCTION OF SHELLS:" << endl;
Clock.Reset();
Clock.Start();
}
@ -3143,9 +3142,9 @@ void BRepOffset_MakeOffset::SelectShells ()
TopTools_MapOfShape FreeEdges;
TopExp_Explorer exp(myShape,TopAbs_EDGE);
//-------------------------------------------------------------
// FreeEdges ensemble des edges qui peuvent etre bord libre dans
// le shell parallele
// 1 - les bord libres de myShape .
// FreeEdges all edges that can have free border in the
// parallel shell
// 1 - free borders of myShape .
//-------------------------------------------------------------
for ( ; exp.More(); exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
@ -3156,8 +3155,8 @@ void BRepOffset_MakeOffset::SelectShells ()
}
}
}
// myShape a des bords libres et il n y a pas de bouchons.
// pas de debouclage3d.
// myShape has free borders and there are no caps
// no unwinding 3d.
if (!FreeEdges.IsEmpty() && myFaces.IsEmpty()) return;
myOffsetShape = BRepOffset_Tool::Deboucle3D(myOffsetShape,FreeEdges);
@ -3218,14 +3217,14 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
{
#ifdef DEB
if (ChronBuild) {
cout << " CODAGE DES REGULARITES:" << endl;
cout << " CODING OF REGULARITIES:" << endl;
Clock.Reset();
Clock.Start();
}
#endif
if (myOffsetShape.IsNull()) return;
// recherche des edges G1 dans le resultat
// find edges G1 in the result
TopExp_Explorer exp(myOffsetShape,TopAbs_EDGE);
BRep_Builder B;
@ -3246,7 +3245,7 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
if (LofOF.Extent() != 2) {
#ifdef DEB
if ( Standard_False)
cout << " Edge partage par " << LofOF.Extent() << " Faces" << endl;
cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl;
#endif
continue;
}
@ -3265,12 +3264,12 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
if (F1.IsSame(F2)) {
if (BRep_Tool::IsClosed(OE,F1)) {
// Debug provisoire pour le Bench.
// Voir avec YFR.
// En mode intersection, les aretes ne sont pas codees dans myInitOffsetEdge
// on gere donc au cas par cas.
// Remarque DUB; Pour les parties cachees, il FAUT coder CN
// les Surf Analytiques.
// Temporary Debug for the Bench.
// Check with YFR.
// In mode intersection, the edges are not coded in myInitOffsetEdge
// so, manage case by case
// Note DUB; for Hidden parts, it is NECESSARY to code CN
// Analytic Surfaces.
if (myJoin == GeomAbs_Intersection) {
BRepAdaptor_Surface BS(F1,Standard_False);
GeomAbs_SurfaceType SType = BS.GetType();
@ -3281,7 +3280,7 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
B.Continuity(OE,F1,F1,GeomAbs_CN);
}
else {
// Voir YFR : MaJ de myInitOffsetFace
// See YFR : MaJ of myInitOffsetFace
}
}
else if (myInitOffsetEdge.IsImage(ROE)) {
@ -3302,16 +3301,15 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
}
// on code les regularites G1 entre :
// - sphere et tuyau : une root est un vertex, l'autre un edge
// et le vertex est inclus dans l'edge
// - face et tuyau : une root est une face, l'autre un edge
// et l'edge est inclus dans la face
// - face et face : si les 2 faces root sont tangentes dans
// le shape initial, elles le seront dans
// le shape offset
// - tuyau et tuyau : si les 2 edges generant les tuyaux sont
// tangents, les 2 tuyaux le seront.
// code regularities G1 between :
// - sphere and tube : one root is a vertex, the other is an edge
// and the vertex is included in the edge
// - face and tube : one root is a face, the other an edge
// and the edge is included in the face
// - face and face : if two root faces are tangent in
// the initial shape, they will be tangent in the offset shape
// - tube and tube : if 2 edges generating tubes are
// tangents, the 2 will be tangent either.
if ( Type1 == TopAbs_EDGE && Type2 == TopAbs_VERTEX) {
TopoDS_Vertex V1,V2;
TopExp::Vertices(TopoDS::Edge(Root1), V1, V2);
@ -3345,8 +3343,8 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
}
}
else if ( Type1 == TopAbs_FACE && Type2 == TopAbs_FACE) {
// si les 2 faces root sont tangentes dans le shape initial,
// elles le seront dans le shape offset
// if two root faces are tangent in
// the initial shape, they will be tangent in the offset shape
TopTools_ListOfShape LE,LV;
BRepOffset_Tool::HasCommonShapes(TopoDS::Face(Root1),
TopoDS::Face(Root2),
@ -3408,7 +3406,7 @@ static void UpdateTolerance (TopoDS_Shape& S,
TopTools_MapOfShape View;
TopoDS_Vertex V[2];
// Les edges des bouchons ne sont pas modifiees.
// The edges of caps are not modified.
TopTools_MapIteratorOfMapOfShape it;
for (it.Initialize(Faces); it.More(); it.Next()) {
const TopoDS_Shape& F = it.Key();
@ -3435,7 +3433,7 @@ static void UpdateTolerance (TopoDS_Shape& S,
TV->Tolerance(0.);
Handle(BRepCheck_Vertex) VertexCorrector = new BRepCheck_Vertex(V[i]);
B.UpdateVertex (V[i],VertexCorrector->Tolerance());
// on profite de l occasion pour purger le vertex.
// use the occasion to clean the vertices.
(TV->ChangePoints()).Clear();
}
B.UpdateVertex(V[i],Tol);

View File

@ -83,8 +83,7 @@ static void UpdateEdge(const TopoDS_Edge& E,
const TopLoc_Location& L,
const Standard_Real Tol)
{
// Detrime les courbes pour eviter des copies dans
//les extensions.
// Cut curves to avoid copies in the extensions.
BRep_Builder B;
Handle(Geom_TrimmedCurve) BC = Handle(Geom_TrimmedCurve)::DownCast(C);
if (!BC.IsNull()) {
@ -105,8 +104,7 @@ static void UpdateEdge(const TopoDS_Edge& E,
const TopoDS_Face& F,
const Standard_Real Tol)
{
// Detrime les courbes pour eviter des copies dans
//les extensions.
// Cut curves to avoid copies in the extensions.
BRep_Builder B;
Handle(Geom2d_TrimmedCurve) BC = Handle(Geom2d_TrimmedCurve)::DownCast(C);
if (!BC.IsNull()) {
@ -128,8 +126,7 @@ static void UpdateEdge (const TopoDS_Edge& E,
const TopoDS_Face& F,
const Standard_Real Tol)
{
// Detrime les courbes pour eviter des copies dans
//les extensions.
// Cut curves to avoid copies in the extensions.
BRep_Builder B;
Handle(Geom2d_Curve) NC1,NC2;
Handle(Geom2d_TrimmedCurve) BC1 = Handle(Geom2d_TrimmedCurve)::DownCast(C1);
@ -142,7 +139,7 @@ static void UpdateEdge (const TopoDS_Edge& E,
//=======================================================================
//function : Range3d
//purpose : Set the range only on the 3d curve
// en attendant que le BRep_Builder le fasse !!
// waitint that BRep_Builder does it !!
//=======================================================================
static void Range3d (const TopoDS_Edge& E,
@ -193,14 +190,14 @@ static void ComputeCurve3d(TopoDS_Edge Edge,
Standard_Boolean IsComputed = Standard_False;
// Seach only isos on analytiques surfaces.
// Search only isos on analytic surfaces.
Geom2dAdaptor_Curve C(Curve);
GeomAdaptor_Surface S(Surf);
GeomAbs_CurveType CTy = C.GetType();
GeomAbs_SurfaceType STy = S.GetType();
BRep_Builder TheBuilder;
if ( STy != GeomAbs_Plane) { // if plane buildcurve3d gere KPart
if ( STy != GeomAbs_Plane) { // if plane buildcurve3d manage KPart
if ( CTy == GeomAbs_Line) {
gp_Dir2d D = C.Line().Direction();
if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V.
@ -281,10 +278,10 @@ static void ComputeCurve3d(TopoDS_Edge Edge,
gp_Sphere Sph = S.Sphere();
gp_Pnt2d P = C.Line().Location();
gp_Ax3 Axis = Sph.Position();
// calculde l'iso 0.
// calculate iso 0.
gp_Circ Ci = ElSLib::SphereUIso(Axis, Sph.Radius(),0.);
// mise a sameparameter (rotation du cercle - decalage du Y)
// set to sameparameter (rotation of circle - offset of Y)
gp_Dir DRev = Axis.XDirection().Crossed(Axis. Direction());
gp_Ax1 AxeRev(Axis.Location(),DRev);
Ci.Rotate(AxeRev, P.Y());

View File

@ -143,7 +143,7 @@ static void BuildDomains(TopoDS_Face& myFace,
// Modified by Sergey KHROMOV - Thu Apr 26 16:04:44 2001 End
FR.Init(myFace,Standard_True);
//====================================================
// Construction des faces limites par les wires fermes.
// Construction of faces limited by closed wires.
//====================================================
TopTools_ListIteratorOfListOfShape itl(WorkWires);
for (; itl.More(); itl.Next()) {
@ -170,7 +170,7 @@ static void BuildDomains(TopoDS_Face& myFace,
}
//===========================================
// Pas de wire ferme => un seul domaine
// No closed wire => only one domain
//===========================================
if (Faces.IsEmpty()) {
TopoDS_Shape aLocalShape = myFace.EmptyCopied();
@ -186,7 +186,7 @@ static void BuildDomains(TopoDS_Face& myFace,
}
//====================================================
// Classification des wires ouverts.
// Classification of open wires.
//====================================================
// for (TopTools_ListIteratorOfListOfShape itF(Faces); itF.More(); itF.Next()) {
TopTools_ListIteratorOfListOfShape itF;
@ -201,7 +201,7 @@ static void BuildDomains(TopoDS_Face& myFace,
while (itW.More()) {
TopoDS_Wire& W = TopoDS::Wire(itW.Value());
//=======================================================
// Choix d un point sur le wire. + projection sur la face.
// Choice of a point on the wire. + projection on the face.
//=======================================================
TopExp_Explorer exp(W,TopAbs_VERTEX);
TopoDS_Vertex V = TopoDS::Vertex(exp.Current());
@ -220,7 +220,7 @@ static void BuildDomains(TopoDS_Face& myFace,
}
}
if ( Found && (CL.Perform(PV) == TopAbs_IN)) {
// On a trouve la face qui contient le wire on l enleve de la liste
// The face that contains a wire is found and it is removed from the list
B.Add(F,W);
LOW.Remove(itW);
}
@ -230,7 +230,7 @@ static void BuildDomains(TopoDS_Face& myFace,
}
}
//========================================
// Creation des algos sur chaque domaine.
// Creation of algorithms on each domain.
//========================================
for (itF.Initialize(Faces); itF.More(); itF.Next()) {
BRepFill_OffsetWire Algo(TopoDS::Face(itF.Value()), myJoin);

View File

@ -79,8 +79,8 @@ const TopTools_ListOfShape& BRepOffsetAPI_MakeOffsetShape::Generated (const Topo
myOffsetShape.OffsetFacesFromShapes ().LastImage (S, myGenerated);
if (!myOffsetShape.ClosingFaces().IsEmpty()) {
// Reverse les Shape generes dans le cas des solides minces.
// Utile seulement pour les faces mais sans incidence sur les autres.
// Reverse generated shapes in case of small solids.
// Useful only for faces without influence on others.
TopTools_ListIteratorOfListOfShape it(myGenerated);
for (; it.More(); it.Next())
it.Value().Reverse();

View File

@ -110,7 +110,7 @@
//=======================================================================
//function : PerformPlan
//purpose : Construit s'il existe un plan de remplissage
//purpose : Construct a plane of filling if exists
//=======================================================================
static Standard_Boolean PerformPlan(const TopoDS_Wire& W,
@ -196,7 +196,7 @@ static TopoDS_Solid MakeSolid(TopoDS_Shell& shell, const TopoDS_Wire& wire1,
if (!B)
{
// Il faut boucher les extremites
// It is necessary to close the extremities
B = PerformPlan(wire1, presPln, face1);
if (B) {
B = PerformPlan(wire2, presPln, face2);
@ -363,13 +363,13 @@ void BRepOffsetAPI_ThruSections::Build()
// compute origin and orientation on wires to avoid twisted results
// and update wires to have same number of edges
// on utilise BRepFill_CompatibleWires
// use BRepFill_CompatibleWires
TopTools_SequenceOfShape WorkingSections;
WorkingSections.Clear();
TopTools_DataMapOfShapeListOfShape WorkingMap;
WorkingMap.Clear();
// Calcul des sections de travail
// Calculate the working sections
BRepFill_CompatibleWires Georges(myWires);
Georges.Perform();
if (Georges.IsDone()) {
@ -379,7 +379,7 @@ void BRepOffsetAPI_ThruSections::Build()
myWires = WorkingSections;
}
// Calcul de la shape resultat
// Calculate the resulting shape
if (myWires.Length() == 2 || myIsRuled) {
// create a ruled shell
CreateRuled();
@ -413,7 +413,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled()
if (myIsSolid) {
// on regarde si le premier wire est identique au dernier
// check if the first wire is the same as the last
Standard_Boolean vClosed = (myWires(1).IsSame(myWires(nbSects))) ;
if (vClosed) {
@ -423,7 +423,7 @@ void BRepOffsetAPI_ThruSections::CreateRuled()
B.MakeSolid(solid);
B.Add(solid, shell);
// verify the orientation the solid
// verify the orientation of the solid
BRepClass3d_SolidClassifier clas3d(solid);
clas3d.PerformInfinitePoint(Precision::Confusion());
if (clas3d.State() == TopAbs_IN) {
@ -536,19 +536,19 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
BRepTools_WireExplorer anExp;
Standard_Boolean w1Point = Standard_True;
// on regarde si le premier wire est ponctuel
// check if the first wire is punctual
for(anExp.Init(TopoDS::Wire(myWires(1))); anExp.More(); anExp.Next()) {
w1Point = w1Point && (BRep_Tool::Degenerated(anExp.Current()));
}
Standard_Boolean w2Point = Standard_True;
// on regarde si le dernier wire est ponctuel
// check if the last wire is punctual
for(anExp.Init(TopoDS::Wire(myWires(nbSects))); anExp.More(); anExp.Next()) {
w2Point = w2Point && (BRep_Tool::Degenerated(anExp.Current()));
}
Standard_Boolean vClosed = Standard_False;
// on regarde si le premier wire est identique au dernier
// check if the first wire is the same as last
if (myWires(1).IsSame(myWires(myWires.Length()))) vClosed = Standard_True;
// find the dimension
@ -572,13 +572,13 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
for (i=1; i<=nbSects; i++) {
const TopoDS_Wire& wire = TopoDS::Wire(myWires(i));
if (!wire.Closed()) {
// on regarde quand meme si les vertex sont les memes.
// check if the vertices are the same
TopoDS_Vertex V1, V2;
TopExp::Vertices(wire,V1,V2);
if ( !V1.IsSame(V2)) uClosed = Standard_False;
}
if ( (i==1 && w1Point) || (i==nbSects && w2Point) ) {
// si le wire est ponctuel
// if the wire is punctual
anExp.Init(TopoDS::Wire(wire));
for(j=1; j<=nbEdges; j++) {
nb++;
@ -586,7 +586,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
}
}
else {
// sinon
// otherwise
for(anExp.Init(TopoDS::Wire(wire)); anExp.More(); anExp.Next()) {
nb++;
shapes(nb) = anExp.Current();
@ -616,8 +616,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
Standard_Integer nbPnts = 21;
TColgp_Array2OfPnt points(1, nbPnts, 1, nbSects);
// on concatene chaque section pour obtenir une surface totale que
// l'on va segmenter
// concatenate each section to get a total surface that will be segmented
Handle(Geom_BSplineSurface) TS;
TS = TotalSurf(shapes,nbSects,nbEdges,w1Point,w2Point,vClosed);
@ -628,7 +627,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
TopoDS_Shape firstEdge;
for (i=1; i<=nbEdges; i++) {
// segmentation de TS
// segmentation of TS
Handle(Geom_BSplineSurface) surface;
surface = Handle(Geom_BSplineSurface)::DownCast(TS->Copy());
Standard_Real Ui1,Ui2,V0,V1;
@ -638,7 +637,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
V1 = surface->VKnot(surface->LastVKnotIndex());
surface->Segment(Ui1,Ui2,V0,V1);
// recuperation des vertices
// return vertices
edge = TopoDS::Edge(shapes(i));
TopExp::Vertices(edge,v1f,v1l);
if (edge.Orientation() == TopAbs_REVERSED)
@ -662,7 +661,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
// --- edge 1
if ( w1Point ) {
// copie de l'edge degeneree
// copy the degenerated edge
TopoDS_Shape aLocalShape = shapes(1).EmptyCopied();
edge1 = TopoDS::Edge(aLocalShape);
// edge1 = TopoDS::Edge(shapes(1).EmptyCopied());
@ -676,8 +675,8 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
v1l.Orientation(TopAbs_REVERSED);
B.Add(edge1, v1l);
B.Range(edge1, f1, l1);
// traitement des sections bouclantes
// on stocke les edges de la 1ere section
// processing of looping sections
// store edges of the 1st section
if (vClosed)
vcouture(i) = edge1;
@ -687,7 +686,7 @@ void BRepOffsetAPI_ThruSections::CreateSmoothed()
edge2 = TopoDS::Edge(vcouture(i));
else {
if ( w2Point ) {
// copie de l'edge degeneree
// copy of the degenerated edge
TopoDS_Shape aLocalShape = shapes(nbSects*nbEdges).EmptyCopied();
edge2 = TopoDS::Edge(aLocalShape);
// edge2 = TopoDS::Edge(shapes(nbSects*nbEdges).EmptyCopied());
@ -886,7 +885,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
for (j=jdeb; j<=jfin; j++) {
// cas des sections bouclantes
// case of looping sections
if (j==jfin && vClosed) {
section.AddCurve(BS1);
}
@ -895,7 +894,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
// read the first edge to initialise CompBS;
edge = TopoDS::Edge(shapes((j-1)*NbEdges+1));
if (BRep_Tool::Degenerated(edge)) {
// edge degeneree : construction d'une courbe ponctuelle
// degenerated edge : construction of a punctual curve
TopExp::Vertices(edge,vl,vf);
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = BRep_Tool::Pnt(vf);
@ -906,7 +905,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
curv->LastParameter());
}
else {
// recuperation de la courbe sur l'edge
// recover the curve on the edge
Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last);
curvTrim = new Geom_TrimmedCurve(curv, first, last);
curvTrim->Transform(loc.Transformation());
@ -915,7 +914,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
curvTrim->Reverse();
}
// transformation en BSpline reparametree sur [i-1,i]
// transformation into BSpline reparameterized on [i-1,i]
curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim);
if (curvBS.IsNull()) {
Handle(Geom_Curve) theCurve = curvTrim->BasisCurve();
@ -933,14 +932,14 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
BSplCLib::Reparametrize(0.,1.,BSK);
curvBS->SetKnots(BSK);
// initialisation
// initialization
GeomConvert_CompCurveToBSplineCurve CompBS(curvBS);
for (i=2; i<=NbEdges; i++) {
// read the edge
edge = TopoDS::Edge(shapes((j-1)*NbEdges+i));
if (BRep_Tool::Degenerated(edge)) {
// edge degeneree : construction d'une courbe ponctuelle
// degenerated edge : construction of a punctual curve
TopExp::Vertices(edge,vl,vf);
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = BRep_Tool::Pnt(vf);
@ -951,7 +950,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
curv->LastParameter());
}
else {
// recuperation de la courbe sur l'edge
// return the curve on the edge
Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last);
curvTrim = new Geom_TrimmedCurve(curv, first, last);
curvTrim->Transform(loc.Transformation());
@ -960,7 +959,7 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
curvTrim->Reverse();
}
// transformation en BSpline reparametree sur [i-1,i]
// transformation into BSpline reparameterized on [i-1,i]
curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim);
if (curvBS.IsNull()) {
Handle(Geom_Curve) theCurve = curvTrim->BasisCurve();
@ -986,11 +985,11 @@ Handle(Geom_BSplineSurface) BRepOffsetAPI_ThruSections::
1);
}
// recuperation de la section finale
// return the final section
BS = CompBS.BSplineCurve();
section.AddCurve(BS);
// cas des sections bouclantes
// case of looping sections
if (j==jdeb && vClosed) {
BS1 = BS;
}
@ -1088,7 +1087,7 @@ TopoDS_Shape BRepOffsetAPI_ThruSections::GeneratedFace(const TopoDS_Shape& edge)
//=======================================================================
//function : CriteriumWeight
//purpose : returns the Weights associed to the criterium used in
//purpose : returns the Weights associated to the criterium used in
// the optimization.
//=======================================================================
//

View File

@ -14,7 +14,7 @@
#include <Geom_Circle.hxx>
#include <Geom2d_Circle.hxx>
// parametres sur le meridien
// parameters on the meridian
#define PMIN (-0.5*PI)
#define PMAX (0.5*PI)

View File

@ -14,7 +14,7 @@
#include <gp_Ax2.hxx>
//-- lbr le 13 decembre 95
static gp_Ax2 ConeComputeAxes() {
static Standard_Integer firsttime=1;
static Standard_Integer modif=0;

View File

@ -12,7 +12,7 @@
#include <gp_Dir.hxx>
#include <gp_Ax2.hxx>
//-- lbr le 13 decembre 95
static gp_Ax2 CylinderComputeAxes() {
static Standard_Integer firsttime=1;
static Standard_Integer modif=0;

View File

@ -24,7 +24,7 @@
// 1) return true if extrema are found.
// 2) Set in:
// - Dist : The lower distance found.
// - anOppositePnt : The corresponding point laying on the face
// - anOppositePnt : The corresponding point lying on the face
// - U,V : The parameters of <anOppositePnt> on the face <aFace>
//=======================================================================
@ -102,7 +102,7 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Face& Face,
myBuilder.MakeShell(Shell);
myBuilder.Add(Shell,Face);
// Normale, produit scalaire et sens.
// Normal, scalair product and direction.
Standard_Real Prec = gp::Resolution();
// BRepLProp_SLProps Props(BRepAdaptor_Surface(Face),U,V,2,Prec);
BRepLProp_SLProps Props = BRepLProp_SLProps(BRepAdaptor_Surface(Face),U,V,2,Prec);
@ -110,10 +110,10 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Face& Face,
gp_Dir OppRef(RefPnt.XYZ()-MinPnt.XYZ());
Standard_Real Sca = Normale*OppRef;
// Construction du solide ouvert.
// Construction of the open solid.
myBuilder.MakeSolid(mySolid);
if (Sca > 0.) {
// Directions identiques: cas inverse.
// Same directions: inverted case.
Shell.Reverse();
}
@ -139,7 +139,7 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell,
Standard_Real MinDist = RealLast();
Standard_Real CurDist, U, V, MinU=0, MinV=0;
// Chercher le point de la peau le plus proche du point de reference.
// Find the point of the skin closest to the reference point.
Standard_Boolean YaExt = Standard_False;
TopoDS_Shell aShell = Shell;
@ -160,7 +160,7 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell,
}
if ( YaExt) {
// Normale, produit scalaire et sens.
// Normal, scalar product and direction.
BRep_Builder myBuilder;
Standard_Real Prec = gp::Resolution();
// BRepLProp_SLProps Props(BRepAdaptor_Surface(MinFace),MinU,MinV,2,Prec);
@ -169,10 +169,10 @@ BRepPrimAPI_MakeHalfSpace::BRepPrimAPI_MakeHalfSpace(const TopoDS_Shell& Shell,
gp_Dir OppRef(RefPnt.XYZ()-MinPnt.XYZ());
Standard_Real Sca = Normale*OppRef;
// Construction du solide ouvert.
// Construction of the open solid.
myBuilder.MakeSolid(mySolid);
if (Sca > 0.) {
// Directions identiques: cas inverse.
// Same directions: inverted case.
aShell.Reverse();
}
myBuilder.Add(mySolid,aShell);

View File

@ -13,7 +13,6 @@
#include <gp_Ax2.hxx>
//-- lbr le 13 decembre 95
static gp_Ax2 SphereComputeAxes() {
static Standard_Integer firsttime=1;
static Standard_Integer modif=0;

View File

@ -139,7 +139,7 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyVertex
(const TopoDS_Shape& aGenV,
const Sweep_NumShape& aDirV)
{
//appele uniquement en mode de construction avec copie.
//call only in construction mode with copy.
Standard_ConstructionError_Raise_if
(!myCopy,"BRepSweep_Translation::MakeEmptyVertex");
gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aGenV));
@ -176,8 +176,8 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyDirectingEdge
O.Translate(V.Dot(gp_Vec(O,P)) * V);
if (O.IsEqual(P,Precision::Confusion())) {
// make a degenerated edge
// temporairement on fout une courbe 3d nulle pour que les
// parametres soient enregistres.
// temporary make 3D curve null so that
// parameters should be registered.
// myBuilder.Builder().MakeEdge(E);
gp_Ax2 Axis(O,Dirz);
Handle(Geom_Circle) GC = new Geom_Circle(Axis,0.);
@ -211,8 +211,7 @@ TopoDS_Shape BRepSweep_Rotation::MakeEmptyGeneratingEdge
(const TopoDS_Shape& aGenE,
const Sweep_NumShape& aDirV)
{
//appele dans le cas de construction avec copie, ou exceptionnellement
//lorsque le meridien touche myaxe.
//call in case of construction with copy, or only when meridian touches myaxe.
Standard_Real First,Last;
TopLoc_Location Loc;
Handle(Geom_Curve) C = Handle(Geom_Curve)::DownCast
@ -243,8 +242,7 @@ void BRepSweep_Rotation::SetParameters
const TopoDS_Shape& aGenV,
const Sweep_NumShape&)
{
//Colle le parametre des vertex directement inclus dans les faces
//bouchons.
//Glue the parameter of vertices directly included in cap faces.
gp_Pnt2d pnt2d = BRep_Tool::Parameters(TopoDS::Vertex(aGenV),
TopoDS::Face(aGenF));
myBuilder.Builder().UpdateVertex
@ -402,8 +400,8 @@ void BRepSweep_Rotation::SetPCurve
const Sweep_NumShape&,
const TopAbs_Orientation orien)
{
//Met sur edges des faces bouchons des pcurves identiques a celles
//des edges de la face generatrice.
//Set on edges of cap faces the same pcurves as
//on edges of the generator face.
Standard_Real First,Last;
SetThePCurve(myBuilder.Builder(),
TopoDS::Edge(aNewEdge),

View File

@ -138,7 +138,7 @@ TopoDS_Shape BRepSweep_Translation::MakeEmptyGeneratingEdge
(const TopoDS_Shape& aGenE,
const Sweep_NumShape& aDirV)
{
//Appele uniquement dans le cas de construction avec copie.
//Call only in case of construction with copy.
Standard_ConstructionError_Raise_if
(!myCopy,"BRepSweep_Translation::MakeEmptyVertex");
TopLoc_Location L;
@ -166,8 +166,7 @@ void BRepSweep_Translation::SetParameters
const TopoDS_Shape& aGenV,
const Sweep_NumShape&)
{
//Colle le parametre des vertex directement inclus dans les faces
//bouchons.
//Glue the parameter of vertices directly included in cap faces.
gp_Pnt2d pnt2d = BRep_Tool::Parameters(TopoDS::Vertex(aGenV),
TopoDS::Face(aGenF));
myBuilder.Builder().UpdateVertex
@ -236,8 +235,7 @@ TopoDS_Shape BRepSweep_Translation::MakeEmptyFace
toler = BRep_Tool::Tolerance(TopoDS::Edge(aGenS));
gp_Trsf Tr = L.Transformation();
C = Handle(Geom_Curve)::DownCast(C->Copy());
//les surfaces extrudees sont inverses par rapport a la topologie, donc
//on reverse.
//extruded surfaces are inverted correspondingly to the topology, so reverse.
C->Transform(Tr);
gp_Dir D(myVec);
D.Reverse();
@ -289,8 +287,8 @@ void BRepSweep_Translation::SetPCurve
const Sweep_NumShape&,
const TopAbs_Orientation)
{
//Met sur edges des faces bouchons des pcurves identiques a celles
//des edges de la face generatrice.
//Set on edges of cap faces the same pcurves as
//edges of the generating face.
Standard_Real First,Last;
myBuilder.Builder().UpdateEdge
(TopoDS::Edge(aNewEdge),
@ -321,12 +319,11 @@ void BRepSweep_Translation::SetGeneratingPCurve
aNewOrientedEdge.Orientation(orien);
if (AS.GetType()==GeomAbs_Plane){
/* on ne fait rien JAG
/* nothing is done JAG
gp_Pln pln = AS.Plane();
gp_Ax3 ax3 = pln.Position();
// JYL : l'ecriture suivante est bugatoire sur une arete construite avec une
// courbe 3d trimmee. :
// JYL : the following produces bugs on an edge constructed from a trimmed 3D curve :
//
// Handle(Geom_Line)
// GL = Handle(Geom_Line)::DownCast(BRep_Tool::Curve(TopoDS::Edge(aGenE),

View File

@ -730,7 +730,7 @@ static Standard_Integer vecdc(Draw_Interpretor& di,Standard_Integer ,const char*
//==========================================================================
//function : wexplo
// exploration d un wire
// exploration of a wire
//==========================================================================
static Standard_Integer wexplo (Draw_Interpretor&,
Standard_Integer argc, const char** argv)
@ -823,7 +823,7 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands)
mkedgecurve,g);
theCommands.Add("fsameparameter",
"fsameparameter shapename [tol (default 1.e-7)], \nforce le sameparameter sur toutes les aretes du shape",
"fsameparameter shapename [tol (default 1.e-7)], \nforce sameparameter on all edges of the shape",
__FILE__,
sameparameter,g);

View File

@ -987,8 +987,8 @@ static Standard_Integer bsplineprof(Draw_Interpretor& di,
}
}
//
// reste a faire : fermer le profil avec le premier point du contour
// et le point pris avec mouse button 3
// to be done : close the profile using the first point of the contour
// and the point taken with mouse button 3
//
Handle(Geom2d_BSplineCurve) C ;
Handle(Geom_Curve) curve3d_ptr ;
@ -1559,7 +1559,7 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
TopOpeBRep_EdgesIntersector EInter;
char name[100];
//------------------------------------------------------
// Calcul des point d intersection en 2d
// Calculate point of intersection 2D
//-----------------------------------------------------
EInter.SetFaces(F,F);
Standard_Real TolInter = 1.e-7;
@ -1569,8 +1569,8 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
EInter.Perform (E[0],E[1],reducesegments);
if (EInter.IsEmpty()) {
//cout << " Pas d'intersection trouvee" << endl;
di << " Pas d'intersection trouvee" << "\n";
//cout << " No intersection found" << endl;
di << " No intersection found" << "\n";
return 0;
}
@ -1590,8 +1590,8 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
DBRep::Set(name,V);
for (Standard_Integer i = 1; i <= 2; i++) {
//---------------------------------------------------------------
// pour pouvoir ranger le parametre sur l edge
// il faut le coder interne....
// to be able to rank parameter on edge
// it is necessary to code it internally
//---------------------------------------------------------------
Standard_Real U = P2D.Parameter(i);
@ -1600,7 +1600,7 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
// B.UpdateVertex(TopoDS::Vertex(V.Oriented(TopAbs_INTERNAL)),
// U,E[i-1],Tol);
//---------------------------------------------------------------
// Orientation du vertex en fct de la transition.
// Orientation of vertex in the transition.
//---------------------------------------------------------------
TopAbs_Orientation OO = TopAbs_REVERSED;
if (P2D.IsVertex(i)) {
@ -1609,8 +1609,8 @@ Standard_Integer edgeintersector(Draw_Interpretor& di,
else if (P2D.Transition(i).Before() == TopAbs_OUT) {
OO = TopAbs_FORWARD;
}
//cout << " Orientation du vertex " << NbV << " sur " << a[i+1] << ": ";
di << " Orientation du vertex " << NbV << " sur " << a[i+1] << ": ";
//cout << " Orientation of vertex " << NbV << " on " << a[i+1] << ": ";
di << " Orientation of vertex " << NbV << " on " << a[i+1] << ": ";
if (OO == TopAbs_FORWARD) {
//cout << "FORWARD" << endl;
di << "FORWARD" << "\n";
@ -1647,7 +1647,7 @@ static Standard_Integer concatwire(Draw_Interpretor&, Standard_Integer n, const
TopoDS_Wire res;
res=BRepAlgo::ConcatenateWire(W,Option); //treatment
res=BRepAlgo::ConcatenateWire(W,Option); //processing
DBRep::Set(c[1],res);
return 0;
}
@ -1662,8 +1662,8 @@ Standard_Integer build3d(Draw_Interpretor& di,
{
if ( (n <2) || (n>3) ) {
//cout << " 1 ou 2 arguments attendus" << endl;
di << " 1 ou 2 arguments attendus" << "\n";
//cout << " 1 or 2 arguments expected" << endl;
di << " 1 or 2 arguments expected" << "\n";
return 1;
}

View File

@ -212,13 +212,13 @@ static Standard_Integer CheckHist(Draw_Interpretor& di,
const char** )
{
if(Rakk == 0) {
//cout<<"Pas de Builder actif"<<endl;
di<<"Pas de Builder actif"<<"\n";
//cout<<"No active Builder"<<endl;
di<<"No active Builder"<<"\n";
return 1;
}
if(!Rakk->IsDone()) {
//cout<<"Builder actif Not Done"<<endl;
di<<"Builder actif Not Done"<<"\n";
//cout<<"Active Builder Not Done"<<endl;
di<<"Active Builder Not Done"<<"\n";
return 1;
}
Standard_Integer nbc = Rakk->NbContours();
@ -274,8 +274,8 @@ static Standard_Integer UPDATEVOL(Draw_Interpretor& di,
const char** a)
{
if(Rake == 0){
//cout << "MakeFillet non initialise"<<endl;
di << "MakeFillet non initialise"<<"\n";
//cout << "MakeFillet not initialized"<<endl;
di << "MakeFillet not initialized"<<"\n";
return 1 ;
}
if(narg%2 != 0 || narg < 4) return 1;
@ -298,8 +298,8 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di,
const char**)
{
if(Rake == 0){
//cout << "MakeFillet non initialise"<<endl;
di << "MakeFillet non initialise"<<"\n";
//cout << "MakeFillet not initialized"<<endl;
di << "MakeFillet not initialized"<<"\n";
return 1 ;
}
Rake->Build();
@ -317,7 +317,7 @@ static Standard_Integer BUILDEVOL(Draw_Interpretor& di,
//**********************************************
// commande des fusions et coupes avec conges *
// command fuse and cut with fillets *
//**********************************************
Standard_Integer topoblend(Draw_Interpretor& di, Standard_Integer narg, const char** a)
@ -497,7 +497,7 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
else if (err==FilletSurf_PbFilletCompute) di <<"StatusError=PBFillet"<<"\n";
}
else {
if (Rakk.IsDone()==FilletSurf_IsPartial) di <<"resultat partiel"<<"\n";
if (Rakk.IsDone()==FilletSurf_IsPartial) di <<"partial result"<<"\n";
nb=Rakk.NbSurface();
char localname [100];
@ -514,11 +514,11 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
//else if (Rakk.StartSectionStatus()==FilletSurf_TwoExtremityOnEdge)
// {cout<<" type deb conges = WLBLEND"<<endl;}
if (Rakk.StartSectionStatus()==FilletSurf_NoExtremityOnEdge)
{di<<" type deb conges = WLBLOUT"<<"\n";}
{di<<" type start fillets = WLBLOUT"<<"\n";}
else if (Rakk.StartSectionStatus()==FilletSurf_OneExtremityOnEdge )
{ di<<" type deb conges = WLBLSTOP"<<"\n";}
{ di<<" type start fillets = WLBLSTOP"<<"\n";}
else if (Rakk.StartSectionStatus()==FilletSurf_TwoExtremityOnEdge)
{di<<" type deb conges = WLBLEND"<<"\n";}
{di<<" type start fillets = WLBLEND"<<"\n";}
//if (Rakk.EndSectionStatus()==FilletSurf_NoExtremityOnEdge)
// {cout<<" type fin conges = WLBLOUT"<<endl;}
@ -527,30 +527,30 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
//else if (Rakk.EndSectionStatus()==FilletSurf_TwoExtremityOnEdge)
// { cout<<" type fin conges = WLBLEND"<<endl;}
if (Rakk.EndSectionStatus()==FilletSurf_NoExtremityOnEdge)
{di<<" type fin conges = WLBLOUT"<<"\n";}
{di<<" type end fillets = WLBLOUT"<<"\n";}
else if (Rakk.EndSectionStatus()==FilletSurf_OneExtremityOnEdge)
{di<<" type fin conges = WLBLSTOP"<<"\n";}
{di<<" type end fillets = WLBLSTOP"<<"\n";}
else if (Rakk.EndSectionStatus()==FilletSurf_TwoExtremityOnEdge)
{ di<<" type fin conges = WLBLEND"<<"\n";}
{ di<<" type end fillets = WLBLEND"<<"\n";}
Standard_Real f,l;
f = Rakk.FirstParameter();
l = Rakk.LastParameter();
//cout<<"parametre sur edge debut : "<<f<<endl;
//cout<<"parametre sur edge fin : "<<l<<endl;
di<<"parametre sur edge debut : "<<f<<"\n";
di<<"parametre sur edge fin : "<<l<<"\n";
//cout<<"parameter on edge start : "<<f<<endl;
//cout<<"parameter on edge end : "<<l<<endl;
di<<"parametre on edge start : "<<f<<"\n";
di<<"parametre on edge end : "<<l<<"\n";
for (i=1;i<=nb;i++){
//precision
//cout<<"precision "<< i << "= "<<Rakk.TolApp3d(i)<<endl;
di<<"precision "<< i << "= "<<Rakk.TolApp3d(i)<<"\n";
// affichage des surfaces resultats
// display resulting surfaces
sprintf(localname, "%s%d" ,ns0,i);
temp = localname;
DrawTrSurf::Set(temp,Rakk.SurfaceFillet(i));
di << localname<< " ";
//affichage des courbes 3d
// display curves 3d
sprintf(localname, "%s%d" ,"courb1",i);
temp =localname;
DrawTrSurf::Set(temp,Rakk.CurveOnFace1(i));
@ -560,7 +560,7 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
DrawTrSurf::Set(temp,Rakk.CurveOnFace2(i));
di << localname<< " ";
// affichage des supports
// display supports
sprintf(localname, "%s%d" ,"face1",i);
temp =localname ;
DBRep::Set(temp,Rakk.SupportFace1(i));
@ -570,7 +570,7 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
DBRep::Set(temp,Rakk.SupportFace2(i));
di << localname<< " ";
// affichage des Pcurve sur les faces
// display Pcurves on faces
sprintf(localname, "%s%d" ,"pcurveonface1",i);
temp =localname ;
DrawTrSurf::Set(temp,Rakk.PCurveOnFace1(i));
@ -580,7 +580,7 @@ static Standard_Integer blend1(Draw_Interpretor& di, Standard_Integer narg, cons
DrawTrSurf::Set(temp,Rakk.PCurveOnFace2(i));
di << localname<< " ";
// affichage des Pcurve sur le conge
// display Pcurves on the fillet
sprintf(localname, "%s%d" ,"pcurveonconge1",i);
temp =localname;
DrawTrSurf::Set(temp,Rakk.PCurve1OnFillet(i));
@ -621,7 +621,7 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
if ( S.IsNull()) return 1;
Standard_Real Rad = atof(a[3]);
Standard_Real Tol = t3d; //le meme que blend ! 1.e-7;
Standard_Real Tol = t3d; //the same as blend ! 1.e-7;
BiTgte_Blend Roll;
Roll.Init(S,Rad,Tol,Standard_False);
@ -633,44 +633,44 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
continue;
}
if ( Nb == 0) { // on recupere les faces d'arret.
if ( Nb == 0) { // return stop faces.
TopoDS_Shape aLocalFace(DBRep::Get(a[i],TopAbs_FACE));
TopoDS_Face F1 = TopoDS::Face(aLocalFace);
// TopoDS_Face F1 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
if ( F1.IsNull()) {
//cout << " Face d'arret non reperee." << endl;
di << " Face d'arret non reperee." << "\n";
//cout << " Stop face not referenced." << endl;
di << " Stop face not referenced." << "\n";
return 1;
}
Roll.SetStoppingFace(F1);
}
else if (Nb == 1) { // on recupere les faces sur lesquelles la bille roule
else if (Nb == 1) { // return faces on which the ball rotates
TopoDS_Shape aLocalFace(DBRep::Get(a[i],TopAbs_FACE));
TopoDS_Face F1 = TopoDS::Face(aLocalFace);
// TopoDS_Face F1 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
i++;
if ( !strcmp(a[i],"@")) {
//cout << " Il faut un nombre pair de faces d'appui de la bille" << endl;
di << " Il faut un nombre pair de faces d'appui de la bille" << "\n";
//cout << " Even number of ball support faces is required " << endl;
di << " Even number of ball support faces is required " << "\n";
return 1;
}
aLocalFace = DBRep::Get(a[i],TopAbs_FACE);
TopoDS_Face F2 = TopoDS::Face(aLocalFace);
// TopoDS_Face F2 = TopoDS::Face(DBRep::Get(a[i],TopAbs_FACE));
if ( F1.IsNull() || F2.IsNull()) {
//cout << " Face d'appui non reperee." << endl;
di << " Face d'appui non reperee." << "\n";
//cout << " Support face not referenced." << endl;
di << " Support face not referenced." << "\n";
return 1;
}
Roll.SetFaces(F1,F2);
}
else if (Nb == 2) { // on recupere l'arete sur laquelle la bille roule
else if (Nb == 2) { // return the edge on which the ball rotates
TopoDS_Shape aLocalShape(DBRep::Get(a[i],TopAbs_EDGE));
TopoDS_Edge E = TopoDS::Edge(aLocalShape);
// TopoDS_Edge E = TopoDS::Edge(DBRep::Get(a[i],TopAbs_EDGE));
if ( E.IsNull()) {
//cout << " Edge non repere." << endl;
di << " Edge non repere." << "\n";
//cout << " Edge not referenced." << endl;
di << " Edge not referenced." << "\n";
return 1;
}
Roll.SetEdge(E);
@ -688,9 +688,9 @@ Standard_Integer rollingball(Draw_Interpretor& di, Standard_Integer n, const cha
for (Standard_Integer i = 1; i <= NbBranches; i++) {
Standard_Integer From,To;
Roll.IndicesOfBranche(i,From,To);
//cout << " Indices de la " << i << "eme Branche : ";
//cout << " Indexes of the " << i << "th Branch : ";
//cout << " " << From << " " << To << endl;
di << " Indices de la " << i << "eme Branche : ";
di << " Indexes of the " << i << "th Branch : ";
di << " " << From << " " << To << "\n";
for (Standard_Integer j = From; j <= To; j++) {
const TopoDS_Shape& CurF = Roll.Face(j);

View File

@ -54,7 +54,7 @@ static void DrawCurve(const Handle(Geom2d_Curve)& aCurve,
//==========================================================================
//function : topoLoad
// chargement d une face dans l explorer.
// loading of a face in the explorer.
//==========================================================================
static Standard_Integer topoload (Draw_Interpretor& , Standard_Integer argc, const char** argv)
{
@ -70,7 +70,7 @@ static Standard_Integer topoload (Draw_Interpretor& , Standard_Integer argc, con
//==========================================================================
//function : drawcont
// visualisation du contour defini par l explorateur.
// visualization of the contour defined by the explorer.
//==========================================================================
static Standard_Integer drawcont(Draw_Interpretor& , Standard_Integer , const char**)
{
@ -86,8 +86,8 @@ static Standard_Integer drawcont(Draw_Interpretor& , Standard_Integer , const ch
//==========================================================================
//function : mat
// calcul de la carte des lieux bisecteur sur le contour defini
// par l explorateur.
// calculate the map of locations bisector on the contour defined by
// the explorer.
//==========================================================================
static Standard_Integer mat(Draw_Interpretor& , Standard_Integer, const char**)
{
@ -97,11 +97,11 @@ static Standard_Integer mat(Draw_Interpretor& , Standard_Integer, const char**)
return 0;
}
//==========================================================================
//============================================================================
//function : zone
// construction et affichage de la zone de proximite associee aux
// elements de base definis par l edge ou le vertex.
//==========================================================================
// construction and display of the proximity zone associated to the
// base elements defined by the edge or the vertex.
//============================================================================
static Standard_Integer zone(Draw_Interpretor& , Standard_Integer argc , const char** argv)
{
if (argc < 2) return 1;
@ -132,8 +132,8 @@ static Standard_Integer zone(Draw_Interpretor& , Standard_Integer argc , const c
//==========================================================================
//function : side
// side = left => calcul a gauche du contour.
// side = right => calcul a droite du contour.
// side = left => calculation to the left of the contour.
// side = right => calculation to the right of the contour.
//==========================================================================
static Standard_Integer side(Draw_Interpretor& , Standard_Integer, const char** argv)
@ -148,7 +148,7 @@ static Standard_Integer side(Draw_Interpretor& , Standard_Integer, const char**
//==========================================================================
//function : result
// Affichage complet de la carte calculee.
// Complete display of the calculated map.
//==========================================================================
static Standard_Integer result(Draw_Interpretor& , Standard_Integer, const char**)
{
@ -165,12 +165,11 @@ static Standard_Integer result(Draw_Interpretor& , Standard_Integer, const char*
//==========================================================================
//function : DrawCurve
// Affichage d une courbe <aCurve> de Geom2d. dans une couleur
// definie par <Indice>.
// Indice = 1 jaune,
// Indice = 2 bleu,
// Indice = 3 rouge,
// Indice = 4 vert.
// Display of curve <aCurve> of Geom2d in a color defined by <Indice>.
// Indice = 1 yellow,
// Indice = 2 blue,
// Indice = 3 red,
// Indice = 4 green.
//==========================================================================
void DrawCurve(const Handle(Geom2d_Curve)& aCurve,
const Standard_Integer Indice)
@ -187,14 +186,14 @@ void DrawCurve(const Handle(Geom2d_Curve)& aCurve,
curve =(*(Handle_Bisector_BisecAna*)&curve)->Geom2dCurve();
type = curve->DynamicType();
}
// PB de representation des courbes semi_infinies.
// PB of representation of semi_infinite curves.
gp_Parab2d gpParabola;
gp_Hypr2d gpHyperbola;
Standard_Real Focus;
Standard_Real Limit = 50000.;
Standard_Real delta = 400;
// PB de representation des courbes semi_infinies.
// PB of representation of semi_infinite curves.
if (aCurve->LastParameter() == Precision::Infinite()) {
if (type == STANDARD_TYPE(Geom2d_Parabola)) {
@ -224,7 +223,7 @@ void DrawCurve(const Handle(Geom2d_Curve)& aCurve,
else {
CurveDraw = aCurve;
}
// fin PB.
// end PB.
}
else {
CurveDraw = aCurve;

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