mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
Compare commits
1 Commits
V7_8_1
...
CR23675_19
Author | SHA1 | Date | |
---|---|---|---|
|
c522da68b7 |
@@ -238,11 +238,13 @@ is
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
C1,C2 : Curve from Geom2d;
|
||||
F : Face from TopoDS;
|
||||
Tol : Real);
|
||||
Tol : Real;
|
||||
theContinuity : Shape from GeomAbs = GeomAbs_C0);
|
||||
---C++: inline
|
||||
|
||||
---Purpose: Sets pcurves for the edge on the closed face. If
|
||||
-- <C1> or <C2> is a null handle, remove any existing
|
||||
---Purpose: Sets pcurves (with theContinuity) for the edge on
|
||||
-- the closed face.
|
||||
-- If <C1> or <C2> is a null handle, remove any existing
|
||||
-- pcurve.
|
||||
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
@@ -254,7 +256,20 @@ is
|
||||
---Purpose: Sets a pcurve for the edge on the face.
|
||||
-- If <C> is a null handle, remove any existing pcurve.
|
||||
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
C : Curve from Geom2d;
|
||||
newSurf : Surface from Geom;
|
||||
newL : Location from TopLoc;
|
||||
theFace : Face from TopoDS;
|
||||
Tol : Real from Standard);
|
||||
|
||||
---Purpose: Sets a pcurve for the edge on the face.
|
||||
-- If <C> is a null handle, remove any existing pcurve.
|
||||
-- New edge will be in the face <theFace>, which
|
||||
-- based on surface newSurf. Old surface must be
|
||||
-- deleted from <theFace> later.
|
||||
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
C : Curve from Geom2d;
|
||||
S : Surface from Geom;
|
||||
L : Location from TopLoc;
|
||||
@@ -269,12 +284,28 @@ is
|
||||
C1,C2 : Curve from Geom2d;
|
||||
S : Surface from Geom;
|
||||
L : Location from TopLoc;
|
||||
Tol : Real);
|
||||
Tol : Real from Standard;
|
||||
theContinuity : Shape from GeomAbs = GeomAbs_C0);
|
||||
|
||||
---Purpose: Sets pcurves for the edge on the closed surface.
|
||||
-- <C1> or <C2> is a null handle, remove any existing
|
||||
---Purpose: Sets pcurves (with theContinuity) for the edge on the
|
||||
-- closed surface.
|
||||
-- If <C1> or <C2> is a null handle, remove any existing
|
||||
-- pcurve.
|
||||
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
C1,C2 : Curve from Geom2d;
|
||||
newSurf : Surface from Geom;
|
||||
newL : Location from TopLoc;
|
||||
theFace : Face from TopoDS;
|
||||
Tol : Real from Standard);
|
||||
|
||||
---Purpose: Sets pcurves for the edge on the closed surface.
|
||||
-- If <C1> or <C2> is a null handle, remove any
|
||||
-- existing pcurve.
|
||||
-- New edge will be in the face <theFace>, which
|
||||
-- based on surface newSurf. Old surface must be
|
||||
-- deleted from <theFace> later.
|
||||
|
||||
UpdateEdge(me; E : Edge from TopoDS;
|
||||
C1,C2 : Curve from Geom2d;
|
||||
S : Surface from Geom;
|
||||
|
@@ -233,7 +233,8 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
const Handle(Geom2d_Curve)& C1,
|
||||
const Handle(Geom2d_Curve)& C2,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L)
|
||||
const TopLoc_Location& L,
|
||||
const GeomAbs_Shape theContinuity = GeomAbs_C0)
|
||||
{
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
|
||||
Handle(BRep_CurveRepresentation) cr;
|
||||
@@ -259,7 +260,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
|
||||
if ( !C1.IsNull() && !C2.IsNull() ) {
|
||||
Handle(BRep_CurveOnClosedSurface) COS =
|
||||
new BRep_CurveOnClosedSurface(C1,C2,S,L,GeomAbs_C0);
|
||||
new BRep_CurveOnClosedSurface(C1,C2,S,L,theContinuity);
|
||||
// test if there is already a range
|
||||
if (!GC.IsNull()) {
|
||||
COS->SetRange(f,l);
|
||||
@@ -280,7 +281,8 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
const gp_Pnt2d& Pf,
|
||||
const gp_Pnt2d& Pl)
|
||||
const gp_Pnt2d& Pl,
|
||||
const GeomAbs_Shape theContinuity = GeomAbs_C0)
|
||||
{
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
|
||||
Handle(BRep_CurveRepresentation) cr;
|
||||
@@ -306,7 +308,7 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
|
||||
if ( !C1.IsNull() && !C2.IsNull() ) {
|
||||
Handle(BRep_CurveOnClosedSurface) COS =
|
||||
new BRep_CurveOnClosedSurface(C1,C2,S,L,GeomAbs_C0);
|
||||
new BRep_CurveOnClosedSurface(C1,C2,S,L,theContinuity);
|
||||
// test if there is already a range
|
||||
if (!GC.IsNull()) {
|
||||
COS->SetRange(f,l);
|
||||
@@ -343,6 +345,167 @@ static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateCurves
|
||||
//purpose : Insert two pcurves <C1,C2> on surface <newSurf> with
|
||||
// location <newL> in the list of curve representations <lcr>.
|
||||
// Deletes curves, which belong to <oldSurf> because <oldSurf>
|
||||
// will not be used later (presumably).
|
||||
// Remove the pcurves on <S> from <lcr> if <C1> or <C2> is null
|
||||
//=======================================================================
|
||||
|
||||
static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
const Handle(Geom2d_Curve)& C1,
|
||||
const Handle(Geom2d_Curve)& C2,
|
||||
const Handle(Geom_Surface)& newSurf,
|
||||
const TopLoc_Location& newL,
|
||||
const Handle(Geom_Surface)& oldSurf,
|
||||
const TopLoc_Location oldL,
|
||||
const GeomAbs_Shape theContinuity = GeomAbs_C0)
|
||||
{
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
|
||||
|
||||
Handle(BRep_GCurve) GC;
|
||||
Standard_Real aFirst,aLast;
|
||||
|
||||
Standard_Boolean rangeFound = Standard_False;
|
||||
Standard_Boolean isModified = Standard_False;
|
||||
|
||||
while (itcr.More())
|
||||
{
|
||||
Handle(BRep_CurveRepresentation) cr = itcr.Value();
|
||||
GC = Handle(BRep_GCurve)::DownCast(cr);
|
||||
|
||||
if ( !GC.IsNull() )
|
||||
{
|
||||
GC->Range(aFirst, aLast);
|
||||
|
||||
Standard_Boolean undefined = (Precision::IsPositiveInfinite(aLast) ||
|
||||
Precision::IsNegativeInfinite(aFirst));
|
||||
|
||||
if (!undefined)
|
||||
{
|
||||
rangeFound = Standard_True;
|
||||
}
|
||||
|
||||
Standard_Boolean cond = Standard_False;
|
||||
cond = cond || GC->IsCurveOnSurface(oldSurf, oldL);
|
||||
|
||||
if(!cond)
|
||||
{
|
||||
if(GC->IsCurveOnClosedSurface())
|
||||
{
|
||||
Handle(BRep_CurveOnSurface) aCS = Handle(BRep_CurveOnSurface)::DownCast(GC);
|
||||
cond = aCS->IsCurveOnSurface(oldSurf, oldL);
|
||||
}
|
||||
}
|
||||
|
||||
if (cond)
|
||||
{
|
||||
lcr.Remove(itcr);
|
||||
isModified = Standard_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
itcr.Next();
|
||||
}
|
||||
}//if ( !GC.IsNull() )
|
||||
else
|
||||
{
|
||||
if (cr->IsPolygonOnSurface(oldSurf, oldL))
|
||||
{
|
||||
lcr.Remove(itcr);
|
||||
isModified = Standard_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
itcr.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !C1.IsNull() && !C2.IsNull() ) {
|
||||
Handle(BRep_CurveOnClosedSurface) COS =
|
||||
new BRep_CurveOnClosedSurface(C1,C2,newSurf,newL,theContinuity);
|
||||
// test if there is already a range
|
||||
if (rangeFound) {
|
||||
COS->SetRange(aFirst,aLast);
|
||||
}
|
||||
lcr.Append(COS);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateCurves
|
||||
//purpose : Insert the pcurve <C> on surface <newSurf> with
|
||||
// location <newL> in the list of curve representations <lcr>.
|
||||
// Remove the pcurves on <oldSurf> from <lcr> if <C> is null
|
||||
//=======================================================================
|
||||
static void UpdateCurves(BRep_ListOfCurveRepresentation& lcr,
|
||||
const Handle(Geom2d_Curve)& C,
|
||||
const Handle(Geom_Surface)& newSurf,
|
||||
const TopLoc_Location& newL,
|
||||
const Handle(Geom_Surface)& oldSurf,
|
||||
const TopLoc_Location oldL)
|
||||
{
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(lcr);
|
||||
Handle(BRep_CurveRepresentation) cr;
|
||||
Handle(BRep_GCurve) GC;
|
||||
Standard_Real f,l;
|
||||
Standard_Boolean rangeFound = Standard_False;
|
||||
|
||||
// search the range of the 3d curve
|
||||
// and remove any existing representation
|
||||
|
||||
while (itcr.More()) {
|
||||
GC = Handle(BRep_GCurve)::DownCast(itcr.Value());
|
||||
if (!GC.IsNull()) {
|
||||
if (GC->IsCurve3D()) {
|
||||
GC->Range(f, l);
|
||||
Standard_Boolean undefined = (Precision::IsPositiveInfinite(l) ||
|
||||
Precision::IsNegativeInfinite(f));
|
||||
|
||||
if (!undefined) {
|
||||
rangeFound = Standard_True;
|
||||
}
|
||||
}
|
||||
if (GC->IsCurveOnSurface(oldSurf,oldL))
|
||||
{
|
||||
GC->Range(f, l);
|
||||
Standard_Boolean undefined = (Precision::IsPositiveInfinite(l) ||
|
||||
Precision::IsNegativeInfinite(f));
|
||||
|
||||
if (!undefined)
|
||||
{
|
||||
rangeFound = Standard_True;
|
||||
}
|
||||
|
||||
// remove existing curve on surface
|
||||
// cr is used to keep a reference on the curve representation
|
||||
// this avoid deleting it as its content may be referenced by C or S
|
||||
cr = itcr.Value();
|
||||
lcr.Remove(itcr);
|
||||
}
|
||||
else {
|
||||
itcr.Next();
|
||||
}
|
||||
}
|
||||
else {
|
||||
itcr.Next();
|
||||
}
|
||||
}
|
||||
|
||||
if (! C.IsNull()) {
|
||||
Handle(BRep_CurveOnSurface) COS = new BRep_CurveOnSurface(C,newSurf,newL);
|
||||
// test if there is already a range
|
||||
if (rangeFound) {
|
||||
COS->SetRange(f,l);
|
||||
}
|
||||
lcr.Append(COS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void UpdatePoints(BRep_ListOfPointRepresentation& lpr,
|
||||
Standard_Real p,
|
||||
const Handle(Geom_Curve)& C,
|
||||
@@ -578,6 +741,33 @@ void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
|
||||
TE->Modified(Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
|
||||
const Handle(Geom2d_Curve)& C,
|
||||
const Handle(Geom_Surface)& newSurf,
|
||||
const TopLoc_Location& newL,
|
||||
const TopoDS_Face& theFace,
|
||||
const Standard_Real Tol) const
|
||||
{
|
||||
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
|
||||
const TopLoc_Location l = newL.Predivided(E.Location());
|
||||
|
||||
const Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &theFace.TShape());
|
||||
const TopLoc_Location &L = theFace.Location() * TF->Location();
|
||||
const Handle(Geom_Surface) &S = TF->Surface();
|
||||
|
||||
//BRep_Tool::Degenerated(E);
|
||||
|
||||
UpdateCurves(TE->ChangeCurves(),
|
||||
C, newSurf, l, S,
|
||||
L.Predivided(E.Location()));
|
||||
|
||||
TE->UpdateTolerance(Tol);
|
||||
TE->Modified(Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateEdge
|
||||
@@ -612,12 +802,13 @@ void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
|
||||
const Handle(Geom2d_Curve)& C2,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopLoc_Location& L,
|
||||
const Standard_Real Tol) const
|
||||
const Standard_Real Tol,
|
||||
const GeomAbs_Shape theContinuity) const
|
||||
{
|
||||
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
|
||||
const TopLoc_Location l = L.Predivided(E.Location());
|
||||
|
||||
UpdateCurves(TE->ChangeCurves(),C1,C2,S,l);
|
||||
UpdateCurves(TE->ChangeCurves(),C1,C2,S,l,theContinuity);
|
||||
if (!C1.IsNull() && !C2.IsNull())
|
||||
TE->Closed(C1->IsClosed() && C2->IsClosed());
|
||||
|
||||
@@ -899,6 +1090,36 @@ void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
|
||||
TE->Modified(Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
|
||||
const Handle(Geom2d_Curve)& C1,
|
||||
const Handle(Geom2d_Curve)& C2,
|
||||
const Handle(Geom_Surface)& newSurf,
|
||||
const TopLoc_Location& newL,
|
||||
const TopoDS_Face& theFace,
|
||||
const Standard_Real Tol) const
|
||||
{
|
||||
const Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &E.TShape());
|
||||
const TopLoc_Location l = newL.Predivided(E.Location());
|
||||
|
||||
const Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &theFace.TShape());
|
||||
const TopLoc_Location &L = theFace.Location() * TF->Location();
|
||||
const Handle(Geom_Surface) &S = TF->Surface();
|
||||
|
||||
|
||||
UpdateCurves(TE->ChangeCurves(),
|
||||
C1,C2,newSurf,l,S,
|
||||
L.Predivided(E.Location()));
|
||||
|
||||
if (!C1.IsNull() && !C2.IsNull())
|
||||
TE->Closed(C1->IsClosed() && C2->IsClosed());
|
||||
|
||||
TE->UpdateTolerance(Tol);
|
||||
TE->Modified(Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Continuity
|
||||
|
@@ -145,10 +145,11 @@ inline void BRep_Builder::UpdateEdge(const TopoDS_Edge& E,
|
||||
const Handle(Geom2d_Curve)& C1,
|
||||
const Handle(Geom2d_Curve)& C2,
|
||||
const TopoDS_Face& F,
|
||||
const Standard_Real Tol) const
|
||||
const Standard_Real Tol,
|
||||
const GeomAbs_Shape theContinuity) const
|
||||
{
|
||||
TopLoc_Location l;
|
||||
UpdateEdge(E,C1,C2,BRep_Tool::Surface(F,l),l,Tol);
|
||||
UpdateEdge(E,C1,C2,BRep_Tool::Surface(F,l),l,Tol, theContinuity);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -76,6 +76,7 @@ is
|
||||
FreeEdge,
|
||||
InvalidMultiConnexity,
|
||||
InvalidRange,
|
||||
PCurveIsOutOfDomainFace,
|
||||
|
||||
|
||||
-- for wires
|
||||
@@ -85,6 +86,7 @@ is
|
||||
|
||||
-- for faces
|
||||
NoSurface,
|
||||
OutOfSurfaceBoundary,
|
||||
InvalidWire,
|
||||
RedundantWire,
|
||||
IntersectingWires,
|
||||
|
@@ -181,7 +181,15 @@ void BRepCheck::Print(const BRepCheck_Status stat,
|
||||
case BRepCheck_CheckFail:
|
||||
OS << "BRepCheck_CheckFail\n";
|
||||
break;
|
||||
case BRepCheck_PCurveIsOutOfDomainFace:
|
||||
OS << "BRepCheck_PCurveIsOutOfDomainFace\n";
|
||||
break;
|
||||
case BRepCheck_OutOfSurfaceBoundary:
|
||||
OS << "BRepCheck_OutOfSurfaceBoundary\n";
|
||||
break;
|
||||
|
||||
default:
|
||||
OS << "BRepCheck::Print(...): Undefined status!\n";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -109,57 +109,64 @@ void BRepCheck_Analyzer::Put(const TopoDS_Shape& S,
|
||||
|
||||
void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
|
||||
{
|
||||
for(TopoDS_Iterator theIterator(S);theIterator.More();theIterator.Next()) {
|
||||
for(TopoDS_Iterator theIterator(S);theIterator.More();theIterator.Next())
|
||||
Perform(theIterator.Value());
|
||||
}
|
||||
|
||||
//
|
||||
TopAbs_ShapeEnum styp;
|
||||
TopExp_Explorer exp;
|
||||
//
|
||||
styp = S.ShapeType();
|
||||
switch (styp) {
|
||||
case TopAbs_VERTEX:
|
||||
|
||||
switch (styp)
|
||||
{
|
||||
case TopAbs_VERTEX:
|
||||
// modified by NIZHNY-MKK Wed May 19 16:56:16 2004.BEGIN
|
||||
// There is no need to check anything.
|
||||
// if (myShape.IsSame(S)) {
|
||||
// myMap(S)->Blind();
|
||||
// }
|
||||
// modified by NIZHNY-MKK Wed May 19 16:56:23 2004.END
|
||||
|
||||
|
||||
break;
|
||||
case TopAbs_EDGE: {
|
||||
case TopAbs_EDGE:
|
||||
{
|
||||
// Modified by skv - Tue Apr 27 11:38:08 2004 Begin
|
||||
// There is no need to check anything except vertices on single edge.
|
||||
// if (myShape.IsSame(S)) {
|
||||
// myMap(S)->Blind();
|
||||
// }
|
||||
// Modified by skv - Tue Apr 27 11:38:09 2004 End
|
||||
TopTools_MapOfShape MapS;
|
||||
|
||||
for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next()) {
|
||||
const TopoDS_Shape& aVertex = exp.Current();
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
if (MapS.Add(aVertex)) {
|
||||
myMap(aVertex)->InContext(S);
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
|
||||
TopTools_MapOfShape MapS;
|
||||
for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next())
|
||||
{
|
||||
const TopoDS_Shape& aVertex = exp.Current();
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
if (MapS.Add(aVertex))
|
||||
myMap(aVertex)->InContext(S);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
Handle(BRepCheck_Result) aRes = myMap(aVertex);
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(aVertex);
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ! myMap(S).IsNull() )
|
||||
myMap(S)->SetFailStatus(S);
|
||||
|
||||
Handle(BRepCheck_Result) aRes = myMap(aVertex);
|
||||
|
||||
if ( ! aRes.IsNull() )
|
||||
{
|
||||
aRes->SetFailStatus(aVertex);
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}//catch(Standard_Failure)
|
||||
}//for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next())
|
||||
}
|
||||
break;
|
||||
case TopAbs_WIRE:
|
||||
@@ -177,257 +184,234 @@ void BRepCheck_Analyzer::Perform(const TopoDS_Shape& S)
|
||||
case TopAbs_FACE:
|
||||
{
|
||||
TopTools_MapOfShape MapS;
|
||||
for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next()) {
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
if (MapS.Add(exp.Current())) {
|
||||
myMap(exp.Current())->InContext(S);
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next())
|
||||
{
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
if (MapS.Add(exp.Current()))
|
||||
myMap(exp.Current())->InContext(S);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
if ( ! myMap(S).IsNull() )
|
||||
myMap(S)->SetFailStatus(S);
|
||||
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
|
||||
if ( ! aRes.IsNull() )
|
||||
{
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}//catch(Standard_Failure)
|
||||
}//for (exp.Init(S,TopAbs_VERTEX);exp.More(); exp.Next())
|
||||
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
}
|
||||
Standard_Boolean performwire = Standard_True;
|
||||
Standard_Boolean isFaceOutBoundary = Standard_False;
|
||||
|
||||
MapS.Clear();
|
||||
for (exp.Init(S,TopAbs_EDGE);exp.More(); exp.Next()) {
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
if (MapS.Add(exp.Current())) {
|
||||
Handle(BRepCheck_Result)& res = myMap(exp.Current());
|
||||
res->InContext(S);
|
||||
if (performwire) {
|
||||
for (res->InitContextIterator();
|
||||
res->MoreShapeInContext();
|
||||
res->NextShapeInContext()) {
|
||||
if(res->ContextualShape().IsSame(S)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
BRepCheck_ListIteratorOfListOfStatus itl(res->StatusOnShape());
|
||||
for (; itl.More(); itl.Next()) {
|
||||
BRepCheck_Status ste = itl.Value();
|
||||
if (ste == BRepCheck_NoCurveOnSurface ||
|
||||
ste == BRepCheck_InvalidCurveOnSurface ||
|
||||
ste == BRepCheck_InvalidRange ||
|
||||
ste == BRepCheck_InvalidCurveOnClosedSurface) {
|
||||
performwire = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
for (exp.Init(S,TopAbs_EDGE);exp.More(); exp.Next())
|
||||
{
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
if (MapS.Add(exp.Current()))
|
||||
{
|
||||
Handle(BRepCheck_Result)& res = myMap(exp.Current());
|
||||
res->InContext(S);
|
||||
if (performwire)
|
||||
{
|
||||
for (res->InitContextIterator();
|
||||
res->MoreShapeInContext();
|
||||
res->NextShapeInContext())
|
||||
{
|
||||
if(res->ContextualShape().IsSame(S))
|
||||
break;
|
||||
}
|
||||
|
||||
BRepCheck_ListIteratorOfListOfStatus itl(res->StatusOnShape());
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
BRepCheck_Status ste = itl.Value();
|
||||
if (ste == BRepCheck_NoCurveOnSurface ||
|
||||
ste == BRepCheck_InvalidCurveOnSurface ||
|
||||
ste == BRepCheck_InvalidRange ||
|
||||
ste == BRepCheck_InvalidCurveOnClosedSurface)
|
||||
{
|
||||
performwire = Standard_False;
|
||||
break;
|
||||
}
|
||||
|
||||
if(ste == BRepCheck_PCurveIsOutOfDomainFace)
|
||||
{
|
||||
isFaceOutBoundary = Standard_True;
|
||||
break;
|
||||
}
|
||||
}//for (; itl.More(); itl.Next())
|
||||
}//if (performwire)
|
||||
}//if (MapS.Add(exp.Current()))
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
if ( ! myMap(S).IsNull() )
|
||||
myMap(S)->SetFailStatus(S);
|
||||
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
if ( ! aRes.IsNull() )
|
||||
{
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}//catch(Standard_Failure)
|
||||
}//for (exp.Init(S,TopAbs_EDGE);exp.More(); exp.Next())
|
||||
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
}
|
||||
Standard_Boolean orientofwires = performwire;
|
||||
for (exp.Init(S,TopAbs_WIRE);exp.More(); exp.Next()) {
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
Handle(BRepCheck_Result)& res = myMap(exp.Current());
|
||||
res->InContext(S);
|
||||
if (orientofwires) {
|
||||
for (res->InitContextIterator();
|
||||
res->MoreShapeInContext();
|
||||
res->NextShapeInContext()) {
|
||||
if(res->ContextualShape().IsSame(S)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
BRepCheck_ListIteratorOfListOfStatus itl(res->StatusOnShape());
|
||||
for (; itl.More(); itl.Next()) {
|
||||
BRepCheck_Status ste = itl.Value();
|
||||
if (ste != BRepCheck_NoError) {
|
||||
orientofwires = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
for (exp.Init(S,TopAbs_WIRE);exp.More(); exp.Next())
|
||||
{
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
Handle(BRepCheck_Result)& res = myMap(exp.Current());
|
||||
res->InContext(S);
|
||||
if (orientofwires)
|
||||
{
|
||||
for (res->InitContextIterator();
|
||||
res->MoreShapeInContext();
|
||||
res->NextShapeInContext())
|
||||
{
|
||||
if(res->ContextualShape().IsSame(S))
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
BRepCheck_ListIteratorOfListOfStatus itl(res->StatusOnShape());
|
||||
for (; itl.More(); itl.Next())
|
||||
{
|
||||
BRepCheck_Status ste = itl.Value();
|
||||
if (ste != BRepCheck_NoError)
|
||||
{
|
||||
orientofwires = Standard_False;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}//if (orientofwires)
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
if ( ! myMap(S).IsNull() )
|
||||
myMap(S)->SetFailStatus(S);
|
||||
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
|
||||
if ( ! aRes.IsNull() )
|
||||
{
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
}//for (exp.Init(S,TopAbs_WIRE);exp.More(); exp.Next())
|
||||
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
if (performwire) {
|
||||
if (orientofwires) {
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->
|
||||
OrientationOfWires(Standard_True);// on enregistre
|
||||
}
|
||||
// else {
|
||||
// Handle(BRepCheck_Face)::DownCast(myMap(S))->
|
||||
// IntersectWires(Standard_True); // on enregistre
|
||||
// }
|
||||
else {
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->SetUnorientable();
|
||||
}
|
||||
}
|
||||
else {
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->SetUnorientable();
|
||||
}
|
||||
if (performwire)
|
||||
{
|
||||
if (isFaceOutBoundary)
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->
|
||||
SetStatus(BRepCheck_OutOfSurfaceBoundary);
|
||||
else if (orientofwires)
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->
|
||||
OrientationOfWires(Standard_True);// on enregistre
|
||||
else
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->
|
||||
SetUnorientable();
|
||||
}//if (performwire)
|
||||
else
|
||||
Handle(BRepCheck_Face)::DownCast(myMap(S))->
|
||||
SetUnorientable();
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
|
||||
for (exp.Init(S,TopAbs_WIRE);exp.More(); exp.Next()) {
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
if ( ! myMap(S).IsNull() )
|
||||
{
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
myMap(S)->SetFailStatus(exp.Current());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (exp.Init(S,TopAbs_WIRE);exp.More(); exp.Next())
|
||||
{
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
|
||||
if ( ! aRes.IsNull() )
|
||||
{
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
myMap(S)->SetFailStatus(exp.Current());
|
||||
}
|
||||
}//for (exp.Init(S,TopAbs_WIRE);exp.More(); exp.Next())
|
||||
}//catch(Standard_Failure)
|
||||
}
|
||||
break;
|
||||
|
||||
case TopAbs_SHELL:
|
||||
case TopAbs_SHELL:
|
||||
//modified by NIZNHY-PKV Mon Oct 13 14:23:53 2008f
|
||||
/* {
|
||||
Standard_Boolean VerifyOrientation, bFlag;
|
||||
//
|
||||
VerifyOrientation = Standard_True;
|
||||
//
|
||||
exp.Init(S,TopAbs_FACE);
|
||||
for (; exp.More(); exp.Next()) {
|
||||
const TopoDS_Shape& aF=exp.Current();
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
bFlag= !(Handle(BRepCheck_Face)::DownCast(myMap(aF))->IsUnorientable());
|
||||
VerifyOrientation = (VerifyOrientation && bFlag);
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
} //
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
if (VerifyOrientation) {
|
||||
Handle(BRepCheck_Shell)::DownCast(myMap(S))->Orientation(Standard_True);
|
||||
}
|
||||
else {
|
||||
Handle(BRepCheck_Shell)::DownCast(myMap(S))->SetUnorientable();
|
||||
}
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
exp.Init(S,TopAbs_FACE);
|
||||
for (; exp.More(); exp.Next()) {
|
||||
Handle(BRepCheck_Result) aRes = myMap(exp.Current());
|
||||
if ( ! aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
myMap(S)->SetFailStatus(exp.Current());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
//modified by NIZNHY-PKV Mon Oct 13 14:24:04 2008t
|
||||
break;
|
||||
//
|
||||
case TopAbs_SOLID: {
|
||||
exp.Init(S,TopAbs_SHELL);
|
||||
for (; exp.More(); exp.Next()) {
|
||||
const TopoDS_Shape& aShell=exp.Current();
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
myMap(aShell)->InContext(S);
|
||||
}
|
||||
catch(Standard_Failure) {
|
||||
|
||||
case TopAbs_SOLID:
|
||||
{
|
||||
exp.Init(S,TopAbs_SHELL);
|
||||
for (; exp.More(); exp.Next())
|
||||
{
|
||||
const TopoDS_Shape& aShell=exp.Current();
|
||||
try
|
||||
{
|
||||
OCC_CATCH_SIGNALS
|
||||
myMap(aShell)->InContext(S);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
cout<<"BRepCheck_Analyzer : ";
|
||||
Standard_Failure::Caught()->Print(cout);
|
||||
cout<<endl;
|
||||
#endif
|
||||
if ( ! myMap(S).IsNull() ) {
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
//
|
||||
Handle(BRepCheck_Result) aRes = myMap(aShell);
|
||||
if (!aRes.IsNull() ) {
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}
|
||||
if ( ! myMap(S).IsNull() )
|
||||
{
|
||||
myMap(S)->SetFailStatus(S);
|
||||
}
|
||||
|
||||
//
|
||||
Handle(BRepCheck_Result) aRes = myMap(aShell);
|
||||
if (!aRes.IsNull() )
|
||||
{
|
||||
aRes->SetFailStatus(exp.Current());
|
||||
aRes->SetFailStatus(S);
|
||||
}
|
||||
}//catch(Standard_Failure)
|
||||
}//for (; exp.More(); exp.Next())
|
||||
}
|
||||
}
|
||||
break;//case TopAbs_SOLID
|
||||
break;//case TopAbs_SOLID
|
||||
default:
|
||||
break;
|
||||
}//switch (styp) {
|
||||
|
@@ -64,12 +64,14 @@
|
||||
#include <Precision.hxx>
|
||||
|
||||
|
||||
//modified by NIZNHY-PKV Thu May 05 09:01:57 2011f
|
||||
static
|
||||
Standard_Boolean Validate(const Adaptor3d_Curve&,
|
||||
const Adaptor3d_CurveOnSurface&,
|
||||
const Standard_Real,
|
||||
const Standard_Boolean);
|
||||
BRepCheck_Status Validate(const Adaptor3d_Curve&,
|
||||
const Adaptor3d_CurveOnSurface&,
|
||||
const Standard_Real,
|
||||
const Standard_Boolean,
|
||||
const Standard_Boolean theSurfIsUPeriodic,
|
||||
const Standard_Boolean theSurfIsVPeriodic);
|
||||
|
||||
static
|
||||
void PrintProblematicPoint(const gp_Pnt&,
|
||||
const Standard_Real,
|
||||
@@ -83,13 +85,9 @@ static
|
||||
static
|
||||
Standard_Real PrecSurface(const Adaptor3d_CurveOnSurface& aACS);
|
||||
|
||||
//static Standard_Boolean Validate(const Adaptor3d_Curve&,
|
||||
// const Adaptor3d_Curve&,
|
||||
// const Standard_Real,
|
||||
// const Standard_Boolean);
|
||||
//modified by NIZNHY-PKV Thu May 05 09:02:01 2011t
|
||||
|
||||
#define NCONTROL 23
|
||||
static const Standard_Integer aNbControl = 23;
|
||||
|
||||
//=======================================================================
|
||||
//function : BRepCheck_Edge
|
||||
@@ -219,9 +217,9 @@ void BRepCheck_Edge::Minimum()
|
||||
|
||||
void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
|
||||
{
|
||||
if (myMap.IsBound(S)) {
|
||||
if (myMap.IsBound(S))
|
||||
return;
|
||||
}
|
||||
|
||||
BRepCheck_ListOfStatus thelist;
|
||||
myMap.Bind(S, thelist);
|
||||
BRepCheck_ListOfStatus& lst = myMap(S);
|
||||
@@ -230,191 +228,238 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
|
||||
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
|
||||
|
||||
TopAbs_ShapeEnum styp = S.ShapeType();
|
||||
// for (TopExp_Explorer exp(S,TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
TopExp_Explorer exp(S,TopAbs_EDGE) ;
|
||||
for ( ; exp.More(); exp.Next()) {
|
||||
if (exp.Current().IsSame(myShape)) {
|
||||
for ( ; exp.More(); exp.Next())
|
||||
{
|
||||
if (exp.Current().IsSame(myShape))
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!exp.More()) {
|
||||
|
||||
if (!exp.More())
|
||||
{
|
||||
BRepCheck::Add(lst,BRepCheck_SubshapeNotInShape);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (styp) {
|
||||
case TopAbs_FACE:
|
||||
if (!myCref.IsNull()) {
|
||||
|
||||
Standard_Boolean SameParameter = TE->SameParameter();
|
||||
Standard_Boolean SameRange = TE->SameRange();
|
||||
// Modified by skv - Tue Apr 27 11:48:13 2004 Begin
|
||||
if (!SameParameter || !SameRange) {
|
||||
if (!SameParameter)
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
if (!SameRange)
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameRangeFlag);
|
||||
|
||||
return;
|
||||
}
|
||||
// Modified by skv - Tue Apr 27 11:48:14 2004 End
|
||||
Standard_Real First = myHCurve->FirstParameter();
|
||||
Standard_Real Last = myHCurve->LastParameter();
|
||||
switch (styp)
|
||||
{
|
||||
case TopAbs_FACE:
|
||||
if (myCref.IsNull())
|
||||
break;
|
||||
|
||||
Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &S.TShape());
|
||||
const TopLoc_Location& Floc = S.Location();
|
||||
const TopLoc_Location& TFloc = TF->Location();
|
||||
const Handle(Geom_Surface)& Su = TF->Surface();
|
||||
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
|
||||
Standard_Boolean pcurvefound = Standard_False;
|
||||
{
|
||||
Standard_Boolean SameParameter = TE->SameParameter();
|
||||
Standard_Boolean SameRange = TE->SameRange();
|
||||
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
|
||||
while (itcr.More()) {
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr != myCref && cr->IsCurveOnSurface(Su,L)) {
|
||||
pcurvefound = Standard_True;
|
||||
const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
|
||||
Standard_Real f,l;
|
||||
GC->Range(f,l);
|
||||
// gka OCC
|
||||
// Modified by skv - Tue Apr 27 11:50:35 2004 Begin
|
||||
// if (SameRange && (fabs(f-First) > Precision::PConfusion() || fabs(l-Last)> Precision::PConfusion())) { //f != First || l != Last)) { gka OCC
|
||||
if (fabs(f-First) > Precision::PConfusion() ||
|
||||
fabs(l-Last) > Precision::PConfusion()) {
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameRangeFlag);
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
// if (SameParameter) {
|
||||
// BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
// }
|
||||
}
|
||||
// Modified by skv - Tue Apr 27 11:50:37 2004 End
|
||||
if (myGctrl) {
|
||||
Handle(Geom_Surface) Sb = cr->Surface();
|
||||
Sb = Handle(Geom_Surface)::DownCast
|
||||
// (Su->Transformed(L.Transformation()));
|
||||
(Su->Transformed(/*L*/(Floc * TFloc).Transformation()));
|
||||
Handle(Geom2d_Curve) PC = cr->PCurve();
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb);
|
||||
Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l);
|
||||
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
|
||||
Standard_Boolean ok =
|
||||
Validate(myHCurve->Curve(),ACS,Tol,SameParameter);
|
||||
if (!ok) {
|
||||
if (cr->IsCurveOnClosedSurface()) {
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
|
||||
}
|
||||
else {
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
|
||||
}
|
||||
// Modified by skv - Tue Apr 27 11:53:00 2004 Begin
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
// if (SameParameter) {
|
||||
// BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
// }
|
||||
// Modified by skv - Tue Apr 27 11:53:01 2004 End
|
||||
}
|
||||
if (cr->IsCurveOnClosedSurface()) {
|
||||
GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
|
||||
ACS.Load(GAHS); // sans doute inutile
|
||||
ACS.Load(GHPC); // meme remarque...
|
||||
ok = Validate(myHCurve->Curve(),ACS,Tol,SameParameter);
|
||||
if (!ok) {
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
|
||||
// Modified by skv - Tue Apr 27 11:53:20 2004 Begin
|
||||
if (SameParameter) {
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
}
|
||||
// Modified by skv - Tue Apr 27 11:53:23 2004 End
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
itcr.Next();
|
||||
}
|
||||
if (!SameParameter || !SameRange)
|
||||
{
|
||||
if (!SameParameter)
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
|
||||
if (!pcurvefound) {
|
||||
Handle(Geom_Plane) P;
|
||||
Handle(Standard_Type) dtyp = Su->DynamicType();
|
||||
if (dtyp == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) {
|
||||
P = Handle(Geom_Plane)::DownCast
|
||||
(Handle(Geom_RectangularTrimmedSurface)::
|
||||
DownCast(Su)->BasisSurface());
|
||||
}
|
||||
else {
|
||||
P = Handle(Geom_Plane)::DownCast(Su);
|
||||
}
|
||||
if (P.IsNull()) { // not a plane
|
||||
BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface);
|
||||
}
|
||||
else { // on fait la projection a la volee, comme BRep_Tool
|
||||
// plan en position
|
||||
if (myGctrl) {
|
||||
P = Handle(Geom_Plane)::
|
||||
DownCast(P->Transformed(/*L*/(Floc * TFloc).Transformation()));// eap occ332
|
||||
//on projette Cref sur ce plan
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
|
||||
if (!SameRange)
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameRangeFlag);
|
||||
|
||||
// Dub - Normalement myHCurve est une GeomAdaptor_HCurve
|
||||
GeomAdaptor_Curve& Gac =
|
||||
Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
|
||||
Handle(Geom_Curve) C3d = Gac.Curve();
|
||||
Handle(Geom_Curve) ProjOnPlane =
|
||||
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3d,First,Last),
|
||||
P, P->Position().Direction(),
|
||||
Standard_True);
|
||||
Handle(GeomAdaptor_HCurve) aHCurve =
|
||||
new GeomAdaptor_HCurve(ProjOnPlane);
|
||||
return;
|
||||
}//if (!SameParameter || !SameRange)
|
||||
|
||||
ProjLib_ProjectedCurve proj(GAHS,aHCurve);
|
||||
Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
|
||||
Handle(Geom2dAdaptor_HCurve) GHPC =
|
||||
new Geom2dAdaptor_HCurve(PC,
|
||||
myHCurve->FirstParameter(),
|
||||
myHCurve->LastParameter());
|
||||
const Standard_Real First = myHCurve->FirstParameter();
|
||||
const Standard_Real Last = myHCurve->LastParameter();
|
||||
|
||||
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
|
||||
|
||||
Standard_Boolean ok = Validate(myHCurve->Curve(),ACS,
|
||||
Tol,Standard_True); // voir dub...
|
||||
if (!ok) {
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
|
||||
}
|
||||
}
|
||||
}
|
||||
Handle(BRep_TFace)& TF = *((Handle(BRep_TFace)*) &S.TShape());
|
||||
const TopLoc_Location& Floc = S.Location();
|
||||
const TopLoc_Location& TFloc = TF->Location();
|
||||
const Handle(Geom_Surface)& Su = TF->Surface();
|
||||
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
|
||||
Standard_Boolean pcurvefound = Standard_False;
|
||||
|
||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
|
||||
|
||||
while (itcr.More())
|
||||
{
|
||||
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr != myCref && cr->IsCurveOnSurface(Su,L))
|
||||
{
|
||||
pcurvefound = Standard_True;
|
||||
const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
|
||||
Standard_Real f,l;
|
||||
GC->Range(f,l);
|
||||
|
||||
if (fabs(f-First) > Precision::PConfusion() ||
|
||||
fabs(l-Last) > Precision::PConfusion())
|
||||
{
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameRangeFlag);
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
}
|
||||
|
||||
if (myGctrl)
|
||||
{
|
||||
Handle(Geom_Surface) Sb = cr->Surface();
|
||||
{
|
||||
Standard_Real U1Su, U2Su, V1Su, V2Su;
|
||||
Standard_Real U1Sb, U2Sb, V1Sb, V2Sb;
|
||||
|
||||
Standard_Boolean isTrimU, isTrimV;
|
||||
if(Su->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
|
||||
{
|
||||
Handle(Geom_RectangularTrimmedSurface) TS =
|
||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(Su);
|
||||
|
||||
TS->GetTrimmedFlags(isTrimU, isTrimV);
|
||||
}
|
||||
|
||||
Su->Bounds(U1Su, U2Su, V1Su, V2Su);
|
||||
Sb = Handle(Geom_Surface)::DownCast
|
||||
(Su->Transformed((Floc * TFloc).Transformation()));
|
||||
|
||||
Sb->Bounds(U1Sb, U2Sb, V1Sb, V2Sb);
|
||||
Standard_Boolean isUtr = ((Abs(U1Su - U1Sb) + Abs(U2Su - U2Sb)) > Precision::PConfusion()),
|
||||
isVtr = ((Abs(V1Su - V1Sb) + Abs(V2Su - V2Sb)) > Precision::PConfusion());
|
||||
|
||||
if(isUtr || isVtr)
|
||||
{
|
||||
Handle(Geom_Surface) St = Handle(Geom_RectangularTrimmedSurface)::DownCast(Sb)->BasisSurface();
|
||||
Sb = new Geom_RectangularTrimmedSurface(St, isTrimU || isUtr, isVtr || isTrimV, U1Su, U2Su, V1Su, V2Su);
|
||||
}
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) PC = cr->PCurve();
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(Sb);
|
||||
Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,f,l);
|
||||
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
|
||||
BRepCheck_Status aStatus = Validate(myHCurve->Curve(),ACS,Tol,SameParameter,
|
||||
Sb->IsUPeriodic(),Sb->IsVPeriodic());
|
||||
|
||||
if(aStatus == BRepCheck_PCurveIsOutOfDomainFace)
|
||||
BRepCheck::Add(lst,BRepCheck_PCurveIsOutOfDomainFace);
|
||||
else if(aStatus == BRepCheck_InvalidCurveOnSurface)
|
||||
{
|
||||
if (cr->IsCurveOnClosedSurface())
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
|
||||
else
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnSurface);
|
||||
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
}
|
||||
else if(aStatus != BRepCheck_NoError)
|
||||
BRepCheck::Add(lst,aStatus);
|
||||
|
||||
if (cr->IsCurveOnClosedSurface())
|
||||
{
|
||||
GHPC->ChangeCurve2d().Load(cr->PCurve2(),f,l); // same bounds
|
||||
ACS.Load(GAHS); // sans doute inutile
|
||||
ACS.Load(GHPC); // meme remarque...
|
||||
aStatus = Validate(myHCurve->Curve(),ACS,Tol,SameParameter,
|
||||
Sb->IsUPeriodic(),Sb->IsVPeriodic());
|
||||
|
||||
if(aStatus == BRepCheck_PCurveIsOutOfDomainFace)
|
||||
BRepCheck::Add(lst,BRepCheck_PCurveIsOutOfDomainFace);
|
||||
else if(aStatus == BRepCheck_InvalidCurveOnSurface)
|
||||
{
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidCurveOnClosedSurface);
|
||||
if (SameParameter)
|
||||
BRepCheck::Add(lst,BRepCheck_InvalidSameParameterFlag);
|
||||
}
|
||||
else if(aStatus != BRepCheck_NoError)
|
||||
BRepCheck::Add(lst,aStatus);
|
||||
}//if (cr->IsCurveOnClosedSurface())
|
||||
}//if (myGctrl)
|
||||
}//if (cr != myCref && cr->IsCurveOnSurface(Su,L))
|
||||
itcr.Next();
|
||||
}//while (itcr.More())
|
||||
|
||||
if (!pcurvefound)
|
||||
{
|
||||
Handle(Geom_Plane) P;
|
||||
Handle(Standard_Type) dtyp = Su->DynamicType();
|
||||
if (dtyp == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
|
||||
{
|
||||
P = Handle(Geom_Plane)::DownCast
|
||||
(Handle(Geom_RectangularTrimmedSurface)::
|
||||
DownCast(Su)->BasisSurface());
|
||||
}
|
||||
else
|
||||
P = Handle(Geom_Plane)::DownCast(Su);
|
||||
|
||||
if (P.IsNull()) // not a plane
|
||||
BRepCheck::Add(lst,BRepCheck_NoCurveOnSurface);
|
||||
else
|
||||
{
|
||||
// on fait la projection a la volee, comme BRep_Tool plan en position
|
||||
if (myGctrl)
|
||||
{
|
||||
P = Handle(Geom_Plane)::DownCast(
|
||||
P->Transformed((Floc * TFloc).Transformation()));// eap occ332
|
||||
|
||||
//on projette Cref sur ce plan
|
||||
Handle(GeomAdaptor_HSurface) GAHS = new GeomAdaptor_HSurface(P);
|
||||
|
||||
// Dub - Normalement myHCurve est une GeomAdaptor_HCurve
|
||||
GeomAdaptor_Curve& Gac =
|
||||
Handle(GeomAdaptor_HCurve)::DownCast(myHCurve)->ChangeCurve();
|
||||
|
||||
Handle(Geom_Curve) C3d = Gac.Curve();
|
||||
Handle(Geom_Curve) ProjOnPlane =
|
||||
GeomProjLib::ProjectOnPlane(new Geom_TrimmedCurve(C3d,First,Last),
|
||||
P, P->Position().Direction(),Standard_True);
|
||||
|
||||
Handle(GeomAdaptor_HCurve) aHCurve =
|
||||
new GeomAdaptor_HCurve(ProjOnPlane);
|
||||
|
||||
ProjLib_ProjectedCurve proj(GAHS,aHCurve);
|
||||
Handle(Geom2d_Curve) PC = Geom2dAdaptor::MakeCurve(proj);
|
||||
Handle(Geom2dAdaptor_HCurve) GHPC = new Geom2dAdaptor_HCurve(PC,
|
||||
myHCurve->FirstParameter(),
|
||||
myHCurve->LastParameter());
|
||||
|
||||
Adaptor3d_CurveOnSurface ACS(GHPC,GAHS);
|
||||
|
||||
BRepCheck_Status aStatus = Validate(myHCurve->Curve(),ACS,Tol,
|
||||
Standard_True, P->IsUPeriodic(),P->IsVPeriodic()); // voir dub...
|
||||
|
||||
if (aStatus != BRepCheck_NoError)
|
||||
BRepCheck::Add(lst,aStatus);
|
||||
}//if (myGctrl)
|
||||
}//else of "if (P.IsNull())" condition
|
||||
}//if (!pcurvefound)
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TopAbs_SOLID:
|
||||
{
|
||||
// on verifie que l`edge est bien connectee 2 fois (pas de bord libre)
|
||||
Standard_Integer nbconnection = 0;
|
||||
//TopExp_Explorer exp;
|
||||
for (exp.Init(S,TopAbs_FACE); exp.More(); exp.Next()) {
|
||||
const TopoDS_Face& fac = TopoDS::Face(exp.Current());
|
||||
TopExp_Explorer exp2;
|
||||
for (exp2.Init(fac,TopAbs_EDGE); exp2.More(); exp2.Next()) {
|
||||
if (exp2.Current().IsSame(myShape)) {
|
||||
nbconnection++;
|
||||
}
|
||||
}
|
||||
case TopAbs_SOLID:
|
||||
{
|
||||
// on verifie que l`edge est bien connectee 2 fois (pas de bord libre)
|
||||
Standard_Integer nbconnection = 0;
|
||||
|
||||
//TopExp_Explorer exp;
|
||||
for (exp.Init(S,TopAbs_FACE); exp.More(); exp.Next())
|
||||
{
|
||||
const TopoDS_Face& fac = TopoDS::Face(exp.Current());
|
||||
TopExp_Explorer exp2;
|
||||
|
||||
for (exp2.Init(fac,TopAbs_EDGE); exp2.More(); exp2.Next())
|
||||
{
|
||||
if (exp2.Current().IsSame(myShape))
|
||||
nbconnection++;
|
||||
}//for (exp2.Init(fac,TopAbs_EDGE); exp2.More(); exp2.Next())
|
||||
}//for (exp.Init(S,TopAbs_FACE); exp.More(); exp.Next())
|
||||
|
||||
if (nbconnection < 2 && !TE->Degenerated())
|
||||
BRepCheck::Add(myMap(S),BRepCheck_FreeEdge);
|
||||
else if (nbconnection > 2)
|
||||
{
|
||||
BRepCheck::Add(myMap(S),BRepCheck_InvalidMultiConnexity);
|
||||
}
|
||||
else
|
||||
BRepCheck::Add(myMap(S),BRepCheck_NoError);
|
||||
|
||||
}
|
||||
if (nbconnection < 2 && !TE->Degenerated()) {
|
||||
BRepCheck::Add(myMap(S),BRepCheck_FreeEdge);
|
||||
}
|
||||
else if (nbconnection > 2) {
|
||||
BRepCheck::Add(myMap(S),BRepCheck_InvalidMultiConnexity);
|
||||
}
|
||||
else {
|
||||
BRepCheck::Add(myMap(S),BRepCheck_NoError);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (myMap(S).IsEmpty()) {
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}//switch (styp)
|
||||
|
||||
if (myMap(S).IsEmpty())
|
||||
myMap(S).Append(BRepCheck_NoError);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -536,8 +581,8 @@ Standard_Real BRepCheck_Edge::Tolerance()
|
||||
Standard_Real dist2, tol2, tolCal=0., prm;
|
||||
gp_Pnt center, othP;
|
||||
Standard_Integer i, imax;
|
||||
for (i= 0; i< NCONTROL; i++) {
|
||||
prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
|
||||
for (i= 0; i< aNbControl; i++) {
|
||||
prm = ((aNbControl-1-i)*First + i*Last)/(aNbControl-1);
|
||||
tol2=dist2=0.;
|
||||
center=(*(Handle(Adaptor3d_HCurve)*)&theRep(1))->Value(prm);
|
||||
for (iRep=2; iRep<=nbRep; iRep++) {
|
||||
@@ -556,73 +601,384 @@ Standard_Real BRepCheck_Edge::Tolerance()
|
||||
|
||||
//=======================================================================
|
||||
//function : Validate
|
||||
//purpose :
|
||||
//purpose :
|
||||
//Remark : If the original surface is not periodic in U or V direction
|
||||
// (for example, rectangular trimmed on periodic surface),
|
||||
// the surface that <Adaptor3d_CurveOnSurface> contains
|
||||
// can be periodic.
|
||||
// To use true values of flags, the parameters
|
||||
// <theSurfIsUPeriodic> and <theSurfIsVPeriodic> have been added.
|
||||
//=======================================================================
|
||||
Standard_Boolean Validate(const Adaptor3d_Curve& CRef,
|
||||
const Adaptor3d_CurveOnSurface& Other,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean SameParameter)
|
||||
BRepCheck_Status Validate (const Adaptor3d_Curve& CRef,
|
||||
const Adaptor3d_CurveOnSurface& Other,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean SameParameter,
|
||||
const Standard_Boolean theSurfIsUPeriodic,
|
||||
const Standard_Boolean theSurfIsVPeriodic)
|
||||
{
|
||||
Standard_Boolean Status, proj;
|
||||
BRepCheck_Status Status;
|
||||
Standard_Boolean proj;
|
||||
Standard_Real aPC, First, Last, Error;
|
||||
gp_Pnt problematic_point ;
|
||||
|
||||
//
|
||||
Status = Standard_True;
|
||||
Status = BRepCheck_NoError;
|
||||
Error = 0.;
|
||||
First = CRef.FirstParameter();
|
||||
Last = CRef.LastParameter();
|
||||
//
|
||||
|
||||
aPC=Precision::PConfusion();
|
||||
proj = (!SameParameter ||
|
||||
fabs(Other.FirstParameter()-First) > aPC ||
|
||||
fabs( Other.LastParameter()-Last) > aPC);
|
||||
if (!proj) {
|
||||
proj = (!SameParameter ||
|
||||
fabs(Other.FirstParameter()-First) > aPC ||
|
||||
fabs( Other.LastParameter()-Last) > aPC);
|
||||
|
||||
if (!proj)
|
||||
{
|
||||
Standard_Integer i;
|
||||
Standard_Real Tol2, prm, dD;
|
||||
gp_Pnt pref, pother;
|
||||
|
||||
//modified by NIZNHY-PKV Thu May 05 09:06:41 2011f
|
||||
//OCC22428
|
||||
dD=Prec(CRef, Other);//3.e-15;
|
||||
Tol2=Tol+dD;
|
||||
Tol2=Tol2*Tol2;
|
||||
|
||||
//Tol2=Tol*Tol;
|
||||
//modified by NIZNHY-PKV Thu May 05 09:06:47 2011t
|
||||
|
||||
const Standard_Real mTol = Tol;
|
||||
|
||||
for (i = 0; i< NCONTROL; ++i) {
|
||||
prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
|
||||
Standard_Real uf = Other.GetSurface()->FirstUParameter ();
|
||||
Standard_Real ul = Other.GetSurface()->LastUParameter ();
|
||||
Standard_Real vf = Other.GetSurface()->FirstVParameter();
|
||||
Standard_Real vl = Other.GetSurface()->LastVParameter();
|
||||
//These values are used for estimation of toleranves of
|
||||
//"plane-like" surfaces
|
||||
Standard_Real aDeltaU = (ul - uf);
|
||||
Standard_Real aDeltaV = (vl - vf);
|
||||
|
||||
// Max U(V) resolution is calculated from condition:
|
||||
// |S'|*dU > aCoeff*(0.5*|S"|dU*dU), it means that
|
||||
// first order differential of surface >> second order one
|
||||
const Standard_Real aCoeff = 10.;
|
||||
//Value to check modulus of derivatives against zero
|
||||
const Standard_Real eps = 1.e-16;
|
||||
//Value for estimation Max resolution if |S"| < eps
|
||||
const Standard_Real aFactor = 10.;
|
||||
|
||||
//(for Rectangular trimmed surface for example)
|
||||
const Standard_Boolean isBaseSurfUPeriodic = Other.GetSurface()->IsUPeriodic() && !theSurfIsUPeriodic;
|
||||
const Standard_Boolean isBaseSurfVPeriodic = Other.GetSurface()->IsVPeriodic() && !theSurfIsVPeriodic;
|
||||
|
||||
const Standard_Boolean isUPeriodic = isBaseSurfUPeriodic || theSurfIsUPeriodic;
|
||||
const Standard_Boolean isVPeriodic = isBaseSurfVPeriodic || theSurfIsVPeriodic;
|
||||
|
||||
const Standard_Real UResSt =Other.GetSurface()->UResolution(Tol);
|
||||
const Standard_Real VResSt =Other.GetSurface()->VResolution(Tol);
|
||||
|
||||
for (i = 0; i< aNbControl; ++i)
|
||||
{
|
||||
prm = ((aNbControl-1-i)*First + i*Last)/(aNbControl-1);
|
||||
pref = CRef.Value(prm);
|
||||
pother = Other.Value(prm);
|
||||
if (pref.SquareDistance(pother) > Tol2) {
|
||||
problematic_point = pref ;
|
||||
Status = Standard_False;
|
||||
Error = pref.Distance(pother);
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
|
||||
if (pref.SquareDistance(pother) > Tol2)
|
||||
{
|
||||
problematic_point = pref ;
|
||||
Status = BRepCheck_InvalidCurveOnSurface;
|
||||
Error = pref.Distance(pother);
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
//goto FINISH ;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
gp_Pnt2d CP = Other.GetCurve()->Value(prm);
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
if(theSurfIsUPeriodic)
|
||||
{
|
||||
const Standard_Real aF = Other.GetCurve()->Value(First).X();
|
||||
const Standard_Real aL = Other.GetCurve()->Value(Last).X();
|
||||
const Standard_Real aT = Other.GetSurface()->UPeriod();
|
||||
|
||||
if(Abs(aL - aF) - aT > 2* UResSt)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << endl << "----\nFunction Validate(...); file: "
|
||||
"BRepCheck_Edge.cxx" << endl;
|
||||
cout << "The surface is U-periodic." << endl;
|
||||
cout << "P1.X() = " << aF << "; P2.X() = " << aL << endl;
|
||||
cout << "Period T = " << aT <<
|
||||
". (P2.X() - P1.X()) > T." << "\n-----" << endl;
|
||||
#endif
|
||||
Status = BRepCheck_PCurveIsOutOfDomainFace;
|
||||
return Status;
|
||||
}//if(aL - aF - aT > 2* URes)
|
||||
}//if(theSurfIsUPeriodic)
|
||||
|
||||
if(theSurfIsVPeriodic)
|
||||
{
|
||||
Standard_Real aF = Other.GetCurve()->Value(First).Y();
|
||||
Standard_Real aL = Other.GetCurve()->Value(Last).Y();
|
||||
|
||||
Standard_Real aT = Other.GetSurface()->VPeriod();
|
||||
|
||||
if(Abs(aL - aF) - aT > 2* VResSt)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << endl << "----\nFunction Validate(...); file: "
|
||||
"RepCheck_Edge.cxx" << endl;
|
||||
cout << "The surface is V-periodic." << endl;
|
||||
cout << "P1.Y() = " << aF << "; P2.Y() = " << aL << endl;
|
||||
cout << "Period T = " << aT <<
|
||||
". (P2.Y() - P1.Y()) > T." << "\n-----" << endl;
|
||||
#endif
|
||||
Status = BRepCheck_PCurveIsOutOfDomainFace;
|
||||
return Status;
|
||||
}//if(aL - aF - aT > 2* VRes)
|
||||
}//if(theSurfIsVPeriodic)
|
||||
}//if(i == 0)
|
||||
|
||||
if(theSurfIsUPeriodic && theSurfIsVPeriodic)
|
||||
continue;
|
||||
|
||||
gp_Pnt aPref;
|
||||
gp_Vec aDSdu, aDSdv, aD2Sdu2, aD2Sdv2, aD2Sdudv;
|
||||
const Standard_Real u = Max(uf, Min(CP.X(), ul));
|
||||
const Standard_Real v = Max(vf, Min(CP.Y(), vl));
|
||||
|
||||
//Values of overrun of surface boundaries
|
||||
Standard_Real dUpar = isUPeriodic ? 0.0 : CP.X() - u,
|
||||
dVpar = isVPeriodic ? 0.0 : CP.Y() - v;
|
||||
|
||||
Other.GetSurface()->D2(u, v, aPref, aDSdu, aDSdv, aD2Sdu2,
|
||||
aD2Sdv2, aD2Sdudv);
|
||||
|
||||
Standard_Real URes = UResSt, VRes = VResSt, UResMax = 0.0, VResMax = 0.0;
|
||||
Standard_Real aModDSdu = aDSdu.Magnitude();
|
||||
Standard_Real aModDSdv = aDSdv.Magnitude();
|
||||
Standard_Real aModD2Sdu2 = aD2Sdu2.Magnitude();
|
||||
Standard_Real aModD2Sdv2 = aD2Sdv2.Magnitude();
|
||||
|
||||
if(aModDSdu > eps)
|
||||
{
|
||||
URes = Max(Tol / aModDSdu,UResSt);
|
||||
if(aModD2Sdu2 > aModDSdu / aCoeff)
|
||||
{
|
||||
UResMax = aModDSdu / (.5 * aCoeff * aModD2Sdu2);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Surface seems to be "plane-like" in U direction
|
||||
UResMax = aDeltaU / aFactor;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
URes = UResSt;
|
||||
UResMax = aFactor * URes;
|
||||
}
|
||||
|
||||
//
|
||||
if(aModDSdv > eps)
|
||||
{
|
||||
VRes = Max(Tol / aModDSdv,VResSt);
|
||||
if(aModD2Sdv2 > aModDSdv / aCoeff)
|
||||
{
|
||||
VResMax = aModDSdv / (5. * aModD2Sdv2);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Surface seems to be "plane-like" in V direction
|
||||
VResMax = aDeltaV / aFactor;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
VRes = VResSt;
|
||||
VResMax = aFactor * VRes;
|
||||
}
|
||||
|
||||
URes = Max(URes, UResMax);
|
||||
VRes = Max(VRes, VResMax);
|
||||
|
||||
Standard_Boolean isUbound, isVbound;
|
||||
|
||||
if(theSurfIsUPeriodic)
|
||||
{
|
||||
isUbound = Standard_True;
|
||||
dUpar = 0.0;
|
||||
}
|
||||
else if(isBaseSurfUPeriodic)
|
||||
{
|
||||
isUbound = ((uf-UResSt <= CP.X()) && (CP.X() <= ul+UResSt));
|
||||
dUpar = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
isUbound = ((uf-URes <= CP.X()) && (CP.X() <= ul+URes));
|
||||
}
|
||||
|
||||
if(theSurfIsVPeriodic)
|
||||
{
|
||||
isVbound = Standard_True;
|
||||
dVpar = 0.0;
|
||||
}
|
||||
else if(isBaseSurfVPeriodic)
|
||||
{
|
||||
isVbound = ((vf-VResSt <= CP.Y()) && (CP.Y() <= vl+VResSt));
|
||||
dVpar = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
isVbound = ((vf-VRes <= CP.Y()) && (CP.Y() <= vl+VRes));
|
||||
}
|
||||
|
||||
//Point CP is in surface boundary.
|
||||
if(isUbound && isVbound)
|
||||
continue;
|
||||
|
||||
if(!isUbound)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << endl << "----\nFunction Validate(...); file: "
|
||||
"BRepCheck_Edge.cxx" << endl;
|
||||
|
||||
if(isBaseSurfUPeriodic)
|
||||
cout << "RTS from U-periodic" << endl;
|
||||
else if(theSurfIsUPeriodic)
|
||||
cout << "U-periodic surface" << endl;
|
||||
|
||||
cout << "Point #"<< i << "(prm = " << prm << "): (" <<
|
||||
CP.X() << "; " << CP.Y() <<")." << endl;
|
||||
cout << "u = (" << uf << ")...(" << ul << "). "
|
||||
"Delta = " << Max(uf - CP.X(),CP.X()-ul) <<
|
||||
" Tol3D = " << Tol <<". URes = " << URes << " " << UResMax << "\n-----"<< endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
dUpar = 0.0;
|
||||
}
|
||||
|
||||
if(!isVbound)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << endl << "----\nFunction Validate(...); file: "
|
||||
"BRepCheck_Edge.cxx" << endl;
|
||||
|
||||
if(isBaseSurfVPeriodic)
|
||||
cout << "RTS from V-periodic" << endl;
|
||||
else if(theSurfIsVPeriodic)
|
||||
cout << "V-periodic surface" << endl;
|
||||
|
||||
|
||||
cout << "Point #"<< i << "(prm = " << prm << "): (" <<
|
||||
CP.X() << "; " << CP.Y() <<")." << endl;
|
||||
cout << "v = (" << vf << ")...(" << vl << "). "
|
||||
"Delta = " << Max(vf - CP.Y(),CP.Y()-vl) <<
|
||||
" Tol3D = " << Tol <<". VRes = " << VRes << " " << VResMax << "\n-----" << endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
dVpar = 0.0;
|
||||
}
|
||||
|
||||
if(isBaseSurfUPeriodic && isBaseSurfVPeriodic)
|
||||
{
|
||||
Status = BRepCheck_PCurveIsOutOfDomainFace;
|
||||
return Status;
|
||||
}
|
||||
|
||||
//Expected and real point
|
||||
gp_Pnt aPe, aPf;
|
||||
//1st degree estimation
|
||||
aPe.SetXYZ(gp_XYZ(aPref.X() + (aDSdu.X()*dUpar+aDSdv.X()*dVpar),
|
||||
aPref.Y() + (aDSdu.Y()*dUpar+aDSdv.Y()*dVpar),
|
||||
aPref.Z() + (aDSdu.Z()*dUpar+aDSdv.Z()*dVpar)));
|
||||
|
||||
Other.GetSurface()->D0(CP.X(), CP.Y(), aPf);
|
||||
|
||||
const Standard_Real aTol = Tol2;
|
||||
Standard_Real dist = aPe.SquareDistance(aPf);
|
||||
|
||||
if(dist <= aTol)
|
||||
continue;
|
||||
|
||||
#ifdef DEB
|
||||
cout << endl << "++++\nFunction Validate(...); file: "
|
||||
"BRepCheck_Edge.cxx (1st degree)" << endl;
|
||||
cout << "Exp. point: (" << aPe.X() << ", " << aPe.Y() << ", " <<
|
||||
aPe.Z() << ")." << endl;
|
||||
cout << "Real point: (" << aPf.X() << ", " << aPf.Y() << ", " <<
|
||||
aPf.Z() << ")." << endl;
|
||||
cout << "dist**2 = " << dist <<
|
||||
"; Tol = " << aTol << "\n-----" << endl;
|
||||
#endif
|
||||
|
||||
const Standard_Real dUpar2 = dUpar*dUpar;
|
||||
const Standard_Real dVpar2 = dVpar*dVpar;
|
||||
const Standard_Real dUVpar = dUpar*dVpar;
|
||||
|
||||
|
||||
//2nd degree estimation
|
||||
aPe.SetXYZ(gp_XYZ(aPe.X() + (aD2Sdu2.X()*dUpar2 +
|
||||
2.0*aD2Sdudv.X()*dUVpar + aD2Sdv2.X()*dVpar2)/2.0,
|
||||
aPe.Y() + (aD2Sdu2.Y()*dUpar2 +
|
||||
2.0*aD2Sdudv.Y()*dUVpar + aD2Sdv2.Y()*dVpar2)/2.0,
|
||||
aPe.Z() + (aD2Sdu2.Z()*dUpar2 +
|
||||
2.0*aD2Sdudv.Z()*dUVpar + aD2Sdv2.Z()*dVpar2)/2.0));
|
||||
|
||||
dist = aPe.SquareDistance(aPf);
|
||||
|
||||
if(dist > aTol)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << endl << "++++\nFunction Validate(...); file: "
|
||||
"BRepCheck_Edge.cxx (2nd degree)" << endl;
|
||||
cout << "Exp. point: (" << aPe.X() << ", " << aPe.Y() << ", " <<
|
||||
aPe.Z() << ")." << endl;
|
||||
cout << "Real point: (" << aPf.X() << ", " << aPf.Y() << ", " <<
|
||||
aPf.Z() << ")." << endl;
|
||||
cout << "dist**2 = " << dist <<
|
||||
"; Tol = " << aTol << "\n-----" << endl;
|
||||
#endif
|
||||
Status = BRepCheck_PCurveIsOutOfDomainFace;
|
||||
return Status;
|
||||
}
|
||||
}//for (i = 0; i< NCONTROL; ++i)
|
||||
}//if (!proj)
|
||||
else
|
||||
{
|
||||
Extrema_LocateExtPC refd,otherd;
|
||||
Standard_Real OFirst = Other.FirstParameter();
|
||||
Standard_Real OLast = Other.LastParameter();
|
||||
gp_Pnt pd = CRef.Value(First);
|
||||
gp_Pnt pdo = Other.Value(OFirst);
|
||||
Standard_Real distt = pd.SquareDistance(pdo);
|
||||
if (distt > Tol*Tol) {
|
||||
|
||||
if (distt > Tol*Tol)
|
||||
{
|
||||
problematic_point = pd ;
|
||||
Status = Standard_False ;
|
||||
Status = BRepCheck_InvalidCurveOnSurface ;
|
||||
Error = Sqrt(distt);
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
//goto FINISH ;
|
||||
}
|
||||
|
||||
pd = CRef.Value(Last);
|
||||
pdo = Other.Value(OLast);
|
||||
distt = pd.SquareDistance(pdo);
|
||||
if (distt > Tol*Tol) {
|
||||
|
||||
if (distt > Tol*Tol)
|
||||
{
|
||||
problematic_point = pd ;
|
||||
Status = Standard_False ;
|
||||
Status = BRepCheck_InvalidCurveOnSurface ;
|
||||
Error = Sqrt(distt);
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
@@ -631,57 +987,59 @@ Standard_Boolean Validate(const Adaptor3d_Curve& CRef,
|
||||
|
||||
refd.Initialize(CRef,First,Last,CRef.Resolution(Tol));
|
||||
otherd.Initialize(Other,OFirst,OLast,Other.Resolution(Tol));
|
||||
for (Standard_Integer i = 2; i< NCONTROL-1; i++) {
|
||||
Standard_Real rprm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
|
||||
|
||||
for (Standard_Integer i = 2; i< aNbControl-1; i++)
|
||||
{
|
||||
Standard_Real rprm = ((aNbControl-1-i)*First + i*Last)/(aNbControl-1);
|
||||
gp_Pnt pref = CRef.Value(rprm);
|
||||
Standard_Real oprm = ((NCONTROL-1-i)*OFirst + i*OLast)/(NCONTROL-1);
|
||||
Standard_Real oprm = ((aNbControl-1-i)*OFirst + i*OLast)/(aNbControl-1);
|
||||
gp_Pnt pother = Other.Value(oprm);
|
||||
refd.Perform(pother,rprm);
|
||||
if (!refd.IsDone() || refd.SquareDistance() > Tol * Tol) {
|
||||
problematic_point = pref ;
|
||||
Status = Standard_False ;
|
||||
if (refd.IsDone()) {
|
||||
Error = sqrt (refd.SquareDistance());
|
||||
}
|
||||
else {
|
||||
Error = RealLast();
|
||||
}
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
|
||||
if (!refd.IsDone() || refd.SquareDistance() > Tol * Tol)
|
||||
{
|
||||
problematic_point = pref ;
|
||||
Status = BRepCheck_InvalidCurveOnSurface ;
|
||||
|
||||
if (refd.IsDone())
|
||||
{
|
||||
Error = sqrt (refd.SquareDistance());
|
||||
}
|
||||
else
|
||||
{
|
||||
Error = RealLast();
|
||||
}
|
||||
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
//goto FINISH ;
|
||||
}
|
||||
|
||||
otherd.Perform(pref,oprm);
|
||||
if (!otherd.IsDone() || otherd.SquareDistance() > Tol * Tol) {
|
||||
problematic_point = pref ;
|
||||
Status = Standard_False ;
|
||||
if (otherd.IsDone()) {
|
||||
Error = sqrt (otherd.SquareDistance());
|
||||
}
|
||||
else {
|
||||
Error = RealLast();
|
||||
}
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
//goto FINISH ;
|
||||
|
||||
if (!otherd.IsDone() || otherd.SquareDistance() > Tol * Tol)
|
||||
{
|
||||
problematic_point = pref ;
|
||||
Status = BRepCheck_InvalidCurveOnSurface ;
|
||||
if (otherd.IsDone())
|
||||
{
|
||||
Error = sqrt (otherd.SquareDistance());
|
||||
}
|
||||
else
|
||||
{
|
||||
Error = RealLast();
|
||||
}
|
||||
|
||||
PrintProblematicPoint(problematic_point, Error, Tol);
|
||||
return Status;
|
||||
//goto FINISH ;
|
||||
}
|
||||
}
|
||||
}
|
||||
//FINISH :
|
||||
/*
|
||||
#ifdef DEB
|
||||
if (! Status) {
|
||||
cout << " **** probleme de SameParameter au point :" << endl;
|
||||
cout << " " << problematic_point.Coord(1) << " "
|
||||
<< problematic_point.Coord(2) << " "
|
||||
<< problematic_point.Coord(3) << endl ;
|
||||
cout << " Erreur detectee :" << Error << " Tolerance :" << Tol << endl;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
return Status ;
|
||||
|
||||
return Status ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Prec
|
||||
//purpose :
|
||||
|
@@ -73,6 +73,13 @@ is
|
||||
|
||||
is static;
|
||||
|
||||
SetStatus(me: mutable;
|
||||
theStatus:Status from BRepCheck)
|
||||
|
||||
--- Purpose: Sets status of Face;
|
||||
is static;
|
||||
|
||||
|
||||
|
||||
IsUnorientable(me)
|
||||
|
||||
|
@@ -451,6 +451,15 @@ void BRepCheck_Face::SetUnorientable()
|
||||
BRepCheck::Add(myMap(myShape),BRepCheck_UnorientableShape);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetStatus
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void BRepCheck_Face::SetStatus(const BRepCheck_Status theStatus)
|
||||
{
|
||||
BRepCheck::Add(myMap(myShape),theStatus);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsUnorientable
|
||||
|
@@ -388,7 +388,7 @@ Standard_Boolean IsDistanceIn3DTolerance (const BRepAdaptor_Surface& /*aFaceSurf
|
||||
#ifdef DEB
|
||||
cout << endl;
|
||||
cout << "--------Function IsDistanceIn3DTolerance(...)----------" << endl;
|
||||
cout << "--- BRepCheck Wire: Closed3d -> Error" << endl;
|
||||
cout << "--- BRepCheck Wire: Not closed in 3D" << endl;
|
||||
cout << "--- Dist (" << Dist << ") > Tol3d (" << aTol3d << ")" << endl;
|
||||
cout << "Pnt1(" << thePnt_f.X() << "; " << thePnt_f.Y() << "; " << thePnt_f.Z() << ")" << endl;
|
||||
cout << "Pnt2(" << thePnt_l.X() << "; " << thePnt_l.Y() << "; " << thePnt_l.Z() << ")" << endl;
|
||||
@@ -421,7 +421,7 @@ Standard_Boolean IsDistanceIn2DTolerance (const BRepAdaptor_Surface& aFaceSurfac
|
||||
{
|
||||
cout << endl;
|
||||
cout << "--------Function IsDistanceIn2DTolerance(...)----------" << endl;
|
||||
cout << "--- BRepCheck Wire: Not closed in 2d" << endl;
|
||||
cout << "--- BRepCheck Wire: Not closed in 2D" << endl;
|
||||
cout << "*****************************************************" << endl;
|
||||
cout << "*dumin = " << dumin << "; dumax = " << dumax << endl;
|
||||
cout << "* dvmin = " << dvmin << "; dvmax = " << dvmax << endl;
|
||||
@@ -470,7 +470,7 @@ Standard_Boolean IsDistanceIn2DTolerance (const BRepAdaptor_Surface& aFaceSurfac
|
||||
{
|
||||
cout << endl;
|
||||
cout << "--------Function IsDistanceIn2DTolerance(...)----------" << endl;
|
||||
cout << "--- BRepCheck Wire: Not closed in 2d" << endl;
|
||||
cout << "--- BRepCheck Wire: Not closed in 2D" << endl;
|
||||
cout << "*****************************************************" << endl;
|
||||
cout << "* Dist = " << Dist << " > Tol2d = " << aTol2d << endl;
|
||||
cout << "*****************************************************" << endl;
|
||||
|
@@ -21,72 +21,49 @@
|
||||
|
||||
//pmn 26/09/97 Add parameters of approximation in BuildCurve3d
|
||||
// Modified by skv - Thu Jun 3 12:39:19 2004 OCC5898
|
||||
|
||||
#include <BRepLib.ixx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_HCurve2d.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_BSplineCurve.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <GeomLib.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <gp.hxx>
|
||||
#include <gp_Ax2.hxx>
|
||||
#include <gp_Pln.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
#include <BRep_TEdge.hxx>
|
||||
#include <BRep_TFace.hxx>
|
||||
#include <AppParCurves_MultiCurve.hxx>
|
||||
#include <AppParCurves_MultiBSpCurve.hxx>
|
||||
#include <BRep_ListOfCurveRepresentation.hxx>
|
||||
#include <BRep_CurveRepresentation.hxx>
|
||||
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
|
||||
#include <BRep_TVertex.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <AdvApprox_ApproxAFunction.hxx>
|
||||
#include <Approx_CurvilinearParameter.hxx>
|
||||
#include <Approx_SameParameter.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_GCurve.hxx>
|
||||
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
|
||||
#include <BRep_TEdge.hxx>
|
||||
#include <BRepAdaptor_HCurve2d.hxx>
|
||||
#include <BRepAdaptor_HSurface.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
#include <BSplCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Extrema_LocateExtPC.hxx>
|
||||
#include <GCPnts_QuasiUniformDeflection.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_TrimmedCurve.hxx>
|
||||
#include <Geom2d_BSplineCurve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <GeomLib.hxx>
|
||||
#include <ProjLib_ProjectedCurve.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <TColStd_HSequenceOfReal.hxx>
|
||||
#include <TColStd_MapOfTransient.hxx>
|
||||
#include <GeomAdaptor_Curve.hxx>
|
||||
#include <GeomAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_Surface.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom2dAdaptor.hxx>
|
||||
#include <Geom2dConvert.hxx>
|
||||
#include <GCPnts_QuasiUniformDeflection.hxx>
|
||||
#include <BSplCLib.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Extrema_LocateExtPC.hxx>
|
||||
#include <ProjLib_ProjectedCurve.hxx>
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <BRepBndLib.hxx>
|
||||
#include <Approx_CurvilinearParameter.hxx>
|
||||
#include <Geom_BSplineSurface.hxx>
|
||||
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
|
||||
// TODO - not thread-safe static variables
|
||||
static Standard_Real thePrecision = Precision::Confusion();
|
||||
@@ -1776,5 +1753,3 @@ void BRepLib::ReverseSortFaces (const TopoDS_Shape& Sh,
|
||||
LF.Append(LCon); LF.Append(LCyl ); LF.Append(LPlan);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -80,6 +80,12 @@
|
||||
# include <strings.h>
|
||||
#endif
|
||||
|
||||
//Number of BRepCheck_Statuses in BRepCheck_Status.hxx file
|
||||
//(BRepCheck_NoError is not considered, i.e. general status
|
||||
//is smaller by one specified in file)
|
||||
static const Standard_Integer NumberOfStatus = 35;
|
||||
|
||||
|
||||
static char* checkfaultyname = NULL;
|
||||
Standard_EXPORT void BRepTest_CheckCommands_SetFaultyName(const char* name)
|
||||
{
|
||||
@@ -515,40 +521,46 @@ static void FillProblems(const BRepCheck_Status stat,
|
||||
NbProblems->SetValue(14,NbProblems->Value(14)+1); break;
|
||||
case BRepCheck_InvalidRange:
|
||||
NbProblems->SetValue(15,NbProblems->Value(15)+1); break;
|
||||
case BRepCheck_EmptyWire:
|
||||
case BRepCheck_PCurveIsOutOfDomainFace:
|
||||
NbProblems->SetValue(16,NbProblems->Value(16)+1); break;
|
||||
case BRepCheck_RedundantEdge:
|
||||
case BRepCheck_EmptyWire:
|
||||
NbProblems->SetValue(17,NbProblems->Value(17)+1); break;
|
||||
case BRepCheck_SelfIntersectingWire:
|
||||
case BRepCheck_RedundantEdge:
|
||||
NbProblems->SetValue(18,NbProblems->Value(18)+1); break;
|
||||
case BRepCheck_NoSurface:
|
||||
case BRepCheck_SelfIntersectingWire:
|
||||
NbProblems->SetValue(19,NbProblems->Value(19)+1); break;
|
||||
case BRepCheck_InvalidWire:
|
||||
case BRepCheck_NoSurface:
|
||||
NbProblems->SetValue(20,NbProblems->Value(20)+1); break;
|
||||
case BRepCheck_RedundantWire:
|
||||
case BRepCheck_OutOfSurfaceBoundary:
|
||||
NbProblems->SetValue(21,NbProblems->Value(21)+1); break;
|
||||
case BRepCheck_IntersectingWires:
|
||||
case BRepCheck_InvalidWire:
|
||||
NbProblems->SetValue(22,NbProblems->Value(22)+1); break;
|
||||
case BRepCheck_InvalidImbricationOfWires:
|
||||
case BRepCheck_RedundantWire:
|
||||
NbProblems->SetValue(23,NbProblems->Value(23)+1); break;
|
||||
case BRepCheck_EmptyShell:
|
||||
case BRepCheck_IntersectingWires:
|
||||
NbProblems->SetValue(24,NbProblems->Value(24)+1); break;
|
||||
case BRepCheck_RedundantFace:
|
||||
case BRepCheck_InvalidImbricationOfWires:
|
||||
NbProblems->SetValue(25,NbProblems->Value(25)+1); break;
|
||||
case BRepCheck_UnorientableShape:
|
||||
case BRepCheck_EmptyShell:
|
||||
NbProblems->SetValue(26,NbProblems->Value(26)+1); break;
|
||||
case BRepCheck_NotClosed:
|
||||
case BRepCheck_RedundantFace:
|
||||
NbProblems->SetValue(27,NbProblems->Value(27)+1); break;
|
||||
case BRepCheck_NotConnected:
|
||||
case BRepCheck_UnorientableShape:
|
||||
NbProblems->SetValue(28,NbProblems->Value(28)+1); break;
|
||||
case BRepCheck_SubshapeNotInShape:
|
||||
case BRepCheck_NotClosed:
|
||||
NbProblems->SetValue(29,NbProblems->Value(29)+1); break;
|
||||
case BRepCheck_BadOrientation:
|
||||
case BRepCheck_NotConnected:
|
||||
NbProblems->SetValue(30,NbProblems->Value(30)+1); break;
|
||||
case BRepCheck_BadOrientationOfSubshape:
|
||||
case BRepCheck_SubshapeNotInShape:
|
||||
NbProblems->SetValue(31,NbProblems->Value(31)+1); break;
|
||||
case BRepCheck_CheckFail:
|
||||
case BRepCheck_BadOrientation:
|
||||
NbProblems->SetValue(32,NbProblems->Value(32)+1); break;
|
||||
case BRepCheck_BadOrientationOfSubshape:
|
||||
NbProblems->SetValue(33,NbProblems->Value(33)+1); break;
|
||||
case BRepCheck_InvalidToleranceValue:
|
||||
NbProblems->SetValue(34,NbProblems->Value(34)+1); break;
|
||||
case BRepCheck_CheckFail:
|
||||
NbProblems->SetValue(35,NbProblems->Value(35)+1); break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -674,8 +686,9 @@ void StructuralDump(Draw_Interpretor& theCommands,
|
||||
theCommands<<" Check Count"<<"\n";
|
||||
theCommands<<" ------------------------------------------------"<<"\n";
|
||||
|
||||
Handle(TColStd_HArray1OfInteger) NbProblems = new TColStd_HArray1OfInteger(1,32);
|
||||
for(i=1; i<=32; i++) NbProblems->SetValue(i,0);
|
||||
Handle(TColStd_HArray1OfInteger) NbProblems = new
|
||||
TColStd_HArray1OfInteger(1,NumberOfStatus);
|
||||
for(i=1; i<=NumberOfStatus; i++) NbProblems->SetValue(i,0);
|
||||
Handle(TopTools_HSequenceOfShape) sl,slv,sle,slw,slf,sls,slo;
|
||||
sl = new TopTools_HSequenceOfShape();
|
||||
theMap.Clear();
|
||||
@@ -728,55 +741,64 @@ void StructuralDump(Draw_Interpretor& theCommands,
|
||||
theCommands<<" Invalid Range ............................ "<<NbProblems->Value(15)<<"\n";
|
||||
//cout<<" Invalid Range ............................ "<<NbProblems->Value(15)<<endl;
|
||||
if(NbProblems->Value(16)>0)
|
||||
theCommands<<" Empty Wire ............................... "<<NbProblems->Value(16)<<"\n";
|
||||
//cout<<" Empty Wire ............................... "<<NbProblems->Value(16)<<endl;
|
||||
theCommands<<" pcurve is out of domain face.............. "<<NbProblems->Value(16)<<"\n";
|
||||
//cout<<" Invalid Range ............................ "<<NbProblems->Value(15)<<endl;
|
||||
if(NbProblems->Value(17)>0)
|
||||
theCommands<<" Redundant Edge ........................... "<<NbProblems->Value(17)<<"\n";
|
||||
//cout<<" Redundant Edge ........................... "<<NbProblems->Value(17)<<endl;
|
||||
theCommands<<" Empty Wire ............................... "<<NbProblems->Value(17)<<"\n";
|
||||
//cout<<" Empty Wire ............................... "<<NbProblems->Value(16)<<endl;
|
||||
if(NbProblems->Value(18)>0)
|
||||
theCommands<<" Self Intersecting Wire ................... "<<NbProblems->Value(18)<<"\n";
|
||||
//cout<<" Self Intersecting Wire ................... "<<NbProblems->Value(18)<<endl;
|
||||
theCommands<<" Redundant Edge ........................... "<<NbProblems->Value(18)<<"\n";
|
||||
//cout<<" Redundant Edge ........................... "<<NbProblems->Value(17)<<endl;
|
||||
if(NbProblems->Value(19)>0)
|
||||
theCommands<<" No Surface ............................... "<<NbProblems->Value(19)<<"\n";
|
||||
//cout<<" No Surface ............................... "<<NbProblems->Value(19)<<endl;
|
||||
theCommands<<" Self Intersecting Wire ................... "<<NbProblems->Value(19)<<"\n";
|
||||
//cout<<" Self Intersecting Wire ................... "<<NbProblems->Value(18)<<endl;
|
||||
if(NbProblems->Value(20)>0)
|
||||
theCommands<<" Invalid Wire ............................. "<<NbProblems->Value(20)<<"\n";
|
||||
//cout<<" Invalid Wire ............................. "<<NbProblems->Value(20)<<endl;
|
||||
theCommands<<" No Surface ............................... "<<NbProblems->Value(20)<<"\n";
|
||||
//cout<<" No Surface ............................... "<<NbProblems->Value(19)<<endl;
|
||||
if(NbProblems->Value(21)>0)
|
||||
theCommands<<" Redundant Wire ........................... "<<NbProblems->Value(21)<<"\n";
|
||||
//cout<<" Redundant Wire ........................... "<<NbProblems->Value(21)<<endl;
|
||||
theCommands<<" Face is out of it surface boundary........ "<<NbProblems->Value(21)<<"\n";
|
||||
//cout<<" Invalid Wire ............................. "<<NbProblems->Value(20)<<endl;
|
||||
if(NbProblems->Value(22)>0)
|
||||
theCommands<<" Intersecting Wires ....................... "<<NbProblems->Value(22)<<"\n";
|
||||
//cout<<" Intersecting Wires ....................... "<<NbProblems->Value(22)<<endl;
|
||||
theCommands<<" Invalid Wire ............................. "<<NbProblems->Value(22)<<"\n";
|
||||
//cout<<" Invalid Wire ............................. "<<NbProblems->Value(20)<<endl;
|
||||
if(NbProblems->Value(23)>0)
|
||||
theCommands<<" Invalid Imbrication of Wires ............. "<<NbProblems->Value(23)<<"\n";
|
||||
//cout<<" Invalid Imbrication of Wires ............. "<<NbProblems->Value(23)<<endl;
|
||||
theCommands<<" Redundant Wire ........................... "<<NbProblems->Value(23)<<"\n";
|
||||
//cout<<" Redundant Wire ........................... "<<NbProblems->Value(21)<<endl;
|
||||
if(NbProblems->Value(24)>0)
|
||||
theCommands<<" Empty Shell .............................. "<<NbProblems->Value(24)<<"\n";
|
||||
//cout<<" Empty Shell .............................. "<<NbProblems->Value(24)<<endl;
|
||||
theCommands<<" Intersecting Wires ....................... "<<NbProblems->Value(24)<<"\n";
|
||||
//cout<<" Intersecting Wires ....................... "<<NbProblems->Value(22)<<endl;
|
||||
if(NbProblems->Value(25)>0)
|
||||
theCommands<<" Redundant Face ........................... "<<NbProblems->Value(25)<<"\n";
|
||||
//cout<<" Redundant Face ........................... "<<NbProblems->Value(25)<<endl;
|
||||
theCommands<<" Invalid Imbrication of Wires ............. "<<NbProblems->Value(25)<<"\n";
|
||||
//cout<<" Invalid Imbrication of Wires ............. "<<NbProblems->Value(23)<<endl;
|
||||
if(NbProblems->Value(26)>0)
|
||||
theCommands<<" Unorientable Shape ....................... "<<NbProblems->Value(26)<<"\n";
|
||||
//cout<<" Unorientable Shape ....................... "<<NbProblems->Value(26)<<endl;
|
||||
theCommands<<" Empty Shell .............................. "<<NbProblems->Value(26)<<"\n";
|
||||
//cout<<" Empty Shell .............................. "<<NbProblems->Value(24)<<endl;
|
||||
if(NbProblems->Value(27)>0)
|
||||
theCommands<<" Not Closed ............................... "<<NbProblems->Value(27)<<"\n";
|
||||
//cout<<" Not Closed ............................... "<<NbProblems->Value(27)<<endl;
|
||||
theCommands<<" Redundant Face ........................... "<<NbProblems->Value(27)<<"\n";
|
||||
//cout<<" Redundant Face ........................... "<<NbProblems->Value(25)<<endl;
|
||||
if(NbProblems->Value(28)>0)
|
||||
theCommands<<" Not Connected ............................ "<<NbProblems->Value(28)<<"\n";
|
||||
//cout<<" Not Connected ............................ "<<NbProblems->Value(28)<<endl;
|
||||
theCommands<<" Unorientable Shape ....................... "<<NbProblems->Value(28)<<"\n";
|
||||
//cout<<" Unorientable Shape ....................... "<<NbProblems->Value(26)<<endl;
|
||||
if(NbProblems->Value(29)>0)
|
||||
theCommands<<" Subshape not in Shape .................... "<<NbProblems->Value(29)<<"\n";
|
||||
//cout<<" Subshape not in Shape .................... "<<NbProblems->Value(29)<<endl;
|
||||
theCommands<<" Not Closed ............................... "<<NbProblems->Value(29)<<"\n";
|
||||
//cout<<" Not Closed ............................... "<<NbProblems->Value(27)<<endl;
|
||||
if(NbProblems->Value(30)>0)
|
||||
theCommands<<" Bad Orientation .......................... "<<NbProblems->Value(30)<<"\n";
|
||||
//cout<<" Bad Orientation .......................... "<<NbProblems->Value(30)<<endl;
|
||||
theCommands<<" Not Connected ............................ "<<NbProblems->Value(30)<<"\n";
|
||||
//cout<<" Not Connected ............................ "<<NbProblems->Value(28)<<endl;
|
||||
if(NbProblems->Value(31)>0)
|
||||
theCommands<<" Bad Orientation of Subshape .............. "<<NbProblems->Value(31)<<"\n";
|
||||
//cout<<" Bad Orientation of Subshape .............. "<<NbProblems->Value(31)<<endl;
|
||||
theCommands<<" Subshape not in Shape .................... "<<NbProblems->Value(31)<<"\n";
|
||||
//cout<<" Subshape not in Shape .................... "<<NbProblems->Value(29)<<endl;
|
||||
if(NbProblems->Value(32)>0)
|
||||
theCommands<<" checkshape failure......... .............. "<<NbProblems->Value(32)<<"\n";
|
||||
theCommands<<" Bad Orientation .......................... "<<NbProblems->Value(32)<<"\n";
|
||||
//cout<<" Bad Orientation .......................... "<<NbProblems->Value(30)<<endl;
|
||||
if(NbProblems->Value(33)>0)
|
||||
theCommands<<" Bad Orientation of Subshape .............. "<<NbProblems->Value(33)<<"\n";
|
||||
//cout<<" Bad Orientation of Subshape .............. "<<NbProblems->Value(31)<<endl;
|
||||
if(NbProblems->Value(34)>0)
|
||||
theCommands<<" Invalid tolerance......................... "<<NbProblems->Value(34)<<"\n";
|
||||
//cout<<" checkshape failure......... .............. "<<NbProblems->Value(32)<<endl;
|
||||
if(NbProblems->Value(35)>0)
|
||||
theCommands<<" checkshape failure........................ "<<NbProblems->Value(35)<<"\n";
|
||||
//cout<<" checkshape failure......... .............. "<<NbProblems->Value(32)<<endl;
|
||||
|
||||
//cout<<" ------------------------------------------------"<<endl;
|
||||
|
@@ -86,7 +86,30 @@ is
|
||||
|
||||
raises ConstructionError;
|
||||
|
||||
Create (S : Surface from Geom;
|
||||
isUTrim, isVTrim : Boolean;
|
||||
U1, U2, V1, V2 : Real)
|
||||
returns mutable RectangularTrimmedSurface
|
||||
---Purpose :
|
||||
-- The U parametric direction of the surface is oriented from U1
|
||||
-- to U2. The V parametric direction of the surface is oriented
|
||||
-- from V1 to V2.
|
||||
-- These two directions define the orientation of the surface
|
||||
-- (normal). By default in this case the surface has the same
|
||||
-- orientation as the basis surface S.
|
||||
-- isUTrim and isVTrim arguments determine, if it is necessary to
|
||||
-- trim S surface along corresponding direction.
|
||||
-- The returned surface is not closed and not periodic.
|
||||
-- ConstructionError Raised if
|
||||
-- S is not periodic in the UDirection and U1 or U2 are out of the
|
||||
-- bounds of S.
|
||||
-- S is not periodic in the VDirection and V1 or V2 are out of the
|
||||
-- bounds of S.
|
||||
-- U1 = U2 or V1 = V2
|
||||
|
||||
raises ConstructionError;
|
||||
|
||||
|
||||
Create (S : Surface from Geom;
|
||||
Param1, Param2 : Real;
|
||||
UTrim : Boolean;
|
||||
@@ -116,7 +139,37 @@ is
|
||||
-- Param1 or Param2 are out of the bounds of S.
|
||||
-- Param1 = Param2
|
||||
|
||||
SetUTrim (me : mutable; U1, U2 : Real)
|
||||
---Purpose : Sets boundaries of basisSurf in U1 and U2
|
||||
-- along U-direction.
|
||||
-- For periodic surface boundary values can be changed
|
||||
-- algorithmically.
|
||||
raises ConstructionError;
|
||||
---Purpose : Raised if
|
||||
-- The BasisSurface is not periodic in the U-direction and U1 or U2
|
||||
-- are out of the bounds of the BasisSurface.
|
||||
-- U1 = U2
|
||||
|
||||
SetVTrim (me : mutable; V1, V2 : Real)
|
||||
---Purpose : Sets boundaries of basisSurf in V1 and V2
|
||||
-- along V-direction.
|
||||
-- For periodic surface boundary values can be changed
|
||||
-- algorithmically.
|
||||
raises ConstructionError;
|
||||
---Purpose : Raised if
|
||||
-- The BasisSurface is not periodic in the V-direction and V1 or V2
|
||||
-- are out of the bounds of the BasisSurface.
|
||||
-- V1 = V2
|
||||
|
||||
ForceTrim(me : mutable;
|
||||
U1, U2, V1, V2 : Real;
|
||||
UTrim, VTrim : Boolean = Standard_True);
|
||||
---Purpose : For periodic surface this method changes
|
||||
-- (if it is necessary) U2 and V2, so that 0 < U2 - U1 < T and
|
||||
-- 0 < V2 - V1 < T (where T is the period).
|
||||
-- If surface is not periodic, boundaries do not chenge.
|
||||
-- After that it trims basisSurf in new boundaries.
|
||||
|
||||
SetTrim (me : mutable;
|
||||
U1, U2, V1, V2 : Real;
|
||||
USense, VSense : Boolean = Standard_True)
|
||||
@@ -368,6 +421,10 @@ is
|
||||
|
||||
Copy (me) returns mutable like me;
|
||||
---Purpose: Creates a new object which is a copy of this patch.
|
||||
|
||||
GetTrimmedFlags(me; isUtrimmed,isVtrimmed : in out Boolean from Standard);
|
||||
---Purpose: Allows to get <isutrimmed> and <isvtrimmed> members values.
|
||||
|
||||
fields
|
||||
|
||||
basisSurf : Surface from Geom;
|
||||
|
@@ -87,6 +87,45 @@ Handle(Geom_Geometry) Geom_RectangularTrimmedSurface::Copy () const {
|
||||
return S;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Geom_RectangularTrimmedSurface
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface(
|
||||
const Handle(Geom_Surface)& S,
|
||||
const Standard_Boolean isUTrim,
|
||||
const Standard_Boolean isVTrim,
|
||||
const Standard_Real U1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real V2): utrim1(U1),
|
||||
vtrim1(V1),
|
||||
utrim2(U2),
|
||||
vtrim2(V2),
|
||||
isutrimmed (isUTrim),
|
||||
isvtrimmed (isVTrim)
|
||||
{
|
||||
// kill trimmed basis surfaces
|
||||
Handle(Geom_RectangularTrimmedSurface) T =
|
||||
Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
|
||||
if (!T.IsNull())
|
||||
basisSurf = Handle(Surface)::DownCast(T->BasisSurface()->Copy());
|
||||
else
|
||||
basisSurf = Handle(Surface)::DownCast(S->Copy());
|
||||
|
||||
Handle(Geom_OffsetSurface) O =
|
||||
Handle(Geom_OffsetSurface)::DownCast(basisSurf);
|
||||
if (!O.IsNull())
|
||||
{
|
||||
Handle(Geom_RectangularTrimmedSurface) S2 =
|
||||
new Geom_RectangularTrimmedSurface( O->BasisSurface(),U1,U2, V1, V2, isUTrim, isVTrim);
|
||||
Handle(Geom_OffsetSurface) OS = new Geom_OffsetSurface(S2, O->Offset());
|
||||
basisSurf = Handle(Surface)::DownCast(OS);
|
||||
}
|
||||
|
||||
ForceTrim( U1, U2, V1, V2, isUTrim, isVTrim);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Geom_RectangularTrimmedSurface
|
||||
@@ -168,6 +207,172 @@ Geom_RectangularTrimmedSurface::Geom_RectangularTrimmedSurface (
|
||||
SetTrim(Param1, Param2, UTrim, Sense);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetUTrim
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom_RectangularTrimmedSurface::SetUTrim(const Standard_Real theU1,
|
||||
const Standard_Real theU2)
|
||||
{
|
||||
const Standard_Real Udeb = utrim1, Ufin = utrim2;
|
||||
|
||||
utrim1 = theU1;
|
||||
utrim2 = theU2;
|
||||
|
||||
if ( utrim1 == utrim2)
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::U1==U2");
|
||||
|
||||
if (basisSurf->IsUPeriodic())
|
||||
{
|
||||
ElCLib::AdjustPeriodic(Udeb, Ufin,
|
||||
Min(Abs(utrim2-utrim1)/2,Precision::PConfusion()), utrim1, utrim2);
|
||||
}//if (basisSurf->IsUPeriodic())
|
||||
else
|
||||
{
|
||||
if (utrim1 > utrim2)
|
||||
{
|
||||
//change some places of theUTrim1 and theUTrim2
|
||||
Standard_Real ut = utrim1;
|
||||
utrim1 = utrim2;
|
||||
utrim2 = ut;
|
||||
}
|
||||
|
||||
if ( (Udeb-utrim1 > Precision::PConfusion()) ||
|
||||
(utrim2-Ufin > Precision::PConfusion()))
|
||||
{
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::Uparameters out of range");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetVTrim
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom_RectangularTrimmedSurface::SetVTrim(const Standard_Real theV1,
|
||||
const Standard_Real theV2)
|
||||
{
|
||||
const Standard_Real Vdeb = vtrim1, Vfin = vtrim2;
|
||||
|
||||
vtrim1 = theV1;
|
||||
vtrim2 = theV2;
|
||||
|
||||
if ( vtrim1 == vtrim2)
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::V1==V2");
|
||||
|
||||
if (basisSurf->IsVPeriodic())
|
||||
{
|
||||
ElCLib::AdjustPeriodic(Vdeb, Vfin,
|
||||
Min(Abs(vtrim2-vtrim1)/2,Precision::PConfusion()),vtrim1, vtrim2);
|
||||
}//if (basisSurf->IsVPeriodic())
|
||||
else
|
||||
{
|
||||
if (vtrim1 > vtrim2)
|
||||
{
|
||||
Standard_Real vt = vtrim1;
|
||||
vtrim1 = vtrim2;
|
||||
vtrim2 = vt;
|
||||
}
|
||||
|
||||
if ( (Vdeb-vtrim1 > Precision::PConfusion()) ||
|
||||
(vtrim2-Vfin > Precision::PConfusion()))
|
||||
{
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::V parameters out of range");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ForceTrim
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom_RectangularTrimmedSurface::ForceTrim(const Standard_Real theU1,
|
||||
const Standard_Real theU2,
|
||||
const Standard_Real theV1,
|
||||
const Standard_Real theV2,
|
||||
const Standard_Boolean isUTrim,
|
||||
const Standard_Boolean isVTrim)
|
||||
{
|
||||
basisSurf->Bounds(utrim1, utrim2, vtrim1, vtrim2);
|
||||
|
||||
isutrimmed = isUTrim;
|
||||
isvtrimmed = isVTrim;
|
||||
|
||||
// Trimming along U-Direction
|
||||
if (isutrimmed)
|
||||
{
|
||||
utrim1 = theU1;
|
||||
utrim2 = theU2;
|
||||
|
||||
if((utrim1 > utrim2) || !(basisSurf->IsUPeriodic()))
|
||||
{
|
||||
//Standard_ConstructionError::Raise
|
||||
// ("Geom_RectangularTrimmedSurface::ForceTrim(...). "
|
||||
// "utrim1 > utrim2");
|
||||
|
||||
SetUTrim(theU1,theU2);
|
||||
}
|
||||
else
|
||||
{
|
||||
const Standard_Real aTolPeriodicFactor = 1.0e-7;
|
||||
const Standard_Real aT = basisSurf->UPeriod();
|
||||
const Standard_Real aTol = aTolPeriodicFactor * aT;
|
||||
if(utrim2 - utrim1 - aT > 2.0*aTol)
|
||||
{
|
||||
Standard_Integer n = RealToInt((utrim2 - utrim1)/aT);
|
||||
utrim2 -= (n * aT);
|
||||
|
||||
if(utrim2 - utrim1 < aTol)
|
||||
utrim2 += aT;
|
||||
}
|
||||
|
||||
//if(utrim2 - utrim1 < aTol)
|
||||
// Standard_ConstructionError::Raise
|
||||
// ("Geom_RectangularTrimmedSurface::SetTrim(...)."
|
||||
// "ERROR in adjust U-parameter!");
|
||||
}
|
||||
}
|
||||
|
||||
// Trimming along V-Direction
|
||||
if (isvtrimmed)
|
||||
{
|
||||
vtrim1 = theV1;
|
||||
vtrim2 = theV2;
|
||||
|
||||
if ((vtrim1 > vtrim2) || !(basisSurf->IsVPeriodic()))
|
||||
{
|
||||
//Standard_ConstructionError::Raise
|
||||
// ("Geom_RectangularTrimmedSurface::ForceTrim(...). "
|
||||
// "vtrim1 > vtrim2");
|
||||
|
||||
SetVTrim(theV1,theV2);
|
||||
}
|
||||
else
|
||||
{
|
||||
const Standard_Real aTolPeriodicFactor = 1.0e-7;
|
||||
const Standard_Real aT = basisSurf->VPeriod();
|
||||
const Standard_Real aTol = aTolPeriodicFactor * aT;
|
||||
|
||||
if(vtrim2 - vtrim1 - aT > 2.0*aTol)
|
||||
{
|
||||
Standard_Integer n = RealToInt((vtrim2 - vtrim1)/aT);
|
||||
vtrim2 -= (n * aT);
|
||||
|
||||
if(vtrim2 - vtrim1 < aTol)
|
||||
vtrim2 += aT;
|
||||
}
|
||||
|
||||
//if(vtrim2 - vtrim1 < aTol)
|
||||
// Standard_ConstructionError::Raise
|
||||
// ("Geom_RectangularTrimmedSurface::SetTrim(...)."
|
||||
// "ERROR in adjust V-parameter!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTrim
|
||||
@@ -221,107 +426,36 @@ void Geom_RectangularTrimmedSurface::SetTrim (const Standard_Real Param1,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void Geom_RectangularTrimmedSurface::SetTrim(const Standard_Real U1,
|
||||
const Standard_Real U2,
|
||||
const Standard_Real V1,
|
||||
const Standard_Real V2,
|
||||
const Standard_Boolean UTrim,
|
||||
const Standard_Boolean VTrim,
|
||||
const Standard_Boolean USense,
|
||||
const Standard_Boolean VSense) {
|
||||
|
||||
Standard_Boolean UsameSense = Standard_True;
|
||||
Standard_Boolean VsameSense = Standard_True;
|
||||
Standard_Real Udeb, Ufin, Vdeb, Vfin;
|
||||
void Geom_RectangularTrimmedSurface::SetTrim(
|
||||
const Standard_Real theU1,
|
||||
const Standard_Real theU2,
|
||||
const Standard_Real theV1,
|
||||
const Standard_Real theV2,
|
||||
const Standard_Boolean isUTrim,
|
||||
const Standard_Boolean isVTrim,
|
||||
const Standard_Boolean isUSense,
|
||||
const Standard_Boolean isVSense)
|
||||
{
|
||||
Standard_Boolean UsameSense = !(isUSense && (theU1 > theU2));
|
||||
Standard_Boolean VsameSense = !(isVSense && (theV1 > theV2));
|
||||
|
||||
basisSurf->Bounds(Udeb, Ufin, Vdeb, Vfin);
|
||||
basisSurf->Bounds(utrim1, utrim2, vtrim1, vtrim2);
|
||||
|
||||
isutrimmed = isUTrim;
|
||||
isvtrimmed = isVTrim;
|
||||
|
||||
// Trimming the U-Direction
|
||||
isutrimmed = UTrim;
|
||||
if (!UTrim) {
|
||||
utrim1 = Udeb;
|
||||
utrim2 = Ufin;
|
||||
}
|
||||
else {
|
||||
if ( U1 == U2)
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::U1==U2");
|
||||
|
||||
if (basisSurf->IsUPeriodic()) {
|
||||
UsameSense = USense;
|
||||
|
||||
// set uTrim1 in the range Udeb , Ufin
|
||||
// set uTrim2 in the range uTrim1 , uTrim1 + Period()
|
||||
utrim1 = U1;
|
||||
utrim2 = U2;
|
||||
ElCLib::AdjustPeriodic(Udeb, Ufin,
|
||||
Min(Abs(utrim2-utrim1)/2,Precision::PConfusion()),
|
||||
utrim1, utrim2);
|
||||
}
|
||||
else {
|
||||
if (U1 < U2) {
|
||||
UsameSense = USense;
|
||||
utrim1 = U1;
|
||||
utrim2 = U2;
|
||||
}
|
||||
else {
|
||||
UsameSense = !USense;
|
||||
utrim1 = U2;
|
||||
utrim2 = U1;
|
||||
}
|
||||
|
||||
if ((Udeb-utrim1 > Precision::PConfusion()) ||
|
||||
(utrim2-Ufin > Precision::PConfusion()))
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::U parameters out of range");
|
||||
|
||||
}
|
||||
}
|
||||
if (isutrimmed)
|
||||
SetUTrim(theU1,theU2);
|
||||
|
||||
// Trimming the V-Direction
|
||||
isvtrimmed = VTrim;
|
||||
if (!VTrim) {
|
||||
vtrim1 = Vdeb;
|
||||
vtrim2 = Vfin;
|
||||
}
|
||||
else {
|
||||
if ( V1 == V2)
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::V1==V2");
|
||||
if (isvtrimmed)
|
||||
SetVTrim(theV1,theV2);
|
||||
|
||||
if (basisSurf->IsVPeriodic()) {
|
||||
VsameSense = VSense;
|
||||
|
||||
// set vTrim1 in the range Vdeb , Vfin
|
||||
// set vTrim2 in the range vTrim1 , vTrim1 + Period()
|
||||
vtrim1 = V1;
|
||||
vtrim2 = V2;
|
||||
ElCLib::AdjustPeriodic(Vdeb, Vfin,
|
||||
Min(Abs(vtrim2-vtrim1)/2,Precision::PConfusion()),
|
||||
vtrim1, vtrim2);
|
||||
}
|
||||
else {
|
||||
if (V1 < V2) {
|
||||
VsameSense = VSense;
|
||||
vtrim1 = V1;
|
||||
vtrim2 = V2;
|
||||
}
|
||||
else {
|
||||
VsameSense = !VSense;
|
||||
vtrim1 = V2;
|
||||
vtrim2 = V1;
|
||||
}
|
||||
|
||||
if ((Vdeb-vtrim1 > Precision::PConfusion()) ||
|
||||
(vtrim2-Vfin > Precision::PConfusion()))
|
||||
Standard_ConstructionError::Raise
|
||||
("Geom_RectangularTrimmedSurface::V parameters out of range");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!UsameSense) UReverse();
|
||||
if (!VsameSense) VReverse();
|
||||
if (!UsameSense)
|
||||
UReverse();
|
||||
if (!VsameSense)
|
||||
VReverse();
|
||||
}
|
||||
|
||||
|
||||
@@ -666,3 +800,12 @@ gp_GTrsf2d Geom_RectangularTrimmedSurface::ParametricTransformation
|
||||
return basisSurf->ParametricTransformation(T);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetTrimmedFlags
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Geom_RectangularTrimmedSurface::GetTrimmedFlags(Standard_Boolean& isU, Standard_Boolean& isV) const
|
||||
{
|
||||
isU = isutrimmed;
|
||||
isV = isvtrimmed;
|
||||
}
|
@@ -528,7 +528,14 @@ static void Print(const Handle(Geom_RectangularTrimmedSurface)& S,
|
||||
if (compact)
|
||||
OS << RECTANGULAR << " ";
|
||||
else
|
||||
{
|
||||
OS << "RectangularTrimmedSurface";
|
||||
|
||||
Standard_Boolean isUtr, isVtr;
|
||||
S->GetTrimmedFlags(isUtr, isVtr);
|
||||
|
||||
OS << " (uTrim = " << isUtr << ", vTrim = " << isVtr << ")";
|
||||
}
|
||||
|
||||
Standard_Real U1,U2,V1,V2;
|
||||
S->Bounds(U1,U2,V1,V2);
|
||||
|
@@ -20,55 +20,51 @@
|
||||
|
||||
#include <SWDRAW_ShapeFix.ixx>
|
||||
|
||||
#include <Draw.hxx>
|
||||
#include <DBRep.hxx>
|
||||
#include <SWDRAW.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepBuilderAPI.hxx>
|
||||
#include <BRepCheck_Analyzer.hxx>
|
||||
#include <BRepCheck_ListIteratorOfListOfStatus.hxx>
|
||||
#include <BRepCheck_Result.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <BRepTopAdaptor_FClass2d.hxx>
|
||||
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_WireOrder.hxx>
|
||||
#include <ShapeAnalysis_WireVertex.hxx>
|
||||
#include <ShapeAnalysis_Wire.hxx>
|
||||
#include <ShapeExtend_WireData.hxx>
|
||||
#include <ShapeFix.hxx>
|
||||
#include <ShapeFix_ShapeTolerance.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeFix_WireVertex.hxx>
|
||||
#include <ShapeFix_Wireframe.hxx>
|
||||
#include <ShapeFix_Face.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <ShapeExtend_DataMapOfShapeListOfMsg.hxx>
|
||||
#include <ShapeExtend_MsgRegistrator.hxx>
|
||||
#include <ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg.hxx>
|
||||
#include <DBRep.hxx>
|
||||
#include <Draw.hxx>
|
||||
#include <Draw_ProgressIndicator.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <Message_ListIteratorOfListOfMsg.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_FreeBounds.hxx>
|
||||
#include <ShapeAnalysis_Wire.hxx>
|
||||
#include <ShapeAnalysis_WireOrder.hxx>
|
||||
#include <ShapeAnalysis_WireVertex.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeExtend_DataMapIteratorOfDataMapOfShapeListOfMsg.hxx>
|
||||
#include <ShapeExtend_MsgRegistrator.hxx>
|
||||
#include <ShapeFix.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <ShapeFix_Face.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
#include <ShapeFix_ShapeTolerance.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeFix_Wireframe.hxx>
|
||||
#include <ShapeFix_WireVertex.hxx>
|
||||
#include <SWDRAW.hxx>
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColStd_DataMapIteratorOfDataMapOfAsciiStringInteger.hxx>
|
||||
#include <TColStd_DataMapOfAsciiStringInteger.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
|
||||
#include <Draw_ProgressIndicator.hxx>
|
||||
#include <ShapeAnalysis_FreeBounds.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
|
||||
#ifdef AIX
|
||||
#include <strings.h>
|
||||
@@ -756,6 +752,277 @@ static Standard_Integer connectedges(Draw_Interpretor& di, Standard_Integer n, c
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FixPCurveOfFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer FixPCurveOfFace(Draw_Interpretor& theDI,
|
||||
Standard_Integer theNArg,
|
||||
const char** theArg)
|
||||
{
|
||||
if(theNArg < 2)
|
||||
{
|
||||
theDI << "use \"ffixpcu face\".\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Standard_Boolean isForsing = Standard_False;
|
||||
//Standard_Boolean isSplitForbidden = Standard_True;
|
||||
|
||||
//if(theNArg > 2)
|
||||
//{
|
||||
// for (Standard_Integer i = 2; i < theNArg; i++)
|
||||
// {
|
||||
// if(theArg[i][0] == '-')
|
||||
// {
|
||||
// switch(theArg[i][1])
|
||||
// {
|
||||
// case 'f':
|
||||
// isForsing = Standard_True;
|
||||
// break;
|
||||
// case 's':
|
||||
// isSplitForbidden = Standard_False;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
TopoDS_Shape aS=DBRep::Get(theArg[1]);
|
||||
if (aS.IsNull()) {
|
||||
theDI << "null shapes is not allowed here\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (aS.ShapeType()!=TopAbs_FACE) {
|
||||
char buff[256];
|
||||
Sprintf ( buff, "shape %s must be a face\n", theArg[1]);
|
||||
theDI << buff;
|
||||
return 1;
|
||||
}
|
||||
|
||||
TopoDS_Face aF=*((TopoDS_Face*)&aS);
|
||||
|
||||
BRepCheck_Analyzer anAna(aF);
|
||||
|
||||
if(anAna.IsValid())
|
||||
{
|
||||
theDI << "Face is valid!\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
BRepCheck_ListIteratorOfListOfStatus itl;
|
||||
itl.Initialize(anAna.Result(aF)->Status());
|
||||
|
||||
if (itl.Value() != BRepCheck_OutOfSurfaceBoundary)
|
||||
{
|
||||
theDI << "Other Status!\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
TopoDS_Shape aNS = TopoDS_Shape();
|
||||
ShapeFix::RefineFace(aF, aNS/*, isForsing, isSplitForbidden*/);
|
||||
|
||||
if(aNS.IsNull())
|
||||
DBRep::Set(theArg[1], aF);
|
||||
else
|
||||
DBRep::Set(theArg[1], aNS);
|
||||
|
||||
//
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : FixPCurveOfShape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
static Standard_Integer FixPCurveOfShape(Draw_Interpretor& theDI,
|
||||
Standard_Integer theNArg,
|
||||
const char** theArg)
|
||||
{
|
||||
if(theNArg < 3)
|
||||
{
|
||||
theDI << "use \"sfixpcu result shape\".\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Standard_Boolean isForsing = Standard_False;
|
||||
//Standard_Boolean isSplitForbidden = Standard_True;
|
||||
|
||||
//if(theNArg > 3)
|
||||
//{
|
||||
// for (Standard_Integer i = 3; i < theNArg; i++)
|
||||
// {
|
||||
// if(theArg[i][0] == '-')
|
||||
// {
|
||||
// switch(theArg[i][1])
|
||||
// {
|
||||
// case 'f':
|
||||
// isForsing = Standard_True;
|
||||
// break;
|
||||
// case 's':
|
||||
// isSplitForbidden = Standard_False;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
TopoDS_Shape aS=DBRep::Get(theArg[2]);
|
||||
|
||||
if (aS.IsNull()) {
|
||||
theDI << "null shapes is not allowed here\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Boolean doCompound = Standard_False;
|
||||
BRep_Builder aBuilder;
|
||||
TopoDS_Compound aSt;
|
||||
aBuilder.MakeCompound(aSt);
|
||||
aSt.Free(Standard_True);
|
||||
|
||||
TopExp_Explorer exp;
|
||||
for (exp.Init(aS,TopAbs_FACE); exp.More();exp.Next())
|
||||
{
|
||||
const TopoDS_Shape& aS1 = exp.Current();
|
||||
TopoDS_Face aF=*((TopoDS_Face*)&aS1);
|
||||
|
||||
BRepCheck_Analyzer anAna(aF);
|
||||
if(anAna.IsValid())
|
||||
{
|
||||
aBuilder.Add(aSt,aF);
|
||||
continue;
|
||||
}
|
||||
|
||||
BRepCheck_ListIteratorOfListOfStatus itl;
|
||||
itl.Initialize(anAna.Result(aF)->Status());
|
||||
if (itl.Value() != BRepCheck_OutOfSurfaceBoundary)
|
||||
{
|
||||
aBuilder.Add(aSt,aF);
|
||||
continue;
|
||||
}
|
||||
|
||||
TopoDS_Shape aNS = TopoDS_Shape();
|
||||
ShapeFix::RefineFace(aF, aNS/*, isForsing,isSplitForbidden*/);
|
||||
|
||||
if(!aNS.IsNull())
|
||||
{
|
||||
aBuilder.Add(aSt,aNS);
|
||||
doCompound = Standard_True;
|
||||
}
|
||||
else
|
||||
{
|
||||
aBuilder.Add(aSt,aF);
|
||||
}
|
||||
}
|
||||
|
||||
if(doCompound)
|
||||
{
|
||||
aSt.Free(aS.Free());
|
||||
DBRep::Set(theArg[1],aSt);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBRep::Set(theArg[1],aS);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
////=======================================================================
|
||||
////function : splitfix
|
||||
////purpose :
|
||||
////=======================================================================
|
||||
//static Standard_Integer splitfix(Draw_Interpretor& theDI,
|
||||
// Standard_Integer theNArg,
|
||||
// const char** theArg)
|
||||
//{
|
||||
// if (theNArg < 3) {
|
||||
// theDI << "use: splitface result face [-p]\n";
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// TopoDS_Face aFace;
|
||||
// {
|
||||
// TopoDS_Shape aShape = DBRep::Get(theArg[2]) ;
|
||||
// if (aShape.IsNull())
|
||||
// {
|
||||
// theDI << "null shapes is not allowed here\n";
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// aFace = TopoDS::Face ( aShape );
|
||||
// }
|
||||
//
|
||||
// if ( aFace.IsNull() ) {
|
||||
// theDI << theArg[2] << " is not Face\n";
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// Standard_Real anUFf, anUFl, aVFf, aVFl;
|
||||
// BRepTools::UVBounds(aFace, anUFf, anUFl, aVFf, aVFl);
|
||||
//
|
||||
// Standard_Real anUSf, anUSl, aVSf, aVSl;
|
||||
// Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
|
||||
//
|
||||
// if (aSurf->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
|
||||
// {
|
||||
// Handle(Geom_RectangularTrimmedSurface) TS =
|
||||
// Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf);
|
||||
//
|
||||
// aSurf = TS->BasisSurface();
|
||||
// }
|
||||
//
|
||||
// aSurf->Bounds(anUSf, anUSl, aVSf, aVSl);
|
||||
//
|
||||
// Standard_Real anURem = 0.0, aVRem = 0.0;
|
||||
// Standard_Integer aNU = 1, aNV = 1;
|
||||
//
|
||||
// TopoDS_Shape aNewSh = TopoDS_Shape();
|
||||
// Standard_Boolean isSplitByU, isSplitByV;
|
||||
//
|
||||
// const Standard_Real duf = anUFl - anUFf;
|
||||
// const Standard_Real dus = anUSl - anUSf;
|
||||
// const Standard_Real dvf = aVFl - aVFf;
|
||||
// const Standard_Real dvs = aVSl - aVSf;
|
||||
//
|
||||
// isSplitByU = /*aSurf->IsUPeriodic() && */
|
||||
// duf > dus;
|
||||
// isSplitByV = /*aSurf->IsVPeriodic() && */
|
||||
// dvf > dvs;
|
||||
//
|
||||
// if(isSplitByU)
|
||||
// {
|
||||
// theDI << "Splitting by U: " << anUSf << ", " << anUSl << "\n";
|
||||
// aNU += 2;
|
||||
// anURem = RealMod(duf,dus);
|
||||
// }
|
||||
//
|
||||
// if(isSplitByV)
|
||||
// {
|
||||
// theDI << "Splitting by V: " << aVSf << ", " << aVSl << "\n";
|
||||
// aNV += 2;
|
||||
// aVRem = RealMod(dvf,dvs);
|
||||
// }
|
||||
//
|
||||
// if (!(isSplitByU || isSplitByV))
|
||||
// {
|
||||
// theDI << "No splitting required!\n";
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// ShapeFix::SplittingFace(aFace, aNewSh, aSurf, dus/2.0, dvs/2.0, anUFf, aVFf,
|
||||
// anURem, aVRem, isSplitByU, isSplitByV);
|
||||
//
|
||||
// if(!aNewSh.IsNull())
|
||||
// DBRep::Set(theArg[1], aNewSh);
|
||||
// else
|
||||
// theDI << "No splitting result was found!\n";
|
||||
//
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : InitCommands
|
||||
//purpose :
|
||||
@@ -792,6 +1059,14 @@ static Standard_Integer connectedges(Draw_Interpretor& di, Standard_Integer n, c
|
||||
__FILE__,checkfclass2d,g);
|
||||
theCommands.Add ("connectedges","res shape [toler shared]",
|
||||
__FILE__,connectedges,g);
|
||||
|
||||
theCommands.Add ("ffixpcu"," ffixpcu face (to fix face with "
|
||||
"\"BRepCheck_OutOfSurfaceBoundary\" status) ", __FILE__,FixPCurveOfFace,g);
|
||||
|
||||
theCommands.Add ("sfixpcu"," sfixpcu result shape (to fix shape, which contains face with "
|
||||
"\"BRepCheck_OutOfSurfaceBoundary\" status) ", __FILE__,FixPCurveOfShape,g);
|
||||
|
||||
//theCommands.Add ("splitfix"," splitfix result face [u usplit1 usplit2...] "
|
||||
// "[v vsplit1 vsplit2 ...]",__FILE__,splitfix,g);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -35,8 +35,9 @@ uses
|
||||
TopTools,
|
||||
BRep,
|
||||
ShapeExtend,
|
||||
BRepTools
|
||||
|
||||
BRepTools,
|
||||
GeomAbs
|
||||
|
||||
is
|
||||
|
||||
class Vertex;
|
||||
|
@@ -33,7 +33,8 @@ uses
|
||||
Location from TopLoc,
|
||||
Vertex from TopoDS,
|
||||
Face from TopoDS,
|
||||
Edge from TopoDS
|
||||
Edge from TopoDS,
|
||||
Shape from GeomAbs
|
||||
|
||||
is
|
||||
|
||||
@@ -86,14 +87,15 @@ is
|
||||
-- only pcurve corresponding to the orientation of the edge is
|
||||
-- replaced
|
||||
|
||||
ReassignPCurve (me; edge: Edge from TopoDS;
|
||||
old, sub: Face from TopoDS)
|
||||
ReassignPCurve (me; edge: Edge from TopoDS;
|
||||
old, sub: Face from TopoDS;
|
||||
theContinuity : Shape from GeomAbs = GeomAbs_C0)
|
||||
returns Boolean;
|
||||
---Purpose: Reassign edge pcurve lying on face <old> to another face <sub>.
|
||||
-- If edge has two pcurves on <old> face, only one of them will be
|
||||
---Purpose: Reassign edge pcurve lying on face <old> to another face <sub>.
|
||||
-- If edge has two pcurves on <old> face, only one of them will be
|
||||
-- reassigned, and other will left alone. Similarly, if edge already
|
||||
-- had a pcurve on face <sub>, it will have two pcurves on it.
|
||||
-- Returns True if succeeded, False if no pcurve lying on <old> found.
|
||||
-- Returns True if succeeded, False if no pcurve lying on <old> found.
|
||||
|
||||
TransformPCurve(me; pcurve: Curve from Geom2d;
|
||||
trans : Trsf2d from gp;
|
||||
|
@@ -407,14 +407,13 @@ void ShapeBuild_Edge::ReplacePCurve (const TopoDS_Edge& edge,
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReassignPCurve
|
||||
//purpose :
|
||||
//function : CountPCurves
|
||||
//purpose : Count exact number of pcurves STORED in edge for face
|
||||
// This makes difference for faces based on plane surfaces
|
||||
// where pcurves can be not stored but returned by
|
||||
// BRep_Tools::CurveOnSurface
|
||||
//=======================================================================
|
||||
|
||||
// Count exact number of pcurves STORED in edge for face
|
||||
// This makes difference for faces based on plane surfaces where pcurves can be
|
||||
// not stored but returned by BRep_Tools::CurveOnSurface
|
||||
static Standard_Integer CountPCurves (const TopoDS_Edge &edge,
|
||||
static Standard_Integer CountPCurves(const TopoDS_Edge &edge,
|
||||
const TopoDS_Face &face)
|
||||
{
|
||||
TopLoc_Location L;
|
||||
@@ -430,9 +429,15 @@ static Standard_Integer CountPCurves (const TopoDS_Edge &edge,
|
||||
return 0;
|
||||
}
|
||||
|
||||
Standard_Boolean ShapeBuild_Edge::ReassignPCurve (const TopoDS_Edge& edge,
|
||||
const TopoDS_Face& old,
|
||||
const TopoDS_Face& sub) const
|
||||
//=======================================================================
|
||||
//function : ReassignPCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean
|
||||
ShapeBuild_Edge::ReassignPCurve(const TopoDS_Edge& edge,
|
||||
const TopoDS_Face& old,
|
||||
const TopoDS_Face& sub,
|
||||
const GeomAbs_Shape theContinuity) const
|
||||
{
|
||||
Standard_Integer npcurves = CountPCurves ( edge, old );
|
||||
//if ( npcurves <1 ) return Standard_False; //gka
|
||||
@@ -440,14 +445,16 @@ Standard_Boolean ShapeBuild_Edge::ReassignPCurve (const TopoDS_Edge& edge,
|
||||
Standard_Real f, l;
|
||||
Handle(Geom2d_Curve) pc;
|
||||
pc = BRep_Tool::CurveOnSurface ( edge, old, f, l );
|
||||
if ( pc.IsNull() ) return Standard_False;
|
||||
else if( npcurves == 0) npcurves =1; //gka
|
||||
|
||||
|
||||
if (pc.IsNull())
|
||||
return Standard_False;
|
||||
else if(npcurves == 0)
|
||||
npcurves =1; //gka
|
||||
|
||||
BRep_Builder B;
|
||||
|
||||
// if the pcurve was only one, remove; else leave second one
|
||||
if ( npcurves >1 ) {
|
||||
if ( npcurves >1 )
|
||||
{
|
||||
//smh#8 Porting AIX
|
||||
TopoDS_Shape tmpshape = edge.Reversed();
|
||||
TopoDS_Edge erev = TopoDS::Edge (tmpshape);
|
||||
@@ -455,11 +462,13 @@ Standard_Boolean ShapeBuild_Edge::ReassignPCurve (const TopoDS_Edge& edge,
|
||||
B.UpdateEdge ( edge, pc2, old, 0. );
|
||||
B.Range ( edge, old, f, l );
|
||||
}
|
||||
else RemovePCurve ( edge, old );
|
||||
else
|
||||
RemovePCurve ( edge, old );
|
||||
|
||||
// if edge does not have yet pcurves on sub, just add; else add as first
|
||||
Standard_Integer npcs = CountPCurves ( edge, sub );
|
||||
if ( npcs <1 ) B.UpdateEdge ( edge, pc, sub, 0. );
|
||||
if ( npcs < 1 )
|
||||
B.UpdateEdge ( edge, pc, sub, 0. );
|
||||
else {
|
||||
//smh#8 Porting AIX
|
||||
TopoDS_Shape tmpshape = edge.Reversed();
|
||||
@@ -467,8 +476,9 @@ Standard_Boolean ShapeBuild_Edge::ReassignPCurve (const TopoDS_Edge& edge,
|
||||
Standard_Real cf, cl;
|
||||
Handle(Geom2d_Curve) pcs = BRep_Tool::CurveOnSurface ( erev, sub, cf, cl );
|
||||
if ( edge.Orientation() == TopAbs_REVERSED ) // because B.UpdateEdge does not check edge orientation
|
||||
B.UpdateEdge ( edge, pcs, pc, sub, 0. );
|
||||
else B.UpdateEdge ( edge, pc, pcs, sub, 0. );
|
||||
B.UpdateEdge ( edge, pcs, pc, sub, 0., theContinuity);
|
||||
else
|
||||
B.UpdateEdge ( edge, pc, pcs, sub, 0., theContinuity);
|
||||
}
|
||||
|
||||
B.Range ( edge, sub, f, l );
|
||||
|
@@ -154,6 +154,27 @@ is
|
||||
|
||||
LeastEdgeSize(theshape: in out Shape from TopoDS) returns Real;
|
||||
---Purpose: Calculate size of least edge;
|
||||
|
||||
|
||||
RefineFace (theF : Face from TopoDS;
|
||||
theNewShape : in out Shape from TopoDS);
|
||||
---Purpose: It is created for fixing faces with
|
||||
-- BRepCheck_OutOfSurfaceBoundary status.
|
||||
|
||||
ReTrimmedFace(theF : in out Face from TopoDS;
|
||||
theNewRTSurf: RectangularTrimmedSurface from Geom)
|
||||
|
||||
---Purpose: Replace the surface in theF with theNewRTSurf.
|
||||
is private;
|
||||
|
||||
SplittingFace(theF : Face from TopoDS;
|
||||
theNewShape : in out Shape from TopoDS;
|
||||
theS : Surface from Geom;
|
||||
theDeltaBU2, theDeltaBV2,
|
||||
theUFf, theVFf,
|
||||
theUReminder, theVReminder : Real from Standard;
|
||||
isSplitByU, isSplitByV : Boolean from Standard)
|
||||
|
||||
---Purpose: Make split.
|
||||
is private;
|
||||
|
||||
end ShapeFix;
|
||||
|
@@ -17,9 +17,6 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
|
||||
#include <ShapeFix.hxx>
|
||||
//:k2 abv 16.12.98: eliminating code duplication
|
||||
//pdn 18.12.98: checking deviation for SP edges
|
||||
//: abv 22.02.99: method FillFace() removed since PRO13123 is fixed
|
||||
@@ -27,54 +24,50 @@
|
||||
//szv#9:S4244:19Aug99: Added method FixWireGaps
|
||||
//szv#10:S4244:23Aug99: Added method FixFaceGaps
|
||||
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Message_ProgressSentry.hxx>
|
||||
#include <Precision.hxx>
|
||||
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <ShapeExtend_CompositeSurface.hxx>
|
||||
#include <ShapeFix.hxx>
|
||||
#include <ShapeFix_ComposeShell.hxx>
|
||||
#include <ShapeFix_Edge.hxx>
|
||||
#include <ShapeFix_Edge.hxx>
|
||||
#include <ShapeFix_Face.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <Standard_ErrorHandler.hxx>
|
||||
#include <Standard_Failure.hxx>
|
||||
|
||||
#include <TColGeom_HArray2OfSurface.hxx>
|
||||
#include <TColgp_SequenceOfPnt.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
#include <TopoDS_Edge.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
|
||||
//:i2
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <ShapeFix_Edge.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Adaptor3d_CurveOnSurface.hxx>
|
||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||
#include <ShapeAnalysis_Surface.hxx>
|
||||
|
||||
#include <ShapeFix_Edge.hxx>
|
||||
#include <ShapeFix_Shape.hxx>
|
||||
#include <ShapeFix_Wire.hxx>
|
||||
#include <ShapeFix_Face.hxx>
|
||||
#include <TopoDS_Iterator.hxx>
|
||||
#include <GeomAdaptor_HSurface.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
|
||||
#include <ShapeAnalysis_Edge.hxx>
|
||||
#include <ShapeBuild_Edge.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <ShapeBuild_ReShape.hxx>
|
||||
#include <TColgp_SequenceOfPnt.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
#include <TopExp.hxx>
|
||||
|
||||
#include <Message_ProgressSentry.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_SequenceOfShape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : SameParameter
|
||||
@@ -718,3 +711,380 @@ Standard_Real ShapeFix::LeastEdgeSize(TopoDS_Shape& theShape)
|
||||
aRes = sqrt(aRes);
|
||||
return aRes;
|
||||
}
|
||||
|
||||
|
||||
//static void Boundaries2D(const TopoDS_Face& theF,
|
||||
// const Handle(Geom_Surface)& theS,
|
||||
// Standard_Real& UMin,
|
||||
// Standard_Real& UMax,
|
||||
// Standard_Real& VMin,
|
||||
// Standard_Real& VMax)
|
||||
//{
|
||||
// const Standard_Integer NBPoints = 23;
|
||||
// TopoDS_Face aF = theF;
|
||||
// aF.Orientation(TopAbs_FORWARD);
|
||||
//
|
||||
// Standard_Real anUF = 0.0, anUL = 0.0, aVF = 0.0, aVL = 0.0;
|
||||
//
|
||||
// Bnd_Box2d Baux;
|
||||
// TopExp_Explorer ex(aF,TopAbs_EDGE);
|
||||
// for (;ex.More();ex.Next())
|
||||
// {
|
||||
// Standard_Real pf, pl;
|
||||
// TopoDS_Edge anE = TopoDS::Edge(ex.Current());
|
||||
// const Handle(Geom2d_Curve) aCur = BRep_Tool::CurveOnSurface(anE, theF, pf, pl);
|
||||
//
|
||||
// if (aCur.IsNull())
|
||||
// continue;
|
||||
//
|
||||
// MinMax(pf,pl);
|
||||
//
|
||||
// if (Precision::IsNegativeInfinite(pf) ||
|
||||
// Precision::IsPositiveInfinite(pf))
|
||||
// continue;
|
||||
//
|
||||
// if (Precision::IsNegativeInfinite(pl) ||
|
||||
// Precision::IsPositiveInfinite(pl))
|
||||
// continue;
|
||||
//
|
||||
//
|
||||
// Geom2dAdaptor_Curve anAC(aCur,pf,pl);
|
||||
//
|
||||
// gp_Pnt2d aP;
|
||||
//
|
||||
// anAC.D0(pf, aP);
|
||||
// Baux.Add(aP);
|
||||
//
|
||||
// anAC.D0(pl, aP);
|
||||
// Baux.Add(aP);
|
||||
//
|
||||
// if (anAC.GetType() == GeomAbs_Line)
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// Standard_Real prm = pf;
|
||||
// const Standard_Real step = (pl - pf) / NBPoints;
|
||||
// for(Standard_Integer i = 1; i < NBPoints; i++)
|
||||
// {
|
||||
// prm += step;
|
||||
// anAC.D0(prm, aP);
|
||||
// Baux.Add(aP);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(!Baux.IsVoid())
|
||||
// Baux.Get(UMin, VMin, UMax, VMax);
|
||||
// else
|
||||
// theS->Bounds(UMin, UMax, VMin, VMax);
|
||||
//
|
||||
//#ifdef DEB
|
||||
// cout << "++Boundaries2D: U = ( " << UMin << ")...(" << UMax << "); "
|
||||
// "V = ( " << VMin << ")...(" << VMax << ").--" << endl;
|
||||
//#endif
|
||||
//}
|
||||
|
||||
//=======================================================================
|
||||
//function : RefineFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void ShapeFix::RefineFace(const TopoDS_Face& theF,
|
||||
TopoDS_Shape& theNewShape/*,
|
||||
const Standard_Boolean flForce,
|
||||
const Standard_Boolean flDoNotSplit*/)
|
||||
{
|
||||
Standard_Real anUFf, anUFl, aVFf, aVFl;
|
||||
|
||||
Standard_Boolean isUtrim = Standard_True,//Standard_False,
|
||||
isVtrim = Standard_True;//Standard_False;
|
||||
|
||||
//Standard_Boolean isUtrimmed = Standard_False,
|
||||
// isVtrimmed = Standard_False;
|
||||
|
||||
TopoDS_Face aF = theF;
|
||||
|
||||
Handle(Geom_Surface) aS=BRep_Tool::Surface(aF);
|
||||
Standard_Boolean isRectangularTrimmed = (aS->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface));
|
||||
|
||||
if (isRectangularTrimmed)
|
||||
{
|
||||
//Handle(Geom_RectangularTrimmedSurface) TS =
|
||||
// Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
|
||||
|
||||
//TS->GetTrimmedFlags(isUtrimmed, isVtrimmed);
|
||||
|
||||
//aS = TS->BasisSurface();
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
//Boundaries2D(theF, aS, aU1, aU2, aV1, aV2);
|
||||
BRepTools::UVBounds(aF, anUFf, anUFl, aVFf, aVFl);
|
||||
|
||||
// Standard_Boolean isURunAway, isVRunAway;
|
||||
// Standard_Boolean isSplitByU = Standard_False,
|
||||
// isSplitByV = Standard_False;
|
||||
//
|
||||
// {
|
||||
// Standard_Real uf, ul, vf, vl;
|
||||
// aS->Bounds(uf, ul, vf, vl);
|
||||
//
|
||||
// const Standard_Real duf = anUFl - anUFf;
|
||||
// const Standard_Real dus = ul - uf;
|
||||
// const Standard_Real dvf = aVFl - aVFf;
|
||||
// const Standard_Real dvs = vl - vf;
|
||||
//
|
||||
//
|
||||
// isSplitByU = !flDoNotSplit && (aS->IsUPeriodic() || flForce) && (duf > dus);
|
||||
// isSplitByV = !flDoNotSplit && (aS->IsVPeriodic() || flForce) && (dvf > dvs);
|
||||
//
|
||||
//#ifdef DEB
|
||||
// cout << "isSplitByU = " << isSplitByU << "; isSplitByV = " << isSplitByV <<endl;
|
||||
//#endif
|
||||
//
|
||||
// if(isSplitByU || isSplitByV)
|
||||
// {
|
||||
// Standard_Real anURemainder = isSplitByU ? RealMod(duf, dus) : 0.0;
|
||||
// Standard_Real aVRemainder = isSplitByV ? RealMod(dvf, dvs) : 0.0;
|
||||
//
|
||||
// SplittingFace(aF, theNewShape, aS, (ul-uf)/2.0, (vl-vf)/2.0, anUFf, aVFf,
|
||||
// anURemainder, aVRemainder, isSplitByU, isSplitByV);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// isURunAway = (anUFf < uf - Precision::PConfusion()) ||
|
||||
// (anUFl > ul + Precision::PConfusion());
|
||||
// isVRunAway = (aVFf < vf - Precision::PConfusion()) ||
|
||||
// (aVFl > vl + Precision::PConfusion());
|
||||
// }
|
||||
//
|
||||
// if(!(flForce || isRectangularTrimmed))
|
||||
// {
|
||||
//#ifdef DEB
|
||||
// cout << "The surface is not \"RectangularTrimmed\". "
|
||||
// "Try to use \"force\" flag."<< endl;
|
||||
//#endif
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
if(aS->IsUPeriodic())
|
||||
{
|
||||
const Standard_Real aT = aS->UPeriod();
|
||||
const Standard_Real dU = anUFl - anUFf;
|
||||
|
||||
#ifdef DEB
|
||||
if(dU > aT)
|
||||
{
|
||||
cout << "dU = " << dU << " > T = " << aT << ". Delta = " << dU - aT << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
anUFl = anUFf + aT;
|
||||
|
||||
//isUtrim = isURunAway || isUtrimmed;
|
||||
}
|
||||
|
||||
if(aS->IsVPeriodic())
|
||||
{
|
||||
const Standard_Real aT = aS->VPeriod();
|
||||
const Standard_Real dv = aVFl - aVFf;
|
||||
|
||||
#ifdef DEB
|
||||
if(dv > aT)
|
||||
{
|
||||
cout << "++dV = " << dv << " > T = " << aT << ". Delta = " << dv - aT << endl;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
aVFl = aVFf + aT;
|
||||
|
||||
//isVtrim = isVRunAway || isVtrimmed;
|
||||
}
|
||||
|
||||
//if(!(isUtrim || isVtrim))
|
||||
// return;
|
||||
|
||||
#ifdef DEB
|
||||
if(isUtrim)
|
||||
cout << "Trimming U: (" << anUFf << ")...(" << anUFl << ")" << endl;
|
||||
|
||||
if(isVtrim)
|
||||
cout << "Trimming V: (" << aVFf << ")...(" << aVFl << ")" << endl;
|
||||
#endif
|
||||
|
||||
Handle(Geom_RectangularTrimmedSurface) aRTS=new Geom_RectangularTrimmedSurface(aS,isUtrim,
|
||||
isVtrim, anUFf, anUFl, aVFf, aVFl);
|
||||
|
||||
ReTrimmedFace(aF, aRTS);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RefineFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void ShapeFix::ReTrimmedFace(TopoDS_Face& theF,
|
||||
const Handle(Geom_RectangularTrimmedSurface)& theNewRTSurf)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << "ShapeFix::ReTrimmedFace(...) is executed." << endl;
|
||||
#endif
|
||||
|
||||
TopExp_Explorer aExp;
|
||||
TopTools_MapOfShape aME;
|
||||
BRep_Builder aBB;
|
||||
|
||||
aExp.Init(theF, TopAbs_EDGE);
|
||||
for (; aExp.More(); aExp.Next())
|
||||
{
|
||||
Standard_Real aT1, aT2;
|
||||
const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current());
|
||||
if (!aME.Add(aE))
|
||||
continue;
|
||||
|
||||
TopLoc_Location aLocE;
|
||||
Standard_Real aTolE=BRep_Tool::Tolerance(aE);
|
||||
Handle(Geom2d_Curve) aC2D1=BRep_Tool::CurveOnSurface(aE, theF, aT1, aT2);
|
||||
Standard_Boolean bIsClosed = BRep_Tool::IsClosed(aE, theF);
|
||||
|
||||
if (!bIsClosed)
|
||||
{
|
||||
aBB.UpdateEdge(aE, aC2D1, theNewRTSurf, aLocE, theF, aTolE);
|
||||
}
|
||||
else
|
||||
{
|
||||
Standard_Boolean bIsLeft;
|
||||
Standard_Real aScPr;
|
||||
Handle(Geom2d_Curve) aC2D2;
|
||||
TopoDS_Edge aE2;
|
||||
aE2=aE;
|
||||
aE2.Reverse();
|
||||
aC2D2=BRep_Tool::CurveOnSurface(aE2, theF, aT1, aT2);
|
||||
{
|
||||
Standard_Real aT, aU1, aU2;
|
||||
gp_Pnt2d aP2D1, aP2D2;
|
||||
gp_Vec2d aV2D1, aV2D2;
|
||||
|
||||
const Standard_Real PAR_T = 0.43213918;
|
||||
aT=(1.-PAR_T)*aT1 + PAR_T*aT2;
|
||||
aC2D1->D1(aT, aP2D1, aV2D1);
|
||||
aC2D2->D1(aT, aP2D2, aV2D2);
|
||||
|
||||
aU1=aP2D1.X();
|
||||
aU2=aP2D2.X();
|
||||
bIsLeft=(aU1<aU2);
|
||||
|
||||
gp_Vec2d aDOY(0.,1.);
|
||||
aScPr=aV2D1*aDOY;
|
||||
}
|
||||
|
||||
if (!bIsLeft)
|
||||
{
|
||||
if (aScPr<0.)
|
||||
aBB.UpdateEdge(aE, aC2D2, aC2D1, theNewRTSurf, aLocE, theF, aTolE);
|
||||
else
|
||||
aBB.UpdateEdge(aE, aC2D1, aC2D2, theNewRTSurf, aLocE, theF, aTolE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (aScPr<0.)
|
||||
aBB.UpdateEdge(aE, aC2D1, aC2D2, theNewRTSurf, aLocE, theF, aTolE);
|
||||
else
|
||||
aBB.UpdateEdge(aE, aC2D2, aC2D1, theNewRTSurf, aLocE, theF, aTolE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TopLoc_Location aLoc;
|
||||
aBB.UpdateFace(theF, theNewRTSurf, aLoc, BRep_Tool::Tolerance(theF));
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RefineFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void ShapeFix::SplittingFace(const TopoDS_Face& theSourceShape,
|
||||
TopoDS_Shape& theNewShape,
|
||||
const Handle(Geom_Surface)& theS,
|
||||
const Standard_Real theDeltaBU2, //=(anUSl - anUSf)/2.0
|
||||
const Standard_Real theDeltaBV2, //=(aVSl - aVSf)/2.0
|
||||
const Standard_Real theUFf, //left face's coordinate
|
||||
const Standard_Real theVFf, //bottom face's coordinate
|
||||
const Standard_Real theURem,
|
||||
const Standard_Real theVRem,
|
||||
const Standard_Boolean isSplitByU,
|
||||
const Standard_Boolean isSplitByV)
|
||||
{
|
||||
#ifdef DEB
|
||||
cout << "ShapeFix::SplittingFace(...) is executed." << endl;
|
||||
#endif
|
||||
|
||||
Standard_Real anUFf = theUFf, aVFf = theVFf;
|
||||
Standard_Real anURem = theURem, aVRem = theVRem;
|
||||
|
||||
const Standard_Boolean isUTrimReq = isSplitByU && (0.0 < anURem) && (anURem < theDeltaBU2);
|
||||
const Standard_Boolean isVTrimReq = isSplitByV && (0.0 < aVRem) && (aVRem < theDeltaBV2);
|
||||
const Standard_Boolean isTrimReq = (isUTrimReq || isVTrimReq);
|
||||
|
||||
#ifdef DEB
|
||||
cout << "isTrimReq = " << isTrimReq << endl;
|
||||
#endif
|
||||
|
||||
const Standard_Integer aNU = isSplitByU ? 3 : 1;
|
||||
const Standard_Integer aNV = isSplitByV ? 3 : 1;
|
||||
|
||||
Handle(TColGeom_HArray2OfSurface) AS =
|
||||
new TColGeom_HArray2OfSurface(1, aNU, 1, aNV);
|
||||
for(Standard_Integer i = AS->LowerRow(); i <= AS->UpperRow(); i++)
|
||||
{
|
||||
for(Standard_Integer j = AS->LowerCol(); j <= AS->UpperCol(); j++)
|
||||
{
|
||||
if(isTrimReq)
|
||||
{
|
||||
const Standard_Real umin = anUFf, vmin = aVFf;
|
||||
const Standard_Real umax = umin + theDeltaBU2 + anURem;
|
||||
const Standard_Real vmax = vmin + theDeltaBV2 + aVRem;
|
||||
|
||||
Handle(Geom_RectangularTrimmedSurface) rect =
|
||||
new Geom_RectangularTrimmedSurface (theS, isUTrimReq, isVTrimReq, umin, umax, vmin, vmax );
|
||||
|
||||
//after 1st passage
|
||||
anURem = aVRem = 0.0;
|
||||
|
||||
if(isUTrimReq)
|
||||
anUFf = umax;
|
||||
|
||||
if(isVTrimReq)
|
||||
aVFf = vmax;
|
||||
|
||||
AS->SetValue (i, j, rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
AS->SetValue (i, j, theS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Handle(ShapeExtend_CompositeSurface) aGrid = new ShapeExtend_CompositeSurface;
|
||||
|
||||
#ifndef DEB
|
||||
aGrid->Init(AS);
|
||||
#else
|
||||
if (!aGrid->Init(AS))
|
||||
cout << "Grid badly connected!" << endl;
|
||||
#endif
|
||||
|
||||
ShapeFix_ComposeShell SUCS;
|
||||
{
|
||||
TopLoc_Location l;
|
||||
SUCS.Init(aGrid, l, theSourceShape, Precision::Confusion());
|
||||
Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape();
|
||||
SUCS.SetContext(RS);
|
||||
SUCS.Perform ();
|
||||
}
|
||||
|
||||
theNewShape = SUCS.Result();
|
||||
ShapeFix::SameParameter (theNewShape, Standard_False);
|
||||
}
|
@@ -2524,27 +2524,33 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
ShapeFix_SequenceOfWireSegment& wires) const
|
||||
void ShapeFix_ComposeShell::DispatchWires(TopTools_SequenceOfShape &faces,
|
||||
ShapeFix_SequenceOfWireSegment& wires) const
|
||||
{
|
||||
BRep_Builder B;
|
||||
|
||||
// in closed mode, apply FixShifted to all wires before dispatching them
|
||||
if ( myClosedMode ) {
|
||||
if(myClosedMode)
|
||||
{
|
||||
ShapeFix_Wire sfw;
|
||||
sfw.SetFace ( myFace );
|
||||
sfw.SetPrecision ( Precision() );
|
||||
|
||||
// pdn: shift pcurves in the seam to make OK shape w/o fixshifted
|
||||
Standard_Integer i;
|
||||
for ( i=1; i <= wires.Length(); i++ ) {
|
||||
for ( i=1; i <= wires.Length(); i++ )
|
||||
{
|
||||
if(wires(i).IsVertex())
|
||||
continue;
|
||||
|
||||
Handle(ShapeExtend_WireData) sbwd = wires(i).WireData();
|
||||
|
||||
for(Standard_Integer jL=1; jL <= sbwd->NbEdges(); jL++ ) {
|
||||
for(Standard_Integer jL=1; jL <= sbwd->NbEdges(); jL++ )
|
||||
{
|
||||
TopoDS_Edge E = sbwd->Edge(jL);
|
||||
if ( E.Orientation() == TopAbs_REVERSED && BRep_Tool::IsClosed(E,myFace) ) {
|
||||
|
||||
if(E.Orientation() == TopAbs_REVERSED && BRep_Tool::IsClosed(E,myFace))
|
||||
{
|
||||
Standard_Real f1,l1, f2, l2;
|
||||
Handle(Geom2d_Curve) c21 = BRep_Tool::CurveOnSurface(E,myFace,f1,l1);
|
||||
TopoDS_Shape dummy = E.Reversed();
|
||||
@@ -2554,12 +2560,13 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
gp_Pnt2d pl1 = c21->Value(l1);
|
||||
gp_Pnt2d pf2 = c22->Value(f2);
|
||||
gp_Pnt2d pl2 = c22->Value(l2);
|
||||
if ( c21 == c22 || pf1.SquareDistance(pf2) < dPreci ||
|
||||
pl1.SquareDistance(pl2) < dPreci ) {
|
||||
if ((c21 == c22) || (pf1.SquareDistance(pf2) < dPreci) ||
|
||||
pl1.SquareDistance(pl2) < dPreci )
|
||||
{
|
||||
gp_Vec2d shift(0.,0.);
|
||||
if ( myUClosed && Abs ( pf2.X() - pl2.X() ) < ::Precision::PConfusion() )
|
||||
if( myUClosed && Abs ( pf2.X() - pl2.X() ) < ::Precision::PConfusion() )
|
||||
shift.SetX(myUPeriod);
|
||||
if ( myVClosed && Abs ( pf2.Y() - pl2.Y() ) < ::Precision::PConfusion() )
|
||||
if( myVClosed && Abs ( pf2.Y() - pl2.Y() ) < ::Precision::PConfusion() )
|
||||
shift.SetY(myVPeriod);
|
||||
c22->Translate(shift);
|
||||
}
|
||||
@@ -2567,15 +2574,18 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
}
|
||||
}
|
||||
|
||||
for ( i=1; i <= wires.Length(); i++ ) {
|
||||
for ( i=1; i <= wires.Length(); i++ )
|
||||
{
|
||||
if(wires(i).IsVertex())
|
||||
continue;
|
||||
|
||||
Handle(ShapeExtend_WireData) sbwd = wires(i).WireData();
|
||||
|
||||
//: abv 30.08.01: torHalf2.sat: if wire contains single degenerated
|
||||
// edge, skip that wire
|
||||
if ( sbwd->NbEdges() <=0 ||
|
||||
( sbwd->NbEdges() ==1 && BRep_Tool::Degenerated(sbwd->Edge(1)) ) ) {
|
||||
if ( sbwd->NbEdges() <=0 ||
|
||||
( sbwd->NbEdges() ==1 && BRep_Tool::Degenerated(sbwd->Edge(1))))
|
||||
{
|
||||
wires.Remove(i--);
|
||||
continue;
|
||||
}
|
||||
@@ -2585,11 +2595,12 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
|
||||
// force recomputation of degenerated edges (clear pcurves)
|
||||
ShapeBuild_Edge sbe;
|
||||
for (Standard_Integer jL=1; jL <= sbwd->NbEdges(); jL++ ) {
|
||||
if ( BRep_Tool::Degenerated(sbwd->Edge(jL)) )
|
||||
for (Standard_Integer jL=1; jL <= sbwd->NbEdges(); jL++ )
|
||||
{
|
||||
if(BRep_Tool::Degenerated(sbwd->Edge(jL)))
|
||||
sbe.RemovePCurve(sbwd->Edge(jL),myFace);
|
||||
// sfw.FixDegenerated(jL);
|
||||
}
|
||||
|
||||
sfw.FixDegenerated();
|
||||
}
|
||||
}
|
||||
@@ -2615,18 +2626,22 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
|
||||
Standard_Real U1,U2,V1,V2;
|
||||
myGrid->Bounds(U1,U2,V1,V2);
|
||||
for ( i = 1; i <= nb; i++ ) {
|
||||
|
||||
for ( i = 1; i <= nb; i++ )
|
||||
{
|
||||
gp_Pnt2d pnt = mPnts(i);
|
||||
Standard_Real ush =0., vsh=0.;
|
||||
if(myUClosed) {
|
||||
|
||||
if(myUClosed)
|
||||
{
|
||||
ush = ShapeAnalysis::AdjustToPeriod(pnt.X(),U1,U2);
|
||||
pnt.SetX(pnt.X()+ush);
|
||||
}
|
||||
|
||||
if(myVClosed) {
|
||||
vsh = ShapeAnalysis::AdjustToPeriod(pnt.Y(),V1,V2);
|
||||
pnt.SetY(pnt.Y()+vsh);
|
||||
}
|
||||
|
||||
mPnts(i) = pnt;
|
||||
Standard_Integer indU = myGrid->LocateUParameter ( pnt.X() );
|
||||
Standard_Integer indV = myGrid->LocateVParameter ( pnt.Y() );
|
||||
@@ -2635,19 +2650,23 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
gp_Trsf2d T;
|
||||
Standard_Real uFact=1.;
|
||||
Standard_Boolean needT = myGrid->GlobalToLocalTransformation ( indU, indV, uFact, T );
|
||||
if ( ush != 0. || vsh != 0. ) {
|
||||
|
||||
if ( ush != 0. || vsh != 0. )
|
||||
{
|
||||
gp_Trsf2d Sh;
|
||||
Sh.SetTranslation ( gp_Vec2d ( ush, vsh ) );
|
||||
T.Multiply ( Sh );
|
||||
needT = Standard_True;
|
||||
}
|
||||
|
||||
if(wires(i).IsVertex())
|
||||
continue;
|
||||
Handle(Geom_Surface) surf = myGrid->Patch ( indU, indV );
|
||||
TopoDS_Face face;
|
||||
B.MakeFace ( face, surf, myLoc, ::Precision::Confusion() );
|
||||
Handle(ShapeExtend_WireData) sewd = wires(i).WireData();
|
||||
for ( Standard_Integer j = 1; j <= sewd->NbEdges(); j++ ) {
|
||||
for ( Standard_Integer j = 1; j <= sewd->NbEdges(); j++ )
|
||||
{
|
||||
// Standard_Integer nsplit = ApplyContext ( sewd, j, context );
|
||||
// if ( nsplit <1 ) { j--; continue; }
|
||||
|
||||
@@ -2660,70 +2679,91 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
TopoDS_Edge anInitEdge = edge;
|
||||
Standard_Boolean ismanifold = (edge.Orientation() == TopAbs_FORWARD ||
|
||||
edge.Orientation() == TopAbs_REVERSED);
|
||||
if ( rs.IsRecorded ( edge ) ) {
|
||||
|
||||
if (rs.IsRecorded(edge))
|
||||
{
|
||||
//smh#8
|
||||
TopoDS_Shape tmpNE = rs.Value(edge);
|
||||
newEdge = TopoDS::Edge ( tmpNE );
|
||||
}
|
||||
else {
|
||||
|
||||
if(!ismanifold)
|
||||
anInitEdge.Orientation(TopAbs_FORWARD);
|
||||
TopoDS_Shape tmpNE = rs.Value(edge);
|
||||
newEdge = TopoDS::Edge ( tmpNE );
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!ismanifold)
|
||||
anInitEdge.Orientation(TopAbs_FORWARD);
|
||||
|
||||
newEdge = sbe.Copy ( anInitEdge, Standard_False );
|
||||
|
||||
newEdge = sbe.Copy ( anInitEdge, Standard_False );
|
||||
if(!ismanifold)
|
||||
newEdge.Orientation(edge.Orientation());
|
||||
rs.Replace ( edge, newEdge );
|
||||
Context()->Replace ( edge, newEdge );
|
||||
if(!ismanifold)
|
||||
newEdge.Orientation(edge.Orientation());
|
||||
|
||||
rs.Replace ( edge, newEdge );
|
||||
Context()->Replace ( edge, newEdge );
|
||||
}
|
||||
|
||||
sbe.ReassignPCurve ( newEdge, myFace, face );
|
||||
sbe.ReassignPCurve ( newEdge, myFace, face, GeomAbs_CN);
|
||||
|
||||
// transform pcurve to parametric space of patch
|
||||
if ( needT ) {
|
||||
Standard_Real f, l;
|
||||
Handle(Geom2d_Curve) c2d;
|
||||
if ( sae.PCurve ( newEdge, face, c2d, f, l, Standard_False ) ) {
|
||||
Standard_Real newf = f, newl = l;
|
||||
Handle(Geom2d_Curve) c2dnew = sbe.TransformPCurve ( c2d, T, uFact, newf, newl );
|
||||
if ( BRep_Tool::IsClosed ( newEdge, face ) ) {
|
||||
Standard_Real cf, cl;
|
||||
Handle(Geom2d_Curve) c2d2;
|
||||
if (needT)
|
||||
{
|
||||
Standard_Real f, l;
|
||||
Handle(Geom2d_Curve) c2d;
|
||||
|
||||
if(sae.PCurve(newEdge, face, c2d, f, l, Standard_False))
|
||||
{
|
||||
Standard_Real newf = f, newl = l;
|
||||
Handle(Geom2d_Curve) c2dnew = sbe.TransformPCurve(c2d, T, uFact, newf, newl);
|
||||
|
||||
if(BRep_Tool::IsClosed(newEdge, face))
|
||||
{
|
||||
Standard_Real cf, cl;
|
||||
Handle(Geom2d_Curve) c2d2;
|
||||
//smh#8
|
||||
TopoDS_Shape tmpE = newEdge.Reversed();
|
||||
TopoDS_Edge e2 = TopoDS::Edge (tmpE );
|
||||
if ( sae.PCurve ( e2, face, c2d2, cf, cl, Standard_False ) ) {
|
||||
if ( newEdge.Orientation() == TopAbs_FORWARD )
|
||||
B.UpdateEdge ( newEdge, c2dnew, c2d2, face, 0. );
|
||||
else B.UpdateEdge ( newEdge, c2d2, c2dnew, face, 0. );
|
||||
}
|
||||
else B.UpdateEdge ( newEdge, c2dnew, face, 0. );
|
||||
}
|
||||
else B.UpdateEdge ( newEdge, c2dnew, face, 0. );
|
||||
B.Range ( newEdge, face, newf, newl );
|
||||
if ( (newf != f || newl != l) && !BRep_Tool::Degenerated(newEdge) )
|
||||
B.SameRange ( newEdge, Standard_False );
|
||||
}
|
||||
TopoDS_Shape tmpE = newEdge.Reversed();
|
||||
TopoDS_Edge e2 = TopoDS::Edge (tmpE );
|
||||
if(sae.PCurve(e2, face, c2d2, cf, cl, Standard_False))
|
||||
{
|
||||
if(newEdge.Orientation() == TopAbs_FORWARD)
|
||||
B.UpdateEdge(newEdge, c2dnew, c2d2, face, 0., GeomAbs_CN);
|
||||
else
|
||||
B.UpdateEdge(newEdge, c2d2, c2dnew, face, 0., GeomAbs_CN);
|
||||
}
|
||||
else
|
||||
B.UpdateEdge ( newEdge, c2dnew, face, 0. );
|
||||
}
|
||||
else
|
||||
B.UpdateEdge ( newEdge, c2dnew, face, 0. );
|
||||
|
||||
B.Range ( newEdge, face, newf, newl );
|
||||
|
||||
if(((newf != f) || (newl != l)) && !BRep_Tool::Degenerated(newEdge))
|
||||
B.SameRange ( newEdge, Standard_False );
|
||||
}
|
||||
}
|
||||
|
||||
if(!BRep_Tool::SameRange(newEdge))
|
||||
{
|
||||
TopoDS_Edge etmp;
|
||||
if(!ismanifold)
|
||||
{
|
||||
TopoDS_Edge afe = TopoDS::Edge(newEdge.Oriented(TopAbs_FORWARD));
|
||||
etmp = sbe.Copy (afe , Standard_False );
|
||||
}
|
||||
else
|
||||
etmp = sbe.Copy ( newEdge, Standard_False );
|
||||
|
||||
sfe->FixAddCurve3d ( etmp );
|
||||
Standard_Real cf, cl;
|
||||
Handle(Geom_Curve) c3d;
|
||||
|
||||
if(sae.Curve3d(etmp,c3d,cf,cl,Standard_False))
|
||||
{
|
||||
B.UpdateEdge ( newEdge, c3d, 0. );
|
||||
sbe.SetRange3d ( newEdge, cf, cl );
|
||||
}
|
||||
}
|
||||
else
|
||||
sfe->FixAddCurve3d ( newEdge );
|
||||
|
||||
if(!BRep_Tool::SameRange(newEdge)) {
|
||||
TopoDS_Edge etmp;
|
||||
if(!ismanifold) {
|
||||
TopoDS_Edge afe = TopoDS::Edge(newEdge.Oriented(TopAbs_FORWARD));
|
||||
etmp = sbe.Copy (afe , Standard_False );
|
||||
}
|
||||
else
|
||||
etmp = sbe.Copy ( newEdge, Standard_False );
|
||||
sfe->FixAddCurve3d ( etmp );
|
||||
Standard_Real cf, cl;
|
||||
Handle(Geom_Curve) c3d;
|
||||
if(sae.Curve3d(etmp,c3d,cf,cl,Standard_False)) {
|
||||
B.UpdateEdge ( newEdge, c3d, 0. );
|
||||
sbe.SetRange3d ( newEdge, cf, cl );
|
||||
}
|
||||
}
|
||||
else
|
||||
sfe->FixAddCurve3d ( newEdge );
|
||||
sewd->Set ( newEdge, j );
|
||||
}
|
||||
}
|
||||
@@ -2731,29 +2771,42 @@ void ShapeFix_ComposeShell::DispatchWires (TopTools_SequenceOfShape &faces,
|
||||
// Collect wires in packets lying on same surface and dispatch them
|
||||
TColStd_Array1OfBoolean used ( 1, nb );
|
||||
used.Init ( Standard_False );
|
||||
for(;;) {
|
||||
TopTools_SequenceOfShape loops;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
TopTools_SequenceOfShape loops;
|
||||
|
||||
Handle(Geom_Surface) Surf;
|
||||
for ( i = 1; i <= nb; i++ ) {
|
||||
if ( used(i) ) continue;
|
||||
Handle(Geom_Surface) S = myGrid->Patch ( mPnts(i) );
|
||||
if ( Surf.IsNull() ) Surf = S;
|
||||
else if ( S != Surf ) continue;
|
||||
for ( i = 1; i <= nb; i++ )
|
||||
{
|
||||
if(used(i)) continue;
|
||||
|
||||
Handle(Geom_Surface) S = myGrid->Patch(mPnts(i));
|
||||
|
||||
if(Surf.IsNull())
|
||||
Surf = S;
|
||||
else if(S != Surf)
|
||||
continue;
|
||||
|
||||
used(i) = Standard_True;
|
||||
ShapeFix_WireSegment aSeg = wires(i);
|
||||
if(aSeg.IsVertex()) {
|
||||
TopoDS_Vertex aVert = aSeg.GetVertex();
|
||||
if(aVert.Orientation() == TopAbs_INTERNAL)
|
||||
loops.Append(wires(i).GetVertex());
|
||||
if(aSeg.IsVertex())
|
||||
{
|
||||
TopoDS_Vertex aVert = aSeg.GetVertex();
|
||||
if(aVert.Orientation() == TopAbs_INTERNAL)
|
||||
loops.Append(wires(i).GetVertex());
|
||||
}
|
||||
else {
|
||||
Handle(ShapeExtend_WireData) aWD = aSeg.WireData();
|
||||
if(!aWD.IsNull())
|
||||
loops.Append ( aWD->Wire() );
|
||||
else
|
||||
{
|
||||
Handle(ShapeExtend_WireData) aWD = aSeg.WireData();
|
||||
|
||||
if(!aWD.IsNull())
|
||||
loops.Append(aWD->Wire());
|
||||
}
|
||||
}
|
||||
if ( Surf.IsNull() ) break;
|
||||
|
||||
if(Surf.IsNull())
|
||||
break;
|
||||
|
||||
MakeFacesOnPatch ( faces, Surf, loops );
|
||||
}
|
||||
|
@@ -138,6 +138,20 @@ inline Standard_Integer Min (const Standard_Integer Val1,
|
||||
return Val1 <= Val2 ? Val1 : Val2;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// MinMax : Replaces theParMIN = MIN(theParMIN, theParMAX),
|
||||
// theParMAX = MAX(theParMIN, theParMAX).
|
||||
// ------------------------------------------------------------------
|
||||
inline void MinMax(Standard_Integer& theParMIN, Standard_Integer& theParMAX)
|
||||
{
|
||||
if(theParMIN > theParMAX)
|
||||
{
|
||||
const Standard_Integer aux = theParMAX;
|
||||
theParMAX = theParMIN;
|
||||
theParMIN = aux;
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Modulus : Returns the remainder of division between two integers
|
||||
// ------------------------------------------------------------------
|
||||
|
@@ -308,3 +308,14 @@ Standard_Real Sqrt (const Standard_Real Value)
|
||||
return sqrt(Value);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RealMod
|
||||
//purpose : Returns the remainder of theDivident on theDivisor.
|
||||
// Quotient is always integer number.
|
||||
//=======================================================================
|
||||
Standard_Real RealMod(const Standard_Real theDivident,
|
||||
const Standard_Real theDivisor)
|
||||
{
|
||||
const Standard_Integer n = RealToInt(theDivident/theDivisor);
|
||||
return theDivident - n * theDivisor;
|
||||
}
|
||||
|
@@ -63,6 +63,8 @@ __Standard_API Standard_Real ATanh (const Standard_Real );
|
||||
__Standard_API Standard_Real ACosh (const Standard_Real );
|
||||
__Standard_API Standard_Real Log (const Standard_Real );
|
||||
__Standard_API Standard_Real Sqrt (const Standard_Real );
|
||||
__Standard_API Standard_Real RealMod (const Standard_Real theDivident,
|
||||
const Standard_Real theDivisor);
|
||||
|
||||
//class Standard_OStream;
|
||||
//void ShallowDump(const Standard_Real, Standard_OStream& );
|
||||
@@ -265,6 +267,21 @@ inline Standard_Real Min (const Standard_Real Val1,
|
||||
return Val1 <= Val2 ? Val1 : Val2;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// MinMax : Replaces theParMIN = MIN(theParMIN, theParMAX),
|
||||
// theParMAX = MAX(theParMIN, theParMAX).
|
||||
// ------------------------------------------------------------------
|
||||
inline void MinMax(Standard_Real& theParMIN, Standard_Real& theParMAX)
|
||||
{
|
||||
if(theParMIN > theParMAX)
|
||||
{
|
||||
const Standard_Real aux = theParMAX;
|
||||
theParMAX = theParMIN;
|
||||
theParMIN = aux;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Pow : Returns a real to a given power
|
||||
//-------------------------------------------------------------------
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from pro5545
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_pro5545.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
encoderegularity a 1
|
||||
tscale a 0 0 0 1000
|
||||
nexplode a e
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from pro6944
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_pro6944.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
tscale a 0 0 0 1000
|
||||
nexplode a e
|
||||
blend result a 12 a_16 12 a_15 12 a_17
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from ?
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file cfi900H2.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
nexplode a e
|
||||
blend result a 1 a_66
|
||||
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from fra60610
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_fra60610.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
nexplode a e
|
||||
blend result a 2 a_69
|
||||
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_cfi90fjc.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
nexplode a e
|
||||
blend result a 5 a_5 5 a_13 5 a_28
|
||||
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from pro8783
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_pro8783.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
explode a e
|
||||
mkevol result a
|
||||
updatevol a_4 0 15 0.5 9 1 5
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from pro8792
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_pro8792.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
explode a e
|
||||
mkevol result a
|
||||
updatevol a_20 0 15 0.5 20 1 5
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from pro11850
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_pro11850.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
explode a e
|
||||
blend result a 3 a_22
|
||||
|
||||
|
@@ -4,7 +4,14 @@
|
||||
## Comment : from pro10117
|
||||
## ====================================
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFI_pro10117.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
explode a e
|
||||
blend result a 2 a_128 1 a_10
|
||||
|
||||
|
@@ -1,12 +1,19 @@
|
||||
# Original bug : cts21453
|
||||
# Date : 15sept98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts21453a.rle] a
|
||||
restore [locate_data_file CTO900_cts21453b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcommon result a b
|
||||
|
||||
|
||||
|
||||
set square 16681.4
|
||||
|
@@ -1,7 +1,18 @@
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CIN900_cts20hlh.rle] a
|
||||
restore [locate_data_file CIN900_cts20hli.rle] b
|
||||
restore [locate_data_file CIN900_cts20hlj.rle] c
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
sfixpcu c c -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
checkshape c
|
||||
|
||||
bcut rab a b
|
||||
|
||||
bcut result rab c
|
||||
|
@@ -1,6 +1,15 @@
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CIN900_cts21hlq.rle] a
|
||||
restore [locate_data_file CIN900_cts21hlr.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 330507
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : ger60043
|
||||
# Date : 11mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_ger60043-part.rle] part
|
||||
restore [locate_data_file CTO900_ger60043-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,16 @@
|
||||
# Original bug : ger60065
|
||||
# Date : 11mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
|
||||
restore [locate_data_file CTO900_ger60065-part.rle] part
|
||||
restore [locate_data_file CTO900_ger60065-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : jap60038
|
||||
# Date : 11mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_jap60038-part.rle] part
|
||||
restore [locate_data_file jap60038-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
set square 173510
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro11828
|
||||
# Date :
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_pro11828-part.rle] part
|
||||
restore [locate_data_file CTO900_pro11828-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : fra60656
|
||||
# Date : 23mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_fra60656-part.rle] part
|
||||
restore [locate_data_file CTO900_fra60656-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
set square 1.21042e+06
|
||||
|
@@ -1,9 +1,15 @@
|
||||
# Original bug : pro12663
|
||||
# Date : 24mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_pro12663-part.rle] part
|
||||
restore [locate_data_file CTO900_pro12663-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts19305
|
||||
# Date : 30mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts19305-part.rle] part
|
||||
restore [locate_data_file CTO900_cts19305-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : fra60810
|
||||
# Date : 30mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_fra60810-part.rle] part
|
||||
restore [locate_data_file CTO900_fra60810-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,15 @@
|
||||
# Original bug : ger60598
|
||||
# Date : 18Sept98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_ger60598c.rle] base
|
||||
restore [locate_data_file ger60598d.rle] prism
|
||||
|
||||
sfixpcu base base -f
|
||||
sfixpcu prism prism -f
|
||||
|
||||
fsameparameter base
|
||||
|
||||
bcut result prism base
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts20374
|
||||
# Date : 24mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts20374-part.rle] part
|
||||
restore [locate_data_file cts20374-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,14 +1,27 @@
|
||||
# Original bug : cts20736
|
||||
# Date : 28Sept97
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts20736a.rle] part
|
||||
restore [locate_data_file cts20736b.rle] aface
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu aface aface -f
|
||||
|
||||
checkshape aface
|
||||
|
||||
btolx part
|
||||
btolx aface
|
||||
|
||||
checkshape aface
|
||||
|
||||
prism tool aface 0 0 -12
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
set square 36087.8
|
||||
|
@@ -1,8 +1,17 @@
|
||||
# Original bug : cts20150
|
||||
# Date : 13Mai98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO901_cts20150_base.rle] base
|
||||
restore [locate_data_file CTO901_cts20150_outil.rle] outil
|
||||
restore [locate_data_file CTO901_cts20150_outil.rle] outil
|
||||
|
||||
sfixpcu base base -f
|
||||
sfixpcu outil outil -f
|
||||
|
||||
checkshape base
|
||||
checkshape outil
|
||||
|
||||
bcut result base outil
|
||||
|
||||
|
@@ -2,9 +2,18 @@
|
||||
# Date : 13Mai98
|
||||
# A6.gif
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20455-part.rle] part
|
||||
restore [locate_data_file CTO902_cts20455-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -2,9 +2,18 @@
|
||||
# Date : 13Mai98
|
||||
# A7.gif
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20459-part.rle] part
|
||||
restore [locate_data_file CTO902_cts20459-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -2,9 +2,18 @@
|
||||
# Date : 13Mai98
|
||||
# B8.gif
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20503-part.rle] part
|
||||
restore [locate_data_file CTO902_cts20503-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -2,9 +2,18 @@
|
||||
# Date : 13Mai98
|
||||
# C7
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20498-part.rle] part
|
||||
restore [locate_data_file CTO902_cts20498-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -2,9 +2,18 @@
|
||||
# Date : 13Mai98
|
||||
# C8
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20489-part.rle] part
|
||||
restore [locate_data_file CTO902_cts20489-tool.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
bcut result part tool
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts20551
|
||||
# Date : 4June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20551b.rle] a
|
||||
restore [locate_data_file cts20551-tool.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 430968
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro13495
|
||||
# Date : 4June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_pro13495a.rle] a
|
||||
restore [locate_data_file pro13495b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 63800.8
|
||||
|
@@ -1,9 +1,16 @@
|
||||
# Original bug : fra61199
|
||||
# Date : 29June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
cpulimit 3000
|
||||
restore [locate_data_file CTO904_fra61199a.rle] a
|
||||
restore [locate_data_file CTO904_fra61199b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 1.21952e+06
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts21200
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file cts21200a.rle] a
|
||||
restore [locate_data_file cts21200b.rle] skface
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu skface skface -f
|
||||
|
||||
checkshape a
|
||||
checkshape skface
|
||||
|
||||
prism b skface 0 0 -230
|
||||
|
||||
bcut result a b
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts21208
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts21208a.rle] a
|
||||
restore [locate_data_file cts21208b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 1383.02
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts21210
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts21210a.rle] a
|
||||
restore [locate_data_file cts21210b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 1660.64
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : hkg60150
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_hkg60150a.rle] a
|
||||
restore [locate_data_file CTO904_hkg60150b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 2167.4
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : hkg60156
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_hkg60156a.rle] a
|
||||
restore [locate_data_file CTO904_hkg60156b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 1927.45
|
||||
|
@@ -1,7 +1,14 @@
|
||||
## cts20461
|
||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file cts20461.rle] a
|
||||
|
||||
sfixpcu a a -f
|
||||
checkshape a
|
||||
|
||||
nexplode a f
|
||||
mksurface surf a_26
|
||||
nexplode a_26 e
|
||||
|
@@ -1,8 +1,17 @@
|
||||
## CTS19305
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts19305-part.rle] a
|
||||
restore [locate_data_file CTO900_cts19305-tool.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 76632.9
|
||||
|
@@ -1,7 +1,14 @@
|
||||
# cts21347
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO909_part_1.brep] a
|
||||
restore [locate_data_file CTO909_tool_2.brep] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
bcut result a b
|
||||
|
||||
set square 1.64215e+06
|
||||
|
@@ -2,9 +2,18 @@ puts "ID260084"
|
||||
puts "Cut"
|
||||
puts ""
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file id260084a.rle] a
|
||||
restore [locate_data_file id260084b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
# Cut
|
||||
prism tool b 0 0 10
|
||||
bcut result a tool
|
||||
|
@@ -1,6 +1,9 @@
|
||||
# Original bug : pro7637 (#3 with restore from Designer shape)
|
||||
# Date : 16apr97
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
dset SCALE 100
|
||||
|
||||
## restore the Prismed oblong created in Designer K1-2 (size 200 mm)
|
||||
@@ -11,6 +14,12 @@ tscale p1 0 0 0 1*SCALE
|
||||
restore [locate_data_file CTO900_pro7637c_box_dsg.rle] p2
|
||||
tscale p2 0 0 0 1*SCALE
|
||||
|
||||
sfixpcu p1 p1 -f
|
||||
sfixpcu p2 p2 -f
|
||||
|
||||
checkshape p1
|
||||
checkshape p2
|
||||
|
||||
bfuse result p2 p1
|
||||
|
||||
set square 1.85425e+09
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts16184
|
||||
# Date : 11mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts16184a.rle] a
|
||||
restore [locate_data_file cts16184b.brep] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
|
||||
|
@@ -3,11 +3,21 @@
|
||||
|
||||
puts "TODO #22911 Mandriva2010: Faulty shapes in variables faulty_1 to faulty_2"
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file ger60054a.rle] a
|
||||
restore [locate_data_file CTO900_ger60054b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
fsameparameter a
|
||||
fsameparameter b
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 22058
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : ksi0014
|
||||
# Date : 11mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_ksi0014a.rle] a
|
||||
restore [locate_data_file ksi0014b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
|
||||
|
@@ -1,10 +1,19 @@
|
||||
# Original bug : cts60005
|
||||
# Date : 19mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file cts60005a.rle] a
|
||||
fsameparameter a
|
||||
restore [locate_data_file CTO900_cts60005b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro8934
|
||||
# Date : 19mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_pro8934a.rle] a
|
||||
restore [locate_data_file CTO900_pro8934b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 20480.4
|
||||
|
@@ -1,9 +1,16 @@
|
||||
# Original bug : pro10505
|
||||
# Date : 20mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
|
||||
restore [locate_data_file CTO900_pro10505a.rle] a
|
||||
restore [locate_data_file CTO900_pro10505b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 302396
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : ger60239
|
||||
# Date : 23mar98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_ger60239a.rle] a
|
||||
restore [locate_data_file CTO900_ger60239b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 3468.6
|
||||
|
@@ -1,8 +1,18 @@
|
||||
# Original bug : cts21180
|
||||
# Date : 21 Sept 98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts21180c.rle] part
|
||||
restore [locate_data_file CTO900_cts21180d.rle] tool
|
||||
|
||||
sfixpcu part part -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
checkshape part
|
||||
checkshape tool
|
||||
|
||||
updatetolerance tool 1
|
||||
|
||||
bfuse result part tool
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts20171
|
||||
# Date : 13Mai98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO901_cts20171_base.rle] base
|
||||
restore [locate_data_file CTO901_cts20171_outil.rle] outil
|
||||
|
||||
sfixpcu base base -f
|
||||
sfixpcu outil outil -f
|
||||
|
||||
checkshape base
|
||||
checkshape outil
|
||||
|
||||
bfuse result base outil
|
||||
|
||||
set square 47886.5
|
||||
|
@@ -2,9 +2,17 @@
|
||||
# Date : 13Mai98
|
||||
# A1.gi
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO902_cts20452a.rle] a
|
||||
restore [locate_data_file CTO902_cts20452b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
|
@@ -2,9 +2,18 @@
|
||||
# Date : 13Mai98
|
||||
# D2
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file cts20551-tool.rle] a
|
||||
restore [locate_data_file CTO902_cts20551b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro12956
|
||||
# Date : 18Mai98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file pro12956a.rle] a
|
||||
restore [locate_data_file CTO904_pro12956b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
|
||||
|
@@ -1,8 +1,18 @@
|
||||
# Original bug : fra60275
|
||||
# Date : 4June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_fra60275a.rle] s
|
||||
restore [locate_data_file fra60275b.rle] c
|
||||
|
||||
sfixpcu s s -f
|
||||
sfixpcu c c -f
|
||||
|
||||
checkshape s
|
||||
checkshape c
|
||||
|
||||
tcopy c w
|
||||
mkplane f w
|
||||
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro13494
|
||||
# Date : 4June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file pro13494a.rle] a
|
||||
restore [locate_data_file pro13494b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
# pkv f
|
||||
explode a so
|
||||
#bfuse result a b
|
||||
|
@@ -1,10 +1,19 @@
|
||||
# Original bug : cts20974
|
||||
# Date : 12June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts20974a.rle] a
|
||||
fsameparameter a
|
||||
restore [locate_data_file CTO904_cts20974b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 3362.81
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro13555
|
||||
# Date : 12June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_pro13555a.rle] a
|
||||
restore [locate_data_file pro13555b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 3479.01
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts21044
|
||||
# Date : 24June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_cts21453a.rle] a
|
||||
restore [locate_data_file CTO900_cts21453b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 163507
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts20907
|
||||
# Date : 24June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts20907a.rle] a
|
||||
restore [locate_data_file cts20907b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 486.413
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts21124
|
||||
# Date : 24June98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts21124a.rle] a
|
||||
restore [locate_data_file cts21124b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 48061.7
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : pro14893
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_pro14893a.rle] a
|
||||
restore [locate_data_file pro14893b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 22717.7
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts20960
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts20960a.rle] a
|
||||
restore [locate_data_file cts20960b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 38854
|
||||
|
@@ -1,11 +1,22 @@
|
||||
# Original bug : pro14892
|
||||
# Date : 16July98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file pro14892a.rle] a
|
||||
restore [locate_data_file pro14892b.rle] aface
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu aface aface -f
|
||||
|
||||
checkshape a
|
||||
checkshape aface
|
||||
|
||||
prism b aface 0 0 -50
|
||||
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 601864
|
||||
|
@@ -1,9 +1,18 @@
|
||||
# Original bug : cts21364
|
||||
# Date : 26Aout98
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO904_cts21364a.rle] a
|
||||
restore [locate_data_file CTO904_cts21364b.rle] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
bfuse result a b
|
||||
|
||||
set square 46682.1
|
||||
|
@@ -1,8 +1,17 @@
|
||||
#ger60239
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CTO900_ger60239a.rle] c
|
||||
restore [locate_data_file CTO900_ger60239b.rle] d
|
||||
|
||||
sfixpcu c c -f
|
||||
sfixpcu d d -f
|
||||
|
||||
checkshape c
|
||||
checkshape d
|
||||
|
||||
bfuse result c d
|
||||
|
||||
set square 3468.6
|
||||
|
@@ -2,10 +2,18 @@ puts "ITA60531"
|
||||
puts "Fuse"
|
||||
puts ""
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file ita60531a.rle] b
|
||||
restore [locate_data_file ita60531b.rle] f
|
||||
|
||||
sfixpcu b b -f
|
||||
sfixpcu f f -f
|
||||
|
||||
checkshape b
|
||||
checkshape f
|
||||
|
||||
# Operation booleenne -> shape pas valide
|
||||
prism tool f 0 0 1
|
||||
|
||||
|
@@ -3,9 +3,18 @@ puts "PRO16252"
|
||||
puts "Fuse"
|
||||
puts ""
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file pro16252a.brep] a
|
||||
restore [locate_data_file pro16252b.brep] b
|
||||
|
||||
sfixpcu a a -f
|
||||
sfixpcu b b -f
|
||||
|
||||
checkshape a
|
||||
checkshape b
|
||||
|
||||
fsameparameter b
|
||||
maxtolerance a
|
||||
maxtolerance b
|
||||
|
@@ -3,9 +3,19 @@ puts "PRO16261"
|
||||
puts "Fuse"
|
||||
puts ""
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file pro16261-1.brep] s
|
||||
restore [locate_data_file pro16261-2.brep] t
|
||||
|
||||
sfixpcu s s -f
|
||||
sfixpcu t t -f
|
||||
|
||||
checkshape s
|
||||
checkshape t
|
||||
|
||||
|
||||
maxtolerance s
|
||||
#face tangente
|
||||
|
||||
|
@@ -2,9 +2,15 @@ puts "PRO16769"
|
||||
puts "Fuse"
|
||||
puts ""
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file CFE900_pro16gff.rle] base
|
||||
restore [locate_data_file pro16769b.rle] tool
|
||||
|
||||
sfixpcu base base -f
|
||||
sfixpcu tool tool -f
|
||||
|
||||
bfuse result base tool
|
||||
fsameparameter result
|
||||
|
||||
|
@@ -1,6 +1,13 @@
|
||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file OCC228.brep] sh
|
||||
|
||||
sfixpcu sh sh -f
|
||||
checkshape sh
|
||||
|
||||
explode sh
|
||||
|
||||
bop sh_1 sh_2
|
||||
|
@@ -1,6 +1,13 @@
|
||||
puts "TODO #22911 ALL: Error : The area of the resulting shape is"
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file OCC228.brep] sh
|
||||
|
||||
sfixpcu sh sh -f
|
||||
checkshape sh
|
||||
|
||||
explode sh
|
||||
|
||||
bop sh_2 sh_1
|
||||
|
@@ -1,4 +1,12 @@
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file OCC337.brep] sh
|
||||
|
||||
sfixpcu sh sh -f
|
||||
fixshape sh sh
|
||||
checkshape sh
|
||||
|
||||
explode sh
|
||||
|
||||
bop sh_1 sh_2
|
||||
|
@@ -1,4 +1,12 @@
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file OCC337.brep] sh
|
||||
|
||||
sfixpcu sh sh -f
|
||||
fixshape sh sh
|
||||
checkshape sh
|
||||
|
||||
explode sh
|
||||
|
||||
bop sh_2 sh_1
|
||||
|
@@ -1,6 +1,13 @@
|
||||
puts "TODO #22911 ALL: Error : The bopcut cannot be built."
|
||||
|
||||
# for "sfixpcu" command
|
||||
pload XSDRAW
|
||||
|
||||
restore [locate_data_file OCC228.brep] sh
|
||||
|
||||
sfixpcu sh sh -f
|
||||
checkshape sh
|
||||
|
||||
explode sh
|
||||
|
||||
bop sh_1 sh_2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user