mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
This commit is contained in:
parent
14c4193d11
commit
c48e2889cd
@ -34,32 +34,46 @@ static Standard_Boolean IsTimeStamp
|
|||||||
char dizmois = val->Value(6);
|
char dizmois = val->Value(6);
|
||||||
char dizjour = val->Value(9);
|
char dizjour = val->Value(9);
|
||||||
char dizheur = val->Value(12);
|
char dizheur = val->Value(12);
|
||||||
for (Standard_Integer i = 1; i <= 19; i ++) {
|
for (Standard_Integer i = 1; i <= 19; i ++)
|
||||||
|
{
|
||||||
char uncar = val->Value(i);
|
char uncar = val->Value(i);
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 1 : if (uncar != '1' && uncar != '2') return Standard_False; break;
|
case 1 : if (uncar != '1' && uncar != '2') return Standard_False;
|
||||||
|
break;
|
||||||
case 2 :
|
case 2 :
|
||||||
case 3 :
|
case 3 :
|
||||||
case 4 : if (uncar < '0' || uncar > '9') return Standard_False; break;
|
case 4 : if (uncar < '0' || uncar > '9') return Standard_False;
|
||||||
|
break;
|
||||||
case 5 : if (uncar != '-') return Standard_False;
|
case 5 : if (uncar != '-') return Standard_False;
|
||||||
case 6 : if (uncar != '0' && uncar != '1') return Standard_False; break;
|
case 6 : if (uncar != '0' && uncar != '1') return Standard_False;
|
||||||
|
break;
|
||||||
case 7 : if (uncar < '0' || uncar > '9') return Standard_False;
|
case 7 : if (uncar < '0' || uncar > '9') return Standard_False;
|
||||||
if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False; break;
|
if (dizmois == '1' && (uncar < '0' || uncar > '2')) return Standard_False;
|
||||||
|
break;
|
||||||
case 8 : if (uncar != '-') return Standard_False;
|
case 8 : if (uncar != '-') return Standard_False;
|
||||||
case 9 : if (uncar < '0' || uncar > '3') return Standard_False; break;
|
case 9 : if (uncar < '0' || uncar > '3') return Standard_False;
|
||||||
|
break;
|
||||||
case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
|
case 10 : if (uncar < '0' || uncar > '9') return Standard_False;
|
||||||
if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False; break;
|
if (dizjour == '3' && (uncar != '0' && uncar != '1')) return Standard_False;
|
||||||
|
break;
|
||||||
case 11 : if (uncar != 'T') return Standard_False;
|
case 11 : if (uncar != 'T') return Standard_False;
|
||||||
case 12 : if (uncar < '0' || uncar > '2') return Standard_False; break;
|
case 12 : if (uncar < '0' || uncar > '2') return Standard_False;
|
||||||
|
break;
|
||||||
case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
|
case 13 : if (uncar < '0' || uncar > '9') return Standard_False;
|
||||||
if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False; break;
|
if (dizheur == '2' && (uncar < '0' || uncar > '3')) return Standard_False;
|
||||||
|
break;
|
||||||
case 14 : if (uncar != ':') return Standard_False;
|
case 14 : if (uncar != ':') return Standard_False;
|
||||||
case 15 : if (uncar < '0' || uncar > '5') return Standard_False; break;
|
case 15 : if (uncar < '0' || uncar > '5') return Standard_False;
|
||||||
case 16 : if (uncar < '0' || uncar > '9') return Standard_False; break;
|
break;
|
||||||
|
case 16 : if (uncar < '0' || uncar > '9') return Standard_False;
|
||||||
|
break;
|
||||||
case 17 : if (uncar != ':') return Standard_False;
|
case 17 : if (uncar != ':') return Standard_False;
|
||||||
case 18 : if (uncar < '0' || uncar > '5') return Standard_False; break;
|
case 18 : if (uncar < '0' || uncar > '5') return Standard_False;
|
||||||
case 19 : if (uncar < '0' || uncar > '9') return Standard_False; break;
|
break;
|
||||||
default : break;
|
case 19 : if (uncar < '0' || uncar > '9') return Standard_False;
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
|
@ -736,24 +736,24 @@ void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor3d_HSurface)& S)
|
|||||||
void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
|
void Adaptor3d_CurveOnSurface::Load(const Handle(Adaptor2d_HCurve2d)& C)
|
||||||
{
|
{
|
||||||
myCurve = C;
|
myCurve = C;
|
||||||
if (!mySurface.IsNull())
|
if (mySurface.IsNull())
|
||||||
{
|
{
|
||||||
EvalKPart();
|
return;
|
||||||
GeomAbs_SurfaceType SType ;
|
|
||||||
SType = mySurface->GetType();
|
|
||||||
if( SType == GeomAbs_BSplineSurface)
|
|
||||||
EvalFirstLastSurf();
|
|
||||||
if( SType == GeomAbs_SurfaceOfExtrusion)
|
|
||||||
EvalFirstLastSurf();
|
|
||||||
if( SType == GeomAbs_SurfaceOfRevolution)
|
|
||||||
EvalFirstLastSurf();
|
|
||||||
if( SType == GeomAbs_OffsetSurface) {
|
|
||||||
SType = mySurface->BasisSurface()->GetType();
|
|
||||||
if( SType == GeomAbs_SurfaceOfRevolution ||
|
|
||||||
SType == GeomAbs_SurfaceOfExtrusion ||
|
|
||||||
SType == GeomAbs_BSplineSurface )
|
|
||||||
EvalFirstLastSurf();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EvalKPart();
|
||||||
|
|
||||||
|
GeomAbs_SurfaceType SType = mySurface->GetType();
|
||||||
|
if (SType == GeomAbs_OffsetSurface)
|
||||||
|
{
|
||||||
|
SType = mySurface->BasisSurface()->GetType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SType == GeomAbs_BSplineSurface ||
|
||||||
|
SType == GeomAbs_SurfaceOfExtrusion ||
|
||||||
|
SType == GeomAbs_SurfaceOfRevolution)
|
||||||
|
{
|
||||||
|
EvalFirstLastSurf();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,16 +608,23 @@ void AppBlend_AppSurf::Perform(const Handle(TheLine)& Lin,
|
|||||||
for(i = 1; i <= NbPointTot; i++){
|
for(i = 1; i <= NbPointTot; i++){
|
||||||
F.Section(Lin->Point(i),tabAppP,tabAppV,tabP2d,tabV2d,tabW,tabDW);
|
F.Section(Lin->Point(i),tabAppP,tabAppV,tabP2d,tabV2d,tabW,tabDW);
|
||||||
Standard_Real x,y,z;
|
Standard_Real x,y,z;
|
||||||
for(j = 1; j <= NbUPoles; j++){
|
for (j = 1; j <= NbUPoles; j++)
|
||||||
|
{
|
||||||
tabAppP(j).Coord(x,y,z);
|
tabAppP(j).Coord(x,y,z);
|
||||||
if(x < X) X = x; if(x > DX) DX = x;
|
if(x < X) { X = x; }
|
||||||
if(y < Y) Y = y; if(y > DY) DY = y;
|
if(x > DX) { DX = x; }
|
||||||
if(z < Z) Z = z; if(z > DZ) DZ = z;
|
if(y < Y) { Y = y; }
|
||||||
|
if(y > DY) { DY = y; }
|
||||||
|
if(z < Z) { Z = z; }
|
||||||
|
if(z > DZ) { DZ = z; }
|
||||||
}
|
}
|
||||||
for(j = 1; j <= NbPoles2d; j++){
|
for (j = 1; j <= NbPoles2d; j++)
|
||||||
|
{
|
||||||
tabP2d(j).Coord(x,y);
|
tabP2d(j).Coord(x,y);
|
||||||
if(x < X2d(j)) X2d(j) = x; if(x > DX2d(j)) DX2d(j) = x;
|
if(x < X2d (j)) { X2d (j) = x; }
|
||||||
if(y < Y2d(j)) Y2d(j) = y; if(y > DY2d(j)) DY2d(j) = y;
|
if(x > DX2d(j)) { DX2d(j) = x; }
|
||||||
|
if(y < Y2d (j)) { Y2d (j) = y; }
|
||||||
|
if(y > DY2d(j)) { DY2d(j) = y; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// On calcule pour chaque ligne la transformation vers 0 1.
|
// On calcule pour chaque ligne la transformation vers 0 1.
|
||||||
|
@ -662,7 +662,9 @@ Standard_Real BRepGProp_Gauss::Compute(
|
|||||||
LMaxSubs = BRepGProp_Gauss::MaxSubs(iLSubEnd);
|
LMaxSubs = BRepGProp_Gauss::MaxSubs(iLSubEnd);
|
||||||
|
|
||||||
if (LMaxSubs > SM)
|
if (LMaxSubs > SM)
|
||||||
|
{
|
||||||
LMaxSubs = SM;
|
LMaxSubs = SM;
|
||||||
|
}
|
||||||
|
|
||||||
BRepGProp_Gauss::InitMass(0.0, 1, LMaxSubs, anInertiaL);
|
BRepGProp_Gauss::InitMass(0.0, 1, LMaxSubs, anInertiaL);
|
||||||
BRepGProp_Gauss::Init(ErrL, 0.0, 1, LMaxSubs);
|
BRepGProp_Gauss::Init(ErrL, 0.0, 1, LMaxSubs);
|
||||||
@ -679,7 +681,9 @@ Standard_Real BRepGProp_Gauss::Compute(
|
|||||||
L2->Value(IL) = L1->Value(JL);
|
L2->Value(IL) = L1->Value(JL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
LRange[0] = IL = JL;
|
LRange[0] = IL = JL;
|
||||||
|
}
|
||||||
|
|
||||||
if (JL == LMaxSubs || Abs(L2->Value(JL) - L1->Value(JL)) < EPS_PARAM)
|
if (JL == LMaxSubs || Abs(L2->Value(JL) - L1->Value(JL)) < EPS_PARAM)
|
||||||
{
|
{
|
||||||
@ -697,6 +701,7 @@ Standard_Real BRepGProp_Gauss::Compute(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
for (kL = 0; kL < kLEnd; kL++)
|
for (kL = 0; kL < kLEnd; kL++)
|
||||||
{
|
{
|
||||||
iLS = LRange[kL];
|
iLS = LRange[kL];
|
||||||
@ -961,6 +966,7 @@ Standard_Real BRepGProp_Gauss::Compute(
|
|||||||
aLI.Ixz = mult(CIxz, lr);
|
aLI.Ixz = mult(CIxz, lr);
|
||||||
aLI.Iyz = mult(CIyz, lr);
|
aLI.Iyz = mult(CIyz, lr);
|
||||||
}//for: (kL)iLS
|
}//for: (kL)iLS
|
||||||
|
}
|
||||||
|
|
||||||
// Calculate/correct epsilon of computation by current value of dim
|
// Calculate/correct epsilon of computation by current value of dim
|
||||||
// That is need for not spend time for
|
// That is need for not spend time for
|
||||||
@ -1007,7 +1013,9 @@ Standard_Real BRepGProp_Gauss::Compute(
|
|||||||
} while ( (ErrorL - EpsL > 0.0 && isVerifyComputation) || kLEnd == 1 );
|
} while ( (ErrorL - EpsL > 0.0 && isVerifyComputation) || kLEnd == 1 );
|
||||||
|
|
||||||
for ( i = 1; i <= JL; i++ )
|
for ( i = 1; i <= JL; i++ )
|
||||||
|
{
|
||||||
addAndRestoreInertia(anInertiaL->Value(i), anInertia);
|
addAndRestoreInertia(anInertiaL->Value(i), anInertia);
|
||||||
|
}
|
||||||
|
|
||||||
ErrorLMax = Max(ErrorLMax, ErrorL);
|
ErrorLMax = Max(ErrorLMax, ErrorL);
|
||||||
}
|
}
|
||||||
|
@ -916,8 +916,8 @@ static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d,
|
|||||||
Standard_Real first = c3d->FirstParameter();
|
Standard_Real first = c3d->FirstParameter();
|
||||||
Standard_Real last = c3d->LastParameter();
|
Standard_Real last = c3d->LastParameter();
|
||||||
Standard_Real dapp = -1.;
|
Standard_Real dapp = -1.;
|
||||||
Standard_Integer i = 0;
|
for (Standard_Integer i = 0; i <= nbp; ++i)
|
||||||
for(i = 0; i <= nbp; i++){
|
{
|
||||||
const Standard_Real t = IntToReal(i)/IntToReal(nbp);
|
const Standard_Real t = IntToReal(i)/IntToReal(nbp);
|
||||||
const Standard_Real u = first*(1.-t) + last*t;
|
const Standard_Real u = first*(1.-t) + last*t;
|
||||||
gp_Pnt Pc3d = c3d->Value(u);
|
gp_Pnt Pc3d = c3d->Value(u);
|
||||||
@ -953,16 +953,14 @@ static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d,
|
|||||||
Precision::IsInfinite(Pcons.Y()) ||
|
Precision::IsInfinite(Pcons.Y()) ||
|
||||||
Precision::IsInfinite(Pcons.Z()))
|
Precision::IsInfinite(Pcons.Z()))
|
||||||
{
|
{
|
||||||
d2=Precision::Infinite();
|
d2 = Precision::Infinite();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Standard_Real temp = Pc3d.SquareDistance(Pcons);
|
Standard_Real temp = Pc3d.SquareDistance(Pcons);
|
||||||
|
|
||||||
|
|
||||||
dist(i+1) = temp;
|
dist(i+1) = temp;
|
||||||
|
|
||||||
|
d2 = Max (d2, temp);
|
||||||
if(temp > d2) d2 = temp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Precision::IsInfinite(d2))
|
if(Precision::IsInfinite(d2))
|
||||||
@ -982,24 +980,40 @@ static Standard_Real ComputeTol(const Handle(Adaptor3d_HCurve)& c3d,
|
|||||||
Standard_Integer N2 = 0;
|
Standard_Integer N2 = 0;
|
||||||
Standard_Integer N3 = 0;
|
Standard_Integer N3 = 0;
|
||||||
|
|
||||||
for( i = 1; i<= nbp+10; i++)
|
for (Standard_Integer i = 1; i<= nbp+10; ++i)
|
||||||
if( dist(i) > 0 ) {
|
{
|
||||||
if( dist(i) < 1.0 ) N1++;
|
if (dist(i) > 0)
|
||||||
else N2++;
|
{
|
||||||
|
if (dist(i) < 1.0)
|
||||||
|
{
|
||||||
|
++N1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
++N2;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( N1 > N2 && N2 != 0 ) N3 = 100*N2/(N1+N2);
|
if (N1 > N2 && N2 != 0)
|
||||||
if( N3 < 10 && N3 != 0 ) {
|
{
|
||||||
|
N3 = 100*N2/(N1+N2);
|
||||||
|
}
|
||||||
|
if (N3 < 10 && N3 != 0)
|
||||||
|
{
|
||||||
ana = Standard_True;
|
ana = Standard_True;
|
||||||
for( i = 1; i<= nbp+10; i++)
|
for (Standard_Integer i = 1; i <= nbp+10; ++i)
|
||||||
if( dist(i) > 0 && dist(i) < 1.0 )
|
{
|
||||||
if( dist(i) > D2 ) D2 = dist(i);
|
if (dist(i) > 0 && dist(i) < 1.0)
|
||||||
|
{
|
||||||
|
D2 = Max (D2, dist(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//d2 = 1.5*sqrt(d2);
|
//d2 = 1.5*sqrt(d2);
|
||||||
d2 = (!ana) ? 1.5 * d2 : 1.5*sqrt(D2);
|
d2 = (!ana) ? 1.5 * d2 : 1.5*sqrt(D2);
|
||||||
if(d2<1.e-7) d2 = 1.e-7;
|
d2 = Max (d2, 1.e-7);
|
||||||
|
|
||||||
return d2;
|
return d2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -479,8 +479,11 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
|
|||||||
|
|
||||||
//Sorting
|
//Sorting
|
||||||
for (i = 1; i <= NonSeam.Length(); i++)
|
for (i = 1; i <= NonSeam.Length(); i++)
|
||||||
|
{
|
||||||
for (j = 1; j < ParsNonSeam(i).Length(); j++)
|
for (j = 1; j < ParsNonSeam(i).Length(); j++)
|
||||||
|
{
|
||||||
for (k = j+1; k <= ParsNonSeam(i).Length(); k++)
|
for (k = j+1; k <= ParsNonSeam(i).Length(); k++)
|
||||||
|
{
|
||||||
if (ParsNonSeam(i)(k) < ParsNonSeam(i)(j))
|
if (ParsNonSeam(i)(k) < ParsNonSeam(i)(j))
|
||||||
{
|
{
|
||||||
Standard_Real temp = ParsNonSeam(i)(j);
|
Standard_Real temp = ParsNonSeam(i)(j);
|
||||||
@ -493,414 +496,433 @@ void BRepOffsetAPI_DraftAngle::CorrectWires()
|
|||||||
ParsSeam(i)(j) = ParsSeam(i)(k);
|
ParsSeam(i)(j) = ParsSeam(i)(k);
|
||||||
ParsSeam(i)(k) = temp;
|
ParsSeam(i)(k) = temp;
|
||||||
}
|
}
|
||||||
BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal iter( Emap );
|
|
||||||
for (; iter.More(); iter.Next())
|
|
||||||
{
|
|
||||||
TColStd_SequenceOfReal Seq;
|
|
||||||
Seq = iter.Value();
|
|
||||||
for (i = 1; i < Seq.Length(); i++)
|
|
||||||
for (j = i+1; j <= Seq.Length(); j++)
|
|
||||||
if (Seq(j) < Seq(i))
|
|
||||||
{
|
|
||||||
Standard_Real temp = Seq(i);
|
|
||||||
Seq(i) = Seq(j);
|
|
||||||
Seq(j) = temp;
|
|
||||||
}
|
}
|
||||||
Emap( iter.Key() ) = Seq;
|
}
|
||||||
|
}
|
||||||
|
BRepFill_DataMapIteratorOfDataMapOfShapeSequenceOfReal iter (Emap);
|
||||||
|
for (; iter.More (); iter.Next ())
|
||||||
|
{
|
||||||
|
TColStd_SequenceOfReal Seq = iter.Value ();
|
||||||
|
for (i = 1; i < Seq.Length (); i++)
|
||||||
|
{
|
||||||
|
for (j = i + 1; j <= Seq.Length (); j++)
|
||||||
|
{
|
||||||
|
if (Seq (j) < Seq (i))
|
||||||
|
{
|
||||||
|
Standard_Real temp = Seq (i);
|
||||||
|
Seq (i) = Seq (j);
|
||||||
|
Seq (j) = temp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Emap (iter.Key ()) = Seq;
|
||||||
}
|
}
|
||||||
BRepFill_DataMapOfShapeSequenceOfReal EPmap;
|
BRepFill_DataMapOfShapeSequenceOfReal EPmap;
|
||||||
TopTools_DataMapOfShapeSequenceOfShape EVmap; //Seam
|
TopTools_DataMapOfShapeSequenceOfShape EVmap; //Seam
|
||||||
TopTools_DataMapOfShapeSequenceOfShape EWmap; //Seam and wires intersecting it
|
TopTools_DataMapOfShapeSequenceOfShape EWmap; //Seam and wires intersecting it
|
||||||
iter.Initialize( Emap );
|
iter.Initialize (Emap);
|
||||||
for (; iter.More(); iter.Next())
|
for (; iter.More (); iter.Next ())
|
||||||
{
|
{
|
||||||
TColStd_SequenceOfReal parseq;
|
TColStd_SequenceOfReal parseq;
|
||||||
EPmap.Bind( iter.Key(), parseq );
|
EPmap.Bind (iter.Key (), parseq);
|
||||||
TopTools_SequenceOfShape shapeseq;
|
TopTools_SequenceOfShape shapeseq;
|
||||||
EVmap.Bind( iter.Key(), shapeseq );
|
EVmap.Bind (iter.Key (), shapeseq);
|
||||||
TopTools_SequenceOfShape shapeseq2;
|
TopTools_SequenceOfShape shapeseq2;
|
||||||
EWmap.Bind( iter.Key(), shapeseq2 );
|
EWmap.Bind (iter.Key (), shapeseq2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reconstruction of non-seam edges
|
//Reconstruction of non-seam edges
|
||||||
BRepTools_Substitution aSub;
|
BRepTools_Substitution aSub;
|
||||||
BRep_Builder BB;
|
BRep_Builder BB;
|
||||||
for (i = 1; i <= NonSeam.Length(); i++)
|
for (i = 1; i <= NonSeam.Length (); i++)
|
||||||
{
|
{
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge( NonSeam(i) );
|
TopoDS_Edge anEdge = TopoDS::Edge (NonSeam (i));
|
||||||
TopTools_ListOfShape NewEdges;
|
TopTools_ListOfShape NewEdges;
|
||||||
TopoDS_Edge NewE;
|
TopoDS_Edge NewE;
|
||||||
TopoDS_Vertex Vfirst, Vlast;
|
TopoDS_Vertex Vfirst, Vlast;
|
||||||
TopExp::Vertices( anEdge, Vfirst, Vlast );
|
TopExp::Vertices (anEdge, Vfirst, Vlast);
|
||||||
Standard_Real par, FirstPar, LastPar;
|
Standard_Real par, FirstPar, LastPar;
|
||||||
BRep_Tool::Range( anEdge, FirstPar, LastPar );
|
BRep_Tool::Range (anEdge, FirstPar, LastPar);
|
||||||
Standard_Integer firstind = 1;
|
Standard_Integer firstind = 1;
|
||||||
par = ParsNonSeam(i)(1);
|
par = ParsNonSeam (i)(1);
|
||||||
TopoDS_Edge SeamEdge = TopoDS::Edge( Seam(i)(1) );
|
TopoDS_Edge SeamEdge = TopoDS::Edge (Seam (i)(1));
|
||||||
//Find the face
|
//Find the face
|
||||||
for (j = 1; j <= Eseq.Length(); j++)
|
for (j = 1; j <= Eseq.Length (); j++)
|
||||||
if (SeamEdge.IsSame( Eseq(j) ))
|
if (SeamEdge.IsSame (Eseq (j)))
|
||||||
break;
|
break;
|
||||||
TopoDS_Face theFace = TopoDS::Face( Fseq(j) );
|
TopoDS_Face theFace = TopoDS::Face (Fseq (j));
|
||||||
TopLoc_Location L;
|
TopLoc_Location L;
|
||||||
Handle( Geom_Surface ) theSurf = BRep_Tool::Surface( theFace, L );
|
Handle (Geom_Surface) theSurf = BRep_Tool::Surface (theFace, L);
|
||||||
if (Abs(par-FirstPar) <= Precision::Confusion())
|
if (Abs (par - FirstPar) <= Precision::Confusion ())
|
||||||
{
|
{
|
||||||
BB.UpdateVertex( Vfirst, ParsSeam(i)(1), SeamEdge, BRep_Tool::Tolerance(Vfirst) );
|
BB.UpdateVertex (Vfirst, ParsSeam (i)(1), SeamEdge, BRep_Tool::Tolerance (Vfirst));
|
||||||
EPmap( SeamEdge ).Append( ParsSeam(i)(1) );
|
EPmap (SeamEdge).Append (ParsSeam (i)(1));
|
||||||
EVmap( SeamEdge ).Append( Vfirst );
|
EVmap (SeamEdge).Append (Vfirst);
|
||||||
EWmap( SeamEdge ).Append( NonSeamWires(i) );
|
EWmap (SeamEdge).Append (NonSeamWires (i));
|
||||||
firstind = 2;
|
firstind = 2;
|
||||||
}
|
}
|
||||||
Standard_Real prevpar = FirstPar;
|
Standard_Real prevpar = FirstPar;
|
||||||
TopoDS_Vertex PrevV = Vfirst;
|
TopoDS_Vertex PrevV = Vfirst;
|
||||||
for (j = firstind; j <= ParsNonSeam(i).Length(); j++)
|
for (j = firstind; j <= ParsNonSeam (i).Length (); j++)
|
||||||
{
|
{
|
||||||
TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
|
TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
|
||||||
NewE = TopoDS::Edge( aLocalShape );
|
NewE = TopoDS::Edge (aLocalShape);
|
||||||
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
||||||
TopoDS_Vertex NewV;
|
TopoDS_Vertex NewV;
|
||||||
par = ParsNonSeam(i)(j);
|
par = ParsNonSeam (i)(j);
|
||||||
BB.Range( NewE, prevpar, par );
|
BB.Range (NewE, prevpar, par);
|
||||||
SeamEdge = TopoDS::Edge( Seam(i)(j) );
|
SeamEdge = TopoDS::Edge (Seam (i)(j));
|
||||||
if (j == ParsNonSeam(i).Length() && Abs(par-LastPar) <= Precision::Confusion())
|
if (j == ParsNonSeam (i).Length () && Abs (par - LastPar) <= Precision::Confusion ())
|
||||||
{
|
{
|
||||||
NewV = Vlast;
|
NewV = Vlast;
|
||||||
if (firstind == 2 && j == 2)
|
if (firstind == 2 && j == 2)
|
||||||
{
|
{
|
||||||
BB.UpdateVertex( Vlast, ParsSeam(i)(j), SeamEdge, BRep_Tool::Tolerance(Vlast) );
|
BB.UpdateVertex (Vlast, ParsSeam (i)(j), SeamEdge, BRep_Tool::Tolerance (Vlast));
|
||||||
EPmap( SeamEdge ).Append( ParsSeam(i)(j) );
|
EPmap (SeamEdge).Append (ParsSeam (i)(j));
|
||||||
EVmap( SeamEdge ).Append( Vlast );
|
EVmap (SeamEdge).Append (Vlast);
|
||||||
EWmap( SeamEdge ).Append( NonSeamWires(i) );
|
EWmap (SeamEdge).Append (NonSeamWires (i));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BRepAdaptor_Curve bcur( NewE );
|
BRepAdaptor_Curve bcur (NewE);
|
||||||
gp_Pnt Point = bcur.Value( par );
|
gp_Pnt Point = bcur.Value (par);
|
||||||
NewV = BRepLib_MakeVertex( Point );
|
NewV = BRepLib_MakeVertex (Point);
|
||||||
BB.UpdateVertex( NewV, par, NewE, 10.*Precision::Confusion() );
|
BB.UpdateVertex (NewV, par, NewE, 10.*Precision::Confusion ());
|
||||||
}
|
}
|
||||||
BB.UpdateVertex( NewV, ParsSeam(i)(j), SeamEdge, 10.*Precision::Confusion() );
|
BB.UpdateVertex (NewV, ParsSeam (i)(j), SeamEdge, 10.*Precision::Confusion ());
|
||||||
NewE.Orientation( TopAbs_FORWARD );
|
NewE.Orientation (TopAbs_FORWARD);
|
||||||
BB.Add( NewE, PrevV.Oriented(TopAbs_FORWARD) );
|
BB.Add (NewE, PrevV.Oriented (TopAbs_FORWARD));
|
||||||
BB.Add( NewE, NewV.Oriented(TopAbs_REVERSED) );
|
BB.Add (NewE, NewV.Oriented (TopAbs_REVERSED));
|
||||||
|
|
||||||
NewEdges.Append( NewE );
|
NewEdges.Append (NewE);
|
||||||
EPmap( SeamEdge ).Append( ParsSeam(i)(j) );
|
EPmap (SeamEdge).Append (ParsSeam (i)(j));
|
||||||
EVmap( SeamEdge ).Append( NewV );
|
EVmap (SeamEdge).Append (NewV);
|
||||||
EWmap( SeamEdge ).Append( NonSeamWires(i) );
|
EWmap (SeamEdge).Append (NonSeamWires (i));
|
||||||
|
|
||||||
prevpar = par;
|
prevpar = par;
|
||||||
PrevV = NewV;
|
PrevV = NewV;
|
||||||
}
|
}
|
||||||
//The last edge
|
//The last edge
|
||||||
TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
|
TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
|
||||||
NewE = TopoDS::Edge( aLocalShape );
|
NewE = TopoDS::Edge (aLocalShape);
|
||||||
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
||||||
par = LastPar;
|
par = LastPar;
|
||||||
if (Abs(prevpar-par) > Precision::Confusion())
|
if (Abs (prevpar - par) > Precision::Confusion ())
|
||||||
{
|
{
|
||||||
BB.Range( NewE, prevpar, par );
|
BB.Range (NewE, prevpar, par);
|
||||||
NewE.Orientation( TopAbs_FORWARD );
|
NewE.Orientation (TopAbs_FORWARD);
|
||||||
BB.Add( NewE, PrevV.Oriented(TopAbs_FORWARD) );
|
BB.Add (NewE, PrevV.Oriented (TopAbs_FORWARD));
|
||||||
BB.Add( NewE, Vlast.Oriented(TopAbs_REVERSED) );
|
BB.Add (NewE, Vlast.Oriented (TopAbs_REVERSED));
|
||||||
NewEdges.Append( NewE );
|
NewEdges.Append (NewE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Substitute anEdge by NewEdges
|
//Substitute anEdge by NewEdges
|
||||||
aSub.Substitute( anEdge, NewEdges );
|
aSub.Substitute (anEdge, NewEdges);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sorting of EPmap and EVmap and removing repeating points from them
|
//Sorting of EPmap and EVmap and removing repeating points from them
|
||||||
iter.Initialize( EPmap );
|
iter.Initialize (EPmap);
|
||||||
for (; iter.More(); iter.Next())
|
for (; iter.More (); iter.Next ())
|
||||||
{
|
{
|
||||||
TColStd_SequenceOfReal Seq;
|
TColStd_SequenceOfReal Seq;
|
||||||
Seq = iter.Value();
|
Seq = iter.Value ();
|
||||||
TopTools_SequenceOfShape SeqShape;
|
TopTools_SequenceOfShape SeqShape;
|
||||||
SeqShape = EVmap( iter.Key() );
|
SeqShape = EVmap (iter.Key ());
|
||||||
TopTools_SequenceOfShape SeqShape2;
|
TopTools_SequenceOfShape SeqShape2;
|
||||||
SeqShape2 = EWmap( iter.Key() );
|
SeqShape2 = EWmap (iter.Key ());
|
||||||
for (i = 1; i < Seq.Length(); i++)
|
for (i = 1; i < Seq.Length (); i++)
|
||||||
for (j = i+1; j <= Seq.Length(); j++)
|
|
||||||
if (Seq(j) < Seq(i))
|
|
||||||
{
|
{
|
||||||
Standard_Real temp = Seq(i);
|
for (j = i + 1; j <= Seq.Length (); j++)
|
||||||
Seq(i) = Seq(j);
|
{
|
||||||
Seq(j) = temp;
|
if (Seq (j) < Seq (i))
|
||||||
TopoDS_Shape tmp = SeqShape(i);
|
{
|
||||||
SeqShape(i) = SeqShape(j);
|
Standard_Real temp = Seq (i);
|
||||||
SeqShape(j) = tmp;
|
Seq (i) = Seq (j);
|
||||||
tmp = SeqShape2(i);
|
Seq (j) = temp;
|
||||||
SeqShape2(i) = SeqShape2(j);
|
TopoDS_Shape tmp = SeqShape (i);
|
||||||
SeqShape2(j) = tmp;
|
SeqShape (i) = SeqShape (j);
|
||||||
|
SeqShape (j) = tmp;
|
||||||
|
tmp = SeqShape2 (i);
|
||||||
|
SeqShape2 (i) = SeqShape2 (j);
|
||||||
|
SeqShape2 (j) = tmp;
|
||||||
}
|
}
|
||||||
EPmap( iter.Key() ) = Seq;
|
|
||||||
EVmap( iter.Key() ) = SeqShape;
|
|
||||||
EWmap( iter.Key() ) = SeqShape2;
|
|
||||||
}
|
}
|
||||||
iter.Initialize( EPmap );
|
}
|
||||||
for (; iter.More(); iter.Next())
|
|
||||||
|
EPmap (iter.Key ()) = Seq;
|
||||||
|
EVmap (iter.Key ()) = SeqShape;
|
||||||
|
EWmap (iter.Key ()) = SeqShape2;
|
||||||
|
}
|
||||||
|
iter.Initialize (EPmap);
|
||||||
|
for (; iter.More (); iter.Next ())
|
||||||
{
|
{
|
||||||
TColStd_SequenceOfReal Seq;
|
TColStd_SequenceOfReal Seq;
|
||||||
Seq = iter.Value();
|
Seq = iter.Value ();
|
||||||
TopTools_SequenceOfShape SeqShape;
|
TopTools_SequenceOfShape SeqShape;
|
||||||
SeqShape = EVmap( iter.Key() );
|
SeqShape = EVmap (iter.Key ());
|
||||||
TopTools_SequenceOfShape SeqShape2;
|
TopTools_SequenceOfShape SeqShape2;
|
||||||
SeqShape2 = EWmap( iter.Key() );
|
SeqShape2 = EWmap (iter.Key ());
|
||||||
Standard_Boolean remove = Standard_True;
|
Standard_Boolean remove = Standard_True;
|
||||||
while (remove)
|
while (remove)
|
||||||
{
|
{
|
||||||
remove = Standard_False;
|
remove = Standard_False;
|
||||||
for (i = 1; i < Seq.Length(); i++)
|
for (i = 1; i < Seq.Length (); i++)
|
||||||
if (Abs(Seq(i)-Seq(i+1)) <= Precision::Confusion())
|
|
||||||
{
|
{
|
||||||
Seq.Remove(i+1);
|
if (Abs (Seq (i) - Seq (i + 1)) <= Precision::Confusion ())
|
||||||
SeqShape.Remove(i+1);
|
{
|
||||||
SeqShape2.Remove(i+1);
|
Seq.Remove (i + 1);
|
||||||
|
SeqShape.Remove (i + 1);
|
||||||
|
SeqShape2.Remove (i + 1);
|
||||||
remove = Standard_True;
|
remove = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EPmap( iter.Key() ) = Seq;
|
}
|
||||||
EVmap( iter.Key() ) = SeqShape;
|
EPmap (iter.Key ()) = Seq;
|
||||||
EWmap( iter.Key() ) = SeqShape2;
|
EVmap (iter.Key ()) = SeqShape;
|
||||||
|
EWmap (iter.Key ()) = SeqShape2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reconstruction of seam edges
|
//Reconstruction of seam edges
|
||||||
TopTools_DataMapOfShapeShape VEmap;
|
TopTools_DataMapOfShapeShape VEmap;
|
||||||
iter.Initialize( Emap );
|
iter.Initialize (Emap);
|
||||||
for (; iter.More(); iter.Next())
|
for (; iter.More (); iter.Next ())
|
||||||
{
|
{
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge( iter.Key() );
|
TopoDS_Edge anEdge = TopoDS::Edge (iter.Key ());
|
||||||
Standard_Boolean onepoint = Standard_False;
|
Standard_Boolean onepoint = Standard_False;
|
||||||
TopTools_ListOfShape NewEdges;
|
TopTools_ListOfShape NewEdges;
|
||||||
TColStd_SequenceOfReal Seq;
|
TColStd_SequenceOfReal Seq;
|
||||||
Seq = iter.Value();
|
Seq = iter.Value ();
|
||||||
TColStd_SequenceOfReal Seq2;
|
TColStd_SequenceOfReal Seq2;
|
||||||
Seq2 = EPmap( anEdge );
|
Seq2 = EPmap (anEdge);
|
||||||
TopTools_SequenceOfShape SeqVer;
|
TopTools_SequenceOfShape SeqVer;
|
||||||
SeqVer = EVmap( anEdge );
|
SeqVer = EVmap (anEdge);
|
||||||
TopTools_SequenceOfShape SeqWire;
|
TopTools_SequenceOfShape SeqWire;
|
||||||
SeqWire = EWmap( anEdge );
|
SeqWire = EWmap (anEdge);
|
||||||
TopoDS_Vertex Vfirst, Vlast;
|
TopoDS_Vertex Vfirst, Vlast;
|
||||||
TopExp::Vertices( anEdge, Vfirst, Vlast );
|
TopExp::Vertices (anEdge, Vfirst, Vlast);
|
||||||
Standard_Real fpar, lpar, FirstPar, LastPar;
|
Standard_Real fpar, lpar, FirstPar, LastPar;
|
||||||
BRep_Tool::Range( anEdge, FirstPar, LastPar );
|
BRep_Tool::Range (anEdge, FirstPar, LastPar);
|
||||||
fpar = FirstPar;
|
fpar = FirstPar;
|
||||||
lpar = Seq(1);
|
lpar = Seq (1);
|
||||||
TopoDS_Edge NewE;
|
TopoDS_Edge NewE;
|
||||||
Standard_Integer firstind = 1;
|
Standard_Integer firstind = 1;
|
||||||
if (Abs(fpar-lpar) <= Precision::Confusion())
|
if (Abs (fpar - lpar) <= Precision::Confusion ())
|
||||||
{
|
{
|
||||||
firstind = 2;
|
firstind = 2;
|
||||||
fpar = Seq(1);
|
fpar = Seq (1);
|
||||||
lpar = Seq(2);
|
lpar = Seq (2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Seq.Length()%2 != 0)
|
if (Seq.Length () % 2 != 0)
|
||||||
{
|
{
|
||||||
VEmap.Bind( Vfirst, anEdge );
|
VEmap.Bind (Vfirst, anEdge);
|
||||||
firstind = 2;
|
firstind = 2;
|
||||||
fpar = Seq(1);
|
fpar = Seq (1);
|
||||||
if (Seq.Length() > 2)
|
if (Seq.Length () > 2)
|
||||||
lpar = Seq(2);
|
lpar = Seq (2);
|
||||||
else
|
else
|
||||||
onepoint = Standard_True;
|
onepoint = Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!onepoint)
|
if (!onepoint)
|
||||||
{
|
{
|
||||||
TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
|
TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
|
||||||
NewE = TopoDS::Edge( aLocalShape );
|
NewE = TopoDS::Edge (aLocalShape);
|
||||||
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
||||||
BB.Range( NewE, fpar, lpar );
|
BB.Range (NewE, fpar, lpar);
|
||||||
NewE.Orientation( TopAbs_FORWARD );
|
NewE.Orientation (TopAbs_FORWARD);
|
||||||
if (firstind == 1)
|
if (firstind == 1)
|
||||||
{
|
{
|
||||||
BB.Add( NewE, Vfirst.Oriented(TopAbs_FORWARD) );
|
BB.Add (NewE, Vfirst.Oriented (TopAbs_FORWARD));
|
||||||
aLocalShape = SeqVer(1).Oriented(TopAbs_REVERSED);
|
aLocalShape = SeqVer (1).Oriented (TopAbs_REVERSED);
|
||||||
BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
|
BB.Add (NewE, TopoDS::Vertex (aLocalShape));
|
||||||
//BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_REVERSED) ) );
|
//BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_REVERSED) ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aLocalShape = SeqVer(1).Oriented(TopAbs_FORWARD);
|
aLocalShape = SeqVer (1).Oriented (TopAbs_FORWARD);
|
||||||
BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
|
BB.Add (NewE, TopoDS::Vertex (aLocalShape));
|
||||||
aLocalShape = SeqVer(2).Oriented(TopAbs_REVERSED);
|
aLocalShape = SeqVer (2).Oriented (TopAbs_REVERSED);
|
||||||
BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
|
BB.Add (NewE, TopoDS::Vertex (aLocalShape));
|
||||||
//BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_FORWARD) ) );
|
//BB.Add( NewE, TopoDS::Vertex( SeqVer(1).Oriented(TopAbs_FORWARD) ) );
|
||||||
//BB.Add( NewE, TopoDS::Vertex( SeqVer(2).Oriented(TopAbs_REVERSED) ) );
|
//BB.Add( NewE, TopoDS::Vertex( SeqVer(2).Oriented(TopAbs_REVERSED) ) );
|
||||||
}
|
}
|
||||||
NewEdges.Append( NewE );
|
NewEdges.Append (NewE);
|
||||||
|
|
||||||
firstind++;
|
firstind++;
|
||||||
for (i = firstind; i < Seq.Length(); i += 2)
|
for (i = firstind; i < Seq.Length (); i += 2)
|
||||||
{
|
{
|
||||||
aLocalShape = anEdge.EmptyCopied();
|
aLocalShape = anEdge.EmptyCopied ();
|
||||||
NewE = TopoDS::Edge( aLocalShape );
|
NewE = TopoDS::Edge (aLocalShape);
|
||||||
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
||||||
fpar = Seq(i);
|
fpar = Seq (i);
|
||||||
lpar = Seq(i+1);
|
lpar = Seq (i + 1);
|
||||||
BB.Range( NewE, fpar, lpar );
|
BB.Range (NewE, fpar, lpar);
|
||||||
//Find vertices
|
//Find vertices
|
||||||
for (j = 1; j <= Seq2.Length(); j++)
|
for (j = 1; j <= Seq2.Length (); j++)
|
||||||
if (Abs(fpar-Seq2(j)) <= Precision::Confusion())
|
{
|
||||||
|
if (Abs (fpar - Seq2 (j)) <= Precision::Confusion ())
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
NewE.Orientation( TopAbs_FORWARD );
|
}
|
||||||
TopoDS_Shape aLocalShapeCur = SeqVer(j).Oriented(TopAbs_FORWARD);
|
}
|
||||||
BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur) );
|
NewE.Orientation (TopAbs_FORWARD);
|
||||||
aLocalShapeCur = SeqVer(j+1).Oriented(TopAbs_REVERSED);
|
TopoDS_Shape aLocalShapeCur = SeqVer (j).Oriented (TopAbs_FORWARD);
|
||||||
BB.Add( NewE, TopoDS::Vertex( aLocalShapeCur ) );
|
BB.Add (NewE, TopoDS::Vertex (aLocalShapeCur));
|
||||||
|
aLocalShapeCur = SeqVer (j + 1).Oriented (TopAbs_REVERSED);
|
||||||
|
BB.Add (NewE, TopoDS::Vertex (aLocalShapeCur));
|
||||||
//BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) );
|
//BB.Add( NewE, TopoDS::Vertex( SeqVer(j).Oriented(TopAbs_FORWARD) ) );
|
||||||
//BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) );
|
//BB.Add( NewE, TopoDS::Vertex( SeqVer(j+1).Oriented(TopAbs_REVERSED) ) );
|
||||||
NewEdges.Append( NewE );
|
NewEdges.Append (NewE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i = Seq.Length();
|
i = Seq.Length ();
|
||||||
fpar = Seq(i);
|
fpar = Seq (i);
|
||||||
lpar = LastPar;
|
lpar = LastPar;
|
||||||
if (Abs(fpar-lpar) <= Precision::Confusion())
|
if (Abs (fpar - lpar) <= Precision::Confusion ())
|
||||||
continue;
|
continue;
|
||||||
TopoDS_Shape aLocalShape = anEdge.EmptyCopied();
|
TopoDS_Shape aLocalShape = anEdge.EmptyCopied ();
|
||||||
NewE = TopoDS::Edge( aLocalShape );
|
NewE = TopoDS::Edge (aLocalShape);
|
||||||
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
//NewE = TopoDS::Edge( anEdge.EmptyCopied() );
|
||||||
BB.Range( NewE, fpar, lpar );
|
BB.Range (NewE, fpar, lpar);
|
||||||
NewE.Orientation( TopAbs_FORWARD );
|
NewE.Orientation (TopAbs_FORWARD);
|
||||||
aLocalShape = SeqVer(SeqVer.Length()).Oriented(TopAbs_FORWARD);
|
aLocalShape = SeqVer (SeqVer.Length ()).Oriented (TopAbs_FORWARD);
|
||||||
BB.Add( NewE, TopoDS::Vertex( aLocalShape ) );
|
BB.Add (NewE, TopoDS::Vertex (aLocalShape));
|
||||||
//BB.Add( NewE, TopoDS::Vertex( SeqVer(SeqVer.Length()).Oriented(TopAbs_FORWARD) ) );
|
//BB.Add( NewE, TopoDS::Vertex( SeqVer(SeqVer.Length()).Oriented(TopAbs_FORWARD) ) );
|
||||||
BB.Add( NewE, Vlast.Oriented(TopAbs_REVERSED) );
|
BB.Add (NewE, Vlast.Oriented (TopAbs_REVERSED));
|
||||||
NewEdges.Append( NewE );
|
NewEdges.Append (NewE);
|
||||||
|
|
||||||
//Substitute anEdge by NewEdges
|
//Substitute anEdge by NewEdges
|
||||||
aSub.Substitute( anEdge, NewEdges );
|
aSub.Substitute (anEdge, NewEdges);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Removing edges connected with missing extremities of seam edges
|
//Removing edges connected with missing extremities of seam edges
|
||||||
TopTools_DataMapIteratorOfDataMapOfShapeShape itve( VEmap );
|
TopTools_DataMapIteratorOfDataMapOfShapeShape itve (VEmap);
|
||||||
for (; itve.More(); itve.Next())
|
for (; itve.More (); itve.Next ())
|
||||||
{
|
{
|
||||||
TopoDS_Shape V = itve.Key();
|
TopoDS_Shape V = itve.Key ();
|
||||||
TopoDS_Shape E = itve.Value();
|
TopoDS_Shape E = itve.Value ();
|
||||||
TopoDS_Shape W;
|
TopoDS_Shape W;
|
||||||
for (i = 1; i <= Eseq.Length(); i++)
|
for (i = 1; i <= Eseq.Length (); i++)
|
||||||
if (E.IsSame( Eseq(i) ))
|
|
||||||
{
|
{
|
||||||
W = Wseq(i);
|
if (E.IsSame (Eseq (i)))
|
||||||
|
{
|
||||||
|
W = Wseq (i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
TopoDS_Shape Etoremove;
|
TopoDS_Shape Etoremove;
|
||||||
eit.Initialize( W );
|
eit.Initialize (W);
|
||||||
for (; eit.More(); eit.Next())
|
for (; eit.More (); eit.Next ())
|
||||||
{
|
{
|
||||||
TopoDS_Edge CurE = TopoDS::Edge( eit.Value() );
|
TopoDS_Edge CurE = TopoDS::Edge (eit.Value ());
|
||||||
if (CurE.IsSame( E ))
|
if (CurE.IsSame (E))
|
||||||
continue;
|
continue;
|
||||||
TopoDS_Vertex Vfirst, Vlast;
|
TopoDS_Vertex Vfirst, Vlast;
|
||||||
TopExp::Vertices( CurE, Vfirst, Vlast );
|
TopExp::Vertices (CurE, Vfirst, Vlast);
|
||||||
if (Vfirst.IsSame( V ) || Vlast.IsSame( V ))
|
if (Vfirst.IsSame (V) || Vlast.IsSame (V))
|
||||||
{
|
{
|
||||||
Etoremove = CurE;
|
Etoremove = CurE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! Etoremove.IsNull())
|
if (!Etoremove.IsNull ())
|
||||||
{
|
{
|
||||||
W.Free( Standard_True );
|
W.Free (Standard_True);
|
||||||
BB.Remove( W, Etoremove );
|
BB.Remove (W, Etoremove);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aSub.Build( myShape );
|
aSub.Build (myShape);
|
||||||
if (aSub.IsCopied( myShape ))
|
if (aSub.IsCopied (myShape))
|
||||||
{
|
{
|
||||||
const TopTools_ListOfShape& listSh = aSub.Copy( myShape );
|
const TopTools_ListOfShape& listSh = aSub.Copy (myShape);
|
||||||
if (! listSh.IsEmpty())
|
if (!listSh.IsEmpty ())
|
||||||
myShape = listSh.First();
|
myShape = listSh.First ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reconstruction of wires
|
//Reconstruction of wires
|
||||||
TopTools_ListOfShape theCopy;
|
TopTools_ListOfShape theCopy;
|
||||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itww( WWmap );
|
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itww (WWmap);
|
||||||
for (; itww.More(); itww.Next())
|
for (; itww.More (); itww.Next ())
|
||||||
{
|
{
|
||||||
CurWire = itww.Key();
|
CurWire = itww.Key ();
|
||||||
theCopy = aSub.Copy( CurWire );
|
theCopy = aSub.Copy (CurWire);
|
||||||
CurWire = theCopy.First();
|
CurWire = theCopy.First ();
|
||||||
CurWire.Free( Standard_True );
|
CurWire.Free (Standard_True);
|
||||||
TopTools_ListIteratorOfListOfShape itl( itww.Value() );
|
TopTools_ListIteratorOfListOfShape itl (itww.Value ());
|
||||||
for (; itl.More(); itl.Next())
|
for (; itl.More (); itl.Next ())
|
||||||
{
|
{
|
||||||
TopoDS_Shape aWire = itl.Value();
|
TopoDS_Shape aWire = itl.Value ();
|
||||||
CurFace = WFmap( aWire );
|
CurFace = WFmap (aWire);
|
||||||
theCopy = aSub.Copy( aWire );
|
theCopy = aSub.Copy (aWire);
|
||||||
aWire = theCopy.First();
|
aWire = theCopy.First ();
|
||||||
//Adjusting period
|
//Adjusting period
|
||||||
TopLoc_Location L;
|
TopLoc_Location L;
|
||||||
Handle( Geom_Surface ) theSurf = BRep_Tool::Surface( TopoDS::Face(CurFace), L );
|
Handle (Geom_Surface) theSurf = BRep_Tool::Surface (TopoDS::Face (CurFace), L);
|
||||||
eit.Initialize( aWire );
|
eit.Initialize (aWire);
|
||||||
for (; eit.More(); eit.Next())
|
for (; eit.More (); eit.Next ())
|
||||||
{
|
{
|
||||||
TopoDS_Edge anEdge = TopoDS::Edge( eit.Value() );
|
TopoDS_Edge anEdge = TopoDS::Edge (eit.Value ());
|
||||||
gp_Pnt2d Pfirst, Plast, Pmid;
|
gp_Pnt2d Pfirst, Plast, Pmid;
|
||||||
BRep_Tool::UVPoints( anEdge, TopoDS::Face(CurFace), Pfirst, Plast );
|
BRep_Tool::UVPoints (anEdge, TopoDS::Face (CurFace), Pfirst, Plast);
|
||||||
BRepAdaptor_Curve2d bc2d( anEdge, TopoDS::Face(CurFace) );
|
BRepAdaptor_Curve2d bc2d (anEdge, TopoDS::Face (CurFace));
|
||||||
Pmid = bc2d.Value( (bc2d.FirstParameter()+bc2d.LastParameter())/2. );
|
Pmid = bc2d.Value ((bc2d.FirstParameter () + bc2d.LastParameter ()) / 2.);
|
||||||
gp_Vec2d offset;
|
gp_Vec2d offset;
|
||||||
Standard_Boolean translate = Standard_False;
|
Standard_Boolean translate = Standard_False;
|
||||||
if (Pfirst.X()-2.*M_PI > Precision::Confusion() ||
|
if (Pfirst.X () - 2.*M_PI > Precision::Confusion () ||
|
||||||
Plast.X()-2.*M_PI > Precision::Confusion() ||
|
Plast.X () - 2.*M_PI > Precision::Confusion () ||
|
||||||
Pmid.X()-2.*M_PI > Precision::Confusion())
|
Pmid.X () - 2.*M_PI > Precision::Confusion ())
|
||||||
{
|
{
|
||||||
offset.SetCoord( -2.*M_PI, 0 );
|
offset.SetCoord (-2.*M_PI, 0);
|
||||||
translate = Standard_True;
|
translate = Standard_True;
|
||||||
}
|
}
|
||||||
if (Pfirst.X() < -Precision::Confusion() ||
|
if (Pfirst.X () < -Precision::Confusion () ||
|
||||||
Plast.X() < -Precision::Confusion() ||
|
Plast.X () < -Precision::Confusion () ||
|
||||||
Pmid.X() < -Precision::Confusion())
|
Pmid.X () < -Precision::Confusion ())
|
||||||
{
|
{
|
||||||
offset.SetCoord( 2.*M_PI, 0 );
|
offset.SetCoord (2.*M_PI, 0);
|
||||||
translate = Standard_True;
|
translate = Standard_True;
|
||||||
}
|
}
|
||||||
if (translate)
|
if (translate)
|
||||||
{
|
{
|
||||||
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &anEdge.TShape());
|
const Handle (BRep_TEdge)& TE = *((Handle (BRep_TEdge)*) &anEdge.TShape ());
|
||||||
BRep_ListIteratorOfListOfCurveRepresentation itcr( TE->ChangeCurves() );
|
BRep_ListIteratorOfListOfCurveRepresentation itcr (TE->ChangeCurves ());
|
||||||
Handle(BRep_GCurve) GC;
|
Handle (BRep_GCurve) GC;
|
||||||
|
|
||||||
for (; itcr.More(); itcr.Next())
|
for (; itcr.More (); itcr.Next ())
|
||||||
{
|
{
|
||||||
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
|
GC = Handle (BRep_GCurve)::DownCast (itcr.Value ());
|
||||||
if (!GC.IsNull() && GC->IsCurveOnSurface( theSurf, L ))
|
if (!GC.IsNull () && GC->IsCurveOnSurface (theSurf, L))
|
||||||
{
|
{
|
||||||
Handle(Geom2d_Curve) PC = GC->PCurve();
|
Handle (Geom2d_Curve) PC = GC->PCurve ();
|
||||||
PC = Handle(Geom2d_Curve)::DownCast( PC->Translated( offset ) );
|
PC = Handle (Geom2d_Curve)::DownCast (PC->Translated (offset));
|
||||||
GC->PCurve( PC );
|
GC->PCurve (PC);
|
||||||
TE->ChangeCurves().Remove( itcr );
|
TE->ChangeCurves ().Remove (itcr);
|
||||||
TE->ChangeCurves().Append( GC );
|
TE->ChangeCurves ().Append (GC);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
///////////////////
|
///////////////////
|
||||||
eit.Initialize( aWire, Standard_False );
|
eit.Initialize (aWire, Standard_False);
|
||||||
for (; eit.More(); eit.Next())
|
for (; eit.More (); eit.Next ())
|
||||||
{
|
{
|
||||||
TopoDS_Shape anEdge = eit.Value();
|
TopoDS_Shape anEdge = eit.Value ();
|
||||||
BB.Add( CurWire, anEdge );
|
BB.Add (CurWire, anEdge);
|
||||||
}
|
}
|
||||||
if (aSub.IsCopied( CurFace ))
|
if (aSub.IsCopied (CurFace))
|
||||||
{
|
{
|
||||||
theCopy = aSub.Copy( CurFace );
|
theCopy = aSub.Copy (CurFace);
|
||||||
CurFace = theCopy.First();
|
CurFace = theCopy.First ();
|
||||||
}
|
}
|
||||||
CurFace.Free( Standard_True );
|
CurFace.Free (Standard_True);
|
||||||
BB.Remove( CurFace, aWire );
|
BB.Remove (CurFace, aWire);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,14 +357,18 @@ void BRepOffsetAPI_ThruSections::Build()
|
|||||||
{
|
{
|
||||||
Standard_Boolean wdeg = Standard_True;
|
Standard_Boolean wdeg = Standard_True;
|
||||||
for (i = 1; i <= myWires.Length(); i++)
|
for (i = 1; i <= myWires.Length(); i++)
|
||||||
|
{
|
||||||
for (explo.Init(myWires(i), TopAbs_EDGE); explo.More(); explo.Next())
|
for (explo.Init(myWires(i), TopAbs_EDGE); explo.More(); explo.Next())
|
||||||
{
|
{
|
||||||
const TopoDS_Edge& anEdge = TopoDS::Edge(explo.Current());
|
const TopoDS_Edge& anEdge = TopoDS::Edge(explo.Current());
|
||||||
wdeg = wdeg && (BRep_Tool::Degenerated(anEdge));
|
wdeg = wdeg && (BRep_Tool::Degenerated(anEdge));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (wdeg)
|
if (wdeg)
|
||||||
|
{
|
||||||
throw Standard_Failure("Wrong usage of punctual sections");
|
throw Standard_Failure("Wrong usage of punctual sections");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
myNbEdgesInSection = 0;
|
myNbEdgesInSection = 0;
|
||||||
|
|
||||||
|
@ -749,7 +749,9 @@ gp_Lin BRepPrim_GWedge::Line
|
|||||||
Y = YMin;
|
Y = YMin;
|
||||||
Z = ZMin;
|
Z = ZMin;
|
||||||
if ( (XMin != X2Min) || (ZMin != Z2Min) )
|
if ( (XMin != X2Min) || (ZMin != Z2Min) )
|
||||||
|
{
|
||||||
D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
|
D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9 :
|
case 9 :
|
||||||
@ -758,7 +760,9 @@ gp_Lin BRepPrim_GWedge::Line
|
|||||||
Y = YMin;
|
Y = YMin;
|
||||||
Z = ZMax;
|
Z = ZMax;
|
||||||
if ( (XMin != X2Min) || (ZMax != Z2Max) )
|
if ( (XMin != X2Min) || (ZMax != Z2Max) )
|
||||||
|
{
|
||||||
D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
|
D = gp_Vec( (X2Min-XMin)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10 :
|
case 10 :
|
||||||
@ -767,7 +771,9 @@ gp_Lin BRepPrim_GWedge::Line
|
|||||||
Y = YMin;
|
Y = YMin;
|
||||||
Z = ZMin;
|
Z = ZMin;
|
||||||
if ( (XMax != X2Max) || (ZMin != Z2Min) )
|
if ( (XMax != X2Max) || (ZMin != Z2Min) )
|
||||||
|
{
|
||||||
D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
|
D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Min-ZMin)*VZ);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 11 :
|
case 11 :
|
||||||
@ -776,8 +782,9 @@ gp_Lin BRepPrim_GWedge::Line
|
|||||||
Y = YMin;
|
Y = YMin;
|
||||||
Z = ZMax;
|
Z = ZMax;
|
||||||
if ( (XMax != X2Max) || (ZMax != Z2Max) )
|
if ( (XMax != X2Max) || (ZMax != Z2Max) )
|
||||||
D = gp_Vec(gp_Pnt(XMax,YMin,ZMax),gp_Pnt(X2Max,YMax,Z2Max));
|
{
|
||||||
D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
|
D = gp_Vec( (X2Max-XMax)*VX + (YMax-YMin)*VY + (Z2Max-ZMax)*VZ);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -111,16 +111,26 @@ void BRepTools_Quilt::Add(const TopoDS_Shape& S)
|
|||||||
// Binds all the faces of S
|
// Binds all the faces of S
|
||||||
// - to the face itself if it is not copied
|
// - to the face itself if it is not copied
|
||||||
// - to the copy if it is copied
|
// - to the copy if it is copied
|
||||||
if(myBounds.Contains(S)) return;
|
if(myBounds.Contains(S))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
for (TopExp_Explorer wex(S,TopAbs_WIRE,TopAbs_FACE); wex.More(); wex.Next())
|
for (TopExp_Explorer wex(S,TopAbs_WIRE,TopAbs_FACE); wex.More(); wex.Next())
|
||||||
|
{
|
||||||
myBounds.Add(wex.Current(),wex.Current());
|
myBounds.Add(wex.Current(),wex.Current());
|
||||||
|
}
|
||||||
|
|
||||||
for (TopExp_Explorer eex(S,TopAbs_EDGE,TopAbs_WIRE); eex.More(); eex.Next())
|
for (TopExp_Explorer eex(S,TopAbs_EDGE,TopAbs_WIRE); eex.More(); eex.Next())
|
||||||
|
{
|
||||||
myBounds.Add(eex.Current(),eex.Current());
|
myBounds.Add(eex.Current(),eex.Current());
|
||||||
|
}
|
||||||
|
|
||||||
for (TopExp_Explorer vex(S,TopAbs_VERTEX,TopAbs_EDGE); vex.More(); vex.Next())
|
for (TopExp_Explorer vex(S,TopAbs_VERTEX,TopAbs_EDGE); vex.More(); vex.Next())
|
||||||
|
{
|
||||||
myBounds.Add(vex.Current(),vex.Current());
|
myBounds.Add(vex.Current(),vex.Current());
|
||||||
|
}
|
||||||
|
|
||||||
// explore the faces
|
// explore the faces
|
||||||
for (TopExp_Explorer fex(S,TopAbs_FACE); fex.More(); fex.Next()) {
|
for (TopExp_Explorer fex(S,TopAbs_FACE); fex.More(); fex.Next()) {
|
||||||
|
@ -639,18 +639,31 @@ void ChFi2d_Builder::UpDateHistory(const TopoDS_Edge& E1,
|
|||||||
const Standard_Integer Id)
|
const Standard_Integer Id)
|
||||||
{
|
{
|
||||||
if (Id == 1) // the new edge is a fillet
|
if (Id == 1) // the new edge is a fillet
|
||||||
|
{
|
||||||
fillets.Append(NewEdge);
|
fillets.Append(NewEdge);
|
||||||
else // the new edge is a chamfer
|
|
||||||
chamfers.Append(NewEdge);
|
|
||||||
if (history.IsBound(E1)) history.UnBind(E1);
|
|
||||||
if ( status != ChFi2d_FirstEdgeDegenerated
|
|
||||||
&& status != ChFi2d_BothEdgesDegenerated) {
|
|
||||||
if (!E1.IsSame(TrimE1)) history.Bind(E1, TrimE1);
|
|
||||||
}
|
}
|
||||||
if (history.IsBound(E2)) history.UnBind(E2);
|
else // the new edge is a chamfer
|
||||||
if ( status != ChFi2d_LastEdgeDegenerated
|
{
|
||||||
&& status != ChFi2d_BothEdgesDegenerated) {
|
chamfers.Append(NewEdge);
|
||||||
if (!E2.IsSame(TrimE2)) history.Bind(E2, TrimE2);
|
}
|
||||||
|
|
||||||
|
history.UnBind(E1);
|
||||||
|
if (status != ChFi2d_FirstEdgeDegenerated
|
||||||
|
&& status != ChFi2d_BothEdgesDegenerated)
|
||||||
|
{
|
||||||
|
if (!E1.IsSame(TrimE1))
|
||||||
|
{
|
||||||
|
history.Bind(E1, TrimE1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
history.UnBind(E2);
|
||||||
|
if (status != ChFi2d_LastEdgeDegenerated
|
||||||
|
&& status != ChFi2d_BothEdgesDegenerated)
|
||||||
|
{
|
||||||
|
if (!E2.IsSame(TrimE2))
|
||||||
|
{
|
||||||
|
history.Bind(E2, TrimE2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // UpDateHistory
|
} // UpDateHistory
|
||||||
|
|
||||||
|
@ -936,7 +936,9 @@ static Standard_Integer movepole (Draw_Interpretor& , Standard_Integer n, const
|
|||||||
if (GBz.IsNull()) {
|
if (GBz.IsNull()) {
|
||||||
GBs = DrawTrSurf::GetBSplineSurface(a[1]);
|
GBs = DrawTrSurf::GetBSplineSurface(a[1]);
|
||||||
if (GBs.IsNull())
|
if (GBs.IsNull())
|
||||||
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
BSpline = Standard_True;
|
BSpline = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1227,7 +1229,9 @@ static Standard_Integer sfindp (Draw_Interpretor& , Standard_Integer n, const ch
|
|||||||
if (GBz.IsNull()) {
|
if (GBz.IsNull()) {
|
||||||
GBs = DrawTrSurf::GetBSplineSurface(a[1]);
|
GBs = DrawTrSurf::GetBSplineSurface(a[1]);
|
||||||
if (GBs.IsNull())
|
if (GBs.IsNull())
|
||||||
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
BSpline = Standard_True;
|
BSpline = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2084,22 +2084,23 @@ HLRBRep_Data::RejectedPoint (const IntRes2d_IntersectionPoint& PInter,
|
|||||||
|
|
||||||
switch (Tr1->TransitionType()) { // compute the transition
|
switch (Tr1->TransitionType()) { // compute the transition
|
||||||
case IntRes2d_In :
|
case IntRes2d_In :
|
||||||
if (myFEOri == TopAbs_REVERSED) Orie = TopAbs_REVERSED;
|
Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_REVERSED : TopAbs_FORWARD);
|
||||||
else Orie = TopAbs_FORWARD ; break;
|
break;
|
||||||
case IntRes2d_Out :
|
case IntRes2d_Out :
|
||||||
if (myFEOri == TopAbs_REVERSED) Orie = TopAbs_FORWARD ;
|
Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_FORWARD : TopAbs_REVERSED);
|
||||||
else Orie = TopAbs_REVERSED; break;
|
break;
|
||||||
case IntRes2d_Touch :
|
case IntRes2d_Touch :
|
||||||
switch (Tr1->Situation()) {
|
switch (Tr1->Situation()) {
|
||||||
case IntRes2d_Inside :
|
case IntRes2d_Inside :
|
||||||
if (myFEOri == TopAbs_REVERSED) Orie = TopAbs_EXTERNAL;
|
Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_EXTERNAL : TopAbs_INTERNAL);
|
||||||
else Orie = TopAbs_INTERNAL; break;
|
break;
|
||||||
case IntRes2d_Outside :
|
case IntRes2d_Outside :
|
||||||
if (myFEOri == TopAbs_REVERSED) Orie = TopAbs_INTERNAL;
|
Orie = (myFEOri == TopAbs_REVERSED ? TopAbs_INTERNAL : TopAbs_EXTERNAL);
|
||||||
else Orie = TopAbs_EXTERNAL; break;
|
break;
|
||||||
case IntRes2d_Unknown :
|
case IntRes2d_Unknown :
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
} break;
|
}
|
||||||
|
break;
|
||||||
case IntRes2d_Undecided :
|
case IntRes2d_Undecided :
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
@ -2438,12 +2438,16 @@ Handle(IFSelect_Dispatch) IFSelect_Functions::GiveDispatch
|
|||||||
// #### INITIALISATIONS ####
|
// #### INITIALISATIONS ####
|
||||||
// #########################################
|
// #########################################
|
||||||
|
|
||||||
static int initactor = 0;
|
static int THE_IFSelect_Functions_initactor = 0;
|
||||||
|
|
||||||
|
void IFSelect_Functions::Init()
|
||||||
void IFSelect_Functions::Init ()
|
|
||||||
{
|
{
|
||||||
if (initactor) return; initactor = 1;
|
if (THE_IFSelect_Functions_initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IFSelect_Functions_initactor = 1;
|
||||||
IFSelect_Act::SetGroup("DE: General");
|
IFSelect_Act::SetGroup("DE: General");
|
||||||
IFSelect_Act::AddFunc("xstatus","Lists XSTEP Status : Version, System Name ...",funstatus);
|
IFSelect_Act::AddFunc("xstatus","Lists XSTEP Status : Version, System Name ...",funstatus);
|
||||||
IFSelect_Act::AddFunc("handler","Toggle status catch Handler Error of the session",fun1);
|
IFSelect_Act::AddFunc("handler","Toggle status catch Handler Error of the session",fun1);
|
||||||
|
@ -36,19 +36,30 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SessionPilot,IFSelect_Activator)
|
|||||||
#define MAXWORDS 200
|
#define MAXWORDS 200
|
||||||
#define MAXCARS 1000
|
#define MAXCARS 1000
|
||||||
|
|
||||||
static int initactor = 0;
|
static int THE_IFSelect_SessionPilot_initactor = 0;
|
||||||
static TCollection_AsciiString nulword;
|
static TCollection_AsciiString nulword;
|
||||||
|
|
||||||
//#define DEBUG_TRACE
|
//#define DEBUG_TRACE
|
||||||
|
|
||||||
// Nb Maxi de words : cf thewords et method SetCommandLine
|
// Nb Maxi de words : cf thewords et method SetCommandLine
|
||||||
|
|
||||||
IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
|
IFSelect_SessionPilot::IFSelect_SessionPilot (const Standard_CString prompt)
|
||||||
: theprompt (prompt) , thewords (0,MAXWORDS-1) , thewordeb (0,MAXWORDS-1)
|
: theprompt (prompt),
|
||||||
|
thewords (0, MAXWORDS - 1),
|
||||||
|
thewordeb (0, MAXWORDS - 1)
|
||||||
{
|
{
|
||||||
if (theprompt.Length() == 0) theprompt.AssignCat ("Test-XSTEP>");
|
if (theprompt.Length() == 0)
|
||||||
therecord = Standard_False; thenbwords = 0;
|
{
|
||||||
if (initactor) return; initactor = 1;
|
theprompt.AssignCat ("Test-XSTEP>");
|
||||||
|
}
|
||||||
|
therecord = Standard_False;
|
||||||
|
thenbwords = 0;
|
||||||
|
if (THE_IFSelect_SessionPilot_initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IFSelect_SessionPilot_initactor = 1;
|
||||||
Add (1,"x");
|
Add (1,"x");
|
||||||
Add (1,"exit");
|
Add (1,"exit");
|
||||||
Add (2,"?");
|
Add (2,"?");
|
||||||
|
@ -3055,7 +3055,14 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::GiveSelection
|
|||||||
}
|
}
|
||||||
|
|
||||||
Handle(IFSelect_Selection) sel;
|
Handle(IFSelect_Selection) sel;
|
||||||
if (np >= 0) nomsel[np] = 0; if (nf >= 0) nomsel[nf] = '\0';
|
if (np >= 0)
|
||||||
|
{
|
||||||
|
nomsel[np] = 0;
|
||||||
|
}
|
||||||
|
if (nf >= 0)
|
||||||
|
{
|
||||||
|
nomsel[nf] = '\0';
|
||||||
|
}
|
||||||
Handle(Standard_Transient) item = NamedItem(nomsel);
|
Handle(Standard_Transient) item = NamedItem(nomsel);
|
||||||
|
|
||||||
// Parentheses ? essayer Signature (plus tard : Selection parametree)
|
// Parentheses ? essayer Signature (plus tard : Selection parametree)
|
||||||
@ -3171,7 +3178,8 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListFromList
|
|||||||
if (selname[i] == ' ') continue;
|
if (selname[i] == ' ') continue;
|
||||||
if (selname[i] == ',' || selname[i] == ')') {
|
if (selname[i] == ',' || selname[i] == ')') {
|
||||||
entid[j] = '\0';
|
entid[j] = '\0';
|
||||||
if (j == 0) continue; j = 0;
|
if (j == 0) continue;
|
||||||
|
j = 0;
|
||||||
num = NumberFromLabel (entid);
|
num = NumberFromLabel (entid);
|
||||||
if (num <= 0 || !numap.Add (num)) continue;
|
if (num <= 0 || !numap.Add (num)) continue;
|
||||||
Handle(Standard_Transient) anent = StartingEntity(num);
|
Handle(Standard_Transient) anent = StartingEntity(num);
|
||||||
|
@ -41,14 +41,20 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESAppli_Protocol_deja = 0;
|
||||||
|
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
||||||
atype16,atype17,atype18,atype19;
|
atype16,atype17,atype18,atype19;
|
||||||
|
|
||||||
IGESAppli_Protocol::IGESAppli_Protocol ()
|
IGESAppli_Protocol::IGESAppli_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESAppli_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IGESAppli_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESAppli_DrilledHole);
|
atype01 = STANDARD_TYPE(IGESAppli_DrilledHole);
|
||||||
atype02 = STANDARD_TYPE(IGESAppli_ElementResults);
|
atype02 = STANDARD_TYPE(IGESAppli_ElementResults);
|
||||||
atype03 = STANDARD_TYPE(IGESAppli_FiniteElement);
|
atype03 = STANDARD_TYPE(IGESAppli_FiniteElement);
|
||||||
|
@ -36,13 +36,19 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESBasic_Protocol_deja = 0;
|
||||||
|
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,atype16;
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,atype16;
|
||||||
|
|
||||||
IGESBasic_Protocol::IGESBasic_Protocol ()
|
IGESBasic_Protocol::IGESBasic_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESBasic_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IGESBasic_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESBasic_AssocGroupType);
|
atype01 = STANDARD_TYPE(IGESBasic_AssocGroupType);
|
||||||
atype02 = STANDARD_TYPE(IGESBasic_ExternalRefFile);
|
atype02 = STANDARD_TYPE(IGESBasic_ExternalRefFile);
|
||||||
atype03 = STANDARD_TYPE(IGESBasic_ExternalRefFileIndex);
|
atype03 = STANDARD_TYPE(IGESBasic_ExternalRefFileIndex);
|
||||||
|
@ -394,7 +394,12 @@ IGESData_IGESReaderTool::IGESData_IGESReaderTool
|
|||||||
PR.SendFail(Msg221);
|
PR.SendFail(Msg221);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (nbprops == 0) return; ncur ++;
|
if (nbprops == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
++ncur;
|
||||||
Interface_EntityList props;
|
Interface_EntityList props;
|
||||||
if (PR.ReadEntList
|
if (PR.ReadEntList
|
||||||
(IR,PR.CurrentList(nbprops),Msg38, props,Standard_False) )
|
(IR,PR.CurrentList(nbprops),Msg38, props,Standard_False) )
|
||||||
|
@ -520,7 +520,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
|||||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) S<<' ';
|
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) S<<' ';
|
||||||
S << &blancs[line->Length()];
|
S << &blancs[line->Length()];
|
||||||
if (fnes) writefnes (S,finlin);
|
if (fnes) writefnes (S,finlin);
|
||||||
else S << finlin; S << endl;
|
else S << finlin;
|
||||||
|
S << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef PATIENCELOG
|
#ifdef PATIENCELOG
|
||||||
@ -539,7 +540,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
|||||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) S<<' ';
|
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsG; k ++) S<<' ';
|
||||||
S << &blancs[line->Length()];
|
S << &blancs[line->Length()];
|
||||||
if (fnes) writefnes (S,finlin);
|
if (fnes) writefnes (S,finlin);
|
||||||
else S << finlin; S << endl;
|
else S << finlin;
|
||||||
|
S << endl;
|
||||||
isGood = S.good();
|
isGood = S.good();
|
||||||
}
|
}
|
||||||
if(!isGood)
|
if(!isGood)
|
||||||
@ -564,11 +566,13 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
|||||||
v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],
|
v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],
|
||||||
v[8],v[9],v[10],v[11] ,2*i-1);
|
v[8],v[9],v[10],v[11] ,2*i-1);
|
||||||
if (fnes) writefnes (S,ligne);
|
if (fnes) writefnes (S,ligne);
|
||||||
else S << ligne; S<< "\n";
|
else S << ligne;
|
||||||
|
S<< "\n";
|
||||||
sprintf(ligne,"%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d",
|
sprintf(ligne,"%8d%8d%8d%8d%8d%8s%8s%8s%8sD%7.7d",
|
||||||
v[0],v[13],v[14],v[15],v[16],res1,res2,lab,num,2*i);
|
v[0],v[13],v[14],v[15],v[16],res1,res2,lab,num,2*i);
|
||||||
if (fnes) writefnes (S,ligne);
|
if (fnes) writefnes (S,ligne);
|
||||||
else S << ligne; S<< "\n";
|
else S << ligne;
|
||||||
|
S<< "\n";
|
||||||
// cout << "Ent.no "<<i<<" No en P "<<thepnum.Value(i)<<
|
// cout << "Ent.no "<<i<<" No en P "<<thepnum.Value(i)<<
|
||||||
// " Lignes P:"<<thepnum.Value(i+1)-thepnum.Value(i)<<endl;
|
// " Lignes P:"<<thepnum.Value(i+1)-thepnum.Value(i)<<endl;
|
||||||
// for (j = 0; j < 17; j ++) S<<v[j]<<" ";
|
// for (j = 0; j < 17; j ++) S<<v[j]<<" ";
|
||||||
@ -596,7 +600,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
|||||||
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsP; k ++)S<<' ';
|
// for (Standard_Integer k = line->Length()+1; k <= MaxcarsP; k ++)S<<' ';
|
||||||
S << &blancs[line->Length()];
|
S << &blancs[line->Length()];
|
||||||
if (fnes) writefnes (S,finlin);
|
if (fnes) writefnes (S,finlin);
|
||||||
else S << finlin; S << endl;
|
else S << finlin;
|
||||||
|
S << endl;
|
||||||
isGood = S.good();
|
isGood = S.good();
|
||||||
#ifdef PATIENCELOG
|
#ifdef PATIENCELOG
|
||||||
lignespatience --;
|
lignespatience --;
|
||||||
@ -612,7 +617,8 @@ Standard_Boolean IGESData_IGESWriter::Print (Standard_OStream& S) const
|
|||||||
nbs,nbg,nbd*2,thepnum.Value(thepnum.Length())-1);
|
nbs,nbg,nbd*2,thepnum.Value(thepnum.Length())-1);
|
||||||
// 12345678- 16- 24- 32 56789 123456789 123456789 123456789 12
|
// 12345678- 16- 24- 32 56789 123456789 123456789 123456789 12
|
||||||
if (fnes) writefnes (S,ligne);
|
if (fnes) writefnes (S,ligne);
|
||||||
else S << ligne; S<< "\n";
|
else S << ligne;
|
||||||
|
S<< "\n";
|
||||||
S.flush();
|
S.flush();
|
||||||
isGood = S.good();
|
isGood = S.good();
|
||||||
#ifdef PATIENCELOG
|
#ifdef PATIENCELOG
|
||||||
|
@ -27,12 +27,18 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESDefs_Protocol_deja = 0;
|
||||||
|
|
||||||
static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7;
|
static Handle(Standard_Type) atype1,atype2,atype3,atype4,atype5,atype6,atype7;
|
||||||
|
|
||||||
IGESDefs_Protocol::IGESDefs_Protocol ()
|
IGESDefs_Protocol::IGESDefs_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESDefs_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IGESDefs_Protocol_deja = 1;
|
||||||
atype1 = STANDARD_TYPE(IGESDefs_AssociativityDef);
|
atype1 = STANDARD_TYPE(IGESDefs_AssociativityDef);
|
||||||
atype2 = STANDARD_TYPE(IGESDefs_AttributeDef);
|
atype2 = STANDARD_TYPE(IGESDefs_AttributeDef);
|
||||||
atype3 = STANDARD_TYPE(IGESDefs_AttributeTable);
|
atype3 = STANDARD_TYPE(IGESDefs_AttributeTable);
|
||||||
|
@ -399,23 +399,40 @@ void IGESDefs_ToolAttributeDef::OwnCheck
|
|||||||
}
|
}
|
||||||
else if (fn == 0) continue;
|
else if (fn == 0) continue;
|
||||||
mess[0] = '\0';
|
mess[0] = '\0';
|
||||||
switch (aty) {
|
switch (aty)
|
||||||
case 1 : if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
|
{
|
||||||
|
case 1:
|
||||||
|
if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
|
||||||
|
{
|
||||||
sprintf(mess,"Attribute List n0.%d (Integers) badly defined", aty);
|
sprintf(mess,"Attribute List n0.%d (Integers) badly defined", aty);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2 : if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal)))
|
case 2:
|
||||||
|
if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfReal)))
|
||||||
|
{
|
||||||
sprintf(mess,"Attribute List n0.%d (Reals) badly defined", aty);
|
sprintf(mess,"Attribute List n0.%d (Reals) badly defined", aty);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 3 : if (!list->IsKind(STANDARD_TYPE(Interface_HArray1OfHAsciiString)))
|
case 3:
|
||||||
|
if (!list->IsKind(STANDARD_TYPE(Interface_HArray1OfHAsciiString)))
|
||||||
|
{
|
||||||
sprintf(mess,"Attribute List n0.%d (Strings) badly defined", aty);
|
sprintf(mess,"Attribute List n0.%d (Strings) badly defined", aty);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 4 : if (!list->IsKind(STANDARD_TYPE(IGESData_HArray1OfIGESEntity)))
|
case 4:
|
||||||
|
if (!list->IsKind(STANDARD_TYPE(IGESData_HArray1OfIGESEntity)))
|
||||||
|
{
|
||||||
sprintf(mess,"Attribute List n0.%d (IGES Pointers) badly defined", aty);
|
sprintf(mess,"Attribute List n0.%d (IGES Pointers) badly defined", aty);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 6 : if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
|
case 6:
|
||||||
|
if (!list->IsKind(STANDARD_TYPE(TColStd_HArray1OfInteger)))
|
||||||
|
{
|
||||||
sprintf(mess,"Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty);
|
sprintf(mess,"Attribute List n0.%d (Logicals i.e. Integers) badly defined", aty);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
default : break;
|
|
||||||
}
|
}
|
||||||
if (mess[0] != '\0') ach->AddFail(mess);
|
if (mess[0] != '\0') ach->AddFail(mess);
|
||||||
}
|
}
|
||||||
|
@ -45,14 +45,20 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESDimen_Protocol_deja = 0;
|
||||||
|
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
||||||
atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
|
atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
|
||||||
|
|
||||||
IGESDimen_Protocol::IGESDimen_Protocol ()
|
IGESDimen_Protocol::IGESDimen_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESDimen_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IGESDimen_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESDimen_AngularDimension);
|
atype01 = STANDARD_TYPE(IGESDimen_AngularDimension);
|
||||||
atype02 = STANDARD_TYPE(IGESDimen_BasicDimension);
|
atype02 = STANDARD_TYPE(IGESDimen_BasicDimension);
|
||||||
atype03 = STANDARD_TYPE(IGESDimen_CenterLine);
|
atype03 = STANDARD_TYPE(IGESDimen_CenterLine);
|
||||||
|
@ -34,13 +34,18 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESDraw_Protocol_deja = 0;
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
|
||||||
|
|
||||||
IGESDraw_Protocol::IGESDraw_Protocol ()
|
IGESDraw_Protocol::IGESDraw_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESDraw_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_IGESDraw_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESDraw_CircArraySubfigure);
|
atype01 = STANDARD_TYPE(IGESDraw_CircArraySubfigure);
|
||||||
atype02 = STANDARD_TYPE(IGESDraw_ConnectPoint);
|
atype02 = STANDARD_TYPE(IGESDraw_ConnectPoint);
|
||||||
atype03 = STANDARD_TYPE(IGESDraw_Drawing);
|
atype03 = STANDARD_TYPE(IGESDraw_Drawing);
|
||||||
|
@ -43,14 +43,18 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESGeom_Protocol_deja = 0;
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
||||||
atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
|
atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23;
|
||||||
|
|
||||||
IGESGeom_Protocol::IGESGeom_Protocol ()
|
IGESGeom_Protocol::IGESGeom_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESGeom_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
THE_IGESGeom_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
|
atype01 = STANDARD_TYPE(IGESGeom_BSplineCurve);
|
||||||
atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
|
atype02 = STANDARD_TYPE(IGESGeom_BSplineSurface);
|
||||||
atype03 = STANDARD_TYPE(IGESGeom_Boundary);
|
atype03 = STANDARD_TYPE(IGESGeom_Boundary);
|
||||||
|
@ -34,13 +34,17 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESGraph_Protocol_deja = 0;
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
|
||||||
|
|
||||||
IGESGraph_Protocol::IGESGraph_Protocol ()
|
IGESGraph_Protocol::IGESGraph_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESGraph_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
THE_IGESGraph_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESGraph_Color);
|
atype01 = STANDARD_TYPE(IGESGraph_Color);
|
||||||
atype02 = STANDARD_TYPE(IGESGraph_DefinitionLevel);
|
atype02 = STANDARD_TYPE(IGESGraph_DefinitionLevel);
|
||||||
atype03 = STANDARD_TYPE(IGESGraph_DrawingSize);
|
atype03 = STANDARD_TYPE(IGESGraph_DrawingSize);
|
||||||
|
@ -100,28 +100,70 @@ Standard_Boolean IGESGraph_ToolDrawingUnits::OwnCorrect
|
|||||||
Standard_CString unm = "";
|
Standard_CString unm = "";
|
||||||
if (!ent->Unit().IsNull()) unm = ent->Unit()->ToCString();
|
if (!ent->Unit().IsNull()) unm = ent->Unit()->ToCString();
|
||||||
switch (unf) {
|
switch (unf) {
|
||||||
case 1 : if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0))
|
case 1:
|
||||||
name = new TCollection_HAsciiString ("IN"); break;
|
if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0))
|
||||||
case 2 : if (strcmp(unm,"MM") == 0)
|
{
|
||||||
name = new TCollection_HAsciiString ("MM"); break;
|
name = new TCollection_HAsciiString ("IN");
|
||||||
case 3 : break; // nom libre
|
}
|
||||||
case 4 : if (strcmp(unm,"FT") == 0)
|
break;
|
||||||
name = new TCollection_HAsciiString ("FT"); break;
|
case 2:
|
||||||
case 5 : if (strcmp(unm,"MI") == 0)
|
if (strcmp(unm,"MM") == 0)
|
||||||
name = new TCollection_HAsciiString ("MI"); break;
|
{
|
||||||
case 6 : if (strcmp(unm,"M") == 0)
|
name = new TCollection_HAsciiString ("MM");
|
||||||
name = new TCollection_HAsciiString ("M"); break;
|
}
|
||||||
case 7 : if (strcmp(unm,"KM") == 0)
|
break;
|
||||||
name = new TCollection_HAsciiString ("KM"); break;
|
case 3:
|
||||||
case 8 : if (strcmp(unm,"MIL") == 0)
|
break; // nom libre
|
||||||
name = new TCollection_HAsciiString ("MIL"); break;
|
case 4:
|
||||||
case 9 : if (strcmp(unm,"UM") == 0)
|
if (strcmp(unm,"FT") == 0)
|
||||||
name = new TCollection_HAsciiString ("UM"); break;
|
{
|
||||||
case 10 : if (strcmp(unm,"CM") == 0)
|
name = new TCollection_HAsciiString ("FT");
|
||||||
name = new TCollection_HAsciiString ("CM"); break;
|
}
|
||||||
case 11 : if (strcmp(unm,"UIN") == 0)
|
break;
|
||||||
name = new TCollection_HAsciiString ("UIN"); break;
|
case 5:
|
||||||
default : break; // on ne peut rien faire ... ?
|
if (strcmp(unm,"MI") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("MI");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
if (strcmp(unm,"M") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("M");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
if (strcmp(unm,"KM") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("KM");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
if (strcmp(unm,"MIL") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("MIL");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
if (strcmp(unm,"UM") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("UM");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
if (strcmp(unm,"CM") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("CM");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
if (strcmp(unm,"UIN") == 0)
|
||||||
|
{
|
||||||
|
name = new TCollection_HAsciiString ("UIN");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break; // on ne peut rien faire ... ?
|
||||||
}
|
}
|
||||||
|
|
||||||
res |= (!name.IsNull());
|
res |= (!name.IsNull());
|
||||||
|
@ -58,11 +58,15 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_Activator,IFSelect_Activator)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_Activator,IFSelect_Activator)
|
||||||
|
|
||||||
static int initActivator = 0;
|
static int THE_IGESSelect_Activator_initActivator = 0;
|
||||||
|
|
||||||
IGESSelect_Activator::IGESSelect_Activator ()
|
IGESSelect_Activator::IGESSelect_Activator()
|
||||||
{
|
{
|
||||||
if (initActivator) return; initActivator = 1;
|
if (THE_IGESSelect_Activator_initActivator)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
THE_IGESSelect_Activator_initActivator = 1;
|
||||||
// Add ( 0,"load");
|
// Add ( 0,"load");
|
||||||
// Add ( 0,"loadiges"); // homonyme
|
// Add ( 0,"loadiges"); // homonyme
|
||||||
SetForGroup ("XSTEP-IGES");
|
SetForGroup ("XSTEP-IGES");
|
||||||
|
@ -44,14 +44,18 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Protocol,IGESData_Protocol)
|
IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Protocol,IGESData_Protocol)
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_IGESSolid_Protocol_deja = 0;
|
||||||
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
|
||||||
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15,
|
||||||
atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23,atype24;
|
atype16,atype17,atype18,atype19,atype20,atype21,atype22,atype23,atype24;
|
||||||
|
|
||||||
IGESSolid_Protocol::IGESSolid_Protocol ()
|
IGESSolid_Protocol::IGESSolid_Protocol()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_IGESSolid_Protocol_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
THE_IGESSolid_Protocol_deja = 1;
|
||||||
atype01 = STANDARD_TYPE(IGESSolid_Block);
|
atype01 = STANDARD_TYPE(IGESSolid_Block);
|
||||||
atype02 = STANDARD_TYPE(IGESSolid_BooleanTree);
|
atype02 = STANDARD_TYPE(IGESSolid_BooleanTree);
|
||||||
atype03 = STANDARD_TYPE(IGESSolid_ConeFrustum);
|
atype03 = STANDARD_TYPE(IGESSolid_ConeFrustum);
|
||||||
|
@ -2098,6 +2098,7 @@ IntSurf_PntOn2S MakeNewPoint(const IntSurf_PntOn2S& replacePnt,
|
|||||||
|
|
||||||
Standard_Integer i;
|
Standard_Integer i;
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
if (Periods[i] != 0.)
|
if (Periods[i] != 0.)
|
||||||
{
|
{
|
||||||
if (Abs(NewParams[i] - OldParams[i]) >= 0.5*Periods[i])
|
if (Abs(NewParams[i] - OldParams[i]) >= 0.5*Periods[i])
|
||||||
@ -2108,6 +2109,7 @@ IntSurf_PntOn2S MakeNewPoint(const IntSurf_PntOn2S& replacePnt,
|
|||||||
NewParams[i] -= Periods[i];
|
NewParams[i] -= Periods[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NewPoint.SetValue(NewParams[0], NewParams[1], NewParams[2], NewParams[3]);
|
NewPoint.SetValue(NewParams[0], NewParams[1], NewParams[2], NewParams[3]);
|
||||||
return NewPoint;
|
return NewPoint;
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include <TColStd_SequenceOfAsciiString.hxx>
|
#include <TColStd_SequenceOfAsciiString.hxx>
|
||||||
#include <NCollection_Vector.hxx>
|
#include <NCollection_Vector.hxx>
|
||||||
|
|
||||||
static int init = 0;
|
static int THE_Interface_Category_init = 0;
|
||||||
static Standard_CString unspec = "unspecified";
|
static Standard_CString unspec = "unspecified";
|
||||||
|
|
||||||
static Standard_Mutex gMapTypesMutex;
|
static Standard_Mutex gMapTypesMutex;
|
||||||
@ -111,16 +111,21 @@ void Interface_Category::Init ()
|
|||||||
gMapTypesMutex.Lock();
|
gMapTypesMutex.Lock();
|
||||||
if ( !gMapTypesInit )
|
if ( !gMapTypesInit )
|
||||||
{
|
{
|
||||||
if (init) return; init = 1;
|
if (THE_Interface_Category_init)
|
||||||
init = Interface_Category::AddCategory ("Shape");
|
{
|
||||||
init = Interface_Category::AddCategory ("Drawing");
|
return;
|
||||||
init = Interface_Category::AddCategory ("Structure");
|
}
|
||||||
init = Interface_Category::AddCategory ("Description");
|
|
||||||
init = Interface_Category::AddCategory ("Auxiliary");
|
THE_Interface_Category_init = 1;
|
||||||
init = Interface_Category::AddCategory ("Professional");
|
Interface_Category::AddCategory ("Shape");
|
||||||
init = Interface_Category::AddCategory ("FEA");
|
Interface_Category::AddCategory ("Drawing");
|
||||||
init = Interface_Category::AddCategory ("Kinematics");
|
Interface_Category::AddCategory ("Structure");
|
||||||
init = Interface_Category::AddCategory ("Piping");
|
Interface_Category::AddCategory ("Description");
|
||||||
|
Interface_Category::AddCategory ("Auxiliary");
|
||||||
|
Interface_Category::AddCategory ("Professional");
|
||||||
|
Interface_Category::AddCategory ("FEA");
|
||||||
|
Interface_Category::AddCategory ("Kinematics");
|
||||||
|
Interface_Category::AddCategory ("Piping");
|
||||||
|
|
||||||
gMapTypesInit = Standard_True;
|
gMapTypesInit = Standard_True;
|
||||||
}
|
}
|
||||||
|
@ -278,21 +278,64 @@ Interface_CheckStatus Interface_CheckIterator::Status () const
|
|||||||
Standard_Boolean Interface_CheckIterator::Complies
|
Standard_Boolean Interface_CheckIterator::Complies
|
||||||
(const Interface_CheckStatus stat) const
|
(const Interface_CheckStatus stat) const
|
||||||
{
|
{
|
||||||
Standard_Boolean res = Standard_False;
|
Standard_Boolean res = (stat == Interface_CheckNoFail);
|
||||||
if (stat == Interface_CheckNoFail) res = Standard_True;
|
Standard_Integer nb = thelist->Length();
|
||||||
Standard_Integer i, nb = thelist->Length();
|
for (Standard_Integer i = 1; i <= nb; ++i)
|
||||||
for (i = 1; i <= nb; i ++) {
|
{
|
||||||
const Handle(Interface_Check) ach = thelist->Value(i);
|
const Handle(Interface_Check) ach = thelist->Value(i);
|
||||||
Standard_Integer nbf = ach->NbFails(), nbw = ach->NbWarnings();
|
Standard_Integer nbf = ach->NbFails(), nbw = ach->NbWarnings();
|
||||||
switch (stat) {
|
switch (stat)
|
||||||
case Interface_CheckOK : if (nbf + nbw > 0) return Standard_False; break;
|
{
|
||||||
case Interface_CheckWarning : if (nbf > 0) return Standard_False;
|
case Interface_CheckOK:
|
||||||
if (nbw > 0) res = Standard_True; break;
|
{
|
||||||
case Interface_CheckFail : if (nbf > 0) return Standard_True; break;
|
if (nbf + nbw > 0)
|
||||||
case Interface_CheckAny : return Standard_True;
|
{
|
||||||
case Interface_CheckMessage : if (nbf + nbw > 0) return Standard_True; break;
|
return Standard_False;
|
||||||
case Interface_CheckNoFail : if (nbf > 0) return Standard_False; break;
|
}
|
||||||
default : break;
|
break;
|
||||||
|
}
|
||||||
|
case Interface_CheckWarning:
|
||||||
|
{
|
||||||
|
if (nbf > 0)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
if (nbw > 0)
|
||||||
|
{
|
||||||
|
res = Standard_True;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Interface_CheckFail:
|
||||||
|
{
|
||||||
|
if (nbf > 0)
|
||||||
|
{
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Interface_CheckAny:
|
||||||
|
{
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
case Interface_CheckMessage:
|
||||||
|
{
|
||||||
|
if (nbf + nbw > 0)
|
||||||
|
{
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Interface_CheckNoFail:
|
||||||
|
{
|
||||||
|
if (nbf > 0)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
@ -357,34 +357,64 @@ static const Standard_Real vtab[] =
|
|||||||
prem = MAXCHIF + 1; point = -1; // ligne[MAXCHIF+1] = '\0'; fin forcee
|
prem = MAXCHIF + 1; point = -1; // ligne[MAXCHIF+1] = '\0'; fin forcee
|
||||||
|
|
||||||
/* Analyse de la ligne (reputee representer un Flottant) */
|
/* Analyse de la ligne (reputee representer un Flottant) */
|
||||||
for (i = 0; ; i ++) { // critere d arret : cf '\0'
|
for (i = 0; ; i ++) // critere d arret : cf '\0'
|
||||||
|
{
|
||||||
const char& car = ligne[i];
|
const char& car = ligne[i];
|
||||||
/* critere d arret : ne pas l oublier, mais eviter de freiner le traitement
|
/* critere d arret : ne pas l oublier, mais eviter de freiner le traitement
|
||||||
DONC, une fois en fin, plus une fois pour 1er passage
|
DONC, une fois en fin, plus une fois pour 1er passage
|
||||||
if (car == '\0')
|
if (car == '\0')
|
||||||
{ if (point < 0) { point = i; jx = point - prem; }; break; } */
|
{ if (point < 0) { point = i; jx = point - prem; }; break; } */
|
||||||
|
|
||||||
if (prem > MAXCHIF) {
|
if (prem > MAXCHIF)
|
||||||
|
{
|
||||||
if (car == '0') continue;
|
if (car == '0') continue;
|
||||||
if (car == '.') { point = i; continue; }
|
if (car == '.') { point = i; continue; }
|
||||||
if (car == '+') continue;
|
if (car == '+') continue;
|
||||||
if (car == '-') { moins = 1; continue; }
|
if (car == '-') { moins = 1; continue; }
|
||||||
if (car == '\0')
|
if (car == '\0')
|
||||||
{ if (point < 0) { point = i; jx = point - prem; }; break; }
|
{
|
||||||
if (car < 33) continue;
|
if (point < 0)
|
||||||
|
{
|
||||||
|
point = i;
|
||||||
|
jx = point - prem;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (car < 33)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
prem = i;
|
prem = i;
|
||||||
if (point >= 0) jx = point - prem + 1;
|
if (point >= 0)
|
||||||
|
{
|
||||||
|
jx = point - prem + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (car > 48 && car <= 57)
|
if (car > 48 && car <= 57)
|
||||||
{ chiffre[j] = car - 48; jj = ++j; continue; } // j++ puis jj = j
|
{
|
||||||
|
chiffre[j] = car - 48;
|
||||||
|
jj = ++j; // j++ puis jj = j
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (car == '0') { chiffre[j] = 0; j ++; continue; }
|
if (car == '0') { chiffre[j] = 0; j ++; continue; }
|
||||||
if (car == '.') { point = i; jx = point - prem; continue; }
|
if (car == '.') { point = i; jx = point - prem; continue; }
|
||||||
if ((car & 94) == 68) { // prend : e E d D
|
if ((car & 94) == 68) { // prend : e E d D
|
||||||
je = i; exp = atoi(&ligne[i+1]); jx += exp;
|
je = i; exp = atoi(&ligne[i+1]); jx += exp;
|
||||||
if (exp < -100 || exp > 100) grexp = 1; break;
|
if (exp < -100 || exp > 100)
|
||||||
|
{
|
||||||
|
grexp = 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (car == '\0')
|
if (car == '\0')
|
||||||
{ if (point < 0) { point = i; jx = point - prem; }; break; }
|
{
|
||||||
|
if (point < 0)
|
||||||
|
{
|
||||||
|
point = i;
|
||||||
|
jx = point - prem;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interpretation : on decale le Point Decimal selon l Exposant
|
/* Interpretation : on decale le Point Decimal selon l Exposant
|
||||||
|
@ -21,11 +21,16 @@
|
|||||||
|
|
||||||
#include "../XSMessage/XSMessage_XSTEP_us.pxx"
|
#include "../XSMessage/XSMessage_XSTEP_us.pxx"
|
||||||
|
|
||||||
static int deja = 0;
|
static int THE_Interface_Static_deja = 0;
|
||||||
|
|
||||||
void Interface_Static::Standards ()
|
void Interface_Static::Standards ()
|
||||||
{
|
{
|
||||||
if (deja) return; deja = 1;
|
if (THE_Interface_Static_deja)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_Interface_Static_deja = 1;
|
||||||
|
|
||||||
// read precision
|
// read precision
|
||||||
//#74 rln 10.03.99 S4135: new values and default value
|
//#74 rln 10.03.99 S4135: new values and default value
|
||||||
|
@ -414,7 +414,9 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol,
|
|||||||
Seq.Append(gp_Pnt(LastV, RV2, 3));
|
Seq.Append(gp_Pnt(LastV, RV2, 3));
|
||||||
Standard_Integer i, j;
|
Standard_Integer i, j;
|
||||||
for(i = 1; i <= 3; i++)
|
for(i = 1; i <= 3; i++)
|
||||||
|
{
|
||||||
for(j = 1; j <= 4-i; j++)
|
for(j = 1; j <= 4-i; j++)
|
||||||
|
{
|
||||||
if(Seq(j).Y() < Seq(j+1).Y())
|
if(Seq(j).Y() < Seq(j+1).Y())
|
||||||
{
|
{
|
||||||
gp_Pnt swp;
|
gp_Pnt swp;
|
||||||
@ -422,39 +424,41 @@ static Standard_Boolean ExactBound(gp_Pnt& Sol,
|
|||||||
Seq.ChangeValue(j+1) = Seq.Value(j);
|
Seq.ChangeValue(j+1) = Seq.Value(j);
|
||||||
Seq.ChangeValue(j) = swp;
|
Seq.ChangeValue(j) = swp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
t = Sol.X();
|
t = Sol.X ();
|
||||||
t1 = Min(Sol.X(), NotSol);
|
t1 = Min (Sol.X (), NotSol);
|
||||||
t2 = Max(Sol.X(), NotSol);
|
t2 = Max (Sol.X (), NotSol);
|
||||||
|
|
||||||
Standard_Boolean isDone = Standard_False;
|
Standard_Boolean isDone = Standard_False;
|
||||||
while (!Seq.IsEmpty())
|
while (!Seq.IsEmpty ())
|
||||||
{
|
{
|
||||||
gp_Pnt P;
|
gp_Pnt P;
|
||||||
P = Seq.Last();
|
P = Seq.Last ();
|
||||||
Seq.Remove(Seq.Length());
|
Seq.Remove (Seq.Length ());
|
||||||
ProjLib_PrjResolve aPrjPS(Curve->Curve(),
|
ProjLib_PrjResolve aPrjPS (Curve->Curve (),
|
||||||
Surface->Surface(),
|
Surface->Surface (),
|
||||||
Standard_Integer(P.Z()));
|
Standard_Integer (P.Z ()));
|
||||||
if(Standard_Integer(P.Z()) == 2)
|
if (Standard_Integer (P.Z ()) == 2)
|
||||||
{
|
{
|
||||||
aPrjPS.Perform(t, P.X(), V0, gp_Pnt2d(Tol, TolV),
|
aPrjPS.Perform (t, P.X (), V0, gp_Pnt2d (Tol, TolV),
|
||||||
gp_Pnt2d(t1, Surface->FirstVParameter()),
|
gp_Pnt2d (t1, Surface->FirstVParameter ()),
|
||||||
gp_Pnt2d(t2, Surface->LastVParameter()), FuncTol);
|
gp_Pnt2d (t2, Surface->LastVParameter ()), FuncTol);
|
||||||
if(!aPrjPS.IsDone()) continue;
|
if (!aPrjPS.IsDone ()) continue;
|
||||||
POnS = aPrjPS.Solution();
|
POnS = aPrjPS.Solution ();
|
||||||
Sol = gp_Pnt(POnS.X(), P.X(), POnS.Y());
|
Sol = gp_Pnt (POnS.X (), P.X (), POnS.Y ());
|
||||||
isDone = Standard_True;
|
isDone = Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aPrjPS.Perform(t, U0, P.X(), gp_Pnt2d(Tol, TolU),
|
aPrjPS.Perform (t, U0, P.X (), gp_Pnt2d (Tol, TolU),
|
||||||
gp_Pnt2d(t1, Surface->FirstUParameter()),
|
gp_Pnt2d (t1, Surface->FirstUParameter ()),
|
||||||
gp_Pnt2d(t2, Surface->LastUParameter()), FuncTol);
|
gp_Pnt2d (t2, Surface->LastUParameter ()), FuncTol);
|
||||||
if(!aPrjPS.IsDone()) continue;
|
if (!aPrjPS.IsDone ()) continue;
|
||||||
POnS = aPrjPS.Solution();
|
POnS = aPrjPS.Solution ();
|
||||||
Sol = gp_Pnt(POnS.X(), POnS.Y(), P.X());
|
Sol = gp_Pnt (POnS.X (), POnS.Y (), P.X ());
|
||||||
isDone = Standard_True;
|
isDone = Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1011,14 +1015,17 @@ void ProjLib_CompProjectedCurve::Init()
|
|||||||
{
|
{
|
||||||
if(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() >=
|
if(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() >=
|
||||||
mySequence->Value(i+1)->Value(1).X())
|
mySequence->Value(i+1)->Value(1).X())
|
||||||
|
{
|
||||||
mySequence->ChangeValue(i+1)->ChangeValue(1).SetX(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() + 1.e-12);
|
mySequence->ChangeValue(i+1)->ChangeValue(1).SetX(mySequence->Value(i)->Value(mySequence->Value(i)->Length()).X() + 1.e-12);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 3. Computation of the maximum distance from each part of curve to surface
|
// 3. Computation of the maximum distance from each part of curve to surface
|
||||||
|
|
||||||
myMaxDistance = new TColStd_HArray1OfReal(1, myNbCurves);
|
myMaxDistance = new TColStd_HArray1OfReal(1, myNbCurves);
|
||||||
myMaxDistance->Init(0);
|
myMaxDistance->Init(0);
|
||||||
for(i = 1; i <= myNbCurves; i++)
|
for(i = 1; i <= myNbCurves; i++)
|
||||||
|
{
|
||||||
for(j = 1; j <= mySequence->Value(i)->Length(); j++)
|
for(j = 1; j <= mySequence->Value(i)->Length(); j++)
|
||||||
{
|
{
|
||||||
gp_Pnt POnC, POnS, aTriple;
|
gp_Pnt POnC, POnS, aTriple;
|
||||||
@ -1028,16 +1035,18 @@ void ProjLib_CompProjectedCurve::Init()
|
|||||||
mySurface->D0(aTriple.Y(), aTriple.Z(), POnS);
|
mySurface->D0(aTriple.Y(), aTriple.Z(), POnS);
|
||||||
Distance = POnC.Distance(POnS);
|
Distance = POnC.Distance(POnS);
|
||||||
if (myMaxDistance->Value(i) < Distance)
|
if (myMaxDistance->Value(i) < Distance)
|
||||||
|
{
|
||||||
myMaxDistance->ChangeValue(i) = Distance;
|
myMaxDistance->ChangeValue(i) = Distance;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 4. Check the projection to be a single point
|
// 4. Check the projection to be a single point
|
||||||
|
|
||||||
gp_Pnt2d Pmoy, Pcurr, P;
|
gp_Pnt2d Pmoy, Pcurr, P;
|
||||||
Standard_Real AveU, AveV;
|
Standard_Real AveU, AveV;
|
||||||
mySnglPnts = new TColStd_HArray1OfBoolean(1, myNbCurves);
|
mySnglPnts = new TColStd_HArray1OfBoolean(1, myNbCurves);
|
||||||
for(i = 1; i <= myNbCurves; i++) mySnglPnts->SetValue(i, Standard_True);
|
mySnglPnts->Init (Standard_True);
|
||||||
|
|
||||||
for(i = 1; i <= myNbCurves; i++)
|
for(i = 1; i <= myNbCurves; i++)
|
||||||
{
|
{
|
||||||
@ -1067,10 +1076,10 @@ void ProjLib_CompProjectedCurve::Init()
|
|||||||
// 5. Check the projection to be an isoparametric curve of the surface
|
// 5. Check the projection to be an isoparametric curve of the surface
|
||||||
|
|
||||||
myUIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
|
myUIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
|
||||||
for(i = 1; i <= myNbCurves; i++) myUIso->SetValue(i, Standard_True);
|
myUIso->Init (Standard_True);
|
||||||
|
|
||||||
myVIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
|
myVIso = new TColStd_HArray1OfBoolean(1, myNbCurves);
|
||||||
for(i = 1; i <= myNbCurves; i++) myVIso->SetValue(i, Standard_True);
|
myVIso->Init (Standard_True);
|
||||||
|
|
||||||
for(i = 1; i <= myNbCurves; i++) {
|
for(i = 1; i <= myNbCurves; i++) {
|
||||||
if (IsSinglePnt(i, P)|| mySequence->Value(i)->Length() <=2) {
|
if (IsSinglePnt(i, P)|| mySequence->Value(i)->Length() <=2) {
|
||||||
@ -1522,14 +1531,18 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
// proccessing projection bounds
|
// proccessing projection bounds
|
||||||
BArr = new TColStd_HArray1OfReal(1, 2*myNbCurves);
|
BArr = new TColStd_HArray1OfReal(1, 2*myNbCurves);
|
||||||
for(i = 1; i <= myNbCurves; i++)
|
for(i = 1; i <= myNbCurves; i++)
|
||||||
|
{
|
||||||
Bounds(i, BArr->ChangeValue(2*i - 1), BArr->ChangeValue(2*i));
|
Bounds(i, BArr->ChangeValue(2*i - 1), BArr->ChangeValue(2*i));
|
||||||
|
}
|
||||||
|
|
||||||
// proccessing curve discontinuities
|
// proccessing curve discontinuities
|
||||||
if(NbIntCur > 1) {
|
if(NbIntCur > 1) {
|
||||||
CArr = new TColStd_HArray1OfReal(1, NbIntCur - 1);
|
CArr = new TColStd_HArray1OfReal(1, NbIntCur - 1);
|
||||||
for(i = 1; i <= CArr->Length(); i++)
|
for(i = 1; i <= CArr->Length(); i++)
|
||||||
|
{
|
||||||
CArr->ChangeValue(i) = CutPntsT(i + 1);
|
CArr->ChangeValue(i) = CutPntsT(i + 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// proccessing U-surface discontinuities
|
// proccessing U-surface discontinuities
|
||||||
TColStd_SequenceOfReal TUdisc;
|
TColStd_SequenceOfReal TUdisc;
|
||||||
@ -1537,7 +1550,9 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
for(k = 2; k <= NbIntSurU; k++) {
|
for(k = 2; k <= NbIntSurU; k++) {
|
||||||
// cout<<"CutPntsU("<<k<<") = "<<CutPntsU(k)<<endl;
|
// cout<<"CutPntsU("<<k<<") = "<<CutPntsU(k)<<endl;
|
||||||
for(i = 1; i <= myNbCurves; i++)
|
for(i = 1; i <= myNbCurves; i++)
|
||||||
for(j = 1; j < mySequence->Value(i)->Length(); j++) {
|
{
|
||||||
|
for(j = 1; j < mySequence->Value(i)->Length(); j++)
|
||||||
|
{
|
||||||
Ul = mySequence->Value(i)->Value(j).Y();
|
Ul = mySequence->Value(i)->Value(j).Y();
|
||||||
Ur = mySequence->Value(i)->Value(j + 1).Y();
|
Ur = mySequence->Value(i)->Value(j + 1).Y();
|
||||||
|
|
||||||
@ -1577,20 +1592,28 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for(i = 2; i <= TUdisc.Length(); i++)
|
for(i = 2; i <= TUdisc.Length(); i++)
|
||||||
|
{
|
||||||
if(TUdisc(i) - TUdisc(i-1) < Precision::PConfusion())
|
if(TUdisc(i) - TUdisc(i-1) < Precision::PConfusion())
|
||||||
|
{
|
||||||
TUdisc.Remove(i--);
|
TUdisc.Remove(i--);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(TUdisc.Length())
|
if(TUdisc.Length())
|
||||||
{
|
{
|
||||||
UArr = new TColStd_HArray1OfReal(1, TUdisc.Length());
|
UArr = new TColStd_HArray1OfReal(1, TUdisc.Length());
|
||||||
for(i = 1; i <= UArr->Length(); i++)
|
for(i = 1; i <= UArr->Length(); i++)
|
||||||
|
{
|
||||||
UArr->ChangeValue(i) = TUdisc(i);
|
UArr->ChangeValue(i) = TUdisc(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// proccessing V-surface discontinuities
|
// proccessing V-surface discontinuities
|
||||||
TColStd_SequenceOfReal TVdisc;
|
TColStd_SequenceOfReal TVdisc;
|
||||||
|
|
||||||
for(k = 2; k <= NbIntSurV; k++)
|
for(k = 2; k <= NbIntSurV; k++)
|
||||||
|
{
|
||||||
for(i = 1; i <= myNbCurves; i++)
|
for(i = 1; i <= myNbCurves; i++)
|
||||||
{
|
{
|
||||||
// cout<<"CutPntsV("<<k<<") = "<<CutPntsV(k)<<endl;
|
// cout<<"CutPntsV("<<k<<") = "<<CutPntsV(k)<<endl;
|
||||||
@ -1635,16 +1658,24 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(i = 2; i <= TVdisc.Length(); i++)
|
for(i = 2; i <= TVdisc.Length(); i++)
|
||||||
|
{
|
||||||
if(TVdisc(i) - TVdisc(i-1) < Precision::PConfusion())
|
if(TVdisc(i) - TVdisc(i-1) < Precision::PConfusion())
|
||||||
|
{
|
||||||
TVdisc.Remove(i--);
|
TVdisc.Remove(i--);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(TVdisc.Length())
|
if(TVdisc.Length())
|
||||||
{
|
{
|
||||||
VArr = new TColStd_HArray1OfReal(1, TVdisc.Length());
|
VArr = new TColStd_HArray1OfReal(1, TVdisc.Length());
|
||||||
for(i = 1; i <= VArr->Length(); i++)
|
for(i = 1; i <= VArr->Length(); i++)
|
||||||
|
{
|
||||||
VArr->ChangeValue(i) = TVdisc(i);
|
VArr->ChangeValue(i) = TVdisc(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fusion
|
// fusion
|
||||||
TColStd_SequenceOfReal Fusion;
|
TColStd_SequenceOfReal Fusion;
|
||||||
@ -1655,7 +1686,9 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
Fusion, Precision::PConfusion());
|
Fusion, Precision::PConfusion());
|
||||||
BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
|
BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
|
||||||
for(i = 1; i <= BArr->Length(); i++)
|
for(i = 1; i <= BArr->Length(); i++)
|
||||||
|
{
|
||||||
BArr->ChangeValue(i) = Fusion(i);
|
BArr->ChangeValue(i) = Fusion(i);
|
||||||
|
}
|
||||||
Fusion.Clear();
|
Fusion.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1666,7 +1699,9 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
Fusion, Precision::PConfusion());
|
Fusion, Precision::PConfusion());
|
||||||
BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
|
BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
|
||||||
for(i = 1; i <= BArr->Length(); i++)
|
for(i = 1; i <= BArr->Length(); i++)
|
||||||
|
{
|
||||||
BArr->ChangeValue(i) = Fusion(i);
|
BArr->ChangeValue(i) = Fusion(i);
|
||||||
|
}
|
||||||
Fusion.Clear();
|
Fusion.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1677,13 +1712,16 @@ void ProjLib_CompProjectedCurve::BuildIntervals(const GeomAbs_Shape S) const
|
|||||||
Fusion, Precision::PConfusion());
|
Fusion, Precision::PConfusion());
|
||||||
BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
|
BArr = new TColStd_HArray1OfReal(1, Fusion.Length());
|
||||||
for(i = 1; i <= BArr->Length(); i++)
|
for(i = 1; i <= BArr->Length(); i++)
|
||||||
|
{
|
||||||
BArr->ChangeValue(i) = Fusion(i);
|
BArr->ChangeValue(i) = Fusion(i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const_cast<ProjLib_CompProjectedCurve*>(this)->myTabInt = new TColStd_HArray1OfReal(1, BArr->Length());
|
const_cast<ProjLib_CompProjectedCurve*>(this)->myTabInt = new TColStd_HArray1OfReal(1, BArr->Length());
|
||||||
for(i = 1; i <= BArr->Length(); i++)
|
for(i = 1; i <= BArr->Length(); i++)
|
||||||
|
{
|
||||||
myTabInt->ChangeValue(i) = BArr->Value(i);
|
myTabInt->ChangeValue(i) = BArr->Value(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -2535,17 +2535,14 @@ static TopoDS_Compound AddTestStructure(int nCount_)
|
|||||||
|
|
||||||
static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
static Standard_Integer OCC7141 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
|
||||||
{
|
{
|
||||||
int nCount = 10;
|
if (argc != 2 && argc != 3)
|
||||||
|
|
||||||
if (argc > 3)
|
|
||||||
{
|
{
|
||||||
di << "Usage : " << argv[0] << " [nCount] path\n";
|
std::cout << "Usage : " << argv[0] << " [nCount] path\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc > 2)
|
int nCount = (argc > 2 ? Draw::Atoi(argv[1]) : 10);
|
||||||
nCount = Draw::Atoi(argv[1]);
|
TCollection_AsciiString aFilePath (argv[argc > 2 ? 2 : 1]);
|
||||||
TCollection_AsciiString aFilePath = argv[2];
|
|
||||||
STEPCAFControl_Writer writer;
|
STEPCAFControl_Writer writer;
|
||||||
Handle(TDocStd_Document) document;
|
Handle(TDocStd_Document) document;
|
||||||
document = new TDocStd_Document("Pace Test-StepExporter-");
|
document = new TDocStd_Document("Pace Test-StepExporter-");
|
||||||
|
@ -22,14 +22,18 @@
|
|||||||
#include <StepAP214_Protocol.hxx>
|
#include <StepAP214_Protocol.hxx>
|
||||||
#include <StepData_WriterLib.hxx>
|
#include <StepData_WriterLib.hxx>
|
||||||
|
|
||||||
static int init = 0;
|
static int THE_RWStepAP214_init = 0;
|
||||||
|
|
||||||
void RWStepAP214::Init()
|
void RWStepAP214::Init()
|
||||||
|
{
|
||||||
|
if (THE_RWStepAP214_init)
|
||||||
{
|
{
|
||||||
if (init) return; init = 1;
|
return;
|
||||||
|
}
|
||||||
|
THE_RWStepAP214_init = 1;
|
||||||
RWHeaderSection::Init();
|
RWHeaderSection::Init();
|
||||||
Handle(StepAP214_Protocol) proto = StepAP214::Protocol();
|
Handle(StepAP214_Protocol) proto = StepAP214::Protocol();
|
||||||
Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
|
Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
|
||||||
Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
||||||
StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
|
||||||
}
|
}
|
||||||
|
@ -3831,7 +3831,9 @@ Standard_Boolean STEPCAFControl_Writer::WriteDGTsAP242 (const Handle(XSControl_W
|
|||||||
TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aSecondShapeL.Value(shIt));
|
TopoDS_Shape aShape = XCAFDoc_ShapeTool::GetShape(aSecondShapeL.Value(shIt));
|
||||||
Handle(StepRepr_ShapeAspect) aSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU);
|
Handle(StepRepr_ShapeAspect) aSA = WriteShapeAspect(WS, aDimensionL, aShape, dummyRC, dummyGISU);
|
||||||
if (aCSA.IsNull() && !aSA.IsNull())
|
if (aCSA.IsNull() && !aSA.IsNull())
|
||||||
|
{
|
||||||
aCSA = new StepRepr_CompositeShapeAspect();
|
aCSA = new StepRepr_CompositeShapeAspect();
|
||||||
|
}
|
||||||
aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional());
|
aCSA->Init(aSA->Name(), aSA->Description(), aSA->OfShape(), aSA->ProductDefinitional());
|
||||||
if (!aSA.IsNull()) {
|
if (!aSA.IsNull()) {
|
||||||
Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship();
|
Handle(StepRepr_ShapeAspectRelationship) aSAR = new StepRepr_ShapeAspectRelationship();
|
||||||
|
@ -295,20 +295,29 @@ static Standard_Integer anaface
|
|||||||
// On va tacher de calculer les positions et les comparer
|
// On va tacher de calculer les positions et les comparer
|
||||||
gp_Pnt2d fuv,luv;
|
gp_Pnt2d fuv,luv;
|
||||||
if (Edge.Orientation() == TopAbs_FORWARD)
|
if (Edge.Orientation() == TopAbs_FORWARD)
|
||||||
{ TopExp::Vertices (Edge,fv,lv);
|
{
|
||||||
if (ia2d) BRep_Tool::UVPoints (Edge,Face,fuv,luv); }
|
TopExp::Vertices (Edge, fv, lv);
|
||||||
|
if (ia2d) BRep_Tool::UVPoints (Edge, Face, fuv, luv);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{ TopExp::Vertices (Edge,lv,fv);
|
{
|
||||||
if (ia2d) BRep_Tool::UVPoints (Edge,Face,luv,fuv); }
|
TopExp::Vertices (Edge, lv, fv);
|
||||||
|
if (ia2d) BRep_Tool::UVPoints (Edge, Face, luv, fuv);
|
||||||
|
}
|
||||||
gp_Pnt fp = BRep_Tool::Pnt (fv);
|
gp_Pnt fp = BRep_Tool::Pnt (fv);
|
||||||
gp_Pnt lp = BRep_Tool::Pnt (lv);
|
gp_Pnt lp = BRep_Tool::Pnt (lv);
|
||||||
gp_Pnt fxyz, lxyz;
|
gp_Pnt fxyz, lxyz;
|
||||||
if (ia2d) {
|
if (ia2d)
|
||||||
|
{
|
||||||
surface->D0 (fuv.X(),fuv.Y(),fxyz);
|
surface->D0 (fuv.X(),fuv.Y(),fxyz);
|
||||||
surface->D0 (luv.X(),luv.Y(),lxyz);
|
surface->D0 (luv.X(),luv.Y(),lxyz);
|
||||||
df3d = fp.Distance (fxyz); maxp3d = Max (maxp3d,df3d);
|
df3d = fp.Distance (fxyz); maxp3d = Max (maxp3d,df3d);
|
||||||
dl3d = lp.Distance (lxyz); maxp3d = Max (maxp3d,dl3d);
|
dl3d = lp.Distance (lxyz); maxp3d = Max (maxp3d,dl3d);
|
||||||
if (nbe > 1) duv = finuv.Distance (fuv); maxuv = Max (maxuv, duv);
|
if (nbe > 1)
|
||||||
|
{
|
||||||
|
duv = finuv.Distance (fuv);
|
||||||
|
maxuv = Max (maxuv, duv);
|
||||||
|
}
|
||||||
// et les min-max
|
// et les min-max
|
||||||
u1 = Min (fuv.X(),luv.X()); u2 = Max (fuv.X(),luv.X());
|
u1 = Min (fuv.X(),luv.X()); u2 = Max (fuv.X(),luv.X());
|
||||||
v1 = Min (fuv.Y(),luv.Y()); v2 = Max (fuv.Y(),luv.Y());
|
v1 = Min (fuv.Y(),luv.Y()); v2 = Max (fuv.Y(),luv.Y());
|
||||||
@ -975,7 +984,11 @@ static Standard_Integer checkedge(Draw_Interpretor& di, Standard_Integer argc, c
|
|||||||
void SWDRAW_ShapeAnalysis::InitCommands(Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeAnalysis::InitCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Integer initactor = 0;
|
static Standard_Integer initactor = 0;
|
||||||
if (initactor) return; initactor = 1;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
Standard_CString g = SWDRAW::GroupName();
|
Standard_CString g = SWDRAW::GroupName();
|
||||||
|
|
||||||
|
@ -470,7 +470,11 @@ static Standard_Integer convtorevol(Draw_Interpretor& di, Standard_Integer argc,
|
|||||||
void SWDRAW_ShapeCustom::InitCommands(Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeCustom::InitCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Integer initactor = 0;
|
static Standard_Integer initactor = 0;
|
||||||
if (initactor) return; initactor = 1;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
Standard_CString g = SWDRAW::GroupName();
|
Standard_CString g = SWDRAW::GroupName();
|
||||||
|
|
||||||
|
@ -69,8 +69,8 @@ static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer arg
|
|||||||
case 'e' : tse = TopAbs_EDGE; break;
|
case 'e' : tse = TopAbs_EDGE; break;
|
||||||
case 'w' : tse = TopAbs_WIRE; break;
|
case 'w' : tse = TopAbs_WIRE; break;
|
||||||
case 'f' : tse = TopAbs_FACE; break;
|
case 'f' : tse = TopAbs_FACE; break;
|
||||||
case 's' : tse = TopAbs_SHELL;
|
case 's' : tse = (argv[3][1] == 'o' ? TopAbs_SOLID : TopAbs_SHELL);
|
||||||
if (argv[3][1] == 'o') tse = TopAbs_SOLID; break;
|
break;
|
||||||
default : break;
|
default : break;
|
||||||
}
|
}
|
||||||
Standard_Boolean modexp = Standard_False;
|
Standard_Boolean modexp = Standard_False;
|
||||||
@ -98,7 +98,11 @@ static Standard_Integer sortcompound (Draw_Interpretor& di, Standard_Integer arg
|
|||||||
void SWDRAW_ShapeExtend::InitCommands(Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeExtend::InitCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Integer initactor = 0;
|
static Standard_Integer initactor = 0;
|
||||||
if (initactor) return; initactor = 1;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
Standard_CString g = SWDRAW::GroupName();
|
Standard_CString g = SWDRAW::GroupName();
|
||||||
theCommands.Add ("sortcompound","shape_entree shape_result type=v-e-w-f-s-so [mode=n-e-c-x]",
|
theCommands.Add ("sortcompound","shape_entree shape_result type=v-e-w-f-s-so [mode=n-e-c-x]",
|
||||||
|
@ -795,7 +795,11 @@ static Standard_Integer connectedges(Draw_Interpretor& di, Standard_Integer n, c
|
|||||||
void SWDRAW_ShapeFix::InitCommands(Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeFix::InitCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Integer initactor = 0;
|
static Standard_Integer initactor = 0;
|
||||||
if (initactor) return; initactor = 1;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
Standard_CString g = SWDRAW::GroupName();
|
Standard_CString g = SWDRAW::GroupName();
|
||||||
|
|
||||||
|
@ -64,7 +64,11 @@ static Standard_Integer ApplySequence(Draw_Interpretor& di,
|
|||||||
void SWDRAW_ShapeProcess::InitCommands(Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeProcess::InitCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Boolean initactor = 0;
|
static Standard_Boolean initactor = 0;
|
||||||
if (initactor) return; initactor = 1;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
ShapeProcess_OperLibrary::Init();
|
ShapeProcess_OperLibrary::Init();
|
||||||
|
|
||||||
|
@ -221,11 +221,14 @@ static Standard_Integer samerange (Draw_Interpretor& di, Standard_Integer argc,
|
|||||||
// ## DECLARATIONS ##
|
// ## DECLARATIONS ##
|
||||||
// ########################################
|
// ########################################
|
||||||
|
|
||||||
static int initactor = 0;
|
|
||||||
|
|
||||||
void SWDRAW_ShapeTool::InitCommands (Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeTool::InitCommands (Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
if (initactor) return; initactor = 1;
|
static int initactor = 0;
|
||||||
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
const char* g;
|
const char* g;
|
||||||
g = "DE: old";
|
g = "DE: old";
|
||||||
|
@ -1564,7 +1564,11 @@ Standard_Integer reshape(Draw_Interpretor& di,
|
|||||||
void SWDRAW_ShapeUpgrade::InitCommands(Draw_Interpretor& theCommands)
|
void SWDRAW_ShapeUpgrade::InitCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Integer initactor = 0;
|
static Standard_Integer initactor = 0;
|
||||||
if (initactor) return; initactor = 1;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = 1;
|
||||||
|
|
||||||
Standard_CString g = SWDRAW::GroupName(); // "Tests of DivideTool";
|
Standard_CString g = SWDRAW::GroupName(); // "Tests of DivideTool";
|
||||||
|
|
||||||
|
@ -84,10 +84,14 @@ static void MinMaxPnt
|
|||||||
Standard_Real x,y,z;
|
Standard_Real x,y,z;
|
||||||
p.Coord (x,y,z);
|
p.Coord (x,y,z);
|
||||||
if (nb < 1) { minx = maxx = x; miny = maxy = y; minz = maxz = z; }
|
if (nb < 1) { minx = maxx = x; miny = maxy = y; minz = maxz = z; }
|
||||||
else {
|
else
|
||||||
if (minx > x) minx = x; if (maxx < x) maxx = x;
|
{
|
||||||
if (miny > y) miny = y; if (maxy < y) maxy = y;
|
if (minx > x) minx = x;
|
||||||
if (minz > z) minz = z; if (maxz < z) maxz = z;
|
if (maxx < x) maxx = x;
|
||||||
|
if (miny > y) miny = y;
|
||||||
|
if (maxy < y) maxy = y;
|
||||||
|
if (minz > z) minz = z;
|
||||||
|
if (maxz < z) maxz = z;
|
||||||
}
|
}
|
||||||
nb ++;
|
nb ++;
|
||||||
}
|
}
|
||||||
|
@ -703,25 +703,31 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
|
|||||||
for( ; i < 4; i +=3)
|
for( ; i < 4; i +=3)
|
||||||
{
|
{
|
||||||
Standard_Integer j;
|
Standard_Integer j;
|
||||||
for ( j=0; j < myNbCashe; j++ )
|
for (j = 0; j < myNbCashe; ++j)
|
||||||
|
{
|
||||||
if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
|
if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
|
||||||
{
|
{
|
||||||
aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol,
|
aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol, theTol);
|
||||||
theTol);
|
|
||||||
aSavedPointNum = i;
|
aSavedPointNum = i;
|
||||||
aSavedPoint = myCashe2d[j];
|
aSavedPoint = myCashe2d[j];
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
isFromCashe = Standard_True;
|
isFromCashe = Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( j >= myNbCashe )
|
}
|
||||||
|
|
||||||
|
if (j >= myNbCashe)
|
||||||
|
{
|
||||||
aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
|
aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
|
||||||
|
}
|
||||||
|
|
||||||
Standard_Real aDist = mySurf->Gap();
|
Standard_Real aDist = mySurf->Gap();
|
||||||
Standard_Real aCurDist = aDist * aDist;
|
Standard_Real aCurDist = aDist * aDist;
|
||||||
if( aTol2 < aDist * aDist)
|
if (aTol2 < aDist * aDist)
|
||||||
|
{
|
||||||
aTol2 = aCurDist;
|
aTol2 = aCurDist;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( isPeriodicU || isPeriodicV )
|
if ( isPeriodicU || isPeriodicV )
|
||||||
{
|
{
|
||||||
@ -729,7 +735,8 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
|
|||||||
for(i = 1; i < 3; i++)
|
for(i = 1; i < 3; i++)
|
||||||
{
|
{
|
||||||
Standard_Integer j;
|
Standard_Integer j;
|
||||||
for ( j=0; j < myNbCashe; j++ )
|
for (j = 0; j < myNbCashe; ++j)
|
||||||
|
{
|
||||||
if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
|
if ( myCashe3d[j].SquareDistance (aP[i] ) < aTol2)
|
||||||
{
|
{
|
||||||
aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol, theTol);
|
aP2d[i] = mySurf->NextValueOfUV (myCashe2d[j], aP[i], theTol, theTol);
|
||||||
@ -737,14 +744,20 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
|
|||||||
aSavedPoint = myCashe2d[j];
|
aSavedPoint = myCashe2d[j];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( j >= myNbCashe )
|
}
|
||||||
|
|
||||||
|
if (j >= myNbCashe)
|
||||||
|
{
|
||||||
aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
|
aP2d[i] = mySurf->ValueOfUV(aP[i], theTol);
|
||||||
|
}
|
||||||
|
|
||||||
Standard_Real aDist = mySurf->Gap();
|
Standard_Real aDist = mySurf->Gap();
|
||||||
Standard_Real aCurDist = aDist * aDist;
|
Standard_Real aCurDist = aDist * aDist;
|
||||||
if( aTol2 < aDist * aDist)
|
if (aTol2 < aDist * aDist)
|
||||||
|
{
|
||||||
aTol2 = aCurDist;
|
aTol2 = aCurDist;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isPeriodicU)
|
if (isPeriodicU)
|
||||||
{
|
{
|
||||||
@ -1049,18 +1062,23 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
|
|||||||
{
|
{
|
||||||
//:q9 abv 23 Mar 99: use cashe as 1st approach
|
//:q9 abv 23 Mar 99: use cashe as 1st approach
|
||||||
Standard_Integer j; // svv #1
|
Standard_Integer j; // svv #1
|
||||||
for ( j=0; j < myNbCashe; j++ )
|
for (j = 0; j < myNbCashe; ++j)
|
||||||
|
{
|
||||||
if ( myCashe3d[j].SquareDistance ( p3d ) < myPreci*myPreci )
|
if ( myCashe3d[j].SquareDistance ( p3d ) < myPreci*myPreci )
|
||||||
{
|
{
|
||||||
p2d = mySurf->NextValueOfUV (myCashe2d[j], p3d, myPreci,
|
p2d = mySurf->NextValueOfUV (myCashe2d[j], p3d, myPreci, Precision::Confusion()+gap);
|
||||||
Precision::Confusion()+gap);
|
if (i == 1)
|
||||||
if (i == 1) {
|
{
|
||||||
isFromCashe = Standard_True;
|
isFromCashe = Standard_True;
|
||||||
aSavedPoint = myCashe2d[j];
|
aSavedPoint = myCashe2d[j];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( j >= myNbCashe ) p2d = mySurf->ValueOfUV(p3d, myPreci);
|
}
|
||||||
|
if (j >= myNbCashe)
|
||||||
|
{
|
||||||
|
p2d = mySurf->ValueOfUV(p3d, myPreci);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -689,32 +689,44 @@ void ShapeUpgrade_WireDivide::Perform ()
|
|||||||
if(!theNewCurve3d.IsNull())
|
if(!theNewCurve3d.IsNull())
|
||||||
sbe.SetRange3d(newEdge,f3d,l3d);
|
sbe.SetRange3d(newEdge,f3d,l3d);
|
||||||
if(!theNewPCurve1.IsNull())
|
if(!theNewPCurve1.IsNull())
|
||||||
|
{
|
||||||
B.Range ( newEdge, myFace, f2d, l2d);
|
B.Range ( newEdge, myFace, f2d, l2d);
|
||||||
|
}
|
||||||
if((!wasSR || !srNew)&&!BRep_Tool::Degenerated(newEdge) )
|
if((!wasSR || !srNew)&&!BRep_Tool::Degenerated(newEdge) )
|
||||||
|
{
|
||||||
B.SameRange(newEdge, Standard_False);
|
B.SameRange(newEdge, Standard_False);
|
||||||
|
|
||||||
//addition NM vertices to new edges
|
|
||||||
Standard_Real afpar = (myEdgeDivide->HasCurve3d() ? f3d : f2d);
|
|
||||||
|
|
||||||
Standard_Real alpar = (myEdgeDivide->HasCurve3d() ? l3d: l2d);
|
|
||||||
Standard_Integer n =1;
|
|
||||||
for( ; n <= aSeqParNM.Length(); n++) {
|
|
||||||
Standard_Real apar = aSeqParNM.Value(n);
|
|
||||||
TopoDS_Vertex aVold = TopoDS::Vertex(aSeqNMVertices.Value(n));
|
|
||||||
TopoDS_Vertex aNMVer =ShapeAnalysis_TransferParametersProj::CopyNMVertex(aVold,newEdge,E);
|
|
||||||
Context()->Replace(aVold,aNMVer);
|
|
||||||
if(fabs(apar - afpar) <= Precision::PConfusion())
|
|
||||||
Context()->Replace(aNMVer,V1);
|
|
||||||
else if(fabs(apar - alpar) <= Precision::PConfusion())
|
|
||||||
Context()->Replace(aNMVer,V);
|
|
||||||
else if( apar > afpar && apar <alpar)
|
|
||||||
B.Add (newEdge,aNMVer);
|
|
||||||
else continue;
|
|
||||||
aSeqNMVertices.Remove(n);
|
|
||||||
aSeqParNM.Remove(n);
|
|
||||||
n--;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//addition NM vertices to new edges
|
||||||
|
Standard_Real afpar = (myEdgeDivide->HasCurve3d () ? f3d : f2d);
|
||||||
|
Standard_Real alpar = (myEdgeDivide->HasCurve3d () ? l3d : l2d);
|
||||||
|
for (Standard_Integer n = 1; n <= aSeqParNM.Length (); ++n)
|
||||||
|
{
|
||||||
|
Standard_Real apar = aSeqParNM.Value (n);
|
||||||
|
TopoDS_Vertex aVold = TopoDS::Vertex (aSeqNMVertices.Value (n));
|
||||||
|
TopoDS_Vertex aNMVer = ShapeAnalysis_TransferParametersProj::CopyNMVertex (aVold, newEdge, E);
|
||||||
|
Context ()->Replace (aVold, aNMVer);
|
||||||
|
if (fabs (apar - afpar) <= Precision::PConfusion ())
|
||||||
|
{
|
||||||
|
Context ()->Replace (aNMVer, V1);
|
||||||
|
}
|
||||||
|
else if (fabs (apar - alpar) <= Precision::PConfusion ())
|
||||||
|
{
|
||||||
|
Context ()->Replace (aNMVer, V);
|
||||||
|
}
|
||||||
|
else if (apar > afpar && apar < alpar)
|
||||||
|
{
|
||||||
|
B.Add (newEdge, aNMVer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
aSeqNMVertices.Remove (n);
|
||||||
|
aSeqParNM.Remove (n);
|
||||||
|
n--;
|
||||||
|
}
|
||||||
|
|
||||||
// if (ShapeUpgrade::Debug()) cout <<"... New Edge "
|
// if (ShapeUpgrade::Debug()) cout <<"... New Edge "
|
||||||
// <<(void*) &(*newEdge.TShape())<<" on vertices "
|
// <<(void*) &(*newEdge.TShape())<<" on vertices "
|
||||||
|
@ -750,10 +750,9 @@ static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERI
|
|||||||
#include <StepVisual_CameraModelD3MultiClippingUnion.hxx>
|
#include <StepVisual_CameraModelD3MultiClippingUnion.hxx>
|
||||||
#include <StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
|
#include <StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
|
||||||
|
|
||||||
static int init = 0;
|
static int THE_StepAP214_Protocol_init = 0;
|
||||||
static Interface_DataMapOfTransientInteger types(800);
|
static Interface_DataMapOfTransientInteger types(800);
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : StepAP214_Protocol
|
//function : StepAP214_Protocol
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -761,7 +760,11 @@ static Interface_DataMapOfTransientInteger types(800);
|
|||||||
|
|
||||||
StepAP214_Protocol::StepAP214_Protocol ()
|
StepAP214_Protocol::StepAP214_Protocol ()
|
||||||
{
|
{
|
||||||
if (init) return; init = 1;
|
if (THE_StepAP214_Protocol_init)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
THE_StepAP214_Protocol_init = 1;
|
||||||
|
|
||||||
types.Bind (STANDARD_TYPE(StepBasic_Address), 1);
|
types.Bind (STANDARD_TYPE(StepBasic_Address), 1);
|
||||||
types.Bind (STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation), 2);
|
types.Bind (STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation), 2);
|
||||||
|
@ -26,12 +26,16 @@
|
|||||||
|
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(StepSelect_Activator,IFSelect_Activator)
|
IMPLEMENT_STANDARD_RTTIEXT(StepSelect_Activator,IFSelect_Activator)
|
||||||
|
|
||||||
static int initActivator = 0;
|
static int THE_StepSelect_Activator_initActivator = 0;
|
||||||
|
|
||||||
|
|
||||||
StepSelect_Activator::StepSelect_Activator ()
|
StepSelect_Activator::StepSelect_Activator ()
|
||||||
{
|
{
|
||||||
if (initActivator) return; initActivator = 1;
|
if (THE_StepSelect_Activator_initActivator)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_StepSelect_Activator_initActivator = 1;
|
||||||
// Add ( 0,"load");
|
// Add ( 0,"load");
|
||||||
// Add ( 0,"loadstep"); // homonyme
|
// Add ( 0,"loadstep"); // homonyme
|
||||||
// Add ( 1,"entity");
|
// Add ( 1,"entity");
|
||||||
|
@ -458,9 +458,12 @@ static Standard_Integer getChild (Draw_Interpretor& di, Standard_Integer argc, c
|
|||||||
|
|
||||||
void TObjDRAW::Init(Draw_Interpretor& di)
|
void TObjDRAW::Init(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
// General commands
|
// General commands
|
||||||
|
@ -1827,7 +1827,10 @@ void TPrsStd_ConstraintTools::ComputeOffset (const Handle(TDataXtd_Constraint)&
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_planar)
|
if (is_planar)
|
||||||
|
{
|
||||||
ais->SetCustomPlane (aplane->Pln());
|
ais->SetCustomPlane (aplane->Pln());
|
||||||
|
}
|
||||||
|
|
||||||
anAIS = ais;
|
anAIS = ais;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -949,14 +949,19 @@ void TopOpeBRepBuild_Builder1::GFillEdgeSameDomWES(const TopoDS_Shape& EOR,
|
|||||||
aN1.Reverse();
|
aN1.Reverse();
|
||||||
scalarPr = aBiN*aN1;
|
scalarPr = aBiN*aN1;
|
||||||
|
|
||||||
if(fabs(scalarPr) <= 1e-10) {//try to step inside
|
if (fabs (scalarPr) <= 1e-10) //try to step inside
|
||||||
TopOpeBRepBuild_Tools::GetNormalInNearestPoint(TopoDS::Face(mySDFaceToFill), aSplitP, aN1);
|
{
|
||||||
if(mySDFaceToFill.Orientation() == TopAbs_REVERSED)
|
TopOpeBRepBuild_Tools::GetNormalInNearestPoint (TopoDS::Face (mySDFaceToFill), aSplitP, aN1);
|
||||||
aN1.Reverse();
|
if (mySDFaceToFill.Orientation () == TopAbs_REVERSED)
|
||||||
|
{
|
||||||
|
aN1.Reverse ();
|
||||||
|
}
|
||||||
scalarPr = aBiN*aN1;
|
scalarPr = aBiN*aN1;
|
||||||
if(fabs(scalarPr) <= 1e-10) // this can not be
|
if (fabs (scalarPr) <= 1e-10) // this can not be
|
||||||
|
{
|
||||||
keep = (TB == TopAbs_IN); //just to do something
|
keep = (TB == TopAbs_IN); //just to do something
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TopAbs_State aPartState = (scalarPr > 0) ? TopAbs_IN : TopAbs_OUT;
|
TopAbs_State aPartState = (scalarPr > 0) ? TopAbs_IN : TopAbs_OUT;
|
||||||
|
|
||||||
|
@ -303,20 +303,24 @@ void TopOpeBRepBuild_GTopo::Dump(Standard_OStream& OS,
|
|||||||
|
|
||||||
if (myReverseForce) OS<<"reverse value : "<<myReverseValue<<endl;
|
if (myReverseForce) OS<<"reverse value : "<<myReverseValue<<endl;
|
||||||
|
|
||||||
if(s) OS<<s; OS<<"\\ I N O";
|
if(s) OS<<s;
|
||||||
|
OS<<"\\ I N O";
|
||||||
OS<<endl;
|
OS<<endl;
|
||||||
|
|
||||||
if(s) OS<<s; OS<<"I ";
|
if(s) OS<<s;
|
||||||
|
OS<<"I ";
|
||||||
DumpVal(OS,TopAbs_IN,TopAbs_IN); OS<<" ";
|
DumpVal(OS,TopAbs_IN,TopAbs_IN); OS<<" ";
|
||||||
DumpVal(OS,TopAbs_IN,TopAbs_ON); OS<<" ";
|
DumpVal(OS,TopAbs_IN,TopAbs_ON); OS<<" ";
|
||||||
DumpVal(OS,TopAbs_IN,TopAbs_OUT); OS<<endl;
|
DumpVal(OS,TopAbs_IN,TopAbs_OUT); OS<<endl;
|
||||||
|
|
||||||
if(s) OS<<s; OS<<"N ";
|
if(s) OS<<s;
|
||||||
|
OS<<"N ";
|
||||||
DumpVal(OS,TopAbs_ON,TopAbs_IN); OS<<" ";
|
DumpVal(OS,TopAbs_ON,TopAbs_IN); OS<<" ";
|
||||||
DumpVal(OS,TopAbs_ON,TopAbs_ON); OS<<" ";
|
DumpVal(OS,TopAbs_ON,TopAbs_ON); OS<<" ";
|
||||||
DumpVal(OS,TopAbs_ON,TopAbs_OUT); OS<<endl;
|
DumpVal(OS,TopAbs_ON,TopAbs_OUT); OS<<endl;
|
||||||
|
|
||||||
if(s) OS<<s; OS<<"O ";
|
if(s) OS<<s;
|
||||||
|
OS<<"O ";
|
||||||
DumpVal(OS,TopAbs_OUT,TopAbs_IN); OS<<" ";
|
DumpVal(OS,TopAbs_OUT,TopAbs_IN); OS<<" ";
|
||||||
DumpVal(OS,TopAbs_OUT,TopAbs_ON); OS<<" ";
|
DumpVal(OS,TopAbs_OUT,TopAbs_ON); OS<<" ";
|
||||||
DumpVal(OS,TopAbs_OUT,TopAbs_OUT); OS<<endl;
|
DumpVal(OS,TopAbs_OUT,TopAbs_OUT); OS<<endl;
|
||||||
|
@ -123,9 +123,20 @@ Standard_EXPORT void FDSCNX_Prepare(const TopoDS_Shape& /*S1*/,
|
|||||||
// BDS.Shape(e);
|
// BDS.Shape(e);
|
||||||
// Standard_Boolean se = BDS.IsSectionEdge(TopoDS::Edge(e)); if (!se) continue;
|
// Standard_Boolean se = BDS.IsSectionEdge(TopoDS::Edge(e)); if (!se) continue;
|
||||||
Standard_Boolean hs = BDS.HasShape(TopoDS::Edge(e)); if (!hs) continue;
|
Standard_Boolean hs = BDS.HasShape(TopoDS::Edge(e)); if (!hs) continue;
|
||||||
TopTools_ListOfShape thelist, thelist1;
|
|
||||||
if (!fle.IsBound(f)) fle.Bind(f, thelist); fle.ChangeFind(f).Append(e);
|
TopTools_ListOfShape* aListFle = fle.ChangeSeek (f);
|
||||||
if (!elf.IsBound(e)) elf.Bind(e, thelist1); elf.ChangeFind(e).Append(f);
|
if (aListFle == NULL)
|
||||||
|
{
|
||||||
|
aListFle = fle.Bound (f, TopTools_ListOfShape());
|
||||||
|
}
|
||||||
|
aListFle->Append(e);
|
||||||
|
|
||||||
|
TopTools_ListOfShape* aListElf = elf.ChangeSeek (e);
|
||||||
|
if (aListElf == NULL)
|
||||||
|
{
|
||||||
|
aListElf = elf.Bound (e, TopTools_ListOfShape());
|
||||||
|
}
|
||||||
|
aListElf->Append(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GLOBAL_FDSCNX_prepared = Standard_True;
|
GLOBAL_FDSCNX_prepared = Standard_True;
|
||||||
@ -133,15 +144,31 @@ Standard_EXPORT void FDSCNX_Prepare(const TopoDS_Shape& /*S1*/,
|
|||||||
|
|
||||||
Standard_EXPORT Standard_Boolean FDSCNX_HasConnexFace(const TopoDS_Shape& S,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
|
Standard_EXPORT Standard_Boolean FDSCNX_HasConnexFace(const TopoDS_Shape& S,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
|
||||||
{
|
{
|
||||||
if (HDS.IsNull()) return Standard_False; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
if (HDS.IsNull())
|
||||||
const TopAbs_ShapeEnum t = S.ShapeType(); if (t != TopAbs_FACE && t != TopAbs_EDGE) return Standard_False;
|
{
|
||||||
const Standard_Integer rs = BDS.AncestorRank(S); if (rs == 0) return Standard_False;
|
return Standard_False;
|
||||||
TopTools_DataMapOfShapeListOfShape* pelf = (rs == 1) ? GLOBAL_elf1 : GLOBAL_elf2; if (pelf == NULL) return Standard_False;
|
}
|
||||||
TopTools_DataMapOfShapeListOfShape& fle = *GLOBAL_fle;
|
|
||||||
TopTools_DataMapOfShapeListOfShape& elf = *pelf;
|
const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
||||||
Standard_Boolean has = Standard_False;
|
const TopAbs_ShapeEnum t = S.ShapeType();
|
||||||
if (t == TopAbs_EDGE) has = elf.IsBound(S);
|
if (t != TopAbs_FACE
|
||||||
else if (t == TopAbs_FACE) has = fle.IsBound(S);
|
&& t != TopAbs_EDGE)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
const Standard_Integer rs = BDS.AncestorRank(S);
|
||||||
|
if (rs == 0)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
TopTools_DataMapOfShapeListOfShape* pelf = (rs == 1) ? GLOBAL_elf1 : GLOBAL_elf2;
|
||||||
|
if (pelf == NULL)
|
||||||
|
{
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
Standard_Boolean has = (t == TopAbs_EDGE ? pelf : GLOBAL_fle)->IsBound(S);
|
||||||
return has;
|
return has;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,23 +177,38 @@ Standard_EXPORT void FDSCNX_FaceEdgeConnexFaces(const TopoDS_Shape& F,const Topo
|
|||||||
LF.Clear();
|
LF.Clear();
|
||||||
// verifier que E est une arete de connexite de F
|
// verifier que E est une arete de connexite de F
|
||||||
Standard_Boolean EofF = Standard_False;
|
Standard_Boolean EofF = Standard_False;
|
||||||
const TopTools_ListOfShape& loe = FDSCNX_EdgeConnexitySameShape(F,HDS); if (loe.IsEmpty()) return;
|
const TopTools_ListOfShape& loe = FDSCNX_EdgeConnexitySameShape(F,HDS);
|
||||||
for (TopTools_ListIteratorOfListOfShape i(loe);i.More();i.Next()) {
|
if (loe.IsEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (TopTools_ListIteratorOfListOfShape i(loe);i.More();i.Next())
|
||||||
|
{
|
||||||
const TopoDS_Shape& e = i.Value();
|
const TopoDS_Shape& e = i.Value();
|
||||||
// HDS->Shape(e);
|
// HDS->Shape(e);
|
||||||
Standard_Boolean b = e.IsSame(E);
|
Standard_Boolean b = e.IsSame(E);
|
||||||
if (b) {
|
if (b)
|
||||||
|
{
|
||||||
EofF=Standard_True;
|
EofF=Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!EofF) return;
|
if (!EofF)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const TopTools_ListOfShape& lof = FDSCNX_EdgeConnexitySameShape(E,HDS); if (lof.IsEmpty()) return;
|
const TopTools_ListOfShape& lof = FDSCNX_EdgeConnexitySameShape(E,HDS);
|
||||||
for (TopTools_ListIteratorOfListOfShape it(lof);it.More();it.Next()) {
|
if (lof.IsEmpty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (TopTools_ListIteratorOfListOfShape it(lof);it.More();it.Next())
|
||||||
|
{
|
||||||
const TopoDS_Shape& f = it.Value();
|
const TopoDS_Shape& f = it.Value();
|
||||||
Standard_Boolean b = f.IsSame(F);
|
Standard_Boolean b = f.IsSame(F);
|
||||||
if (!b) {
|
if (!b)
|
||||||
|
{
|
||||||
LF.Append(f);
|
LF.Append(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,50 +216,114 @@ Standard_EXPORT void FDSCNX_FaceEdgeConnexFaces(const TopoDS_Shape& F,const Topo
|
|||||||
|
|
||||||
Standard_EXPORT void FDSCNX_DumpIndex(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer I)
|
Standard_EXPORT void FDSCNX_DumpIndex(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer I)
|
||||||
{
|
{
|
||||||
if (HDS.IsNull()) return; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
if (HDS.IsNull())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
||||||
Standard_Integer ns=BDS.NbShapes();
|
Standard_Integer ns=BDS.NbShapes();
|
||||||
if (I<1 || I>ns) return;
|
if (I<1 || I>ns)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Standard_Integer i=I;
|
Standard_Integer i=I;
|
||||||
const TopoDS_Shape& s=BDS.Shape(i);
|
const TopoDS_Shape& s=BDS.Shape(i);
|
||||||
TopAbs_ShapeEnum ts=s.ShapeType();
|
TopAbs_ShapeEnum ts=s.ShapeType();
|
||||||
const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
|
const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
|
||||||
if (ts == TopAbs_EDGE) {
|
if (ts == TopAbs_EDGE)
|
||||||
TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
|
{
|
||||||
for(;ils.More();ils.Next())cout<<BDS.Shape(ils.Value())<<" ";
|
TopTools_ListIteratorOfListOfShape ils(ls);
|
||||||
|
if (!ils.More())
|
||||||
|
{
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (ts == TopAbs_FACE) {
|
|
||||||
TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
|
for (; ils.More(); ils.Next())
|
||||||
for(;ils.More();ils.Next()) {
|
{
|
||||||
|
cout<<BDS.Shape(ils.Value())<<" ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ts == TopAbs_FACE)
|
||||||
|
{
|
||||||
|
TopTools_ListIteratorOfListOfShape ils(ls);
|
||||||
|
if (!ils.More())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; ils.More(); ils.Next())
|
||||||
|
{
|
||||||
const TopoDS_Shape& e=ils.Value();
|
const TopoDS_Shape& e=ils.Value();
|
||||||
TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
|
TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
|
||||||
TopTools_ListIteratorOfListOfShape ilf(lf);if(!ilf.More())continue;
|
TopTools_ListIteratorOfListOfShape ilf(lf);
|
||||||
for(;ilf.More();ilf.Next())cout<<BDS.Shape(ilf.Value())<<" ";
|
if (!ilf.More())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (; ilf.More(); ilf.Next())
|
||||||
|
{
|
||||||
|
cout<<BDS.Shape(ilf.Value())<<" ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer I)
|
Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer I)
|
||||||
{
|
{
|
||||||
if (HDS.IsNull()) return; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
if (HDS.IsNull())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
||||||
Standard_Integer ns=BDS.NbShapes();
|
Standard_Integer ns=BDS.NbShapes();
|
||||||
if (I<1 || I>ns) return;
|
if (I<1 || I>ns)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Standard_Integer i=I;
|
Standard_Integer i=I;
|
||||||
const TopoDS_Shape& s=BDS.Shape(i);Standard_Integer is=BDS.Shape(s);TopAbs_ShapeEnum ts=s.ShapeType();
|
const TopoDS_Shape& s=BDS.Shape(i);Standard_Integer is=BDS.Shape(s);TopAbs_ShapeEnum ts=s.ShapeType();
|
||||||
const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
|
const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
|
||||||
if (ts == TopAbs_EDGE) {
|
if (ts == TopAbs_EDGE)
|
||||||
TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
|
{
|
||||||
|
TopTools_ListIteratorOfListOfShape ils(ls);
|
||||||
|
if(!ils.More())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cout<<"clear;";
|
cout<<"clear;";
|
||||||
for(;ils.More();ils.Next())cout<<"tsee f "<<BDS.Shape(ils.Value())<<";";
|
for (; ils.More(); ils.Next())
|
||||||
|
{
|
||||||
|
cout<<"tsee f "<<BDS.Shape(ils.Value())<<";";
|
||||||
|
}
|
||||||
cout<<"tsee e "<<is<<";### edge "<<is<<" connexity"<<endl;
|
cout<<"tsee e "<<is<<";### edge "<<is<<" connexity"<<endl;
|
||||||
}
|
}
|
||||||
else if (ts == TopAbs_FACE) {
|
else if (ts == TopAbs_FACE)
|
||||||
TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
|
{
|
||||||
for(;ils.More();ils.Next()) {
|
TopTools_ListIteratorOfListOfShape ils(ls);
|
||||||
|
if (!ils.More())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(;ils.More();ils.Next())
|
||||||
|
{
|
||||||
const TopoDS_Shape& e=ils.Value();Standard_Integer ie=BDS.Shape(e);
|
const TopoDS_Shape& e=ils.Value();Standard_Integer ie=BDS.Shape(e);
|
||||||
TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
|
TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
|
||||||
TopTools_ListIteratorOfListOfShape ilf(lf);if(!ilf.More())continue;
|
TopTools_ListIteratorOfListOfShape ilf(lf);
|
||||||
|
if (!ilf.More())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
cout<<"clear;";cout<<"tsee f "<<is<<";";
|
cout<<"clear;";cout<<"tsee f "<<is<<";";
|
||||||
for(;ilf.More();ilf.Next())cout<<"tsee f "<<BDS.Shape(ilf.Value())<<";";
|
for (;ilf.More(); ilf.Next())
|
||||||
|
{
|
||||||
|
cout<<"tsee f "<<BDS.Shape(ilf.Value())<<";";
|
||||||
|
}
|
||||||
cout<<"tsee e "<<ie<<";### face "<<is<<" connexity"<<endl;
|
cout<<"tsee e "<<ie<<";### face "<<is<<" connexity"<<endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,7 +331,15 @@ Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS,
|
|||||||
|
|
||||||
Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
|
Standard_EXPORT void FDSCNX_Dump(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
|
||||||
{
|
{
|
||||||
if (HDS.IsNull()) return; const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
if (HDS.IsNull())
|
||||||
Standard_Integer i=1,ns=BDS.NbShapes();
|
{
|
||||||
for (i=1;i<=ns;i++) FDSCNX_Dump(HDS,i);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
|
||||||
|
Standard_Integer ns=BDS.NbShapes();
|
||||||
|
for (Standard_Integer i = 1;i<=ns;i++)
|
||||||
|
{
|
||||||
|
FDSCNX_Dump(HDS,i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1468,10 +1468,14 @@ void TopOpeBRepTool_TOOL::stuvF(const gp_Pnt2d& uv,const TopoDS_Face& f, Standa
|
|||||||
Standard_Real uf=bs.FirstUParameter(),ul=bs.LastUParameter(),vf=bs.FirstVParameter(),vl=bs.LastVParameter();
|
Standard_Real uf=bs.FirstUParameter(),ul=bs.LastUParameter(),vf=bs.FirstVParameter(),vl=bs.LastVParameter();
|
||||||
Standard_Boolean onuf = (Abs(uf-u)<tolu), onul = (Abs(ul-u)<tolu);
|
Standard_Boolean onuf = (Abs(uf-u)<tolu), onul = (Abs(ul-u)<tolu);
|
||||||
Standard_Boolean onvf = (Abs(vf-v)<tolv), onvl = (Abs(vl-v)<tolv);
|
Standard_Boolean onvf = (Abs(vf-v)<tolv), onvl = (Abs(vl-v)<tolv);
|
||||||
if (onuf) onU = ONFIRST; if (onul) onU = ONLAST;
|
if (onuf) onU = ONFIRST;
|
||||||
if (onvf) onV = ONFIRST; if (onvl) onV = ONLAST;
|
if (onul) onU = ONLAST;
|
||||||
if (u < (uf-tolu)) onU = INFFIRST; if (u > (ul+tolu)) onU = SUPLAST;
|
if (onvf) onV = ONFIRST;
|
||||||
if (v < (vf-tolv)) onV = INFFIRST; if (v > (vl+tolv)) onV = SUPLAST;
|
if (onvl) onV = ONLAST;
|
||||||
|
if (u < (uf-tolu)) onU = INFFIRST;
|
||||||
|
if (u > (ul+tolu)) onU = SUPLAST;
|
||||||
|
if (v < (vf-tolv)) onV = INFFIRST;
|
||||||
|
if (v > (vl+tolv)) onV = SUPLAST;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -351,10 +351,11 @@ public:
|
|||||||
(ViewerTest_myContexts, TCollection_AsciiString (myDriverName + "/Viewer"));
|
(ViewerTest_myContexts, TCollection_AsciiString (myDriverName + "/Viewer"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
myViewerName = ViewerTest_myContexts.Find2 (ViewerTest::GetAISContext());
|
myViewerName = ViewerTest_myContexts.Find2 (ViewerTest::GetAISContext());
|
||||||
|
}
|
||||||
|
|
||||||
myViewName = CreateName <Handle(V3d_View)>
|
myViewName = CreateName <Handle(V3d_View)> (ViewerTest_myViews, TCollection_AsciiString(myViewerName + "/View"));
|
||||||
(ViewerTest_myViews, TCollection_AsciiString(myViewerName + "/View"));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1082,13 +1083,15 @@ void ViewerTest::RemoveView (const TCollection_AsciiString& theViewName, const S
|
|||||||
if (ViewerTest_myViews.Extent() > 1)
|
if (ViewerTest_myViews.Extent() > 1)
|
||||||
{
|
{
|
||||||
TCollection_AsciiString aNewViewName;
|
TCollection_AsciiString aNewViewName;
|
||||||
for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)> :: Iterator
|
for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)>::Iterator anIter (ViewerTest_myViews);
|
||||||
anIter(ViewerTest_myViews); anIter.More(); anIter.Next())
|
anIter.More(); anIter.Next())
|
||||||
|
{
|
||||||
if (anIter.Key1() != theViewName)
|
if (anIter.Key1() != theViewName)
|
||||||
{
|
{
|
||||||
aNewViewName = anIter.Key1();
|
aNewViewName = anIter.Key1();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ActivateView (aNewViewName);
|
ActivateView (aNewViewName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1305,10 +1308,12 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const
|
|||||||
(( theArgsNb==1 ) || ( strcasecmp( theArgVec[1], "long" ) != 0 ));
|
(( theArgsNb==1 ) || ( strcasecmp( theArgVec[1], "long" ) != 0 ));
|
||||||
|
|
||||||
if (isTreeView)
|
if (isTreeView)
|
||||||
|
{
|
||||||
theDi << theArgVec[0] <<":\n";
|
theDi << theArgVec[0] <<":\n";
|
||||||
|
}
|
||||||
|
|
||||||
for (NCollection_DoubleMap <TCollection_AsciiString, Handle(Graphic3d_GraphicDriver)>::Iterator
|
for (NCollection_DoubleMap <TCollection_AsciiString, Handle(Graphic3d_GraphicDriver)>::Iterator aDriverIter (ViewerTest_myDrivers);
|
||||||
aDriverIter(ViewerTest_myDrivers); aDriverIter.More(); aDriverIter.Next())
|
aDriverIter.More(); aDriverIter.Next())
|
||||||
{
|
{
|
||||||
if (isTreeView)
|
if (isTreeView)
|
||||||
theDi << aDriverIter.Key1() << ":\n";
|
theDi << aDriverIter.Key1() << ":\n";
|
||||||
@ -1324,8 +1329,8 @@ static int VViewList (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const
|
|||||||
theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":\n";
|
theDi << " " << aContextName.Split(aDriverIter.Key1().Length() + 1) << ":\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)>::Iterator
|
for (NCollection_DoubleMap <TCollection_AsciiString, Handle(V3d_View)>::Iterator aViewIter (ViewerTest_myViews);
|
||||||
aViewIter(ViewerTest_myViews); aViewIter.More(); aViewIter.Next())
|
aViewIter.More(); aViewIter.Next())
|
||||||
{
|
{
|
||||||
if (aViewIter.Key1().Search(aContextIter.Key1()) != -1)
|
if (aViewIter.Key1().Search(aContextIter.Key1()) != -1)
|
||||||
{
|
{
|
||||||
|
@ -1097,9 +1097,12 @@ static Standard_Integer testDoc (Draw_Interpretor&,
|
|||||||
|
|
||||||
void XDEDRAW::Init(Draw_Interpretor& di)
|
void XDEDRAW::Init(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
// Load static variables for STEPCAF (ssv; 16.08.2012)
|
// Load static variables for STEPCAF (ssv; 16.08.2012)
|
||||||
STEPCAFControl_Controller::Init();
|
STEPCAFControl_Controller::Init();
|
||||||
|
@ -403,9 +403,12 @@ static Standard_Integer setStyledcolor (Draw_Interpretor& di, Standard_Integer a
|
|||||||
|
|
||||||
void XDEDRAW_Colors::InitCommands(Draw_Interpretor& di)
|
void XDEDRAW_Colors::InitCommands(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
// Work with colors
|
// Work with colors
|
||||||
|
@ -513,10 +513,14 @@ static Standard_Integer Expand (Draw_Interpretor& di, Standard_Integer argc, con
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XDEDRAW_Common::InitCommands(Draw_Interpretor& di) {
|
void XDEDRAW_Common::InitCommands(Draw_Interpretor& di)
|
||||||
|
{
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
Standard_CString g = "XDE translation commands";
|
Standard_CString g = "XDE translation commands";
|
||||||
|
|
||||||
|
@ -2513,10 +2513,12 @@ static Standard_Integer getGDTPresentation (Draw_Interpretor& di, Standard_Integ
|
|||||||
|
|
||||||
void XDEDRAW_GDTs::InitCommands(Draw_Interpretor& di)
|
void XDEDRAW_GDTs::InitCommands(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
Standard_CString g = "XDE G&DTs commands";
|
Standard_CString g = "XDE G&DTs commands";
|
||||||
|
|
||||||
|
@ -401,9 +401,12 @@ static Standard_Integer isVisible (Draw_Interpretor& di, Standard_Integer argc,
|
|||||||
|
|
||||||
void XDEDRAW_Layers::InitCommands(Draw_Interpretor& di)
|
void XDEDRAW_Layers::InitCommands(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
// Work with layers
|
// Work with layers
|
||||||
|
@ -906,9 +906,12 @@ static Standard_Integer SetMaterial (Draw_Interpretor& di, Standard_Integer argc
|
|||||||
|
|
||||||
void XDEDRAW_Props::InitCommands(Draw_Interpretor& di)
|
void XDEDRAW_Props::InitCommands(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
Standard_CString g = "XDE property's commands";
|
Standard_CString g = "XDE property's commands";
|
||||||
|
|
||||||
|
@ -847,9 +847,12 @@ static Standard_Integer updateAssemblies(Draw_Interpretor& di, Standard_Integer
|
|||||||
|
|
||||||
void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di)
|
void XDEDRAW_Shapes::InitCommands(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
//=====================================
|
//=====================================
|
||||||
// Work with shapes
|
// Work with shapes
|
||||||
|
@ -1307,10 +1307,12 @@ static Standard_Integer getClippingPlaneCapping(Draw_Interpretor& di, Standard_I
|
|||||||
|
|
||||||
void XDEDRAW_Views::InitCommands(Draw_Interpretor& di)
|
void XDEDRAW_Views::InitCommands(Draw_Interpretor& di)
|
||||||
{
|
{
|
||||||
|
|
||||||
static Standard_Boolean initactor = Standard_False;
|
static Standard_Boolean initactor = Standard_False;
|
||||||
if (initactor) return; initactor = Standard_True;
|
if (initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
initactor = Standard_True;
|
||||||
|
|
||||||
Standard_CString g = "XDE Views commands";
|
Standard_CString g = "XDE Views commands";
|
||||||
|
|
||||||
|
@ -702,8 +702,7 @@ static IFSelect_ReturnStatus XSControl_twrite
|
|||||||
// #### ####
|
// #### ####
|
||||||
// ######################################################################
|
// ######################################################################
|
||||||
|
|
||||||
static int initactor = 0;
|
static int THE_XSControl_FuncShape_initactor = 0;
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Init
|
//function : Init
|
||||||
@ -712,7 +711,12 @@ static int initactor = 0;
|
|||||||
|
|
||||||
void XSControl_FuncShape::Init ()
|
void XSControl_FuncShape::Init ()
|
||||||
{
|
{
|
||||||
if (initactor) return; initactor = 1;
|
if (THE_XSControl_FuncShape_initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_XSControl_FuncShape_initactor = 1;
|
||||||
|
|
||||||
IFSelect_Act::SetGroup("DE: General");
|
IFSelect_Act::SetGroup("DE: General");
|
||||||
|
|
||||||
@ -781,7 +785,11 @@ Standard_Integer XSControl_FuncShape::MoreShapes
|
|||||||
// liste
|
// liste
|
||||||
if (n1 <= n2 && n1 > 0) {
|
if (n1 <= n2 && n1 > 0) {
|
||||||
char nom[50], nomsh[60]; Standard_Integer nbsh = 0;
|
char nom[50], nomsh[60]; Standard_Integer nbsh = 0;
|
||||||
for (i = 0; i < paro; i ++) nom[i]=name[i]; nom[paro] = '\0';
|
for (i = 0; i < paro; i ++)
|
||||||
|
{
|
||||||
|
nom[i]=name[i];
|
||||||
|
}
|
||||||
|
nom[paro] = '\0';
|
||||||
sout<<"Shapes DRAW named : "<<nom<<n1<<" to "<<nom<<n2;
|
sout<<"Shapes DRAW named : "<<nom<<n1<<" to "<<nom<<n2;
|
||||||
for (i = n1; i <= n2 ; i ++) {
|
for (i = n1; i <= n2 ; i ++) {
|
||||||
const char* nomshh = &nomsh[0];
|
const char* nomshh = &nomsh[0];
|
||||||
|
@ -462,7 +462,7 @@ static IFSelect_ReturnStatus XSControl_settransfert(const Handle(IFSelect_Sessio
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int initactor = 0;
|
static int THE_XSControl_Functions_initactor = 0;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Init
|
//function : Init
|
||||||
@ -471,7 +471,12 @@ static int initactor = 0;
|
|||||||
|
|
||||||
void XSControl_Functions::Init ()
|
void XSControl_Functions::Init ()
|
||||||
{
|
{
|
||||||
if (initactor) return; initactor = 1;
|
if (THE_XSControl_Functions_initactor)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
THE_XSControl_Functions_initactor = 1;
|
||||||
IFSelect_Act::SetGroup("DE: General");
|
IFSelect_Act::SetGroup("DE: General");
|
||||||
|
|
||||||
IFSelect_Act::AddFunc ("xinit","[norm:string to change norme] reinitialises according to the norm",XSControl_xinit);
|
IFSelect_Act::AddFunc ("xinit","[norm:string to change norme] reinitialises according to the norm",XSControl_xinit);
|
||||||
|
@ -205,7 +205,11 @@ Standard_Boolean XSControl_WorkSession::PrintTransferStatus(const Standard_Inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
S<<"Transfer Write item n0."<<ne<<" of "<<max;
|
S<<"Transfer Write item n0."<<ne<<" of "<<max;
|
||||||
if (nr > 0) S<<" ** Transfer Root n0."<<ne; S<<endl;
|
if (nr > 0)
|
||||||
|
{
|
||||||
|
S<<" ** Transfer Root n0."<<ne;
|
||||||
|
}
|
||||||
|
S<<endl;
|
||||||
ent = FP->FindTransient(finder);
|
ent = FP->FindTransient(finder);
|
||||||
S<<" -> Type "<<finder->DynamicType()->Name()<<endl;
|
S<<" -> Type "<<finder->DynamicType()->Name()<<endl;
|
||||||
FP->StartTrace (binder,finder,0,0); // pb sout/S
|
FP->StartTrace (binder,finder,0,0); // pb sout/S
|
||||||
@ -240,7 +244,11 @@ Standard_Boolean XSControl_WorkSession::PrintTransferStatus(const Standard_Inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
S<<"Transfer Read item n0."<<ne<<" of "<<max;
|
S<<"Transfer Read item n0."<<ne<<" of "<<max;
|
||||||
if (nr > 0) S<<" ** Transfer Root n0."<<ne; S<<endl;
|
if (nr > 0)
|
||||||
|
{
|
||||||
|
S<<" ** Transfer Root n0."<<ne;
|
||||||
|
}
|
||||||
|
S<<endl;
|
||||||
if (!model.IsNull()) { S<<" In Model, Entity "; model->Print(ent,S); }
|
if (!model.IsNull()) { S<<" In Model, Entity "; model->Print(ent,S); }
|
||||||
binder = TP->MapItem (ne);
|
binder = TP->MapItem (ne);
|
||||||
S<<endl;
|
S<<endl;
|
||||||
|
@ -97,7 +97,11 @@ static Standard_Integer XSTEPDRAWRUN (Draw_Interpretor& , Standard_Integer argc,
|
|||||||
|
|
||||||
void XSDRAW::LoadDraw (Draw_Interpretor& theCommands)
|
void XSDRAW::LoadDraw (Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
if (dejald) return; dejald = 1;
|
if (dejald)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
dejald = 1;
|
||||||
// Pour tout faire d un coup : BRepTest & cie:
|
// Pour tout faire d un coup : BRepTest & cie:
|
||||||
LoadSession();
|
LoadSession();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user