blob: ae7d4fa7a7b27d6ad2780e782e53dff42c001ef0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// File: TopOpeBRepTool_RegularizeS.cxx
// Created: Wed Jan 6 10:58:51 1999
// Author: Xuan PHAM PHU
// <xpu@poulopox.paris1.matra-dtv.fr>
#ifdef DRAW
#include <TopOpeBRepTool_DRAW.hxx>
#endif
#include <TopOpeBRepTool_REGUS.hxx>
#include <TopOpeBRepTool.hxx>
#include <TopoDS_Solid.hxx>
#include <TopExp_Explorer.hxx>
#include <TopOpeBRepTool_define.hxx>
//=======================================================================
//function : RegularizeShells
//purpose :
//=======================================================================
Standard_Boolean TopOpeBRepTool::RegularizeShells(const TopoDS_Solid& theSolid,
TopTools_DataMapOfShapeListOfShape& OldSheNewShe,
TopTools_DataMapOfShapeListOfShape& FSplits)
{
OldSheNewShe.Clear();
FSplits.Clear();
TopOpeBRepTool_REGUS REGUS;
REGUS.SetOshNsh(OldSheNewShe);
REGUS.SetFsplits(FSplits);
// Standard_Boolean hastoregu = Standard_False;
TopExp_Explorer exsh(theSolid,TopAbs_SHELL);
for (; exsh.More(); exsh.Next()) {
const TopoDS_Shape& sh = exsh.Current();
REGUS.Init(sh);
Standard_Boolean ok = REGUS.MapS();
if (!ok) return Standard_False;
ok = REGUS.SplitFaces();
if (!ok) return Standard_False;
REGUS.REGU();
}//exsh(theSolid)
REGUS.GetOshNsh(OldSheNewShe); //??????????????????????????????
REGUS.GetFsplits(FSplits); //??????????????????????????????
return Standard_True;
}
|