1). Added persistence.
2) Removed not supported evolution - Replace.
QADraw commands were fixed .
Added TKBO to EXTERNLIB.
Modified test case: caf named_shape F6
case TNaming_MODIFY : return 'M';
case TNaming_DELETE : return 'D';
case TNaming_SELECTED : return 'S';
- case TNaming_REPLACE : return 'R';
+ // case TNaming_REPLACE : return 'R';
default:
Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown");
}
case 'M': return TNaming_MODIFY;
case 'D': return TNaming_DELETE;
case 'S': return TNaming_SELECTED;
- case 'R': return TNaming_REPLACE;
+ case 'R': return TNaming_MODIFY; //for compatibility //TNaming_REPLACE;
default:
Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown");
}
case TNaming_SELECTED :
aBuilder.Select(aNewShape, anOldShape);
break;
- case TNaming_REPLACE :
- aBuilder.Replace(anOldShape, aNewShape);
- break;
+ // case TNaming_REPLACE :
+ // aBuilder.Replace(anOldShape, aNewShape);
+ // break;
default :
Standard_DomainError::Raise("TNaming_Evolution:: Evolution Unknown");
}
case TNaming_FILTERBYNEIGHBOURGS : return 'F';
case TNaming_ORIENTATION : return 'O';
case TNaming_WIREIN : return 'W';
+ case TNaming_SHELLIN : return 'H';
default:
Standard_DomainError::Raise("TNaming_NameType:: Name Type Unknown");
}
case 'F' : return TNaming_FILTERBYNEIGHBOURGS;
case 'O' : return TNaming_ORIENTATION;
case 'W' : return TNaming_WIREIN;
+ case 'H' : return TNaming_SHELLIN;
default:
Standard_DomainError::Raise("TNaming_NameType:: Name Type Unknown");
}
Bld.Select(NewShape, OldShape); break;
}
case TNaming_REPLACE :{
- Bld.Replace(OldShape,NewShape); break;
+ //Bld.Replace(OldShape,NewShape); break;
+ Bld.Modify(OldShape,NewShape); break;// for compatibility only
}
default :
Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
case TNaming_MODIFY : return 2;
case TNaming_DELETE : return 3;
case TNaming_SELECTED : return 4;
- case TNaming_REPLACE : return 5;
+ //case TNaming_REPLACE : return 5;
default:
Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
}
case 6 : return TNaming_SUBSTRACTION;
case 7 : return TNaming_CONSTSHAPE;
case 8 : return TNaming_FILTERBYNEIGHBOURGS;
+ case 9 : return TNaming_ORIENTATION;
+ case 10: return TNaming_WIREIN;
+ case 11: return TNaming_SHELLIN;
default :
Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
}
case TNaming_FILTERBYNEIGHBOURGS : return 8;
case TNaming_ORIENTATION : return 9;
case TNaming_WIREIN : return 10;
+ case TNaming_SHELLIN : return 11;
default :
Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
}
aBuilder.Delete(aShape1);
break;
case 'R':
- aBuilder.Replace(aShape1,aShape2);
+// aBuilder.Replace(aShape1,aShape2);
+ aBuilder.Modify(aShape1,aShape2);
break;
case 'S':
aBuilder.Select(aShape1,aShape2);
return "DELETE";
case TNaming_SELECTED :
return "SELECTED";
- case TNaming_REPLACE :
- return "REPLACE";
+// case TNaming_REPLACE :
+// return "REPLACE";
}
return "UNKNOWN_Evolution";
}
theBuilder.Modify(theOS, theNS);
break;
}
- case TNaming_REPLACE :
- {
- theBuilder.Replace(theOS, theNS);
- break;
- }
+// case TNaming_REPLACE :
+// {
+// theBuilder.Replace(theOS, theNS);
+// break;
+// }
case TNaming_DELETE :
{
theBuilder.Delete (theOS);
CONSTSHAPE,
FILTERBYNEIGHBOURGS,
ORIENTATION,
- WIREIN
+ WIREIN,
+ SHELLIN
end NameType;
class Name;
To : in out Shape from TopoDS)
returns Boolean from Standard;
---Purpose: Subtitutes shape in source structure
+
+
+ OuterWire(theFace: Face from TopoDS; theWire: out Wire from TopoDS)
+ returns Boolean from Standard;
+ --- Purpose: Returns True if outer wire is found and the found wire in <theWire>.
+ OuterShell(theSolid: Solid from TopoDS; theShell: out Shell from TopoDS)
+ returns Boolean from Standard;
+ --- Purpose: Returns True if outer Shell is found and the found shell in <theShell>.
+
+
---Purpose: Print of TNaming enumeration
-- =============================
#include <TNaming_DataMapOfShapePtrRefShape.hxx>
#include <TNaming_Tool.hxx>
+#include <IntTools_FClass2d.hxx>
+#include <BRepClass3d_SolidClassifier.hxx>
+
// CopyShape
#include <TColStd_IndexedDataMapOfTransientTransient.hxx>
#include <TNaming_TranslateTool.hxx>
case TNaming_SELECTED :
{
B.Select(NS,OS);
+ break;
}
default:
break;
case TNaming_WIREIN:
{
s <<"WIREIN"; break;
+ }
+ case TNaming_SHELLIN:
+ {
+ s <<"SHELLIN"; break;
}
default :
{
return TopoDS_Shape();
}
+//=======================================================================
+//function : OuterWire
+//purpose : Returns True & <theWire> if Outer wire is found.
+//=======================================================================
+Standard_Boolean TNaming::OuterWire(const TopoDS_Face& theFace, TopoDS_Wire& theWire)
+{
+ TopoDS_Face aFx;
+ TopoDS_Wire aWx;
+ BRep_Builder aBB;
+ IntTools_FClass2d aFC;
+ Standard_Boolean bFlag(Standard_False);
+ Standard_Real aTol = BRep_Tool::Tolerance(theFace);
+ TopoDS_Iterator aIt(theFace);
+ for (; aIt.More(); aIt.Next()) {
+ aWx=*((TopoDS_Wire*)&aIt.Value());
+ aFx = theFace;
+ aFx.EmptyCopy();
+ aBB.Add(aFx, aWx);
+ aFC.Init(aFx, aTol);
+ bFlag = aFC.IsHole();
+ if (!bFlag)
+ break;
+ }
+ theWire=aWx;
+ return !bFlag;// if bFlag == True - not found
+}
+//=======================================================================
+//function : IsInternal
+//purpose :
+//=======================================================================
+static Standard_Boolean IsInternal(const TopoDS_Shape& aSx)
+{
+ Standard_Boolean bInternal;
+ TopAbs_Orientation aOr;
+ TopoDS_Iterator aIt;
+ bInternal = Standard_False;
+ aIt.Initialize(aSx);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aSy=aIt.Value();
+ aOr=aSy.Orientation();
+ bInternal = (aOr == TopAbs_INTERNAL || aOr == TopAbs_EXTERNAL);
+ break;
+ }
+ return bInternal;
+}
+//=======================================================================
+//function : OuterShell
+//purpose : returns True & <theShell>, if Outer shell is found
+//=======================================================================
+Standard_Boolean TNaming::OuterShell(const TopoDS_Solid& theSolid,
+ TopoDS_Shell& theShell)
+{
+ TopoDS_Solid aSDx;
+ TopoDS_Shell aSHx;
+ TopAbs_State aState;
+ Standard_Boolean bFound(Standard_False);
+ Standard_Real aTol(1.e-7);
+ //
+ BRep_Builder aBB;
+ BRepClass3d_SolidClassifier aSC;
+ TopoDS_Iterator aIt(theSolid);
+ for (; aIt.More(); aIt.Next()) {
+ const TopoDS_Shape& aSx = aIt.Value();
+
+ if (aSx.ShapeType() != TopAbs_SHELL)
+ continue;
+ if (IsInternal(aSx))
+ continue;
+ //
+ aSHx = *((TopoDS_Shell*)&aSx);
+ //
+ aSDx = theSolid;
+ aSDx.EmptyCopy();
+ //
+ aBB.Add(aSDx, aSHx);
+ //
+ aSC.Load(aSDx);
+ //BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aSDx);
+ aSC.PerformInfinitePoint(aTol);
+ aState = aSC.State();
+ if(aState == TopAbs_OUT) {
+ bFound = Standard_True;
+ break;
+ }
+ }
+ theShell = aSHx;
+
+ return bFound;
+}
-- or merged in a Boolean operation.
--
- ---Category: Load changes
- --
- Replace (me : in out; oldShape, newShape : Shape from TopoDS);
- ---Purpose: Records the shape newShape which is a
- -- modification of the shape oldShape but has a
- -- different geometry as a result of the construction operation.
- -- As an example, consider the case of a face
- -- resulting from construction of a draft in a box or prism.
-
-
---Category: Load Selection.
Select (me : in out; aShape, inShape : Shape from TopoDS);
---Purpose: Add a Shape to the current label , This Shape is
B.Select(NS,OS);
break;
}
- case TNaming_REPLACE :
- {
- B.Replace(OS,NS);
- break;
- }
}
}
#include <TopExp_Explorer.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
+#include <BRepTools.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
//#define MDTV_DEB_MODUN
//#define MDTV_DEB_FNB
//#define MDTV_DEB_WIN
+//#define MDTV_DEB_ARG
+//#define MDTV_DEB_SHELL
#ifdef MDTV_DEB
#include <TCollection_AsciiString.hxx>
#include <TDF_Tool.hxx>
}
}
-#include <BRepTools.hxx>
//=======================================================================
static void DbgTools_Write(const TopoDS_Shape& shape,
const Standard_CString filename)
for (;it.More();it.Next()) {
const Handle(TNaming_NamedShape)& aNS = it.Value();
if(aNS.IsNull()) {
-#ifdef MDTV_DEB
+#ifdef MDTV_DEB_ARG
cout << "ValidArgs:: NS (Naming argument) is NULL" <<endl;
#endif
return Standard_False;
}
else
if(aNS->IsEmpty()) {
-#ifdef MDTV_DEB
+#ifdef MDTV_DEB_ARG
TCollection_AsciiString entry;
TDF_Tool::Entry(aNS->Label(), entry);
cout << "ValidArgs:: Empty NS, Label = " << entry <<endl;
}
else
if(!aNS->IsValid()) {
-#ifdef MDTV_DEB
+#ifdef MDTV_DEB_ARG
TCollection_AsciiString entry;
TDF_Tool::Entry(aNS->Label(), entry);
cout << "ValidArgs::Not valid NS Label = " << entry <<endl;
const TopoDS_Shape& S,
const Handle(TNaming_NamedShape)& Context)
{
+#ifdef MDTV_DEB_MODUN
+ if(!Context.IsNull())
+ PrintEntry(Context->Label());
+#endif
Standard_Boolean found = Standard_False;
for (; it.More(); it.Next()) {
if (!it.Shape().IsNull()) {
+#ifdef MDTV_DEB_MODUN
+ if(!it.NamedShape().IsNull())
+ PrintEntry(it.NamedShape()->Label());
+#endif
if (it.NamedShape() == Context) {
MS.Add(S);
found = Standard_True;
Standard_Integer k = 0;
TCollection_AsciiString aNam1 = aGen1 + i + Und + j + ".brep";
DbgTools_Write(S, aNam1.ToCString());
+ PrintEntry(aNS->Label());//NSLabel
#endif
- for (TNaming_Iterator itC (Target); itC.More(); itC.Next()) { // <- generated
+ TNaming_Iterator itC (Target);
+ for (; itC.More(); itC.Next()) { // <- generated
const TopoDS_Shape& OS = itC.OldShape();
#ifdef MDTV_DEB_MODUN
k++;
TCollection_AsciiString aNam2 = aGen2 + i + Und + j + Und + k + ".brep";
DbgTools_Write(OS, aNam2.ToCString());
+ PrintEntry(Target->Label());//Target Label
#endif
if (OS.IsSame(S)) {
theMS.Add(S);
//===========================================================================
//function : WireIN
-//purpose : to solve WIREIN name; Index for case if the Face has several wires
+//purpose : to solve WIREIN name
//=======================================================================
static Standard_Boolean WireIN(const TDF_Label& L,
const TDF_LabelMap& Valid,
- const TNaming_ListOfNamedShape& Args,
- const Standard_Integer Index)
+ const TNaming_ListOfNamedShape& Args,
+ const Handle(TNaming_NamedShape)& Stop,
+ Standard_Integer Index)
{
Standard_Boolean aResult(Standard_False);
if(!ValidArgs(Args)) return aResult;
TopTools_MapOfShape MS;
TDF_LabelMap Forbiden;
- if (Args.Extent() != 1 )
+ if (Args.Extent() < 1 )
Standard_ConstructionError::Raise("TNaming_Name::Solve");
- const Handle(TNaming_NamedShape)& A = Args.Last();
+ const Handle(TNaming_NamedShape)& A = Args.First();
TNaming_NamingTool::CurrentShape (Valid,Forbiden,A,MS);
+ if (MS.Extent() != 1) return aResult;
+ TopTools_MapIteratorOfMapOfShape itM(MS);
+ const TopoDS_Shape& aCF = itM.Key() ;
#ifdef MDTV_DEB_WIN
cout <<"MS Extent = " <<MS.Extent() <<endl;
+ DbgTools_Write(aCF, "Context_Face.brep");
#endif
- Standard_Integer indx(0), num(0);
- if(Index > 0) {
- indx = Index & 0x000000FF;
- num = (Index & 0x0000FF00) >> 8;
-#ifdef MDTV_DEB_WIN
- cout <<"Kept indx = " << indx <<" maxNum" << num << endl;
-#endif
- }
TNaming_Builder B(L);
- for (TopTools_MapIteratorOfMapOfShape itM(MS); itM.More(); itM.Next()) {
- const TopoDS_Shape& S = itM.Key() ;
+ if(Index == 1 ){ //Outer wire case
+ TopoDS_Wire anOuterWire;
+ TNaming::OuterWire(TopoDS::Face(aCF), anOuterWire);
+ if(!anOuterWire.IsNull()) {
+ B.Select(anOuterWire, anOuterWire);
+ aResult = Standard_True;
+ }
+ } else { //has internal wires
+ TNaming_ListOfNamedShape ArgsE;
+ ArgsE.Assign(Args);
+ ArgsE.RemoveFirst();
+ // fill Map with edges
+ TNaming_ListIteratorOfListOfNamedShape it(ArgsE);
+ TopTools_MapOfShape MS;
+ TDF_LabelMap Forbiden;
+
+ TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+ TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS); // fill MS with last modifications of the first additional argument
+ TopoDS_Shape CS = MakeShape(MS);
+
+ TNaming_ShapesSet aSet(CS,TopAbs_EDGE);//fill internal map of shapeset by shapes of the specified type
#ifdef MDTV_DEB_WIN
- if(!S.IsNull()) {
- DbgTools_Write(S, "WireIN_S.brep");
- cout <<"WIREIN: ShapeType = " << S.ShapeType() << " TS = " << S.TShape()->This() <<endl;
- }
+ TCollection_AsciiString entry;
+ TDF_Tool::Entry(it.Value()->Label(), entry);
+ TCollection_AsciiString Nam("Arg_");
+ TCollection_AsciiString aNam = Nam + entry + "_" + "2.brep";
+ DbgTools_Write(CS, aNam.ToCString());
+ Standard_Integer ii = 2;
+#endif
+ it.Next();
+ for (; it.More(); it.Next()) {
+#ifdef MDTV_DEB_WIN
+ TDF_Tool::Entry(it.Value()->Label(), entry);
+#endif
+ MS.Clear();
+ TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value()
+ CS = MakeShape(MS);
+ TNaming_ShapesSet OS(CS,TopAbs_EDGE);
+ aSet.Add(OS); //concatenate both shapesets
+
+#ifdef MDTV_DEB_WIN
+ ii++;
+ TCollection_AsciiString aNm = Nam + entry + "_" + ii + ".brep";
+ DbgTools_Write(CS, aNm.ToCString());
+ cout <<"Arg: Entry = " <<entry <<" TShape = " << CS.TShape() <<endl;
#endif
- Standard_Integer aNum(0), aCase(0);
- TopoDS_Iterator it2(S);
- for (;it2.More();it2.Next()) aNum++;
- if(Index > 0) {
- if(num == aNum) aCase = 1;//exact solution
- else if(aNum == 1) aCase = 2;// possible merge of initial wires
- else aCase = 3; // indefinite description ==> compound which can include expected wire
+ }
+
+#ifdef MDTV_DEB_WIN
+ cout <<"WIREIN: " << " Internal Map ext = " << aSet.Map().Extent()<<endl;
+ TopTools_MapIteratorOfMapOfShape it1 (aSet.Map());
+ for (int i=1;it1.More();it1.Next(),i++) {
+ cout << "Map("<<i<<"): TShape = " << it1.Key().TShape() << " Orient = " << it1.Key().Orientation() <<" Type = " <<
+ it1.Key().ShapeType()<<endl;
}
- Standard_Integer i(0);
- for (it2.Initialize(S);it2.More();it2.Next()) {
-#ifdef MDTV_DEB_WIN
- if(!it2.Value().IsNull()) {
- DbgTools_Write(it2.Value(), "WireIN_it2Value.brep");
- cout <<"WIREIN: ShapeType = " << it2.Value().ShapeType() << " TS = " << it2.Value().TShape()->This() <<endl;
- }
+ TopExp_Explorer exp(aCF, TopAbs_EDGE);
+ for(int i =1;exp.More();exp.Next(), i++) {
+ cout << "Context_Face("<<i<<"): TShape = " << exp.Current().TShape() << " Orient = " << exp.Current().Orientation() <<endl;
+ }
#endif
- i++;
- if(it2.Value().ShapeType() == TopAbs_WIRE) {
- if(Index > 0 ) { //szy 26/03/10
- if(aCase == 1) {
- if(i == indx) {
- aResult = Standard_True;
- B.Select(it2.Value(),it2.Value());
+//end for edges
+
+ for (TopoDS_Iterator itF(aCF); itF.More(); itF.Next()) {// find the expected wire in the face
+ const TopoDS_Shape& S = itF.Value();//wire
+ if(!S.IsNull()) {
+#ifdef MDTV_DEB_WIN
+ DbgTools_Write(S, "WireIN_S.brep");
+ cout <<"WIREIN: ShapeType = " << S.ShapeType() << " TS = " << S.TShape()->This() <<endl;
+#endif
+ if(S.ShapeType() == TopAbs_WIRE) {
+ TopTools_MapOfShape aView;
+ Standard_Integer aNum(0x7FFFFFFF);
+ for (TopoDS_Iterator it(S);it.More();it.Next())
+ aView.Add(it.Value());// edges of wire of the face in map
+
+ TopTools_MapIteratorOfMapOfShape it (aSet.Map());
+ aNum = aView.Extent();
+ if(aNum == aSet.Map().Extent()) {
+ for (;it.More();it.Next()) {
+ if(aView.Contains(it.Key())) {
+ aNum--;
+ }
+ }
+ }
+ if(aNum == 0) {
+ B.Select(S, S);
+ aResult = Standard_True;
break;
- }
- } else {
- B.Select(it2.Value(),it2.Value());
- aResult = Standard_True;
+ }
+ }
+ }
+ } //
+
+ if(!aResult) {
+ TopoDS_Wire anOuterWire;
+ TNaming::OuterWire(TopoDS::Face(aCF), anOuterWire);
+ if(!anOuterWire.IsNull()) {
+ for (TopoDS_Iterator itF(aCF); itF.More(); itF.Next()) {
+ const TopoDS_Shape& S = itF.Value();//wire
+ if(!S.IsNull()&& S.ShapeType() == TopAbs_WIRE) {
+ if(S.IsEqual(anOuterWire)) continue;
+ B.Select(S, S);
+ }
}
}
- else {
- B.Select(it2.Value(),it2.Value());
+ }
+ }
+ return aResult;
+}
+//===========================================================================
+//function : ShellIN
+//purpose : to solve SHELLIN name
+//===========================================================================
+static Standard_Boolean ShellIN(const TDF_Label& L,
+ const TDF_LabelMap& Valid,
+ const TNaming_ListOfNamedShape& Args,
+ const Handle(TNaming_NamedShape)& Stop,
+ Standard_Integer Index)
+{
+ Standard_Boolean aResult(Standard_False);
+ if(!ValidArgs(Args))
+ return aResult;
+ TopTools_MapOfShape MS;
+ TDF_LabelMap Forbiden;
+ if (Args.Extent() < 1 )
+ Standard_ConstructionError::Raise("TNaming_Name::Solve");
+ const Handle(TNaming_NamedShape)& A = Args.First();
+ TNaming_NamingTool::CurrentShape (Valid,Forbiden,A,MS);
+ if (MS.Extent() != 1) return aResult;
+ TopTools_MapIteratorOfMapOfShape itM(MS);
+ const TopoDS_Shape& aCSO = itM.Key() ;
+#ifdef MDTV_DEB_SHELL
+ cout <<"MS Extent = " <<MS.Extent() <<endl;
+ DbgTools_Write(aCSO, "Context_Solid.brep");
+#endif
+ TNaming_Builder B(L);
+ if(Index == 1 ){ //Outer Shell case
+ TopoDS_Shell anOuterShell;
+ TNaming::OuterShell(TopoDS::Solid(aCSO), anOuterShell);
+ if(!anOuterShell.IsNull()) {
+ B.Select(anOuterShell, anOuterShell);
aResult = Standard_True;
+#ifdef MDTV_DEB_SHELL
+ cout << "Outer Shell case" <<endl;
+ PrintEntry(L);
+ DbgTools_Write(anOuterShell, "ShellOut_S.brep");
+ it.Initialize(aCSO);
+ for(;it.More();it.Next()){
+ DbgTools_Write(it.Value(), "ShOut_S.brep");
+ }
+#endif
}
- }
+ } else { //has internal Shells
+ TNaming_ListOfNamedShape ArgsF;
+ ArgsF.Assign(Args);
+ ArgsF.RemoveFirst();
+ // fill Map with faces
+ TNaming_ListIteratorOfListOfNamedShape it(ArgsF);
+ TopTools_MapOfShape MS;
+ TDF_LabelMap Forbiden;
+
+ TNaming_NamingTool::BuildDescendants (Stop, Forbiden);//fill Forbidden
+ TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS); // fill MS with last modifications of the first additional argument
+ TopoDS_Shape CS = MakeShape(MS);
+
+ TNaming_ShapesSet aSet(CS,TopAbs_FACE);//fill internal map of shapeset by shapes of the specified type
+#ifdef MDTV_DEB_SHELL
+ TCollection_AsciiString entry;
+ TDF_Tool::Entry(it.Value()->Label(), entry);
+ TCollection_AsciiString Nam("Arg_");
+ TCollection_AsciiString aNam = Nam + entry + "_" + "2.brep";
+ DbgTools_Write(CS, aNam.ToCString());
+ Standard_Integer ii = 2;
+#endif
+ it.Next();
+ for (; it.More(); it.Next()) {
+#ifdef MDTV_DEB_SHELL
+ TDF_Tool::Entry(it.Value()->Label(), entry);
+#endif
+ MS.Clear();
+ TNaming_NamingTool::CurrentShape (Valid, Forbiden,it.Value(),MS);// fill MS with last modifications of the it.Value()
+ CS = MakeShape(MS);
+ TNaming_ShapesSet OS(CS,TopAbs_FACE);
+ aSet.Add(OS); //concatenate both shapesets
+
+#ifdef MDTV_DEB_SHELL
+ ii++;
+ TCollection_AsciiString aNm = Nam + entry + "_" + ii + ".brep";
+ DbgTools_Write(CS, aNm.ToCString());
+ cout <<"Arg: Entry = " <<entry <<" TShape = " << CS.TShape() <<endl;
+#endif
+ }
+
+#ifdef MDTV_DEB_SHELL
+ cout <<"SHELLIN: " << " Internal Map ext = " << aSet.Map().Extent()<<endl;
+ TopTools_MapIteratorOfMapOfShape it1 (aSet.Map());
+ for (int i=1;it1.More();it1.Next(),i++) {
+ cout << "Map("<<i<<"): TShape = " << it1.Key().TShape() << " Orient = " << it1.Key().Orientation() <<" Type = " <<
+ it1.Key().ShapeType()<<endl;
}
+
+ TopExp_Explorer exp(aCSO, TopAbs_FACE);
+ for(int i = 1;exp.More();exp.Next(), i++) {
+ cout << "Context_Solid("<<i<<"): TShape = " << exp.Current().TShape() << " Orient = " << exp.Current().Orientation() <<endl;
+ }
+#endif
+//end for faces
+
+ for (TopoDS_Iterator itS(aCSO); itS.More(); itS.Next()) {// find the expected shell in the solid
+ const TopoDS_Shape& S = itS.Value();//shell
+ if(!S.IsNull()) {
+#ifdef MDTV_DEB_SHELL
+ DbgTools_Write(S, "ShellIN_S.brep");
+ cout <<"SHELLIN: ShapeType = " << S.ShapeType() << " TS = " << S.TShape()->This() <<endl;
+#endif
+ if(S.ShapeType() == TopAbs_SHELL) {
+ TopTools_MapOfShape aView;
+ Standard_Integer aNum(0x7FFFFFFF);
+ for (TopoDS_Iterator it(S);it.More();it.Next())
+ aView.Add(it.Value());// faces of shell of the solid in map
+
+ aNum = aView.Extent();
+ if(aNum == aSet.Map().Extent()) {
+ TopTools_MapIteratorOfMapOfShape it (aSet.Map());
+ for (;it.More();it.Next()) {
+ if(aView.Contains(it.Key())) {
+ aNum--;
+ }
+ }
+ }
+ if(aNum == 0) {
+ B.Select(S, S);
+ aResult = Standard_True;
+ break;
+ }
+ }
+ }
+ } //
+
+ if(!aResult) {
+ TopoDS_Shell anOuterShell;
+ TNaming::OuterShell(TopoDS::Solid(aCSO), anOuterShell);
+ if(!anOuterShell.IsNull()) {
+ for (TopoDS_Iterator itS(aCSO); itS.More(); itS.Next()) {
+ const TopoDS_Shape& S = itS.Value();//shell
+ if(!S.IsNull()&& S.ShapeType() == TopAbs_SHELL) {
+ if(S.IsEqual(anOuterShell)) continue;
+ B.Select(S, S);
+ }
+ }
+ }
+ }
}
return aResult;
}
const TDF_LabelMap& Valid) const
{
Standard_Boolean Done = 0;
+#ifdef MDTV_DEB_WIN
+ PrintEntry(aLab);
+#endif
try {
switch (myType) {
case TNaming_UNKNOWN :
}
case TNaming_WIREIN:
{
- Done = WireIN (aLab,Valid,myArgs,myIndex);
+#ifdef MDTV_DEB_WIN
+ cout << "Name::Solve: NameType = " << myType << " ";
+ PrintEntry(aLab);
+#endif
+ Done = WireIN (aLab,Valid,myArgs,myStop,myIndex);
+ break;
+ }
+case TNaming_SHELLIN:
+ {
+#ifdef MDTV_DEB_SHELL
+ cout << "Name::Solve: NameType = " << myType << " ";
+ PrintEntry(aLab);
+#endif
+ Done = ShellIN (aLab,Valid,myArgs,myStop,myIndex);
break;
}
}
-- attribute may be a brand new one or a new version
-- of the previous one.
-
- OldPaste(me;
- intoAttribute : mutable Attribute from TDF;
- aRelocTationable : mutable RelocationTable from TDF);
-
-
-
References(me; aDataSet : DataSet from TDF)
is redefined;
---Purpose: Adds the directly referenced attributes and labels
}
-//=======================================================================
-//function : Modify
-//purpose :
-//=======================================================================
-
-void TNaming_Builder::Replace(const TopoDS_Shape& oldShape,
- const TopoDS_Shape& newShape)
-{
- if (myAtt->myNode == 0L) myAtt->myEvolution = TNaming_REPLACE;
- else {
- if (myAtt->myEvolution != TNaming_REPLACE)
- Standard_ConstructionError::Raise("TNaming_Builder : not same evolution");
- }
-
- if (oldShape.IsSame(newShape)) {
-#ifdef DEB
- cout <<"TNaming_Builder::Modify : oldShape IsSame newShape"<<endl;
-#endif
- return;
- }
- TNaming_RefShape* pos;
- if (!myMap->IsBound(oldShape)) {
- pos = new TNaming_RefShape(oldShape);
- myMap->Bind(oldShape,pos);
- }
- else
- pos = myMap->ChangeFind(oldShape);
-
- TNaming_RefShape* pns;
- if (!myMap->IsBound(newShape)) {
- pns = new TNaming_RefShape(newShape);
- myMap->Bind(newShape,pns);
- }
- else
- pns = myMap->ChangeFind(newShape);
-
- TNaming_Node* pdn = new TNaming_Node(pos,pns);
- myAtt->Add(pdn);
- UpdateFirstUseOrNextSameShape (pos,pdn);
- UpdateFirstUseOrNextSameShape (pns,pdn);
-
-}
-
//=======================================================================
static const TopoDS_Shape& DummyShapeToStoreOrientation (const TopAbs_Orientation Or)
{
}
return Until;
}
-
-
-//=======================================================================
-//function : OldPaste
-//purpose :
-//=======================================================================
-
-void TNaming_NamedShape::OldPaste(const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& /*Tab*/)
-const
-{
- TDF_Label Lab = into->Label();
- if (Lab.IsNull()) {
- Standard_NullObject::Raise("TNaming_NamedShape::Paste");
- }
- //TDF_Insertor Ins(Lab);
- //TNaming_Builder B(Ins);
- TNaming_Builder B(Lab);
-
- TNaming_Iterator It (this);
- for ( ;It.More() ; It.Next()) {
- const TopoDS_Shape& OS = It.OldShape();
- const TopoDS_Shape& NS = It.NewShape();
- TNaming_Evolution Status = It.Evolution();
- switch (Status) {
- case TNaming_PRIMITIVE :
- {
- B.Generated(NS);
- break;
- }
- case TNaming_GENERATED :
- {
- B.Generated(OS,NS);
- break;
- }
- case TNaming_MODIFY :
- {
- B.Modify(OS,NS);
- break;
- }
- case TNaming_DELETE :
- {
- B.Delete (OS);
- break;
- }
- case TNaming_SELECTED :
- {
- B.Select(NS,OS);
- break;
- }
- case TNaming_REPLACE :
- B.Replace(OS,NS);
- }
- }
-}
-
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
#include <TopTools_MapIteratorOfMapOfOrientedShape.hxx>
#include <TopTools_HArray1OfShape.hxx>
+#include <BRepTools.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Shell.hxx>
+#include <TopoDS_Solid.hxx>
// #include <TNaming_NCollections.hxx>
#include <NCollection_Map.hxx>
#include <NCollection_DataMap.hxx>
{
// il faut determiner un nouveau context et un nouveau Stop.
- // it is necessary to determine new a context and a new Stop
+ // it is necessary to determine a new context and a new Stop
TopoDS_Shape SC;
Handle(TNaming_NamedShape) NewStop = Stop;
}
}
+//=======================================================================
+//function : HasAncFace
+//purpose : Returns True & <Face> if ancestor face is found
//=======================================================================
static Standard_Boolean HasAncFace(const TopoDS_Shape& Context,
- const TopoDS_Shape& W, TopoDS_Shape& Face)
+ const TopoDS_Shape& W, TopoDS_Shape& Face, Standard_Boolean& isOuter)
{
Standard_Boolean hasFace(Standard_False);
if(W.ShapeType() != TopAbs_WIRE)
for(;exp.More(); exp.Next()) {
for (TopoDS_Iterator it(exp.Current()) ; it.More(); it.Next()) {
if(it.Value().IsEqual(W)) {// is the Wire ?
- Face = exp.Current();
- if(!Face.IsNull()) {
- hasFace = Standard_True;
- // cout << "HasAncFace: TS = " <<theFace.TShape()->This() <<endl;
- break;
- }
- }
- }
+ Face = exp.Current();
+ if(!Face.IsNull()) {
+ hasFace = Standard_True;
+ // cout << "HasAncFace: TS = " <<theFace.TShape()->This() <<endl;
+ const TopoDS_Face aFace(TopoDS::Face(Face));
+ TopoDS_Wire anOuterW;
+ if(TNaming::OuterWire(aFace, anOuterW)) {
+ if(!anOuterW.IsNull() && anOuterW.IsEqual(W))
+ isOuter = Standard_True;
+ else
+ isOuter = Standard_False;
+ }
+ break;
+ }
+ }
+ }
if(hasFace) break;
}
return hasFace;
TNaming_Name& theName = Naming->ChangeName();
TopoDS_Shape aFace;
- Standard_Boolean hasFace = HasAncFace(Context, Selection, aFace);
- if(Selection.ShapeType() == TopAbs_WIRE && Context.ShapeType() < Selection.ShapeType() && hasFace) {
+ Standard_Boolean isOuter(Standard_False);
+ Standard_Boolean hasFace = HasAncFace(Context, Selection, aFace, isOuter);
+ if(hasFace && Selection.ShapeType() > Context.ShapeType()) {
theName.Type(TNaming_WIREIN);
- if(Context.ShapeType() == TopAbs_FACE) {
- for (TopoDS_Iterator it(Context) ; it.More(); it.Next()) {
- if(it.Value().IsEqual(Selection)) {
- if (TNaming_Selector::IsIdentified (F, Context, NS, Geom)) {
- theName.Append(NS);
- found = Standard_True;
- break;
- }
- }
- }
- if(!found)
- return BuildNS (F,Selection, TNaming_UNKNOWN);
- } else {
- Standard_Integer indx(0), i(0);
- for (TopoDS_Iterator it(aFace); it.More(); it.Next()) {
- i++;
- if(it.Value().IsEqual(Selection)) {
- found = Standard_True;
- theName.Append(BuildName (Naming->Label(),MDF,aFace,Context,Stop,Geom));
- indx = i;
+ if(Context.ShapeType() == TopAbs_FACE) {
+ for (TopoDS_Iterator it(Context) ; it.More(); it.Next()) {
+ if(it.Value().IsEqual(Selection)) {
+ if (TNaming_Selector::IsIdentified (F, Context, NS, Geom)) {
+ theName.Append(NS);
+ found = Standard_True;
+ break;
+ }
+ }
}
- }
- if(found) {
- const Standard_Integer num(i);
- indx = indx | num << 8;
- //cout << " final Index = " << indx <<endl;
- theName.Index(indx);
- } else
- return BuildNS (F,Selection, TNaming_UNKNOWN);
- }
- }
- else {
+ if(found) {
+ theName.Append(BuildName (Naming->Label(),MDF,aFace,Context,Stop,Geom));
+ if(isOuter) {
+ theName.Index(1);
+ } else {
+ theName.Index(-1);
+ for (TopExp_Explorer exp(Selection,TopAbs_EDGE) ; exp.More(); exp.Next()) {
+ if(exp.Current().IsNull()) continue;
+ if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;
+ theName.Append(TNaming_Naming::Name(Naming->Label(),exp.Current(),Context, Geom, 1, 0));
+ }
+ }
+ } else
+ return BuildNS (F,Selection, TNaming_UNKNOWN);
+
+ } else { // context is not Face
+ theName.Append(BuildName (Naming->Label(),MDF,aFace,Context,Stop,Geom));
+ if(isOuter) {
+ theName.Index(1);
+ } else {
+ for (TopExp_Explorer exp(Selection,TopAbs_EDGE) ; exp.More(); exp.Next()) {
+ if(exp.Current().IsNull()) continue;
+ if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;
+ theName.Append(TNaming_Naming::Name(Naming->Label(),exp.Current(),Context, Geom, 1, 0));
+ }
+ }
+ }//
+ }
+ else { // => no Face
theName.Type(TNaming_UNION);
for (TopExp_Explorer exp(Selection,TopAbs_EDGE) ; exp.More(); exp.Next()) {
- if(exp.Current().IsNull()) continue;
- if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;//03.03.2010
+ if(exp.Current().IsNull()) continue;
+ if (BRep_Tool::Degenerated(TopoDS::Edge(exp.Current()))) continue;
theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
}
}
// Write(Selection, "Repeat_Selection.brep");
// Write(Context, "Repeat_Context.brep");
if (Context.ShapeType() < Selection.ShapeType()) {
- for (TopExp_Explorer exp(Context,Selection.ShapeType()); exp.More(); exp.Next()) {
- if (exp.Current().IsSame(Selection))
- aNum++;
- }
- }
+ if(Selection.ShapeType() != TopAbs_SHELL) {
+ for (TopExp_Explorer exp(Context,Selection.ShapeType()); exp.More(); exp.Next()) {
+ if (exp.Current().IsSame(Selection))
+ aNum++;
+ }
+ }
+ }
else if(Selection.ShapeType() == TopAbs_COMPOUND) {
TopoDS_Iterator it(Selection);
for(;it.More();it.Next()) {
#endif
return aNum;
}
+
+//=======================================================================
+//function : HasAncSolid
+//purpose : Returns true if Sh has ancestor solid in this context
+//=======================================================================
+static Standard_Boolean HasAncSolid(const TopoDS_Shape& Context,
+ const TopoDS_Shape& Sh, TopoDS_Shape& Solid,
+ Standard_Boolean& isOuter)
+{
+ Standard_Boolean hasSolid(Standard_False);
+ if(Sh.ShapeType() != TopAbs_SHELL)
+ return hasSolid;
+ TopExp_Explorer exp(Context, TopAbs_SOLID);
+ for(;exp.More(); exp.Next()) {
+ for (TopoDS_Iterator it(exp.Current()) ; it.More(); it.Next()) {
+ if(it.Value().IsEqual(Sh)) {// is the Solid ?
+ Solid = exp.Current();
+ if(!Solid.IsNull()) {
+ hasSolid = Standard_True;
+ TopoDS_Shell anOuterShell;
+ if(TNaming::OuterShell(TopoDS::Solid(Solid), anOuterShell)) {
+#ifdef MDTV_DEB_TSOL
+ Write(anOuterShell, "OuterShell.brep");
+#endif
+ if(!anOuterShell.IsNull() && anOuterShell.IsEqual(Sh))
+ isOuter = Standard_True;
+ else
+ isOuter = Standard_False;
+ }
+ break;
+ }
+ }
+ }
+ if(hasSolid) break;
+ }
+ return hasSolid;
+}
+//=======================================================================
+//function : BuildNameShell
+//purpose : Names Shell
+//=======================================================================
+
+static Handle(TNaming_NamedShape) BuildNameShell (const TDF_Label& F,
+ TNaming_Scope& MDF,
+ const TopoDS_Shape& Selection,
+ const TopoDS_Shape& Context,
+ const Handle(TNaming_NamedShape)& Stop,
+ const Standard_Boolean Geom)
+{
+ Handle (TNaming_NamedShape) NS;
+ Standard_Boolean found(Standard_False);
+ Handle (TNaming_Naming) Naming;
+ if(!F.FindAttribute(TNaming_Naming::GetID(), Naming)) {
+ Naming = new TNaming_Naming ();
+ F.AddAttribute (Naming);
+ TNaming_Name& theName = Naming->ChangeName();
+ theName.ShapeType(Selection.ShapeType());
+ theName.Shape(Selection);
+ }
+
+ TNaming_Name& theName = Naming->ChangeName();
+ TopoDS_Shape aSolid;
+ Standard_Boolean isOuter(Standard_False);
+ Standard_Boolean hasSolid = HasAncSolid(Context, Selection, aSolid, isOuter);
+ if(hasSolid && Selection.ShapeType() > Context.ShapeType()) {
+ theName.Type(TNaming_SHELLIN);// SHELLIN
+
+ if(Context.ShapeType() == TopAbs_SOLID) {
+ for (TopoDS_Iterator it(Context) ; it.More(); it.Next()) {
+#ifdef MDTV_DEB_TSOL
+ Write(it.Value(), "Shell_inSo.brep");
+#endif
+ if(it.Value().IsEqual(Selection)) {
+ found = Standard_True;
+ break;
+ }
+ }
+ if(found) {
+ // solid => aSolid which is also a context
+ Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+ if(!aNS.IsNull())
+ theName.ContextLabel(aNS->Label());
+ theName.Append(aNS);
+ if(isOuter) {
+ theName.Index(1);
+ } else { //not OuterShell
+ theName.Index(-1);
+ for (TopExp_Explorer exp(Selection,TopAbs_FACE) ; exp.More(); exp.Next()) {
+ if(exp.Current().IsNull()) continue;
+ theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+ }
+ }
+ } else
+ return BuildNS (F,Selection, TNaming_UNKNOWN);
+ } else {
+ // context is not SOLID
+ //theName.Append(BuildName (Naming->Label(),MDF,aSolid,Context,Stop,Geom));//###########
+ if(isOuter) {
+#ifdef MDTV_DEB_TSOL
+ Write(aSolid, "foundSolid.brep");
+#endif
+ theName.Index(1);
+ Handle (TNaming_Naming) NamingSo = TNaming_Naming::Insert(F);
+ TNaming_Name& theNameSo = NamingSo->ChangeName();
+ theNameSo.ShapeType(aSolid.ShapeType());
+ theNameSo.Shape(aSolid);
+ theNameSo.Type(TNaming_UNION);
+ Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+ if(!aNS.IsNull())
+ theNameSo.ContextLabel(aNS->Label());
+ for (TopExp_Explorer exp(aSolid,TopAbs_FACE) ; exp.More(); exp.Next())
+ theNameSo.Append(BuildName (NamingSo->Label(),MDF,exp.Current(),Context,Stop,Geom));
+ NamingSo->GetName().Solve(NamingSo->Label(),MDF.GetValid());
+ aNS.Nullify();
+ NamingSo->Label().FindAttribute(TNaming_NamedShape::GetID(),aNS);
+ theName.Append(aNS);
+ } else {
+ theName.Index(-1);
+ // - name Solid: theName.Append(BuildName (Naming->Label(),MDF, aSolid,Context,Stop,Geom));
+ Handle (TNaming_Naming) NamingSo = TNaming_Naming::Insert(F);
+ TNaming_Name& theNameSo = NamingSo->ChangeName();
+ theNameSo.ShapeType(aSolid.ShapeType());
+ theNameSo.Shape(aSolid);
+ theNameSo.Type(TNaming_UNION);
+ Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+ if(!aNS.IsNull())
+ theNameSo.ContextLabel(aNS->Label());
+ for (TopExp_Explorer exp(aSolid,TopAbs_FACE) ; exp.More(); exp.Next())
+ theNameSo.Append(BuildName (NamingSo->Label(),MDF,exp.Current(),Context,Stop,Geom));
+ NamingSo->GetName().Solve(NamingSo->Label(),MDF.GetValid());
+ aNS.Nullify();
+ NamingSo->Label().FindAttribute(TNaming_NamedShape::GetID(),aNS);
+ theName.Append(aNS);
+
+ for (TopExp_Explorer exp(Selection,TopAbs_FACE) ; exp.More(); exp.Next()) {
+ if(exp.Current().IsNull()) continue;
+ theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+ }
+ }
+ }//
+ }
+ else { // => no Solid
+ theName.Type(TNaming_UNION);
+ Handle(TNaming_NamedShape) aNS = TNaming_Tool::NamedShape(Context,F);
+ if(!aNS.IsNull())
+ theName.ContextLabel(aNS->Label());
+ for (TopExp_Explorer exp(Selection,TopAbs_FACE) ; exp.More(); exp.Next()) {
+ if(exp.Current().IsNull()) continue;
+ theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+ }
+ }
+ //Naming->GetName().Solve(Naming->Label(),MDF.GetValid());
+ Naming->Label().FindAttribute(TNaming_NamedShape::GetID(),NS);
+ return NS;
+}
+
//=======================================================================
//function : BuildAggregationNam
//purpose :
if(aS.ShapeType() == TopAbs_WIRE) {
aNS = BuildNameWire (aNaming->Label(), MDF, aS, Context,Stop,Geom);
}
+ else if(aS.ShapeType() == TopAbs_SHELL)
+ aNS = BuildNameShell (aNaming->Label(), MDF, aS, Context,Stop,Geom);
else {
for (TopExp_Explorer exp(aS,atomTyp) ; exp.More(); exp.Next()) {
aName.Append(BuildName (aNaming->Label(),MDF,exp.Current(),Context,Stop,Geom));
TopoDS_Iterator it(itw.Value());
for(int i=1;it.More();it.Next(),i++) {
if(it.Value().IsEqual(S)) {
- theName.Index(i);
+ theName.Index(i);//We use this field to save a Seam Shape Index; Before this field was used for GENERATED only
found = Standard_True;
#ifdef MDTV_OR
cout << "ORDER = " << i <<endl;
}
} else {
if(S.ShapeType() == TopAbs_WIRE)
- NS = BuildNameWire (Naming->Label(), MDF, S, Context,Stop,Geom);
- else {
- theName.Type(TNaming_UNION);
- for (TopExp_Explorer exp(S,atomType) ; exp.More(); exp.Next()) {
- theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
- }
- }
+ NS = BuildNameWire (Naming->Label(), MDF, S, Context,Stop,Geom);
+ else if(S.ShapeType() == TopAbs_SHELL) {
+ NS = BuildNameShell (Naming->Label(), MDF, S, Context,Stop,Geom);
+ }
+ else {
+ theName.Type(TNaming_UNION);
+ for (TopExp_Explorer exp(S,atomType) ; exp.More(); exp.Next()) {
+ theName.Append(BuildName (Naming->Label(),MDF,exp.Current(),Context,Stop,Geom));
+ }
+ }
}
#else
for (TopoDS_Iterator it(S) ; it.More(); it.Next()) {
case TNaming_SELECTED:
aBld.Select(aNewShape, anOldShape);
break;
- case TNaming_REPLACE:
- aBld.Replace(anOldShape,aNewShape);
- break;
+ // case TNaming_REPLACE:
+ // aBld.Replace(anOldShape,aNewShape);
+ // break;
default:
Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
}
case TNaming_MODIFY : return ::EvolModifyString();
case TNaming_DELETE : return ::EvolDeleteString();
case TNaming_SELECTED : return ::EvolSelectedString();
- case TNaming_REPLACE : return ::EvolReplaceString();
+ // case TNaming_REPLACE : return ::EvolReplaceString();
default:
Standard_DomainError::Raise("TNaming_Evolution; enum term unknown");
}
else if (theString.equals (::EvolSelectedString()))
aResult = TNaming_SELECTED;
else if (theString.equals (::EvolReplaceString()))
- aResult = TNaming_REPLACE;
+ aResult = TNaming_MODIFY; // for compatibility //TNaming_REPLACE;
else
Standard_DomainError::Raise
("TNaming_Evolution; string value without enum term equivalence");
IMPLEMENT_DOMSTRING (NTConstShapeString, "constshape")
IMPLEMENT_DOMSTRING (NTFilterByNeighString, "filterbyneigh")
IMPLEMENT_DOMSTRING (NTOrientationString, "orientation")
-IMPLEMENT_DOMSTRING (NTWireInString, "wirein")
+IMPLEMENT_DOMSTRING (NTWireInString, "wirein")
+IMPLEMENT_DOMSTRING (NTShellInString, "shellin")
IMPLEMENT_DOMSTRING (ShCompoundString, "compound")
IMPLEMENT_DOMSTRING (ShCompsolidString, "compsolid")
case TNaming_FILTERBYNEIGHBOURGS : return ::NTFilterByNeighString();
case TNaming_ORIENTATION : return ::NTOrientationString();
case TNaming_WIREIN : return ::NTWireInString();
+ case TNaming_SHELLIN : return ::NTShellInString();
default:
Standard_DomainError::Raise("TNaming_NameType; enum term unknown ");
}
aResult = TNaming_ORIENTATION;
else if (theString.equals (::NTWireInString()))
aResult = TNaming_WIREIN;
+ else if (theString.equals (::NTShellInString()))
+ aResult = TNaming_SHELLIN;
else
Standard_DomainError::Raise
("TNaming_NameType; string value without enum term equivalence");
#12 modify
NewCommand D
-PntOffset D $Pnt1 40 25 skip
+PntOffset D $Pnt1 20 25 skip
#13 recompute
NewCommand D