1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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,12 +1,64 @@
HLRAlgo_ListOfBPoint.hxx
HLRAlgo_ListIteratorOfListOfBPoint.hxx
HLRAlgo.cxx
HLRAlgo.hxx
HLRAlgo_Array1OfPHDat.hxx
HLRAlgo_HArray1OfPHDat.hxx
HLRAlgo_Array1OfPISeg.hxx
HLRAlgo_HArray1OfPISeg.hxx
HLRAlgo_Array1OfPINod.hxx
HLRAlgo_HArray1OfPINod.hxx
HLRAlgo_Array1OfPISeg.hxx
HLRAlgo_Array1OfTData.hxx
HLRAlgo_BiPoint.cxx
HLRAlgo_BiPoint.hxx
HLRAlgo_BiPoint.lxx
HLRAlgo_Coincidence.cxx
HLRAlgo_Coincidence.hxx
HLRAlgo_Coincidence.lxx
HLRAlgo_EdgeIterator.cxx
HLRAlgo_EdgeIterator.hxx
HLRAlgo_EdgeIterator.lxx
HLRAlgo_EdgesBlock.cxx
HLRAlgo_EdgesBlock.hxx
HLRAlgo_EdgesBlock.lxx
HLRAlgo_EdgeStatus.cxx
HLRAlgo_EdgeStatus.hxx
HLRAlgo_EdgeStatus.lxx
HLRAlgo_HArray1OfPHDat.hxx
HLRAlgo_HArray1OfPINod.hxx
HLRAlgo_HArray1OfPISeg.hxx
HLRAlgo_HArray1OfTData.hxx
HLRAlgo_Interference.hxx
HLRAlgo_Interference_0.cxx
HLRAlgo_InterferenceList.hxx
HLRAlgo_Intersection.cxx
HLRAlgo_Intersection.hxx
HLRAlgo_Intersection.lxx
HLRAlgo_ListIteratorOfInterferenceList.hxx
HLRAlgo_ListIteratorOfListOfBPoint.hxx
HLRAlgo_ListOfBPoint.hxx
HLRAlgo_PolyAlgo.cxx
HLRAlgo_PolyAlgo.hxx
HLRAlgo_PolyAlgo.lxx
HLRAlgo_PolyData.cxx
HLRAlgo_PolyData.hxx
HLRAlgo_PolyData.lxx
HLRAlgo_PolyHidingData.cxx
HLRAlgo_PolyHidingData.hxx
HLRAlgo_PolyHidingData.lxx
HLRAlgo_PolyInternalData.cxx
HLRAlgo_PolyInternalData.hxx
HLRAlgo_PolyInternalData.lxx
HLRAlgo_PolyInternalNode.cxx
HLRAlgo_PolyInternalNode.hxx
HLRAlgo_PolyInternalNode.lxx
HLRAlgo_PolyInternalSegment.cxx
HLRAlgo_PolyInternalSegment.hxx
HLRAlgo_PolyInternalSegment.lxx
HLRAlgo_PolyShellData.cxx
HLRAlgo_PolyShellData.hxx
HLRAlgo_PolyShellData.lxx
HLRAlgo_Projector.cxx
HLRAlgo_Projector.hxx
HLRAlgo_Projector.lxx
HLRAlgo_TriangleData.cxx
HLRAlgo_TriangleData.hxx
HLRAlgo_TriangleData.lxx
HLRAlgo_WiresBlock.cxx
HLRAlgo_WiresBlock.hxx
HLRAlgo_WiresBlock.lxx

View File

@@ -1,154 +0,0 @@
-- Created on: 1992-02-18
-- 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.
package HLRAlgo
--- Purpose: In order to have the precision required in
-- industrial design, drawings need to offer the
-- possibility of removing lines, which are hidden
-- in a given projection. To do this, the Hidden
-- Line Removal component provides two
-- algorithms: HLRBRep_Algo and HLRBRep_PolyAlgo.
-- These algorithms remove or indicate lines
-- hidden by surfaces. For a given projection, they
-- calculate a set of lines characteristic of the
-- object being represented. They are also used
-- in conjunction with extraction utilities, which
-- reconstruct a new, simplified shape from a
-- selection of calculation results. This new shape
-- is made up of edges, which represent the lines
-- of the visualized shape in a plane. This plane is the projection plane.
-- HLRBRep_Algo takes into account the shape
-- itself. HLRBRep_PolyAlgo works with a
-- polyhedral simplification of the shape. When
-- you use HLRBRep_Algo, you obtain an exact
-- result, whereas, when you use
-- HLRBRep_PolyAlgo, you reduce computation
-- time but obtain polygonal segments.
uses
Standard,
StdFail,
MMgt,
TCollection,
TColStd,
TColgp,
Intrv,
gp,
GeomAbs,
TopAbs,
TopBas,
TopCnx,
TopLoc,
IntRes2d,
IntCurveSurface
is
class BiPoint;
imported ListOfBPoint;
imported ListIteratorOfListOfBPoint;
class PolyShellData;
class PolyInternalData;
class PolyInternalSegment;
class PolyInternalNode;
class PolyData;
class PolyHidingData;
class TriangleData;
imported Array1OfPHDat;
imported transient class HArray1OfPHDat;
imported Array1OfPISeg;
imported transient class HArray1OfPISeg;
imported Array1OfPINod;
imported transient class HArray1OfPINod;
imported Array1OfTData;
imported transient class HArray1OfTData;
class PolyAlgo;
class EdgeStatus;
class Projector;
class Intersection;
class Coincidence;
class Interference instantiates Interference from TopBas
(Intersection from HLRAlgo,
Coincidence from HLRAlgo);
imported InterferenceList;
imported ListIteratorOfInterferenceList;
class EdgesBlock;
class WiresBlock;
class EdgeIterator;
---Purpose: Iterator on the visible or hidden parts of an
-- EdgeStatus.
UpdateMinMax (x,y,z : Real from Standard;
Min : Address from Standard;
Max : Address from Standard);
EnlargeMinMax (tol : Real from Standard;
Min : Address from Standard;
Max : Address from Standard);
InitMinMax (Big : Real from Standard;
Min : Address from Standard;
Max : Address from Standard);
EncodeMinMax (Min : Address from Standard;
Max : Address from Standard;
MinMax : Address from Standard);
SizeBox (Min : Address from Standard;
Max : Address from Standard)
returns Real from Standard;
DecodeMinMax (MinMax : Address from Standard;
Min : Address from Standard;
Max : Address from Standard);
CopyMinMax (IMin : Address from Standard;
IMax : Address from Standard;
OMin : Address from Standard;
OMax : Address from Standard);
AddMinMax (IMin : Address from Standard;
IMax : Address from Standard;
OMin : Address from Standard;
OMax : Address from Standard);
end HLRAlgo;

View File

@@ -14,7 +14,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo.ixx>
#include <HLRAlgo.hxx>
static const Standard_Real cosu0 = cos(0.*M_PI/14.);
static const Standard_Real sinu0 = sin(0.*M_PI/14.);

132
src/HLRAlgo/HLRAlgo.hxx Normal file
View File

@@ -0,0 +1,132 @@
// Created on: 1992-02-18
// 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 _HLRAlgo_HeaderFile
#define _HLRAlgo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
class HLRAlgo_BiPoint;
class HLRAlgo_PolyShellData;
class HLRAlgo_PolyInternalData;
class HLRAlgo_PolyInternalSegment;
class HLRAlgo_PolyInternalNode;
class HLRAlgo_PolyData;
class HLRAlgo_PolyHidingData;
class HLRAlgo_TriangleData;
class HLRAlgo_PolyAlgo;
class HLRAlgo_EdgeStatus;
class HLRAlgo_Projector;
class HLRAlgo_Intersection;
class HLRAlgo_Coincidence;
class HLRAlgo_Interference;
class HLRAlgo_EdgesBlock;
class HLRAlgo_WiresBlock;
class HLRAlgo_EdgeIterator;
//! In order to have the precision required in
//! industrial design, drawings need to offer the
//! possibility of removing lines, which are hidden
//! in a given projection. To do this, the Hidden
//! Line Removal component provides two
//! algorithms: HLRBRep_Algo and HLRBRep_PolyAlgo.
//! These algorithms remove or indicate lines
//! hidden by surfaces. For a given projection, they
//! calculate a set of lines characteristic of the
//! object being represented. They are also used
//! in conjunction with extraction utilities, which
//! reconstruct a new, simplified shape from a
//! selection of calculation results. This new shape
//! is made up of edges, which represent the lines
//! of the visualized shape in a plane. This plane is the projection plane.
//! HLRBRep_Algo takes into account the shape
//! itself. HLRBRep_PolyAlgo works with a
//! polyhedral simplification of the shape. When
//! you use HLRBRep_Algo, you obtain an exact
//! result, whereas, when you use
//! HLRBRep_PolyAlgo, you reduce computation
//! time but obtain polygonal segments.
class HLRAlgo
{
public:
DEFINE_STANDARD_ALLOC
//! Iterator on the visible or hidden parts of an
//! EdgeStatus.
Standard_EXPORT static void UpdateMinMax (const Standard_Real x, const Standard_Real y, const Standard_Real z, const Standard_Address Min, const Standard_Address Max);
Standard_EXPORT static void EnlargeMinMax (const Standard_Real tol, const Standard_Address Min, const Standard_Address Max);
Standard_EXPORT static void InitMinMax (const Standard_Real Big, const Standard_Address Min, const Standard_Address Max);
Standard_EXPORT static void EncodeMinMax (const Standard_Address Min, const Standard_Address Max, const Standard_Address MinMax);
Standard_EXPORT static Standard_Real SizeBox (const Standard_Address Min, const Standard_Address Max);
Standard_EXPORT static void DecodeMinMax (const Standard_Address MinMax, const Standard_Address Min, const Standard_Address Max);
Standard_EXPORT static void CopyMinMax (const Standard_Address IMin, const Standard_Address IMax, const Standard_Address OMin, const Standard_Address OMax);
Standard_EXPORT static void AddMinMax (const Standard_Address IMin, const Standard_Address IMax, const Standard_Address OMin, const Standard_Address OMax);
protected:
private:
friend class HLRAlgo_BiPoint;
friend class HLRAlgo_PolyShellData;
friend class HLRAlgo_PolyInternalData;
friend class HLRAlgo_PolyInternalSegment;
friend class HLRAlgo_PolyInternalNode;
friend class HLRAlgo_PolyData;
friend class HLRAlgo_PolyHidingData;
friend class HLRAlgo_TriangleData;
friend class HLRAlgo_PolyAlgo;
friend class HLRAlgo_EdgeStatus;
friend class HLRAlgo_Projector;
friend class HLRAlgo_Intersection;
friend class HLRAlgo_Coincidence;
friend class HLRAlgo_Interference;
friend class HLRAlgo_EdgesBlock;
friend class HLRAlgo_WiresBlock;
friend class HLRAlgo_EdgeIterator;
};
#endif // _HLRAlgo_HeaderFile

View File

@@ -1,117 +0,0 @@
-- Created on: 1995-06-22
-- 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.
class BiPoint from HLRAlgo
uses
Address from Standard,
Boolean from Standard,
Integer from Standard
is
Create
returns BiPoint from HLRAlgo;
---C++: inline
Create(X1,Y1,Z1,X2,Y2,Z2 : Real from Standard;
XT1,YT1,ZT1,XT2,YT2,ZT2 : Real from Standard;
Index : Integer from Standard;
reg1,regn,outl,intl : Boolean from Standard)
returns BiPoint from HLRAlgo;
Create(X1,Y1,Z1,X2,Y2,Z2 : Real from Standard;
XT1,YT1,ZT1,XT2,YT2,ZT2 : Real from Standard;
Index : Integer from Standard;
flag : Boolean from Standard)
returns BiPoint from HLRAlgo;
Create(X1,Y1,Z1,X2,Y2,Z2 : Real from Standard;
XT1,YT1,ZT1,XT2,YT2,ZT2 : Real from Standard;
Index,i1,i1p1,i1p2 : Integer from Standard;
reg1,regn,outl,intl : Boolean from Standard)
returns BiPoint from HLRAlgo;
Create(X1,Y1,Z1,X2,Y2,Z2 : Real from Standard;
XT1,YT1,ZT1,XT2,YT2,ZT2 : Real from Standard;
Index,i1,i1p1,i1p2 : Integer from Standard;
flag : Boolean from Standard)
returns BiPoint from HLRAlgo;
Create(X1,Y1,Z1,X2,Y2,Z2 : Real from Standard;
XT1,YT1,ZT1,XT2,YT2,ZT2 : Real from Standard;
Index,i1,i1p1,i1p2,i2,i2p1,i2p2 : Integer from Standard;
reg1,regn,outl,intl : Boolean from Standard)
returns BiPoint from HLRAlgo;
Create(X1,Y1,Z1,X2,Y2,Z2 : Real from Standard;
XT1,YT1,ZT1,XT2,YT2,ZT2 : Real from Standard;
Index,i1,i1p1,i1p2,i2,i2p1,i2p2 : Integer from Standard;
flag : Boolean from Standard)
returns BiPoint from HLRAlgo;
Rg1Line(me) returns Boolean from Standard
---C++: inline
is static;
Rg1Line(me : in out; B : Boolean from Standard)
---C++: inline
is static;
RgNLine(me) returns Boolean from Standard
---C++: inline
is static;
RgNLine(me : in out; B : Boolean from Standard)
---C++: inline
is static;
OutLine(me) returns Boolean from Standard
---C++: inline
is static;
OutLine(me : in out; B : Boolean from Standard)
---C++: inline
is static;
IntLine(me) returns Boolean from Standard
---C++: inline
is static;
IntLine(me : in out; B : Boolean from Standard)
---C++: inline
is static;
Hidden(me) returns Boolean from Standard
---C++: inline
is static;
Hidden(me : in out; B : Boolean from Standard)
---C++: inline
is static;
Indices(me) returns Address from Standard
---C++: inline
is static;
Coordinates(me) returns Address from Standard
---C++: inline
is static;
fields
myIndices : Integer from Standard[10];
myCoordinates : Real from Standard[12];
end BiPoint;

View File

@@ -17,7 +17,9 @@
#ifndef No_Exception
#define No_Exception
#endif
#include <HLRAlgo_BiPoint.ixx>
#include <HLRAlgo_BiPoint.hxx>
#define PntX1 myCoordinates[ 0]
#define PntY1 myCoordinates[ 1]

View File

@@ -0,0 +1,102 @@
// Created on: 1995-06-22
// 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.
#ifndef _HLRAlgo_BiPoint_HeaderFile
#define _HLRAlgo_BiPoint_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Address.hxx>
class HLRAlgo_BiPoint
{
public:
DEFINE_STANDARD_ALLOC
HLRAlgo_BiPoint();
Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Boolean flag);
Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Boolean flag);
Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Boolean reg1, const Standard_Boolean regn, const Standard_Boolean outl, const Standard_Boolean intl);
Standard_EXPORT HLRAlgo_BiPoint(const Standard_Real X1, const Standard_Real Y1, const Standard_Real Z1, const Standard_Real X2, const Standard_Real Y2, const Standard_Real Z2, const Standard_Real XT1, const Standard_Real YT1, const Standard_Real ZT1, const Standard_Real XT2, const Standard_Real YT2, const Standard_Real ZT2, const Standard_Integer Index, const Standard_Integer i1, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i2, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Boolean flag);
Standard_Boolean Rg1Line() const;
void Rg1Line (const Standard_Boolean B);
Standard_Boolean RgNLine() const;
void RgNLine (const Standard_Boolean B);
Standard_Boolean OutLine() const;
void OutLine (const Standard_Boolean B);
Standard_Boolean IntLine() const;
void IntLine (const Standard_Boolean B);
Standard_Boolean Hidden() const;
void Hidden (const Standard_Boolean B);
Standard_Address Indices() const;
Standard_Address Coordinates() const;
protected:
private:
Standard_Integer myIndices[10];
Standard_Real myCoordinates[12];
};
#include <HLRAlgo_BiPoint.lxx>
#endif // _HLRAlgo_BiPoint_HeaderFile

View File

@@ -1,64 +0,0 @@
-- Created on: 1992-08-20
-- 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.
class Coincidence from HLRAlgo
---Purpose: The Coincidence class is used in an Inteference to
-- store informations on the "hiding" edge.
--
-- 2D Data : The tangent and the curvature of the
-- projection of the edge at the intersection point.
-- This is necesserary when the intersection is at
-- the extremity of the edge.
--
-- 3D Data : The state of the edge near the
-- intersection with the face (before and after).
-- This is necessary when the intersection is "ON"
-- the face.
uses
Integer from Standard,
Real from Standard,
State from TopAbs
is
Create returns Coincidence from HLRAlgo;
Set2D(me : in out; FE : Integer from Standard;
Param : Real from Standard)
---C++: inline
is static;
SetState3D(me : in out; stbef,staft : State from TopAbs)
---C++: inline
is static;
Value2D(me; FE : out Integer from Standard;
Param : out Real from Standard)
---C++: inline
is static;
State3D(me; stbef,staft : out State from TopAbs)
---C++: inline
is static;
fields
myFE : Integer from Standard;
myParam : Real from Standard;
myStBef : State from TopAbs;
myStAft : State from TopAbs;
end Coincidence;

View File

@@ -14,13 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_Coincidence.ixx>
#include <HLRAlgo_Coincidence.hxx>
//=======================================================================
//function : HLRAlgo_Coincidence
//purpose :
//=======================================================================
HLRAlgo_Coincidence::HLRAlgo_Coincidence()
: myFE(0),
myParam(0.),

View File

@@ -0,0 +1,86 @@
// Created on: 1992-08-20
// 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 _HLRAlgo_Coincidence_HeaderFile
#define _HLRAlgo_Coincidence_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <TopAbs_State.hxx>
//! The Coincidence class is used in an Inteference to
//! store informations on the "hiding" edge.
//!
//! 2D Data : The tangent and the curvature of the
//! projection of the edge at the intersection point.
//! This is necesserary when the intersection is at
//! the extremity of the edge.
//!
//! 3D Data : The state of the edge near the
//! intersection with the face (before and after).
//! This is necessary when the intersection is "ON"
//! the face.
class HLRAlgo_Coincidence
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT HLRAlgo_Coincidence();
void Set2D (const Standard_Integer FE, const Standard_Real Param);
void SetState3D (const TopAbs_State stbef, const TopAbs_State staft);
void Value2D (Standard_Integer& FE, Standard_Real& Param) const;
void State3D (TopAbs_State& stbef, TopAbs_State& staft) const;
protected:
private:
Standard_Integer myFE;
Standard_Real myParam;
TopAbs_State myStBef;
TopAbs_State myStAft;
};
#include <HLRAlgo_Coincidence.lxx>
#endif // _HLRAlgo_Coincidence_HeaderFile

View File

@@ -1,85 +0,0 @@
-- Created on: 1993-01-11
-- Created by: Christophe MARION
-- 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 EdgeIterator from HLRAlgo
uses
EdgeStatus from HLRAlgo,
Address from Standard,
Integer from Standard,
Boolean from Standard,
ShortReal from Standard,
Real from Standard
is
Create returns EdgeIterator from HLRAlgo;
---Purpose: Iterator on the visible or hidden parts of an
-- edge.
InitHidden(me : in out; status : EdgeStatus from HLRAlgo)
is static;
MoreHidden(me) returns Boolean from Standard
---C++: inline
is static;
NextHidden(me : in out)
is static;
Hidden(me; Start : out Real from Standard;
TolStart : out ShortReal from Standard;
End : out Real from Standard;
TolEnd : out ShortReal from Standard)
---C++: inline
---Purpose: Returns the bounds and the tolerances
-- of the current Hidden Interval
is static;
InitVisible(me : in out; status : EdgeStatus from HLRAlgo)
---C++: inline
is static;
MoreVisible(me) returns Boolean from Standard
---C++: inline
is static;
NextVisible(me : in out)
---C++: inline
is static;
Visible(me : in out;
Start : out Real from Standard;
TolStart : out ShortReal from Standard;
End : out Real from Standard;
TolEnd : out ShortReal from Standard)
---C++: inline
---Purpose: Returns the bounds and the tolerances
-- of the current Visible Interval
is static;
fields
myNbVis : Integer from Standard;
myNbHid : Integer from Standard;
EVis : Address from Standard;
EHid : Address from Standard;
iVis : Integer from Standard;
iHid : Integer from Standard;
myHidStart : Real from Standard;
myHidEnd : Real from Standard;
myHidTolStart : ShortReal from Standard;
myHidTolEnd : ShortReal from Standard;
end EdgeIterator;

View File

@@ -17,13 +17,15 @@
#ifndef No_Exception
#define No_Exception
#endif
#include <HLRAlgo_EdgeIterator.ixx>
#include <HLRAlgo_EdgeIterator.hxx>
#include <HLRAlgo_EdgeStatus.hxx>
//=======================================================================
//function : EdgeIterator
//purpose :
//=======================================================================
HLRAlgo_EdgeIterator::HLRAlgo_EdgeIterator ()
{}

View File

@@ -0,0 +1,98 @@
// Created on: 1993-01-11
// Created by: Christophe MARION
// 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 _HLRAlgo_EdgeIterator_HeaderFile
#define _HLRAlgo_EdgeIterator_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Address.hxx>
#include <Standard_Real.hxx>
#include <Standard_ShortReal.hxx>
#include <Standard_Boolean.hxx>
class HLRAlgo_EdgeStatus;
class HLRAlgo_EdgeIterator
{
public:
DEFINE_STANDARD_ALLOC
//! Iterator on the visible or hidden parts of an
//! edge.
Standard_EXPORT HLRAlgo_EdgeIterator();
Standard_EXPORT void InitHidden (const HLRAlgo_EdgeStatus& status);
Standard_Boolean MoreHidden() const;
Standard_EXPORT void NextHidden();
//! Returns the bounds and the tolerances
//! of the current Hidden Interval
void Hidden (Standard_Real& Start, Standard_ShortReal& TolStart, Standard_Real& End, Standard_ShortReal& TolEnd) const;
void InitVisible (const HLRAlgo_EdgeStatus& status);
Standard_Boolean MoreVisible() const;
void NextVisible();
//! Returns the bounds and the tolerances
//! of the current Visible Interval
void Visible (Standard_Real& Start, Standard_ShortReal& TolStart, Standard_Real& End, Standard_ShortReal& TolEnd);
protected:
private:
Standard_Integer myNbVis;
Standard_Integer myNbHid;
Standard_Address EVis;
Standard_Address EHid;
Standard_Integer iVis;
Standard_Integer iHid;
Standard_Real myHidStart;
Standard_Real myHidEnd;
Standard_ShortReal myHidTolStart;
Standard_ShortReal myHidTolEnd;
};
#include <HLRAlgo_EdgeIterator.lxx>
#endif // _HLRAlgo_EdgeIterator_HeaderFile

View File

@@ -1,127 +0,0 @@
-- Created on: 1992-02-18
-- 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.
class EdgeStatus from HLRAlgo
---Purpose: This class describes the Hidden Line status of an
-- Edge. It contains :
--
-- The Bounds of the Edge and their tolerances
--
-- Two flags indicating if the edge is full visible
-- or full hidden.
--
-- The Sequence of visible Intervals on the Edge.
uses
Integer from Standard,
ShortReal from Standard,
Real from Standard,
Boolean from Standard,
Intervals from Intrv
raises
OutOfRange
is
Create returns EdgeStatus from HLRAlgo;
Create(Start : Real from Standard;
TolStart : ShortReal from Standard;
End : Real from Standard;
TolEnd : ShortReal from Standard)
returns EdgeStatus from HLRAlgo;
---Purpose: Creates a new EdgeStatus. Default visible. The
-- Edge is bounded by the interval <Start>, <End>
-- with the tolerances <TolStart>, <TolEnd>.
Initialize(me : in out;
Start : Real from Standard;
TolStart : ShortReal from Standard;
End : Real from Standard;
TolEnd : ShortReal from Standard)
---Purpose: Initialize an EdgeStatus. Default visible. The
-- Edge is bounded by the interval <Start>, <End>
-- with the tolerances <TolStart>, <TolEnd>.
is static;
Bounds (me;Start : out Real from Standard;
TolStart : out ShortReal from Standard;
End : out Real from Standard;
TolEnd : out ShortReal from Standard)
---C++: inline
is static;
NbVisiblePart(me) returns Integer from Standard
is static;
VisiblePart(me; Index : Integer from Standard;
Start : out Real from Standard;
TolStart : out ShortReal from Standard;
End : out Real from Standard;
TolEnd : out ShortReal from Standard)
is static;
Hide(me : in out; Start : Real from Standard;
TolStart : ShortReal from Standard;
End : Real from Standard;
TolEnd : ShortReal from Standard;
OnFace : Boolean from Standard;
OnBoundary : Boolean from Standard)
---Purpose: Hides the interval <Start>, <End> with the
-- tolerances <TolStart>, <TolEnd>. This interval is
-- subtracted from the visible parts. If the hidden
-- part is on ( or under ) the face the flag <OnFace>
-- is True ( or False ). If the hidden part is on (
-- or inside ) the boundary of the face the flag
-- <OnBoundary> is True ( or False ).
is static;
HideAll(me : in out)
---C++: inline
---Purpose: Hide the whole Edge.
is static;
ShowAll(me : in out)
---C++: inline
---Purpose: Show the whole Edge.
is static;
AllHidden(me) returns Boolean from Standard
---C++: inline
is static;
AllHidden(me : in out; B : Boolean from Standard)
---C++: inline
is static;
AllVisible(me) returns Boolean from Standard
---C++: inline
is static;
AllVisible(me : in out; B : Boolean from Standard)
---C++: inline
is static;
fields
myStart : Real from Standard;
myEnd : Real from Standard;
myTolStart : ShortReal from Standard;
myTolEnd : ShortReal from Standard;
myFlags : Boolean from Standard;
myVisibles : Intervals from Intrv;
end EdgeStatus;

View File

@@ -17,13 +17,15 @@
#ifndef No_Exception
#define No_Exception
#endif
#include <HLRAlgo_EdgeStatus.ixx>
#include <HLRAlgo_EdgeStatus.hxx>
#include <Standard_OutOfRange.hxx>
//=======================================================================
//function : HLRAlgo_EdgeStatus
//purpose :
//=======================================================================
HLRAlgo_EdgeStatus::HLRAlgo_EdgeStatus ()
{
}

View File

@@ -0,0 +1,119 @@
// Created on: 1992-02-18
// 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 _HLRAlgo_EdgeStatus_HeaderFile
#define _HLRAlgo_EdgeStatus_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_ShortReal.hxx>
#include <Standard_Boolean.hxx>
#include <Intrv_Intervals.hxx>
#include <Standard_Integer.hxx>
class Standard_OutOfRange;
//! This class describes the Hidden Line status of an
//! Edge. It contains :
//!
//! The Bounds of the Edge and their tolerances
//!
//! Two flags indicating if the edge is full visible
//! or full hidden.
//!
//! The Sequence of visible Intervals on the Edge.
class HLRAlgo_EdgeStatus
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT HLRAlgo_EdgeStatus();
//! Creates a new EdgeStatus. Default visible. The
//! Edge is bounded by the interval <Start>, <End>
//! with the tolerances <TolStart>, <TolEnd>.
Standard_EXPORT HLRAlgo_EdgeStatus(const Standard_Real Start, const Standard_ShortReal TolStart, const Standard_Real End, const Standard_ShortReal TolEnd);
//! Initialize an EdgeStatus. Default visible. The
//! Edge is bounded by the interval <Start>, <End>
//! with the tolerances <TolStart>, <TolEnd>.
Standard_EXPORT void Initialize (const Standard_Real Start, const Standard_ShortReal TolStart, const Standard_Real End, const Standard_ShortReal TolEnd);
void Bounds (Standard_Real& Start, Standard_ShortReal& TolStart, Standard_Real& End, Standard_ShortReal& TolEnd) const;
Standard_EXPORT Standard_Integer NbVisiblePart() const;
Standard_EXPORT void VisiblePart (const Standard_Integer Index, Standard_Real& Start, Standard_ShortReal& TolStart, Standard_Real& End, Standard_ShortReal& TolEnd) const;
//! Hides the interval <Start>, <End> with the
//! tolerances <TolStart>, <TolEnd>. This interval is
//! subtracted from the visible parts. If the hidden
//! part is on ( or under ) the face the flag <OnFace>
//! is True ( or False ). If the hidden part is on (
//! or inside ) the boundary of the face the flag
//! <OnBoundary> is True ( or False ).
Standard_EXPORT void Hide (const Standard_Real Start, const Standard_ShortReal TolStart, const Standard_Real End, const Standard_ShortReal TolEnd, const Standard_Boolean OnFace, const Standard_Boolean OnBoundary);
//! Hide the whole Edge.
void HideAll();
//! Show the whole Edge.
void ShowAll();
Standard_Boolean AllHidden() const;
void AllHidden (const Standard_Boolean B);
Standard_Boolean AllVisible() const;
void AllVisible (const Standard_Boolean B);
protected:
private:
Standard_Real myStart;
Standard_Real myEnd;
Standard_ShortReal myTolStart;
Standard_ShortReal myTolEnd;
Standard_Boolean myFlags;
Intrv_Intervals myVisibles;
};
#include <HLRAlgo_EdgeStatus.lxx>
#endif // _HLRAlgo_EdgeStatus_HeaderFile

View File

@@ -1,121 +0,0 @@
-- Created on: 1992-04-06
-- 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.
class EdgesBlock from HLRAlgo inherits TShared from MMgt
---Purpose: An EdgesBlock is a set of Edges. It is used by the
-- DataStructure to structure the Edges.
--
-- An EdgesBlock contains :
--
-- * An Array of index of Edges.
--
-- * An Array of flagsf ( Orientation
-- OutLine
-- Internal
-- Double
-- IsoLine)
uses
Address from Standard,
Boolean from Standard,
Integer from Standard,
Orientation from TopAbs,
Array1OfInteger from TColStd,
Array1OfBoolean from TColStd
is
Create(NbEdges : Integer)
---Purpose: Create a Block of Edges for a wire.
returns EdgesBlock from HLRAlgo;
NbEdges(me) returns Integer from Standard
---C++: inline
is static;
Edge(me : mutable; I : Integer from Standard;
EI : Integer from Standard)
---C++: inline
is static;
Edge(me; I : Integer from Standard)
returns Integer from Standard
---C++: inline
is static;
Orientation(me : mutable; I : Integer from Standard;
Or : Orientation from TopAbs)
---C++: inline
is static;
Orientation(me; I : Integer from Standard)
returns Orientation from TopAbs
---C++: inline
is static;
OutLine(me; I : Integer from Standard)
returns Boolean from Standard
---C++: inline
is static;
OutLine(me : mutable; I : Integer from Standard;
B : Boolean from Standard)
---C++: inline
is static;
Internal(me; I : Integer from Standard)
returns Boolean from Standard
---C++: inline
is static;
Internal(me : mutable; I : Integer from Standard;
B : Boolean from Standard)
---C++: inline
is static;
Double(me; I : Integer from Standard)
returns Boolean from Standard
---C++: inline
is static;
Double(me : mutable; I : Integer from Standard;
B : Boolean from Standard)
---C++: inline
is static;
IsoLine(me; I : Integer from Standard)
returns Boolean from Standard
---C++: inline
is static;
IsoLine(me : mutable; I : Integer from Standard;
B : Boolean from Standard)
---C++: inline
is static;
UpdateMinMax(me : mutable; TotMinMax : Address from Standard)
is static;
MinMax(me) returns Address from Standard
---C++: inline
is static;
fields
myEdges : Array1OfInteger from TColStd;
myFlags : Array1OfBoolean from TColStd;
myMinMax : Integer from Standard[16];
end EdgesBlock;

View File

@@ -17,13 +17,15 @@
#ifndef No_Exception
#define No_Exception
#endif
#include <HLRAlgo_EdgesBlock.ixx>
#include <HLRAlgo_EdgesBlock.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : HLRAlgo_EdgesBlock
//purpose :
//=======================================================================
HLRAlgo_EdgesBlock::HLRAlgo_EdgesBlock (const Standard_Integer NbEdges) :
myEdges(1,NbEdges), myFlags(1,NbEdges)
{}

View File

@@ -0,0 +1,113 @@
// Created on: 1992-04-06
// 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 _HLRAlgo_EdgesBlock_HeaderFile
#define _HLRAlgo_EdgesBlock_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfBoolean.hxx>
#include <Standard_Integer.hxx>
#include <MMgt_TShared.hxx>
#include <TopAbs_Orientation.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Address.hxx>
class HLRAlgo_EdgesBlock;
DEFINE_STANDARD_HANDLE(HLRAlgo_EdgesBlock, MMgt_TShared)
//! An EdgesBlock is a set of Edges. It is used by the
//! DataStructure to structure the Edges.
//!
//! An EdgesBlock contains :
//!
//! * An Array of index of Edges.
//!
//! * An Array of flagsf ( Orientation
//! OutLine
//! Internal
//! Double
//! IsoLine)
class HLRAlgo_EdgesBlock : public MMgt_TShared
{
public:
//! Create a Block of Edges for a wire.
Standard_EXPORT HLRAlgo_EdgesBlock(const Standard_Integer NbEdges);
Standard_Integer NbEdges() const;
void Edge (const Standard_Integer I, const Standard_Integer EI);
Standard_Integer Edge (const Standard_Integer I) const;
void Orientation (const Standard_Integer I, const TopAbs_Orientation Or);
TopAbs_Orientation Orientation (const Standard_Integer I) const;
Standard_Boolean OutLine (const Standard_Integer I) const;
void OutLine (const Standard_Integer I, const Standard_Boolean B);
Standard_Boolean Internal (const Standard_Integer I) const;
void Internal (const Standard_Integer I, const Standard_Boolean B);
Standard_Boolean Double (const Standard_Integer I) const;
void Double (const Standard_Integer I, const Standard_Boolean B);
Standard_Boolean IsoLine (const Standard_Integer I) const;
void IsoLine (const Standard_Integer I, const Standard_Boolean B);
Standard_EXPORT void UpdateMinMax (const Standard_Address TotMinMax);
Standard_Address MinMax() const;
DEFINE_STANDARD_RTTI(HLRAlgo_EdgesBlock,MMgt_TShared)
protected:
private:
TColStd_Array1OfInteger myEdges;
TColStd_Array1OfBoolean myFlags;
Standard_Integer myMinMax[16];
};
#include <HLRAlgo_EdgesBlock.lxx>
#endif // _HLRAlgo_EdgesBlock_HeaderFile

View File

@@ -0,0 +1,108 @@
// Created on: 1992-02-18
// 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 _HLRAlgo_Interference_HeaderFile
#define _HLRAlgo_Interference_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <HLRAlgo_Intersection.hxx>
#include <HLRAlgo_Coincidence.hxx>
#include <TopAbs_Orientation.hxx>
class HLRAlgo_Intersection;
class HLRAlgo_Coincidence;
class HLRAlgo_Interference
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT HLRAlgo_Interference();
Standard_EXPORT HLRAlgo_Interference(const HLRAlgo_Intersection& Inters, const HLRAlgo_Coincidence& Bound, const TopAbs_Orientation Orient, const TopAbs_Orientation Trans, const TopAbs_Orientation BTrans);
void Intersection (const HLRAlgo_Intersection& I);
void Boundary (const HLRAlgo_Coincidence& B);
void Orientation (const TopAbs_Orientation O);
void Transition (const TopAbs_Orientation Tr);
void BoundaryTransition (const TopAbs_Orientation BTr);
const HLRAlgo_Intersection& Intersection() const;
HLRAlgo_Intersection& ChangeIntersection();
const HLRAlgo_Coincidence& Boundary() const;
HLRAlgo_Coincidence& ChangeBoundary();
TopAbs_Orientation Orientation() const;
TopAbs_Orientation Transition() const;
TopAbs_Orientation BoundaryTransition() const;
protected:
private:
HLRAlgo_Intersection myIntersection;
HLRAlgo_Coincidence myBoundary;
TopAbs_Orientation myOrientation;
TopAbs_Orientation myTransition;
TopAbs_Orientation myBTransition;
};
#define TheSubShape HLRAlgo_Intersection
#define TheSubShape_hxx <HLRAlgo_Intersection.hxx>
#define TheShape HLRAlgo_Coincidence
#define TheShape_hxx <HLRAlgo_Coincidence.hxx>
#define TopBas_Interference HLRAlgo_Interference
#define TopBas_Interference_hxx <HLRAlgo_Interference.hxx>
#include <TopBas_Interference.lxx>
#undef TheSubShape
#undef TheSubShape_hxx
#undef TheShape
#undef TheShape_hxx
#undef TopBas_Interference
#undef TopBas_Interference_hxx
#endif // _HLRAlgo_Interference_HeaderFile

View File

@@ -0,0 +1,30 @@
// Created on: 1992-02-18
// 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 <HLRAlgo_Interference.hxx>
#include <HLRAlgo_Intersection.hxx>
#include <HLRAlgo_Coincidence.hxx>
#define TheSubShape HLRAlgo_Intersection
#define TheSubShape_hxx <HLRAlgo_Intersection.hxx>
#define TheShape HLRAlgo_Coincidence
#define TheShape_hxx <HLRAlgo_Coincidence.hxx>
#define TopBas_Interference HLRAlgo_Interference
#define TopBas_Interference_hxx <HLRAlgo_Interference.hxx>
#include <TopBas_Interference.gxx>

View File

@@ -1,107 +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.
class Intersection from HLRAlgo
---Purpose: Describes an intersection on an edge to hide.
-- Contains a parameter and a state (ON = on the
-- face, OUT = above the face, IN = under the Face)
uses
Integer from Standard,
Real from Standard,
ShortReal from Standard,
Orientation from TopAbs,
State from TopAbs
is
Create returns Intersection from HLRAlgo;
Create(Ori : Orientation from TopAbs;
Lev : Integer from Standard;
SegInd : Integer from Standard;
Ind : Integer from Standard;
P : Real from Standard;
Tol : ShortReal from Standard;
S : State from TopAbs)
returns Intersection from HLRAlgo;
Orientation(me : in out; Ori : Orientation from TopAbs)
---C++: inline
is static;
Orientation(me) returns Orientation from TopAbs
---C++: inline
is static;
Level(me : in out; Lev : Integer from Standard)
---C++: inline
is static;
Level(me) returns Integer from Standard
---C++: inline
is static;
SegIndex(me : in out; SegInd : Integer from Standard)
---C++: inline
is static;
SegIndex(me) returns Integer from Standard
---C++: inline
is static;
Index(me : in out; Ind : Integer from Standard)
---C++: inline
is static;
Index(me) returns Integer from Standard
---C++: inline
is static;
Parameter(me : in out; P : Real from Standard)
---C++: inline
is static;
Parameter(me) returns Real from Standard
---C++: inline
is static;
Tolerance(me : in out; T : ShortReal from Standard)
---C++: inline
is static;
Tolerance(me) returns ShortReal from Standard
---C++: inline
is static;
State(me : in out; S : State from TopAbs)
---C++: inline
is static;
State(me) returns State from TopAbs
---C++: inline
is static;
fields
myOrien : Orientation from TopAbs;
mySegIndex : Integer from Standard;
myIndex : Integer from Standard;
myLevel : Integer from Standard;
myParam : Real from Standard;
myToler : ShortReal from Standard;
myState : State from TopAbs;
end Intersection;

View File

@@ -14,13 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_Intersection.ixx>
#include <HLRAlgo_Intersection.hxx>
//=======================================================================
//function : HLRAlgo_Intersection
//purpose :
//=======================================================================
HLRAlgo_Intersection::HLRAlgo_Intersection()
{}

View File

@@ -0,0 +1,104 @@
// 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 _HLRAlgo_Intersection_HeaderFile
#define _HLRAlgo_Intersection_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopAbs_Orientation.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Standard_ShortReal.hxx>
#include <TopAbs_State.hxx>
//! Describes an intersection on an edge to hide.
//! Contains a parameter and a state (ON = on the
//! face, OUT = above the face, IN = under the Face)
class HLRAlgo_Intersection
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT HLRAlgo_Intersection();
Standard_EXPORT HLRAlgo_Intersection(const TopAbs_Orientation Ori, const Standard_Integer Lev, const Standard_Integer SegInd, const Standard_Integer Ind, const Standard_Real P, const Standard_ShortReal Tol, const TopAbs_State S);
void Orientation (const TopAbs_Orientation Ori);
TopAbs_Orientation Orientation() const;
void Level (const Standard_Integer Lev);
Standard_Integer Level() const;
void SegIndex (const Standard_Integer SegInd);
Standard_Integer SegIndex() const;
void Index (const Standard_Integer Ind);
Standard_Integer Index() const;
void Parameter (const Standard_Real P);
Standard_Real Parameter() const;
void Tolerance (const Standard_ShortReal T);
Standard_ShortReal Tolerance() const;
void State (const TopAbs_State S);
TopAbs_State State() const;
protected:
private:
TopAbs_Orientation myOrien;
Standard_Integer mySegIndex;
Standard_Integer myIndex;
Standard_Integer myLevel;
Standard_Real myParam;
Standard_ShortReal myToler;
TopAbs_State myState;
};
#include <HLRAlgo_Intersection.lxx>
#endif // _HLRAlgo_Intersection_HeaderFile

View File

@@ -1,95 +0,0 @@
-- Created on: 1992-02-18
-- 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.
class PolyAlgo from HLRAlgo inherits TShared from MMgt
---Purpose: to remove Hidden lines on Triangulations.
uses
Address from Standard,
Boolean from Standard,
Integer from Standard,
Real from Standard,
HArray1OfTransient from TColStd,
Array1OfTransient from TColStd,
ListIteratorOfListOfBPoint from HLRAlgo,
EdgeStatus from HLRAlgo
is
Create
returns PolyAlgo from HLRAlgo;
Init(me : mutable; HShell : HArray1OfTransient from TColStd)
is static;
PolyShell(me) returns Array1OfTransient from TColStd
---C++: return &
---C++: inline
is static;
Clear(me : mutable)
is static;
Update(me : mutable)
---Purpose: Prepare all the data to process the algo.
is static;
InitHide(me : mutable)
---C++: inline
is static;
MoreHide(me) returns Boolean from Standard
---C++: inline
is static;
NextHide(me : mutable)
is static;
Hide(me : mutable; Coordinates : out Address from Standard;
status : out EdgeStatus from HLRAlgo;
Index : out Integer from Standard;
reg1,regn : out Boolean from Standard;
outl,intl : out Boolean from Standard)
---Purpose: process hiding between <Pt1> and <Pt2>.
is static;
InitShow(me : mutable)
---C++: inline
is static;
MoreShow(me) returns Boolean from Standard
---C++: inline
is static;
NextShow(me : mutable)
is static;
Show(me : mutable; Coordinates : out Address from Standard;
Index : out Integer from Standard;
reg1,regn : out Boolean from Standard;
outl,intl : out Boolean from Standard)
---Purpose: process hiding between <Pt1> and <Pt2>.
is static;
fields
myHShell : HArray1OfTransient from TColStd;
myRealPtr : Real from Standard[10];
mySegListIt : ListIteratorOfListOfBPoint from HLRAlgo;
myNbrShell : Integer from Standard;
myCurShell : Integer from Standard;
myFound : Boolean from Standard;
end PolyAlgo;

View File

@@ -17,12 +17,16 @@
#ifndef No_Exception
//#define No_Exception
#endif
#include <HLRAlgo_PolyAlgo.ixx>
#include <HLRAlgo_PolyShellData.hxx>
#include <HLRAlgo_PolyData.hxx>
#include <HLRAlgo_ListOfBPoint.hxx>
#include <HLRAlgo_BiPoint.hxx>
#include <HLRAlgo_EdgeStatus.hxx>
#include <HLRAlgo_ListOfBPoint.hxx>
#include <HLRAlgo_PolyAlgo.hxx>
#include <HLRAlgo_PolyData.hxx>
#include <HLRAlgo_PolyShellData.hxx>
#include <Precision.hxx>
#include <Standard_Type.hxx>
#define EMskGrALin1 ((Standard_Boolean) 8)
#define EMskGrALin2 ((Standard_Boolean) 16)

View File

@@ -0,0 +1,103 @@
// Created on: 1992-02-18
// 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 _HLRAlgo_PolyAlgo_HeaderFile
#define _HLRAlgo_PolyAlgo_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HArray1OfTransient.hxx>
#include <Standard_Real.hxx>
#include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <MMgt_TShared.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <Standard_Address.hxx>
class HLRAlgo_EdgeStatus;
class HLRAlgo_PolyAlgo;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyAlgo, MMgt_TShared)
//! to remove Hidden lines on Triangulations.
class HLRAlgo_PolyAlgo : public MMgt_TShared
{
public:
Standard_EXPORT HLRAlgo_PolyAlgo();
Standard_EXPORT void Init (const Handle(TColStd_HArray1OfTransient)& HShell);
TColStd_Array1OfTransient& PolyShell() const;
Standard_EXPORT void Clear();
//! Prepare all the data to process the algo.
Standard_EXPORT void Update();
void InitHide();
Standard_Boolean MoreHide() const;
Standard_EXPORT void NextHide();
//! process hiding between <Pt1> and <Pt2>.
Standard_EXPORT void Hide (Standard_Address& Coordinates, HLRAlgo_EdgeStatus& status, Standard_Integer& Index, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl);
void InitShow();
Standard_Boolean MoreShow() const;
Standard_EXPORT void NextShow();
//! process hiding between <Pt1> and <Pt2>.
Standard_EXPORT void Show (Standard_Address& Coordinates, Standard_Integer& Index, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl);
DEFINE_STANDARD_RTTI(HLRAlgo_PolyAlgo,MMgt_TShared)
protected:
private:
Handle(TColStd_HArray1OfTransient) myHShell;
Standard_Real myRealPtr[10];
HLRAlgo_ListIteratorOfListOfBPoint mySegListIt;
Standard_Integer myNbrShell;
Standard_Integer myCurShell;
Standard_Boolean myFound;
};
#include <HLRAlgo_PolyAlgo.lxx>
#endif // _HLRAlgo_PolyAlgo_HeaderFile

View File

@@ -1,103 +0,0 @@
-- Created on: 1993-10-29
-- Created by: Christophe MARION
-- 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 PolyData from HLRAlgo inherits TShared from MMgt
---Purpose: Data structure of a set of Triangles.
uses
Address from Standard,
Integer from Standard,
Boolean from Standard,
Array1OfXYZ from TColgp,
Array1OfTData from HLRAlgo,
Array1OfPHDat from HLRAlgo,
HArray1OfXYZ from TColgp,
HArray1OfTData from HLRAlgo,
HArray1OfPHDat from HLRAlgo,
EdgeStatus from HLRAlgo
is
Create returns PolyData from HLRAlgo;
HNodes(me : mutable; HNodes : HArray1OfXYZ from TColgp)
is static;
HTData(me : mutable; HTData : HArray1OfTData from HLRAlgo)
is static;
HPHDat(me : mutable; HPHDat : HArray1OfPHDat from HLRAlgo)
is static;
FaceIndex(me : mutable; I : Integer from Standard)
---C++: inline
is static;
FaceIndex(me) returns Integer from Standard
---C++: inline
is static;
Nodes(me) returns Array1OfXYZ from TColgp
---C++: inline
---C++: return &
is static;
TData(me) returns Array1OfTData from HLRAlgo
---C++: inline
---C++: return &
is static;
PHDat(me) returns Array1OfPHDat from HLRAlgo
---C++: inline
---C++: return &
is static;
UpdateGlobalMinMax(me : mutable;
ToTMinMax : Address from Standard)
is static;
Hiding(me) returns Boolean from Standard
---C++: inline
is static;
HideByPolyData(me : mutable;
Coordinates : Address from Standard;
RealPtr : Address from Standard;
Indices : Address from Standard;
HidingShell : Boolean from Standard;
status : out EdgeStatus from HLRAlgo)
---Purpose: process hiding between <Pt1> and <Pt2>.
is static;
HideByOneTriangle(me : mutable;
Coordinates : Address from Standard;
RealPtr : Address from Standard;
BooleanPtr : Address from Standard;
PlanPtr : Address from Standard;
status : out EdgeStatus from HLRAlgo)
---Purpose: evident.
is static private;
Indices(me : mutable) returns Address from Standard
---C++: inline
is static;
fields
myIndices : Integer from Standard[3];
myHNodes : HArray1OfXYZ from TColgp;
myHTData : HArray1OfTData from HLRAlgo;
myHPHDat : HArray1OfPHDat from HLRAlgo;
end PolyData;

View File

@@ -17,7 +17,11 @@
#ifndef No_Exception
//#define No_Exception
#endif
#include <HLRAlgo_PolyData.ixx>
#include <HLRAlgo_EdgeStatus.hxx>
#include <HLRAlgo_PolyData.hxx>
#include <Standard_Type.hxx>
#define EMskGrALin1 ((Standard_Boolean) 8)
#define EMskGrALin2 ((Standard_Boolean) 16)

View File

@@ -0,0 +1,104 @@
// Created on: 1993-10-29
// Created by: Christophe MARION
// 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 _HLRAlgo_PolyData_HeaderFile
#define _HLRAlgo_PolyData_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_HArray1OfXYZ.hxx>
#include <HLRAlgo_HArray1OfTData.hxx>
#include <HLRAlgo_HArray1OfPHDat.hxx>
#include <MMgt_TShared.hxx>
#include <TColgp_Array1OfXYZ.hxx>
#include <HLRAlgo_Array1OfTData.hxx>
#include <HLRAlgo_Array1OfPHDat.hxx>
#include <Standard_Address.hxx>
#include <Standard_Boolean.hxx>
class HLRAlgo_EdgeStatus;
class HLRAlgo_PolyData;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyData, MMgt_TShared)
//! Data structure of a set of Triangles.
class HLRAlgo_PolyData : public MMgt_TShared
{
public:
Standard_EXPORT HLRAlgo_PolyData();
Standard_EXPORT void HNodes (const Handle(TColgp_HArray1OfXYZ)& HNodes);
Standard_EXPORT void HTData (const Handle(HLRAlgo_HArray1OfTData)& HTData);
Standard_EXPORT void HPHDat (const Handle(HLRAlgo_HArray1OfPHDat)& HPHDat);
void FaceIndex (const Standard_Integer I);
Standard_Integer FaceIndex() const;
TColgp_Array1OfXYZ& Nodes() const;
HLRAlgo_Array1OfTData& TData() const;
HLRAlgo_Array1OfPHDat& PHDat() const;
Standard_EXPORT void UpdateGlobalMinMax (const Standard_Address ToTMinMax);
Standard_Boolean Hiding() const;
//! process hiding between <Pt1> and <Pt2>.
Standard_EXPORT void HideByPolyData (const Standard_Address Coordinates, const Standard_Address RealPtr, const Standard_Address Indices, const Standard_Boolean HidingShell, HLRAlgo_EdgeStatus& status);
Standard_Address Indices();
DEFINE_STANDARD_RTTI(HLRAlgo_PolyData,MMgt_TShared)
protected:
private:
//! evident.
Standard_EXPORT void HideByOneTriangle (const Standard_Address Coordinates, const Standard_Address RealPtr, const Standard_Address BooleanPtr, const Standard_Address PlanPtr, HLRAlgo_EdgeStatus& status);
Standard_Integer myIndices[3];
Handle(TColgp_HArray1OfXYZ) myHNodes;
Handle(HLRAlgo_HArray1OfTData) myHTData;
Handle(HLRAlgo_HArray1OfPHDat) myHPHDat;
};
#include <HLRAlgo_PolyData.lxx>
#endif // _HLRAlgo_PolyData_HeaderFile

View File

@@ -1,46 +0,0 @@
-- Created on: 1993-10-29
-- Created by: Christophe MARION
-- 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 PolyHidingData from HLRAlgo
---Purpose: Data structure of a set of Hiding Triangles.
uses
Address from Standard,
Integer from Standard,
Real from Standard
is
Create returns PolyHidingData from HLRAlgo;
---C++: inline
Set(me : in out;
Index,Minim,Maxim : Integer from Standard;
A,B,C,D : Real from Standard)
---C++: inline
is static;
IndexAndMinMax(me) returns Address from Standard
---C++: inline
is static;
Plan(me) returns Address from Standard
---C++: inline
is static;
fields
myMinMax : Integer from Standard[3];
myPlan : Real from Standard[4];
end PolyHidingData;

View File

@@ -14,4 +14,5 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_PolyHidingData.ixx>
#include <HLRAlgo_PolyHidingData.hxx>

View File

@@ -0,0 +1,71 @@
// Created on: 1993-10-29
// Created by: Christophe MARION
// 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 _HLRAlgo_PolyHidingData_HeaderFile
#define _HLRAlgo_PolyHidingData_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Standard_Address.hxx>
//! Data structure of a set of Hiding Triangles.
class HLRAlgo_PolyHidingData
{
public:
DEFINE_STANDARD_ALLOC
HLRAlgo_PolyHidingData();
void Set (const Standard_Integer Index, const Standard_Integer Minim, const Standard_Integer Maxim, const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D);
Standard_Address IndexAndMinMax() const;
Standard_Address Plan() const;
protected:
private:
Standard_Integer myMinMax[3];
Standard_Real myPlan[4];
};
#include <HLRAlgo_PolyHidingData.lxx>
#endif // _HLRAlgo_PolyHidingData_HeaderFile

View File

@@ -1,138 +0,0 @@
-- Created on: 1993-10-29
-- Created by: Christophe MARION
-- 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 PolyInternalData from HLRAlgo inherits TShared from MMgt
---Purpose: to Update OutLines.
uses
Address from Standard,
Integer from Standard,
Boolean from Standard,
Real from Standard,
HArray1OfTData from HLRAlgo,
HArray1OfPISeg from HLRAlgo,
HArray1OfPINod from HLRAlgo,
Array1OfTData from HLRAlgo,
Array1OfPISeg from HLRAlgo,
Array1OfPINod from HLRAlgo
is
Create(nbNod, nbTri : Integer from Standard)
returns PolyInternalData from HLRAlgo;
UpdateLinks(me : mutable;
TData : out Address from Standard;
PISeg : out Address from Standard;
PINod : out Address from Standard)
is static;
AddNode(me : mutable;
Nod1RValues : Address from Standard;
Nod2RValues : Address from Standard;
PINod1,PINod2 : out Address from Standard;
coef1 : Real from Standard;
X3,Y3,Z3 : Real from Standard)
returns Integer from Standard
is static;
UpdateLinks(me : mutable;
ip1,ip2,ip3 : Integer from Standard;
TData1,TData2 : out Address from Standard;
PISeg1,PISeg2 : out Address from Standard;
PINod1,PINod2 : out Address from Standard)
is static;
Dump(me)
is static;
IncTData(me : mutable; TData1,TData2 : out Address from Standard)
is static;
IncPISeg(me : mutable; PISeg1,PISeg2 : out Address from Standard)
is static;
IncPINod(me : mutable; PINod1,PINod2 : out Address from Standard)
is static;
DecTData(me : mutable)
---C++: inline
is static;
DecPISeg(me : mutable)
---C++: inline
is static;
DecPINod(me : mutable)
---C++: inline
is static;
NbTData(me) returns Integer from Standard
---C++: inline
is static;
NbPISeg(me) returns Integer from Standard
---C++: inline
is static;
NbPINod(me) returns Integer from Standard
---C++: inline
is static;
Planar(me) returns Boolean from Standard
---C++: inline
is static;
Planar(me : mutable; B : Boolean from Standard)
---C++: inline
is static;
IntOutL(me) returns Boolean from Standard
---C++: inline
is static;
IntOutL(me : mutable; B : Boolean from Standard)
---C++: inline
is static;
TData (me) returns Array1OfTData from HLRAlgo
---C++: inline
---C++: return &
is static;
PISeg (me) returns Array1OfPISeg from HLRAlgo
---C++: inline
---C++: return &
is static;
PINod (me) returns Array1OfPINod from HLRAlgo
---C++: inline
---C++: return &
is static;
fields
myNbTData : Integer from Standard;
myNbPISeg : Integer from Standard;
myNbPINod : Integer from Standard;
myMxTData : Integer from Standard;
myMxPISeg : Integer from Standard;
myMxPINod : Integer from Standard;
myIntOutL : Boolean from Standard;
myPlanar : Boolean from Standard;
myTData : HArray1OfTData from HLRAlgo;
myPISeg : HArray1OfPISeg from HLRAlgo;
myPINod : HArray1OfPINod from HLRAlgo;
end PolyInternalData;

View File

@@ -14,9 +14,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Stream.hxx>
#include <HLRAlgo_PolyInternalData.ixx>
#include <HLRAlgo_BiPoint.hxx>
#include <HLRAlgo_PolyInternalData.hxx>
#include <Standard_Stream.hxx>
#include <Standard_Type.hxx>
#define Tri1Node1 ((Standard_Integer*)Tri1Indices)[0]
#define Tri1Node2 ((Standard_Integer*)Tri1Indices)[1]

View File

@@ -0,0 +1,123 @@
// Created on: 1993-10-29
// Created by: Christophe MARION
// 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 _HLRAlgo_PolyInternalData_HeaderFile
#define _HLRAlgo_PolyInternalData_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <HLRAlgo_HArray1OfTData.hxx>
#include <HLRAlgo_HArray1OfPISeg.hxx>
#include <HLRAlgo_HArray1OfPINod.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Address.hxx>
#include <Standard_Real.hxx>
#include <HLRAlgo_Array1OfTData.hxx>
#include <HLRAlgo_Array1OfPISeg.hxx>
#include <HLRAlgo_Array1OfPINod.hxx>
class HLRAlgo_PolyInternalData;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyInternalData, MMgt_TShared)
//! to Update OutLines.
class HLRAlgo_PolyInternalData : public MMgt_TShared
{
public:
Standard_EXPORT HLRAlgo_PolyInternalData(const Standard_Integer nbNod, const Standard_Integer nbTri);
Standard_EXPORT void UpdateLinks (Standard_Address& TData, Standard_Address& PISeg, Standard_Address& PINod);
Standard_EXPORT Standard_Integer AddNode (const Standard_Address Nod1RValues, const Standard_Address Nod2RValues, Standard_Address& PINod1, Standard_Address& PINod2, const Standard_Real coef1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3);
Standard_EXPORT void UpdateLinks (const Standard_Integer ip1, const Standard_Integer ip2, const Standard_Integer ip3, Standard_Address& TData1, Standard_Address& TData2, Standard_Address& PISeg1, Standard_Address& PISeg2, Standard_Address& PINod1, Standard_Address& PINod2);
Standard_EXPORT void Dump() const;
Standard_EXPORT void IncTData (Standard_Address& TData1, Standard_Address& TData2);
Standard_EXPORT void IncPISeg (Standard_Address& PISeg1, Standard_Address& PISeg2);
Standard_EXPORT void IncPINod (Standard_Address& PINod1, Standard_Address& PINod2);
void DecTData();
void DecPISeg();
void DecPINod();
Standard_Integer NbTData() const;
Standard_Integer NbPISeg() const;
Standard_Integer NbPINod() const;
Standard_Boolean Planar() const;
void Planar (const Standard_Boolean B);
Standard_Boolean IntOutL() const;
void IntOutL (const Standard_Boolean B);
HLRAlgo_Array1OfTData& TData() const;
HLRAlgo_Array1OfPISeg& PISeg() const;
HLRAlgo_Array1OfPINod& PINod() const;
DEFINE_STANDARD_RTTI(HLRAlgo_PolyInternalData,MMgt_TShared)
protected:
private:
Standard_Integer myNbTData;
Standard_Integer myNbPISeg;
Standard_Integer myNbPINod;
Standard_Integer myMxTData;
Standard_Integer myMxPISeg;
Standard_Integer myMxPINod;
Standard_Boolean myIntOutL;
Standard_Boolean myPlanar;
Handle(HLRAlgo_HArray1OfTData) myTData;
Handle(HLRAlgo_HArray1OfPISeg) myPISeg;
Handle(HLRAlgo_HArray1OfPINod) myPINod;
};
#include <HLRAlgo_PolyInternalData.lxx>
#endif // _HLRAlgo_PolyInternalData_HeaderFile

View File

@@ -1,40 +0,0 @@
-- Created on: 1997-01-10
-- Created by: Christophe MARION
-- 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.
class PolyInternalNode from HLRAlgo inherits TShared from MMgt
---Purpose: to Update OutLines.
uses
Address from Standard,
Integer from Standard
is
Create returns PolyInternalNode from HLRAlgo;
---C++: inline
Indices(me) returns Address from Standard
---C++: inline
is static;
RValues(me) returns Address from Standard
---C++: inline
is static;
fields
myIndices : Integer from Standard[4];
myRValues : Real from Standard[11];
end PolyInternalNode;

View File

@@ -14,4 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_PolyInternalNode.ixx>
#include <HLRAlgo_PolyInternalNode.hxx>
#include <Standard_Type.hxx>

View File

@@ -0,0 +1,71 @@
// Created on: 1997-01-10
// Created by: Christophe MARION
// 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 _HLRAlgo_PolyInternalNode_HeaderFile
#define _HLRAlgo_PolyInternalNode_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Address.hxx>
class HLRAlgo_PolyInternalNode;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyInternalNode, MMgt_TShared)
//! to Update OutLines.
class HLRAlgo_PolyInternalNode : public MMgt_TShared
{
public:
HLRAlgo_PolyInternalNode();
Standard_Address Indices() const;
Standard_Address RValues() const;
DEFINE_STANDARD_RTTI(HLRAlgo_PolyInternalNode,MMgt_TShared)
protected:
private:
Standard_Integer myIndices[4];
Standard_Real myRValues[11];
};
#include <HLRAlgo_PolyInternalNode.lxx>
#endif // _HLRAlgo_PolyInternalNode_HeaderFile

View File

@@ -1,35 +0,0 @@
-- Created on: 1996-12-03
-- Created by: Christophe MARION
-- Copyright (c) 1996-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 PolyInternalSegment from HLRAlgo
---Purpose: to Update OutLines.
uses
Address from Standard,
Integer from Standard
is
Create returns PolyInternalSegment from HLRAlgo;
---C++: inline
Indices(me) returns Address from Standard
---C++: inline
is static;
fields
myIndices : Integer from Standard[6];
end PolyInternalSegment;

View File

@@ -14,4 +14,5 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_PolyInternalSegment.ixx>
#include <HLRAlgo_PolyInternalSegment.hxx>

View File

@@ -0,0 +1,65 @@
// Created on: 1996-12-03
// Created by: Christophe MARION
// Copyright (c) 1996-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 _HLRAlgo_PolyInternalSegment_HeaderFile
#define _HLRAlgo_PolyInternalSegment_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Address.hxx>
//! to Update OutLines.
class HLRAlgo_PolyInternalSegment
{
public:
DEFINE_STANDARD_ALLOC
HLRAlgo_PolyInternalSegment();
Standard_Address Indices() const;
protected:
private:
Standard_Integer myIndices[6];
};
#include <HLRAlgo_PolyInternalSegment.lxx>
#endif // _HLRAlgo_PolyInternalSegment_HeaderFile

View File

@@ -1,72 +0,0 @@
-- Created on: 1993-10-29
-- Created by: Christophe MARION
-- 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 PolyShellData from HLRAlgo inherits TShared from MMgt
---Purpose: All the PolyData of a Shell
uses
Address from Standard,
Boolean from Standard,
Integer from Standard,
Array1OfTransient from TColStd,
HArray1OfTransient from TColStd,
ListOfBPoint from HLRAlgo
is
Create(nbFace : Integer from Standard)
returns PolyShellData from HLRAlgo;
UpdateGlobalMinMax(me : mutable;
TotMinMax : Address from Standard)
is static;
UpdateHiding(me : mutable;
nbHiding : Integer from Standard)
is static;
Hiding(me) returns Boolean from Standard
---C++: inline
is static;
PolyData(me : mutable)
---C++: return &
---C++: inline
returns Array1OfTransient from TColStd
is static;
HidingPolyData(me : mutable)
---C++: return &
---C++: inline
returns Array1OfTransient from TColStd
is static;
Edges(me : mutable)
---C++: return &
---C++: inline
returns ListOfBPoint from HLRAlgo
is static;
Indices(me : mutable) returns Address from Standard
---C++: inline
is static;
fields
myMinMax : Integer from Standard[2];
myPolyg : Array1OfTransient from TColStd;
myHPolHi : HArray1OfTransient from TColStd;
mySegList : ListOfBPoint from HLRAlgo;
end PolyShellData;

View File

@@ -17,10 +17,13 @@
#ifndef No_Exception
//#define No_Exception
#endif
#include <HLRAlgo_PolyShellData.ixx>
#include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
#include <HLRAlgo_BiPoint.hxx>
#include <HLRAlgo_ListIteratorOfListOfBPoint.hxx>
#include <HLRAlgo_PolyData.hxx>
#include <HLRAlgo_PolyShellData.hxx>
#include <Standard_Type.hxx>
#define PntX1 ((Standard_Real*)Coordinates)[ 0]
#define PntY1 ((Standard_Real*)Coordinates)[ 1]

View File

@@ -0,0 +1,86 @@
// Created on: 1993-10-29
// Created by: Christophe MARION
// 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 _HLRAlgo_PolyShellData_HeaderFile
#define _HLRAlgo_PolyShellData_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TColStd_HArray1OfTransient.hxx>
#include <HLRAlgo_ListOfBPoint.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Address.hxx>
#include <Standard_Boolean.hxx>
class HLRAlgo_PolyShellData;
DEFINE_STANDARD_HANDLE(HLRAlgo_PolyShellData, MMgt_TShared)
//! All the PolyData of a Shell
class HLRAlgo_PolyShellData : public MMgt_TShared
{
public:
Standard_EXPORT HLRAlgo_PolyShellData(const Standard_Integer nbFace);
Standard_EXPORT void UpdateGlobalMinMax (const Standard_Address TotMinMax);
Standard_EXPORT void UpdateHiding (const Standard_Integer nbHiding);
Standard_Boolean Hiding() const;
TColStd_Array1OfTransient& PolyData();
TColStd_Array1OfTransient& HidingPolyData();
HLRAlgo_ListOfBPoint& Edges();
Standard_Address Indices();
DEFINE_STANDARD_RTTI(HLRAlgo_PolyShellData,MMgt_TShared)
protected:
private:
Standard_Integer myMinMax[2];
TColStd_Array1OfTransient myPolyg;
Handle(TColStd_HArray1OfTransient) myHPolHi;
HLRAlgo_ListOfBPoint mySegList;
};
#include <HLRAlgo_PolyShellData.lxx>
#endif // _HLRAlgo_PolyShellData_HeaderFile

View File

@@ -1,160 +0,0 @@
-- Created on: 1992-03-12
-- 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.
class Projector from HLRAlgo
---Purpose: Implements a projector object.
-- To transform and project Points and Planes.
-- This object is designed to be used in the
-- removal of hidden lines and is returned by the
-- Prs3d_Projector::Projector function.
-- You define the projection of the selected shape
-- by calling one of the following functions:
-- - HLRBRep_Algo::Projector, or
-- - HLRBRep_PolyAlgo::Projector
-- The choice depends on the algorithm, which you are using.
-- The parameters of the view are defined at the
-- time of construction of a Prs3d_Projector object.
uses
Real from Standard,
Boolean from Standard,
Trsf from gp,
Lin from gp,
Pnt from gp,
Vec from gp,
Ax2 from gp,
Vec2d from gp,
Pnt2d from gp
raises
NoSuchObject from Standard
is
Create returns Projector from HLRAlgo;
Create(CS : Ax2 from gp)
---Purpose: Creates an axonometric projector. <CS> is the
-- viewing coordinate system.
returns Projector from HLRAlgo;
Create(CS : Ax2 from gp;
Focus : Real from Standard)
---Purpose: Creates a perspective projector. <CS> is the
-- viewing coordinate system.
returns Projector from HLRAlgo;
Create(T : Trsf from gp;
Persp : Boolean from Standard;
Focus : Real from Standard)
---Purpose: build a Projector with automatic minmax directions.
returns Projector from HLRAlgo;
Create(T : Trsf from gp;
Persp : Boolean from Standard;
Focus : Real from Standard;
v1,v2,v3 : Vec2d from gp)
---Purpose: build a Projector with given minmax directions.
returns Projector from HLRAlgo;
Set (me: in out ;
T : Trsf from gp;
Persp : Boolean from Standard;
Focus : Real from Standard)
is static;
Directions(me; D1 , D2 , D3 : out Vec2d from gp)
---C++: inline
is static;
Scaled(me : in out; On : Boolean from Standard = Standard_False)
---Purpose: to compute with the given scale and translation.
is static;
Perspective(me) returns Boolean
---Purpose: Returns True if there is a perspective transformation.
---C++: inline
is static;
Transformation(me) returns Trsf from gp
---Purpose: Returns the active transformation.
---C++: return const &
is static;
InvertedTransformation(me) returns Trsf from gp
---Purpose: Returns the active inverted transformation.
---C++: inline
---C++: return const &
is static;
FullTransformation(me) returns Trsf from gp
---Purpose: Returns the original transformation.
---C++: inline
---C++: return const &
is static;
Focus(me) returns Real from Standard
---Purpose: Returns the focal length.
---C++: inline
raises
NoSuchObject from Standard -- if there is no perspective
is static;
Transform(me; D : in out Vec from gp)
---C++: inline
is static;
Transform(me; Pnt : in out Pnt from gp)
---C++: inline
is static;
Project(me; P : Pnt from gp;
Pout : out Pnt2d from gp)
---Purpose: Transform and apply perspective if needed.
is static;
Project(me; P : Pnt from gp;
X,Y,Z : out Real from Standard)
---Purpose: Transform and apply perspective if needed.
is static;
Project(me; P : Pnt from gp;
D1 : Vec from gp;
Pout : out Pnt2d from gp;
D1out : out Vec2d from gp)
---Purpose: Transform and apply perspective if needed.
is static;
Shoot(me; X , Y : Real from Standard)
returns Lin from gp
---Purpose: return a line going through the eye towards the
-- 2d point <X,Y>.
is static;
SetDirection(me: in out)
is static private;
fields
myType : Integer from Standard;
myPersp : Boolean from Standard;
myFocus : Real from Standard;
myScaledTrsf : Trsf from gp;
myTrsf : Trsf from gp;
myInvTrsf : Trsf from gp;
myD1 : Vec2d from gp;
myD2 : Vec2d from gp;
myD3 : Vec2d from gp;
end Projector;

View File

@@ -17,25 +17,30 @@
#ifndef No_Exception
// #define No_Exception
#endif
#include <HLRAlgo_Projector.ixx>
#include <Precision.hxx>
#include <gp_Ax2.hxx>
#include <gp_Ax3.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <HLRAlgo_Projector.hxx>
#include <Precision.hxx>
#include <Standard_NoSuchObject.hxx>
// formula for derivating a perspective, from Mathematica
// X'[t] X[t] Z'[t]
// D1 = -------- + -------------
// Z[t] Z[t] 2
// 1 - ---- f (1 - ----)
// f f
//=======================================================================
//function : HLRAlgo_Projector
//purpose :
//=======================================================================
HLRAlgo_Projector::HLRAlgo_Projector () :
myPersp(Standard_False),myFocus(0)
{

View File

@@ -0,0 +1,148 @@
// Created on: 1992-03-12
// 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 _HLRAlgo_Projector_HeaderFile
#define _HLRAlgo_Projector_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec2d.hxx>
class Standard_NoSuchObject;
class gp_Ax2;
class gp_Trsf;
class gp_Vec2d;
class gp_Vec;
class gp_Pnt;
class gp_Pnt2d;
class gp_Lin;
//! Implements a projector object.
//! To transform and project Points and Planes.
//! This object is designed to be used in the
//! removal of hidden lines and is returned by the
//! Prs3d_Projector::Projector function.
//! You define the projection of the selected shape
//! by calling one of the following functions:
//! - HLRBRep_Algo::Projector, or
//! - HLRBRep_PolyAlgo::Projector
//! The choice depends on the algorithm, which you are using.
//! The parameters of the view are defined at the
//! time of construction of a Prs3d_Projector object.
class HLRAlgo_Projector
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT HLRAlgo_Projector();
//! Creates an axonometric projector. <CS> is the
//! viewing coordinate system.
Standard_EXPORT HLRAlgo_Projector(const gp_Ax2& CS);
//! Creates a perspective projector. <CS> is the
//! viewing coordinate system.
Standard_EXPORT HLRAlgo_Projector(const gp_Ax2& CS, const Standard_Real Focus);
//! build a Projector with automatic minmax directions.
Standard_EXPORT HLRAlgo_Projector(const gp_Trsf& T, const Standard_Boolean Persp, const Standard_Real Focus);
//! build a Projector with given minmax directions.
Standard_EXPORT HLRAlgo_Projector(const gp_Trsf& T, const Standard_Boolean Persp, const Standard_Real Focus, const gp_Vec2d& v1, const gp_Vec2d& v2, const gp_Vec2d& v3);
Standard_EXPORT void Set (const gp_Trsf& T, const Standard_Boolean Persp, const Standard_Real Focus);
void Directions (gp_Vec2d& D1, gp_Vec2d& D2, gp_Vec2d& D3) const;
//! to compute with the given scale and translation.
Standard_EXPORT void Scaled (const Standard_Boolean On = Standard_False);
//! Returns True if there is a perspective transformation.
Standard_Boolean Perspective() const;
//! Returns the active transformation.
Standard_EXPORT const gp_Trsf& Transformation() const;
//! Returns the active inverted transformation.
const gp_Trsf& InvertedTransformation() const;
//! Returns the original transformation.
const gp_Trsf& FullTransformation() const;
//! Returns the focal length.
Standard_Real Focus() const;
void Transform (gp_Vec& D) const;
void Transform (gp_Pnt& Pnt) const;
//! Transform and apply perspective if needed.
Standard_EXPORT void Project (const gp_Pnt& P, gp_Pnt2d& Pout) const;
//! Transform and apply perspective if needed.
Standard_EXPORT void Project (const gp_Pnt& P, Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const;
//! Transform and apply perspective if needed.
Standard_EXPORT void Project (const gp_Pnt& P, const gp_Vec& D1, gp_Pnt2d& Pout, gp_Vec2d& D1out) const;
//! return a line going through the eye towards the
//! 2d point <X,Y>.
Standard_EXPORT gp_Lin Shoot (const Standard_Real X, const Standard_Real Y) const;
protected:
private:
Standard_EXPORT void SetDirection();
Standard_Integer myType;
Standard_Boolean myPersp;
Standard_Real myFocus;
gp_Trsf myScaledTrsf;
gp_Trsf myTrsf;
gp_Trsf myInvTrsf;
gp_Vec2d myD1;
gp_Vec2d myD2;
gp_Vec2d myD3;
};
#include <HLRAlgo_Projector.lxx>
#endif // _HLRAlgo_Projector_HeaderFile

View File

@@ -1,36 +0,0 @@
-- Created on: 1993-10-29
-- Created by: Christophe MARION
-- 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 TriangleData from HLRAlgo
---Purpose: Data structure of a triangle.
uses
Address from Standard,
Integer from Standard,
Boolean from Standard
is
Create returns TriangleData from HLRAlgo;
---C++: inline
Indices(me) returns Address from Standard
---C++: inline
is static;
fields
myIndices : Integer from Standard[4];
end TriangleData;

View File

@@ -14,4 +14,5 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_TriangleData.ixx>
#include <HLRAlgo_TriangleData.hxx>

View File

@@ -0,0 +1,65 @@
// Created on: 1993-10-29
// Created by: Christophe MARION
// 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 _HLRAlgo_TriangleData_HeaderFile
#define _HLRAlgo_TriangleData_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Address.hxx>
//! Data structure of a triangle.
class HLRAlgo_TriangleData
{
public:
DEFINE_STANDARD_ALLOC
HLRAlgo_TriangleData();
Standard_Address Indices() const;
protected:
private:
Standard_Integer myIndices[4];
};
#include <HLRAlgo_TriangleData.lxx>
#endif // _HLRAlgo_TriangleData_HeaderFile

View File

@@ -1,61 +0,0 @@
-- Created on: 1992-04-06
-- 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.
class WiresBlock from HLRAlgo inherits TShared from MMgt
---Purpose: A WiresBlock is a set of Blocks. It is used by the
-- DataStructure to structure the Edges.
--
-- A WiresBlock contains :
--
-- * An Array of Blocks.
uses
Address from Standard,
Boolean from Standard,
Integer from Standard,
EdgesBlock from HLRAlgo,
Array1OfTransient from TColStd
is
Create(NbWires : Integer from Standard)
---Purpose: Create a Block of Blocks.
returns WiresBlock from HLRAlgo;
NbWires(me) returns Integer from Standard
is static;
Set(me : mutable; I : Integer from Standard;
W : EdgesBlock from HLRAlgo)
is static;
Wire(me : mutable; I : Integer from Standard)
returns any EdgesBlock from HLRAlgo
---C++: return &
is static;
UpdateMinMax(me : mutable; TotMinMax : Address from Standard)
is static;
MinMax(me) returns Address from Standard
---C++: inline
is static;
fields
myWires : Array1OfTransient from TColStd;
myMinMax : Integer from Standard[16];
end WiresBlock;

View File

@@ -17,13 +17,16 @@
#ifndef No_Exception
#define No_Exception
#endif
#include <HLRAlgo_WiresBlock.ixx>
#include <HLRAlgo_EdgesBlock.hxx>
#include <HLRAlgo_WiresBlock.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : HLRAlgo_WiresBlock
//purpose :
//=======================================================================
HLRAlgo_WiresBlock::HLRAlgo_WiresBlock (const Standard_Integer NbWires) :
myWires(1,NbWires)
{}

View File

@@ -0,0 +1,84 @@
// Created on: 1992-04-06
// 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 _HLRAlgo_WiresBlock_HeaderFile
#define _HLRAlgo_WiresBlock_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <Standard_Integer.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Address.hxx>
class HLRAlgo_EdgesBlock;
class HLRAlgo_WiresBlock;
DEFINE_STANDARD_HANDLE(HLRAlgo_WiresBlock, MMgt_TShared)
//! A WiresBlock is a set of Blocks. It is used by the
//! DataStructure to structure the Edges.
//!
//! A WiresBlock contains :
//!
//! * An Array of Blocks.
class HLRAlgo_WiresBlock : public MMgt_TShared
{
public:
//! Create a Block of Blocks.
Standard_EXPORT HLRAlgo_WiresBlock(const Standard_Integer NbWires);
Standard_EXPORT Standard_Integer NbWires() const;
Standard_EXPORT void Set (const Standard_Integer I, const Handle(HLRAlgo_EdgesBlock)& W);
Standard_EXPORT Handle(HLRAlgo_EdgesBlock)& Wire (const Standard_Integer I);
Standard_EXPORT void UpdateMinMax (const Standard_Address TotMinMax);
Standard_Address MinMax() const;
DEFINE_STANDARD_RTTI(HLRAlgo_WiresBlock,MMgt_TShared)
protected:
private:
TColStd_Array1OfTransient myWires;
Standard_Integer myMinMax[16];
};
#include <HLRAlgo_WiresBlock.lxx>
#endif // _HLRAlgo_WiresBlock_HeaderFile