1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0030186: BRepOffsetAPI_MakePipe Generated() method produces no results for the spine edges

Add method BuildHistory providing history for sub-shapes of profile and spine to BRepFill_Pipe.
This commit is contained in:
jgv 2018-10-01 18:18:54 +03:00 committed by bugmaster
parent c3ca03eb17
commit cab49d68fc
20 changed files with 677 additions and 205 deletions

View File

@ -62,6 +62,7 @@
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapOfShapeInteger.hxx>
#include <TopTools_DataMapOfIntegerShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
@ -250,7 +251,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
TopoDS_Shape aux;
TheProf = myProfile;
TheProf.Location(Loc2.Multiplied(Loc1));
// Construct First && Last Shape
Handle(GeomFill_LocationLaw) law;
@ -307,7 +308,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
}
#endif
myShape = MakeShape(TheProf, myFirst, myLast);
myShape = MakeShape(TheProf, myProfile, myFirst, myLast);
}
@ -382,36 +383,8 @@ void BRepFill_Pipe::Generated(const TopoDS_Shape& theShape,
{
theList.Clear();
if (theShape.IsSame(myProfile))
theList.Append(myShape);
else
{
if (theShape.ShapeType() == TopAbs_FACE ||
theShape.ShapeType() == TopAbs_WIRE)
{
if(myGenMap.IsBound(theShape))
theList = myGenMap.Find(theShape);
}
else if (theShape.ShapeType() == TopAbs_EDGE)
{
TopoDS_Iterator itw(mySpine);
for (; itw.More(); itw.Next())
{
const TopoDS_Edge& aSpineEdge = TopoDS::Edge(itw.Value());
const TopoDS_Shape& aFace = Face(aSpineEdge, TopoDS::Edge(theShape));
theList.Append(aFace);
}
}
else if (theShape.ShapeType() == TopAbs_VERTEX)
{
TopoDS_Iterator itw(mySpine);
for (; itw.More(); itw.Next())
{
const TopoDS_Edge& aSpineEdge = TopoDS::Edge(itw.Value());
const TopoDS_Shape& anEdge = Edge(aSpineEdge, TopoDS::Vertex(theShape));
theList.Append(anEdge);
}
}
if(myGenMap.IsBound(theShape)) {
theList = myGenMap.Find(theShape);
}
}
@ -540,9 +513,9 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point)
P = Point;
P.Transform(myTrsf);
BRepLib_MakeVertex MkV(P);
TopoDS_Vertex VertexSection = BRepLib_MakeVertex(P);
Handle(BRepFill_ShapeLaw) Section =
new (BRepFill_ShapeLaw) (MkV.Vertex());
new (BRepFill_ShapeLaw) (VertexSection);
// Sweeping
BRepFill_Sweep MkSw(Section, myLoc, Standard_True);
@ -551,6 +524,7 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point)
BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
TopoDS_Shape aLocalShape = MkSw.Shape();
myErrorOnSurf = MkSw.ErrorOnSurface();
BuildHistory(MkSw, VertexSection);
return TopoDS::Wire(aLocalShape);
// return TopoDS::Wire(MkSw.Shape());
}
@ -561,6 +535,7 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point)
//=======================================================================
TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
const TopoDS_Shape& theOriginalS,
const TopoDS_Shape& FirstShape,
const TopoDS_Shape& LastShape)
{
@ -574,6 +549,8 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
TheLast = LastShape;
if (! myFaces.IsNull()) InitialLength = myFaces->ColLength();
TopLoc_Location BackLoc(myTrsf.Inverted());
// there are two kinds of generation
// 1. generate with S from each Filler (Vertex, Edge)
// 2. call MakeShape recursively on the subshapes of S
@ -658,13 +635,15 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
if (!TheFirst.IsNull()) itFirst.Initialize(TheFirst);
if (!TheLast.IsNull()) itLast.Initialize(TheLast);
for (TopoDS_Iterator it(S); it.More(); it.Next()) {
TopoDS_Iterator it(S);
TopoDS_Iterator itorig(theOriginalS);
for (; it.More(); it.Next(),itorig.Next()) {
if (!TheFirst.IsNull()) first = itFirst.Value();
if (!TheLast.IsNull()) last = itLast.Value();
if (TheS.ShapeType() == TopAbs_FACE )
MakeShape(it.Value(), first, last);
MakeShape(it.Value(), itorig.Value(), first, last);
else
B.Add(result,MakeShape(it.Value(), first, last));
B.Add(result,MakeShape(it.Value(), itorig.Value(), first, last));
if (!TheFirst.IsNull()) itFirst.Next();
if (!TheLast.IsNull()) itLast.Next();
@ -680,7 +659,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
MkSw.Build( myReversedEdges, myTapes, myRails,
BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
result = MkSw.Shape();
UpdateMap(TheS.Located(myProfile.Location()), result, myGenMap);
UpdateMap(theOriginalS, result, myGenMap);
myErrorOnSurf = MkSw.ErrorOnSurface();
Handle(TopTools_HArray2OfShape) aSections = MkSw.Sections();
@ -691,6 +670,8 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
myFirst = aSections->Value(1, 1);
myLast = aSections->Value(1, aVLast);
}
BuildHistory(MkSw, theOriginalS);
}
if (TheS.ShapeType() == TopAbs_WIRE ) {
@ -703,7 +684,6 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
MkSw.Build( myReversedEdges, myTapes, myRails,
BRepFill_Modified, myContinuity, GeomFill_Location, myDegmax, mySegmax );
result = MkSw.Shape();
UpdateMap(TheS.Located(myProfile.Location()), result, myGenMap);
myErrorOnSurf = MkSw.ErrorOnSurface();
// Labeling of elements
@ -762,6 +742,8 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
myEdges = Somme;
}
BuildHistory(MkSw, theOriginalS);
}
}
@ -808,7 +790,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
BS.Add(solid,TopoDS::Shell(aLocalShape));
// BS.Add(solid,TopoDS::Shell(result.Reversed()));
}
UpdateMap(TheS.Located(myProfile.Location()), solid, myGenMap);
UpdateMap(theOriginalS, solid, myGenMap);
return solid;
}
else {
@ -1030,3 +1012,110 @@ void BRepFill_Pipe::RebuildTopOrBottomFace(const TopoDS_Shape& aFace,
}
}
}
//=======================================================================
//function : BuildHistory
//purpose : Builds history for edges and vertices
// of section and path
//=======================================================================
void BRepFill_Pipe::BuildHistory(const BRepFill_Sweep& theSweep,
const TopoDS_Shape& theSection)
{
//Filling of <myGenMap>
const Handle(TopTools_HArray2OfShape)& anUEdges = theSweep.InterFaces();
Standard_Integer inde;
TopoDS_Iterator itw;
if (theSection.ShapeType() == TopAbs_WIRE)
{
TopoDS_Wire aSection = TopoDS::Wire(theSection);
BRepTools_WireExplorer wexp_sec(aSection);
for (inde = 0; wexp_sec.More(); wexp_sec.Next())
{
inde++;
const TopoDS_Edge& anEdge = TopoDS::Edge(wexp_sec.Current());
if (BRep_Tool::Degenerated(anEdge))
continue;
if (myGenMap.IsBound(anEdge))
continue;
TopoDS_Vertex aVertex [2];
TopExp::Vertices(anEdge, aVertex[0], aVertex[1]);
//For an edge generated shape is a "tape" -
//a shell usually containing this edge and
//passing from beginning of path to its end
TopoDS_Shell aTape = TopoDS::Shell(theSweep.Tape(inde));
//Processing of vertices of <anEdge>
//We should choose right index in <anUEdges>
//for each vertex of edge
Standard_Integer UIndex [2];
UIndex[0] = inde;
UIndex[1] = inde+1;
if (anEdge.Orientation() == TopAbs_REVERSED)
{ Standard_Integer Tmp = UIndex[0]; UIndex[0] = UIndex[1]; UIndex[1] = Tmp; }
for (Standard_Integer kk = 0; kk < 2; kk++)
{
if (myGenMap.IsBound(aVertex[kk]))
continue;
//Assemble the list of edges ("rail" along the path)
TopTools_ListOfShape* Elist = myGenMap.Bound(aVertex[kk], TopTools_ListOfShape());
Standard_Integer jj;
for (jj = 1; jj <= anUEdges->UpperCol(); jj++)
{
const TopoDS_Shape& anUedge = anUEdges->Value(UIndex[kk], jj);
if (!anUedge.IsNull())
Elist->Append(anUedge);
}
} //for (Standard_Integer kk = 0; kk < 2; kk++)
TopTools_ListOfShape* Flist = myGenMap.Bound(anEdge, TopTools_ListOfShape());
TopoDS_Iterator itsh(aTape);
for (; itsh.More(); itsh.Next())
Flist->Append(itsh.Value());
} //for (inde = 0; wexp_sec.More(); wexp_sec.Next())
} //if (theSection.ShapeType() == TopAbs_WIRE)
//For subshapes of spine
const Handle(TopTools_HArray2OfShape)& aFaces = theSweep.SubShape();
const Handle(TopTools_HArray2OfShape)& aVEdges = theSweep.Sections();
BRepTools_WireExplorer wexp(mySpine);
inde = 0;
Standard_Boolean ToExit = Standard_False;
for (;;)
{
if (!wexp.More())
ToExit = Standard_True;
inde++;
if (!ToExit)
{
const TopoDS_Edge& anEdgeOfSpine = wexp.Current();
for (Standard_Integer i = 1; i <= aFaces->UpperRow(); i++)
{
const TopoDS_Shape& aFace = aFaces->Value(i, inde);
UpdateMap(anEdgeOfSpine, aFace, myGenMap);
}
}
const TopoDS_Vertex& aVertexOfSpine = wexp.CurrentVertex();
for (Standard_Integer i = 1; i <= aVEdges->UpperRow(); i++)
{
const TopoDS_Shape& aVedge = aVEdges->Value(i, inde);
UpdateMap(aVertexOfSpine, aVedge, myGenMap);
}
if (ToExit)
break;
if (wexp.More())
wexp.Next();
}
}

View File

@ -42,6 +42,7 @@ class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Vertex;
class gp_Pnt;
class BRepFill_Sweep;
//! Create a shape by sweeping a shape (the profile)
@ -59,9 +60,15 @@ public:
Standard_EXPORT BRepFill_Pipe();
Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet, const Standard_Boolean ForceApproxC1 = Standard_False, const Standard_Boolean GeneratePartCase = Standard_False);
Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine,
const TopoDS_Shape& Profile,
const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet,
const Standard_Boolean ForceApproxC1 = Standard_False,
const Standard_Boolean GeneratePartCase = Standard_False);
Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const Standard_Boolean GeneratePartCase = Standard_False);
Standard_EXPORT void Perform (const TopoDS_Wire& Spine,
const TopoDS_Shape& Profile,
const Standard_Boolean GeneratePartCase = Standard_False);
Standard_EXPORT const TopoDS_Shape& Spine() const;
@ -113,22 +120,27 @@ private:
//! Auxiliary recursive method used to build the
//! result.
Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S, const TopoDS_Shape& FirstShape, const TopoDS_Shape& LastShape);
Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S,
const TopoDS_Shape& theOriginalS,
const TopoDS_Shape& FirstShape,
const TopoDS_Shape& LastShape);
//! Auxiliary recursive method used to find the edge's index
Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S, const TopoDS_Edge& E, Standard_Integer& Init) const;
Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S,
const TopoDS_Edge& E,
Standard_Integer& Init) const;
Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const TopoDS_Vertex& V, Standard_Integer& Init) const;
Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const
TopoDS_Vertex& V,
Standard_Integer& Init) const;
Standard_EXPORT void DefineRealSegmax();
Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace, const Standard_Boolean IsTop) const;
Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace,
const Standard_Boolean IsTop) const;
//! Performs sharing coincident faces in theShape. Also modifies
//! myFaces, mySections and myEdges to contain shared shapes.
//! Returns the shared shape. If theShape is not modified this
//! method returns it.
Standard_EXPORT TopoDS_Shape ShareFaces (const TopoDS_Shape& theShape, const Standard_Integer theInitialFacesLen, const Standard_Integer theInitialEdgesLen, const Standard_Integer theInitialSectionsLen);
Standard_EXPORT void BuildHistory (const BRepFill_Sweep& theSweep,
const TopoDS_Shape& theSection);
TopoDS_Wire mySpine;

View File

@ -1203,8 +1203,8 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
//=======================================================================
//function : BuildHistory
//purpose : Builds history for edges and vertices
// of sections
//purpose : Builds history for edges and vertices of sections,
// for edges and vertices of spine
//=======================================================================
void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
{
@ -1226,11 +1226,11 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
//for punctual sections (first or last)
//we take all the wires generated along the path
TopTools_ListOfShape Elist;
TopTools_ListOfShape* Elist = myGenMap.Bound(Section, TopTools_ListOfShape());
for (Standard_Integer i = 1; i <= anUEdges->UpperRow(); i++)
for (Standard_Integer j = 1; j <= anUEdges->UpperCol(); j++)
Elist.Append(anUEdges->Value(i,j));
myGenMap.Bind(Section, Elist);
Elist->Append(anUEdges->Value(i,j));
continue;
}
else
@ -1319,9 +1319,11 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
continue;
if (IndWireMap.IsBound(UIndex[kk]))
{
TopTools_ListOfShape Wlist;
Wlist.Append(IndWireMap(UIndex[kk]));
myGenMap.Bind(aVertex[kk], Wlist);
TopTools_ListOfShape* Elist = myGenMap.Bound(aVertex[kk], TopTools_ListOfShape());
for (itw.Initialize( IndWireMap(UIndex[kk]) ); itw.More(); itw.Next())
Elist->Append(itw.Value());
continue;
}
@ -1393,17 +1395,21 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
}
}
}
TopTools_ListOfShape Wlist;
Wlist.Append(aWire);
myGenMap.Bind(aVertex[kk], Wlist);
TopTools_ListOfShape* Elist = myGenMap.Bound(aVertex[kk], TopTools_ListOfShape());
for (itw.Initialize(aWire); itw.More(); itw.Next())
Elist->Append(itw.Value());
//Save already built wire with its index
IndWireMap.Bind(UIndex[kk], aWire);
} //for (Standard_Integer kk = 0; kk < 2; kk++)
////////////////////////////////////
TopTools_ListOfShape ListShell;
ListShell.Append(aShell);
myGenMap.Bind(anOriginalEdge, ListShell);
TopTools_ListOfShape* Flist = myGenMap.Bound(anOriginalEdge, TopTools_ListOfShape());
TopoDS_Iterator itsh(aShell);
for (; itsh.More(); itsh.Next())
Flist->Append(itsh.Value());
////////////////////////
inde++;
@ -1427,28 +1433,25 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
if (!ToExit)
{
const TopoDS_Edge& anEdgeOfSpine = wexp.Current();
TopoDS_Shell aShell;
BB.MakeShell(aShell);
TopTools_ListOfShape* Flist = myGenMap.Bound(anEdgeOfSpine, TopTools_ListOfShape());
for (Standard_Integer i = 1; i <= aFaces->UpperRow(); i++)
{
const TopoDS_Shape& aFace = aFaces->Value(i, inde);
if (aFace.ShapeType() == TopAbs_FACE)
BB.Add(aShell, aFace);
Flist->Append(aFace);
}
TopTools_ListOfShape ListShell;
ListShell.Append(aShell);
myGenMap.Bind(anEdgeOfSpine, ListShell);
}
const TopoDS_Vertex& aVertexOfSpine = wexp.CurrentVertex();
TopTools_ListOfShape ListVshapes;
TopTools_ListOfShape* ListVshapes = myGenMap.Bound(aVertexOfSpine, TopTools_ListOfShape());
for (Standard_Integer i = 1; i <= aVEdges->UpperRow(); i++)
{
const TopoDS_Shape& aVshape = aVEdges->Value(i, inde);
if (aVshape.ShapeType() == TopAbs_EDGE ||
aVshape.ShapeType() == TopAbs_FACE)
ListVshapes.Append(aVshape);
ListVshapes->Append(aVshape);
else
{
TopoDS_Iterator itvshape(aVshape);
@ -1457,19 +1460,17 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
const TopoDS_Shape& aSubshape = itvshape.Value();
if (aSubshape.ShapeType() == TopAbs_EDGE ||
aSubshape.ShapeType() == TopAbs_FACE)
ListVshapes.Append(aSubshape);
ListVshapes->Append(aSubshape);
else
{
//it is wire
for (itw.Initialize(aSubshape); itw.More(); itw.Next())
ListVshapes.Append(itw.Value());
ListVshapes->Append(itw.Value());
}
}
}
}
myGenMap.Bind(aVertexOfSpine, ListVshapes);
if (ToExit)
break;

View File

@ -171,13 +171,23 @@ static Standard_Integer pipe(Draw_Interpretor& di,
if (n >= 6)
ForceApproxC1 = Standard_True;
TopoDS_Shape S = BRepOffsetAPI_MakePipe(TopoDS::Wire(Spine),
Profile,
Mode,
ForceApproxC1);
BRepOffsetAPI_MakePipe PipeBuilder(TopoDS::Wire(Spine),
Profile,
Mode,
ForceApproxC1);
TopoDS_Shape S = PipeBuilder.Shape();
DBRep::Set(a[1],S);
// Save history of pipe
if (BRepTest_Objects::IsHistoryNeeded())
{
TopTools_ListOfShape aList;
aList.Append(Profile);
aList.Append(Spine);
BRepTest_Objects::SetHistory(aList, PipeBuilder);
}
return 0;
}

View File

@ -4936,95 +4936,6 @@ static Standard_Integer OCC27048(Draw_Interpretor& theDI, Standard_Integer theAr
return 0;
}
//========================================================================
//function : OCC27065
//purpose : Tests overloaded method "Generated" of BRepOffsetAPI_MakePipe
//========================================================================
static Standard_Integer OCC27065(Draw_Interpretor& di,
Standard_Integer n, const char** a)
{
if (n < 3) return 1;
BRep_Builder BB;
TopoDS_Shape SpineShape = DBRep::Get(a[1],TopAbs_WIRE);
if ( SpineShape.IsNull()) return 1;
TopoDS_Wire Spine = TopoDS::Wire(SpineShape);
TopoDS_Shape Profile = DBRep::Get(a[2]);
if ( Profile.IsNull()) return 1;
BRepOffsetAPI_MakePipe aPipeBuilder(Spine, Profile);
if (!aPipeBuilder.IsDone())
{
di << "Error: failed to create pipe\n";
return 1;
}
TopExp_Explorer Explo(Profile, TopAbs_SHELL);
TopoDS_Shape aShape;
TopTools_ListIteratorOfListOfShape itl;
if (Explo.More())
{
aShape = Explo.Current();
TopoDS_Compound res1;
BB.MakeCompound(res1);
itl.Initialize(aPipeBuilder.Generated(aShape));
for (; itl.More(); itl.Next())
BB.Add(res1, itl.Value());
DBRep::Set("res_shell", res1);
}
Explo.Init(Profile, TopAbs_FACE);
if (Explo.More())
{
aShape = Explo.Current();
TopoDS_Compound res2;
BB.MakeCompound(res2);
itl.Initialize(aPipeBuilder.Generated(aShape));
for (; itl.More(); itl.Next())
BB.Add(res2, itl.Value());
DBRep::Set("res_face", res2);
}
Explo.Init(Profile, TopAbs_WIRE);
if (Explo.More())
{
aShape = Explo.Current();
TopoDS_Compound res3;
BB.MakeCompound(res3);
itl.Initialize(aPipeBuilder.Generated(aShape));
for (; itl.More(); itl.Next())
BB.Add(res3, itl.Value());
DBRep::Set("res_wire", res3);
}
Explo.Init(Profile, TopAbs_EDGE);
if (Explo.More())
{
aShape = Explo.Current();
TopoDS_Compound res4;
BB.MakeCompound(res4);
itl.Initialize(aPipeBuilder.Generated(aShape));
for (; itl.More(); itl.Next())
BB.Add(res4, itl.Value());
DBRep::Set("res_edge", res4);
}
Explo.Init(Profile, TopAbs_VERTEX);
if (Explo.More())
{
aShape = Explo.Current();
TopoDS_Compound res5;
BB.MakeCompound(res5);
itl.Initialize(aPipeBuilder.Generated(aShape));
for (; itl.More(); itl.Next())
BB.Add(res5, itl.Value());
DBRep::Set("res_vertex", res5);
}
return 0;
}
//========================================================================
//function : OCC27318
//purpose : Creates a box that is not listed in map of AIS objects of ViewerTest
@ -5460,10 +5371,6 @@ void QABugs::Commands_19(Draw_Interpretor& theCommands) {
"OCC27048 surf U V N\nCalculate value of surface N times in the point (U, V)",
__FILE__, OCC27048, group);
theCommands.Add ("OCC27065",
"OCC27065 spine profile",
__FILE__, OCC27065, group);
theCommands.Add ("OCC27318",
"OCC27318: Creates a box that is not listed in map of AIS objects of ViewerTest",
__FILE__, OCC27318, group);

View File

@ -2,23 +2,52 @@ puts "============"
puts "OCC27065"
puts "============"
puts ""
###############################
#########################################################################
## BRepOffsetAPI_MakePipe misses definition of virtual method Generated()
###############################
pload QAcommands
#########################################################################
restore [locate_data_file bug24840_comp.brep] sh
explode sh
OCC27065 sh_1 sh_2
fit
renamevar sh_1 path
renamevar sh_2 base
checknbshapes res_shell -vertex 56 -edge 130 -wire 99 -face 99 -shell 24 -solid 24 -compsolid 1 -compound 1 -shape 434
pipe q path base
savehistory pipe_hist
checknbshapes res_face -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 35
explode base
checknbshapes res_wire -vertex 8 -edge 12 -wire 4 -face 4 -shell 1 -solid 0 -compsolid 0 -compound 1 -shape 30
generated r1 pipe_hist base_1
generated r5 pipe_hist base_5
generated r11 pipe_hist base_11
checknbshapes res_edge -vertex 4 -edge 4 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 11
checknbshapes res_vertex -vertex 2 -edge 1 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 4
checknbshapes r1 -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1
checknbshapes r5 -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1
checknbshapes r11 -vertex 6 -edge 9 -wire 5 -face 5 -shell 1 -solid 1
checkprops r1 -v 0.434835
checkprops r5 -v 0.0165356
checkprops r11 -v 4.06042e-005
explode base e
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
generated r4 pipe_hist base_4
checkprops r1 -s 1.83914
checkprops r2 -s 0.335211
checkprops r4 -s 1.8982
explode base v
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
generated r11 pipe_hist base_11
generated r20 pipe_hist base_20
checkprops r1 -l 4.2837
checkprops r2 -l 4.91201
checkprops r11 -l 4.13217
checkprops r20 -l 4.12661 -deps 1.e-7

View File

@ -2,27 +2,36 @@ puts "============"
puts "OCC27065"
puts "============"
puts ""
###############################
#########################################################################
## BRepOffsetAPI_MakePipe misses definition of virtual method Generated()
###############################
pload QAcommands
#########################################################################
restore [locate_data_file bug23903_base.brep] base
restore [locate_data_file bug23903_path.brep] sp
restore [locate_data_file bug23903_path.brep] path
pipe q path base
savehistory pipe_hist
explode base
shape pr Sh
add base_1 pr
add base_2 pr
OCC27065 sp pr
fit
checknbshapes res_shell -vertex 2 -edge 5 -wire 3 -face 3 -shell 2 -solid 2 -compsolid 1 -compound 1 -shape 19
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checknbshapes res_face -vertex 2 -edge 4 -wire 2 -face 2 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 13
checknbshapes r1 -vertex 2 -edge 4 -wire 2 -face 2 -shell 1 -solid 1
checknbshapes r2 -vertex 2 -edge 4 -wire 2 -face 2 -shell 1 -solid 1
checkprops r1 -v 888.833
checkprops r2 -v 888.833
checknbshapes res_wire -vertex 2 -edge 4 -wire 2 -face 2 -shell 1 -solid 0 -compsolid 0 -compound 1 -shape 12
explode base e
checknbshapes res_edge -vertex 2 -edge 3 -wire 1 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 8
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checkprops r1 -s 353.655
checkprops r2 -s 555.521
checknbshapes res_vertex -vertex 1 -edge 1 -wire 0 -face 0 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 3
explode base v
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checkprops r1 -l 35.1526
checkprops r2 -l 75.3649

View File

@ -25,10 +25,12 @@ generated r1 sweep_hist pr_1_1
generated r2 sweep_hist pr_1_2
generated r3 sweep_hist pr_1_3
generated r4 sweep_hist pr_1_4
checkprops r1 -s 9402.08
checkprops r2 -s 10944.1
checkprops r3 -s 9402.08
checkprops r4 -s 10944.1
explode pr_1 v
generated r1 sweep_hist pr_1_1
generated r2 sweep_hist pr_1_2
generated r3 sweep_hist pr_1_3
generated r4 sweep_hist pr_1_4
checkprops r3 -l 130.036

View File

@ -66,3 +66,14 @@ generated r2_2 sweep_hist pr2_2
generated r2_3 sweep_hist pr2_3
generated r3_1 sweep_hist pr3_1
checkprops r1_1 -l 142.176
checkprops r1_2 -l 142.176
checkprops r1_3 -l 163.176
checkprops r1_4 -l 163.176
checkprops r2_1 -l 142.176
checkprops r2_2 -l 172.788
checkprops r2_3 -l 142.176
checkprops r3_1 -l 153.936

View File

@ -18,7 +18,6 @@ mkedge pr3 cc
wire pr3 pr3
donly sp pr1 pr2 pr3
mksweep sp
addsweep pr3
addsweep pr1
@ -35,11 +34,26 @@ generated r1_1 sweep_hist pr1_1
generated r1_2 sweep_hist pr1_2
generated r1_3 sweep_hist pr1_3
checknbshapes r1_1 -face 1
checkprops r1_1 -s 798.081
checknbshapes r1_2 -face 2
checkprops r1_2 -s 1653.11
checknbshapes r1_3 -face 1
checkprops r1_3 -s 798.081
generated r2_1 sweep_hist pr2_1
generated r2_2 sweep_hist pr2_2
checknbshapes r2_1 -face 2
checkprops r2_1 -s 1624.64
checknbshapes r2_2 -face 2
checkprops r2_2 -s 1624.64
generated r3_1 sweep_hist pr3_1
checknbshapes r3_1 -face 4
checkprops r3_1 -s 3249.27
explode pr1 v
explode pr2 v
explode pr3 v
@ -49,9 +63,21 @@ generated r1_2 sweep_hist pr1_2
generated r1_3 sweep_hist pr1_3
generated r1_4 sweep_hist pr1_4
checkprops r1_1 -l 147.049
checkprops r1_2 -l 161.905
checkprops r1_3 -l 161.905
checkprops r1_4 -l 147.049
generated r2_1 sweep_hist pr2_1
generated r2_2 sweep_hist pr2_2
generated r2_3 sweep_hist pr2_3
checkprops r2_1 -l 147.049
checkprops r2_2 -l 172.788
checkprops r2_3 -l 147.049
generated r3_1 sweep_hist pr3_1
generated r3_2 sweep_hist pr3_2
checkprops r3_1 -l 147.049
checkprops r3_2 -l 147.049

View File

@ -26,11 +26,35 @@ generated r1 sweep_hist pr2_1
generated r2 sweep_hist pr2_2
generated r3 sweep_hist pr2_3
checkprops r1 -s 1171.18
checkprops r2 -s 1171.18
checkprops r3 -s 965.22
explode pr2 v
generated r1 sweep_hist pr2_1
generated r2 sweep_hist pr2_2
generated r3 sweep_hist pr2_3
checkprops r1 -l 147.049
checkprops r2 -l 167.959
checkprops r3 -l 147.049
generated r4 sweep_hist sp_1
generated r5 sweep_hist sp_2
checknbshapes r4 -vertex 1 -edge 3 -face 0
regexp {Mass : *([0-9\-+.eE]+)} [lprops r4] dummy len4
if {$len4 > 1.e-12} {
puts "Error: the length of punctual section is not null"
}
checknbshapes r5 -vertex 1 -edge 3 -face 0
regexp {Mass : *([0-9\-+.eE]+)} [lprops r5] dummy len5
if {$len5 > 1.e-12} {
puts "Error: the length of punctual section is not null"
}

View File

@ -28,17 +28,32 @@ savehistory sweep_hist
generated r1_1 sweep_hist pr1_1
checknbshapes r1_1 -face 4
checkprops r1_1 -s 37077
generated r2_1 sweep_hist pr2_1
generated r2_2 sweep_hist pr2_2
generated r2_3 sweep_hist pr2_3
generated r2_4 sweep_hist pr2_4
checkprops r2_1 -s 8740.38
checkprops r2_2 -s 9798.12
checkprops r2_3 -s 9798.12
checkprops r2_4 -s 8740.38
explode pr1 v
explode pr2 v
generated r1_1 sweep_hist pr1_1
checkprops r1_1 -l 628.319
generated r2_1 sweep_hist pr2_1
generated r2_2 sweep_hist pr2_2
generated r2_3 sweep_hist pr2_3
generated r2_4 sweep_hist pr2_4
checkprops r2_1 -l 565.487
checkprops r2_2 -l 628.319
checkprops r2_3 -l 691.15
checkprops r2_4 -l 628.319

View File

@ -30,19 +30,42 @@ savehistory sweep_hist
generated r1_1 sweep_hist pr1_1
checknbshapes r1_1 -face 4
checkprops r1_1 -s 35117.3
generated r2_1 sweep_hist pr2_1
generated r2_2 sweep_hist pr2_2
generated r2_3 sweep_hist pr2_3
generated r2_4 sweep_hist pr2_4
checkprops r2_1 -s 8183.89
checkprops r2_2 -s 9374.75
checkprops r2_3 -s 9374.75
checkprops r2_4 -s 8183.89
explode pr1 v
explode pr2 v
generated r1_1 sweep_hist pr1_1
checkprops r1_1 -l 628.319
generated r2_1 sweep_hist pr2_1
generated r2_2 sweep_hist pr2_2
generated r2_3 sweep_hist pr2_3
generated r2_4 sweep_hist pr2_4
checkprops r2_1 -l 573.265
checkprops r2_2 -l 629.072
checkprops r2_3 -l 684.885
checkprops r2_4 -l 629.072
generated r3 sweep_hist sp_1
checknbshapes r3 -vertex 1 -edge 4 -face 0
regexp {Mass : *([0-9\-+.eE]+)} [lprops r3] dummy len3
if {$len3 > 1.e-12} {
puts "Error: the length of punctual section is not null"
}

View File

@ -23,9 +23,23 @@ generated r2 sweep_hist pr_2
generated r3 sweep_hist pr_3
generated r4 sweep_hist pr_4
checknbshapes r1 -face 4
checkprops r1 -s 256109
checknbshapes r2 -face 4
checkprops r2 -s 277227
checknbshapes r3 -face 4
checkprops r3 -s 256109
checknbshapes r4 -face 3
checkprops r4 -s 233971
explode pr v
generated r1 sweep_hist pr_1
generated r2 sweep_hist pr_2
generated r3 sweep_hist pr_3
generated r4 sweep_hist pr_4
checkprops r1 -l 1169.86
checkprops r2 -l 1386.13
checkprops r3 -l 1386.13
checkprops r4 -l 1169.86

View File

@ -23,9 +23,27 @@ generated r2 sweep_hist pr_2
generated r3 sweep_hist pr_3
generated r4 sweep_hist pr_4
checknbshapes r1 -face 12
checkprops r1 -s 275.124
checknbshapes r2 -face 9
checkprops r2 -s 189.425
checknbshapes r3 -face 9
checkprops r3 -s 189.425
checknbshapes r4 -face 12
checkprops r4 -s 275.124
explode pr v
generated r1 sweep_hist pr_1
generated r2 sweep_hist pr_2
generated r3 sweep_hist pr_3
generated r4 sweep_hist pr_4
checknbshapes r1 -edge 12
checkprops r1 -l 78.8496
checknbshapes r2 -edge 9
checkprops r2 -l 57.4248
checknbshapes r3 -edge 6
checkprops r3 -l 36
checknbshapes r4 -edge 9
checkprops r4 -l 57.4248

View File

@ -0,0 +1,56 @@
puts "============"
puts "OCC30186"
puts "============"
puts ""
##############################################################################
# BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges
##############################################################################
restore [locate_data_file bug24586_base.brep] base
restore [locate_data_file bug24586_path.brep] path
pipe q path base
savehistory pipe_hist
explode base
generated r1 pipe_hist base_1
generated r6 pipe_hist base_6
checknbshapes r1 -vertex 16 -edge 28 -wire 14 -face 14 -shell 1 -solid 1
checknbshapes r6 -vertex 24 -edge 42 -wire 20 -face 20 -shell 1 -solid 1
checkprops r1 -v 53274.3
checkprops r6 -v 194248
explode base e
generated r4 pipe_hist base_4
generated r34 pipe_hist base_34
checknbshapes r4 -vertex 8 -edge 10 -wire 3 -face 3
checknbshapes r34 -vertex 8 -edge 10 -wire 3 -face 3
checkprops r4 -s 5170.35
checkprops r34 -s 8455.75
explode base v
generated r6 pipe_hist base_6
generated r13 pipe_hist base_13
checkprops r6 -l 517.035
checkprops r13 -l 454.204
explode path
generated r1 pipe_hist path_1
generated r2 pipe_hist path_2
generated r3 pipe_hist path_3
checknbshapes r1 -vertex 82 -edge 169 -wire 64 -face 64
checknbshapes r2 -vertex 82 -edge 169 -wire 64 -face 64
checknbshapes r3 -vertex 82 -edge 169 -wire 64 -face 64
checkprops r1 -s 68000
checkprops r2 -s 138858
checkprops r3 -s 102000
explode path v
generated r2 pipe_hist path_2
checknbshapes r2 -vertex 41 -edge 64
checkprops r2 -l 680

View File

@ -0,0 +1,56 @@
puts "============"
puts "OCC30186"
puts "============"
puts ""
##############################################################################
# BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges
##############################################################################
restore [locate_data_file bug23903_base.brep] base
restore [locate_data_file bug30186_BlendedContour.brep] path
pipe q path base
savehistory pipe_hist
explode base
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checknbshapes r1 -vertex 16 -edge 32 -wire 16 -face 16 -shell 1 -solid 1
checknbshapes r2 -vertex 16 -edge 32 -wire 16 -face 16 -shell 1 -solid 1
checkprops r1 -v 1182.77
checkprops r2 -v 1182.77
explode base e
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checknbshapes r1 -vertex 16 -edge 24 -wire 8 -face 8
checknbshapes r2 -vertex 16 -edge 24 -wire 8 -face 8
checkprops r1 -s 470.61
checkprops r2 -s 739.232
explode base v
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checkprops r1 -l 53.4265
checkprops r2 -l 93.6389
explode path
generated r1 pipe_hist path_1
generated r3 pipe_hist path_3
generated r4 pipe_hist path_4
checknbshapes r1 -vertex 4 -edge 8 -wire 3 -face 3
checknbshapes r3 -vertex 4 -edge 8 -wire 3 -face 3
checknbshapes r4 -vertex 4 -edge 8 -wire 3 -face 3
checkprops r1 -s 318.074
checkprops r3 -s 323.376
checkprops r4 -s 166.543
explode path v
generated r1 pipe_hist path_1
checknbshapes r1 -vertex 2 -edge 3
checkprops r1 -l 26.5062

View File

@ -0,0 +1,62 @@
puts "============"
puts "OCC30186"
puts "============"
puts ""
##############################################################################
# BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges
##############################################################################
restore [locate_data_file bug25272_base.brep] base
restore [locate_data_file bug25272_path.brep] path
pipe q path base
savehistory pipe_hist
explode base
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checknbshapes r1 -vertex 16 -edge 32 -wire 16 -face 16 -shell 1 -solid 1
checknbshapes r2 -vertex 16 -edge 32 -wire 16 -face 16 -shell 1 -solid 1
checkprops r1 -v 1.88923
checkprops r2 -v 1.88923
explode base e
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
generated r3 pipe_hist base_3
checknbshapes r1 -vertex 8 -edge 12 -wire 4 -face 4
checknbshapes r2 -vertex 8 -edge 12 -wire 4 -face 4
checknbshapes r3 -vertex 8 -edge 12 -wire 4 -face 4
checkprops r1 -s 93.5894
checkprops r2 -s 95.333
checkprops r3 -s 1.1447
explode base v
generated r1 pipe_hist base_1
generated r3 pipe_hist base_3
checkprops r1 -l 57.2976 -deps 1.e-7
checkprops r3 -l 57.172 -deps 1.e-7
explode path
generated r1 pipe_hist path_1
generated r2 pipe_hist path_2
generated r3 pipe_hist path_3
generated r4 pipe_hist path_4
checknbshapes r1 -vertex 16 -edge 32 -wire 12 -face 12
checknbshapes r2 -vertex 16 -edge 32 -wire 12 -face 12
checknbshapes r3 -vertex 16 -edge 32 -wire 12 -face 12
checknbshapes r4 -vertex 16 -edge 32 -wire 12 -face 12
checkprops r1 -s 191.581
checkprops r2 -s 100.311
checkprops r3 -s 191.581
checkprops r4 -s 328.584
explode path v
generated r1 pipe_hist path_1
checknbshapes r1 -vertex 8 -edge 12
checkprops r1 -l 12.772

View File

@ -0,0 +1,52 @@
puts "============"
puts "OCC30186"
puts "============"
puts ""
##############################################################################
# BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges
##############################################################################
restore [locate_data_file OCC25887_shape.brep] a
explode a
renamevar a_1 path
renamevar a_2 base
pipe q path base
savehistory pipe_hist
explode base
generated r1 pipe_hist base_1
checknbshapes r1 -vertex 6 -edge 10 -wire 8 -face 6 -shell 1 -solid 1
checkprops r1 -v 0.689148
explode base e
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checknbshapes r1 -vertex 3 -edge 5 -wire 2 -face 2
checknbshapes r2 -vertex 3 -edge 5 -wire 2 -face 2
checkprops r1 -s 35.3469
checkprops r2 -s 33.5796
explode base v
generated r1 pipe_hist base_1
generated r2 pipe_hist base_2
checkprops r1 -l 14.0641
checkprops r2 -l 14.0641
explode path
generated r1 pipe_hist path_1
generated r2 pipe_hist path_2
checknbshapes r1 -vertex 4 -edge 6 -wire 2 -face 2
checknbshapes r2 -vertex 4 -edge 6 -wire 2 -face 2
checkprops r1 -s 35.9763
checkprops r2 -s 32.9503
explode path v
generated r2 pipe_hist path_2
checknbshapes r2 -vertex 2 -edge 2
checkprops r2 -l 4.90088

View File

@ -0,0 +1,56 @@
puts "============"
puts "OCC30186"
puts "============"
puts ""
##############################################################################
# BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges
##############################################################################
restore [locate_data_file bug25480_part1.brep] base
restore [locate_data_file bug25480_part2.brep] path
pipe q path base
savehistory pipe_hist
explode base f
generated r1 pipe_hist base_1
generated r8 pipe_hist base_8
checknbshapes r1 -vertex 16 -edge 28 -wire 14 -face 14 -shell 1 -solid 1
checknbshapes r8 -vertex 16 -edge 28 -wire 14 -face 14 -shell 1 -solid 1
checkprops r1 -v 3219.23
checkprops r8 -v 3181.78
explode base e
generated r10 pipe_hist base_10
generated r25 pipe_hist base_25
checknbshapes r10 -vertex 8 -edge 10 -wire 3 -face 3
checknbshapes r25 -vertex 8 -edge 10 -wire 3 -face 3
checkprops r10 -s 471.736
checkprops r25 -s 1258.1
explode base v
generated r10 pipe_hist base_10
generated r25 pipe_hist base_25
checkprops r10 -l 186.888
checkprops r25 -l 174.231
explode path
generated r1 pipe_hist path_1
generated r2 pipe_hist path_2
generated r3 pipe_hist path_3
checknbshapes r1 -vertex 112 -edge 168 -wire 56 -face 56
checknbshapes r2 -vertex 112 -edge 168 -wire 56 -face 56
checknbshapes r3 -vertex 112 -edge 168 -wire 56 -face 56
checkprops r1 -s 7017.89
checkprops r2 -s 29728.3
checkprops r3 -s 11198.9
explode path v
generated r3 pipe_hist path_3
checknbshapes r3 -vertex 56 -edge 56
checkprops r3 -l 266.84