Coding, Draw - Clean up dead headers (#1440)

This commit is contained in:
Pasukhin Dmitry
2026-08-06 14:00:53 +01:00
committed by GitHub
parent a2a9a8d96f
commit ea716e3fa4
35 changed files with 45 additions and 1451 deletions
@@ -21,8 +21,6 @@
#include <DDF.hxx>
#include <TDF_ComparisonTool.hxx>
#include <DDF_Data.hxx>
#include <Draw_Appli.hxx>
-44
View File
@@ -1,44 +0,0 @@
// Created on: 1992-04-30
// Created by: Remi LEQUETTE
// Copyright (c) 1992-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 <Draw_Circle2D.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp_Circ2d.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Draw_Circle2D, Draw_Drawable2D)
//=================================================================================================
Draw_Circle2D::Draw_Circle2D(const gp_Circ2d& C,
const double A1,
const double A2,
const Draw_Color& col)
: myCirc(C),
myA1(A1),
myA2(A2),
myColor(col)
{
}
//=================================================================================================
void Draw_Circle2D::DrawOn(Draw_Display& d) const
{
d.SetColor(myColor);
d.Draw(myCirc, myA1, myA2);
}
-48
View File
@@ -1,48 +0,0 @@
// Created on: 1994-04-18
// Created by: Modelistation
// 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_Circle2D_HeaderFile
#define _Draw_Circle2D_HeaderFile
#include <Standard.hxx>
#include <gp_Circ2d.hxx>
#include <Standard_Real.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable2D.hxx>
class Draw_Display;
class Draw_Circle2D : public Draw_Drawable2D
{
public:
Standard_EXPORT Draw_Circle2D(const gp_Circ2d& C,
const double A1,
const double A2,
const Draw_Color& col);
Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
DEFINE_STANDARD_RTTIEXT(Draw_Circle2D, Draw_Drawable2D)
private:
gp_Circ2d myCirc;
double myA1;
double myA2;
Draw_Color myColor;
};
#endif // _Draw_Circle2D_HeaderFile
-44
View File
@@ -1,44 +0,0 @@
// Created on: 1992-04-30
// Created by: Remi LEQUETTE
// Copyright (c) 1992-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 <Draw_Circle3D.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp_Circ.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Draw_Circle3D, Draw_Drawable3D)
//=================================================================================================
Draw_Circle3D::Draw_Circle3D(const gp_Circ& C,
const double A1,
const double A2,
const Draw_Color& col)
: myCirc(C),
myA1(A1),
myA2(A2),
myColor(col)
{
}
//=================================================================================================
void Draw_Circle3D::DrawOn(Draw_Display& d) const
{
d.SetColor(myColor);
d.Draw(myCirc, myA1, myA2);
}
-48
View File
@@ -1,48 +0,0 @@
// Created on: 1992-04-30
// Created by: Remi LEQUETTE
// Copyright (c) 1992-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_Circle3D_HeaderFile
#define _Draw_Circle3D_HeaderFile
#include <Standard.hxx>
#include <gp_Circ.hxx>
#include <Standard_Real.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable3D.hxx>
class Draw_Display;
class Draw_Circle3D : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Circle3D(const gp_Circ& C,
const double A1,
const double A2,
const Draw_Color& col);
Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
DEFINE_STANDARD_RTTIEXT(Draw_Circle3D, Draw_Drawable3D)
private:
gp_Circ myCirc;
double myA1;
double myA2;
Draw_Color myColor;
};
#endif // _Draw_Circle3D_HeaderFile
+3 -3
View File
@@ -263,7 +263,7 @@ Draw_Interpretor::Draw_Interpretor()
//=================================================================================================
Draw_Interpretor::Draw_Interpretor(const Draw_PInterp& theInterp)
Draw_Interpretor::Draw_Interpretor(Tcl_Interp* const& theInterp)
: myInterp(theInterp),
isAllocated(false),
myDoLog(false),
@@ -529,13 +529,13 @@ Draw_Interpretor::~Draw_Interpretor()
//=================================================================================================
Draw_PInterp Draw_Interpretor::Interp() const
Tcl_Interp* Draw_Interpretor::Interp() const
{
Standard_DomainError_Raise_if(myInterp == nullptr, "No call for Draw_Interpretor::Init()");
return myInterp;
}
void Draw_Interpretor::Set(const Draw_PInterp& PIntrp)
void Draw_Interpretor::Set(Tcl_Interp* const& PIntrp)
{
if (isAllocated)
{
+10 -10
View File
@@ -21,12 +21,12 @@
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <Standard_Boolean.hxx>
#include <Draw_PInterp.hxx>
#include <Standard_SStream.hxx>
#include <Standard_Real.hxx>
class TCollection_AsciiString;
class TCollection_ExtendedString;
struct Tcl_Interp;
//! Provides an encapsulation of the TCL interpreter to define Draw commands.
class Draw_Interpretor
@@ -226,11 +226,11 @@ public:
//! Destructor
Standard_EXPORT ~Draw_Interpretor();
Standard_EXPORT Draw_Interpretor(const Draw_PInterp& theInterp);
Standard_EXPORT Draw_Interpretor(Tcl_Interp* const& theInterp);
Standard_EXPORT void Set(const Draw_PInterp& theInterp);
Standard_EXPORT void Set(Tcl_Interp* const& theInterp);
Standard_EXPORT Draw_PInterp Interp() const;
Standard_EXPORT Tcl_Interp* Interp() const;
//! Enables or disables logging of all commands and their results
Standard_EXPORT void SetDoLog(const bool theDoLog);
@@ -271,12 +271,12 @@ protected:
const char* const theGroup);
private:
Draw_PInterp myInterp;
bool isAllocated;
bool myDoLog;
bool myDoEcho;
bool myToColorize;
int myFDLog; //!< file descriptor of log file
Tcl_Interp* myInterp;
bool isAllocated;
bool myDoLog;
bool myDoEcho;
bool myToColorize;
int myFDLog; //!< file descriptor of log file
public:
DEFINE_STANDARD_ALLOC
-24
View File
@@ -1,24 +0,0 @@
// Created on: 1995-02-23
// Created by: Remi LEQUETTE
// Copyright (c) 1995-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_PInterp_HeaderFile
#define _Draw_PInterp_HeaderFile
struct Tcl_Interp;
typedef Tcl_Interp* Draw_PInterp;
#endif
-5
View File
@@ -14,10 +14,6 @@ set(OCCT_Draw_FILES
Draw_Box.hxx
Draw_Chronometer.cxx
Draw_Chronometer.hxx
Draw_Circle2D.cxx
Draw_Circle2D.hxx
Draw_Circle3D.cxx
Draw_Circle3D.hxx
Draw_Color.cxx
Draw_Color.hxx
Draw_ColorKind.hxx
@@ -47,7 +43,6 @@ set(OCCT_Draw_FILES
Draw_MessageCommands.cxx
Draw_Number.cxx
Draw_Number.hxx
Draw_PInterp.hxx
Draw_PloadCommands.cxx
Draw_PluginMacro.hxx
Draw_Printer.cxx
@@ -1,148 +0,0 @@
// Created on: 1997-07-22
// Created by: Laurent PAINNOT
// Copyright (c) 1997-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 <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <DrawTrSurf_Triangulation2D.hxx>
#include <Poly.hxx>
#include <Poly_Connect.hxx>
#include <Poly_Triangle.hxx>
#include <Poly_Triangulation.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <NCollection_Array1.hxx>
IMPLEMENT_STANDARD_RTTIEXT(DrawTrSurf_Triangulation2D, Draw_Drawable2D)
#ifdef _MSC_VER
#include <stdio.h>
#endif
//=================================================================================================
DrawTrSurf_Triangulation2D::DrawTrSurf_Triangulation2D(const occ::handle<Poly_Triangulation>& T)
: myTriangulation(T)
{
// Build the connect tool
Poly_Connect pc(T);
int i, j, nFree, nInternal, nbTriangles = T->NbTriangles();
int t[3];
// count the free edges
nFree = 0;
for (i = 1; i <= nbTriangles; i++)
{
pc.Triangles(i, t[0], t[1], t[2]);
for (j = 0; j < 3; j++)
{
if (t[j] == 0)
{
nFree++;
}
}
}
// allocate the arrays
myFree = new NCollection_HArray1<int>(1, 2 * nFree);
nInternal = (3 * nbTriangles - nFree) / 2;
myInternals = new NCollection_HArray1<int>(1, 2 * nInternal);
NCollection_Array1<int>& Free = myFree->ChangeArray1();
NCollection_Array1<int>& Internal = myInternals->ChangeArray1();
int fr = 1, in = 1;
int n[3];
for (i = 1; i <= nbTriangles; i++)
{
pc.Triangles(i, t[0], t[1], t[2]);
T->Triangle(i).Get(n[0], n[1], n[2]);
for (j = 0; j < 3; j++)
{
int k = (j + 1) % 3;
if (t[j] == 0)
{
Free(fr) = n[j];
Free(fr + 1) = n[k];
fr += 2;
}
// internal edge if this triangle has a lower index than the adjacent
else if (i < t[j])
{
Internal(in) = n[j];
Internal(in + 1) = n[k];
in += 2;
}
}
}
}
//=================================================================================================
occ::handle<Poly_Triangulation> DrawTrSurf_Triangulation2D::Triangulation() const
{
return myTriangulation;
}
//=================================================================================================
void DrawTrSurf_Triangulation2D::DrawOn(Draw_Display& dis) const
{
// Display the edges
int i, n;
if (myTriangulation->HasUVNodes())
{
// free edges
dis.SetColor(Draw_rouge);
const NCollection_Array1<int>& Free = myFree->Array1();
n = Free.Length() / 2;
for (i = 1; i <= n; i++)
{
dis.Draw(myTriangulation->UVNode(Free[2 * i - 1]), myTriangulation->UVNode(Free[2 * i]));
}
// internal edges
dis.SetColor(Draw_bleu);
const NCollection_Array1<int>& Internal = myInternals->Array1();
n = Internal.Length() / 2;
for (i = 1; i <= n; i++)
{
dis.Draw(myTriangulation->UVNode(Internal[2 * i - 1]),
myTriangulation->UVNode(Internal[2 * i]));
}
}
}
//=================================================================================================
occ::handle<Draw_Drawable3D> DrawTrSurf_Triangulation2D::Copy() const
{
return new DrawTrSurf_Triangulation2D(myTriangulation);
}
//=================================================================================================
void DrawTrSurf_Triangulation2D::Dump(Standard_OStream& S) const
{
Poly::Dump(myTriangulation, S);
}
//=================================================================================================
void DrawTrSurf_Triangulation2D::Whatis(Draw_Interpretor& I) const
{
I << "triangulation";
}
@@ -1,65 +0,0 @@
// Created on: 1997-07-22
// Created by: Laurent PAINNOT
// Copyright (c) 1997-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 _DrawTrSurf_Triangulation2D_HeaderFile
#define _DrawTrSurf_Triangulation2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Integer.hxx>
#include <NCollection_Array1.hxx>
#include <NCollection_HArray1.hxx>
#include <Draw_Drawable2D.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class Poly_Triangulation;
class Draw_Display;
class Draw_Drawable3D;
//! Used to display a 2d triangulation.
//!
//! Display internal edges in blue
//! Display boundary edges in red
//! Optional display of triangles and nodes indices.
class DrawTrSurf_Triangulation2D : public Draw_Drawable2D
{
public:
Standard_EXPORT DrawTrSurf_Triangulation2D(const occ::handle<Poly_Triangulation>& T);
Standard_EXPORT occ::handle<Poly_Triangulation> Triangulation() const;
Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
//! For variable copy.
Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
//! For variable dump.
Standard_EXPORT void Dump(Standard_OStream& S) const override;
//! For variable whatis command. Set as a result the
//! type of the variable.
Standard_EXPORT void Whatis(Draw_Interpretor& I) const override;
DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Triangulation2D, Draw_Drawable2D)
private:
occ::handle<Poly_Triangulation> myTriangulation;
occ::handle<NCollection_HArray1<int>> myInternals;
occ::handle<NCollection_HArray1<int>> myFree;
};
#endif // _DrawTrSurf_Triangulation2D_HeaderFile
-2
View File
@@ -34,6 +34,4 @@ set(OCCT_DrawTrSurf_FILES
DrawTrSurf_Surface.hxx
DrawTrSurf_Triangulation.cxx
DrawTrSurf_Triangulation.hxx
DrawTrSurf_Triangulation2D.cxx
DrawTrSurf_Triangulation2D.hxx
)
+2 -2
View File
@@ -49,7 +49,7 @@
#endif
#include <gce_MakePln.hxx>
#include <BRepOffsetAPI_Sewing.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <BRepAlgoAPI_Fuse.hxx>
//=================================================================================================
@@ -246,7 +246,7 @@ static int OCC544(Draw_Interpretor& di, int argc, const char** argv)
// Sprintf(name,"w2-last");
// DBRep::Set(name,mkPipe2.LastShape());
BRepOffsetAPI_Sewing SewIt(1.0e-4);
BRepBuilderAPI_Sewing SewIt(1.0e-4);
// Make tube
TopExp_Explorer getFaces;
+3 -3
View File
@@ -25,7 +25,7 @@
#include <V3d_View.hxx>
#include <BRepOffsetAPI_Sewing.hxx>
#include <BRepBuilderAPI_Sewing.hxx>
#include <AIS_InteractiveObject.hxx>
#include <NCollection_List.hxx>
@@ -46,8 +46,8 @@ static int OCC162(Draw_Interpretor& di, int argc, const char** argv)
return 0;
}
double tolValue = 0.0001;
BRepOffsetAPI_Sewing sew(tolValue);
double tolValue = 0.0001;
BRepBuilderAPI_Sewing sew(tolValue);
sew.Add(aShape);
sew.Perform();
TopoDS_Shape aSewed = sew.SewedShape();
@@ -92,7 +92,7 @@ int bcbuild(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -200,7 +200,7 @@ int bopds(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -262,7 +262,7 @@ int bopiterator(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -336,7 +336,7 @@ int bopinterf(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -416,7 +416,7 @@ int bopwho(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -548,7 +548,7 @@ int bopnews(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -615,7 +615,7 @@ int bopindex(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -653,7 +653,7 @@ int bopsd(Draw_Interpretor& di, int n, const char** a)
return 0;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -699,7 +699,7 @@ int bopsc(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -849,7 +849,7 @@ int boppb(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -908,7 +908,7 @@ int bopcb(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -975,7 +975,7 @@ int bopsp(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -1069,7 +1069,7 @@ int bopfinfo(Draw_Interpretor& di, int n, const char** a, const int iPriz)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -1169,7 +1169,7 @@ int bopfav(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -1229,7 +1229,7 @@ int bopimage(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -1285,7 +1285,7 @@ int boporigin(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -1346,7 +1346,7 @@ int bopfsd(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << " prepare PaveFiller first\n";
@@ -233,7 +233,7 @@ BOPAlgo_PaveFiller& BOPTest_Objects::PaveFiller()
//=================================================================================================
BOPDS_PDS BOPTest_Objects::PDS()
BOPDS_DS* BOPTest_Objects::PDS()
{
return BOPTest_Objects::PaveFiller().PDS();
}
@@ -247,11 +247,11 @@ BOPAlgo_Builder& BOPTest_Objects::Builder()
//=================================================================================================
void BOPTest_Objects::SetBuilder(const BOPAlgo_PBuilder& theBuilder)
void BOPTest_Objects::SetBuilder(BOPAlgo_Builder* const& theBuilder)
{
BOPAlgo_Builder* pB;
//
pB = (BOPAlgo_Builder*)theBuilder;
pB = theBuilder;
GetSession().SetBuilder(pB);
}
@@ -18,10 +18,8 @@
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <BOPDS_PDS.hxx>
#include <TopoDS_Shape.hxx>
#include <NCollection_List.hxx>
#include <BOPAlgo_PBuilder.hxx>
#include <BOPAlgo_CellsBuilder.hxx>
#include <BOPAlgo_GlueEnum.hxx>
//
@@ -30,6 +28,7 @@ class BOPAlgo_Builder;
class BOPAlgo_BOP;
class BOPAlgo_Section;
class BOPAlgo_Splitter;
class BOPDS_DS;
class BOPTest_Objects
{
@@ -42,7 +41,7 @@ public:
Standard_EXPORT static void Clear();
Standard_EXPORT static BOPDS_PDS PDS();
Standard_EXPORT static BOPDS_DS* PDS();
Standard_EXPORT static BOPAlgo_Builder& Builder();
@@ -58,7 +57,7 @@ public:
Standard_EXPORT static NCollection_List<TopoDS_Shape>& Tools();
Standard_EXPORT static void SetBuilder(const BOPAlgo_PBuilder& theBuilder);
Standard_EXPORT static void SetBuilder(BOPAlgo_Builder* const& theBuilder);
Standard_EXPORT static void SetBuilderDefault();
@@ -222,7 +222,7 @@ int bbuild(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << "Prepare PaveFiller first\n";
@@ -321,7 +321,7 @@ int bbop(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << "Prepare PaveFiller first\n";
@@ -452,7 +452,7 @@ int bsplit(Draw_Interpretor& di, int n, const char** a)
return 1;
}
//
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << "Prepare PaveFiller first\n";
@@ -540,7 +540,7 @@ int buildbop(Draw_Interpretor& di, int n, const char** a)
return 1;
}
BOPDS_PDS pDS = BOPTest_Objects::PDS();
BOPDS_DS* pDS = BOPTest_Objects::PDS();
if (!pDS)
{
di << "Error: perform intersection of arguments first";
-8
View File
@@ -4,17 +4,9 @@ set(OCCT_HLRTest_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_HLRTest_FILES
HLRTest.cxx
HLRTest.hxx
HLRTest_DrawableEdgeTool.cxx
HLRTest_DrawableEdgeTool.hxx
HLRTest_DrawablePolyEdgeTool.cxx
HLRTest_DrawablePolyEdgeTool.hxx
HLRTest_DrawablePolyEdgeTool.lxx
HLRTest_OutLiner.cxx
HLRTest_OutLiner.hxx
HLRTest_OutLiner.lxx
HLRTest_Projector.cxx
HLRTest_Projector.hxx
HLRTest_ShapeData.cxx
HLRTest_ShapeData.hxx
HLRTest_ShapeData.lxx
)
@@ -1,273 +0,0 @@
// Created on: 1992-10-14
// Created by: Christophe MARION
// Copyright (c) 1992-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 <Draw_Display.hxx>
#include <HLRAlgo_EdgeIterator.hxx>
#include <HLRBRep_Algo.hxx>
#include <HLRBRep_Data.hxx>
#include <HLRBRep_EdgeData.hxx>
#include <HLRBRep_ShapeBounds.hxx>
#include <HLRTest_DrawableEdgeTool.hxx>
#include <HLRTest_ShapeData.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(HLRTest_DrawableEdgeTool, Draw_Drawable3D)
//=================================================================================================
HLRTest_DrawableEdgeTool::HLRTest_DrawableEdgeTool(const occ::handle<HLRBRep_Algo>& Alg,
const bool Visible,
const bool IsoLine,
const bool Rg1Line,
const bool RgNLine,
const int ViewId)
: myAlgo(Alg),
myVisible(Visible),
myIsoLine(IsoLine),
myRg1Line(Rg1Line),
myRgNLine(RgNLine),
myViewId(ViewId)
{
}
//=================================================================================================
void HLRTest_DrawableEdgeTool::DrawOn(Draw_Display& D) const
{
if (myViewId == D.ViewId())
{
if (myIsoLine)
{
InternalDraw(D, 1);
}
InternalDraw(D, 2);
InternalDraw(D, 3);
}
}
//=================================================================================================
void HLRTest_DrawableEdgeTool::InternalDraw(Draw_Display& D, const int typ) const
{
occ::handle<HLRBRep_Data> DS = myAlgo->DataStructure();
if (!DS.IsNull())
{
// double sta,end;
// float tolsta,tolend;
// int ie,v1,v2,e1,e2,f1,f2;
int ie, e2;
int iCB = 1;
int nCB = myAlgo->NbShapes();
int ne = DS->NbEdges();
int nf = DS->NbFaces();
HLRBRep_EdgeData* ed = &(DS->EDataArray().ChangeValue(0));
ed++;
e2 = 0;
for (ie = 1; ie <= ne; ie++)
{
if (ed->Selected() && !ed->Vertical())
{
ed->Used(false);
}
else
{
ed->Used(true);
}
ed++;
}
for (int iface = 1; iface <= nf; iface++)
{
DrawFace(D, typ, nCB, iface, e2, iCB, DS);
}
if (typ >= 3)
{
iCB = 1;
e2 = 0;
HLRBRep_EdgeData* anEdgeData = &(DS->EDataArray().ChangeValue(0));
anEdgeData++;
for (int i = 1; i <= ne; i++)
{
if (!anEdgeData->Used())
{
DrawEdge(D, false, typ, nCB, i, e2, iCB, *anEdgeData);
anEdgeData->Used(true);
}
anEdgeData++;
}
}
}
}
//=================================================================================================
void HLRTest_DrawableEdgeTool::DrawFace(Draw_Display& D,
const int typ,
const int nCB,
const int iface,
int& e2,
int& iCB,
occ::handle<HLRBRep_Data>& DS) const
{
HLRBRep_FaceIterator Itf;
for (Itf.InitEdge(DS->FDataArray().ChangeValue(iface)); Itf.MoreEdge(); Itf.NextEdge())
{
int ie = Itf.Edge();
HLRBRep_EdgeData& edf = DS->EDataArray().ChangeValue(ie);
if (!edf.Used())
{
bool todraw;
if ((!myRg1Line && !Itf.OutLine() && edf.Rg1Line())
|| (!myRgNLine && !Itf.OutLine() && edf.RgNLine()))
{
todraw = false;
}
else if (typ == 1)
{
todraw = Itf.IsoLine();
}
else if (typ == 2)
{
todraw = Itf.OutLine() || Itf.Internal();
}
else
{
todraw = !(Itf.IsoLine() || (Itf.OutLine() || Itf.Internal()));
}
if (todraw)
{
DrawEdge(D, true, typ, nCB, ie, e2, iCB, edf);
}
edf.Used(true);
}
}
}
//=================================================================================================
void HLRTest_DrawableEdgeTool::DrawEdge(Draw_Display& D,
const bool inFace,
const int typ,
const int nCB,
const int ie,
int& e2,
int& iCB,
HLRBRep_EdgeData& ed) const
{
bool todraw = true;
if (!inFace && ((!myRg1Line && ed.Rg1Line()) || (!myRgNLine && ed.RgNLine())))
{
todraw = false;
}
if (todraw)
{
double sta, end;
float tolsta, tolend;
int v1, v2, e1, f1, f2;
HLRAlgo_EdgeIterator It;
if (myVisible)
{
while (ie > e2 && iCB <= nCB)
{
HLRBRep_ShapeBounds& ShB = myAlgo->ShapeBounds(iCB);
ShB.Bounds(v1, v2, e1, e2, f1, f2);
occ::handle<HLRTest_ShapeData> ShData = occ::down_cast<HLRTest_ShapeData>(ShB.ShapeData());
if (typ == 1)
{
D.SetColor(ShData->VisibleIsoColor());
}
else if (typ == 2)
{
D.SetColor(ShData->VisibleOutLineColor());
}
else
{
D.SetColor(ShData->VisibleColor());
}
iCB++;
}
const HLRBRep_Curve& ec = ed.Geometry();
for (It.InitVisible(ed.Status()); It.MoreVisible(); It.NextVisible())
{
It.Visible(sta, tolsta, end, tolend);
D.MoveTo(ec.Value3D(sta));
if (ec.GetType() != GeomAbs_Line)
{
int nbPnt = 100;
double step = (end - sta) / (nbPnt + 1);
for (int i = 1; i <= nbPnt; i++)
{
sta += step;
D.DrawTo(ec.Value3D(sta));
}
}
D.DrawTo(ec.Value3D(end));
}
}
else
{
while (ie > e2 && iCB <= nCB)
{
HLRBRep_ShapeBounds& ShB = myAlgo->ShapeBounds(iCB);
ShB.Bounds(v1, v2, e1, e2, f1, f2);
occ::handle<HLRTest_ShapeData> ShData = occ::down_cast<HLRTest_ShapeData>(ShB.ShapeData());
if (typ == 1)
{
D.SetColor(ShData->HiddenIsoColor());
}
else if (typ == 2)
{
D.SetColor(ShData->HiddenOutLineColor());
}
else
{
D.SetColor(ShData->HiddenColor());
}
iCB++;
}
const HLRBRep_Curve& ec = ed.Geometry();
for (It.InitHidden(ed.Status()); It.MoreHidden(); It.NextHidden())
{
It.Hidden(sta, tolsta, end, tolend);
D.MoveTo(ec.Value3D(sta));
if (ec.GetType() != GeomAbs_Line)
{
int nbPnt = 100;
double step = (end - sta) / (nbPnt + 1);
for (int i = 1; i <= nbPnt; i++)
{
sta += step;
D.DrawTo(ec.Value3D(sta));
}
}
D.DrawTo(ec.Value3D(end));
}
}
}
}
@@ -1,74 +0,0 @@
// Created on: 1992-08-27
// Created by: Christophe MARION
// Copyright (c) 1992-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 _HLRTest_DrawableEdgeTool_HeaderFile
#define _HLRTest_DrawableEdgeTool_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <Draw_Drawable3D.hxx>
class HLRBRep_Algo;
class Draw_Display;
class HLRBRep_Data;
class HLRBRep_EdgeData;
//! Used to display the results.
class HLRTest_DrawableEdgeTool : public Draw_Drawable3D
{
public:
Standard_EXPORT HLRTest_DrawableEdgeTool(const occ::handle<HLRBRep_Algo>& Alg,
const bool Visible,
const bool IsoLine,
const bool Rg1Line,
const bool RgNLine,
const int ViewId);
Standard_EXPORT void DrawOn(Draw_Display& D) const override;
DEFINE_STANDARD_RTTIEXT(HLRTest_DrawableEdgeTool, Draw_Drawable3D)
private:
Standard_EXPORT void InternalDraw(Draw_Display& D, const int typ) const;
Standard_EXPORT void DrawFace(Draw_Display& D,
const int typ,
const int nCB,
const int iface,
int& e2,
int& iCB,
occ::handle<HLRBRep_Data>& DS) const;
Standard_EXPORT void DrawEdge(Draw_Display& D,
const bool inFace,
const int typ,
const int nCB,
const int ie,
int& e2,
int& iCB,
HLRBRep_EdgeData& ed) const;
occ::handle<HLRBRep_Algo> myAlgo;
bool myVisible;
bool myIsoLine;
bool myRg1Line;
bool myRgNLine;
int myViewId;
};
#endif // _HLRTest_DrawableEdgeTool_HeaderFile
@@ -1,183 +0,0 @@
// Created on: 1992-10-14
// Created by: Christophe MARION
// Copyright (c) 1992-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.
// Modified by cma, Mon Oct 23 16:11:46 1995
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <HLRAlgo_EdgeIterator.hxx>
#include <HLRAlgo_EdgeStatus.hxx>
#include <HLRBRep_PolyAlgo.hxx>
#include <HLRTest_DrawablePolyEdgeTool.hxx>
#include <OSD_Chronometer.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(HLRTest_DrawablePolyEdgeTool, Draw_Drawable3D)
#define PntX1 ((double*)Coordinates)[0]
#define PntY1 ((double*)Coordinates)[1]
#define PntZ1 ((double*)Coordinates)[2]
#define PntX2 ((double*)Coordinates)[3]
#define PntY2 ((double*)Coordinates)[4]
#define PntZ2 ((double*)Coordinates)[5]
//=================================================================================================
HLRTest_DrawablePolyEdgeTool::HLRTest_DrawablePolyEdgeTool(const occ::handle<HLRBRep_PolyAlgo>& Alg,
const int ViewId,
const bool Debug)
: myAlgo(Alg),
myDispRg1(false),
myDispRgN(false),
myDispHid(false),
myViewId(ViewId),
myDebug(Debug),
myHideMode(true)
{
OSD_Chronometer ChronHide;
if (myDebug)
{
ChronHide.Reset();
ChronHide.Start();
}
double sta, end, dx, dy, dz;
float tolsta, tolend;
HLRAlgo_EdgeIterator It;
myBiPntVis.Clear();
myBiPntHid.Clear();
void* Coordinates;
HLRAlgo_EdgeStatus status;
TopoDS_Shape S;
bool reg1, regn, outl, intl;
for (myAlgo->InitHide(); myAlgo->MoreHide(); myAlgo->NextHide())
{
Coordinates = &myAlgo->Hide(status, S, reg1, regn, outl, intl);
dx = PntX2 - PntX1;
dy = PntY2 - PntY1;
dz = PntZ2 - PntZ1;
for (It.InitVisible(status); It.MoreVisible(); It.NextVisible())
{
It.Visible(sta, tolsta, end, tolend);
myBiPntVis.Append(HLRBRep_BiPoint(PntX1 + sta * dx,
PntY1 + sta * dy,
PntZ1 + sta * dz,
PntX1 + end * dx,
PntY1 + end * dy,
PntZ1 + end * dz,
S,
reg1,
regn,
outl,
intl));
}
for (It.InitHidden(status); It.MoreHidden(); It.NextHidden())
{
It.Hidden(sta, tolsta, end, tolend);
myBiPntHid.Append(HLRBRep_BiPoint(PntX1 + sta * dx,
PntY1 + sta * dy,
PntZ1 + sta * dz,
PntX1 + end * dx,
PntY1 + end * dy,
PntZ1 + end * dz,
S,
reg1,
regn,
outl,
intl));
}
}
if (myDebug)
{
ChronHide.Stop();
std::cout << " Temps Hide :";
ChronHide.Show();
}
}
//=================================================================================================
void HLRTest_DrawablePolyEdgeTool::DrawOn(Draw_Display& D) const
{
if (myViewId == D.ViewId())
{
if (myHideMode)
{
NCollection_List<HLRBRep_BiPoint>::Iterator It;
if (myDispHid)
{
D.SetColor(Draw_bleu);
for (It.Initialize(myBiPntHid); It.More(); It.Next())
{
const HLRBRep_BiPoint& BP = It.Value();
bool todraw = true;
if ((!myDispRg1 && BP.Rg1Line() && !BP.OutLine())
|| (!myDispRgN && BP.RgNLine() && !BP.OutLine()))
{
todraw = false;
}
if (todraw)
{
D.MoveTo(BP.P1());
D.DrawTo(BP.P2());
}
}
}
D.SetColor(Draw_vert);
for (It.Initialize(myBiPntVis); It.More(); It.Next())
{
const HLRBRep_BiPoint& BP = It.Value();
bool todraw = true;
if ((!myDispRg1 && BP.Rg1Line() && !BP.OutLine())
|| (!myDispRgN && BP.RgNLine() && !BP.OutLine()))
{
todraw = false;
}
if (todraw)
{
D.MoveTo(BP.P1());
D.DrawTo(BP.P2());
}
}
}
else
{
void* Coordinates;
TopoDS_Shape S;
bool reg1, regn, outl, intl;
D.SetColor(Draw_vert);
for (myAlgo->InitShow(); myAlgo->MoreShow(); myAlgo->NextShow())
{
Coordinates = &myAlgo->Show(S, reg1, regn, outl, intl);
bool todraw = true;
if ((!myDispRg1 && reg1 && !outl) || (!myDispRgN && regn && !outl))
{
todraw = false;
}
if (todraw)
{
D.MoveTo(gp_Pnt(PntX1, PntY1, PntZ1));
D.DrawTo(gp_Pnt(PntX2, PntY2, PntZ2));
}
}
}
}
}
@@ -1,77 +0,0 @@
// Created on: 1992-08-27
// Created by: Christophe MARION
// Copyright (c) 1992-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 _HLRTest_DrawablePolyEdgeTool_HeaderFile
#define _HLRTest_DrawablePolyEdgeTool_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <HLRBRep_BiPoint.hxx>
#include <NCollection_List.hxx>
#include <Draw_Drawable3D.hxx>
class HLRBRep_PolyAlgo;
class Draw_Display;
//! Used to display the results.
class HLRTest_DrawablePolyEdgeTool : public Draw_Drawable3D
{
public:
Standard_EXPORT HLRTest_DrawablePolyEdgeTool(const occ::handle<HLRBRep_PolyAlgo>& Alg,
const int ViewId,
const bool Debug = false);
void Show();
void Hide();
void DisplayRg1Line(const bool B);
bool DisplayRg1Line() const;
void DisplayRgNLine(const bool B);
bool DisplayRgNLine() const;
void DisplayHidden(const bool B);
bool DisplayHidden() const;
Standard_EXPORT void DrawOn(Draw_Display& D) const override;
bool Debug() const;
void Debug(const bool B);
DEFINE_STANDARD_RTTIEXT(HLRTest_DrawablePolyEdgeTool, Draw_Drawable3D)
private:
occ::handle<HLRBRep_PolyAlgo> myAlgo;
bool myDispRg1;
bool myDispRgN;
bool myDispHid;
int myViewId;
NCollection_List<HLRBRep_BiPoint> myBiPntVis;
NCollection_List<HLRBRep_BiPoint> myBiPntHid;
bool myDebug;
bool myHideMode;
};
#include <HLRTest_DrawablePolyEdgeTool.lxx>
#endif // _HLRTest_DrawablePolyEdgeTool_HeaderFile
@@ -1,85 +0,0 @@
// Created on: 1995-11-15
// Created by: Christophe MARION
// Copyright (c) 1995-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.
//=================================================================================================
inline void HLRTest_DrawablePolyEdgeTool::Show()
{
myHideMode = false;
}
//=================================================================================================
inline void HLRTest_DrawablePolyEdgeTool::Hide()
{
myHideMode = true;
}
//=================================================================================================
inline void HLRTest_DrawablePolyEdgeTool::DisplayRg1Line(const bool B)
{
myDispRg1 = B;
}
//=================================================================================================
inline bool HLRTest_DrawablePolyEdgeTool::DisplayRg1Line() const
{
return myDispRg1;
}
//=================================================================================================
inline void HLRTest_DrawablePolyEdgeTool::DisplayRgNLine(const bool B)
{
myDispRgN = B;
}
//=================================================================================================
inline bool HLRTest_DrawablePolyEdgeTool::DisplayRgNLine() const
{
return myDispRgN;
}
//=================================================================================================
inline void HLRTest_DrawablePolyEdgeTool::DisplayHidden(const bool B)
{
myDispHid = B;
}
//=================================================================================================
inline bool HLRTest_DrawablePolyEdgeTool::DisplayHidden() const
{
return myDispHid;
}
//=================================================================================================
inline void HLRTest_DrawablePolyEdgeTool::Debug(const bool B)
{
myDebug = B;
}
//=================================================================================================
inline bool HLRTest_DrawablePolyEdgeTool::Debug() const
{
return myDebug;
}
@@ -1,38 +0,0 @@
// Created on: 1992-08-25
// Created by: Christophe MARION
// Copyright (c) 1992-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 <Draw_Color.hxx>
#include <HLRTest_ShapeData.hxx>
#include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(HLRTest_ShapeData, Standard_Transient)
//=================================================================================================
HLRTest_ShapeData::HLRTest_ShapeData(const Draw_Color& CVis,
const Draw_Color& COVis,
const Draw_Color& CIVis,
const Draw_Color& CHid,
const Draw_Color& COHid,
const Draw_Color& CIHid)
: myVColor(CVis),
myVOColor(COVis),
myVIColor(CIVis),
myHColor(CHid),
myHOColor(COHid),
myHIColor(CIHid)
{
}
@@ -1,75 +0,0 @@
// Created on: 1992-08-21
// Created by: Christophe MARION
// Copyright (c) 1992-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 _HLRTest_ShapeData_HeaderFile
#define _HLRTest_ShapeData_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Draw_Color.hxx>
#include <Standard_Transient.hxx>
//! Contains the colors of a shape.
class HLRTest_ShapeData : public Standard_Transient
{
public:
Standard_EXPORT HLRTest_ShapeData(const Draw_Color& CVis,
const Draw_Color& COVis,
const Draw_Color& CIVis,
const Draw_Color& CHid,
const Draw_Color& COHid,
const Draw_Color& CIHid);
void VisibleColor(const Draw_Color& CVis);
void VisibleOutLineColor(const Draw_Color& COVis);
void VisibleIsoColor(const Draw_Color& CIVis);
void HiddenColor(const Draw_Color& CHid);
void HiddenOutLineColor(const Draw_Color& COHid);
void HiddenIsoColor(const Draw_Color& CIHid);
Draw_Color VisibleColor() const;
Draw_Color VisibleOutLineColor() const;
Draw_Color VisibleIsoColor() const;
Draw_Color HiddenColor() const;
Draw_Color HiddenOutLineColor() const;
Draw_Color HiddenIsoColor() const;
DEFINE_STANDARD_RTTIEXT(HLRTest_ShapeData, Standard_Transient)
private:
Draw_Color myVColor;
Draw_Color myVOColor;
Draw_Color myVIColor;
Draw_Color myHColor;
Draw_Color myHOColor;
Draw_Color myHIColor;
};
#include <HLRTest_ShapeData.lxx>
#endif // _HLRTest_ShapeData_HeaderFile
@@ -1,99 +0,0 @@
// Created on: 1992-08-25
// Created by: Christophe MARION
// Copyright (c) 1992-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.
//=================================================================================================
inline void HLRTest_ShapeData::VisibleColor(const Draw_Color& CVis)
{
myVColor = CVis;
}
//=================================================================================================
inline void HLRTest_ShapeData::VisibleOutLineColor(const Draw_Color& COVis)
{
myVOColor = COVis;
}
//=================================================================================================
inline void HLRTest_ShapeData::VisibleIsoColor(const Draw_Color& CIVis)
{
myVIColor = CIVis;
}
//=================================================================================================
inline void HLRTest_ShapeData::HiddenColor(const Draw_Color& CHid)
{
myHColor = CHid;
}
//=================================================================================================
inline void HLRTest_ShapeData::HiddenOutLineColor(const Draw_Color& COHid)
{
myHOColor = COHid;
}
//=================================================================================================
inline void HLRTest_ShapeData::HiddenIsoColor(const Draw_Color& CIHid)
{
myHIColor = CIHid;
}
//=================================================================================================
inline Draw_Color HLRTest_ShapeData::VisibleColor() const
{
return myVColor;
}
//=================================================================================================
inline Draw_Color HLRTest_ShapeData::VisibleOutLineColor() const
{
return myVOColor;
}
//=================================================================================================
inline Draw_Color HLRTest_ShapeData::VisibleIsoColor() const
{
return myVIColor;
}
//=================================================================================================
inline Draw_Color HLRTest_ShapeData::HiddenColor() const
{
return myHColor;
}
//=================================================================================================
inline Draw_Color HLRTest_ShapeData::HiddenOutLineColor() const
{
return myHOColor;
}
//=================================================================================================
inline Draw_Color HLRTest_ShapeData::HiddenIsoColor() const
{
return myHIColor;
}
@@ -73,7 +73,6 @@
// #include <ShapeAnalysis_Shell.hxx>
// #include <ShapeAnalysis_WireOrder.hxx>
// #include <ShapeAnalysis_Wire.hxx>
// #include <ShapeUpgrade_ShellSewing.hxx>
// the plane (equation z=0) shared by PlaneDividedFaceContinuity and PlaneGridShell
// static occ::handle<Geom_Plane> ThePlane= new Geom_Plane(0,0,1,0);
//=================================================================================================
@@ -33,7 +33,6 @@
//! DT_SplitSurface - ShapeUpgrade_SplitSurface
//! DT_SupportModification - ShapeUpgrade_DataMapOfShapeSurface
//! DT_Debug - ShapeUpgrade::SetDebug
//! shellsolid - ShapeAnalysis_Shell/ShapeUpgrade_ShellSewing
class SWDRAW_ShapeUpgrade
{
public:
-2
View File
@@ -4,8 +4,6 @@ set(OCCT_XSDRAW_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_XSDRAW_FILES
XSDRAW.cxx
XSDRAW.hxx
XSDRAW_Functions.cxx
XSDRAW_Functions.hxx
XSDRAW_Vars.cxx
XSDRAW_Vars.hxx
)
@@ -1,20 +0,0 @@
// 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 <XSControl_FuncShape.hxx>
#include <XSDRAW_Functions.hxx>
void XSDRAW_Functions::Init()
{
XSControl_FuncShape::Init();
}
@@ -1,37 +0,0 @@
// Created on: 1995-03-16
// Created by: Christian CAILLET
// Copyright (c) 1995-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 _XSDRAW_Functions_HeaderFile
#define _XSDRAW_Functions_HeaderFile
//! Defines additional commands for XSDRAW to :
//! - control of initialisation (xinit, xnorm, newmodel)
//! - analyse of the result of a transfer (recorded in a
//! TransientProcess for Read, FinderProcess for Write) :
//! statistics, various lists (roots,complete,abnormal), what
//! about one specific entity, producing a model with the
//! abnormal result
//!
//! This appendix of XSDRAW is compiled separately to distinguish
//! basic features from user callable forms
class XSDRAW_Functions
{
public:
//! Defines and loads all basic functions for XSDRAW (as ActFunc)
Standard_EXPORT static void Init();
};
#endif // _XSDRAW_Functions_HeaderFile
@@ -33,7 +33,6 @@
#include <IGESData_IGESModel.hxx>
#include <IGESGeom_BoundedSurface.hxx>
#include <IGESGeom_TrimmedSurface.hxx>
#include <IGESSelect_Activator.hxx>
#include <IGESSolid_Face.hxx>
#include <MoniTool_Macros.hxx>
#include <Interface_Static.hxx>
@@ -39,7 +39,6 @@
#include <STEPControl_Writer.hxx>
#include <StepData_StepModel.hxx>
#include <StepGeom_Axis2Placement3d.hxx>
#include <StepSelect_Activator.hxx>
#include <STEPSelections_AssemblyExplorer.hxx>
#include <STEPSelections_Counter.hxx>
#include <StepToTopoDS_MakeTransformed.hxx>