1 // Created on: 1996-02-02
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <TestTopOpeDraw.hxx>
18 #include <TestTopOpeDraw_Displayer.hxx>
19 #include <TestTopOpeDraw_TTOT.hxx>
21 #include <BRepTools.hxx>
22 #include <BRep_Tool.hxx>
23 #include <Draw_Interpretor.hxx>
24 #include <Draw_Appli.hxx>
25 #include <TopOpeBRepTool_define.hxx>
28 //-----------------------------------------------------------------------
29 // 0 = testtopopedraw_cdinp
30 // 1,2,3,4 = display point p of coords x y z
31 //-----------------------------------------------------------------------
32 Standard_Integer testtopopedraw_cdinp(Draw_Interpretor&,Standard_Integer na,const char** a)
34 if ( na < 5 ) return 0;
35 TestTopOpeDraw_P3DDisplayer PD(a[1],Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4]));
39 //-----------------------------------------------------------------------
40 // DRAWsuppressarg : remove a[d], modify na--
41 //-----------------------------------------------------------------------
42 Standard_EXPORT void DRAWsuppressarg(Standard_Integer& na,const char** a,const Standard_Integer d)
44 for(Standard_Integer i=d;i<na;i++) {
51 //-----------------------------------------------------------------------
52 // DRAWsuppressargs : remove a[*] from <f> to <l>, modify na = na - (l - f)
53 //-----------------------------------------------------------------------
54 Standard_EXPORT void DRAWsuppressargs(Standard_Integer& na,const char** a,const Standard_Integer f,const Standard_Integer l)
57 DRAWsuppressarg(na,a,l);
59 for(Standard_Integer i=0;i<na-l;i++) {
66 //-----------------------------------------------------------------------
67 void OthersCommands_flags(Standard_Integer& na,const char** a,TestTopOpeDraw_Displayer& TD)
68 //-----------------------------------------------------------------------
70 Standard_Integer i,j,l,dloc = 0,iloc,decal = 0, NbArg = na;
71 Standard_Boolean dori = Standard_False; // display orientation
72 Standard_Boolean tgeo = Standard_False; // name with geometry
73 Standard_Boolean tori = Standard_False; // name with orientation
74 Standard_Real tpar = -1.0;
75 Standard_Integer inbr = 2; Standard_Boolean inbrdef = Standard_False;
76 Standard_Boolean col = Standard_False; // display specific color
77 Standard_Boolean tolflag = Standard_False;
79 for (i=1; i<NbArg; i++) {
82 if (a[iloc][0] == '-') {
83 l = (Standard_Integer)strlen(a[iloc]);
85 if (a[iloc][j] == 'g') tgeo=Standard_True;
86 else if(!strcmp(a[iloc],"-tol")) tolflag = Standard_True;
87 else if(a[iloc][j] == 'o') tori=Standard_True;
88 else if(a[iloc][j] == 'O') dori=Standard_True;
89 else if(a[iloc][j] == 'i') {
91 char sis[40]; sis[0] = '\0';
92 Standard_Integer kk = 0, k = j+1;
93 for (; k<l; k++,kk++,sis[kk] = '\0' ) sis[kk] = a[iloc][k];
94 inbr = Draw::Atoi(sis);
95 inbrdef = Standard_True;
98 else if(a[iloc][j] == 'p') {
100 tpar = Draw::Atof(a[iloc+1]);
104 else if(a[iloc][j] == 'c') {
106 if(strcmp(a[iloc+1], "blanc") == 0) Color = Draw_blanc;
107 else if (strcmp(a[iloc+1], "rouge") == 0) Color = Draw_rouge;
108 else if (strcmp(a[iloc+1], "vert") == 0) Color = Draw_vert;
109 else if (strcmp(a[iloc+1], "bleu") == 0) Color = Draw_bleu;
110 else if (strcmp(a[iloc+1], "cyan") == 0) Color = Draw_cyan;
111 else if (strcmp(a[iloc+1], "or") == 0) Color = Draw_or;
112 else if (strcmp(a[iloc+1], "magenta") == 0) Color = Draw_magenta;
113 else if (strcmp(a[iloc+1], "marron") == 0) Color = Draw_marron;
114 else if (strcmp(a[iloc+1], "orange") == 0) Color = Draw_orange;
115 else if (strcmp(a[iloc+1], "rose") == 0) Color = Draw_rose;
116 else if (strcmp(a[iloc+1], "saumon") == 0) Color = Draw_saumon;
117 else if (strcmp(a[iloc+1], "violet") == 0) Color = Draw_violet;
118 else if (strcmp(a[iloc+1], "jaune") == 0) Color = Draw_jaune;
119 else if (strcmp(a[iloc+1], "kaki") == 0) Color = Draw_kaki;
120 else if (strcmp(a[iloc+1], "corail") == 0) Color = Draw_corail;
124 DRAWsuppressargs(na,a,iloc,iloc+dloc);
129 if (inbr < 0 ) inbr = 2;
130 TD.DisplayNameWithGeometry(tgeo);
131 TD.DisplayNameWithOrientation(tori);
132 TD.DisplayGeometry(dori);
133 TD.NbIsos(inbr); TD.NbIsosDef(inbrdef);
136 if(col) TD.SetColor(Color);
139 //-----------------------------------------------------------------------
140 // OthersCommands_help
141 //-----------------------------------------------------------------------
143 Standard_EXPORT void OthersCommands_help(const char* CommandName, const char* syntaxe = "")
146 cout<<CommandName<<syntaxe<<endl;
147 cout<<" -p <parameter> to display the name of an edge round a point of <parameter>"<<endl;
148 cout<<" in [0,1] on edge curve range. Default value is 0.3"<<endl;
149 // cout<<" -p <par> : on edge , diplay name at t in [0..1]"<<endl;
150 cout<<" -o : display name = DBRep name + orientation"<<endl;
151 cout<<" -g : display name = DBRep name + geometry"<<endl;
152 cout<<" -O : visualize shape orientation"<<endl;
153 cout<<" -i<n> : visualize face with <n> isos"<<endl;
154 cout<<" -c <col> : display name with color col (Draw_blanc, Draw_rouge, ...)"<<endl;
155 cout<<" -tol to display vertices with a circle of radius equal to its tolerance."<<endl;
156 cout<<"example : '"<<CommandName<<" -p 0.8 e 8 9 23'"<<endl;
159 //-----------------------------------------------------------------------
160 // 0 = testtopopedraw_cdins
161 // 1,2,3,... = display shapes and visualise their names
162 //-----------------------------------------------------------------------
164 Standard_Integer testtopopedraw_cdins(Draw_Interpretor&,Standard_Integer na,const char** a)
167 const char* syntaxe = " [arg] S : display shape S with its DBRep name";
168 OthersCommands_help(a[0], syntaxe);
172 TestTopOpeDraw_Displayer TD;
173 OthersCommands_flags(na, a, TD);
176 for ( i=1;i<na;i++) {
177 const TopoDS_Shape& S = DBRep::Get(a[i]);
178 if (S.IsNull()) continue;
179 const TopAbs_ShapeEnum t = S.ShapeType();
180 if (t == TopAbs_FACE) continue;
181 if (t == TopAbs_EDGE) continue;
182 if (t == TopAbs_VERTEX) continue;
183 TD.DisplayShape(a[i],S);
187 const TopoDS_Shape& S = DBRep::Get(a[i]); if (S.IsNull()) continue;
188 const TopAbs_ShapeEnum t = S.ShapeType();
189 if (t == TopAbs_FACE) TD.DisplayShape(a[i],S);
193 const TopoDS_Shape& S = DBRep::Get(a[i]); if (S.IsNull()) continue;
194 const TopAbs_ShapeEnum t = S.ShapeType();
195 if (t == TopAbs_EDGE) TD.DisplayShape(a[i],S);
199 const TopoDS_Shape& S = DBRep::Get(a[i]); if (S.IsNull()) continue;
200 const TopAbs_ShapeEnum t = S.ShapeType();
201 if (t != TopAbs_VERTEX) continue;
203 const TopoDS_Vertex& V = TopoDS::Vertex(S);
204 Standard_Real Tol = BRep_Tool::Tolerance(V);
207 TD.DisplayShape(a[i],S);
213 static void BoopReadInitFile(Draw_Interpretor& di, const char* filename)
215 if (filename == NULL) return;
216 di.EvalFile(filename);
219 static Standard_Integer ttab(Draw_Interpretor& di, Standard_Integer /*narg*/, const char** /*a*/) {
220 char s[2000]; strcpy(s,"");
221 Sprintf(s,"%s%s",s,"proc addt {at args} {upvar $at x;set L \"\";addl L [join $args];");
222 Sprintf(s,"%s%s",s,"foreach l $L {set x([array size x]) $l}};");
227 Standard_IMPORT Draw_Color DrawTrSurf_CurveColor(const Draw_Color col);
228 Standard_IMPORT void DBRep_WriteColorOrientation ();
229 Standard_IMPORT Draw_Color DBRep_ColorOrientation (const TopAbs_Orientation Or);
231 #include <Geom2d_TrimmedCurve.hxx>
232 #include <DrawTrSurf.hxx>
233 #include <TopExp.hxx>
235 #include <TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx>
236 #include <TopTools_DataMapOfOrientedShapeInteger.hxx>
237 #include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx>
238 #include <TopTools_DataMapOfIntegerShape.hxx>
240 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
241 #include <TopExp_Explorer.hxx>
242 #include <TopoDS_Face.hxx>
243 #include <TopoDS_Edge.hxx>
244 #include <TopoDS_Vertex.hxx>
245 #include <TColStd_ListIteratorOfListOfAsciiString.hxx>
246 #include <TColStd_ListOfAsciiString.hxx>
247 #include <TestTopOpeDraw_ListOfPnt2d.hxx>
252 cvx2d(Draw_Interpretor& di) {
257 const TopoDS_Face& face() const { return myface; }
258 const TCollection_AsciiString& facename() const { return myfacename; }
260 void erasevisible() {
261 TColStd_ListIteratorOfListOfAsciiString i(myvis);
262 Standard_Boolean ya = i.More();
263 TCollection_AsciiString str = "erase";
264 for (; i.More(); i.Next()) {
265 const TCollection_AsciiString& s = i.Value();
269 TCollection_AsciiString str1 = "erase -mute;"; mypdi->Eval(str1.ToCString());
270 str = str + ";"; mypdi->Eval(str.ToCString());
275 void addvisible(const TCollection_AsciiString& N) { myvis.Append(N); }
276 void clearvisible() { myvis.Clear(); }
278 const TopoDS_Edge& edge(const Standard_Integer ie) const {
279 if ( ie >= 1 && ie <= mymapis.Extent()) {
280 const TopoDS_Edge& E = TopoDS::Edge(mymapis.Find(ie));
286 Standard_Integer nedge() const { return mymapis.Extent(); }
291 mymapsi.Clear(); mymapis.Clear(); mynemap = 0; myiemap = 1; myedgedisplayed = 0;
296 void addedge(const TopoDS_Shape& E) {
298 mymapsi.Bind(E,mynemap);
299 mymapis.Bind(mynemap,E);
302 void initface(const TopoDS_Face& F,const TCollection_AsciiString& N) {
304 myface = F; myfacename = N;
305 TopExp::MapShapesAndAncestors(myface,TopAbs_VERTEX,TopAbs_EDGE,mymapve);
307 for (e.Init(F,TopAbs_EDGE);e.More();e.Next()) addedge(e.Current());
308 // for (TopExp_Explorer e(F,TopAbs_EDGE);e.More();e.Next()) addedge(e.Current());
313 void displayface() const {
315 mypdi->Eval("info proc vx2d_displayface");
316 if (mypdi->Result()) {
317 Sprintf(s,"vx2d_displayface %s",myfacename.ToCString());
320 else cout<<"procedure vx2d_displayface non trouvee"<<endl;
323 Standard_Integer eindex(const TopoDS_Shape& E) const {
324 const Standard_Integer ie = mymapsi.Find(E);
328 void ename(const TopoDS_Shape& S,TCollection_AsciiString& ste) const {
330 if (S.ShapeType() != TopAbs_EDGE) return;
331 const TopoDS_Edge& E = TopoDS::Edge(S);
332 const Standard_Integer ie = eindex(E);
333 TopAbs_Orientation oe = E.Orientation();
334 TCollection_AsciiString stoe;TestTopOpeDraw_TTOT::OrientationToString(oe,stoe);
335 stoe = stoe.SubString(1,1);stoe.LowerCase();
336 Standard_Boolean deg = BRep_Tool::Degenerated(E);
341 void vname(const TopoDS_Shape& V, const TopoDS_Shape& E,TCollection_AsciiString& stv) const {
343 if (V.ShapeType() != TopAbs_VERTEX) return;
344 TopAbs_Orientation ov = V.Orientation();
345 TCollection_AsciiString sto;TestTopOpeDraw_TTOT::OrientationToString(ov,sto);
346 TCollection_AsciiString sto11 = sto.SubString(1,1); sto11.LowerCase();
347 const TopTools_ListOfShape& l = mymapve.FindFromKey(V);
348 Standard_Integer ne=l.Extent(); TCollection_AsciiString ste; ename(E,ste);
349 stv.Copy("v"); stv=stv+sto11+ste+"."+ne;
352 void fenames(TCollection_AsciiString& stef) const {
354 Standard_Integer i=1,n=nedge();
356 TCollection_AsciiString ste;ename(edge(i),ste);
361 Draw_Color color(const TopoDS_Shape& S) const {
362 Draw_Color col = Draw_blanc;
363 TopAbs_Orientation o = S.Orientation();
364 TopAbs_ShapeEnum t = S.ShapeType();
365 if ( t == TopAbs_VERTEX ) {
366 if ( o == TopAbs_FORWARD ) col = Draw_magenta;
367 else if ( o == TopAbs_REVERSED ) col = Draw_cyan;
368 else col = DBRep_ColorOrientation(o);
370 else if ( t == TopAbs_EDGE ) {
371 if (o == TopAbs_FORWARD) col = Draw_magenta;
372 else if (o == TopAbs_REVERSED) col = Draw_cyan;
373 else col = DBRep_ColorOrientation(o);
378 const TopTools_ListOfShape& incidentedges(const TopoDS_Shape& V) const {
379 if ( ! mymapve.Contains(V) ) return myemptylos;
380 return mymapve.FindFromKey(V);
383 void lenames(const TopTools_ListOfShape& l,TCollection_AsciiString& stel) const {
384 stel = "";Standard_Integer j = 0;
385 for (TopTools_ListIteratorOfListOfShape it(l);it.More();it.Next(),j++) {
386 if (j) stel = stel + " ";
387 TCollection_AsciiString ste; ename(it.Value(),ste);
392 void subshapename(const TCollection_AsciiString& sts,const TopAbs_ShapeEnum tss,const Standard_Integer i,TCollection_AsciiString& stss) const {
393 TCollection_AsciiString s; TestTopOpeDraw_TTOT::ShapeEnumToString(tss,s);
397 Handle(Geom2d_Curve) curve2d(const TopoDS_Edge& E) const {
398 Standard_Real f,l; const Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface(E,myface,f,l);
399 if (c.IsNull()) return c;
400 Handle(Geom2d_Curve) nc = new Geom2d_TrimmedCurve(c,f,l);
404 void printedges() const {
405 Standard_Integer n=nedge();if (!n) return;
407 TCollection_AsciiString se=(Standard_CString ) ((n==1)?" edge :":" edges :");
408 // TCollection_AsciiString se=(n==1)?" edge :":" edges :";
409 TCollection_AsciiString s;s=s+"# face "+myfacename+" : "+n+se;
410 TCollection_AsciiString sb(s.Length()-1,' ');
412 for (Standard_Integer i=1;i<=n;i++) {
413 TCollection_AsciiString stei;ename(edge(i),stei);cout<<" "<<stei;
414 if ((i>1) && (i%4 == 0) && (i<n)) cout<<endl<<"#"<<sb;
420 Standard_Integer displayface(const TopoDS_Shape& S, const TCollection_AsciiString& sta);
421 Standard_Integer displayedge(const TopoDS_Shape& S);
423 void initedgeiter() { myiemap = 1; }
424 Standard_Boolean moreedgeiter() const { return myiemap <= mynemap; }
425 void nextedgeiter(const Standard_Integer incr = +1);
426 Standard_Integer curredgeiter() const { return myiemap; }
427 void setcurredgeiter(const Standard_Integer i) { if (i>=1 &&i<=mynemap) myiemap = i; }
428 Standard_Integer edgedisplayed() const { return myedgedisplayed; }
429 void setedgedisplayed(const Standard_Integer i) { if (i>=1 &&i<=mynemap) myedgedisplayed = i; }
431 TopoDS_Face myface; TCollection_AsciiString myfacename;
432 TColStd_ListOfAsciiString myvis;
433 TopTools_IndexedDataMapOfShapeListOfShape mymapve;
435 TopTools_DataMapOfOrientedShapeInteger mymapsi;
436 TopTools_DataMapOfIntegerShape mymapis;
437 Standard_Integer mynemap;
438 Standard_Integer myiemap;
439 Standard_Integer myedgedisplayed;
441 Draw_Interpretor* mypdi;
442 TopoDS_Edge myemptyedge;
443 TopTools_ListOfShape myemptylos;
446 void cvx2d::nextedgeiter(const Standard_Integer incr)
448 if (!moreedgeiter()) return;
450 if (myiemap>mynemap) myiemap = 1;
451 else if (myiemap<1) myiemap = mynemap;
454 Standard_Integer cvx2d::displayface(const TopoDS_Shape& S, const TCollection_AsciiString& sta) {
455 TopoDS_Shape aLocalShape = S.Oriented(TopAbs_FORWARD) ;
456 TopoDS_Face F = TopoDS::Face(aLocalShape);
457 // TopoDS_Face F = TopoDS::Face(S.Oriented(TopAbs_FORWARD));
458 Standard_Boolean init = Standard_True;
459 if (init) initface(F,sta);
465 Standard_Integer cvx2d::displayedge(const TopoDS_Shape& S) {
466 if (S.IsNull()) return 0;
467 const TopoDS_Edge& E = TopoDS::Edge(S);
468 const TopoDS_Face& F = face();
469 if (F.IsNull()) return 0;
471 Draw_Color savecol = DrawTrSurf_CurveColor(Draw_Color(Draw_rouge));
473 Standard_Real u,v,V,U;BRepTools::UVBounds(F,E,u,U,v,V);
474 Standard_Boolean deg = BRep_Tool::Degenerated(E);
475 gp_Pnt2d pe1(u,v);gp_Pnt2d pe2(U,V);
476 gp_Pnt2d p1,p2;BRep_Tool::UVPoints(E,F,p1,p2);
477 TopoDS_Vertex v1,v2; TopExp::Vertices(E,v1,v2);
478 gp_Pnt P1 = BRep_Tool::Pnt(v1);
479 gp_Pnt P2 = BRep_Tool::Pnt(v2);
480 Standard_Real v1v2 = P1.Distance(P2);
481 Standard_Real tole = BRep_Tool::Tolerance(E);
482 Standard_Real tol1 = BRep_Tool::Tolerance(v1);
483 Standard_Real tol2 = BRep_Tool::Tolerance(v2);
484 const TopTools_ListOfShape& l1 = incidentedges(v1);
485 const TopTools_ListOfShape& l2 = incidentedges(v2);
486 Handle(Geom2d_Curve) c2d = curve2d(E);
490 TCollection_AsciiString ste,stc,sv1,sv1a,sv2,sv2a,ste1,ste2;
493 stc = "c"; stc = stc + ste;
494 vname(v1,E,sv1); sv1a = "V"; sv1a = sv1a + sv1;
495 vname(v2,E,sv2); sv2a = "V"; sv2a = sv2a + sv2;
500 Sprintf(stol,"%g",tole);
501 cout<<"# "<<ste<<" : tole "<<stol<<" : uv "<<pe1.X()<<" "<<pe1.Y()<<" UV "<<pe2.X()<<" "<<pe2.Y();
503 Sprintf(stol,"%g",tol1);
504 cout<<"# "<<sv1<<" : tol1 "<<stol<<" : uv "<<p1.X()<<" "<<p1.Y()<<" : edges "<<ste1;
506 Sprintf(stol,"%g",tol2);
507 cout<<"# "<<sv2<<" : tol2 "<<stol<<" : uv "<<p2.X()<<" "<<p2.Y()<<" : edges "<<ste2;
509 Sprintf(stol,"%g",v1v2); cout<<"# v1v2 = "<<stol;
514 TestTopOpeDraw_C2DDisplayer TDC2D;
515 TestTopOpeDraw_P2DDisplayer TDP2D;
516 TestTopOpeDraw_Displayer TD;
518 TDC2D.AllColors(color(E)); TDC2D.DisplayC2D(stc,ste,c2d);
519 TDP2D.AllColors(color(v1));TDP2D.DisplayP2D(sv1,p1);
520 TDP2D.AllColors(color(v2));TDP2D.DisplayP2D(sv2,p2);
521 TD.AllColors(color(E));TD.DisplayShape(ste,ste,E);
523 TD.AllColors(color(v1));TD.DisplayShape(sv1a,sv1,v1);
524 TD.AllColors(color(v2));TD.DisplayShape(sv2a,sv2,v2);
527 TD.AllColors(Draw_Color(Draw_blanc));TD.DisplayShape(sv1a,"",v1);
535 Standard_Integer ie = eindex(E);
537 setedgedisplayed(ie);
539 DrawTrSurf_CurveColor(savecol);
543 //=======================================================================
545 //=======================================================================
546 Standard_Integer vx2d(Draw_Interpretor& di, Standard_Integer na, const char** a)
548 static cvx2d *pv2d = NULL;
549 #define ISINTEGER(MMstr) ((strspn((MMstr),"0123456789") == strlen((MMstr))))
551 BoopReadInitFile(di,"vx2d.tcl");
552 if (na < 2) return 0;
553 if (pv2d == NULL) pv2d = (cvx2d*) new cvx2d(di);
555 Standard_Integer dostep = 0;Standard_Integer doiedge= 0;
556 for(Standard_Integer ia=1;ia<na;ia++) {
557 if (!strcasecmp(a[1],"-n")) { dostep=+1; DRAWsuppressarg(na,a,ia); }
558 else if(!strcasecmp(a[1],"-p")) { dostep=-1; DRAWsuppressarg(na,a,ia); }
559 else if (ISINTEGER(a[1])) { doiedge=Draw::Atoi(a[1]); DRAWsuppressarg(na,a,ia); }
563 if (pv2d->edgedisplayed()) pv2d->nextedgeiter(dostep);
564 if (pv2d->moreedgeiter()) pv2d->displayedge(pv2d->edge(pv2d->curredgeiter()));
568 pv2d->setcurredgeiter(doiedge);
569 if (pv2d->moreedgeiter()) pv2d->displayedge(pv2d->edge(pv2d->curredgeiter()));
573 TopoDS_Shape S = DBRep::Get(a[1]); if (S.IsNull()) return 0;
574 TCollection_AsciiString sta1(a[1]); TopAbs_ShapeEnum t = S.ShapeType();
575 TopAbs_ShapeEnum tt = ( t == TopAbs_FACE) ? TopAbs_EDGE : TopAbs_FACE;
577 Standard_Integer iearg = (na >= 3) ? Draw::Atoi(a[2]) : 0;
578 TCollection_AsciiString stss; Standard_Integer i = 1;
580 for (ex.Init(S,tt);ex.More();ex.Next(),i++) {
581 // for (TopExp_Explorer ex(S,tt);ex.More();ex.Next(),i++) {
582 Standard_Boolean cond = Standard_False;
583 cond = cond || (!iearg);
584 cond = cond || (iearg && (iearg == i));
586 pv2d->subshapename(sta1,tt,i,stss);
587 DBRep::Set(stss.ToCString(),ex.Current());
588 di<<"vx2d "<<stss.ToCString()<<"\n";
593 Standard_Integer r = 0;
594 if (t == TopAbs_FACE) r = pv2d->displayface(S,sta1);
595 else if (t == TopAbs_EDGE) r = pv2d->displayedge(S);
599 //=======================================================================
600 //function : OtherCommands
602 //=======================================================================
604 void TestTopOpeDraw::OtherCommands(Draw_Interpretor& theCommands)
606 const char* g = "Topological Operation other commands";
607 theCommands.Add("cdinp","cdinp p x y z",__FILE__,testtopopedraw_cdinp,g);
608 theCommands.Add("cdins","cdins s1 ... ",__FILE__,testtopopedraw_cdins,g);
609 theCommands.Add("vx2d","vx2d f",__FILE__,vx2d,g);
610 BoopReadInitFile(theCommands,getenv("BOOPGLOB"));
611 theCommands.Add("ttab","",__FILE__,ttab,g);