mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -1,18 +1,37 @@
|
||||
MAT2d_SequenceOfConnexion.hxx
|
||||
MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion.hxx
|
||||
MAT2d_Array2OfConnexion.hxx
|
||||
MAT2d_DataMapOfIntegerBisec.hxx
|
||||
MAT2d_BiInt.cxx
|
||||
MAT2d_BiInt.hxx
|
||||
MAT2d_Circuit.cxx
|
||||
MAT2d_Circuit.hxx
|
||||
MAT2d_Connexion.cxx
|
||||
MAT2d_Connexion.hxx
|
||||
MAT2d_CutCurve.cxx
|
||||
MAT2d_CutCurve.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfBiIntInteger.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerBisec.hxx
|
||||
MAT2d_DataMapOfIntegerPnt2d.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerPnt2d.hxx
|
||||
MAT2d_DataMapOfIntegerVec2d.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerVec2d.hxx
|
||||
MAT2d_DataMapOfBiIntInteger.hxx
|
||||
MAT2d_DataMapOfBiIntSequenceOfInteger.hxx
|
||||
MAT2d_DataMapOfIntegerBisec.hxx
|
||||
MAT2d_DataMapOfIntegerConnexion.hxx
|
||||
MAT2d_DataMapOfIntegerPnt2d.hxx
|
||||
MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx
|
||||
MAT2d_DataMapOfIntegerVec2d.hxx
|
||||
MAT2d_MapBiIntHasher.cxx
|
||||
MAT2d_MapBiIntHasher.hxx
|
||||
MAT2d_MapBiIntHasher.lxx
|
||||
MAT2d_Mat2d.cxx
|
||||
MAT2d_Mat2d.hxx
|
||||
MAT2d_MiniPath.cxx
|
||||
MAT2d_MiniPath.hxx
|
||||
MAT2d_SequenceOfConnexion.hxx
|
||||
MAT2d_SequenceOfSequenceOfCurve.hxx
|
||||
MAT2d_SequenceOfSequenceOfGeometry.hxx
|
||||
MAT2d_DataMapOfIntegerConnexion.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfIntegerConnexion.hxx
|
||||
MAT2d_DataMapOfBiIntSequenceOfInteger.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx
|
||||
MAT2d_DataMapOfBiIntInteger.hxx
|
||||
MAT2d_DataMapIteratorOfDataMapOfBiIntInteger.hxx
|
||||
MAT2d_SketchExplorer.cxx
|
||||
MAT2d_SketchExplorer.hxx
|
||||
MAT2d_Tool2d.cxx
|
||||
MAT2d_Tool2d.hxx
|
||||
|
@@ -1,94 +0,0 @@
|
||||
-- Created on: 1993-07-06
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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.
|
||||
|
||||
package MAT2d
|
||||
|
||||
---Purpose : Package of computation of Bisector locus on a
|
||||
-- Set of geometrys from Geom2d.
|
||||
|
||||
uses
|
||||
GeomAbs,
|
||||
MMgt,
|
||||
gp,
|
||||
Geom2d,
|
||||
TColStd,
|
||||
TCollection,
|
||||
TColgp,
|
||||
TColGeom2d,
|
||||
MAT,
|
||||
Bisector
|
||||
|
||||
is
|
||||
|
||||
deferred class SketchExplorer;
|
||||
|
||||
class Tool2d;
|
||||
|
||||
class Mat2d;
|
||||
|
||||
class Connexion;
|
||||
|
||||
class MiniPath;
|
||||
|
||||
class Circuit;
|
||||
|
||||
class CutCurve;
|
||||
|
||||
imported SequenceOfConnexion;
|
||||
|
||||
imported DataMapOfIntegerSequenceOfConnexion;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerSequenceOfConnexion;
|
||||
|
||||
imported Array2OfConnexion;
|
||||
|
||||
|
||||
imported DataMapOfIntegerBisec;
|
||||
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerBisec;
|
||||
|
||||
imported DataMapOfIntegerPnt2d;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerPnt2d;
|
||||
|
||||
imported DataMapOfIntegerVec2d;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerVec2d;
|
||||
|
||||
imported SequenceOfSequenceOfCurve;
|
||||
|
||||
imported SequenceOfSequenceOfGeometry;
|
||||
|
||||
imported DataMapOfIntegerConnexion;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfIntegerConnexion;
|
||||
|
||||
class BiInt;
|
||||
|
||||
class MapBiIntHasher;
|
||||
|
||||
imported DataMapOfBiIntSequenceOfInteger;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfBiIntSequenceOfInteger;
|
||||
|
||||
imported DataMapOfBiIntInteger;
|
||||
|
||||
imported DataMapIteratorOfDataMapOfBiIntInteger;
|
||||
end MAT2d;
|
||||
|
||||
|
||||
|
@@ -1,45 +0,0 @@
|
||||
-- Created on: 1993-11-19
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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 BiInt from MAT2d
|
||||
|
||||
---Purpose: BiInt is a set of two integers.
|
||||
is
|
||||
|
||||
Create ( I1,I2 : Integer) returns BiInt from MAT2d;
|
||||
|
||||
FirstIndex(me) returns Integer
|
||||
is static;
|
||||
|
||||
SecondIndex(me) returns Integer
|
||||
is static;
|
||||
|
||||
FirstIndex(me : in out ; I1 : Integer)
|
||||
is static;
|
||||
|
||||
SecondIndex(me : in out ; I2 : Integer)
|
||||
is static;
|
||||
|
||||
IsEqual (me ;B : BiInt from MAT2d) returns Boolean
|
||||
---C++: alias operator ==
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
i1 : Integer;
|
||||
i2 : Integer;
|
||||
|
||||
end BiInt;
|
@@ -14,7 +14,8 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
# include <MAT2d_BiInt.ixx>
|
||||
|
||||
#include <MAT2d_BiInt.hxx>
|
||||
|
||||
MAT2d_BiInt::MAT2d_BiInt(const Standard_Integer I1,
|
||||
const Standard_Integer I2)
|
||||
|
77
src/MAT2d/MAT2d_BiInt.hxx
Normal file
77
src/MAT2d/MAT2d_BiInt.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 1993-11-19
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_BiInt_HeaderFile
|
||||
#define _MAT2d_BiInt_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
||||
//! BiInt is a set of two integers.
|
||||
class MAT2d_BiInt
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT MAT2d_BiInt(const Standard_Integer I1, const Standard_Integer I2);
|
||||
|
||||
Standard_EXPORT Standard_Integer FirstIndex() const;
|
||||
|
||||
Standard_EXPORT Standard_Integer SecondIndex() const;
|
||||
|
||||
Standard_EXPORT void FirstIndex (const Standard_Integer I1);
|
||||
|
||||
Standard_EXPORT void SecondIndex (const Standard_Integer I2);
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const MAT2d_BiInt& B) const;
|
||||
Standard_Boolean operator == (const MAT2d_BiInt& B) const
|
||||
{
|
||||
return IsEqual(B);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Standard_Integer i1;
|
||||
Standard_Integer i2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_BiInt_HeaderFile
|
@@ -1,144 +0,0 @@
|
||||
-- Created on: 1993-11-18
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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 Circuit from MAT2d
|
||||
|
||||
inherits
|
||||
|
||||
TShared from MMgt
|
||||
|
||||
---Purpose: Constructs a circuit on a set of lines.
|
||||
-- EquiCircuit gives a Circuit passing by all the lines
|
||||
-- in a set and all the connexions of the minipath associated.
|
||||
--
|
||||
|
||||
uses
|
||||
JoinType from GeomAbs,
|
||||
SequenceOfInteger from TColStd,
|
||||
Geometry from Geom2d,
|
||||
SequenceOfGeometry from TColGeom2d,
|
||||
SequenceOfBoolean from TColStd,
|
||||
SequenceOfConnexion from MAT2d,
|
||||
BiInt from MAT2d,
|
||||
Connexion from MAT2d,
|
||||
SequenceOfSequenceOfGeometry from MAT2d,
|
||||
DataMapOfIntegerConnexion from MAT2d,
|
||||
MiniPath from MAT2d,
|
||||
DataMapOfBiIntSequenceOfInteger from MAT2d
|
||||
|
||||
is
|
||||
|
||||
Create(aJoinType : JoinType from GeomAbs = GeomAbs_Arc;
|
||||
IsOpenResult : Boolean from Standard = Standard_False)
|
||||
returns Circuit from MAT2d;
|
||||
|
||||
---Category: Computation
|
||||
|
||||
Perform(me : mutable ;
|
||||
aFigure : in out SequenceOfSequenceOfGeometry;
|
||||
IsClosed : SequenceOfBoolean from TColStd;
|
||||
IndRefLine : Integer;
|
||||
Trigo : Boolean)
|
||||
is static;
|
||||
|
||||
IsSharpCorner(me; Geom1, Geom2 : Geometry from Geom2d;
|
||||
Direction : Real from Standard)
|
||||
returns Boolean
|
||||
is static private;
|
||||
|
||||
PassByLast(me ; C1,C2 : Connexion from MAT2d)
|
||||
returns Boolean
|
||||
is static private;
|
||||
|
||||
Side (me ; C : Connexion from MAT2d; Line : SequenceOfGeometry)
|
||||
returns Real
|
||||
is static private;
|
||||
|
||||
UpDateLink(me : mutable ;
|
||||
IFirst,ILine,ICurveFirst,ICurveLast: Integer)
|
||||
is static private;
|
||||
|
||||
SortRefToEqui(me : mutable ; aBiInt : BiInt from MAT2d)
|
||||
is static private;
|
||||
|
||||
InitOpen(me ; Line : in out SequenceOfGeometry)
|
||||
is static private;
|
||||
|
||||
InsertCorner(me ; Line : in out SequenceOfGeometry)
|
||||
is static private;
|
||||
|
||||
DoubleLine(me ;
|
||||
Line : in out SequenceOfGeometry;
|
||||
Connexions : in out SequenceOfConnexion from MAT2d;
|
||||
Father : Connexion from MAT2d;
|
||||
Side : Real)
|
||||
is static private;
|
||||
|
||||
ConstructCircuit(me : mutable ;
|
||||
aFigure : SequenceOfSequenceOfGeometry;
|
||||
IndRefLine : Integer;
|
||||
aPath : MiniPath from MAT2d)
|
||||
is static private;
|
||||
|
||||
---Category: Querying
|
||||
|
||||
NumberOfItems(me)
|
||||
---Purpose: Returns the Number of Items .
|
||||
returns Integer is static;
|
||||
|
||||
Value(me ; Index : Integer)
|
||||
---Purpose: Returns the item at position <Index> in <me>.
|
||||
returns Geometry from Geom2d
|
||||
is static;
|
||||
|
||||
LineLength(me ; IndexLine : Integer)
|
||||
---Purpose: Returns the number of items on the line <IndexLine>.
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
|
||||
RefToEqui(me ; IndLine : Integer; IndCurve : Integer)
|
||||
---Purpose: Returns the set of index of the items in <me>corresponding
|
||||
-- to the curve <IndCurve> on the line <IndLine> from the
|
||||
-- initial figure.
|
||||
--
|
||||
---C++: return const&
|
||||
returns SequenceOfInteger from TColStd
|
||||
is static;
|
||||
|
||||
Connexion(me ; Index : Integer)
|
||||
---Purpose: Returns the Connexion on the item <Index> in me.
|
||||
returns Connexion from MAT2d
|
||||
is static;
|
||||
|
||||
ConnexionOn(me ; Index : Integer)
|
||||
---Purpose: Returns <True> is there is a connexion on the item <Index>
|
||||
-- in <me>.
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
direction : Real;
|
||||
geomElements : SequenceOfGeometry from TColGeom2d;
|
||||
connexionMap : DataMapOfIntegerConnexion from MAT2d;
|
||||
linkRefEqui : DataMapOfBiIntSequenceOfInteger from MAT2d;
|
||||
linesLength : SequenceOfInteger from TColStd;
|
||||
myJoinType : JoinType from GeomAbs;
|
||||
myIsOpenResult : Boolean from Standard;
|
||||
|
||||
end Circuit;
|
||||
|
||||
|
@@ -30,26 +30,28 @@
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#endif
|
||||
|
||||
#include <MAT2d_Circuit.ixx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
|
||||
#include <Adaptor3d_OffsetCurve.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <Geom2d_Geometry.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <Geom2d_Geometry.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <MAT2d_BiInt.hxx>
|
||||
#include <MAT2d_Circuit.hxx>
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx>
|
||||
#include <MAT2d_DataMapOfBiIntSequenceOfInteger.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerConnexion.hxx>
|
||||
#include <MAT2d_MiniPath.hxx>
|
||||
#include <MAT2d_SequenceOfConnexion.hxx>
|
||||
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_Array1OfBoolean.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <MAT2d_BiInt.hxx>
|
||||
#include <MAT2d_MiniPath.hxx>
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <MAT2d_SequenceOfConnexion.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerConnexion.hxx>
|
||||
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
|
||||
#include <MAT2d_DataMapOfBiIntSequenceOfInteger.hxx>
|
||||
#include <MAT2d_DataMapIteratorOfDataMapOfBiIntSequenceOfInteger.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Adaptor3d_OffsetCurve.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <Geom2dAdaptor_HCurve.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
|
||||
#ifdef DRAW
|
||||
static Handle(DrawTrSurf_Curve2d) draw;
|
||||
|
126
src/MAT2d/MAT2d_Circuit.hxx
Normal file
126
src/MAT2d/MAT2d_Circuit.hxx
Normal file
@@ -0,0 +1,126 @@
|
||||
// Created on: 1993-11-18
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_Circuit_HeaderFile
|
||||
#define _MAT2d_Circuit_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColGeom2d_SequenceOfGeometry.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerConnexion.hxx>
|
||||
#include <MAT2d_DataMapOfBiIntSequenceOfInteger.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <GeomAbs_JoinType.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
|
||||
#include <TColStd_SequenceOfBoolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <MAT2d_SequenceOfConnexion.hxx>
|
||||
class Geom2d_Geometry;
|
||||
class MAT2d_Connexion;
|
||||
class MAT2d_BiInt;
|
||||
class MAT2d_MiniPath;
|
||||
|
||||
|
||||
class MAT2d_Circuit;
|
||||
DEFINE_STANDARD_HANDLE(MAT2d_Circuit, MMgt_TShared)
|
||||
|
||||
//! Constructs a circuit on a set of lines.
|
||||
//! EquiCircuit gives a Circuit passing by all the lines
|
||||
//! in a set and all the connexions of the minipath associated.
|
||||
class MAT2d_Circuit : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT MAT2d_Circuit(const GeomAbs_JoinType aJoinType = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False);
|
||||
|
||||
Standard_EXPORT void Perform (MAT2d_SequenceOfSequenceOfGeometry& aFigure, const TColStd_SequenceOfBoolean& IsClosed, const Standard_Integer IndRefLine, const Standard_Boolean Trigo);
|
||||
|
||||
//! Returns the Number of Items .
|
||||
Standard_EXPORT Standard_Integer NumberOfItems() const;
|
||||
|
||||
//! Returns the item at position <Index> in <me>.
|
||||
Standard_EXPORT Handle(Geom2d_Geometry) Value (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns the number of items on the line <IndexLine>.
|
||||
Standard_EXPORT Standard_Integer LineLength (const Standard_Integer IndexLine) const;
|
||||
|
||||
//! Returns the set of index of the items in <me>corresponding
|
||||
//! to the curve <IndCurve> on the line <IndLine> from the
|
||||
//! initial figure.
|
||||
Standard_EXPORT const TColStd_SequenceOfInteger& RefToEqui (const Standard_Integer IndLine, const Standard_Integer IndCurve) const;
|
||||
|
||||
//! Returns the Connexion on the item <Index> in me.
|
||||
Standard_EXPORT Handle(MAT2d_Connexion) Connexion (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns <True> is there is a connexion on the item <Index>
|
||||
//! in <me>.
|
||||
Standard_EXPORT Standard_Boolean ConnexionOn (const Standard_Integer Index) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(MAT2d_Circuit,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsSharpCorner (const Handle(Geom2d_Geometry)& Geom1, const Handle(Geom2d_Geometry)& Geom2, const Standard_Real Direction) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean PassByLast (const Handle(MAT2d_Connexion)& C1, const Handle(MAT2d_Connexion)& C2) const;
|
||||
|
||||
Standard_EXPORT Standard_Real Side (const Handle(MAT2d_Connexion)& C, const TColGeom2d_SequenceOfGeometry& Line) const;
|
||||
|
||||
Standard_EXPORT void UpDateLink (const Standard_Integer IFirst, const Standard_Integer ILine, const Standard_Integer ICurveFirst, const Standard_Integer ICurveLast);
|
||||
|
||||
Standard_EXPORT void SortRefToEqui (const MAT2d_BiInt& aBiInt);
|
||||
|
||||
Standard_EXPORT void InitOpen (TColGeom2d_SequenceOfGeometry& Line) const;
|
||||
|
||||
Standard_EXPORT void InsertCorner (TColGeom2d_SequenceOfGeometry& Line) const;
|
||||
|
||||
Standard_EXPORT void DoubleLine (TColGeom2d_SequenceOfGeometry& Line, MAT2d_SequenceOfConnexion& Connexions, const Handle(MAT2d_Connexion)& Father, const Standard_Real Side) const;
|
||||
|
||||
Standard_EXPORT void ConstructCircuit (const MAT2d_SequenceOfSequenceOfGeometry& aFigure, const Standard_Integer IndRefLine, const MAT2d_MiniPath& aPath);
|
||||
|
||||
Standard_Real direction;
|
||||
TColGeom2d_SequenceOfGeometry geomElements;
|
||||
MAT2d_DataMapOfIntegerConnexion connexionMap;
|
||||
MAT2d_DataMapOfBiIntSequenceOfInteger linkRefEqui;
|
||||
TColStd_SequenceOfInteger linesLength;
|
||||
GeomAbs_JoinType myJoinType;
|
||||
Standard_Boolean myIsOpenResult;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_Circuit_HeaderFile
|
@@ -1,141 +0,0 @@
|
||||
-- Created on: 1993-10-07
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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 Connexion from MAT2d
|
||||
|
||||
inherits
|
||||
|
||||
TShared from MMgt
|
||||
|
||||
---Purpose: A Connexion links two lines of items in a set
|
||||
-- of lines. It s contains two points and their paramatric
|
||||
-- definitions on the lines.
|
||||
-- The items can be points or curves.
|
||||
|
||||
uses
|
||||
Pnt2d from gp
|
||||
|
||||
is
|
||||
|
||||
Create returns Connexion from MAT2d;
|
||||
|
||||
Create(LineA : Integer;
|
||||
LineB : Integer;
|
||||
ItemA : Integer;
|
||||
ItemB : Integer;
|
||||
Distance : Real;
|
||||
ParameterOnA : Real;
|
||||
ParameterOnB : Real;
|
||||
PointA : Pnt2d from gp;
|
||||
PointB : Pnt2d from gp)
|
||||
returns Connexion from MAT2d;
|
||||
|
||||
IndexFirstLine(me) returns Integer
|
||||
---Purpose: Returns the Index on the first line.
|
||||
is static;
|
||||
|
||||
IndexSecondLine(me) returns Integer
|
||||
---Purpose: Returns the Index on the Second line.
|
||||
is static;
|
||||
|
||||
IndexItemOnFirst(me) returns Integer
|
||||
---Purpose: Returns the Index of the item on the first line.
|
||||
is static;
|
||||
|
||||
IndexItemOnSecond(me) returns Integer
|
||||
---Purpose: Returns the Index of the item on the second line.
|
||||
is static;
|
||||
|
||||
ParameterOnFirst(me) returns Real
|
||||
---Purpose: Returns the parameter of the point on the firstline.
|
||||
is static;
|
||||
|
||||
ParameterOnSecond(me) returns Real
|
||||
---Purpose: Returns the parameter of the point on the secondline.
|
||||
is static;
|
||||
|
||||
PointOnFirst(me) returns Pnt2d from gp
|
||||
---Purpose: Returns the point on the firstline.
|
||||
is static;
|
||||
|
||||
PointOnSecond(me) returns Pnt2d from gp
|
||||
---Purpose: Returns the point on the secondline.
|
||||
is static;
|
||||
|
||||
Distance (me) returns Real
|
||||
---Purpose: Returns the distance between the two points.
|
||||
is static;
|
||||
|
||||
IndexFirstLine(me : mutable ; anIndex : Integer)
|
||||
is static;
|
||||
|
||||
IndexSecondLine(me : mutable ; anIndex : Integer)
|
||||
is static;
|
||||
|
||||
IndexItemOnFirst(me : mutable ; anIndex : Integer)
|
||||
is static;
|
||||
|
||||
IndexItemOnSecond(me : mutable ; anIndex : Integer)
|
||||
is static;
|
||||
|
||||
ParameterOnFirst(me : mutable ; aParameter : Real)
|
||||
is static;
|
||||
|
||||
ParameterOnSecond(me : mutable ; aParameter : Real)
|
||||
is static;
|
||||
|
||||
PointOnFirst(me : mutable ; aPoint : Pnt2d from gp)
|
||||
is static;
|
||||
|
||||
PointOnSecond(me : mutable ; aPoint : Pnt2d from gp)
|
||||
is static;
|
||||
|
||||
Distance (me : mutable ; aDistance : Real)
|
||||
is static;
|
||||
|
||||
Reverse(me)
|
||||
---Purpose: Returns the reverse connexion of <me>.
|
||||
-- the firstpoint is the secondpoint.
|
||||
-- the secondpoint is the firstpoint.
|
||||
returns Connexion from MAT2d
|
||||
is static;
|
||||
|
||||
IsAfter(me ; aConnexion : Connexion from MAT2d ; aSense : Real)
|
||||
---Purpose: Returns <True> if my firstPoint is on the same line
|
||||
-- than the firstpoint of <aConnexion> and my firstpoint
|
||||
-- is after the firstpoint of <aConnexion> on the line.
|
||||
-- <aSense> = 1 if <aConnexion> is on the Left of its
|
||||
-- firstline, else <aSense> = -1.
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
Dump (me; Deep : Integer = 0; Offset : Integer = 0)
|
||||
---Purpose: Print <me>.
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
lineA : Integer;
|
||||
lineB : Integer;
|
||||
itemA : Integer;
|
||||
itemB : Integer;
|
||||
distance : Real;
|
||||
parameterOnA : Real;
|
||||
parameterOnB : Real;
|
||||
pointA : Pnt2d from gp;
|
||||
pointB : Pnt2d from gp;
|
||||
|
||||
end Connexion;
|
@@ -14,11 +14,11 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <MAT2d_Connexion.ixx>
|
||||
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
|
||||
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
//=============================================================================
|
||||
//function :
|
||||
|
140
src/MAT2d/MAT2d_Connexion.hxx
Normal file
140
src/MAT2d/MAT2d_Connexion.hxx
Normal file
@@ -0,0 +1,140 @@
|
||||
// Created on: 1993-10-07
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_Connexion_HeaderFile
|
||||
#define _MAT2d_Connexion_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class gp_Pnt2d;
|
||||
|
||||
|
||||
class MAT2d_Connexion;
|
||||
DEFINE_STANDARD_HANDLE(MAT2d_Connexion, MMgt_TShared)
|
||||
|
||||
//! A Connexion links two lines of items in a set
|
||||
//! of lines. It s contains two points and their paramatric
|
||||
//! definitions on the lines.
|
||||
//! The items can be points or curves.
|
||||
class MAT2d_Connexion : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT MAT2d_Connexion();
|
||||
|
||||
Standard_EXPORT MAT2d_Connexion(const Standard_Integer LineA, const Standard_Integer LineB, const Standard_Integer ItemA, const Standard_Integer ItemB, const Standard_Real Distance, const Standard_Real ParameterOnA, const Standard_Real ParameterOnB, const gp_Pnt2d& PointA, const gp_Pnt2d& PointB);
|
||||
|
||||
//! Returns the Index on the first line.
|
||||
Standard_EXPORT Standard_Integer IndexFirstLine() const;
|
||||
|
||||
//! Returns the Index on the Second line.
|
||||
Standard_EXPORT Standard_Integer IndexSecondLine() const;
|
||||
|
||||
//! Returns the Index of the item on the first line.
|
||||
Standard_EXPORT Standard_Integer IndexItemOnFirst() const;
|
||||
|
||||
//! Returns the Index of the item on the second line.
|
||||
Standard_EXPORT Standard_Integer IndexItemOnSecond() const;
|
||||
|
||||
//! Returns the parameter of the point on the firstline.
|
||||
Standard_EXPORT Standard_Real ParameterOnFirst() const;
|
||||
|
||||
//! Returns the parameter of the point on the secondline.
|
||||
Standard_EXPORT Standard_Real ParameterOnSecond() const;
|
||||
|
||||
//! Returns the point on the firstline.
|
||||
Standard_EXPORT gp_Pnt2d PointOnFirst() const;
|
||||
|
||||
//! Returns the point on the secondline.
|
||||
Standard_EXPORT gp_Pnt2d PointOnSecond() const;
|
||||
|
||||
//! Returns the distance between the two points.
|
||||
Standard_EXPORT Standard_Real Distance() const;
|
||||
|
||||
Standard_EXPORT void IndexFirstLine (const Standard_Integer anIndex);
|
||||
|
||||
Standard_EXPORT void IndexSecondLine (const Standard_Integer anIndex);
|
||||
|
||||
Standard_EXPORT void IndexItemOnFirst (const Standard_Integer anIndex);
|
||||
|
||||
Standard_EXPORT void IndexItemOnSecond (const Standard_Integer anIndex);
|
||||
|
||||
Standard_EXPORT void ParameterOnFirst (const Standard_Real aParameter);
|
||||
|
||||
Standard_EXPORT void ParameterOnSecond (const Standard_Real aParameter);
|
||||
|
||||
Standard_EXPORT void PointOnFirst (const gp_Pnt2d& aPoint);
|
||||
|
||||
Standard_EXPORT void PointOnSecond (const gp_Pnt2d& aPoint);
|
||||
|
||||
Standard_EXPORT void Distance (const Standard_Real aDistance);
|
||||
|
||||
//! Returns the reverse connexion of <me>.
|
||||
//! the firstpoint is the secondpoint.
|
||||
//! the secondpoint is the firstpoint.
|
||||
Standard_EXPORT Handle(MAT2d_Connexion) Reverse() const;
|
||||
|
||||
//! Returns <True> if my firstPoint is on the same line
|
||||
//! than the firstpoint of <aConnexion> and my firstpoint
|
||||
//! is after the firstpoint of <aConnexion> on the line.
|
||||
//! <aSense> = 1 if <aConnexion> is on the Left of its
|
||||
//! firstline, else <aSense> = -1.
|
||||
Standard_EXPORT Standard_Boolean IsAfter (const Handle(MAT2d_Connexion)& aConnexion, const Standard_Real aSense) const;
|
||||
|
||||
//! Print <me>.
|
||||
Standard_EXPORT void Dump (const Standard_Integer Deep = 0, const Standard_Integer Offset = 0) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(MAT2d_Connexion,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer lineA;
|
||||
Standard_Integer lineB;
|
||||
Standard_Integer itemA;
|
||||
Standard_Integer itemB;
|
||||
Standard_Real distance;
|
||||
Standard_Real parameterOnA;
|
||||
Standard_Real parameterOnB;
|
||||
gp_Pnt2d pointA;
|
||||
gp_Pnt2d pointB;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_Connexion_HeaderFile
|
@@ -1,77 +0,0 @@
|
||||
-- Created on: 1994-09-23
|
||||
-- Created by: Yves FRICAUD
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class CutCurve from MAT2d
|
||||
|
||||
---Purpose: Cuts a curve at the extremas of curvature
|
||||
-- and at the inflections. Constructs a trimmed
|
||||
-- Curve for each interval.
|
||||
|
||||
uses
|
||||
Curve from Geom2d,
|
||||
TrimmedCurve from Geom2d,
|
||||
SequenceOfCurve from TColGeom2d,
|
||||
Side from MAT
|
||||
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
|
||||
is
|
||||
Create;
|
||||
|
||||
Create (C : Curve from Geom2d) returns CutCurve from MAT2d;
|
||||
|
||||
Perform (me : in out; C : Curve from Geom2d)
|
||||
---Purpose: Cuts a curve at the extremas of curvature
|
||||
-- and at the inflections.
|
||||
is static;
|
||||
|
||||
Perform (me : in out; C : Curve from Geom2d; aSide : Side from MAT)
|
||||
---Purpose: Cuts a curve at the inflections, and at the extremas
|
||||
-- of curvature where the concavity is on <aSide>.
|
||||
is static;
|
||||
|
||||
PerformInf (me : in out; C : Curve from Geom2d)
|
||||
---Purpose: Cuts a curve at the inflections.
|
||||
is static;
|
||||
|
||||
UnModified (me) returns Boolean from Standard
|
||||
---Purpose: Returns True if the curve is not cut.
|
||||
is static;
|
||||
|
||||
|
||||
NbCurves (me) returns Integer from Standard
|
||||
---Purpose: Returns the number of curves.
|
||||
-- it's allways greatest than 2.
|
||||
--
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: raises if the Curve is UnModified;
|
||||
is static;
|
||||
|
||||
|
||||
Value (me ; Index : Integer from Standard) returns TrimmedCurve from Geom2d
|
||||
---Purpose: Returns the Indexth curve.
|
||||
raises
|
||||
OutOfRange from Standard
|
||||
---Purpose: raises if Index not in the range [1,NbCurves()]
|
||||
is static;
|
||||
|
||||
|
||||
fields
|
||||
theCurves : SequenceOfCurve from TColGeom2d;
|
||||
|
||||
end CutCurve;
|
@@ -14,18 +14,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <MAT2d_CutCurve.ixx>
|
||||
#include <Geom2dLProp_CurAndInf2d.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dLProp_CurAndInf2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <MAT2d_CutCurve.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <TColGeom2d_SequenceOfCurve.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : MAT2d_CutCurve
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
MAT2d_CutCurve::MAT2d_CutCurve()
|
||||
{
|
||||
}
|
||||
|
95
src/MAT2d/MAT2d_CutCurve.hxx
Normal file
95
src/MAT2d/MAT2d_CutCurve.hxx
Normal file
@@ -0,0 +1,95 @@
|
||||
// Created on: 1994-09-23
|
||||
// Created by: Yves FRICAUD
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _MAT2d_CutCurve_HeaderFile
|
||||
#define _MAT2d_CutCurve_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TColGeom2d_SequenceOfCurve.hxx>
|
||||
#include <MAT_Side.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_OutOfRange;
|
||||
class Geom2d_Curve;
|
||||
class Geom2d_TrimmedCurve;
|
||||
|
||||
|
||||
//! Cuts a curve at the extremas of curvature
|
||||
//! and at the inflections. Constructs a trimmed
|
||||
//! Curve for each interval.
|
||||
class MAT2d_CutCurve
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT MAT2d_CutCurve();
|
||||
|
||||
Standard_EXPORT MAT2d_CutCurve(const Handle(Geom2d_Curve)& C);
|
||||
|
||||
//! Cuts a curve at the extremas of curvature
|
||||
//! and at the inflections.
|
||||
Standard_EXPORT void Perform (const Handle(Geom2d_Curve)& C);
|
||||
|
||||
//! Cuts a curve at the inflections, and at the extremas
|
||||
//! of curvature where the concavity is on <aSide>.
|
||||
Standard_EXPORT void Perform (const Handle(Geom2d_Curve)& C, const MAT_Side aSide);
|
||||
|
||||
//! Cuts a curve at the inflections.
|
||||
Standard_EXPORT void PerformInf (const Handle(Geom2d_Curve)& C);
|
||||
|
||||
//! Returns True if the curve is not cut.
|
||||
Standard_EXPORT Standard_Boolean UnModified() const;
|
||||
|
||||
//! Returns the number of curves.
|
||||
//! it's allways greatest than 2.
|
||||
//!
|
||||
//! raises if the Curve is UnModified;
|
||||
Standard_EXPORT Standard_Integer NbCurves() const;
|
||||
|
||||
//! Returns the Indexth curve.
|
||||
//! raises if Index not in the range [1,NbCurves()]
|
||||
Standard_EXPORT Handle(Geom2d_TrimmedCurve) Value (const Standard_Integer Index) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
TColGeom2d_SequenceOfCurve theCurves;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_CutCurve_HeaderFile
|
@@ -1,36 +0,0 @@
|
||||
-- Created on: 1993-11-19
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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 MapBiIntHasher from MAT2d
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
BiInt from MAT2d
|
||||
|
||||
is
|
||||
HashCode(myclass;
|
||||
Key1 : BiInt from MAT2d;
|
||||
Upper : Integer )
|
||||
|
||||
---C++: inline
|
||||
returns Integer;
|
||||
|
||||
IsEqual(myclass; Key1, Key2 : BiInt from MAT2d)
|
||||
---C++: inline
|
||||
returns Boolean;
|
||||
|
||||
end MapBiIntHasher;
|
@@ -14,4 +14,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <MAT2d_MapBiIntHasher.ixx>
|
||||
|
||||
#include <MAT2d_BiInt.hxx>
|
||||
#include <MAT2d_MapBiIntHasher.hxx>
|
||||
|
65
src/MAT2d/MAT2d_MapBiIntHasher.hxx
Normal file
65
src/MAT2d/MAT2d_MapBiIntHasher.hxx
Normal file
@@ -0,0 +1,65 @@
|
||||
// Created on: 1993-11-19
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_MapBiIntHasher_HeaderFile
|
||||
#define _MAT2d_MapBiIntHasher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class MAT2d_BiInt;
|
||||
|
||||
|
||||
|
||||
class MAT2d_MapBiIntHasher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
static Standard_Integer HashCode (const MAT2d_BiInt& Key1, const Standard_Integer Upper);
|
||||
|
||||
static Standard_Boolean IsEqual (const MAT2d_BiInt& Key1, const MAT2d_BiInt& Key2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#include <MAT2d_MapBiIntHasher.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_MapBiIntHasher_HeaderFile
|
@@ -1,114 +0,0 @@
|
||||
-- Created on: 1992-09-22
|
||||
-- Created by: Gilles DEBARBOUILLE
|
||||
-- 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 Mat2d from MAT2d
|
||||
|
||||
---Purpose: this class contains the generic algoritm of
|
||||
-- computation of the bisecting locus.
|
||||
|
||||
uses
|
||||
Side from MAT,
|
||||
Bisector from MAT,
|
||||
ListOfEdge from MAT,
|
||||
ListOfBisector from MAT,
|
||||
DataMapOfIntegerBisector from MAT,
|
||||
DataMapOfIntegerInteger from TColStd,
|
||||
Tool2d from MAT2d
|
||||
|
||||
is
|
||||
|
||||
Create(IsOpenResult : Boolean from Standard = Standard_False)
|
||||
---Purpose: Empty construtor.
|
||||
returns Mat2d from MAT2d;
|
||||
|
||||
--- Category : Computation.
|
||||
|
||||
CreateMat(me : in out ; aTool : in out Tool2d from MAT2d)
|
||||
---Purpose: Algoritm of computation of the bisecting locus.
|
||||
is static;
|
||||
|
||||
CreateMatOpen(me : in out ; aTool : in out Tool2d from MAT2d)
|
||||
---Purpose: Algoritm of computation of the bisecting locus for
|
||||
-- open wire.
|
||||
is static;
|
||||
|
||||
IsDone(me) returns Boolean from Standard
|
||||
---Purpose: Returns <TRUE> if CreateMat has succeeded.
|
||||
is static;
|
||||
|
||||
LoadBisectorsToRemove(me : in out ;
|
||||
noofbisectorstoremove : in out Integer;
|
||||
distance1 : Real;
|
||||
distance2 : Real;
|
||||
bisector1 : Bisector from MAT;
|
||||
bisector2 : Bisector from MAT;
|
||||
bisector3 : Bisector from MAT;
|
||||
bisector4 : Bisector from MAT)
|
||||
is static private;
|
||||
|
||||
|
||||
Intersect( me : in out ;
|
||||
atool : in out Tool2d from MAT2d;
|
||||
aside : Integer ;
|
||||
noofbisectorstoremove: in out Integer ;
|
||||
bisector1 : Bisector from MAT;
|
||||
bisector2 : Bisector from MAT)
|
||||
is static private;
|
||||
|
||||
|
||||
--- Category : Querying.
|
||||
|
||||
Init(me : in out)
|
||||
--- Purpose : Initialize an iterator on the set of the roots
|
||||
-- of the trees of bisectors.
|
||||
is static;
|
||||
|
||||
More(me) returns Boolean
|
||||
--- Purpose : Return False if there is no more roots.
|
||||
is static;
|
||||
|
||||
Next(me : in out)
|
||||
--- Purpose : Move to the next root.
|
||||
is static;
|
||||
|
||||
Bisector(me) returns any Bisector from MAT
|
||||
--- Purpose : Returns the current root.
|
||||
is static;
|
||||
|
||||
SemiInfinite(me) returns Boolean from Standard
|
||||
--- Purpose : Returns True if there are semi_infinite bisectors.
|
||||
-- So there is a tree for each semi_infinte bisector.
|
||||
is static;
|
||||
|
||||
NumberOfBisectors(me) returns Integer from Standard
|
||||
--- Purpose : Returns the total number of bisectors.
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
myIsOpenResult : Boolean;
|
||||
thenumberofbisectors : Integer;
|
||||
thenumberofedges : Integer;
|
||||
semiInfinite : Boolean;
|
||||
theedgelist : ListOfEdge from MAT;
|
||||
typeofbisectortoremove: DataMapOfIntegerInteger from TColStd;
|
||||
bisectoronetoremove : DataMapOfIntegerBisector from MAT;
|
||||
bisectortwotoremove : DataMapOfIntegerBisector from MAT;
|
||||
bisectormap : DataMapOfIntegerBisector from MAT;
|
||||
roots : ListOfBisector from MAT;
|
||||
isDone : Boolean;
|
||||
|
||||
end Mat2d;
|
@@ -14,23 +14,22 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <MAT2d_Mat2d.ixx>
|
||||
|
||||
#include <MAT_Edge.hxx>
|
||||
#include <MAT_ListOfEdge.hxx>
|
||||
#include <MAT_Bisector.hxx>
|
||||
#include <MAT_ListOfBisector.hxx>
|
||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <MAT_DataMapOfIntegerBisector.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <MAT2d_Mat2d.hxx>
|
||||
#include <MAT2d_Tool2d.hxx>
|
||||
#include <MAT_Bisector.hxx>
|
||||
#include <MAT_DataMapOfIntegerBisector.hxx>
|
||||
#include <MAT_Edge.hxx>
|
||||
#include <MAT_ListOfBisector.hxx>
|
||||
#include <MAT_ListOfEdge.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||
|
||||
//========================================================================
|
||||
// function : MAT2d_Mat2d
|
||||
// purpose :
|
||||
//========================================================================
|
||||
|
||||
MAT2d_Mat2d::MAT2d_Mat2d(const Standard_Boolean IsOpenResult)
|
||||
{
|
||||
myIsOpenResult = IsOpenResult;
|
||||
|
115
src/MAT2d/MAT2d_Mat2d.hxx
Normal file
115
src/MAT2d/MAT2d_Mat2d.hxx
Normal file
@@ -0,0 +1,115 @@
|
||||
// Created on: 1992-09-22
|
||||
// Created by: Gilles DEBARBOUILLE
|
||||
// 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 _MAT2d_Mat2d_HeaderFile
|
||||
#define _MAT2d_Mat2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||
#include <MAT_DataMapOfIntegerBisector.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class MAT_ListOfEdge;
|
||||
class MAT_ListOfBisector;
|
||||
class MAT2d_Tool2d;
|
||||
class MAT_Bisector;
|
||||
|
||||
|
||||
//! this class contains the generic algoritm of
|
||||
//! computation of the bisecting locus.
|
||||
class MAT2d_Mat2d
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty construtor.
|
||||
Standard_EXPORT MAT2d_Mat2d(const Standard_Boolean IsOpenResult = Standard_False);
|
||||
|
||||
//! Algoritm of computation of the bisecting locus.
|
||||
Standard_EXPORT void CreateMat (MAT2d_Tool2d& aTool);
|
||||
|
||||
//! Algoritm of computation of the bisecting locus for
|
||||
//! open wire.
|
||||
Standard_EXPORT void CreateMatOpen (MAT2d_Tool2d& aTool);
|
||||
|
||||
//! Returns <TRUE> if CreateMat has succeeded.
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
|
||||
//! Initialize an iterator on the set of the roots
|
||||
//! of the trees of bisectors.
|
||||
Standard_EXPORT void Init();
|
||||
|
||||
//! Return False if there is no more roots.
|
||||
Standard_EXPORT Standard_Boolean More() const;
|
||||
|
||||
//! Move to the next root.
|
||||
Standard_EXPORT void Next();
|
||||
|
||||
//! Returns the current root.
|
||||
Standard_EXPORT Handle(MAT_Bisector) Bisector() const;
|
||||
|
||||
//! Returns True if there are semi_infinite bisectors.
|
||||
//! So there is a tree for each semi_infinte bisector.
|
||||
Standard_EXPORT Standard_Boolean SemiInfinite() const;
|
||||
|
||||
//! Returns the total number of bisectors.
|
||||
Standard_EXPORT Standard_Integer NumberOfBisectors() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void LoadBisectorsToRemove (Standard_Integer& noofbisectorstoremove, const Standard_Real distance1, const Standard_Real distance2, const Handle(MAT_Bisector)& bisector1, const Handle(MAT_Bisector)& bisector2, const Handle(MAT_Bisector)& bisector3, const Handle(MAT_Bisector)& bisector4);
|
||||
|
||||
Standard_EXPORT void Intersect (MAT2d_Tool2d& atool, const Standard_Integer aside, Standard_Integer& noofbisectorstoremove, const Handle(MAT_Bisector)& bisector1, const Handle(MAT_Bisector)& bisector2);
|
||||
|
||||
|
||||
Standard_Boolean myIsOpenResult;
|
||||
Standard_Integer thenumberofbisectors;
|
||||
Standard_Integer thenumberofedges;
|
||||
Standard_Boolean semiInfinite;
|
||||
Handle(MAT_ListOfEdge) theedgelist;
|
||||
TColStd_DataMapOfIntegerInteger typeofbisectortoremove;
|
||||
MAT_DataMapOfIntegerBisector bisectoronetoremove;
|
||||
MAT_DataMapOfIntegerBisector bisectortwotoremove;
|
||||
MAT_DataMapOfIntegerBisector bisectormap;
|
||||
Handle(MAT_ListOfBisector) roots;
|
||||
Standard_Boolean isDone;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_Mat2d_HeaderFile
|
@@ -1,133 +0,0 @@
|
||||
-- Created on: 1993-10-07
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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 MiniPath from MAT2d
|
||||
|
||||
---Purpose: MiniPath computes a path to link all the lines in
|
||||
-- a set of lines. The path is described as a set of
|
||||
-- connexions.
|
||||
--
|
||||
-- The set of connexions can be seen as an arbitrary Tree.
|
||||
-- The node of the tree are the lines. The arcs of the
|
||||
-- tree are the connexions. The ancestror of a line is
|
||||
-- the connexion which ends on it. The children of a line
|
||||
-- are the connexions which start on it.
|
||||
--
|
||||
-- The children of a line are ordered by the relation
|
||||
-- <IsAfter> defined on the connexions.
|
||||
-- (See MAT2s_Connexion.cdl).
|
||||
|
||||
uses
|
||||
Connexion from MAT2d,
|
||||
SequenceOfConnexion from MAT2d,
|
||||
DataMapOfIntegerConnexion from MAT2d,
|
||||
DataMapOfIntegerSequenceOfConnexion from MAT2d,
|
||||
SequenceOfSequenceOfGeometry from MAT2d
|
||||
is
|
||||
|
||||
Create returns MiniPath from MAT2d;
|
||||
|
||||
Perform(me : in out;
|
||||
Figure : SequenceOfSequenceOfGeometry from MAT2d;
|
||||
IndStart: Integer;
|
||||
Sense : Boolean)
|
||||
---Purpose: Computes the path to link the lines in <Figure>.
|
||||
-- the path starts on the line of index <IndStart>
|
||||
-- <Sense> = True if the Circuit turns in the
|
||||
-- trigonometric sense.
|
||||
is static;
|
||||
|
||||
RunOnConnexions(me : in out)
|
||||
---Purpose: Run on the set of connexions to compute the path.
|
||||
-- the path is an exploration of the tree which contains
|
||||
-- the connexions and their reverses.
|
||||
-- if the tree of connexions is
|
||||
-- A
|
||||
-- / |
|
||||
-- B E
|
||||
-- / | |
|
||||
-- C D F
|
||||
--
|
||||
-- the path is A->B, B->C, C->B, B->D, D->B, B->A, A->E,
|
||||
-- E->F, F->E, E->A.
|
||||
is static;
|
||||
|
||||
Path(me)
|
||||
---Purpose: Returns the sequence of connexions corresponding to
|
||||
-- the path.
|
||||
---C++: return const&
|
||||
returns SequenceOfConnexion from MAT2d
|
||||
is static;
|
||||
|
||||
IsConnexionsFrom(me ; Index : Integer)
|
||||
---Purpose: Returns <True> if there is one Connexion which starts
|
||||
-- on line designed by <Index>.
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
ConnexionsFrom(me : in out ; Index : Integer)
|
||||
---Purpose: Returns the connexions which start on line
|
||||
-- designed by <Index>.
|
||||
--
|
||||
---C++: return&
|
||||
returns SequenceOfConnexion from MAT2d
|
||||
is static;
|
||||
|
||||
IsRoot(me ; Index : Integer)
|
||||
---Purpose: Returns <True> if the line designed by <Index> is
|
||||
-- the root.
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
|
||||
Father(me : in out ; Index : Integer)
|
||||
---Purpose: Returns the connexion which ends on line
|
||||
-- designed by <Index>.
|
||||
returns Connexion from MAT2d
|
||||
is static;
|
||||
|
||||
Append (me : in out;
|
||||
Connexion : Connexion from MAT2d)
|
||||
---Purpose: Add a connexion to the path.
|
||||
is static private;
|
||||
|
||||
ExploSons(me : in out ;
|
||||
aPath : in out SequenceOfConnexion from MAT2d ;
|
||||
aConnexion : Connexion from MAT2d )
|
||||
is static private;
|
||||
|
||||
MinimumL1L2(me;
|
||||
Figure : SequenceOfSequenceOfGeometry from MAT2d;
|
||||
L1 : Integer ;
|
||||
L2 : Integer )
|
||||
---Purpose: Returns the connexion which realises the minimum of
|
||||
-- distance between the lines of index <L1> and <L2> in
|
||||
-- <aFigure>. The connexion is oriented from <L1> to <L2>.
|
||||
returns Connexion from MAT2d
|
||||
is static private;
|
||||
|
||||
fields
|
||||
|
||||
theConnexions : DataMapOfIntegerSequenceOfConnexion from MAT2d;
|
||||
theFather : DataMapOfIntegerConnexion from MAT2d;
|
||||
thePath : SequenceOfConnexion from MAT2d;
|
||||
theDirection : Real from Standard;
|
||||
indStart : Integer from Standard;
|
||||
|
||||
end MiniPath;
|
||||
|
||||
|
||||
|
||||
|
@@ -14,19 +14,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <MAT2d_MiniPath.ixx>
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <MAT2d_Array2OfConnexion.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
|
||||
#include <Extrema_ExtCC2d.hxx>
|
||||
#include <Extrema_ExtPC2d.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <Geom2d_Point.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <TColGeom2d_SequenceOfGeometry.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <Extrema_POnCurv2d.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Point.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <MAT2d_Array2OfConnexion.hxx>
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <MAT2d_MiniPath.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <TColGeom2d_SequenceOfGeometry.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
|
||||
//============================================================================
|
||||
//function : MAT2d_MiniPath()
|
||||
|
134
src/MAT2d/MAT2d_MiniPath.hxx
Normal file
134
src/MAT2d/MAT2d_MiniPath.hxx
Normal file
@@ -0,0 +1,134 @@
|
||||
// Created on: 1993-10-07
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_MiniPath_HeaderFile
|
||||
#define _MAT2d_MiniPath_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerConnexion.hxx>
|
||||
#include <MAT2d_SequenceOfConnexion.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class MAT2d_Connexion;
|
||||
|
||||
|
||||
//! MiniPath computes a path to link all the lines in
|
||||
//! a set of lines. The path is described as a set of
|
||||
//! connexions.
|
||||
//!
|
||||
//! The set of connexions can be seen as an arbitrary Tree.
|
||||
//! The node of the tree are the lines. The arcs of the
|
||||
//! tree are the connexions. The ancestror of a line is
|
||||
//! the connexion which ends on it. The children of a line
|
||||
//! are the connexions which start on it.
|
||||
//!
|
||||
//! The children of a line are ordered by the relation
|
||||
//! <IsAfter> defined on the connexions.
|
||||
//! (See MAT2s_Connexion.cdl).
|
||||
class MAT2d_MiniPath
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT MAT2d_MiniPath();
|
||||
|
||||
//! Computes the path to link the lines in <Figure>.
|
||||
//! the path starts on the line of index <IndStart>
|
||||
//! <Sense> = True if the Circuit turns in the
|
||||
//! trigonometric sense.
|
||||
Standard_EXPORT void Perform (const MAT2d_SequenceOfSequenceOfGeometry& Figure, const Standard_Integer IndStart, const Standard_Boolean Sense);
|
||||
|
||||
//! Run on the set of connexions to compute the path.
|
||||
//! the path is an exploration of the tree which contains
|
||||
//! the connexions and their reverses.
|
||||
//! if the tree of connexions is
|
||||
//! A
|
||||
//! / |
|
||||
//! B E
|
||||
//! / | |
|
||||
//! C D F
|
||||
//!
|
||||
//! the path is A->B, B->C, C->B, B->D, D->B, B->A, A->E,
|
||||
//! E->F, F->E, E->A.
|
||||
Standard_EXPORT void RunOnConnexions();
|
||||
|
||||
//! Returns the sequence of connexions corresponding to
|
||||
//! the path.
|
||||
Standard_EXPORT const MAT2d_SequenceOfConnexion& Path() const;
|
||||
|
||||
//! Returns <True> if there is one Connexion which starts
|
||||
//! on line designed by <Index>.
|
||||
Standard_EXPORT Standard_Boolean IsConnexionsFrom (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns the connexions which start on line
|
||||
//! designed by <Index>.
|
||||
Standard_EXPORT MAT2d_SequenceOfConnexion& ConnexionsFrom (const Standard_Integer Index);
|
||||
|
||||
//! Returns <True> if the line designed by <Index> is
|
||||
//! the root.
|
||||
Standard_EXPORT Standard_Boolean IsRoot (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns the connexion which ends on line
|
||||
//! designed by <Index>.
|
||||
Standard_EXPORT Handle(MAT2d_Connexion) Father (const Standard_Integer Index);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Add a connexion to the path.
|
||||
Standard_EXPORT void Append (const Handle(MAT2d_Connexion)& Connexion);
|
||||
|
||||
Standard_EXPORT void ExploSons (MAT2d_SequenceOfConnexion& aPath, const Handle(MAT2d_Connexion)& aConnexion);
|
||||
|
||||
//! Returns the connexion which realises the minimum of
|
||||
//! distance between the lines of index <L1> and <L2> in
|
||||
//! <aFigure>. The connexion is oriented from <L1> to <L2>.
|
||||
Standard_EXPORT Handle(MAT2d_Connexion) MinimumL1L2 (const MAT2d_SequenceOfSequenceOfGeometry& Figure, const Standard_Integer L1, const Standard_Integer L2) const;
|
||||
|
||||
|
||||
MAT2d_DataMapOfIntegerSequenceOfConnexion theConnexions;
|
||||
MAT2d_DataMapOfIntegerConnexion theFather;
|
||||
MAT2d_SequenceOfConnexion thePath;
|
||||
Standard_Real theDirection;
|
||||
Standard_Integer indStart;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_MiniPath_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 1993-07-12
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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.
|
||||
|
||||
deferred class SketchExplorer from MAT2d
|
||||
|
||||
---Purpose: SketchExplorer is an iterator on a sketch. A
|
||||
-- sketch is a set of contours, each contour is a set
|
||||
-- of curves from Geom2d.
|
||||
-- It's use by BisectingLocus.
|
||||
|
||||
uses
|
||||
|
||||
Curve from Geom2d
|
||||
is
|
||||
|
||||
NumberOfContours(me)
|
||||
--- Purpose : Returns the number of contours in the figure.
|
||||
returns Integer;
|
||||
|
||||
Init(me : in out ; ContourIndex : Integer );
|
||||
--- Purpose : Initializes the curves explorer on the contour
|
||||
-- of range <ContourIndex>.
|
||||
|
||||
More(me) returns Boolean from Standard;
|
||||
--- Purpose: Returns False if there is no more curves on the
|
||||
-- current contour.
|
||||
|
||||
Next(me : in out);
|
||||
--- Purpose : Moves to the next curve of the current contour.
|
||||
|
||||
Value(me) returns Curve from Geom2d;
|
||||
--- Purpose : Returns the current curve on the current contour.
|
||||
|
||||
|
||||
end SketchExplorer;
|
||||
|
||||
|
||||
|
||||
|
80
src/MAT2d/MAT2d_SketchExplorer.hxx
Normal file
80
src/MAT2d/MAT2d_SketchExplorer.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1993-07-12
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_SketchExplorer_HeaderFile
|
||||
#define _MAT2d_SketchExplorer_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Geom2d_Curve;
|
||||
|
||||
|
||||
//! SketchExplorer is an iterator on a sketch. A
|
||||
//! sketch is a set of contours, each contour is a set
|
||||
//! of curves from Geom2d.
|
||||
//! It's use by BisectingLocus.
|
||||
class MAT2d_SketchExplorer
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the number of contours in the figure.
|
||||
Standard_EXPORT Standard_Integer NumberOfContours() const;
|
||||
|
||||
//! Initializes the curves explorer on the contour
|
||||
//! of range <ContourIndex>.
|
||||
Standard_EXPORT void Init (const Standard_Integer ContourIndex);
|
||||
|
||||
//! Returns False if there is no more curves on the
|
||||
//! current contour.
|
||||
Standard_EXPORT Standard_Boolean More() const;
|
||||
|
||||
//! Moves to the next curve of the current contour.
|
||||
Standard_EXPORT void Next();
|
||||
|
||||
//! Returns the current curve on the current contour.
|
||||
Standard_EXPORT Handle(Geom2d_Curve) Value() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_SketchExplorer_HeaderFile
|
@@ -1,241 +0,0 @@
|
||||
-- Created on: 1993-07-12
|
||||
-- Created by: Yves FRICAUD
|
||||
-- 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 Tool2d from MAT2d
|
||||
|
||||
---Purpose: Set of the methods useful for the MAT's computation.
|
||||
-- Tool2d contains the geometry of the bisecting locus.
|
||||
|
||||
|
||||
uses
|
||||
JoinType from GeomAbs,
|
||||
Bisec from Bisector,
|
||||
Side from MAT,
|
||||
Bisector from MAT,
|
||||
Connexion from MAT2d,
|
||||
Circuit from MAT2d,
|
||||
DataMapOfIntegerBisec from MAT2d,
|
||||
DataMapOfIntegerPnt2d from MAT2d,
|
||||
DataMapOfIntegerVec2d from MAT2d,
|
||||
SequenceOfInteger from TColStd,
|
||||
Pnt2d from gp,
|
||||
Vec2d from gp,
|
||||
TrimmedCurve from Geom2d,
|
||||
Curve from Geom2d,
|
||||
Geometry from Geom2d
|
||||
|
||||
is
|
||||
Create returns Tool2d from MAT2d;
|
||||
--- Purpose : Empty Constructor.
|
||||
|
||||
--- Category : Initialisation.
|
||||
|
||||
Sense(me : in out ; aside : Side from MAT)
|
||||
--- Purpose :<aSide> defines the side of the computation of the map.
|
||||
is static;
|
||||
|
||||
SetJoinType(me : in out ; aJoinType : JoinType from GeomAbs)
|
||||
is static;
|
||||
|
||||
InitItems(me : in out ;
|
||||
aCircuit : Circuit from MAT2d )
|
||||
--- Purpose : InitItems cuts the line in Items.
|
||||
-- this Items are the geometrics representations of
|
||||
-- the BasicElts from MAT.
|
||||
is static;
|
||||
|
||||
--- Category : Set of the methods used by the algorithm MAT from MAT.
|
||||
|
||||
NumberOfItems(me)
|
||||
--- Purpose : Returns the Number of Items .
|
||||
returns Integer is static;
|
||||
|
||||
ToleranceOfConfusion(me) returns Real
|
||||
---Purpose: Returns tolerance to test the confusion of two points.
|
||||
is static;
|
||||
|
||||
FirstPoint(me : in out ; anitem : Integer;
|
||||
dist : out Real )
|
||||
--- Purpose : Creates the point at the origin of the bisector between
|
||||
-- anitem and the previous item.
|
||||
-- dist is the distance from the FirstPoint to <anitem>.
|
||||
-- Returns the index of this point in <theGeomPnts>.
|
||||
returns Integer is static;
|
||||
|
||||
TangentBefore(me : in out ; anitem : Integer;
|
||||
IsOpenResult : Boolean)
|
||||
--- Purpose : Creates the Tangent at the end of the Item defined
|
||||
-- by <anitem>. Returns the index of this vector in
|
||||
-- <theGeomVecs>
|
||||
returns Integer is static;
|
||||
|
||||
TangentAfter(me : in out ; anitem : Integer;
|
||||
IsOpenResult : Boolean)
|
||||
--- Purpose : Creates the Reversed Tangent at the origin of the Item
|
||||
-- defined by <anitem>. Returns the index of this vector in
|
||||
-- <theGeomVecs>
|
||||
returns Integer is static;
|
||||
|
||||
Tangent(me : in out ; bisector : Integer)
|
||||
--- Purpose : Creates the Tangent at the end of the bisector defined
|
||||
-- by <bisector>. Returns the index of this vector in
|
||||
-- <theGeomVecs>
|
||||
returns Integer is static;
|
||||
|
||||
CreateBisector(me : in out ; abisector : Bisector from MAT)
|
||||
--- Purpose : Creates the geometric bisector defined by <abisector>.
|
||||
is static;
|
||||
|
||||
TrimBisector(me : in out ; abisector : Bisector from MAT)
|
||||
--- Purpose : Trims the geometric bisector by the <firstparameter>
|
||||
-- of <abisector>.
|
||||
-- If the parameter is out of the bisector, Return FALSE.
|
||||
-- else Return True.
|
||||
returns Boolean is static;
|
||||
|
||||
TrimBisector(me : in out ;
|
||||
abisector : Bisector from MAT ;
|
||||
apoint : Integer)
|
||||
--- Purpose : Trims the geometric bisector by the point of index
|
||||
-- <apoint> in <theGeomPnts>.
|
||||
-- If the point is out of the bisector, Return FALSE.
|
||||
-- else Return True.
|
||||
returns Boolean is static;
|
||||
|
||||
IntersectBisector(me : in out ;
|
||||
bisectorone : Bisector from MAT ;
|
||||
bisectortwo : Bisector from MAT ;
|
||||
intpnt : in out Integer)
|
||||
--- Purpose : Computes the point of intersection between the
|
||||
-- bisectors defined by <bisectorone> and
|
||||
-- <bisectortwo> .
|
||||
-- If this point exists, <intpnt> is its index
|
||||
-- in <theGeomPnts> and Return the distance of the point
|
||||
-- from the bisector else Return <RealLast>.
|
||||
returns Real is static;
|
||||
|
||||
Distance(me;
|
||||
abisector : Bisector from MAT;
|
||||
param1 : Real;
|
||||
param2 : Real)
|
||||
---Purpose: Returns the distance between the two points designed
|
||||
-- by their parameters on <abisector>.
|
||||
returns Real is static;
|
||||
|
||||
Dump(me ; bisector , erease : Integer) is static;
|
||||
--- Purpose : displays informations about the bisector defined by
|
||||
-- <bisector>.
|
||||
|
||||
--- Category : Querying.
|
||||
|
||||
GeomBis(me ; Index: Integer)
|
||||
--- Purpose : Returns the <Bisec> of index <Index> in
|
||||
-- <theGeomBisectors>.
|
||||
--
|
||||
---C++: return const &
|
||||
returns Bisec from Bisector
|
||||
is static;
|
||||
|
||||
GeomElt(me ; Index: Integer)
|
||||
--- Purpose : Returns the Geometry of index <Index> in <theGeomElts>.
|
||||
returns Geometry from Geom2d
|
||||
is static;
|
||||
|
||||
GeomPnt(me ; Index: Integer)
|
||||
--- Purpose : Returns the point of index <Index> in the <theGeomPnts>.
|
||||
--
|
||||
---C++: return const &
|
||||
returns Pnt2d from gp
|
||||
is static;
|
||||
|
||||
GeomVec(me ; Index: Integer)
|
||||
--- Purpose : Returns the vector of index <Index> in the
|
||||
-- <theGeomVecs>.
|
||||
--
|
||||
---C++: return const &
|
||||
returns Vec2d from gp
|
||||
is static;
|
||||
|
||||
Circuit(me)
|
||||
---Purpose:
|
||||
--
|
||||
returns Circuit from MAT2d
|
||||
is static;
|
||||
|
||||
---Category: Modification
|
||||
|
||||
BisecFusion(me : in out;
|
||||
Index1 : Integer;
|
||||
Index2 : Integer)
|
||||
is static;
|
||||
|
||||
ChangeGeomBis(me : in out ; Index: Integer)
|
||||
--- Purpose : Returns the <Bisec> of index <Index> in
|
||||
-- <theGeomBisectors>.
|
||||
--
|
||||
---C++: return &
|
||||
returns Bisec from Bisector
|
||||
is static;
|
||||
|
||||
---Category: Private
|
||||
|
||||
IsSameDistance(me ;
|
||||
bisectorone , bisectortwo : any Bisector from MAT ;
|
||||
apoint : Pnt2d from gp;
|
||||
adistance : out Real)
|
||||
--- Purpose : Returns True if the point <apoint> is equidistant to
|
||||
-- the elements separated by bisectors <bisectorone> and
|
||||
-- <bisectortwo>.
|
||||
-- In this case <adistance> is the distance of the point
|
||||
-- from the bisectors.
|
||||
returns Boolean
|
||||
is static private;
|
||||
|
||||
Projection (me ;
|
||||
IndexElt : Integer from Standard;
|
||||
Point : Pnt2d from gp ;
|
||||
Distance : out Real from Standard)
|
||||
---Purpose: Return <True> if the Point can be projected
|
||||
-- on the element designed by <IndexElt>.
|
||||
-- In this case <Distance> is the minimum of distance
|
||||
-- between Point and its projections.
|
||||
returns Boolean
|
||||
is static private;
|
||||
|
||||
TrimBisec (me ;
|
||||
Bis : in out Bisec from Bisector ;
|
||||
IndexEdge : Integer from Standard ;
|
||||
OnLine : Boolean from Standard ;
|
||||
StartOrEnd : Integer from Standard )
|
||||
is static private;
|
||||
|
||||
fields
|
||||
|
||||
theDirection : Real;
|
||||
theJoinType : JoinType from GeomAbs;
|
||||
theNumberOfBisectors : Integer;
|
||||
theNumberOfPnts : Integer;
|
||||
theNumberOfVecs : Integer;
|
||||
theCircuit : Circuit from MAT2d;
|
||||
theGeomBisectors : DataMapOfIntegerBisec from MAT2d;
|
||||
theGeomPnts : DataMapOfIntegerPnt2d from MAT2d;
|
||||
theGeomVecs : DataMapOfIntegerVec2d from MAT2d;
|
||||
theLinesLength : SequenceOfInteger from TColStd;
|
||||
|
||||
end Tool2d;
|
||||
|
||||
|
||||
|
@@ -30,43 +30,47 @@
|
||||
#include <DrawTrSurf.hxx>
|
||||
#endif
|
||||
|
||||
#include <MAT2d_Tool2d.ixx>
|
||||
#include <MAT2d_MiniPath.hxx>
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
|
||||
#include <MAT_Edge.hxx>
|
||||
#include <Bisector_Curve.hxx>
|
||||
|
||||
#include <Bisector_Bisec.hxx>
|
||||
#include <Bisector_BisecAna.hxx>
|
||||
#include <Bisector_BisecCC.hxx>
|
||||
#include <Bisector_Bisec.hxx>
|
||||
#include <Bisector_Curve.hxx>
|
||||
#include <Bisector_Inter.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <Extrema_ExtPC2d.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <IntRes2d_IntersectionSegment.hxx>
|
||||
#include <Geom2d_Geometry.hxx>
|
||||
#include <Geom2d_Point.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <Geom2d_Circle.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_Ellipse.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <Geom2d_Geometry.hxx>
|
||||
#include <Geom2d_Hyperbola.hxx>
|
||||
#include <Geom2d_Line.hxx>
|
||||
#include <Geom2d_Parabola.hxx>
|
||||
#include <Geom2d_Point.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Geom2dAdaptor_Curve.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <Geom2dInt_GInter.hxx>
|
||||
#include <gp_Circ2d.hxx>
|
||||
#include <gp_Elips2d.hxx>
|
||||
#include <gp_Hypr2d.hxx>
|
||||
#include <gp_Lin2d.hxx>
|
||||
#include <gp_Parab2d.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
#include <ElCLib.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <IntRes2d_Domain.hxx>
|
||||
#include <IntRes2d_IntersectionPoint.hxx>
|
||||
#include <IntRes2d_IntersectionSegment.hxx>
|
||||
#include <MAT2d_Circuit.hxx>
|
||||
#include <MAT2d_Connexion.hxx>
|
||||
#include <MAT2d_MiniPath.hxx>
|
||||
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
|
||||
#include <MAT2d_Tool2d.hxx>
|
||||
#include <MAT_Bisector.hxx>
|
||||
#include <MAT_Edge.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
#include <StdFail_NotDone.hxx>
|
||||
#include <TColStd_Array1OfReal.hxx>
|
||||
|
||||
#ifdef DRAW
|
||||
static Handle(DrawTrSurf_Curve2d) draw;
|
||||
|
191
src/MAT2d/MAT2d_Tool2d.hxx
Normal file
191
src/MAT2d/MAT2d_Tool2d.hxx
Normal file
@@ -0,0 +1,191 @@
|
||||
// Created on: 1993-07-12
|
||||
// Created by: Yves FRICAUD
|
||||
// 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 _MAT2d_Tool2d_HeaderFile
|
||||
#define _MAT2d_Tool2d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <GeomAbs_JoinType.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerBisec.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerPnt2d.hxx>
|
||||
#include <MAT2d_DataMapOfIntegerVec2d.hxx>
|
||||
#include <TColStd_SequenceOfInteger.hxx>
|
||||
#include <MAT_Side.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class MAT2d_Circuit;
|
||||
class MAT_Bisector;
|
||||
class Bisector_Bisec;
|
||||
class Geom2d_Geometry;
|
||||
class gp_Pnt2d;
|
||||
class gp_Vec2d;
|
||||
|
||||
|
||||
//! Set of the methods useful for the MAT's computation.
|
||||
//! Tool2d contains the geometry of the bisecting locus.
|
||||
class MAT2d_Tool2d
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty Constructor.
|
||||
Standard_EXPORT MAT2d_Tool2d();
|
||||
|
||||
//! <aSide> defines the side of the computation of the map.
|
||||
Standard_EXPORT void Sense (const MAT_Side aside);
|
||||
|
||||
Standard_EXPORT void SetJoinType (const GeomAbs_JoinType aJoinType);
|
||||
|
||||
//! InitItems cuts the line in Items.
|
||||
//! this Items are the geometrics representations of
|
||||
//! the BasicElts from MAT.
|
||||
Standard_EXPORT void InitItems (const Handle(MAT2d_Circuit)& aCircuit);
|
||||
|
||||
//! Returns the Number of Items .
|
||||
Standard_EXPORT Standard_Integer NumberOfItems() const;
|
||||
|
||||
//! Returns tolerance to test the confusion of two points.
|
||||
Standard_EXPORT Standard_Real ToleranceOfConfusion() const;
|
||||
|
||||
//! Creates the point at the origin of the bisector between
|
||||
//! anitem and the previous item.
|
||||
//! dist is the distance from the FirstPoint to <anitem>.
|
||||
//! Returns the index of this point in <theGeomPnts>.
|
||||
Standard_EXPORT Standard_Integer FirstPoint (const Standard_Integer anitem, Standard_Real& dist);
|
||||
|
||||
//! Creates the Tangent at the end of the Item defined
|
||||
//! by <anitem>. Returns the index of this vector in
|
||||
//! <theGeomVecs>
|
||||
Standard_EXPORT Standard_Integer TangentBefore (const Standard_Integer anitem, const Standard_Boolean IsOpenResult);
|
||||
|
||||
//! Creates the Reversed Tangent at the origin of the Item
|
||||
//! defined by <anitem>. Returns the index of this vector in
|
||||
//! <theGeomVecs>
|
||||
Standard_EXPORT Standard_Integer TangentAfter (const Standard_Integer anitem, const Standard_Boolean IsOpenResult);
|
||||
|
||||
//! Creates the Tangent at the end of the bisector defined
|
||||
//! by <bisector>. Returns the index of this vector in
|
||||
//! <theGeomVecs>
|
||||
Standard_EXPORT Standard_Integer Tangent (const Standard_Integer bisector);
|
||||
|
||||
//! Creates the geometric bisector defined by <abisector>.
|
||||
Standard_EXPORT void CreateBisector (const Handle(MAT_Bisector)& abisector);
|
||||
|
||||
//! Trims the geometric bisector by the <firstparameter>
|
||||
//! of <abisector>.
|
||||
//! If the parameter is out of the bisector, Return FALSE.
|
||||
//! else Return True.
|
||||
Standard_EXPORT Standard_Boolean TrimBisector (const Handle(MAT_Bisector)& abisector);
|
||||
|
||||
//! Trims the geometric bisector by the point of index
|
||||
//! <apoint> in <theGeomPnts>.
|
||||
//! If the point is out of the bisector, Return FALSE.
|
||||
//! else Return True.
|
||||
Standard_EXPORT Standard_Boolean TrimBisector (const Handle(MAT_Bisector)& abisector, const Standard_Integer apoint);
|
||||
|
||||
//! Computes the point of intersection between the
|
||||
//! bisectors defined by <bisectorone> and
|
||||
//! <bisectortwo> .
|
||||
//! If this point exists, <intpnt> is its index
|
||||
//! in <theGeomPnts> and Return the distance of the point
|
||||
//! from the bisector else Return <RealLast>.
|
||||
Standard_EXPORT Standard_Real IntersectBisector (const Handle(MAT_Bisector)& bisectorone, const Handle(MAT_Bisector)& bisectortwo, Standard_Integer& intpnt);
|
||||
|
||||
//! Returns the distance between the two points designed
|
||||
//! by their parameters on <abisector>.
|
||||
Standard_EXPORT Standard_Real Distance (const Handle(MAT_Bisector)& abisector, const Standard_Real param1, const Standard_Real param2) const;
|
||||
|
||||
//! displays informations about the bisector defined by
|
||||
//! <bisector>.
|
||||
Standard_EXPORT void Dump (const Standard_Integer bisector, const Standard_Integer erease) const;
|
||||
|
||||
//! Returns the <Bisec> of index <Index> in
|
||||
//! <theGeomBisectors>.
|
||||
Standard_EXPORT const Bisector_Bisec& GeomBis (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns the Geometry of index <Index> in <theGeomElts>.
|
||||
Standard_EXPORT Handle(Geom2d_Geometry) GeomElt (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns the point of index <Index> in the <theGeomPnts>.
|
||||
Standard_EXPORT const gp_Pnt2d& GeomPnt (const Standard_Integer Index) const;
|
||||
|
||||
//! Returns the vector of index <Index> in the
|
||||
//! <theGeomVecs>.
|
||||
Standard_EXPORT const gp_Vec2d& GeomVec (const Standard_Integer Index) const;
|
||||
|
||||
Standard_EXPORT Handle(MAT2d_Circuit) Circuit() const;
|
||||
|
||||
Standard_EXPORT void BisecFusion (const Standard_Integer Index1, const Standard_Integer Index2);
|
||||
|
||||
//! Returns the <Bisec> of index <Index> in
|
||||
//! <theGeomBisectors>.
|
||||
Standard_EXPORT Bisector_Bisec& ChangeGeomBis (const Standard_Integer Index);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Returns True if the point <apoint> is equidistant to
|
||||
//! the elements separated by bisectors <bisectorone> and
|
||||
//! <bisectortwo>.
|
||||
//! In this case <adistance> is the distance of the point
|
||||
//! from the bisectors.
|
||||
Standard_EXPORT Standard_Boolean IsSameDistance (const Handle(MAT_Bisector)& bisectorone, const Handle(MAT_Bisector)& bisectortwo, const gp_Pnt2d& apoint, Standard_Real& adistance) const;
|
||||
|
||||
//! Return <True> if the Point can be projected
|
||||
//! on the element designed by <IndexElt>.
|
||||
//! In this case <Distance> is the minimum of distance
|
||||
//! between Point and its projections.
|
||||
Standard_EXPORT Standard_Boolean Projection (const Standard_Integer IndexElt, const gp_Pnt2d& Point, Standard_Real& Distance) const;
|
||||
|
||||
Standard_EXPORT void TrimBisec (Bisector_Bisec& Bis, const Standard_Integer IndexEdge, const Standard_Boolean OnLine, const Standard_Integer StartOrEnd) const;
|
||||
|
||||
|
||||
Standard_Real theDirection;
|
||||
GeomAbs_JoinType theJoinType;
|
||||
Standard_Integer theNumberOfBisectors;
|
||||
Standard_Integer theNumberOfPnts;
|
||||
Standard_Integer theNumberOfVecs;
|
||||
Handle(MAT2d_Circuit) theCircuit;
|
||||
MAT2d_DataMapOfIntegerBisec theGeomBisectors;
|
||||
MAT2d_DataMapOfIntegerPnt2d theGeomPnts;
|
||||
MAT2d_DataMapOfIntegerVec2d theGeomVecs;
|
||||
TColStd_SequenceOfInteger theLinesLength;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _MAT2d_Tool2d_HeaderFile
|
Reference in New Issue
Block a user