mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
337bcd120f | ||
|
7c213da809 | ||
|
9f63b15ebe | ||
|
0f42a379ec | ||
|
e6ce7ba75a | ||
|
76a91b4982 | ||
|
cfd2fd0a80 | ||
|
795d6d7bb9 | ||
|
9e7854e71f | ||
|
163a262a70 | ||
|
ac3797065c | ||
|
2714f5dd39 | ||
|
d270c8d398 | ||
|
6121dafd1f | ||
|
c201bec884 |
@@ -325,6 +325,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
|
|||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
myBuilderCanWork=Standard_True;
|
myBuilderCanWork=Standard_True;
|
||||||
myShape=myBuilder->Result();
|
myShape=myBuilder->Result();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -400,6 +401,7 @@ const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Modified(const TopoDS_
|
|||||||
myErrorStatus=0;
|
myErrorStatus=0;
|
||||||
myBuilderCanWork=Standard_True;
|
myBuilderCanWork=Standard_True;
|
||||||
myShape=myBuilder->Result();
|
myShape=myBuilder->Result();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -92,6 +92,11 @@ is
|
|||||||
is virtual;
|
is virtual;
|
||||||
---Purpose: Returns true if the shape S has been deleted.
|
---Purpose: Returns true if the shape S has been deleted.
|
||||||
|
|
||||||
|
EnsureToleranceRule (myclass; theS : Shape from TopoDS);
|
||||||
|
---Purpose: Fixes all tolerances of shape theS and it's subshapes by the tolerance
|
||||||
|
-- rule: vertex tolerance >= edge tolerance >= face tolerance.
|
||||||
|
-- Edge or vertex tolerance which does not satisfy the tolerance rule will
|
||||||
|
-- be increased.
|
||||||
|
|
||||||
fields
|
fields
|
||||||
|
|
||||||
|
@@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <BRepBuilderAPI_MakeShape.ixx>
|
#include <BRepBuilderAPI_MakeShape.ixx>
|
||||||
|
#include <BRep_TEdge.hxx>
|
||||||
|
#include <BRep_TFace.hxx>
|
||||||
|
#include <BRep_TVertex.hxx>
|
||||||
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
@@ -116,4 +120,63 @@ Standard_Boolean BRepBuilderAPI_MakeShape::IsDeleted (const TopoDS_Shape& S)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : EnsureToleranceRule
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
void BRepBuilderAPI_MakeShape::EnsureToleranceRule(const TopoDS_Shape & theS)
|
||||||
|
{
|
||||||
|
if (theS.IsNull())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
for (TopExp_Explorer aFE(theS, TopAbs_FACE); aFE.More(); aFE.Next())
|
||||||
|
{
|
||||||
|
TopoDS_Face aF = TopoDS::Face(aFE.Current());
|
||||||
|
Standard_Real aFT = ((Handle_BRep_TFace &)aF.TShape())->Tolerance();
|
||||||
|
//
|
||||||
|
for (TopExp_Explorer anEE(aF, TopAbs_EDGE); anEE.More(); anEE.Next())
|
||||||
|
{
|
||||||
|
TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
|
||||||
|
Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
|
||||||
|
Standard_Real anET = anEG->Tolerance();
|
||||||
|
if (anET < aFT)
|
||||||
|
{
|
||||||
|
anET = aFT;
|
||||||
|
anEG->Tolerance(anET);
|
||||||
|
}
|
||||||
|
for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
|
||||||
|
{
|
||||||
|
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
||||||
|
Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
|
||||||
|
aVG->UpdateTolerance(anET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
for (TopExp_Explorer aVE(aF, TopAbs_VERTEX, TopAbs_EDGE);
|
||||||
|
aVE.More(); aVE.Next())
|
||||||
|
{
|
||||||
|
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
||||||
|
Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
|
||||||
|
aVG->UpdateTolerance(aFT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
for (TopExp_Explorer anEE(theS, TopAbs_EDGE, TopAbs_FACE);
|
||||||
|
anEE.More(); anEE.Next())
|
||||||
|
{
|
||||||
|
TopoDS_Edge anES = TopoDS::Edge(anEE.Current());
|
||||||
|
Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
|
||||||
|
Standard_Real anET = anEG->Tolerance();
|
||||||
|
for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next())
|
||||||
|
{
|
||||||
|
TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current());
|
||||||
|
Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape();
|
||||||
|
aVG->UpdateTolerance(anET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -127,6 +127,7 @@
|
|||||||
#include <BRepBuilderAPI_VertexInspector.hxx>
|
#include <BRepBuilderAPI_VertexInspector.hxx>
|
||||||
#include <BRepBuilderAPI_CellFilter.hxx>
|
#include <BRepBuilderAPI_CellFilter.hxx>
|
||||||
#include <BRepBuilderAPI_BndBoxTreeSelector.hxx>
|
#include <BRepBuilderAPI_BndBoxTreeSelector.hxx>
|
||||||
|
#include <BRepBuilderAPI_MakeShape.hxx>
|
||||||
#include <NCollection_UBTreeFiller.hxx>
|
#include <NCollection_UBTreeFiller.hxx>
|
||||||
|
|
||||||
static void SortBox (const Handle(Bnd_HArray1OfBox) hSetBoxes,
|
static void SortBox (const Handle(Bnd_HArray1OfBox) hSetBoxes,
|
||||||
@@ -1909,6 +1910,7 @@ void BRepBuilderAPI_Sewing::Perform(const Handle(Message_ProgressIndicator)& the
|
|||||||
mySewedShape.Nullify();
|
mySewedShape.Nullify();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(mySewedShape);
|
||||||
}
|
}
|
||||||
#if DEB
|
#if DEB
|
||||||
chr_total.Stop();
|
chr_total.Stop();
|
||||||
|
@@ -80,110 +80,44 @@ Standard_Boolean BRepCheck::SelfIntersection(const TopoDS_Wire& W,
|
|||||||
void BRepCheck::Print(const BRepCheck_Status stat,
|
void BRepCheck::Print(const BRepCheck_Status stat,
|
||||||
Standard_OStream& OS)
|
Standard_OStream& OS)
|
||||||
{
|
{
|
||||||
|
#define PRINT_CASE(stat) case stat: OS << #stat "\n"; break
|
||||||
|
|
||||||
switch (stat) {
|
switch (stat) {
|
||||||
case BRepCheck_NoError:
|
PRINT_CASE(BRepCheck_NoError);
|
||||||
OS << "BRepCheck_NoError\n";
|
PRINT_CASE(BRepCheck_InvalidPointOnCurve);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidPointOnCurveOnSurface);
|
||||||
case BRepCheck_InvalidPointOnCurve:
|
PRINT_CASE(BRepCheck_InvalidPointOnSurface);
|
||||||
OS << "BRepCheck_InvalidPointOnCurve\n";
|
PRINT_CASE(BRepCheck_No3DCurve);
|
||||||
break;
|
PRINT_CASE(BRepCheck_Multiple3DCurve);
|
||||||
case BRepCheck_InvalidPointOnCurveOnSurface:
|
PRINT_CASE(BRepCheck_Invalid3DCurve);
|
||||||
OS << "BRepCheck_InvalidPointOnCurveOnSurface\n";
|
PRINT_CASE(BRepCheck_NoCurveOnSurface);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidCurveOnSurface);
|
||||||
case BRepCheck_InvalidPointOnSurface:
|
PRINT_CASE(BRepCheck_InvalidCurveOnClosedSurface);
|
||||||
OS << "BRepCheck_InvalidPointOnSurface\n";
|
PRINT_CASE(BRepCheck_InvalidSameRangeFlag);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidSameParameterFlag);
|
||||||
case BRepCheck_No3DCurve:
|
PRINT_CASE(BRepCheck_InvalidDegeneratedFlag);
|
||||||
OS << "BRepCheck_No3DCurve\n";
|
PRINT_CASE(BRepCheck_FreeEdge);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidMultiConnexity);
|
||||||
case BRepCheck_Multiple3DCurve:
|
PRINT_CASE(BRepCheck_InvalidRange);
|
||||||
OS << "BRepCheck_Multiple3DCurve\n";
|
PRINT_CASE(BRepCheck_EmptyWire);
|
||||||
break;
|
PRINT_CASE(BRepCheck_RedundantEdge);
|
||||||
case BRepCheck_Invalid3DCurve:
|
PRINT_CASE(BRepCheck_SelfIntersectingWire);
|
||||||
OS << "BRepCheck_Invalid3DCurve\n";
|
PRINT_CASE(BRepCheck_NoSurface);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidWire);
|
||||||
case BRepCheck_NoCurveOnSurface:
|
PRINT_CASE(BRepCheck_RedundantWire);
|
||||||
OS << "BRepCheck_NoCurveOnSurface\n";
|
PRINT_CASE(BRepCheck_IntersectingWires);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidImbricationOfWires);
|
||||||
case BRepCheck_InvalidCurveOnSurface:
|
PRINT_CASE(BRepCheck_EmptyShell);
|
||||||
OS << "BRepCheck_InvalidCurveOnSurface\n";
|
PRINT_CASE(BRepCheck_RedundantFace);
|
||||||
break;
|
PRINT_CASE(BRepCheck_UnorientableShape);
|
||||||
case BRepCheck_InvalidCurveOnClosedSurface:
|
PRINT_CASE(BRepCheck_NotClosed);
|
||||||
OS << "BRepCheck_InvalidCurveOnClosedSurface\n";
|
PRINT_CASE(BRepCheck_NotConnected);
|
||||||
break;
|
PRINT_CASE(BRepCheck_SubshapeNotInShape);
|
||||||
case BRepCheck_InvalidSameRangeFlag:
|
PRINT_CASE(BRepCheck_BadOrientation);
|
||||||
OS << "BRepCheck_InvalidSameRangeFlag\n";
|
PRINT_CASE(BRepCheck_BadOrientationOfSubshape);
|
||||||
break;
|
PRINT_CASE(BRepCheck_InvalidToleranceValue);
|
||||||
case BRepCheck_InvalidSameParameterFlag:
|
PRINT_CASE(BRepCheck_CheckFail);
|
||||||
OS << "BRepCheck_InvalidSameParameterFlag\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_InvalidDegeneratedFlag:
|
|
||||||
OS << "BRepCheck_InvalidDegeneratedFlag\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_FreeEdge:
|
|
||||||
OS << "BRepCheck_FreeEdge\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_InvalidMultiConnexity:
|
|
||||||
OS << "BRepCheck_InvalidMultiConnexity\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_InvalidRange:
|
|
||||||
OS << "BRepCheck_InvalidRange\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_EmptyWire:
|
|
||||||
OS << "BRepCheck_EmptyWire\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_RedundantEdge:
|
|
||||||
OS << "BRepCheck_RedundantEdge\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_SelfIntersectingWire:
|
|
||||||
OS << "BRepCheck_SelfIntersectingWire\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_NoSurface:
|
|
||||||
OS << "BRepCheck_NoSurface\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_InvalidWire:
|
|
||||||
OS << "BRepCheck_InvalidWire\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_RedundantWire:
|
|
||||||
OS << "BRepCheck_RedundantWire\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_IntersectingWires:
|
|
||||||
OS << "BRepCheck_IntersectingWires\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_InvalidImbricationOfWires:
|
|
||||||
OS << "BRepCheck_InvalidImbricationOfWires\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_EmptyShell:
|
|
||||||
OS << "BRepCheck_EmptyShell\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_RedundantFace:
|
|
||||||
OS << "BRepCheck_RedundantFace\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_UnorientableShape:
|
|
||||||
OS << "BRepCheck_UnorientableShape\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_NotClosed:
|
|
||||||
OS << "BRepCheck_NotClosed\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_NotConnected:
|
|
||||||
OS << "BRepCheck_NotConnected\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_SubshapeNotInShape:
|
|
||||||
OS << "BRepCheck_SubshapeNotInShape\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_BadOrientation:
|
|
||||||
OS << "BRepCheck_BadOrientation\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_BadOrientationOfSubshape:
|
|
||||||
OS << "BRepCheck_BadOrientationOfSubshape\n";
|
|
||||||
break;
|
|
||||||
case BRepCheck_CheckFail:
|
|
||||||
OS << "BRepCheck_CheckFail\n";
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -63,8 +63,6 @@
|
|||||||
#include <TopoDS_Face.hxx>
|
#include <TopoDS_Face.hxx>
|
||||||
#include <Precision.hxx>
|
#include <Precision.hxx>
|
||||||
|
|
||||||
|
|
||||||
//modified by NIZNHY-PKV Thu May 05 09:01:57 2011f
|
|
||||||
static
|
static
|
||||||
Standard_Boolean Validate(const Adaptor3d_Curve&,
|
Standard_Boolean Validate(const Adaptor3d_Curve&,
|
||||||
const Adaptor3d_CurveOnSurface&,
|
const Adaptor3d_CurveOnSurface&,
|
||||||
@@ -83,12 +81,6 @@ static
|
|||||||
static
|
static
|
||||||
Standard_Real PrecSurface(const Adaptor3d_CurveOnSurface& aACS);
|
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
|
#define NCONTROL 23
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -230,7 +222,6 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
|
|||||||
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
|
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Edge(myShape));
|
||||||
|
|
||||||
TopAbs_ShapeEnum styp = S.ShapeType();
|
TopAbs_ShapeEnum styp = S.ShapeType();
|
||||||
// for (TopExp_Explorer exp(S,TopAbs_EDGE); exp.More(); exp.Next()) {
|
|
||||||
TopExp_Explorer exp(S,TopAbs_EDGE) ;
|
TopExp_Explorer exp(S,TopAbs_EDGE) ;
|
||||||
for ( ; exp.More(); exp.Next()) {
|
for ( ; exp.More(); exp.Next()) {
|
||||||
if (exp.Current().IsSame(myShape)) {
|
if (exp.Current().IsSame(myShape)) {
|
||||||
@@ -244,6 +235,9 @@ void BRepCheck_Edge::InContext(const TopoDS_Shape& S)
|
|||||||
|
|
||||||
switch (styp) {
|
switch (styp) {
|
||||||
case TopAbs_FACE:
|
case TopAbs_FACE:
|
||||||
|
if(BRep_Tool::Tolerance(TopoDS::Face(S)) - Tol > Precision::Confusion())
|
||||||
|
BRepCheck::Add(lst,BRepCheck_InvalidToleranceValue);
|
||||||
|
|
||||||
if (!myCref.IsNull()) {
|
if (!myCref.IsNull()) {
|
||||||
|
|
||||||
Standard_Boolean SameParameter = TE->SameParameter();
|
Standard_Boolean SameParameter = TE->SameParameter();
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <BRepCheck_Vertex.ixx>
|
#include <BRepCheck_Vertex.ixx>
|
||||||
|
|
||||||
|
#include <BRepCheck.hxx>
|
||||||
#include <BRepCheck_ListOfStatus.hxx>
|
#include <BRepCheck_ListOfStatus.hxx>
|
||||||
|
|
||||||
#include <BRep_TVertex.hxx>
|
#include <BRep_TVertex.hxx>
|
||||||
@@ -46,9 +47,9 @@
|
|||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS_Iterator.hxx>
|
#include <TopoDS_Iterator.hxx>
|
||||||
|
|
||||||
#include <BRepCheck.hxx>
|
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <TopoDS_Edge.hxx>
|
#include <TopoDS_Edge.hxx>
|
||||||
|
#include <Precision.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : BRepCheck_Vertex
|
//function : BRepCheck_Vertex
|
||||||
@@ -115,7 +116,6 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
case TopAbs_EDGE:
|
case TopAbs_EDGE:
|
||||||
{
|
{
|
||||||
// Try to find the vertex on the edge
|
// Try to find the vertex on the edge
|
||||||
|
|
||||||
const TopoDS_Edge& E = TopoDS::Edge(S);
|
const TopoDS_Edge& E = TopoDS::Edge(S);
|
||||||
TopoDS_Iterator itv(E.Oriented(TopAbs_FORWARD));
|
TopoDS_Iterator itv(E.Oriented(TopAbs_FORWARD));
|
||||||
TopoDS_Vertex VFind;
|
TopoDS_Vertex VFind;
|
||||||
@@ -149,9 +149,15 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
// VFind is not null for sure
|
// VFind is not null for sure
|
||||||
TopAbs_Orientation orv = VFind.Orientation();
|
TopAbs_Orientation orv = VFind.Orientation();
|
||||||
|
|
||||||
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Vertex(myShape));
|
Standard_Real TolV = TV->Tolerance();
|
||||||
Tol = Max(Tol,BRep_Tool::Tolerance(E)); // to check
|
Standard_Real TolE = BRep_Tool::Tolerance(E);
|
||||||
Tol *= Tol;
|
if (TolE > TolV)
|
||||||
|
{
|
||||||
|
if (TolE - TolV > Precision::Confusion())
|
||||||
|
BRepCheck::Add(myMap(S),BRepCheck_InvalidToleranceValue);
|
||||||
|
TolV = TolE;
|
||||||
|
}
|
||||||
|
Standard_Real aTol2 = TolV * TolV;
|
||||||
|
|
||||||
Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&E.TShape());
|
Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*)&E.TShape());
|
||||||
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
|
BRep_ListIteratorOfListOfCurveRepresentation itcr(TE->Curves());
|
||||||
@@ -173,7 +179,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
if (pr->IsPointOnCurve(C,L)) {
|
if (pr->IsPointOnCurve(C,L)) {
|
||||||
Controlp = C->Value(pr->Parameter());
|
Controlp = C->Value(pr->Parameter());
|
||||||
Controlp.Transform(L.Transformation());
|
Controlp.Transform(L.Transformation());
|
||||||
if (prep.SquareDistance(Controlp)> Tol) {
|
if (prep.SquareDistance(Controlp) > aTol2) {
|
||||||
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnCurve);
|
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnCurve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,14 +190,14 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
if (orv == TopAbs_FORWARD || multiple) {
|
if (orv == TopAbs_FORWARD || multiple) {
|
||||||
Controlp = C->Value(GC->First());
|
Controlp = C->Value(GC->First());
|
||||||
Controlp.Transform(L.Transformation());
|
Controlp.Transform(L.Transformation());
|
||||||
if (prep.SquareDistance(Controlp)> Tol) {
|
if (prep.SquareDistance(Controlp) > aTol2) {
|
||||||
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnCurve);
|
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnCurve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (orv == TopAbs_REVERSED || multiple) {
|
if (orv == TopAbs_REVERSED || multiple) {
|
||||||
Controlp = C->Value(GC->Last());
|
Controlp = C->Value(GC->Last());
|
||||||
Controlp.Transform(L.Transformation());
|
Controlp.Transform(L.Transformation());
|
||||||
if (prep.SquareDistance(Controlp)> Tol) {
|
if (prep.SquareDistance(Controlp) > aTol2) {
|
||||||
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnCurve);
|
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnCurve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,18 +218,16 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
gp_Pnt2d p2d = PC->Value(pr->Parameter());
|
gp_Pnt2d p2d = PC->Value(pr->Parameter());
|
||||||
Controlp = Su->Value(p2d.X(),p2d.Y());
|
Controlp = Su->Value(p2d.X(),p2d.Y());
|
||||||
Controlp.Transform(L.Transformation());
|
Controlp.Transform(L.Transformation());
|
||||||
if (prep.SquareDistance(Controlp)> Tol) {
|
if (prep.SquareDistance(Controlp) > aTol2) {
|
||||||
BRepCheck::Add(myMap(S),
|
BRepCheck::Add(myMap(S), BRepCheck_InvalidPointOnCurveOnSurface);
|
||||||
BRepCheck_InvalidPointOnCurveOnSurface);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!PC2.IsNull() && pr->IsPointOnCurveOnSurface(PC2,Su,L)) {
|
if (!PC2.IsNull() && pr->IsPointOnCurveOnSurface(PC2,Su,L)) {
|
||||||
gp_Pnt2d p2d = PC2->Value(pr->Parameter());
|
gp_Pnt2d p2d = PC2->Value(pr->Parameter());
|
||||||
Controlp = Su->Value(p2d.X(),p2d.Y());
|
Controlp = Su->Value(p2d.X(),p2d.Y());
|
||||||
Controlp.Transform(L.Transformation());
|
Controlp.Transform(L.Transformation());
|
||||||
if (prep.SquareDistance(Controlp)> Tol) {
|
if (prep.SquareDistance(Controlp) > aTol2) {
|
||||||
BRepCheck::Add(myMap(S),
|
BRepCheck::Add(myMap(S), BRepCheck_InvalidPointOnCurveOnSurface);
|
||||||
BRepCheck_InvalidPointOnCurveOnSurface);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
itpr.Next();
|
itpr.Next();
|
||||||
@@ -247,9 +251,15 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
const Handle(Geom_Surface)& Su = TF->Surface();
|
const Handle(Geom_Surface)& Su = TF->Surface();
|
||||||
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
|
TopLoc_Location L = (Floc * TFloc).Predivided(myShape.Location());
|
||||||
|
|
||||||
Standard_Real Tol = BRep_Tool::Tolerance(TopoDS::Vertex(myShape));
|
Standard_Real TolV = TV->Tolerance();
|
||||||
Tol = Max(Tol,BRep_Tool::Tolerance(TopoDS::Face(S))); // to check
|
Standard_Real TolF = TF->Tolerance();
|
||||||
Tol *= Tol;
|
if (TolF > TolV)
|
||||||
|
{
|
||||||
|
if (TolF - TolV > Precision::Confusion())
|
||||||
|
BRepCheck::Add(myMap(S),BRepCheck_InvalidToleranceValue);
|
||||||
|
TolV = TolF;
|
||||||
|
}
|
||||||
|
Standard_Real aTol2 = TolV * TolV;
|
||||||
|
|
||||||
BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
|
BRep_ListIteratorOfListOfPointRepresentation itpr(TV->Points());
|
||||||
while (itpr.More()) {
|
while (itpr.More()) {
|
||||||
@@ -257,7 +267,7 @@ void BRepCheck_Vertex::InContext(const TopoDS_Shape& S)
|
|||||||
if (pr->IsPointOnSurface(Su,L)) {
|
if (pr->IsPointOnSurface(Su,L)) {
|
||||||
Controlp = Su->Value(pr->Parameter(),pr->Parameter2());
|
Controlp = Su->Value(pr->Parameter(),pr->Parameter2());
|
||||||
Controlp.Transform(L.Transformation());
|
Controlp.Transform(L.Transformation());
|
||||||
if (prep.SquareDistance(Controlp)> Tol) {
|
if (prep.SquareDistance(Controlp) > aTol2) {
|
||||||
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnSurface);
|
BRepCheck::Add(myMap(S),BRepCheck_InvalidPointOnSurface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -463,6 +463,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
/* // loop of control of descendance
|
/* // loop of control of descendance
|
||||||
|
|
||||||
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
TopExp_Explorer expr(mySbase, TopAbs_FACE);
|
||||||
|
@@ -391,6 +391,7 @@ void BRepFilletAPI_MakeChamfer::Build()
|
|||||||
if (myBuilder.IsDone()){
|
if (myBuilder.IsDone()){
|
||||||
Done();
|
Done();
|
||||||
myShape = myBuilder.Shape();
|
myShape = myBuilder.Shape();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
|
|
||||||
//creation of the Map.
|
//creation of the Map.
|
||||||
TopExp_Explorer ex;
|
TopExp_Explorer ex;
|
||||||
|
@@ -532,6 +532,7 @@ void BRepFilletAPI_MakeFillet::Build()
|
|||||||
if(myBuilder.IsDone()) {
|
if(myBuilder.IsDone()) {
|
||||||
Done();
|
Done();
|
||||||
myShape = myBuilder.Shape();
|
myShape = myBuilder.Shape();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
|
|
||||||
// creation of the Map.
|
// creation of the Map.
|
||||||
TopExp_Explorer ex;
|
TopExp_Explorer ex;
|
||||||
|
@@ -24,7 +24,9 @@
|
|||||||
#include <BRepGProp_VinertGK.hxx>
|
#include <BRepGProp_VinertGK.hxx>
|
||||||
#include <BRepGProp_Face.hxx>
|
#include <BRepGProp_Face.hxx>
|
||||||
#include <BRepGProp_Domain.hxx>
|
#include <BRepGProp_Domain.hxx>
|
||||||
|
#include <GProp_PGProps.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
|
#include <TopoDS_Vertex.hxx>
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
|
|
||||||
#include <TopTools.hxx>
|
#include <TopTools.hxx>
|
||||||
@@ -32,6 +34,8 @@
|
|||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BRepCheck_Shell.hxx>
|
#include <BRepCheck_Shell.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
|
#include <BRep_TEdge.hxx>
|
||||||
|
#include <BRep_TVertex.hxx>
|
||||||
#ifdef DEB
|
#ifdef DEB
|
||||||
static Standard_Integer AffichEps = 0;
|
static Standard_Integer AffichEps = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -55,9 +59,15 @@ void BRepGProp::LinearProperties(const TopoDS_Shape& S, GProp_GProps& SProps){
|
|||||||
// Standard_Integer n,i;
|
// Standard_Integer n,i;
|
||||||
TopExp_Explorer ex;
|
TopExp_Explorer ex;
|
||||||
for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
|
for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
|
||||||
BAC.Initialize(TopoDS::Edge(ex.Current()));
|
TopoDS_Edge anES = TopoDS::Edge(ex.Current());
|
||||||
BRepGProp_Cinert CG(BAC,P);
|
Handle_BRep_TEdge & anEG = (Handle_BRep_TEdge &)anES.TShape();
|
||||||
SProps.Add(CG);
|
BRep_TEdge dsd;
|
||||||
|
if (!anEG->Degenerated())
|
||||||
|
{
|
||||||
|
BAC.Initialize(anES);
|
||||||
|
BRepGProp_Cinert CG(BAC,P);
|
||||||
|
SProps.Add(CG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -59,6 +59,7 @@ const BRepFill_Pipe& BRepOffsetAPI_MakePipe::Pipe() const
|
|||||||
void BRepOffsetAPI_MakePipe::Build()
|
void BRepOffsetAPI_MakePipe::Build()
|
||||||
{
|
{
|
||||||
myShape = myPipe.Shape();
|
myShape = myPipe.Shape();
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -225,6 +225,7 @@ void BRepOffsetAPI_MakePipeShell::Delete( const TopoDS_Shape& Profile)
|
|||||||
Ok = myPipe->Build();
|
Ok = myPipe->Build();
|
||||||
if (Ok) {
|
if (Ok) {
|
||||||
myShape = myPipe->Shape();
|
myShape = myPipe->Shape();
|
||||||
|
EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
else NotDone();
|
else NotDone();
|
||||||
|
@@ -64,6 +64,7 @@ BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
|
|||||||
{
|
{
|
||||||
myNormalProjector.Build();
|
myNormalProjector.Build();
|
||||||
myShape = myNormalProjector.Projection();
|
myShape = myNormalProjector.Projection();
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(myShape);
|
||||||
Done();
|
Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -800,6 +800,27 @@ static Standard_Integer scalexyz(Draw_Interpretor& di, Standard_Integer n, const
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Standard_Integer EnsureTolRule(
|
||||||
|
Draw_Interpretor & theDI, Standard_Integer theC, const char ** theAs)
|
||||||
|
{
|
||||||
|
if (theC != 3)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
TopoDS_Shape aS = DBRep::Get(theAs[2]);
|
||||||
|
if (aS.IsNull())
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
TopoDS_Shape aRes = BRepBuilderAPI_Copy(aS);
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(aRes);
|
||||||
|
//
|
||||||
|
DBRep::Set(theAs[1], aRes);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void BRepTest::BasicCommands(Draw_Interpretor& theCommands)
|
void BRepTest::BasicCommands(Draw_Interpretor& theCommands)
|
||||||
{
|
{
|
||||||
static Standard_Boolean done = Standard_False;
|
static Standard_Boolean done = Standard_False;
|
||||||
@@ -931,4 +952,6 @@ void BRepTest::BasicCommands(Draw_Interpretor& theCommands)
|
|||||||
"scalexyz res shape factor_x factor_y factor_z",
|
"scalexyz res shape factor_x factor_y factor_z",
|
||||||
__FILE__,
|
__FILE__,
|
||||||
scalexyz, g);
|
scalexyz, g);
|
||||||
|
|
||||||
|
theCommands.Add("EnsureTolRule", "res shape", __FILE__, EnsureTolRule, g);
|
||||||
}
|
}
|
||||||
|
@@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
|
#include <NCollection_Array1.hxx>
|
||||||
|
|
||||||
//#ifdef WNT
|
//#ifdef WNT
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -114,13 +115,13 @@ Standard_IMPORT Standard_Integer BRepCheck_Trace(const Standard_Integer phase);
|
|||||||
//function : FindNamed
|
//function : FindNamed
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean FindNamed(const TopoDS_Shape& S,
|
static Standard_Boolean FindNamed(const TopoDS_Shape& S,
|
||||||
char*& Name)
|
const char*& Name)
|
||||||
{
|
{
|
||||||
for (Standard_Integer i = 1 ;i <= lfaulty.Length(); i++) {
|
for (Standard_Integer i = 1 ;i <= lfaulty.Length(); i++) {
|
||||||
Handle(DBRep_DrawableShape) DS =
|
Handle(DBRep_DrawableShape) DS =
|
||||||
Handle(DBRep_DrawableShape)::DownCast(lfaulty(i));
|
Handle(DBRep_DrawableShape)::DownCast(lfaulty(i));
|
||||||
if (DS->Shape().IsSame(S)) {
|
if (DS->Shape().IsSame(S)) {
|
||||||
Name = (char*)DS->Name();
|
Name = DS->Name();
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -154,7 +155,6 @@ static void PrintSub(Standard_OStream& OS,
|
|||||||
const TopAbs_ShapeEnum Subtype)
|
const TopAbs_ShapeEnum Subtype)
|
||||||
|
|
||||||
{
|
{
|
||||||
char* Name;
|
|
||||||
BRepCheck_ListIteratorOfListOfStatus itl;
|
BRepCheck_ListIteratorOfListOfStatus itl;
|
||||||
TopExp_Explorer exp;
|
TopExp_Explorer exp;
|
||||||
for (exp.Init(S,Subtype); exp.More(); exp.Next()) {
|
for (exp.Init(S,Subtype); exp.More(); exp.Next()) {
|
||||||
@@ -168,25 +168,27 @@ static void PrintSub(Standard_OStream& OS,
|
|||||||
theMap(sub).Append(S);
|
theMap(sub).Append(S);
|
||||||
itl.Initialize(res->StatusOnShape());
|
itl.Initialize(res->StatusOnShape());
|
||||||
if (itl.Value() != BRepCheck_NoError) {
|
if (itl.Value() != BRepCheck_NoError) {
|
||||||
if (!FindNamed(sub,Name)) {
|
const char* pName;
|
||||||
|
if (!FindNamed(sub,pName)) {
|
||||||
nbfaulty++;
|
nbfaulty++;
|
||||||
Name = (char*)malloc(18*sizeof(char));
|
char aName[256];
|
||||||
sprintf(Name,"%s%d",checkfaultyname,nbfaulty);
|
sprintf(aName,"%.80s%d",checkfaultyname,nbfaulty);
|
||||||
DBRep::Set(Name,sub);
|
DBRep::Set(aName,sub);
|
||||||
lfaulty.Append(Draw::Get((Standard_CString&)Name));
|
pName = aName;
|
||||||
}
|
lfaulty.Append(Draw::Get(pName));
|
||||||
OS << "Shape " << Name << " ";
|
OS << "Shape " << pName << " ";
|
||||||
if (!FindNamed(S,Name)) {
|
if (!FindNamed(S,pName)) {
|
||||||
nbfaulty++;
|
nbfaulty++;
|
||||||
Name = (char*)malloc(18*sizeof(char));
|
sprintf(aName,"%.80s%d",checkfaultyname,nbfaulty);
|
||||||
sprintf(Name,"%s%d",checkfaultyname,nbfaulty);
|
DBRep::Set(aName,S);
|
||||||
DBRep::Set(Name,S);
|
pName = aName;
|
||||||
lfaulty.Append(Draw::Get((Standard_CString&)Name));
|
lfaulty.Append(Draw::Get(pName));
|
||||||
}
|
}
|
||||||
OS << " on shape " << Name << " :\n";
|
OS << " on shape " << pName << " :\n";
|
||||||
for (;itl.More(); itl.Next()) {
|
for (;itl.More(); itl.Next()) {
|
||||||
BRepCheck::Print(itl.Value(),OS);
|
BRepCheck::Print(itl.Value(),OS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -206,20 +208,21 @@ static void Print(Standard_OStream& OS,
|
|||||||
Print(OS,Ana,iter.Value());
|
Print(OS,Ana,iter.Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
char* Name;
|
|
||||||
TopAbs_ShapeEnum styp = S.ShapeType();
|
TopAbs_ShapeEnum styp = S.ShapeType();
|
||||||
BRepCheck_ListIteratorOfListOfStatus itl;
|
BRepCheck_ListIteratorOfListOfStatus itl;
|
||||||
if (!Ana.Result(S).IsNull() && !theMap.IsBound(S)) {
|
if (!Ana.Result(S).IsNull() && !theMap.IsBound(S)) {
|
||||||
itl.Initialize(Ana.Result(S)->Status());
|
itl.Initialize(Ana.Result(S)->Status());
|
||||||
if (itl.Value() != BRepCheck_NoError) {
|
if (itl.Value() != BRepCheck_NoError) {
|
||||||
if (!FindNamed(S,Name)) {
|
const char* pName;
|
||||||
|
char aName[256];
|
||||||
|
if (!FindNamed(S,pName)) {
|
||||||
nbfaulty++;
|
nbfaulty++;
|
||||||
Name = (char*)malloc(18*sizeof(char));
|
sprintf(aName,"%.80s%d",checkfaultyname,nbfaulty);
|
||||||
sprintf(Name,"%s%d",checkfaultyname,nbfaulty);
|
DBRep::Set(aName,S);
|
||||||
DBRep::Set(Name,S);
|
pName = aName;
|
||||||
lfaulty.Append(Draw::Get((Standard_CString&)Name));
|
lfaulty.Append(Draw::Get(pName));
|
||||||
}
|
}
|
||||||
OS << "On Shape " << Name << " :\n";
|
OS << "On Shape " << pName << " :\n";
|
||||||
|
|
||||||
for (;itl.More(); itl.Next()) {
|
for (;itl.More(); itl.Next()) {
|
||||||
BRepCheck::Print(itl.Value(),OS);
|
BRepCheck::Print(itl.Value(),OS);
|
||||||
@@ -466,99 +469,18 @@ void ContextualDump(Draw_Interpretor& theCommands,
|
|||||||
nbfaulty = 0;
|
nbfaulty = 0;
|
||||||
lfaulty.Clear();
|
lfaulty.Clear();
|
||||||
|
|
||||||
//Print(cout, theAna, theShape);
|
|
||||||
Standard_SStream aSStream;
|
Standard_SStream aSStream;
|
||||||
Print(aSStream, theAna, theShape);
|
Print(aSStream, theAna, theShape);
|
||||||
theCommands << aSStream;
|
theCommands << aSStream;
|
||||||
//cout<<"\n";
|
|
||||||
theCommands<<"\n";
|
theCommands<<"\n";
|
||||||
theMap.Clear();
|
theMap.Clear();
|
||||||
|
|
||||||
if (nbfaulty !=0)
|
if (nbfaulty !=0)
|
||||||
theCommands<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
|
theCommands<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
|
||||||
//cout<<"Faulty shapes in variables "<<checkfaultyname<<"1 to "<<checkfaultyname<<nbfaulty<<" \n";
|
|
||||||
|
|
||||||
//cout<<endl;
|
|
||||||
theCommands<<"\n";
|
theCommands<<"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : FillProblems
|
|
||||||
// purpose : auxilary for StructuralDump
|
|
||||||
//=======================================================================
|
|
||||||
static void FillProblems(const BRepCheck_Status stat,
|
|
||||||
Handle(TColStd_HArray1OfInteger)& NbProblems)
|
|
||||||
{
|
|
||||||
switch (stat) {
|
|
||||||
case BRepCheck_InvalidPointOnCurve:
|
|
||||||
NbProblems->SetValue(1,NbProblems->Value(1)+1); break;
|
|
||||||
case BRepCheck_InvalidPointOnCurveOnSurface:
|
|
||||||
NbProblems->SetValue(2,NbProblems->Value(2)+1); break;
|
|
||||||
case BRepCheck_InvalidPointOnSurface:
|
|
||||||
NbProblems->SetValue(3,NbProblems->Value(3)+1); break;
|
|
||||||
case BRepCheck_No3DCurve:
|
|
||||||
NbProblems->SetValue(4,NbProblems->Value(4)+1); break;
|
|
||||||
case BRepCheck_Multiple3DCurve:
|
|
||||||
NbProblems->SetValue(5,NbProblems->Value(5)+1); break;
|
|
||||||
case BRepCheck_Invalid3DCurve:
|
|
||||||
NbProblems->SetValue(6,NbProblems->Value(6)+1); break;
|
|
||||||
case BRepCheck_NoCurveOnSurface:
|
|
||||||
NbProblems->SetValue(7,NbProblems->Value(7)+1); break;
|
|
||||||
case BRepCheck_InvalidCurveOnSurface:
|
|
||||||
NbProblems->SetValue(8,NbProblems->Value(8)+1); break;
|
|
||||||
case BRepCheck_InvalidCurveOnClosedSurface:
|
|
||||||
NbProblems->SetValue(9,NbProblems->Value(9)+1); break;
|
|
||||||
case BRepCheck_InvalidSameRangeFlag:
|
|
||||||
NbProblems->SetValue(10,NbProblems->Value(10)+1); break;
|
|
||||||
case BRepCheck_InvalidSameParameterFlag:
|
|
||||||
NbProblems->SetValue(11,NbProblems->Value(11)+1); break;
|
|
||||||
case BRepCheck_InvalidDegeneratedFlag:
|
|
||||||
NbProblems->SetValue(12,NbProblems->Value(12)+1); break;
|
|
||||||
case BRepCheck_FreeEdge:
|
|
||||||
NbProblems->SetValue(13,NbProblems->Value(13)+1); break;
|
|
||||||
case BRepCheck_InvalidMultiConnexity:
|
|
||||||
NbProblems->SetValue(14,NbProblems->Value(14)+1); break;
|
|
||||||
case BRepCheck_InvalidRange:
|
|
||||||
NbProblems->SetValue(15,NbProblems->Value(15)+1); break;
|
|
||||||
case BRepCheck_EmptyWire:
|
|
||||||
NbProblems->SetValue(16,NbProblems->Value(16)+1); break;
|
|
||||||
case BRepCheck_RedundantEdge:
|
|
||||||
NbProblems->SetValue(17,NbProblems->Value(17)+1); break;
|
|
||||||
case BRepCheck_SelfIntersectingWire:
|
|
||||||
NbProblems->SetValue(18,NbProblems->Value(18)+1); break;
|
|
||||||
case BRepCheck_NoSurface:
|
|
||||||
NbProblems->SetValue(19,NbProblems->Value(19)+1); break;
|
|
||||||
case BRepCheck_InvalidWire:
|
|
||||||
NbProblems->SetValue(20,NbProblems->Value(20)+1); break;
|
|
||||||
case BRepCheck_RedundantWire:
|
|
||||||
NbProblems->SetValue(21,NbProblems->Value(21)+1); break;
|
|
||||||
case BRepCheck_IntersectingWires:
|
|
||||||
NbProblems->SetValue(22,NbProblems->Value(22)+1); break;
|
|
||||||
case BRepCheck_InvalidImbricationOfWires:
|
|
||||||
NbProblems->SetValue(23,NbProblems->Value(23)+1); break;
|
|
||||||
case BRepCheck_EmptyShell:
|
|
||||||
NbProblems->SetValue(24,NbProblems->Value(24)+1); break;
|
|
||||||
case BRepCheck_RedundantFace:
|
|
||||||
NbProblems->SetValue(25,NbProblems->Value(25)+1); break;
|
|
||||||
case BRepCheck_UnorientableShape:
|
|
||||||
NbProblems->SetValue(26,NbProblems->Value(26)+1); break;
|
|
||||||
case BRepCheck_NotClosed:
|
|
||||||
NbProblems->SetValue(27,NbProblems->Value(27)+1); break;
|
|
||||||
case BRepCheck_NotConnected:
|
|
||||||
NbProblems->SetValue(28,NbProblems->Value(28)+1); break;
|
|
||||||
case BRepCheck_SubshapeNotInShape:
|
|
||||||
NbProblems->SetValue(29,NbProblems->Value(29)+1); break;
|
|
||||||
case BRepCheck_BadOrientation:
|
|
||||||
NbProblems->SetValue(30,NbProblems->Value(30)+1); break;
|
|
||||||
case BRepCheck_BadOrientationOfSubshape:
|
|
||||||
NbProblems->SetValue(31,NbProblems->Value(31)+1); break;
|
|
||||||
case BRepCheck_CheckFail:
|
|
||||||
NbProblems->SetValue(32,NbProblems->Value(32)+1); break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -593,13 +515,13 @@ static void GetProblemSub(const BRepCheck_Analyzer& Ana,
|
|||||||
|
|
||||||
if(ii>sl->Length()) {
|
if(ii>sl->Length()) {
|
||||||
sl->Append(sub);
|
sl->Append(sub);
|
||||||
FillProblems(itl.Value(),NbProblems);
|
NbProblems->ChangeValue(itl.Value())++;
|
||||||
}
|
}
|
||||||
for(ii=1; ii<=sl->Length(); ii++)
|
for(ii=1; ii<=sl->Length(); ii++)
|
||||||
if(sl->Value(ii).IsSame(Shape)) break;
|
if(sl->Value(ii).IsSame(Shape)) break;
|
||||||
if(ii>sl->Length()) {
|
if(ii>sl->Length()) {
|
||||||
sl->Append(Shape);
|
sl->Append(Shape);
|
||||||
FillProblems(itl.Value(),NbProblems);
|
NbProblems->ChangeValue(itl.Value())++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -628,7 +550,7 @@ static void GetProblemShapes(const BRepCheck_Analyzer& Ana,
|
|||||||
|
|
||||||
if (itl.Value() != BRepCheck_NoError) {
|
if (itl.Value() != BRepCheck_NoError) {
|
||||||
sl->Append(Shape);
|
sl->Append(Shape);
|
||||||
FillProblems(itl.Value(),NbProblems);
|
NbProblems->ChangeValue(itl.Value())++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!theMap.IsBound(Shape)) {
|
if (!theMap.IsBound(Shape)) {
|
||||||
@@ -653,7 +575,6 @@ static void GetProblemShapes(const BRepCheck_Analyzer& Ana,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@@ -672,122 +593,60 @@ void StructuralDump(Draw_Interpretor& theCommands,
|
|||||||
const TopoDS_Shape &theShape)
|
const TopoDS_Shape &theShape)
|
||||||
{
|
{
|
||||||
Standard_Integer i;
|
Standard_Integer i;
|
||||||
//cout << "StructuralDump" << endl;
|
|
||||||
//cout << " -- The Shape " << ShName << " has problems :"<<endl;
|
|
||||||
//cout<<" Check Count"<<endl;
|
|
||||||
//cout<<" ------------------------------------------------"<<endl;
|
|
||||||
theCommands << " -- The Shape " << ShName << " has problems :"<<"\n";
|
theCommands << " -- The Shape " << ShName << " has problems :"<<"\n";
|
||||||
theCommands<<" Check Count"<<"\n";
|
theCommands<<" Check Count"<<"\n";
|
||||||
theCommands<<" ------------------------------------------------"<<"\n";
|
theCommands<<" ------------------------------------------------"<<"\n";
|
||||||
|
|
||||||
Handle(TColStd_HArray1OfInteger) NbProblems = new TColStd_HArray1OfInteger(1,32);
|
Handle(TColStd_HArray1OfInteger) NbProblems = new TColStd_HArray1OfInteger(1,33);
|
||||||
for(i=1; i<=32; i++) NbProblems->SetValue(i,0);
|
for (i=1; i<=33; i++) NbProblems->SetValue (i,0);
|
||||||
Handle(TopTools_HSequenceOfShape) sl,slv,sle,slw,slf,sls,slo;
|
Handle(TopTools_HSequenceOfShape) sl,slv,sle,slw,slf,sls,slo;
|
||||||
sl = new TopTools_HSequenceOfShape();
|
sl = new TopTools_HSequenceOfShape();
|
||||||
theMap.Clear();
|
theMap.Clear();
|
||||||
GetProblemShapes(theAna, theShape, sl, NbProblems);
|
GetProblemShapes(theAna, theShape, sl, NbProblems);
|
||||||
theMap.Clear();
|
theMap.Clear();
|
||||||
|
|
||||||
if(NbProblems->Value(1)>0)
|
NCollection_Array1<const char*> aProblems (1,33);
|
||||||
theCommands<<" Invalid Point on Curve ................... "<<NbProblems->Value(1)<<"\n";
|
|
||||||
//cout<<" Invalid Point on Curve ................... "<<NbProblems->Value(1)<<endl;
|
aProblems.SetValue( BRepCheck_InvalidPointOnCurve, " Invalid Point on Curve ................... ");
|
||||||
if(NbProblems->Value(2)>0)
|
aProblems.SetValue(BRepCheck_InvalidPointOnCurveOnSurface, " Invalid Point on CurveOnSurface .......... ");
|
||||||
theCommands<<" Invalid Point on CurveOnSurface .......... "<<NbProblems->Value(2)<<"\n";
|
aProblems.SetValue(BRepCheck_InvalidPointOnSurface, " Invalid Point on Surface ................. ");
|
||||||
//cout<<" Invalid Point on CurveOnSurface .......... "<<NbProblems->Value(2)<<endl;
|
aProblems.SetValue(BRepCheck_No3DCurve, " No 3D Curve .............................. ");
|
||||||
if(NbProblems->Value(3)>0)
|
aProblems.SetValue(BRepCheck_Multiple3DCurve, " Multiple 3D Curve ........................ ");
|
||||||
theCommands<<" Invalid Point on Surface ................. "<<NbProblems->Value(3)<<"\n";
|
aProblems.SetValue(BRepCheck_Invalid3DCurve, " Invalid 3D Curve ......................... ");
|
||||||
//cout<<" Invalid Point on Surface ................. "<<NbProblems->Value(3)<<endl;
|
aProblems.SetValue(BRepCheck_NoCurveOnSurface, " No Curve on Surface ...................... ");
|
||||||
if(NbProblems->Value(4)>0)
|
aProblems.SetValue(BRepCheck_InvalidCurveOnSurface, " Invalid Curve on Surface ................. ");
|
||||||
theCommands<<" No 3D Curve .............................. "<<NbProblems->Value(4)<<"\n";
|
aProblems.SetValue(BRepCheck_InvalidCurveOnClosedSurface, " Invalid Curve on Closed Surface ................. ");
|
||||||
//cout<<" No 3D Curve .............................. "<<NbProblems->Value(4)<<endl;
|
aProblems.SetValue(BRepCheck_InvalidSameRangeFlag, " Invalid SameRange Flag ................... ");
|
||||||
if(NbProblems->Value(5)>0)
|
aProblems.SetValue(BRepCheck_InvalidSameParameterFlag, " Invalid SameParameter Flag ............... ");
|
||||||
theCommands<<" Multiple 3D Curve ........................ "<<NbProblems->Value(5)<<"\n";
|
aProblems.SetValue(BRepCheck_InvalidDegeneratedFlag, " Invalid Degenerated Flag ................. ");
|
||||||
//cout<<" Multiple 3D Curve ........................ "<<NbProblems->Value(5)<<endl;
|
aProblems.SetValue(BRepCheck_FreeEdge, " Free Edge ................................ ");
|
||||||
if(NbProblems->Value(6)>0)
|
aProblems.SetValue(BRepCheck_InvalidMultiConnexity, " Invalid Multi Connexity ................... ");
|
||||||
theCommands<<" Invalid 3D Curve ......................... "<<NbProblems->Value(6)<<"\n";
|
aProblems.SetValue(BRepCheck_InvalidRange, " Invalid Range ................... ");
|
||||||
//cout<<" Invalid 3D Curve ......................... "<<NbProblems->Value(6)<<endl;
|
aProblems.SetValue(BRepCheck_EmptyWire, " Empty Wire ................... ");
|
||||||
if(NbProblems->Value(7)>0)
|
aProblems.SetValue(BRepCheck_RedundantEdge, " BRepCheck_RedundantEdge ................... ");
|
||||||
theCommands<<" No Curve on Surface ...................... "<<NbProblems->Value(7)<<"\n";
|
aProblems.SetValue(BRepCheck_SelfIntersectingWire, " Self Intersecting Wire ................... ");
|
||||||
//cout<<" No Curve on Surface ...................... "<<NbProblems->Value(7)<<endl;
|
aProblems.SetValue(BRepCheck_NoSurface, " No Surface ................... ");
|
||||||
if(NbProblems->Value(8)>0)
|
aProblems.SetValue(BRepCheck_InvalidWire, " Invalid Wire ................... ");
|
||||||
theCommands<<" Invalid Curve on Surface ................. "<<NbProblems->Value(8)<<"\n";
|
aProblems.SetValue(BRepCheck_RedundantWire, " Redundant Wire ................... ");
|
||||||
//cout<<" Invalid Curve on Surface ................. "<<NbProblems->Value(8)<<endl;
|
aProblems.SetValue(BRepCheck_IntersectingWires, " Intersecting Wires ................... ");
|
||||||
if(NbProblems->Value(9)>0)
|
aProblems.SetValue(BRepCheck_InvalidImbricationOfWires, " Invalid Imbrication Of Wires .................. ");
|
||||||
theCommands<<" Invalid Curve on closed Surface .......... "<<NbProblems->Value(9)<<"\n";
|
aProblems.SetValue(BRepCheck_EmptyShell, " Empty Shell ................... ");
|
||||||
//cout<<" Invalid Curve on closed Surface .......... "<<NbProblems->Value(9)<<endl;
|
aProblems.SetValue(BRepCheck_RedundantFace, " Redundant Face ................... ");
|
||||||
if(NbProblems->Value(10)>0)
|
aProblems.SetValue(BRepCheck_UnorientableShape, " Unorientable Shape ................... ");
|
||||||
theCommands<<" Invalid SameRange Flag ................... "<<NbProblems->Value(10)<<"\n";
|
aProblems.SetValue(BRepCheck_NotClosed, " Not Closed ................... ");
|
||||||
//cout<<" Invalid SameRange Flag ................... "<<NbProblems->Value(10)<<endl;
|
aProblems.SetValue(BRepCheck_NotConnected, " Not Connected ................... ");
|
||||||
if(NbProblems->Value(11)>0)
|
aProblems.SetValue(BRepCheck_SubshapeNotInShape, " Subshape Not In Shape ................... ");
|
||||||
theCommands<<" Invalid SameParameter Flag ............... "<<NbProblems->Value(11)<<"\n";
|
aProblems.SetValue(BRepCheck_BadOrientation, " Bad Orientation ................... ");
|
||||||
//cout<<" Invalid SameParameter Flag ............... "<<NbProblems->Value(11)<<endl;
|
aProblems.SetValue(BRepCheck_BadOrientationOfSubshape, " Bad Orientation of Subshape .............. ");
|
||||||
if(NbProblems->Value(12)>0)
|
aProblems.SetValue(BRepCheck_InvalidToleranceValue, " Invalid tolerance value................... ");
|
||||||
theCommands<<" Invalid Degenerated Flag ................. "<<NbProblems->Value(12)<<"\n";
|
aProblems.SetValue(BRepCheck_CheckFail, " Checkshape failure....................... ");
|
||||||
//cout<<" Invalid Degenerated Flag ................. "<<NbProblems->Value(12)<<endl;
|
|
||||||
if(NbProblems->Value(13)>0)
|
for (Standard_Integer i = (Standard_Integer)BRepCheck_InvalidPointOnCurve; i <= (Standard_Integer)BRepCheck_CheckFail; ++i)
|
||||||
theCommands<<" Free Edge ................................ "<<NbProblems->Value(13)<<"\n";
|
{
|
||||||
//cout<<" Free Edge ................................ "<<NbProblems->Value(13)<<endl;
|
if (NbProblems->Value (i) > 0)
|
||||||
if(NbProblems->Value(14)>0)
|
theCommands << i << aProblems.Value (i) << "\n";
|
||||||
theCommands<<" Invalid MultiConnexity ................... "<<NbProblems->Value(14)<<"\n";
|
}
|
||||||
//cout<<" Invalid MultiConnexity ................... "<<NbProblems->Value(14)<<endl;
|
|
||||||
if(NbProblems->Value(15)>0)
|
|
||||||
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;
|
|
||||||
if(NbProblems->Value(17)>0)
|
|
||||||
theCommands<<" Redundant Edge ........................... "<<NbProblems->Value(17)<<"\n";
|
|
||||||
//cout<<" Redundant Edge ........................... "<<NbProblems->Value(17)<<endl;
|
|
||||||
if(NbProblems->Value(18)>0)
|
|
||||||
theCommands<<" Self Intersecting Wire ................... "<<NbProblems->Value(18)<<"\n";
|
|
||||||
//cout<<" Self Intersecting Wire ................... "<<NbProblems->Value(18)<<endl;
|
|
||||||
if(NbProblems->Value(19)>0)
|
|
||||||
theCommands<<" No Surface ............................... "<<NbProblems->Value(19)<<"\n";
|
|
||||||
//cout<<" No Surface ............................... "<<NbProblems->Value(19)<<endl;
|
|
||||||
if(NbProblems->Value(20)>0)
|
|
||||||
theCommands<<" Invalid Wire ............................. "<<NbProblems->Value(20)<<"\n";
|
|
||||||
//cout<<" Invalid Wire ............................. "<<NbProblems->Value(20)<<endl;
|
|
||||||
if(NbProblems->Value(21)>0)
|
|
||||||
theCommands<<" Redundant Wire ........................... "<<NbProblems->Value(21)<<"\n";
|
|
||||||
//cout<<" Redundant Wire ........................... "<<NbProblems->Value(21)<<endl;
|
|
||||||
if(NbProblems->Value(22)>0)
|
|
||||||
theCommands<<" Intersecting Wires ....................... "<<NbProblems->Value(22)<<"\n";
|
|
||||||
//cout<<" Intersecting Wires ....................... "<<NbProblems->Value(22)<<endl;
|
|
||||||
if(NbProblems->Value(23)>0)
|
|
||||||
theCommands<<" Invalid Imbrication of Wires ............. "<<NbProblems->Value(23)<<"\n";
|
|
||||||
//cout<<" Invalid Imbrication of Wires ............. "<<NbProblems->Value(23)<<endl;
|
|
||||||
if(NbProblems->Value(24)>0)
|
|
||||||
theCommands<<" Empty Shell .............................. "<<NbProblems->Value(24)<<"\n";
|
|
||||||
//cout<<" Empty Shell .............................. "<<NbProblems->Value(24)<<endl;
|
|
||||||
if(NbProblems->Value(25)>0)
|
|
||||||
theCommands<<" Redundant Face ........................... "<<NbProblems->Value(25)<<"\n";
|
|
||||||
//cout<<" Redundant Face ........................... "<<NbProblems->Value(25)<<endl;
|
|
||||||
if(NbProblems->Value(26)>0)
|
|
||||||
theCommands<<" Unorientable Shape ....................... "<<NbProblems->Value(26)<<"\n";
|
|
||||||
//cout<<" Unorientable Shape ....................... "<<NbProblems->Value(26)<<endl;
|
|
||||||
if(NbProblems->Value(27)>0)
|
|
||||||
theCommands<<" Not Closed ............................... "<<NbProblems->Value(27)<<"\n";
|
|
||||||
//cout<<" Not Closed ............................... "<<NbProblems->Value(27)<<endl;
|
|
||||||
if(NbProblems->Value(28)>0)
|
|
||||||
theCommands<<" Not Connected ............................ "<<NbProblems->Value(28)<<"\n";
|
|
||||||
//cout<<" Not Connected ............................ "<<NbProblems->Value(28)<<endl;
|
|
||||||
if(NbProblems->Value(29)>0)
|
|
||||||
theCommands<<" Subshape not in Shape .................... "<<NbProblems->Value(29)<<"\n";
|
|
||||||
//cout<<" Subshape not in Shape .................... "<<NbProblems->Value(29)<<endl;
|
|
||||||
if(NbProblems->Value(30)>0)
|
|
||||||
theCommands<<" Bad Orientation .......................... "<<NbProblems->Value(30)<<"\n";
|
|
||||||
//cout<<" Bad Orientation .......................... "<<NbProblems->Value(30)<<endl;
|
|
||||||
if(NbProblems->Value(31)>0)
|
|
||||||
theCommands<<" Bad Orientation of Subshape .............. "<<NbProblems->Value(31)<<"\n";
|
|
||||||
//cout<<" Bad Orientation of Subshape .............. "<<NbProblems->Value(31)<<endl;
|
|
||||||
if(NbProblems->Value(32)>0)
|
|
||||||
theCommands<<" checkshape failure......... .............. "<<NbProblems->Value(32)<<"\n";
|
|
||||||
//cout<<" checkshape failure......... .............. "<<NbProblems->Value(32)<<endl;
|
|
||||||
|
|
||||||
//cout<<" ------------------------------------------------"<<endl;
|
|
||||||
//cout<<"*** Shapes with problems : "<<sl->Length()<<endl;
|
|
||||||
//cout<<endl;
|
|
||||||
theCommands<<" ------------------------------------------------"<<"\n";
|
theCommands<<" ------------------------------------------------"<<"\n";
|
||||||
theCommands<<"*** Shapes with problems : "<<sl->Length()<<"\n";
|
theCommands<<"*** Shapes with problems : "<<sl->Length()<<"\n";
|
||||||
|
|
||||||
|
@@ -859,12 +859,12 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands)
|
|||||||
"deletesweep wire, To delete a section",
|
"deletesweep wire, To delete a section",
|
||||||
__FILE__,deletesweep,g);
|
__FILE__,deletesweep,g);
|
||||||
|
|
||||||
theCommands.Add("buildsweep", "builsweep [r] [option] [Tol] , no args to get help"
|
theCommands.Add("buildsweep", "buildsweep [r] [option] [Tol] , no args to get help",
|
||||||
__FILE__,buildsweep,g);
|
__FILE__,buildsweep,g);
|
||||||
|
|
||||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]"
|
theCommands.Add("simulsweep", "simulsweep r [n] [option]",
|
||||||
__FILE__,simulsweep,g);
|
__FILE__,simulsweep,g);
|
||||||
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
|
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]",
|
||||||
__FILE__,geompipe,g);
|
__FILE__,geompipe,g);
|
||||||
|
|
||||||
theCommands.Add("middlepath", "middlepath res shape startshape endshape",
|
theCommands.Add("middlepath", "middlepath res shape startshape endshape",
|
||||||
|
@@ -912,7 +912,8 @@ static Standard_Integer cfindp (Draw_Interpretor& , Standard_Integer n, const ch
|
|||||||
|
|
||||||
Draw_Display d = dout.MakeDisplay(view);
|
Draw_Display d = dout.MakeDisplay(view);
|
||||||
|
|
||||||
Handle(Draw_Drawable3D) D = Draw::Get(a[1]);
|
Handle(
|
||||||
|
Draw_Drawable3D) D = Draw::Get(a[1]);
|
||||||
|
|
||||||
Handle(DrawTrSurf_BezierCurve) DBz =
|
Handle(DrawTrSurf_BezierCurve) DBz =
|
||||||
Handle(DrawTrSurf_BezierCurve)::DownCast(D);
|
Handle(DrawTrSurf_BezierCurve)::DownCast(D);
|
||||||
|
@@ -49,10 +49,14 @@ is
|
|||||||
Init (me: mutable; shape: Shape from TopoDS);
|
Init (me: mutable; shape: Shape from TopoDS);
|
||||||
---Purpose: Initislises by shape.
|
---Purpose: Initislises by shape.
|
||||||
|
|
||||||
Perform (me : mutable;
|
Perform (me : mutable;
|
||||||
theProgress : ProgressIndicator from Message = 0) returns Boolean;
|
theProgress : ProgressIndicator from Message = 0) returns Boolean;
|
||||||
---Purpose: Iterates on sub- shape and performs fixes
|
---Purpose: Iterates on sub- shape and performs fixes
|
||||||
|
|
||||||
|
PerformR (me : mutable;
|
||||||
|
theProgress : ProgressIndicator from Message ) returns Boolean is private;
|
||||||
|
---Purpose: Internal method. Called by Perform.
|
||||||
|
|
||||||
SameParameter (me : mutable;
|
SameParameter (me : mutable;
|
||||||
shape : Shape from TopoDS;
|
shape : Shape from TopoDS;
|
||||||
enforce : Boolean;
|
enforce : Boolean;
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include <TopAbs_ShapeEnum.hxx>
|
#include <TopAbs_ShapeEnum.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
#include <BRepBuilderAPI_MakeShape.hxx>
|
||||||
|
|
||||||
#include <ShapeFix.hxx>
|
#include <ShapeFix.hxx>
|
||||||
#include <ShapeBuild_ReShape.hxx>
|
#include <ShapeBuild_ReShape.hxx>
|
||||||
@@ -100,6 +101,18 @@ void ShapeFix_Shape::Init(const TopoDS_Shape& shape)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
|
Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)& theProgress)
|
||||||
|
{
|
||||||
|
Standard_Boolean aR = PerformR(theProgress);
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
|
||||||
|
return aR;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : PerformR
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
Standard_Boolean ShapeFix_Shape::PerformR(const Handle(Message_ProgressIndicator)& theProgress)
|
||||||
{
|
{
|
||||||
Standard_Integer savFixSmallAreaWireMode = 0;
|
Standard_Integer savFixSmallAreaWireMode = 0;
|
||||||
|
|
||||||
@@ -157,7 +170,7 @@ Standard_Boolean ShapeFix_Shape::Perform(const Handle(Message_ProgressIndicator)
|
|||||||
for ( TopoDS_Iterator anIter(S); anIter.More() && aPSentry.More(); anIter.Next(), aPSentry.Next() )
|
for ( TopoDS_Iterator anIter(S); anIter.More() && aPSentry.More(); anIter.Next(), aPSentry.Next() )
|
||||||
{
|
{
|
||||||
myShape = anIter.Value();
|
myShape = anIter.Value();
|
||||||
if ( Perform(theProgress) )
|
if ( PerformR(theProgress) )
|
||||||
status = Standard_True;
|
status = Standard_True;
|
||||||
}
|
}
|
||||||
if ( !aPSentry.More() )
|
if ( !aPSentry.More() )
|
||||||
|
@@ -37,6 +37,7 @@
|
|||||||
#include <ShapeUpgrade_WireDivide.hxx>
|
#include <ShapeUpgrade_WireDivide.hxx>
|
||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
|
#include <BRepBuilderAPI_MakeShape.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : ShapeUpgrade_ShapeDivide
|
//function : ShapeUpgrade_ShapeDivide
|
||||||
@@ -174,6 +175,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
|
|||||||
if ( Status ( ShapeExtend_DONE ) ) {
|
if ( Status ( ShapeExtend_DONE ) ) {
|
||||||
myResult = myContext->Apply ( C, TopAbs_SHAPE );
|
myResult = myContext->Apply ( C, TopAbs_SHAPE );
|
||||||
myContext->Replace ( myShape, myResult );
|
myContext->Replace ( myShape, myResult );
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
myResult = myShape;
|
myResult = myShape;
|
||||||
@@ -282,6 +284,7 @@ Standard_Boolean ShapeUpgrade_ShapeDivide::Perform(const Standard_Boolean newCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
|
myResult = myContext->Apply ( myShape, TopAbs_SHAPE );
|
||||||
|
BRepBuilderAPI_MakeShape::EnsureToleranceRule(myResult);
|
||||||
return ! myResult.IsSame ( myShape );
|
return ! myResult.IsSame ( myShape );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
## ====================================
|
## ====================================
|
||||||
|
|
||||||
restore [locate_data_file CFI_cfi90fjc.rle] a
|
restore [locate_data_file CFI_cfi90fjc.rle] a
|
||||||
nexplode a e
|
explode a e
|
||||||
blend result a 5 a_5 5 a_13 5 a_28
|
blend result a 5 a_42 5 a_44 5 a_46
|
||||||
|
|
||||||
set square 66620.1
|
set square 66620.1
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
if { [isdraw result] } {
|
if { [isdraw result] } {
|
||||||
#check if result is valid
|
#check if result is valid
|
||||||
|
|
||||||
|
EnsureTolRule result result
|
||||||
puts "checkshape"
|
puts "checkshape"
|
||||||
set ch [checkshape result]
|
set ch [checkshape result]
|
||||||
puts $ch
|
puts $ch
|
||||||
|
@@ -9,6 +9,7 @@ puts ""
|
|||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC329.brep] a
|
restore [locate_data_file OCC329.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
|
|
||||||
checkshape a
|
checkshape a
|
||||||
set tol1 [maxtolerance a]
|
set tol1 [maxtolerance a]
|
||||||
|
@@ -10,6 +10,7 @@ puts ""
|
|||||||
restore [locate_data_file buc60462a.brep] a
|
restore [locate_data_file buc60462a.brep] a
|
||||||
checkshape a
|
checkshape a
|
||||||
restore [locate_data_file buc60462b.brep] b
|
restore [locate_data_file buc60462b.brep] b
|
||||||
|
EnsureTolRule b b
|
||||||
checkshape b
|
checkshape b
|
||||||
bsection result a b
|
bsection result a b
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_17"
|
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_12"
|
||||||
puts "TODO OCC12345 ALL: Faulty : mistakes are found in checked shape by checkshape command"
|
puts "TODO OCC12345 ALL: Faulty : mistakes are found in checked shape by checkshape command"
|
||||||
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
puts "TODO OCC12345 ALL: Error : The square of result shape is"
|
||||||
|
|
||||||
@@ -8,8 +8,10 @@ puts "BUC60462"
|
|||||||
puts "=========="
|
puts "=========="
|
||||||
|
|
||||||
restore [locate_data_file buc60462c.brep] a
|
restore [locate_data_file buc60462c.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
checkshape a
|
checkshape a
|
||||||
restore [locate_data_file buc60462d.brep] b
|
restore [locate_data_file buc60462d.brep] b
|
||||||
|
EnsureTolRule b b
|
||||||
checkshape b
|
checkshape b
|
||||||
puts "Fuse begin"
|
puts "Fuse begin"
|
||||||
bfuse result a b
|
bfuse result a b
|
||||||
|
@@ -10,6 +10,7 @@ cpulimit 1400
|
|||||||
restore [locate_data_file buc60463a.brep] a
|
restore [locate_data_file buc60463a.brep] a
|
||||||
checkshape a
|
checkshape a
|
||||||
restore [locate_data_file buc60463b.brep] b
|
restore [locate_data_file buc60463b.brep] b
|
||||||
|
EnsureTolRule b b
|
||||||
checkshape b
|
checkshape b
|
||||||
bsection result a b
|
bsection result a b
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@ puts ""
|
|||||||
#################################################################
|
#################################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC292.brep] result
|
restore [locate_data_file OCC292.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -7,6 +7,7 @@ puts ""
|
|||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC317.brep] result
|
restore [locate_data_file OCC317.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
|
|
||||||
set che [checkshape result]
|
set che [checkshape result]
|
||||||
if { [regexp {Faulty} $che] == 1} {
|
if { [regexp {Faulty} $che] == 1} {
|
||||||
|
@@ -10,6 +10,7 @@ puts ""
|
|||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC330.brep] result
|
restore [locate_data_file OCC330.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
|
|
||||||
decho off
|
decho off
|
||||||
set che [checkshape result]
|
set che [checkshape result]
|
||||||
|
@@ -7,6 +7,7 @@ puts "========"
|
|||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
restore [locate_data_file mds-part1.rle] a
|
restore [locate_data_file mds-part1.rle] a
|
||||||
|
EnsureTolRule a a
|
||||||
set che [checkshape a]
|
set che [checkshape a]
|
||||||
if { [regexp {Faulty} $che ] == 1 } {
|
if { [regexp {Faulty} $che ] == 1 } {
|
||||||
puts "Faulty OCC452 (shape 1): Source shape is invalid. It was detected by Checkshape command"
|
puts "Faulty OCC452 (shape 1): Source shape is invalid. It was detected by Checkshape command"
|
||||||
@@ -23,6 +24,7 @@ if { [regexp {Faulty} $che ] == 1 } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
restore [locate_data_file CTO900_ger60239a.rle] c
|
restore [locate_data_file CTO900_ger60239a.rle] c
|
||||||
|
EnsureTolRule c c
|
||||||
set che [checkshape c]
|
set che [checkshape c]
|
||||||
if { [regexp {Faulty} $che ] == 1 } {
|
if { [regexp {Faulty} $che ] == 1 } {
|
||||||
puts "Faulty OCC452 (shape 3): Source shape is invalid. It was detected by Checkshape command"
|
puts "Faulty OCC452 (shape 3): Source shape is invalid. It was detected by Checkshape command"
|
||||||
@@ -31,6 +33,7 @@ if { [regexp {Faulty} $che ] == 1 } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
restore [locate_data_file CTO900_ger60239b.rle] d
|
restore [locate_data_file CTO900_ger60239b.rle] d
|
||||||
|
EnsureTolRule d d
|
||||||
set che [checkshape d]
|
set che [checkshape d]
|
||||||
if { [regexp {Faulty} $che ] == 1 } {
|
if { [regexp {Faulty} $che ] == 1 } {
|
||||||
puts "Faulty OCC452 (shape 4): Source shape is invalid. It was detected by Checkshape command"
|
puts "Faulty OCC452 (shape 4): Source shape is invalid. It was detected by Checkshape command"
|
||||||
|
@@ -7,6 +7,7 @@ puts "========"
|
|||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
restore [locate_data_file CTO900_ger60239a.rle] a
|
restore [locate_data_file CTO900_ger60239a.rle] a
|
||||||
|
EnsureTolRule a a
|
||||||
set che [checkshape a]
|
set che [checkshape a]
|
||||||
if { [regexp {Faulty} $che ] == 1 } {
|
if { [regexp {Faulty} $che ] == 1 } {
|
||||||
puts "Faulty OCC452 (shape 5): Source shape is invalid. It was detected by Checkshape command"
|
puts "Faulty OCC452 (shape 5): Source shape is invalid. It was detected by Checkshape command"
|
||||||
@@ -15,6 +16,7 @@ if { [regexp {Faulty} $che ] == 1 } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
restore [locate_data_file CTO900_ger60239b.rle] b
|
restore [locate_data_file CTO900_ger60239b.rle] b
|
||||||
|
EnsureTolRule b b
|
||||||
set che [checkshape b]
|
set che [checkshape b]
|
||||||
if { [regexp {Faulty} $che ] == 1 } {
|
if { [regexp {Faulty} $che ] == 1 } {
|
||||||
puts "Faulty OCC452 (shape 6): Source shape is invalid. It was detected by Checkshape command"
|
puts "Faulty OCC452 (shape 6): Source shape is invalid. It was detected by Checkshape command"
|
||||||
|
@@ -9,6 +9,7 @@ puts ""
|
|||||||
pload QAcommands
|
pload QAcommands
|
||||||
|
|
||||||
restore [locate_data_file OCC625.brep] a
|
restore [locate_data_file OCC625.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
checkshape a
|
checkshape a
|
||||||
|
|
||||||
vinit
|
vinit
|
||||||
|
@@ -10,6 +10,7 @@ puts ""
|
|||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC697_1.brep] b1
|
restore [locate_data_file OCC697_1.brep] b1
|
||||||
|
EnsureTolRule b1 b1
|
||||||
restore [locate_data_file OCC697_2.brep] b2
|
restore [locate_data_file OCC697_2.brep] b2
|
||||||
|
|
||||||
checkshape b1
|
checkshape b1
|
||||||
|
@@ -7,6 +7,7 @@ cpulimit 10000
|
|||||||
restore [locate_data_file OCC698_1.brep] b4
|
restore [locate_data_file OCC698_1.brep] b4
|
||||||
checkshape b4
|
checkshape b4
|
||||||
restore [locate_data_file OCC698_2.brep] b5
|
restore [locate_data_file OCC698_2.brep] b5
|
||||||
|
EnsureTolRule b5 b5
|
||||||
checkshape b5
|
checkshape b5
|
||||||
|
|
||||||
bcut result b5 b4
|
bcut result b5 b4
|
||||||
|
@@ -10,6 +10,7 @@ puts ""
|
|||||||
#################################
|
#################################
|
||||||
|
|
||||||
restore [locate_data_file OCC774.brep] a
|
restore [locate_data_file OCC774.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
explode a
|
explode a
|
||||||
checkshape a_1
|
checkshape a_1
|
||||||
checkshape a_2
|
checkshape a_2
|
||||||
|
@@ -10,6 +10,7 @@ puts ""
|
|||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
restore [locate_data_file OCC776.brep] a
|
restore [locate_data_file OCC776.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
explode a
|
explode a
|
||||||
checkshape a_1
|
checkshape a_1
|
||||||
checkshape a_2
|
checkshape a_2
|
||||||
|
@@ -10,6 +10,7 @@ puts ""
|
|||||||
##########################################
|
##########################################
|
||||||
|
|
||||||
restore [locate_data_file OCC776.brep] a
|
restore [locate_data_file OCC776.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
explode a
|
explode a
|
||||||
checkshape a_1
|
checkshape a_1
|
||||||
checkshape a_2
|
checkshape a_2
|
||||||
|
@@ -8,6 +8,7 @@ puts ""
|
|||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
restore [locate_data_file BUC60877_lh.brep] sh
|
restore [locate_data_file BUC60877_lh.brep] sh
|
||||||
|
EnsureTolRule sh sh
|
||||||
checkshape sh
|
checkshape sh
|
||||||
|
|
||||||
plane pl 820 198 140 -1e-06 0 1
|
plane pl 820 198 140 -1e-06 0 1
|
||||||
|
@@ -14,6 +14,7 @@ explode a
|
|||||||
|
|
||||||
# See comment in CR23244:
|
# See comment in CR23244:
|
||||||
restore [locate_data_file OCC919-PROC.brep] a_1
|
restore [locate_data_file OCC919-PROC.brep] a_1
|
||||||
|
EnsureTolRule a_1 a_1
|
||||||
#
|
#
|
||||||
|
|
||||||
checkshape a_1
|
checkshape a_1
|
||||||
|
@@ -7,6 +7,7 @@ puts "=========="
|
|||||||
pload QAcommands
|
pload QAcommands
|
||||||
|
|
||||||
restore [locate_data_file buc60652b.brep] result
|
restore [locate_data_file buc60652b.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
BUC60652 result
|
BUC60652 result
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@ puts "==========="
|
|||||||
pload QAcommands
|
pload QAcommands
|
||||||
|
|
||||||
restore [locate_data_file buc60652c.brep] result
|
restore [locate_data_file buc60652c.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
BUC60652 result
|
BUC60652 result
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@ puts ""
|
|||||||
## Fillets created in CasCade version 3 do not display as shaded surfaces.
|
## Fillets created in CasCade version 3 do not display as shaded surfaces.
|
||||||
#################################################
|
#################################################
|
||||||
restore [locate_data_file buc60707a.brep] result
|
restore [locate_data_file buc60707a.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -9,6 +9,7 @@ puts ""
|
|||||||
##############################################
|
##############################################
|
||||||
|
|
||||||
restore [locate_data_file OCC368.brep] result
|
restore [locate_data_file OCC368.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -9,6 +9,7 @@ puts "case 2"
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
restore [locate_data_file BUC60861_gap1.brep] ss
|
restore [locate_data_file BUC60861_gap1.brep] ss
|
||||||
|
EnsureTolRule ss ss
|
||||||
checkshape ss
|
checkshape ss
|
||||||
|
|
||||||
plane pl1 25680.2288 21428 9995 1 0 0
|
plane pl1 25680.2288 21428 9995 1 0 0
|
||||||
|
@@ -8,6 +8,7 @@ puts "=================================="
|
|||||||
puts ""
|
puts ""
|
||||||
|
|
||||||
restore [locate_data_file fra62476b.brep] result
|
restore [locate_data_file fra62476b.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -5,6 +5,7 @@ puts "==========="
|
|||||||
restore [locate_data_file ger61235a.brep] tool
|
restore [locate_data_file ger61235a.brep] tool
|
||||||
checkshape tool
|
checkshape tool
|
||||||
restore [locate_data_file ger61235b.brep] object
|
restore [locate_data_file ger61235b.brep] object
|
||||||
|
EnsureTolRule object object
|
||||||
checkshape object
|
checkshape object
|
||||||
|
|
||||||
bsection result object tool
|
bsection result object tool
|
||||||
|
@@ -8,6 +8,7 @@ puts "It takes visual check for this BUG"
|
|||||||
puts "=================================="
|
puts "=================================="
|
||||||
|
|
||||||
restore [locate_data_file pro20333a.brep] result
|
restore [locate_data_file pro20333a.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -5,6 +5,7 @@ puts "BUC60948"
|
|||||||
puts "========================"
|
puts "========================"
|
||||||
|
|
||||||
restore [locate_data_file pump4.brep] a_1
|
restore [locate_data_file pump4.brep] a_1
|
||||||
|
EnsureTolRule a_1 a_1
|
||||||
checkshape a_1
|
checkshape a_1
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
@@ -7,6 +7,7 @@ puts ""
|
|||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC630.brep] a1
|
restore [locate_data_file OCC630.brep] a1
|
||||||
|
EnsureTolRule a1 a1
|
||||||
checkshape a1
|
checkshape a1
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@@ -13,6 +13,7 @@ pload XDE
|
|||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
restore [locate_data_file buc60661a.brep] buc60661
|
restore [locate_data_file buc60661a.brep] buc60661
|
||||||
|
EnsureTolRule buc60661 buc60661
|
||||||
checkshape buc60661
|
checkshape buc60661
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
@@ -4,6 +4,7 @@ puts "(case 1)"
|
|||||||
puts "========================"
|
puts "========================"
|
||||||
|
|
||||||
restore [locate_data_file shading_058.brep] result
|
restore [locate_data_file shading_058.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -4,6 +4,7 @@ puts "(case 4)"
|
|||||||
puts "========================"
|
puts "========================"
|
||||||
|
|
||||||
restore [locate_data_file shading_151.brep] result
|
restore [locate_data_file shading_151.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
tclean result
|
tclean result
|
||||||
|
@@ -8,6 +8,7 @@ puts ""
|
|||||||
#####################
|
#####################
|
||||||
|
|
||||||
restore [locate_data_file OCC859.brep] a
|
restore [locate_data_file OCC859.brep] a
|
||||||
|
EnsureTolRule a a
|
||||||
checkshape a
|
checkshape a
|
||||||
|
|
||||||
sewing result a
|
sewing result a
|
||||||
|
@@ -8,6 +8,7 @@ puts ""
|
|||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
restore [locate_data_file OCC859.brep] result
|
restore [locate_data_file OCC859.brep] result
|
||||||
|
EnsureTolRule result result
|
||||||
checkshape result
|
checkshape result
|
||||||
|
|
||||||
freebounds result 0.1
|
freebounds result 0.1
|
||||||
|
@@ -13,7 +13,7 @@ if { [string compare $command chamf] == 0 } {
|
|||||||
set os $env(os_type)
|
set os $env(os_type)
|
||||||
}
|
}
|
||||||
if {[string compare $group dist_angle] == 0} {
|
if {[string compare $group dist_angle] == 0} {
|
||||||
puts "TODO OCC22909 ${os}:Faulty shapes in variables faulty_1 to faulty_8"
|
puts "TODO OCC22909 ${os}:Faulty shapes in variables faulty_1 to faulty_"
|
||||||
}
|
}
|
||||||
if {[string compare $group equal_dist] == 0} {
|
if {[string compare $group equal_dist] == 0} {
|
||||||
puts "TODO OCC22909 ${os}:Faulty shapes in variables faulty_1 to faulty_4"
|
puts "TODO OCC22909 ${os}:Faulty shapes in variables faulty_1 to faulty_4"
|
||||||
|
@@ -13,6 +13,6 @@ if { [string compare $command chamf] == 0 } {
|
|||||||
set os $env(os_type)
|
set os $env(os_type)
|
||||||
}
|
}
|
||||||
if {[string compare $group dist_angle] == 0} {
|
if {[string compare $group dist_angle] == 0} {
|
||||||
puts "TODO OCC22909 All:Faulty shapes in variables faulty_1 to faulty_12"
|
puts "TODO OCC22909 All:Faulty shapes in variables faulty_1 to faulty_"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,7 +11,7 @@ if { [string compare $command chamf] == 0 } {
|
|||||||
set os $env(os_type)
|
set os $env(os_type)
|
||||||
}
|
}
|
||||||
if {[string compare $group dist_angle] == 0} {
|
if {[string compare $group dist_angle] == 0} {
|
||||||
puts "TODO OCC22909 All:Faulty shapes in variables faulty_1 to faulty_8"
|
puts "TODO OCC22909 All:Faulty shapes in variables faulty_1 to faulty_"
|
||||||
} else {
|
} else {
|
||||||
puts "TODO OCC22909 ${os}:Faulty shapes in variables faulty_1 to faulty_4"
|
puts "TODO OCC22909 ${os}:Faulty shapes in variables faulty_1 to faulty_4"
|
||||||
}
|
}
|
||||||
|
@@ -5,8 +5,9 @@ set chamf_dist_dist [list "1.1 1" " 1 1.2" " 1 1.4"]
|
|||||||
set chamf_equal_dist [list "1 " "1.1 " "1.2 "]
|
set chamf_equal_dist [list "1 " "1.1 " "1.2 "]
|
||||||
dset SCALE 100
|
dset SCALE 100
|
||||||
if { [string compare $command chamf_sequence] == 0 } {
|
if { [string compare $command chamf_sequence] == 0 } {
|
||||||
puts "TODO #22909 ALL: Error: The tests should be reviewed"
|
#puts "TODO #22909 ALL: Error: The tests should be reviewed"
|
||||||
puts "Error: The tests should be reviewed."
|
puts "TODO ?22909 ALL: Error : chamfer is not done."
|
||||||
|
#puts "Error: The tests should be reviewed."
|
||||||
set os "ALL"
|
set os "ALL"
|
||||||
if {[array get env os_type] != ""} {
|
if {[array get env os_type] != ""} {
|
||||||
set os $env(os_type)
|
set os $env(os_type)
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Date : 26 Nov 98
|
# Date : 26 Nov 98
|
||||||
|
|
||||||
restore [locate_data_file cts21832_base.brep] base
|
restore [locate_data_file cts21832_base.brep] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file cts21832_cont.brep] cont
|
restore [locate_data_file cts21832_cont.brep] cont
|
||||||
|
|
||||||
explode cont wire
|
explode cont wire
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Date : 23mar98
|
# Date : 23mar98
|
||||||
|
|
||||||
restore [locate_data_file CTO900_ger60224-part.rle] base
|
restore [locate_data_file CTO900_ger60224-part.rle] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file ger60224-tool.rle] wire
|
restore [locate_data_file ger60224-tool.rle] wire
|
||||||
|
|
||||||
mkplane cont wire
|
mkplane cont wire
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Date : 10 Sept 98
|
# Date : 10 Sept 98
|
||||||
|
|
||||||
restore [locate_data_file CTO900_pro12880c.rle] base
|
restore [locate_data_file CTO900_pro12880c.rle] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file pro12880_face.rle] cont
|
restore [locate_data_file pro12880_face.rle] cont
|
||||||
|
|
||||||
featprism base cont cont 0 1 0 1 1
|
featprism base cont cont 0 1 0 1 1
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Date : 15 Sept 98
|
# Date : 15 Sept 98
|
||||||
|
|
||||||
restore [locate_data_file CTO900_ger50084c.rle] base
|
restore [locate_data_file CTO900_ger50084c.rle] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file ger50084_face.rle] wire
|
restore [locate_data_file ger50084_face.rle] wire
|
||||||
|
|
||||||
## contour est un wire -> on en fait une face
|
## contour est un wire -> on en fait une face
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
cpulimit 2000
|
cpulimit 2000
|
||||||
|
|
||||||
restore [locate_data_file CFE900_cts20geq.rle] base
|
restore [locate_data_file CFE900_cts20geq.rle] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file cts20960_face.brep] cont
|
restore [locate_data_file cts20960_face.brep] cont
|
||||||
|
|
||||||
explode base face
|
explode base face
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Date : 25 Nov 98
|
# Date : 25 Nov 98
|
||||||
|
|
||||||
restore [locate_data_file cts20088_base.brep] base
|
restore [locate_data_file cts20088_base.brep] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file contour_pkv.rle] cont
|
restore [locate_data_file contour_pkv.rle] cont
|
||||||
|
|
||||||
explode base face
|
explode base face
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# Date : 02 Dec 98
|
# Date : 02 Dec 98
|
||||||
|
|
||||||
restore [locate_data_file CFE900_pro16gff.rle] base
|
restore [locate_data_file CFE900_pro16gff.rle] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file pro16769_face.brep] cont
|
restore [locate_data_file pro16769_face.brep] cont
|
||||||
|
|
||||||
explode base face
|
explode base face
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
# cts20088
|
# cts20088
|
||||||
|
|
||||||
restore [locate_data_file cts20088_base.brep] base
|
restore [locate_data_file cts20088_base.brep] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file contour_pkv.rle] cont
|
restore [locate_data_file contour_pkv.rle] cont
|
||||||
|
|
||||||
explode base face
|
explode base face
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
# cts20088
|
# cts20088
|
||||||
|
|
||||||
restore [locate_data_file cts20088_base.brep] base
|
restore [locate_data_file cts20088_base.brep] base
|
||||||
|
EnsureTolRule base base
|
||||||
restore [locate_data_file contour_pkv.rle] cont
|
restore [locate_data_file contour_pkv.rle] cont
|
||||||
|
|
||||||
explode base face
|
explode base face
|
||||||
|
@@ -2,7 +2,8 @@ if {[string compare $command "ShapeConvertRev"] == 0 } {
|
|||||||
puts "TODO OCC23127 ALL: Error : shape result is not correct"
|
puts "TODO OCC23127 ALL: Error : shape result is not correct"
|
||||||
}
|
}
|
||||||
if {[string compare $command "SplitAngle"] == 0 } {
|
if {[string compare $command "SplitAngle"] == 0 } {
|
||||||
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_9 "
|
puts "TODO OCC23127 ALL: 004C6978 : Standard_NoSuchObject: BRep_Tool:: no parameter on edge"
|
||||||
|
puts "TEST COMPLETED"
|
||||||
}
|
}
|
||||||
restore [locate_data_file CTO900_ger60598c.rle] a
|
restore [locate_data_file CTO900_ger60598c.rle] a
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ if { [string compare $command "ShapeConvertRev"] == 0 } {
|
|||||||
puts "TODO OCC23127 ALL: Error : The square of result shape is"
|
puts "TODO OCC23127 ALL: Error : The square of result shape is"
|
||||||
}
|
}
|
||||||
if {[string compare $command "SplitAngle"] == 0 } {
|
if {[string compare $command "SplitAngle"] == 0 } {
|
||||||
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_8 "
|
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_ "
|
||||||
}
|
}
|
||||||
restore [locate_data_file m2] a
|
restore [locate_data_file m2] a
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
if {[string compare $command "SplitAngle"] == 0 } {
|
if {[string compare $command "SplitAngle"] == 0 } {
|
||||||
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_38 "
|
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_ "
|
||||||
}
|
}
|
||||||
restore [locate_data_file CED_PIEUSI.brep] a
|
restore [locate_data_file CED_PIEUSI.brep] a
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
if {[string compare $command "SplitAngle"] == 0 } {
|
if {[string compare $command "SplitAngle"] == 0 } {
|
||||||
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_6 "
|
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_ "
|
||||||
}
|
}
|
||||||
restore [locate_data_file SOLMIR.brep] a
|
restore [locate_data_file SOLMIR.brep] a
|
||||||
|
|
||||||
|
@@ -3,13 +3,7 @@ if {[string compare $command "SplitAngle"] == 0 } {
|
|||||||
if {[array get env os_type] != ""} {
|
if {[array get env os_type] != ""} {
|
||||||
set os $env(os_type)
|
set os $env(os_type)
|
||||||
}
|
}
|
||||||
if {
|
puts "TODO OCC23127 $os: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
[string compare $os "Mandriva2008"] == 0
|
|
||||||
} {
|
|
||||||
puts "TODO OCC23127 $os: Faulty shapes in variables faulty_1 to faulty_32"
|
|
||||||
} else {
|
|
||||||
puts "TODO OCC23127 $os: Faulty shapes in variables faulty_1 to faulty_30"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
restore [locate_data_file BPLSEITLI.brep] a
|
restore [locate_data_file BPLSEITLI.brep] a
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
if {[string compare $command "SplitAngle"] == 0 } {
|
if {[string compare $command "SplitAngle"] == 0 } {
|
||||||
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_28 "
|
puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_ "
|
||||||
}
|
}
|
||||||
restore [locate_data_file BPLSEITRE.brep] a
|
restore [locate_data_file BPLSEITRE.brep] a
|
||||||
|
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
puts "TODO OCC23127 ALL: Error : result shape is not done"
|
puts "TODO OCC23127 ALL: Tcl Exception:"
|
||||||
restore [locate_data_file DSE3.rle] a
|
restore [locate_data_file DSE3.rle] a
|
||||||
|
puts "TEST COMPLETED"
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
puts [fixsmall result a 1]
|
puts [fixsmall result a 1]
|
||||||
|
EnsureTolRule result result
|
||||||
if { [isdraw result] } {
|
if { [isdraw result] } {
|
||||||
puts [checkshape result]
|
puts [checkshape result]
|
||||||
}
|
}
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
puts [DT_ApplySeq result a MDTV ToV4]
|
puts [DT_ApplySeq result a MDTV ToV4]
|
||||||
|
EnsureTolRule result result
|
||||||
puts [checkshape result]
|
puts [checkshape result]
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
fixwgaps result a 0.001
|
fixwgaps result a 0.001
|
||||||
|
EnsureTolRule result result
|
||||||
puts [checkshape result]
|
puts [checkshape result]
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
puts [DT_SplitAngle result a]
|
puts [DT_SplitAngle result a]
|
||||||
|
EnsureTolRule result result
|
||||||
puts [checkshape result]
|
puts [checkshape result]
|
||||||
|
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
puts [DT_ToBspl result a]
|
puts [DT_ToBspl result a]
|
||||||
|
EnsureTolRule result result
|
||||||
puts [checkshape result]
|
puts [checkshape result]
|
||||||
|
@@ -1 +1,2 @@
|
|||||||
restore [locate_data_file CFE900_pro16gdo.rle] a
|
restore [locate_data_file CFE900_pro16gdo.rle] a
|
||||||
|
EnsureTolRule a a
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
thrusections result 1 0 w1 w2
|
thrusections result 1 0 w1 w2
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
thrusections result 1 0 w2 w1
|
thrusections result 1 0 w2 w1
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
orientation w1 F
|
orientation w1 F
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
orientation w1 F
|
orientation w1 F
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
orientation w1 F
|
orientation w1 F
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
orientation w1 F
|
orientation w1 F
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
orientation w1 F
|
orientation w1 F
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_3"
|
puts "TODO OCC23126 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||||
restore [locate_data_file cts21570_1.rle] w1
|
restore [locate_data_file cts21570_1.rle] w1
|
||||||
restore [locate_data_file cts21570_2.rle] w2
|
restore [locate_data_file cts21570_2.rle] w2
|
||||||
orientation w1 F
|
orientation w1 F
|
||||||
|
Reference in New Issue
Block a user