mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027386: BRepOffsetAPI_MakePipeShell does not provide history of generations
The method BRepOffsetAPI_MakePipeShell::Generated now returns generated shapes for sub-edges and sub-vertices of sections. The method BRepFill_PipeShell::BuildHistory is redesigned: now it builds generated shapes for sub-edges and sub-vertices of sections. New Draw command "gensweep" is added to sweep commands for testing of history building.
This commit is contained in:
@@ -757,6 +757,45 @@ static Standard_Integer buildsweep(Draw_Interpretor& di,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : gensweep
|
||||
//purpose : returns generated shape for subshape of a section of sweep
|
||||
// Sweep must be done previously
|
||||
//=======================================================================
|
||||
static Standard_Integer gensweep(Draw_Interpretor&,
|
||||
Standard_Integer n, const char** a)
|
||||
{
|
||||
if (n != 3)
|
||||
{
|
||||
cout<<"Usage: gensweep res subshape_of_profile, sweep must be done"<<endl;
|
||||
return 1;
|
||||
}
|
||||
if (!Sweep->IsDone())
|
||||
{
|
||||
cout<<"Sweep is not done"<<endl;
|
||||
return 1;
|
||||
}
|
||||
TopoDS_Shape aShape = DBRep::Get(a[2]);
|
||||
if (aShape.IsNull())
|
||||
{
|
||||
cout<<"Null subshape"<<endl;
|
||||
return 1;
|
||||
}
|
||||
TopTools_ListOfShape Shells = Sweep->Generated(aShape);
|
||||
TopoDS_Compound aCompound;
|
||||
BRep_Builder BB;
|
||||
BB.MakeCompound(aCompound);
|
||||
TopTools_ListIteratorOfListOfShape itsh(Shells);
|
||||
for (; itsh.More(); itsh.Next())
|
||||
{
|
||||
const TopoDS_Shape& aShell = itsh.Value();
|
||||
BB.Add(aCompound, aShell);
|
||||
}
|
||||
|
||||
DBRep::Set(a[1], aCompound);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// simulsweep
|
||||
//=======================================================================
|
||||
@@ -891,9 +930,12 @@ void BRepTest::SweepCommands(Draw_Interpretor& theCommands)
|
||||
"deletesweep wire, To delete a section",
|
||||
__FILE__,deletesweep,g);
|
||||
|
||||
theCommands.Add("buildsweep", "builsweep [r] [option] [Tol] , no args to get help"
|
||||
theCommands.Add("buildsweep", "builsweep [r] [option] [Tol] , no args to get help",
|
||||
__FILE__,buildsweep,g);
|
||||
|
||||
theCommands.Add("gensweep", "gensweep res subshape_of_profile",
|
||||
__FILE__,gensweep,g);
|
||||
|
||||
theCommands.Add("simulsweep", "simulsweep r [n] [option]"
|
||||
__FILE__,simulsweep,g);
|
||||
theCommands.Add("geompipe", "geompipe r spineedge profileedge radius [byACR [byrotate]]"
|
||||
|
Reference in New Issue
Block a user