1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,118 +0,0 @@
-- Created on: 1991-06-25
-- Created by: Christophe MARION
-- Copyright (c) 1991-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.
package DBRep
---Purpose: Used to display BRep objects using the DrawTrSurf
-- package.
-- The DrawableShape is a Display object build from a
-- Shape.
-- Provides methods to manage a directory of named shapes.
-- Provides a set of Draw commands for Shapes.
uses
MMgt,
TCollection,
TColStd,
gp,
TColgp,
Draw,
TopAbs,
TopoDS,
TopTools,
GeomAbs,
Geom2dHatch,
HLRBRep,
Poly
is
class Edge;
imported ListOfEdge;
imported ListIteratorOfListOfEdge;
class Face;
imported ListOfFace;
imported ListIteratorOfListOfFace;
class HideData;
imported ListOfHideData;
imported ListIteratorOfListOfHideData;
class DrawableShape;
class IsoBuilder;
---Purpose: Creation of isoparametric curves.
-- class ProgressIndicator;
---Purpose : Implements ProgressIndicator for DRAW
--
-- Methods to manage variables
--
Set(Name : CString; S : Shape from TopoDS);
---Purpose: Sets <S> in the variable <Name>. Overwrite the
-- variable if already set.
Get(Name : in out CString;
Typ : ShapeEnum from TopAbs = TopAbs_SHAPE;
Complain : Boolean = Standard_False)
returns Shape from TopoDS;
---Purpose: Returns the shape in the variable <Name>. Returns
-- a null shape if the variable is not set or not of
-- the given <Typ>. If <Complain> is True a message
-- is printed on cout if the variable is not set.
BasicCommands(theCommands : in out Interpretor from Draw);
---Purpose: Defines the basic commands.
HLRMode returns Boolean from Standard;
---Purpose: True if HLR, False if wireframe.
Rg1Mode returns Boolean from Standard;
---Purpose: True if display Rg1Lines.
RgNMode returns Boolean from Standard;
---Purpose: True if display RgNLines.
HidMode returns Boolean from Standard;
---Purpose: True if display HiddenLines.
HLRAngle returns Real from Standard;
---Purpose: discretisation angle for edges.
NbIsos returns Integer from Standard;
---Purpose: number of iso in U and V
Discretisation returns Integer from Standard;
---Purpose: discretisation number of points for curves
--SetProgressBar(thePI: ProgressIndicator from Message);
---Purpose: set progress indicator
--GetProgressBar returns ProgressIndicator from Message;
---Purpose: get progress indicator
end DBRep;

View File

@@ -14,39 +14,40 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DBRep.ixx>
#include <DBRep_DrawableShape.hxx>
#include <Draw_Appli.hxx>
#include <Draw.hxx>
#include <Draw_Segment3D.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Compound.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepTools_ShapeSet.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRep_TEdge.hxx>
#include <Precision.hxx>
#include <Poly_Triangulation.hxx>
#include <gp_Ax2.hxx>
#include <TopExp.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <BRep_TEdge.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepGProp.hxx>
#include <BRepTools.hxx>
#include <BRepTools_ShapeSet.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <DBRep.hxx>
#include <DBRep_DrawableShape.hxx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Draw_Segment3D.hxx>
#include <gp_Ax2.hxx>
#include <GProp.hxx>
#include <GProp_GProps.hxx>
#include <BRepGProp.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <Draw_ProgressIndicator.hxx>
// memory management
#include <Poly_Triangulation.hxx>
#include <Precision.hxx>
#include <Standard.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_Array1OfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <stdio.h>
// memory management
#ifdef _WIN32
extern Draw_Viewer dout;
#endif

117
src/DBRep/DBRep.hxx Normal file
View File

@@ -0,0 +1,117 @@
// Created on: 1991-06-25
// Created by: Christophe MARION
// Copyright (c) 1991-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 _DBRep_HeaderFile
#define _DBRep_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_CString.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <Standard_Boolean.hxx>
#include <Draw_Interpretor.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class TopoDS_Shape;
class DBRep_Edge;
class DBRep_Face;
class DBRep_HideData;
class DBRep_DrawableShape;
class DBRep_IsoBuilder;
//! Used to display BRep objects using the DrawTrSurf
//! package.
//! The DrawableShape is a Display object build from a
//! Shape.
//! Provides methods to manage a directory of named shapes.
//! Provides a set of Draw commands for Shapes.
class DBRep
{
public:
DEFINE_STANDARD_ALLOC
//! Creation of isoparametric curves.
//! Implements ProgressIndicator for DRAW
//! Sets <S> in the variable <Name>. Overwrite the
//! variable if already set.
Standard_EXPORT static void Set (const Standard_CString Name, const TopoDS_Shape& S);
//! Returns the shape in the variable <Name>. Returns
//! a null shape if the variable is not set or not of
//! the given <Typ>. If <Complain> is True a message
//! is printed on cout if the variable is not set.
Standard_EXPORT static TopoDS_Shape Get (Standard_CString& Name, const TopAbs_ShapeEnum Typ = TopAbs_SHAPE, const Standard_Boolean Complain = Standard_False);
//! Defines the basic commands.
Standard_EXPORT static void BasicCommands (Draw_Interpretor& theCommands);
//! True if HLR, False if wireframe.
Standard_EXPORT static Standard_Boolean HLRMode();
//! True if display Rg1Lines.
Standard_EXPORT static Standard_Boolean Rg1Mode();
//! True if display RgNLines.
Standard_EXPORT static Standard_Boolean RgNMode();
//! True if display HiddenLines.
Standard_EXPORT static Standard_Boolean HidMode();
//! discretisation angle for edges.
Standard_EXPORT static Standard_Real HLRAngle();
//! number of iso in U and V
Standard_EXPORT static Standard_Integer NbIsos();
//! discretisation number of points for curves
//! set progress indicator
//! get progress indicator
Standard_EXPORT static Standard_Integer Discretisation();
protected:
private:
friend class DBRep_Edge;
friend class DBRep_Face;
friend class DBRep_HideData;
friend class DBRep_DrawableShape;
friend class DBRep_IsoBuilder;
};
#endif // _DBRep_HeaderFile

View File

@@ -1,159 +0,0 @@
-- Created on: 1991-07-04
-- Created by: Christophe MARION
-- Copyright (c) 1991-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.
class DrawableShape from DBRep inherits Drawable3D from Draw
---Purpose: Drawable structure to display a shape. Contains a
-- list of edges and a list of faces.
uses
Shape from TopoDS,
Color from Draw,
Display from Draw,
Trsf from gp,
ListOfEdge from DBRep,
ListOfFace from DBRep,
ListOfHideData from DBRep,
Interpretor from Draw,
Triangulation from Poly,
OStream
raises
DomainError
is
Create (C: Shape from TopoDS;
FreeCol : Color from Draw; -- color for free edges
ConnCol : Color from Draw; -- color for shared edges
EdgeCol : Color from Draw; -- color for other edges
IsosCol : Color from Draw; -- color for Isos
size : Real; -- size for infinite isos
nbisos : Integer; -- # of isos on each face
discret : Integer) -- # of points on curves
returns DrawableShape from DBRep
raises DomainError;
Set (me : mutable; C: Shape from TopoDS)
is static;
ChangeNbIsos (me : mutable ; NbIsos : Integer from Standard)
---Purpose: Changes the number of isoparametric curves in a shape.
is static ;
NbIsos (me)
---Purpose: Returns the number of isoparametric curves in a shape.
returns Integer from Standard
is static ;
ChangeDiscret (me : mutable ; Discret : Integer from Standard)
---Purpose: Changes the number of isoparametric curves in a shape.
is static ;
Discret (me)
---Purpose: Returns the discretisation value of curve
returns Integer from Standard
is static ;
Shape(me) returns Shape from TopoDS
---Purpose: Return const &
is static;
DisplayOrientation(me : mutable; D : Boolean)
---Purpose: When True the orientations of the edges and free
-- vertices are displayed.
is static;
DisplayTriangulation(me : mutable; D : Boolean)
---Purpose: When True the triangulations of the faces
-- are displayed even if there is a surface.
is static;
DisplayPolygons(me : mutable; D : Boolean)
---Purpose: When True the polygons of the edges
-- are displayed even if there is a geometric curve.
is static;
DisplayHLR(me : mutable; withHLR : Boolean;
withRg1 : Boolean;
withRgN : Boolean;
withHid : Boolean;
ang : Real);
---Purpose: Performs Hidden lines.
DisplayTriangulation(me)
---Purpose:
returns Boolean
is static;
DisplayPolygons(me)
---Purpose:
returns Boolean
is static;
GetDisplayHLR(me; withHLR : out Boolean;
withRg1 : out Boolean;
withRgN : out Boolean;
withHid : out Boolean;
ang : out Real);
DrawOn(me; dis : in out Display from Draw);
Display(me; T : Triangulation from Poly;
tr : Trsf from gp;
dis : in out Display from Draw)
---Purpose:
is static private;
DisplayHiddenLines(me : mutable; dis : in out Display from Draw);
Copy(me) returns Drawable3D from Draw
---Purpose: For variable copy.
is redefined;
Dump(me; S : in out OStream)
---Purpose: For variable dump.
is redefined;
Whatis(me; I : in out Interpretor from Draw)
---Purpose: For variable whatis command.
is redefined;
LastPick(myclass; S : in out Shape from TopoDS; u,v : in out Real);
---Purpose: Returns the subshape touched by the last pick.
-- u,v are the parameters of the closest point.
fields
myShape : Shape from TopoDS;
myEdges : ListOfEdge from DBRep;
myFaces : ListOfFace from DBRep;
myHidData : ListOfHideData from DBRep;
mySize : Real from Standard;
myDiscret : Integer from Standard;
myFreeCol : Color from Draw;
myConnCol : Color from Draw;
myEdgeCol : Color from Draw;
myIsosCol : Color from Draw;
myNbIsos : Integer from Standard;
myDispOr : Boolean from Standard;
mytriangulations : Boolean from Standard;
mypolygons : Boolean from Standard;
myHLR : Boolean from Standard;
myRg1 : Boolean from Standard;
myRgN : Boolean from Standard;
myHid : Boolean from Standard;
myAng : Real from Standard;
end DrawableShape;

View File

@@ -14,58 +14,51 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DBRep_DrawableShape.ixx>
#include <Draw_Appli.hxx>
#include <DBRep_Face.hxx>
#include <DBRep_Edge.hxx>
#include <DBRep_IsoBuilder.hxx>
#include <DBRep_ListIteratorOfListOfFace.hxx>
#include <DBRep_ListIteratorOfListOfEdge.hxx>
#include <DBRep_ListIteratorOfListOfHideData.hxx>
#include <DBRep_HideData.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <HLRBRep.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Trsf.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_Triangulation.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
#include <Poly_Connect.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <Precision.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRepTools.hxx>
#include <DBRep_DrawableShape.hxx>
#include <DBRep_Edge.hxx>
#include <DBRep_Face.hxx>
#include <DBRep_HideData.hxx>
#include <DBRep_IsoBuilder.hxx>
#include <DBRep_ListIteratorOfListOfEdge.hxx>
#include <DBRep_ListIteratorOfListOfFace.hxx>
#include <DBRep_ListIteratorOfListOfHideData.hxx>
#include <Draw_Appli.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Trsf.hxx>
#include <HLRBRep.hxx>
#include <Poly_Connect.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
#include <Poly_Triangulation.hxx>
#include <Precision.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Type.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
static Standard_Real IsoRatio = 1.001;

View File

@@ -0,0 +1,155 @@
// Created on: 1991-07-04
// Created by: Christophe MARION
// Copyright (c) 1991-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 _DBRep_DrawableShape_HeaderFile
#define _DBRep_DrawableShape_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
#include <DBRep_ListOfEdge.hxx>
#include <DBRep_ListOfFace.hxx>
#include <DBRep_ListOfHideData.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Draw_Color.hxx>
#include <Standard_Boolean.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class Standard_DomainError;
class TopoDS_Shape;
class Draw_Color;
class Draw_Display;
class Poly_Triangulation;
class gp_Trsf;
class Draw_Drawable3D;
class DBRep_DrawableShape;
DEFINE_STANDARD_HANDLE(DBRep_DrawableShape, Draw_Drawable3D)
//! Drawable structure to display a shape. Contains a
//! list of edges and a list of faces.
class DBRep_DrawableShape : public Draw_Drawable3D
{
public:
Standard_EXPORT DBRep_DrawableShape(const TopoDS_Shape& C, const Draw_Color& FreeCol, const Draw_Color& ConnCol, const Draw_Color& EdgeCol, const Draw_Color& IsosCol, const Standard_Real size, const Standard_Integer nbisos, const Standard_Integer discret);
Standard_EXPORT void Set (const TopoDS_Shape& C);
//! Changes the number of isoparametric curves in a shape.
Standard_EXPORT void ChangeNbIsos (const Standard_Integer NbIsos);
//! Returns the number of isoparametric curves in a shape.
Standard_EXPORT Standard_Integer NbIsos() const;
//! Changes the number of isoparametric curves in a shape.
Standard_EXPORT void ChangeDiscret (const Standard_Integer Discret);
//! Returns the discretisation value of curve
Standard_EXPORT Standard_Integer Discret() const;
//! Return const &
Standard_EXPORT TopoDS_Shape Shape() const;
//! When True the orientations of the edges and free
//! vertices are displayed.
Standard_EXPORT void DisplayOrientation (const Standard_Boolean D);
//! When True the triangulations of the faces
//! are displayed even if there is a surface.
Standard_EXPORT void DisplayTriangulation (const Standard_Boolean D);
//! When True the polygons of the edges
//! are displayed even if there is a geometric curve.
Standard_EXPORT void DisplayPolygons (const Standard_Boolean D);
//! Performs Hidden lines.
Standard_EXPORT void DisplayHLR (const Standard_Boolean withHLR, const Standard_Boolean withRg1, const Standard_Boolean withRgN, const Standard_Boolean withHid, const Standard_Real ang);
Standard_EXPORT Standard_Boolean DisplayTriangulation() const;
Standard_EXPORT Standard_Boolean DisplayPolygons() const;
Standard_EXPORT void GetDisplayHLR (Standard_Boolean& withHLR, Standard_Boolean& withRg1, Standard_Boolean& withRgN, Standard_Boolean& withHid, Standard_Real& ang) const;
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
Standard_EXPORT void DisplayHiddenLines (Draw_Display& dis);
//! 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;
//! For variable whatis command.
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
//! Returns the subshape touched by the last pick.
//! u,v are the parameters of the closest point.
Standard_EXPORT static void LastPick (TopoDS_Shape& S, Standard_Real& u, Standard_Real& v);
DEFINE_STANDARD_RTTI(DBRep_DrawableShape,Draw_Drawable3D)
protected:
private:
Standard_EXPORT void Display (const Handle(Poly_Triangulation)& T, const gp_Trsf& tr, Draw_Display& dis) const;
TopoDS_Shape myShape;
DBRep_ListOfEdge myEdges;
DBRep_ListOfFace myFaces;
DBRep_ListOfHideData myHidData;
Standard_Real mySize;
Standard_Integer myDiscret;
Draw_Color myFreeCol;
Draw_Color myConnCol;
Draw_Color myEdgeCol;
Draw_Color myIsosCol;
Standard_Integer myNbIsos;
Standard_Boolean myDispOr;
Standard_Boolean mytriangulations;
Standard_Boolean mypolygons;
Standard_Boolean myHLR;
Standard_Boolean myRg1;
Standard_Boolean myRgN;
Standard_Boolean myHid;
Standard_Real myAng;
};
#endif // _DBRep_DrawableShape_HeaderFile

View File

@@ -1,49 +0,0 @@
-- Created on: 1993-07-15
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-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.
class Edge from DBRep inherits TShared from MMgt
---Purpose: Display of an edge. Edge + color.
uses
Edge from TopoDS,
Color from Draw
is
Create (E : Edge from TopoDS; C : Color from Draw)
returns Edge from DBRep;
Edge(me) returns Edge from TopoDS
---C++: return const &
---C++: inline
is static;
Edge(me : mutable; E : Edge from TopoDS)
---C++: inline
is static;
Color(me) returns Color from Draw
---C++: return const &
---C++: inline
is static;
Color(me : mutable; C : Color from Draw)
---C++: inline
is static;
fields
myEdge : Edge from TopoDS;
myColor : Color from Draw;
end Edge;

View File

@@ -14,13 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DBRep_Edge.ixx>
#include <DBRep_Edge.hxx>
#include <Draw_Color.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Edge.hxx>
//=======================================================================
//function : DBRep_Edge
//purpose :
//=======================================================================
DBRep_Edge::DBRep_Edge(const TopoDS_Edge& E, const Draw_Color& C) :
myEdge(E),
myColor(C)

76
src/DBRep/DBRep_Edge.hxx Normal file
View File

@@ -0,0 +1,76 @@
// Created on: 1993-07-15
// Created by: Remi LEQUETTE
// Copyright (c) 1993-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 _DBRep_Edge_HeaderFile
#define _DBRep_Edge_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Edge.hxx>
#include <Draw_Color.hxx>
#include <MMgt_TShared.hxx>
class TopoDS_Edge;
class Draw_Color;
class DBRep_Edge;
DEFINE_STANDARD_HANDLE(DBRep_Edge, MMgt_TShared)
//! Display of an edge. Edge + color.
class DBRep_Edge : public MMgt_TShared
{
public:
Standard_EXPORT DBRep_Edge(const TopoDS_Edge& E, const Draw_Color& C);
const TopoDS_Edge& Edge() const;
void Edge (const TopoDS_Edge& E);
const Draw_Color& Color() const;
void Color (const Draw_Color& C);
DEFINE_STANDARD_RTTI(DBRep_Edge,MMgt_TShared)
protected:
private:
TopoDS_Edge myEdge;
Draw_Color myColor;
};
#include <DBRep_Edge.lxx>
#endif // _DBRep_Edge_HeaderFile

View File

@@ -1,75 +0,0 @@
-- Created on: 1993-07-15
-- Created by: Remi LEQUETTE
-- Copyright (c) 1993-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.
class Face from DBRep inherits TShared from MMgt
---Purpose: Display of a face. Face + Array of iso + color.
uses
Face from TopoDS,
IsoType from GeomAbs,
Array1OfInteger from TColStd,
Array1OfReal from TColStd,
Color from Draw
is
Create (F : Face from TopoDS;
N : Integer;
C : Color from Draw)
returns Face from DBRep;
---Purpose: N is the number of iso intervals.
Face(me) returns Face from TopoDS
---C++: return const &
---C++: inline
is static;
Face(me : mutable; F : Face from TopoDS)
---C++: inline
is static;
NbIsos(me) returns Integer
---C++: inline
is static;
Iso(me : mutable;
I : Integer;
T : IsoType from GeomAbs;
Par, T1, T2 : Real)
---C++: inline
is static;
GetIso(me;
I : Integer;
T : out IsoType from GeomAbs;
Par, T1, T2 : out Real)
---C++: inline
is static;
Color(me) returns Color from Draw
---C++: return const &
---C++: inline
is static;
Color(me : mutable; C : Color from Draw)
---C++: inline
is static;
fields
myFace : Face from TopoDS;
myColor : Color from Draw;
myTypes : Array1OfInteger from TColStd;
myParams : Array1OfReal from TColStd;
end Face;

View File

@@ -14,13 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DBRep_Face.ixx>
#include <DBRep_Face.hxx>
#include <Draw_Color.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Face.hxx>
//=======================================================================
//function : DBRep_Face
//purpose :
//=======================================================================
DBRep_Face::DBRep_Face(const TopoDS_Face& F,
const Standard_Integer N,
const Draw_Color& C) :

90
src/DBRep/DBRep_Face.hxx Normal file
View File

@@ -0,0 +1,90 @@
// Created on: 1993-07-15
// Created by: Remi LEQUETTE
// Copyright (c) 1993-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 _DBRep_Face_HeaderFile
#define _DBRep_Face_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Face.hxx>
#include <Draw_Color.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_IsoType.hxx>
#include <Standard_Real.hxx>
class TopoDS_Face;
class Draw_Color;
class DBRep_Face;
DEFINE_STANDARD_HANDLE(DBRep_Face, MMgt_TShared)
//! Display of a face. Face + Array of iso + color.
class DBRep_Face : public MMgt_TShared
{
public:
//! N is the number of iso intervals.
Standard_EXPORT DBRep_Face(const TopoDS_Face& F, const Standard_Integer N, const Draw_Color& C);
const TopoDS_Face& Face() const;
void Face (const TopoDS_Face& F);
Standard_Integer NbIsos() const;
void Iso (const Standard_Integer I, const GeomAbs_IsoType T, const Standard_Real Par, const Standard_Real T1, const Standard_Real T2);
void GetIso (const Standard_Integer I, GeomAbs_IsoType& T, Standard_Real& Par, Standard_Real& T1, Standard_Real& T2) const;
const Draw_Color& Color() const;
void Color (const Draw_Color& C);
DEFINE_STANDARD_RTTI(DBRep_Face,MMgt_TShared)
protected:
private:
TopoDS_Face myFace;
Draw_Color myColor;
TColStd_Array1OfInteger myTypes;
TColStd_Array1OfReal myParams;
};
#include <DBRep_Face.lxx>
#endif // _DBRep_Face_HeaderFile

View File

@@ -1,82 +0,0 @@
-- Created on: 1995-09-21
-- 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.
class HideData from DBRep
---Purpose: This class stores all the informations concerning
-- hidden lines on a view.
--
-- * View number
-- * Matrix of projection
-- * Type of projection, focal
-- * Arrays of 3d points
--
-- A drawable shape contains a list of such objects
-- to store the hidden lines for each view. The
-- IsSame method is used to check if hidden lines
-- must be recompiled.
uses
Trsf from gp,
Display from Draw,
Color from Draw,
Shape from TopoDS,
ListOfBPoint from HLRBRep
is
Create returns HideData from DBRep;
Set (me : in out;
ViewId : Integer from Standard;
TProj : Trsf from gp;
Focal : Real from Standard;
S : Shape from TopoDS;
ang : Real from Standard);
---Purpose: ViewId is the view number
-- TProj the projection
-- Focal <= 0 means parallel projection
-- Alg : the hidden lines
ViewId(me) returns Integer from Standard;
---C++: inline
Angle(me) returns Real from Standard;
---C++: inline
IsSame(me; TProj : Trsf from gp; Focla : Real) returns Boolean;
---Purpose: Returns True if the projection is the same
DrawOn(me :in out;
D : in out Display from Draw;
withRg1,withRgN,withHid : Boolean from Standard;
VisCol, HidCol : Color from Draw);
LastPick(me) returns Shape from TopoDS;
---Purpose: Returns the subshape touched by the last pick.
---C++: return const &
fields
myView : Integer from Standard;
myTrsf : Trsf from gp;
myFocal : Real from Standard;
myBiPntVis : ListOfBPoint from HLRBRep;
myBiPntHid : ListOfBPoint from HLRBRep;
myPickShap : Shape from TopoDS;
myAngle : Real from Standard;
end HideData;

View File

@@ -14,11 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DBRep_HideData.ixx>
#include <HLRBRep_PolyAlgo.hxx>
#include <DBRep_HideData.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp_Trsf.hxx>
#include <HLRAlgo_EdgeIterator.hxx>
#include <HLRBRep_BiPoint.hxx>
#include <HLRBRep_ListIteratorOfListOfBPoint.hxx>
#include <HLRBRep_PolyAlgo.hxx>
#include <TopoDS_Shape.hxx>
#define PntX1 ((Standard_Real*)Coordinates)[0]
#define PntY1 ((Standard_Real*)Coordinates)[1]

View File

@@ -0,0 +1,106 @@
// Created on: 1995-09-21
// 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 _DBRep_HideData_HeaderFile
#define _DBRep_HideData_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <gp_Trsf.hxx>
#include <Standard_Real.hxx>
#include <HLRBRep_ListOfBPoint.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
class gp_Trsf;
class TopoDS_Shape;
class Draw_Display;
class Draw_Color;
//! This class stores all the informations concerning
//! hidden lines on a view.
//!
//! * View number
//! * Matrix of projection
//! * Type of projection, focal
//! * Arrays of 3d points
//!
//! A drawable shape contains a list of such objects
//! to store the hidden lines for each view. The
//! IsSame method is used to check if hidden lines
//! must be recompiled.
class DBRep_HideData
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT DBRep_HideData();
//! ViewId is the view number
//! TProj the projection
//! Focal <= 0 means parallel projection
//! Alg : the hidden lines
Standard_EXPORT void Set (const Standard_Integer ViewId, const gp_Trsf& TProj, const Standard_Real Focal, const TopoDS_Shape& S, const Standard_Real ang);
Standard_Integer ViewId() const;
Standard_Real Angle() const;
//! Returns True if the projection is the same
Standard_EXPORT Standard_Boolean IsSame (const gp_Trsf& TProj, const Standard_Real Focla) const;
Standard_EXPORT void DrawOn (Draw_Display& D, const Standard_Boolean withRg1, const Standard_Boolean withRgN, const Standard_Boolean withHid, const Draw_Color& VisCol, const Draw_Color& HidCol);
//! Returns the subshape touched by the last pick.
Standard_EXPORT const TopoDS_Shape& LastPick() const;
protected:
private:
Standard_Integer myView;
gp_Trsf myTrsf;
Standard_Real myFocal;
HLRBRep_ListOfBPoint myBiPntVis;
HLRBRep_ListOfBPoint myBiPntHid;
TopoDS_Shape myPickShap;
Standard_Real myAngle;
};
#include <DBRep_HideData.lxx>
#endif // _DBRep_HideData_HeaderFile

View File

@@ -1,73 +0,0 @@
-- Created on: 1994-03-25
-- Created by: Jean Marc LACHAUME
-- 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.
class IsoBuilder from DBRep
---Purpose: Creation of isoparametric curves.
inherits Hatcher from Geom2dHatch
uses
Face from TopoDS ,
Face from DBRep ,
Array1OfReal from TColStd ,
Array1OfInteger from TColStd
is
Create (TopologicalFace : Face from TopoDS ;
Infinite : Real from Standard ;
NbIsos : Integer from Standard)
---Purpose: Creates the builder.
returns IsoBuilder from DBRep ;
NbDomains (me)
---Purpose: Returns the total number of domains.
---C++: inline
returns Integer from Standard
is static ;
LoadIsos (me; Face : Face from DBRep)
---Purpose: Loading of the isoparametric curves in the
-- Data Structure of a drawable face.
is static ;
fields
myInfinite : Real from Standard ;
myUMin : Real from Standard ;
myUMax : Real from Standard ;
myVMin : Real from Standard ;
myVMax : Real from Standard ;
myUPrm : Array1OfReal from TColStd ;
myUInd : Array1OfInteger from TColStd ;
myVPrm : Array1OfReal from TColStd ;
myVInd : Array1OfInteger from TColStd ;
myNbDom : Integer from Standard ;
end IsoBuilder;

View File

@@ -14,24 +14,25 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <DBRep_IsoBuilder.ixx>
#include <Precision.hxx>
#include <BRepTools.hxx>
#include <BRep_Tool.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <BRepTools.hxx>
#include <DBRep_Face.hxx>
#include <DBRep_IsoBuilder.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt2d.hxx>
#include <HatchGen_Domain.hxx>
#include <Precision.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt2d.hxx>
#include <TopoDS_Face.hxx>
// Modified by Sergey KHROMOV - Thu Nov 9 12:08:37 2000
static Standard_Real IntersectorConfusion = 1.e-10 ; // -8 ;

View File

@@ -0,0 +1,85 @@
// Created on: 1994-03-25
// Created by: Jean Marc LACHAUME
// 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 _DBRep_IsoBuilder_HeaderFile
#define _DBRep_IsoBuilder_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <TColStd_Array1OfReal.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <Standard_Integer.hxx>
#include <Geom2dHatch_Hatcher.hxx>
class TopoDS_Face;
class DBRep_Face;
//! Creation of isoparametric curves.
class DBRep_IsoBuilder : public Geom2dHatch_Hatcher
{
public:
DEFINE_STANDARD_ALLOC
//! Creates the builder.
Standard_EXPORT DBRep_IsoBuilder(const TopoDS_Face& TopologicalFace, const Standard_Real Infinite, const Standard_Integer NbIsos);
//! Returns the total number of domains.
Standard_Integer NbDomains() const;
//! Loading of the isoparametric curves in the
//! Data Structure of a drawable face.
Standard_EXPORT void LoadIsos (const Handle(DBRep_Face)& Face) const;
protected:
private:
Standard_Real myInfinite;
Standard_Real myUMin;
Standard_Real myUMax;
Standard_Real myVMin;
Standard_Real myVMax;
TColStd_Array1OfReal myUPrm;
TColStd_Array1OfInteger myUInd;
TColStd_Array1OfReal myVPrm;
TColStd_Array1OfInteger myVInd;
Standard_Integer myNbDom;
};
#include <DBRep_IsoBuilder.lxx>
#endif // _DBRep_IsoBuilder_HeaderFile

View File

@@ -1,7 +1,23 @@
DBRep.cxx
DBRep.hxx
DBRep_Debug.cxx
DBRep_ListOfEdge.hxx
DBRep_DrawableShape.cxx
DBRep_DrawableShape.hxx
DBRep_Edge.cxx
DBRep_Edge.hxx
DBRep_Edge.lxx
DBRep_Face.cxx
DBRep_Face.hxx
DBRep_Face.lxx
DBRep_HideData.cxx
DBRep_HideData.hxx
DBRep_HideData.lxx
DBRep_IsoBuilder.cxx
DBRep_IsoBuilder.hxx
DBRep_IsoBuilder.lxx
DBRep_ListIteratorOfListOfEdge.hxx
DBRep_ListOfFace.hxx
DBRep_ListIteratorOfListOfFace.hxx
DBRep_ListOfHideData.hxx
DBRep_ListIteratorOfListOfHideData.hxx
DBRep_ListOfEdge.hxx
DBRep_ListOfFace.hxx
DBRep_ListOfHideData.hxx