1 // Created on: 1996-02-02
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
25 #include <TestTopOpeDraw.hxx>
26 #include <TestTopOpeDraw_Displayer.hxx>
27 #include <TestTopOpeDraw_TTOT.hxx>
29 #include <BRepTools.hxx>
30 #include <BRep_Tool.hxx>
31 #include <Draw_Interpretor.hxx>
32 #include <Draw_Appli.hxx>
33 #include <TopOpeBRepTool_define.hxx>
39 //-----------------------------------------------------------------------
40 // 0 = testtopopedraw_cdinp
41 // 1,2,3,4 = display point p of coords x y z
42 //-----------------------------------------------------------------------
43 Standard_Integer testtopopedraw_cdinp(Draw_Interpretor&,Standard_Integer na,const char** a)
45 if ( na < 5 ) return 0;
46 TestTopOpeDraw_P3DDisplayer PD(a[1],Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4]));
50 //-----------------------------------------------------------------------
51 // DRAWsuppressarg : remove a[d], modify na--
52 //-----------------------------------------------------------------------
53 Standard_EXPORT void DRAWsuppressarg(Standard_Integer& na,const char** a,const Standard_Integer d)
55 for(Standard_Integer i=d;i<na;i++) {
62 //-----------------------------------------------------------------------
63 // DRAWsuppressargs : remove a[*] from <f> to <l>, modify na = na - (l - f)
64 //-----------------------------------------------------------------------
65 Standard_EXPORT void DRAWsuppressargs(Standard_Integer& na,const char** a,const Standard_Integer f,const Standard_Integer l)
68 DRAWsuppressarg(na,a,l);
70 for(Standard_Integer i=0;i<na-l;i++) {
77 //-----------------------------------------------------------------------
78 void OthersCommands_flags(Standard_Integer& na,const char** a,TestTopOpeDraw_Displayer& TD)
79 //-----------------------------------------------------------------------
81 Standard_Integer i,j,l,dloc = 0,iloc,decal = 0, NbArg = na;
82 Standard_Boolean dori = Standard_False; // display orientation
83 Standard_Boolean tgeo = Standard_False; // name with geometry
84 Standard_Boolean tori = Standard_False; // name with orientation
85 Standard_Real tpar = -1.0;
86 Standard_Integer inbr = 2; Standard_Boolean inbrdef = Standard_False;
87 Standard_Boolean col = Standard_False; // display specific color
88 Standard_Boolean tolflag = Standard_False;
90 for (i=1; i<NbArg; i++) {
93 if (a[iloc][0] == '-') {
96 if (a[iloc][j] == 'g') tgeo=Standard_True;
97 else if(!strcmp(a[iloc],"-tol")) tolflag = Standard_True;
98 else if(a[iloc][j] == 'o') tori=Standard_True;
99 else if(a[iloc][j] == 'O') dori=Standard_True;
100 else if(a[iloc][j] == 'i') {
102 char sis[40]; sis[0] = '\0';
103 Standard_Integer kk = 0, k = j+1;
104 for (; k<l; k++,kk++,sis[kk] = '\0' ) sis[kk] = a[iloc][k];
105 inbr = Draw::Atoi(sis);
106 inbrdef = Standard_True;
109 else if(a[iloc][j] == 'p') {
111 tpar = Draw::Atof(a[iloc+1]);
115 else if(a[iloc][j] == 'c') {
117 if(strcmp(a[iloc+1], "blanc") == 0) Color = Draw_blanc;
118 else if (strcmp(a[iloc+1], "rouge") == 0) Color = Draw_rouge;
119 else if (strcmp(a[iloc+1], "vert") == 0) Color = Draw_vert;
120 else if (strcmp(a[iloc+1], "bleu") == 0) Color = Draw_bleu;
121 else if (strcmp(a[iloc+1], "cyan") == 0) Color = Draw_cyan;
122 else if (strcmp(a[iloc+1], "or") == 0) Color = Draw_or;
123 else if (strcmp(a[iloc+1], "magenta") == 0) Color = Draw_magenta;
124 else if (strcmp(a[iloc+1], "marron") == 0) Color = Draw_marron;
125 else if (strcmp(a[iloc+1], "orange") == 0) Color = Draw_orange;
126 else if (strcmp(a[iloc+1], "rose") == 0) Color = Draw_rose;
127 else if (strcmp(a[iloc+1], "saumon") == 0) Color = Draw_saumon;
128 else if (strcmp(a[iloc+1], "violet") == 0) Color = Draw_violet;
129 else if (strcmp(a[iloc+1], "jaune") == 0) Color = Draw_jaune;
130 else if (strcmp(a[iloc+1], "kaki") == 0) Color = Draw_kaki;
131 else if (strcmp(a[iloc+1], "corail") == 0) Color = Draw_corail;
135 DRAWsuppressargs(na,a,iloc,iloc+dloc);
140 if (inbr < 0 ) inbr = 2;
141 TD.DisplayNameWithGeometry(tgeo);
142 TD.DisplayNameWithOrientation(tori);
143 TD.DisplayGeometry(dori);
144 TD.NbIsos(inbr); TD.NbIsosDef(inbrdef);
147 if(col) TD.SetColor(Color);
150 //-----------------------------------------------------------------------
151 // OthersCommands_help
152 //-----------------------------------------------------------------------
154 Standard_EXPORT void OthersCommands_help(const char* CommandName, const char* syntaxe = "")
157 cout<<CommandName<<syntaxe<<endl;
158 cout<<" -p <parameter> to display the name of an edge round a point of <parameter>"<<endl;
159 cout<<" in [0,1] on edge curve range. Default value is 0.3"<<endl;
160 // cout<<" -p <par> : on edge , diplay name at t in [0..1]"<<endl;
161 cout<<" -o : display name = DBRep name + orientation"<<endl;
162 cout<<" -g : display name = DBRep name + geometry"<<endl;
163 cout<<" -O : visualize shape orientation"<<endl;
164 cout<<" -i<n> : visualize face with <n> isos"<<endl;
165 cout<<" -c <col> : display name with color col (Draw_blanc, Draw_rouge, ...)"<<endl;
166 cout<<" -tol to display vertices with a circle of radius equal to its tolerance."<<endl;
167 cout<<"example : '"<<CommandName<<" -p 0.8 e 8 9 23'"<<endl;
170 //-----------------------------------------------------------------------
171 // 0 = testtopopedraw_cdins
172 // 1,2,3,... = display shapes and visualise their names
173 //-----------------------------------------------------------------------
175 Standard_Integer testtopopedraw_cdins(Draw_Interpretor&,Standard_Integer na,const char** a)
178 const char* syntaxe = " [arg] S : display shape S with its DBRep name";
179 OthersCommands_help(a[0], syntaxe);
183 TestTopOpeDraw_Displayer TD;
184 OthersCommands_flags(na, a, TD);
187 for ( i=1;i<na;i++) {
188 const TopoDS_Shape& S = DBRep::Get(a[i]);
189 if (S.IsNull()) continue;
190 const TopAbs_ShapeEnum t = S.ShapeType();
191 if (t == TopAbs_FACE) continue;
192 if (t == TopAbs_EDGE) continue;
193 if (t == TopAbs_VERTEX) continue;
194 TD.DisplayShape(a[i],S);
198 const TopoDS_Shape& S = DBRep::Get(a[i]); if (S.IsNull()) continue;
199 const TopAbs_ShapeEnum t = S.ShapeType();
200 if (t == TopAbs_FACE) TD.DisplayShape(a[i],S);
204 const TopoDS_Shape& S = DBRep::Get(a[i]); if (S.IsNull()) continue;
205 const TopAbs_ShapeEnum t = S.ShapeType();
206 if (t == TopAbs_EDGE) TD.DisplayShape(a[i],S);
210 const TopoDS_Shape& S = DBRep::Get(a[i]); if (S.IsNull()) continue;
211 const TopAbs_ShapeEnum t = S.ShapeType();
212 if (t != TopAbs_VERTEX) continue;
214 const TopoDS_Vertex& V = TopoDS::Vertex(S);
215 Standard_Real Tol = BRep_Tool::Tolerance(V);
218 TD.DisplayShape(a[i],S);
224 static void BoopReadInitFile(Draw_Interpretor& di, const char* filename)
226 if (filename == NULL) return;
227 di.EvalFile(filename);
230 static Standard_Integer ttab(Draw_Interpretor& di, Standard_Integer narg, const char** a) {
231 char s[2000]; strcpy(s,"");
232 Sprintf(s,"%s%s",s,"proc addt {at args} {upvar $at x;set L \"\";addl L [join $args];");
233 Sprintf(s,"%s%s",s,"foreach l $L {set x([array size x]) $l}};");
238 Standard_IMPORT Draw_Color DrawTrSurf_CurveColor(const Draw_Color col);
239 Standard_IMPORT void DBRep_WriteColorOrientation ();
240 Standard_IMPORT Draw_Color DBRep_ColorOrientation (const TopAbs_Orientation Or);
242 #include <Geom2d_TrimmedCurve.hxx>
243 #include <DrawTrSurf.hxx>
244 #include <TopExp.hxx>
246 #include <TopTools_DataMapIteratorOfDataMapOfOrientedShapeInteger.hxx>
247 #include <TopTools_DataMapOfOrientedShapeInteger.hxx>
248 #include <TopTools_DataMapIteratorOfDataMapOfIntegerShape.hxx>
249 #include <TopTools_DataMapOfIntegerShape.hxx>
251 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
252 #include <TopExp_Explorer.hxx>
253 #include <TopoDS_Face.hxx>
254 #include <TopoDS_Edge.hxx>
255 #include <TopoDS_Vertex.hxx>
256 #include <TColStd_ListIteratorOfListOfAsciiString.hxx>
257 #include <TColStd_ListOfAsciiString.hxx>
258 #include <TestTopOpeDraw_ListOfPnt2d.hxx>
263 cvx2d(Draw_Interpretor& di) {
268 const TopoDS_Face& face() const { return myface; }
269 const TCollection_AsciiString& facename() const { return myfacename; }
271 void erasevisible() {
272 TColStd_ListIteratorOfListOfAsciiString i(myvis);
273 Standard_Boolean ya = i.More();
274 TCollection_AsciiString str = "erase";
275 for (; i.More(); i.Next()) {
276 const TCollection_AsciiString& s = i.Value();
280 TCollection_AsciiString str1 = "erase -mute;"; mypdi->Eval(str1.ToCString());
281 str = str + ";"; mypdi->Eval(str.ToCString());
286 void addvisible(const TCollection_AsciiString& N) { myvis.Append(N); }
287 void clearvisible() { myvis.Clear(); }
289 const TopoDS_Edge& edge(const Standard_Integer ie) const {
290 if ( ie >= 1 && ie <= mymapis.Extent()) {
291 const TopoDS_Edge& E = TopoDS::Edge(mymapis.Find(ie));
297 Standard_Integer nedge() const { return mymapis.Extent(); }
302 mymapsi.Clear(); mymapis.Clear(); mynemap = 0; myiemap = 1; myedgedisplayed = 0;
307 void addedge(const TopoDS_Shape& E) {
309 mymapsi.Bind(E,mynemap);
310 mymapis.Bind(mynemap,E);
313 void initface(const TopoDS_Face& F,const TCollection_AsciiString& N) {
315 myface = F; myfacename = N;
316 TopExp::MapShapesAndAncestors(myface,TopAbs_VERTEX,TopAbs_EDGE,mymapve);
318 for (e.Init(F,TopAbs_EDGE);e.More();e.Next()) addedge(e.Current());
319 // for (TopExp_Explorer e(F,TopAbs_EDGE);e.More();e.Next()) addedge(e.Current());
324 void displayface() const {
326 mypdi->Eval("info proc vx2d_displayface");
327 if (mypdi->Result()) {
328 Sprintf(s,"vx2d_displayface %s",myfacename.ToCString());
331 else cout<<"procedure vx2d_displayface non trouvee"<<endl;
334 Standard_Integer eindex(const TopoDS_Shape& E) const {
335 const Standard_Integer ie = mymapsi.Find(E);
339 void ename(const TopoDS_Shape& S,TCollection_AsciiString& ste) const {
341 if (S.ShapeType() != TopAbs_EDGE) return;
342 const TopoDS_Edge& E = TopoDS::Edge(S);
343 const Standard_Integer ie = eindex(E);
344 TopAbs_Orientation oe = E.Orientation();
345 TCollection_AsciiString stoe;TestTopOpeDraw_TTOT::OrientationToString(oe,stoe);
346 stoe = stoe.SubString(1,1);stoe.LowerCase();
347 Standard_Boolean deg = BRep_Tool::Degenerated(E);
352 void vname(const TopoDS_Shape& V, const TopoDS_Shape& E,TCollection_AsciiString& stv) const {
354 if (V.ShapeType() != TopAbs_VERTEX) return;
355 TopAbs_Orientation ov = V.Orientation();
356 TCollection_AsciiString sto;TestTopOpeDraw_TTOT::OrientationToString(ov,sto);
357 TCollection_AsciiString sto11 = sto.SubString(1,1); sto11.LowerCase();
358 const TopTools_ListOfShape& l = mymapve.FindFromKey(V);
359 Standard_Integer ne=l.Extent(); TCollection_AsciiString ste; ename(E,ste);
360 stv.Copy("v"); stv=stv+sto11+ste+"."+ne;
363 void fenames(TCollection_AsciiString& stef) const {
365 Standard_Integer i=1,n=nedge();
367 TCollection_AsciiString ste;ename(edge(i),ste);
372 Draw_Color color(const TopoDS_Shape& S) const {
373 Draw_Color col = Draw_blanc;
374 TopAbs_Orientation o = S.Orientation();
375 TopAbs_ShapeEnum t = S.ShapeType();
376 if ( t == TopAbs_VERTEX ) {
377 if ( o == TopAbs_FORWARD ) col = Draw_magenta;
378 else if ( o == TopAbs_REVERSED ) col = Draw_cyan;
379 else col = DBRep_ColorOrientation(o);
381 else if ( t == TopAbs_EDGE ) {
382 if (o == TopAbs_FORWARD) col = Draw_magenta;
383 else if (o == TopAbs_REVERSED) col = Draw_cyan;
384 else col = DBRep_ColorOrientation(o);
389 const TopTools_ListOfShape& incidentedges(const TopoDS_Shape& V) const {
390 if ( ! mymapve.Contains(V) ) return myemptylos;
391 return mymapve.FindFromKey(V);
394 void lenames(const TopTools_ListOfShape& l,TCollection_AsciiString& stel) const {
395 stel = "";Standard_Integer j = 0;
396 for (TopTools_ListIteratorOfListOfShape it(l);it.More();it.Next(),j++) {
397 if (j) stel = stel + " ";
398 TCollection_AsciiString ste; ename(it.Value(),ste);
403 void subshapename(const TCollection_AsciiString& sts,const TopAbs_ShapeEnum tss,const Standard_Integer i,TCollection_AsciiString& stss) const {
404 TCollection_AsciiString s; TestTopOpeDraw_TTOT::ShapeEnumToString(tss,s);
408 Handle(Geom2d_Curve) curve2d(const TopoDS_Edge& E) const {
409 Standard_Real f,l; const Handle(Geom2d_Curve) c = BRep_Tool::CurveOnSurface(E,myface,f,l);
410 if (c.IsNull()) return c;
411 Handle(Geom2d_Curve) nc = new Geom2d_TrimmedCurve(c,f,l);
415 void printedges() const {
416 Standard_Integer n=nedge();if (!n) return;
418 TCollection_AsciiString se=(Standard_CString ) ((n==1)?" edge :":" edges :");
419 // TCollection_AsciiString se=(n==1)?" edge :":" edges :";
420 TCollection_AsciiString s;s=s+"# face "+myfacename+" : "+n+se;
421 TCollection_AsciiString sb(s.Length()-1,' ');
423 for (Standard_Integer i=1;i<=n;i++) {
424 TCollection_AsciiString stei;ename(edge(i),stei);cout<<" "<<stei;
425 if ((i>1) && (i%4 == 0) && (i<n)) cout<<endl<<"#"<<sb;
431 Standard_Integer displayface(const TopoDS_Shape& S, const TCollection_AsciiString& sta);
432 Standard_Integer displayedge(const TopoDS_Shape& S);
434 void initedgeiter() { myiemap = 1; }
435 Standard_Boolean moreedgeiter() const { return myiemap <= mynemap; }
436 void nextedgeiter(const Standard_Integer incr = +1);
437 Standard_Integer curredgeiter() const { return myiemap; }
438 void setcurredgeiter(const Standard_Integer i) { if (i>=1 &&i<=mynemap) myiemap = i; }
439 Standard_Integer edgedisplayed() const { return myedgedisplayed; }
440 void setedgedisplayed(const Standard_Integer i) { if (i>=1 &&i<=mynemap) myedgedisplayed = i; }
442 TopoDS_Face myface; TCollection_AsciiString myfacename;
443 TColStd_ListOfAsciiString myvis;
444 TopTools_IndexedDataMapOfShapeListOfShape mymapve;
446 TopTools_DataMapOfOrientedShapeInteger mymapsi;
447 TopTools_DataMapOfIntegerShape mymapis;
448 Standard_Integer mynemap;
449 Standard_Integer myiemap;
450 Standard_Integer myedgedisplayed;
452 Draw_Interpretor* mypdi;
453 TopoDS_Edge myemptyedge;
454 TopTools_ListOfShape myemptylos;
457 void cvx2d::nextedgeiter(const Standard_Integer incr)
459 if (!moreedgeiter()) return;
461 if (myiemap>mynemap) myiemap = 1;
462 else if (myiemap<1) myiemap = mynemap;
465 Standard_Integer cvx2d::displayface(const TopoDS_Shape& S, const TCollection_AsciiString& sta) {
466 TopoDS_Shape aLocalShape = S.Oriented(TopAbs_FORWARD) ;
467 TopoDS_Face F = TopoDS::Face(aLocalShape);
468 // TopoDS_Face F = TopoDS::Face(S.Oriented(TopAbs_FORWARD));
469 Standard_Boolean init = Standard_True;
470 if (init) initface(F,sta);
476 Standard_Integer cvx2d::displayedge(const TopoDS_Shape& S) {
477 if (S.IsNull()) return 0;
478 const TopoDS_Edge& E = TopoDS::Edge(S);
479 const TopoDS_Face& F = face();
480 if (F.IsNull()) return 0;
482 Draw_Color savecol = DrawTrSurf_CurveColor(Draw_Color(Draw_rouge));
484 Standard_Real u,v,V,U;BRepTools::UVBounds(F,E,u,U,v,V);
485 Standard_Boolean deg = BRep_Tool::Degenerated(E);
486 gp_Pnt2d pe1(u,v);gp_Pnt2d pe2(U,V);
487 gp_Pnt2d p1,p2;BRep_Tool::UVPoints(E,F,p1,p2);
488 TopoDS_Vertex v1,v2; TopExp::Vertices(E,v1,v2);
489 gp_Pnt P1 = BRep_Tool::Pnt(v1);
490 gp_Pnt P2 = BRep_Tool::Pnt(v2);
491 Standard_Real v1v2 = P1.Distance(P2);
492 Standard_Real tole = BRep_Tool::Tolerance(E);
493 Standard_Real tol1 = BRep_Tool::Tolerance(v1);
494 Standard_Real tol2 = BRep_Tool::Tolerance(v2);
495 const TopTools_ListOfShape& l1 = incidentedges(v1);
496 const TopTools_ListOfShape& l2 = incidentedges(v2);
497 Handle(Geom2d_Curve) c2d = curve2d(E);
501 TCollection_AsciiString ste,stc,sv1,sv1a,sv2,sv2a,ste1,ste2;
504 stc = "c"; stc = stc + ste;
505 vname(v1,E,sv1); sv1a = "V"; sv1a = sv1a + sv1;
506 vname(v2,E,sv2); sv2a = "V"; sv2a = sv2a + sv2;
511 Sprintf(stol,"%g",tole);
512 cout<<"# "<<ste<<" : tole "<<stol<<" : uv "<<pe1.X()<<" "<<pe1.Y()<<" UV "<<pe2.X()<<" "<<pe2.Y();
514 Sprintf(stol,"%g",tol1);
515 cout<<"# "<<sv1<<" : tol1 "<<stol<<" : uv "<<p1.X()<<" "<<p1.Y()<<" : edges "<<ste1;
517 Sprintf(stol,"%g",tol2);
518 cout<<"# "<<sv2<<" : tol2 "<<stol<<" : uv "<<p2.X()<<" "<<p2.Y()<<" : edges "<<ste2;
520 Sprintf(stol,"%g",v1v2); cout<<"# v1v2 = "<<stol;
525 TestTopOpeDraw_C2DDisplayer TDC2D;
526 TestTopOpeDraw_P2DDisplayer TDP2D;
527 TestTopOpeDraw_Displayer TD;
529 TDC2D.AllColors(color(E)); TDC2D.DisplayC2D(stc,ste,c2d);
530 TDP2D.AllColors(color(v1));TDP2D.DisplayP2D(sv1,p1);
531 TDP2D.AllColors(color(v2));TDP2D.DisplayP2D(sv2,p2);
532 TD.AllColors(color(E));TD.DisplayShape(ste,ste,E);
534 TD.AllColors(color(v1));TD.DisplayShape(sv1a,sv1,v1);
535 TD.AllColors(color(v2));TD.DisplayShape(sv2a,sv2,v2);
538 TD.AllColors(Draw_Color(Draw_blanc));TD.DisplayShape(sv1a,"",v1);
546 Standard_Integer ie = eindex(E);
548 setedgedisplayed(ie);
550 DrawTrSurf_CurveColor(savecol);
554 //=======================================================================
556 //=======================================================================
557 Standard_Integer vx2d(Draw_Interpretor& di, Standard_Integer na, const char** a)
559 static cvx2d *pv2d = NULL;
560 #define ISINTEGER(MMstr) ((strspn((MMstr),"0123456789") == strlen((MMstr))))
562 BoopReadInitFile(di,"vx2d.tcl");
563 if (na < 2) return 0;
564 if (pv2d == NULL) pv2d = (cvx2d*) new cvx2d(di);
566 Standard_Integer dostep = 0;Standard_Integer doiedge= 0;
567 for(Standard_Integer ia=1;ia<na;ia++) {
568 if (!strcasecmp(a[1],"-n")) { dostep=+1; DRAWsuppressarg(na,a,ia); }
569 else if(!strcasecmp(a[1],"-p")) { dostep=-1; DRAWsuppressarg(na,a,ia); }
570 else if (ISINTEGER(a[1])) { doiedge=Draw::Atoi(a[1]); DRAWsuppressarg(na,a,ia); }
574 if (pv2d->edgedisplayed()) pv2d->nextedgeiter(dostep);
575 if (pv2d->moreedgeiter()) pv2d->displayedge(pv2d->edge(pv2d->curredgeiter()));
579 pv2d->setcurredgeiter(doiedge);
580 if (pv2d->moreedgeiter()) pv2d->displayedge(pv2d->edge(pv2d->curredgeiter()));
584 TopoDS_Shape S = DBRep::Get(a[1]); if (S.IsNull()) return 0;
585 TCollection_AsciiString sta1(a[1]); TopAbs_ShapeEnum t = S.ShapeType();
586 TopAbs_ShapeEnum tt = ( t == TopAbs_FACE) ? TopAbs_EDGE : TopAbs_FACE;
588 Standard_Integer iearg = (na >= 3) ? Draw::Atoi(a[2]) : 0;
589 TCollection_AsciiString stss; Standard_Integer i = 1;
591 for (ex.Init(S,tt);ex.More();ex.Next(),i++) {
592 // for (TopExp_Explorer ex(S,tt);ex.More();ex.Next(),i++) {
593 Standard_Boolean cond = Standard_False;
594 cond = cond || (!iearg);
595 cond = cond || (iearg && (iearg == i));
597 pv2d->subshapename(sta1,tt,i,stss);
598 DBRep::Set(stss.ToCString(),ex.Current());
599 di<<"vx2d "<<stss.ToCString()<<"\n";
604 Standard_Integer r = 0;
605 if (t == TopAbs_FACE) r = pv2d->displayface(S,sta1);
606 else if (t == TopAbs_EDGE) r = pv2d->displayedge(S);
610 //=======================================================================
611 //function : OtherCommands
613 //=======================================================================
615 void TestTopOpeDraw::OtherCommands(Draw_Interpretor& theCommands)
617 const char* g = "Topological Operation other commands";
618 theCommands.Add("cdinp","cdinp p x y z",__FILE__,testtopopedraw_cdinp,g);
619 theCommands.Add("cdins","cdins s1 ... ",__FILE__,testtopopedraw_cdins,g);
620 theCommands.Add("vx2d","vx2d f",__FILE__,vx2d,g);
621 BoopReadInitFile(theCommands,getenv("BOOPGLOB"));
622 theCommands.Add("ttab","",__FILE__,ttab,g);