1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0029692: Add functionality to make the group of touching same-dimensional shapes connected

Implementation of the new class *BOPAlgo_MakeConnected* for making the group of touching same-dimensional shapes connected.
Provide the material association for the first sub-elements of the input shapes.
Provide possibility to make the connected shape periodic.

Draw commands for new algorithm:
* makeconnected - make the input shapes connected or glued, performs material associations;
* cmaterialson - returns the materials located on the requested side of a shape;
* cmakeperiodic - makes the connected shape periodic in requested directions;
* crepeatshape - repeats the periodic connected shape in requested directions requested number of times;
* cperiodictwins - returns all periodic twins for the shape;
* cclearrepetitions - clears all previous repetitions of the periodic shape, keeping the shape periodic.

Documentation & test cases for the new algorithm.
This commit is contained in:
emv
2018-04-12 16:22:34 +03:00
committed by apn
parent 53a73fc1d1
commit 0c09fd3c6f
19 changed files with 1672 additions and 6 deletions

View File

@@ -72,8 +72,8 @@ void BOPTest::PeriodicityCommands(Draw_Interpretor& theCommands)
"\t\t-x/y/z times - direction for repetition and number of repetitions.",
__FILE__, RepeatShape, group);
theCommands.Add("clearrepetitions", "clearrepetitions\n"
"\t\tClears all previous repetitions of the periodic shape (used without any arguments).",
theCommands.Add("clearrepetitions", "clearrepetitions [result]\n"
"\t\tClears all previous repetitions of the periodic shape.",
__FILE__, ClearRepetitions, group);
}
@@ -280,8 +280,8 @@ Standard_Integer RepeatShape(Draw_Interpretor& theDI,
//purpose :
//=======================================================================
Standard_Integer ClearRepetitions(Draw_Interpretor&,
Standard_Integer,
const char **)
Standard_Integer theArgc,
const char **theArgv)
{
// Clear all previous repetitions
ThePeriodicityMaker.ClearRepetitions();
@@ -289,5 +289,8 @@ Standard_Integer ClearRepetitions(Draw_Interpretor&,
// Set the history of the operation in session
BRepTest_Objects::SetHistory(ThePeriodicityMaker.History());
if (theArgc > 1)
DBRep::Set(theArgv[1], ThePeriodicityMaker.Shape());
return 0;
}