From: jgv Date: Tue, 20 Jul 2021 16:33:25 +0000 (+0300) Subject: 0032488: Repack toolkit TKDraw to avoid possible cyclic dependency X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR32488;p=occt-copy.git 0032488: Repack toolkit TKDraw to avoid possible cyclic dependency First version --- diff --git a/adm/MODULES b/adm/MODULES index 724bf81776..77b81cd911 100644 --- a/adm/MODULES +++ b/adm/MODULES @@ -4,4 +4,4 @@ ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffs Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF DataExchange TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh -Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE +Draw TKDrawBase TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE diff --git a/adm/UDLIST b/adm/UDLIST index f5d2176244..008763fabf 100644 --- a/adm/UDLIST +++ b/adm/UDLIST @@ -415,6 +415,7 @@ n XSDRAWSTEP n XSDRAWSTLVRML r DrawResources t TKDCAF +t TKDrawBase t TKDraw t TKTObjDRAW t TKTopTest diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 8e7e90943b..5b487ccc7b 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -50,7 +50,7 @@ #include // memory management #ifdef _WIN32 -extern Draw_Viewer dout; +Standard_IMPORT Draw_Viewer dout; #endif #define Characters(IArg) (strspn (Arg[IArg], "0123456789.+-eE") != strlen (Arg[IArg])) diff --git a/src/DBRep/DBRep_DrawableShape.cxx b/src/DBRep/DBRep_DrawableShape.cxx index b5d661fda8..b2299decc3 100644 --- a/src/DBRep/DBRep_DrawableShape.cxx +++ b/src/DBRep/DBRep_DrawableShape.cxx @@ -74,7 +74,7 @@ static Standard_Integer PlotCount = 0; // PlotEdge and PlotIso for cases of " static TopoDS_Shape pickshape; static Standard_Real upick,vpick; #ifdef _WIN32 -extern Draw_Viewer dout; +Standard_IMPORT Draw_Viewer dout; #endif //======================================================================= diff --git a/src/Draw/Draw.cxx b/src/Draw/Draw.cxx index 957aec927a..eb89431594 100644 --- a/src/Draw/Draw.cxx +++ b/src/Draw/Draw.cxx @@ -989,3 +989,37 @@ Standard_Boolean Draw::ParseOnOffNoIterator (Standard_Integer theArgsNb, Standard_Boolean isOn = Draw::ParseOnOffIterator (theArgsNb, theArgVec, theArgIter); return toReverse ? !isOn : isOn; } + +//======================================================================= +//function : Set +//purpose : point +//======================================================================= +void Draw::Set (const Standard_CString theName, + const gp_Pnt& thePoint) +{ + Draw_PntParams& aParams = PntParameters(); + Handle(Draw_Point) aDrawPoint = new Draw_Point (thePoint, aParams.PntMarker, aParams.PntColor); + Draw::Set (theName, aDrawPoint); +} + +//======================================================================= +//function : Set +//purpose : point +//======================================================================= +void Draw::Set (const Standard_CString theName, + const gp_Pnt2d& thePoint) +{ + Draw_PntParams& aParams = PntParameters(); + Handle(Draw_Point) aDrawPoint = new Draw_Point (thePoint, aParams.PntMarker, aParams.PntColor); + Draw::Set (theName, aDrawPoint); +} + +//======================================================================= +//function : PntParameters +//purpose : +//======================================================================= +Draw_PntParams& Draw::PntParameters() +{ + static Draw_PntParams aParams; + return aParams; +} diff --git a/src/Draw/Draw.hxx b/src/Draw/Draw.hxx index 338682bc4a..0d7c57943e 100644 --- a/src/Draw/Draw.hxx +++ b/src/Draw/Draw.hxx @@ -18,6 +18,8 @@ #define _Draw_HeaderFile #include +#include +#include #include #include #include @@ -58,6 +60,17 @@ public: //! @name Tcl variables management tools //! Sets a numeric variable. Standard_EXPORT static void Set (const Standard_CString Name, const Standard_Real val); + //! Sets in the variable . Overwrite the + //! variable if already set. + Standard_EXPORT static void Set (const Standard_CString Name, const gp_Pnt& G); + + //! Sets in the variable . Overwrite the + //! variable if already set. + Standard_EXPORT static void Set (const Standard_CString Name, const gp_Pnt2d& G); + + //! Return global parameters for points. + Standard_EXPORT static Draw_PntParams& PntParameters(); + //! Returns main DRAW interpretor. Standard_EXPORT static Draw_Interpretor& GetInterpretor(); diff --git a/src/Draw/Draw_PntParams.hxx b/src/Draw/Draw_PntParams.hxx new file mode 100644 index 0000000000..5c972a6c35 --- /dev/null +++ b/src/Draw/Draw_PntParams.hxx @@ -0,0 +1,34 @@ +// Copyright (c) 2021 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef Draw_PntParams_HeaderFile +#define Draw_PntParams_HeaderFile + +#include +#include + +//! Draw parameters for points. +struct Draw_PntParams +{ +public: + Draw_Color PntColor; + Draw_MarkerShape PntMarker; + + Draw_PntParams() + : PntColor (Draw_rouge), + PntMarker (Draw_Plus) + {} + +}; + +#endif diff --git a/src/Draw/Draw_Point.cxx b/src/Draw/Draw_Point.cxx new file mode 100644 index 0000000000..4fa40d1e28 --- /dev/null +++ b/src/Draw/Draw_Point.cxx @@ -0,0 +1,208 @@ +// Created on: 1994-03-28 +// Created by: Remi LEQUETTE +// Copyright (c) 1994-1999 Matra Datavision +// Copyright (c) 1999-2014 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#include + +#include +#include +#include +#include +#include +#include + +IMPLEMENT_STANDARD_RTTIEXT(Draw_Point, Draw_Drawable3D) + +//======================================================================= +//function : Draw_Point +//purpose : +//======================================================================= +Draw_Point::Draw_Point (const gp_Pnt& P, + const Draw_MarkerShape Shape, + const Draw_Color& Col) +: myPoint(P), + is3D(Standard_True), + myShape(Shape), + myColor(Col) +{ + // +} + +//======================================================================= +//function : Draw_Point +//purpose : +//======================================================================= +Draw_Point::Draw_Point (const gp_Pnt2d& P, + const Draw_MarkerShape Shape, + const Draw_Color& Col) +: myPoint(P.X(),P.Y(),0.), + is3D(Standard_False), + myShape(Shape), + myColor(Col) +{ + // +} + +//======================================================================= +//function : Is3D +//purpose : +//======================================================================= +Standard_Boolean Draw_Point::Is3D() const +{ + return is3D; +} + +//======================================================================= +//function : DrawOn +//purpose : +//======================================================================= +void Draw_Point::DrawOn (Draw_Display& dis) const +{ + dis.SetColor(myColor); + if (is3D) + dis.DrawMarker(myPoint,myShape); + else + dis.DrawMarker(Point2d(),myShape); +} + +//======================================================================= +//function : Point +//purpose : +//======================================================================= +void Draw_Point::Point (const gp_Pnt& P) +{ + myPoint = P; + is3D = Standard_True; +} + +//======================================================================= +//function : Point2d +//purpose : +//======================================================================= +void Draw_Point::Point2d(const gp_Pnt2d& P) +{ + myPoint.SetCoord(P.X(),P.Y(),0); + is3D = Standard_False; +} + +//======================================================================= +//function : Copy +//purpose : +//======================================================================= +Handle(Draw_Drawable3D) Draw_Point::Copy() const +{ + Handle(Draw_Point) P; + if (is3D) + P = new Draw_Point(myPoint,myShape,myColor); + else + P = new Draw_Point(Point2d(),myShape,myColor); + + return P; +} + +//======================================================================= +//function : Dump +//purpose : +//======================================================================= +void Draw_Point::Dump (Standard_OStream& S) const +{ +#if !defined(_MSC_VER) && !defined(__sgi) && !defined(IRIX) + std::ios::fmtflags F = S.flags(); + S.setf(std::ios::scientific,std::ios::floatfield); + S.precision(15); +#else + long form = S.setf(std::ios::scientific); + std::streamsize prec = S.precision(15); +#endif + if (is3D) + S << "Point : " << myPoint.X() << ", " << myPoint.Y() << ", " << myPoint.Z() <> is3d; + Standard_Real x,y,z = 0.0; + if (is3d) + { + theStream >> x >> y >> z; + } + else + { + theStream >> x >> y; + } + Handle(Draw_Point) aDrawPoint; + if (is3d) + { + aDrawPoint = new Draw_Point (gp_Pnt (x, y, z), aParams.PntMarker, aParams.PntColor); + } + else + { + aDrawPoint = new Draw_Point (gp_Pnt2d (x, y), aParams.PntMarker, aParams.PntColor); + } + return aDrawPoint; +} + +//======================================================================= +//function : Whatis +//purpose : +//======================================================================= +void Draw_Point::Whatis (Draw_Interpretor& S) const +{ + S << "point"; +} diff --git a/src/Draw/Draw_Point.hxx b/src/Draw/Draw_Point.hxx new file mode 100644 index 0000000000..d3ff02359e --- /dev/null +++ b/src/Draw/Draw_Point.hxx @@ -0,0 +1,84 @@ +// Created on: 1994-03-28 +// Created by: Remi LEQUETTE +// Copyright (c) 1994-1999 Matra Datavision +// Copyright (c) 1999-2014 OPEN CASCADE SAS +// +// This file is part of Open CASCADE Technology software library. +// +// This library is free software; you can redistribute it and/or modify it under +// the terms of the GNU Lesser General Public License version 2.1 as published +// by the Free Software Foundation, with special exception defined in the file +// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT +// distribution for complete text of the license and disclaimer of any warranty. +// +// Alternatively, this file may be used under the terms of Open CASCADE +// commercial license or contractual agreement. + +#ifndef _Draw_Point_HeaderFile +#define _Draw_Point_HeaderFile + +#include +#include +#include +#include +#include + +class Draw_Color; +class gp_Pnt2d; + +DEFINE_STANDARD_HANDLE(Draw_Point, Draw_Drawable3D) + +//! A drawable point. +class Draw_Point : public Draw_Drawable3D +{ + DEFINE_STANDARD_RTTIEXT(Draw_Point, Draw_Drawable3D) + Draw_Drawable3D_FACTORY +public: + + Standard_EXPORT Draw_Point (const gp_Pnt& P, const Draw_MarkerShape Shape, const Draw_Color& Col); + + Standard_EXPORT Draw_Point (const gp_Pnt2d& P, const Draw_MarkerShape Shape, const Draw_Color& Col); + + Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE; + + //! Is a 3D object. (Default True). + Standard_EXPORT virtual Standard_Boolean Is3D() const Standard_OVERRIDE; + + gp_Pnt Point() const { return myPoint; } + + Standard_EXPORT void Point (const gp_Pnt& P); + + gp_Pnt2d Point2d() const { return gp_Pnt2d(myPoint.X(), myPoint.Y()); } + + Standard_EXPORT void Point2d (const gp_Pnt2d& P); + + void Color (const Draw_Color& theColor) { myColor = theColor; } + + Draw_Color Color() const { return myColor; } + + void Shape (const Draw_MarkerShape theS) { myShape = theS; } + + Draw_MarkerShape Shape() const { return myShape; } + + //! For variable copy. + Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE; + + //! For variable dump. + Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE; + + //! Save drawable into stream. + Standard_EXPORT virtual void Save (Standard_OStream& theStream) const Standard_OVERRIDE; + + //! For variable whatis command. + Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE; + +private: + + gp_Pnt myPoint; + Standard_Boolean is3D; + Draw_MarkerShape myShape; + Draw_Color myColor; + +}; + +#endif // _Draw_Point_HeaderFile diff --git a/src/Draw/FILES b/src/Draw/FILES index fbfb124724..38912a92c8 100755 --- a/src/Draw/FILES +++ b/src/Draw/FILES @@ -46,6 +46,9 @@ Draw_Number.hxx Draw_PInterp.hxx Draw_PloadCommands.cxx Draw_PluginMacro.hxx +Draw_PntParams.hxx +Draw_Point.cxx +Draw_Point.hxx Draw_Printer.cxx Draw_Printer.hxx Draw_ProgressIndicator.cxx diff --git a/src/DrawTrSurf/DrawTrSurf_Curve.cxx b/src/DrawTrSurf/DrawTrSurf_Curve.cxx index 3a97655454..8e3d4aaedf 100644 --- a/src/DrawTrSurf/DrawTrSurf_Curve.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Curve.cxx @@ -33,7 +33,7 @@ IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_Curve, DrawTrSurf_Drawable) Standard_Real DrawTrSurf_CurveLimit = 400; -extern Standard_Boolean Draw_Bounds; +Standard_IMPORT Standard_Boolean Draw_Bounds; //======================================================================= //function : DrawTrSurf_Curve diff --git a/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx b/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx index af427ff03b..b8a0e2de16 100644 --- a/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx +++ b/src/DrawTrSurf/DrawTrSurf_Curve2d.cxx @@ -35,7 +35,7 @@ IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_Curve2d, DrawTrSurf_Drawable) static Standard_Real DrawTrSurf_CurveLimit = 400; -extern Standard_Boolean Draw_Bounds; +Standard_IMPORT Standard_Boolean Draw_Bounds; //======================================================================= //function : DrawTrSurf_Curve2d diff --git a/src/IntWalk/IntWalk_IWalking_3.gxx b/src/IntWalk/IntWalk_IWalking_3.gxx index 224d257508..ef1b779d92 100644 --- a/src/IntWalk/IntWalk_IWalking_3.gxx +++ b/src/IntWalk/IntWalk_IWalking_3.gxx @@ -15,6 +15,9 @@ #include #include +//#ifdef DRAW +#include +//#endif // modified by NIZHNY-MKK Thu Nov 2 15:07:26 2000.BEGIN static Standard_Boolean TestPassedSolutionWithNegativeState(const IntWalk_VectorOfWalkingData& wd, @@ -63,6 +66,10 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult, // end of conditions. { + //#ifdef DRAW + char* name = new char[100]; + //#endif + Standard_Integer I = 0, N = 0, SaveN = 0; Standard_Real aBornInf[2] = {}, aBornSup[2] = {}, aUVap[2] = {}; math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2), UVap(aUVap,1,2); @@ -125,6 +132,17 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult, previousd3d = Func.Direction3d(); previousd2d = Func.Direction2d(); CurrentLine->AddPoint(previousPoint); + + //#ifdef DRAW + Standard_Integer aNbPoints = CurrentLine->NbPoints(); + gp_Pnt aPnt = previousPoint.Value(); + sprintf(name, "op%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + gp_Pnt2d aPnt2d = previousPoint.ValueOnSurface(false); + sprintf(name, "opp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + // modified by NIZHNY-MKK Fri Oct 27 12:34:32 2000.BEGIN if(movementdirectioninfo[I] !=0) { if(movementdirectioninfo[I] < 0) { @@ -266,6 +284,17 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult, CurrentLine->AddStatusLast(Standard_False); //if (aStatus != IntWalk_ArretSurPointPrecedent) CurrentLine->AddPoint(Psol); + + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = Psol.Value(); + sprintf(name, "op%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = Psol.ValueOnSurface(false); + sprintf(name, "opp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + //Remove from for (Standard_Integer iseq = 1; iseq <= seqAlone.Length(); iseq++) if (seqAlone(iseq) == SaveN) @@ -348,6 +377,17 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult, Tgtend = Standard_True; MakeWalkingPoint(1, UVap(1), UVap(2), Func, Psol); CurrentLine->AddPoint(Psol); + + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = Psol.Value(); + sprintf(name, "op%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = Psol.ValueOnSurface(false); + sprintf(name, "opp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + Rajout = Standard_True; seqAlone.Append(lines.Length() + 1); seqAjout.Append(lines.Length() + 1); @@ -357,6 +397,16 @@ void IntWalk_IWalking::ComputeOpenLine(const TColStd_SequenceOfReal& Umult, previousd3d = Func.Direction3d(); previousd2d = Func.Direction2d(); CurrentLine->AddPoint(previousPoint); + + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = previousPoint.Value(); + sprintf(name, "op%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = previousPoint.ValueOnSurface(false); + sprintf(name, "opp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif } else if (aStatus == IntWalk_PointConfondu) { diff --git a/src/IntWalk/IntWalk_IWalking_4.gxx b/src/IntWalk/IntWalk_IWalking_4.gxx index 8965974e8c..3ac5ca6e4b 100644 --- a/src/IntWalk/IntWalk_IWalking_4.gxx +++ b/src/IntWalk/IntWalk_IWalking_4.gxx @@ -14,6 +14,10 @@ #include +//#ifdef DRAW +#include +//#endif + void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, const TColStd_SequenceOfReal& Vmult, const ThePOPIterator& Pnts1, @@ -41,6 +45,10 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, // // ******************************************************************** { + //#ifdef DRAW + char* name = new char[100]; + //#endif + Standard_Integer I = 0, N = 0,SaveN = 0; Standard_Real aBornInf[2] = {}, aBornSup[2] = {}, aUVap[2] = {}; math_Vector BornInf(aBornInf,1,2), BornSup(aBornSup,1,2); @@ -138,6 +146,17 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, CurrentLine = new IntWalk_TheIWLine (new NCollection_IncAllocator()); CurrentLine->AddPoint(previousPoint); + + //#ifdef DRAW + Standard_Integer aNbPoints = CurrentLine->NbPoints(); + gp_Pnt aPnt = previousPoint.Value(); + sprintf(name, "cp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + gp_Pnt2d aPnt2d = previousPoint.ValueOnSurface(false); + sprintf(name, "cpp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + CurrentLine->SetTangentVector(previousd3d,1); Tgtbeg = Standard_False; Tgtend = Standard_False; @@ -341,6 +360,16 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, //if (aStatus != IntWalk_ArretSurPointPrecedent) CurrentLine->AddPoint(Psol); + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = Psol.Value(); + sprintf(name, "cp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = Psol.ValueOnSurface(false); + sprintf(name, "cpp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + //Remove from and, if it is first found point, //from too if (IsValidEndPoint(I, SaveN)) @@ -391,6 +420,17 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, { if (aStatus == IntWalk_ArretSurPointPrecedent) { CurrentLine->AddPoint(Psol); + + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = Psol.Value(); + sprintf(name, "cp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = Psol.ValueOnSurface(false); + sprintf(name, "cpp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + OpenLine(0,Psol,Pnts1,Func,CurrentLine); } else { @@ -495,6 +535,17 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, IntSurf_PntOn2S newP; newP.SetValue(Func.Point(),reversed,Uvap(1),Uvap(2)); CurrentLine->AddPoint(newP); + + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = newP.Value(); + sprintf(name, "cp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = newP.ValueOnSurface(false); + sprintf(name, "cpp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif + Rajout = Standard_True; seqAlone.Append(lines.Length()+1); seqAjout.Append(lines.Length()+1); @@ -507,6 +558,16 @@ void IntWalk_IWalking::ComputeCloseLine(const TColStd_SequenceOfReal& Umult, previousd3d = Func.Direction3d(); previousd2d = Func.Direction2d(); CurrentLine->AddPoint(previousPoint); + + //#ifdef DRAW + aNbPoints = CurrentLine->NbPoints(); + aPnt = previousPoint.Value(); + sprintf(name, "cp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt); + aPnt2d = previousPoint.ValueOnSurface(false); + sprintf(name, "cpp%d_%d", I, aNbPoints); + Draw::Set(name, aPnt2d); + //#endif } else if (aStatus == IntWalk_PointConfondu) { diff --git a/src/OS/Draw.tcl b/src/OS/Draw.tcl index 3d7eaef53c..df88a9fbfb 100644 --- a/src/OS/Draw.tcl +++ b/src/OS/Draw.tcl @@ -13,7 +13,7 @@ ;# Return list of toolkits proc Draw:toolkits { } { - set aResult [list TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw] + set aResult [list TKDrawBase TKDraw TKTopTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw] lappend aResult "TKOpenGlTest" if { [info exists ::env(HAVE_GLES2)] && "$::env(HAVE_GLES2)" == "true" } { diff --git a/src/TKDraw/EXTERNLIB b/src/TKDraw/EXTERNLIB index 46fa6c978b..64f65537a9 100755 --- a/src/TKDraw/EXTERNLIB +++ b/src/TKDraw/EXTERNLIB @@ -1,4 +1,5 @@ TKernel +TKDrawBase TKG2d TKGeomBase TKG3d diff --git a/src/TKDraw/PACKAGES b/src/TKDraw/PACKAGES index 1600bddebd..b4ec61c777 100755 --- a/src/TKDraw/PACKAGES +++ b/src/TKDraw/PACKAGES @@ -1,3 +1,2 @@ -Draw DBRep DrawTrSurf diff --git a/src/TKDrawBase/CMakeLists.txt b/src/TKDrawBase/CMakeLists.txt new file mode 100644 index 0000000000..8293496837 --- /dev/null +++ b/src/TKDrawBase/CMakeLists.txt @@ -0,0 +1,3 @@ +project(TKDrawBase) + +OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit) diff --git a/src/TKDrawBase/EXTERNLIB b/src/TKDrawBase/EXTERNLIB new file mode 100644 index 0000000000..00a37f8ce5 --- /dev/null +++ b/src/TKDrawBase/EXTERNLIB @@ -0,0 +1,17 @@ +TKernel +TKG2d +TKG3d +TKMath +TKService +CSF_TclLibs +CSF_TclTkLibs +CSF_XwLibs +CSF_gdi32 +CSF_advapi32 +CSF_user32 +CSF_shell32 +CSF_TBB +CSF_objc +CSF_Appkit +CSF_IOKit +CSF_ThreadLibs diff --git a/src/TKDrawBase/FILES b/src/TKDrawBase/FILES new file mode 100644 index 0000000000..ca4f0e567b --- /dev/null +++ b/src/TKDrawBase/FILES @@ -0,0 +1,2 @@ +EXTERNLIB +PACKAGES diff --git a/src/TKDrawBase/PACKAGES b/src/TKDrawBase/PACKAGES new file mode 100644 index 0000000000..8e3aa57d75 --- /dev/null +++ b/src/TKDrawBase/PACKAGES @@ -0,0 +1 @@ +Draw diff --git a/src/TKGeomAlgo/EXTERNLIB b/src/TKGeomAlgo/EXTERNLIB index ca0ecb9dab..b83dbb3c81 100755 --- a/src/TKGeomAlgo/EXTERNLIB +++ b/src/TKGeomAlgo/EXTERNLIB @@ -4,3 +4,4 @@ TKG3d TKG2d TKGeomBase TKBRep +TKDrawBase \ No newline at end of file