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,55 +0,0 @@
-- Created on: 1994-10-03
-- 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.
package BRepMAT2d
---Purpose:
uses
GeomAbs,
MAT2d,
MAT,
TCollection,
TColStd,
TColGeom2d,
Geom2d,
gp,
TopoDS,
TopTools,
Bisector
is
class Explorer;
class BisectingLocus;
class LinkTopoBilo;
imported DataMapOfShapeSequenceOfBasicElt;
imported DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt;
imported DataMapOfBasicEltShape;
imported DataMapIteratorOfDataMapOfBasicEltShape;
end BRepMAT2d;

View File

@@ -1,166 +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.
class BisectingLocus from BRepMAT2d
---Purpose : BisectingLocus generates and contains the Bisecting_Locus
-- of a set of lines from Geom2d, defined by <ExploSet>.
--
-- If the set of lines contains closed lines:
-- ------------------------------------------
-- These lines cut the plane in areas.
-- One map can be computed for each area.
--
-- Bisecting locus computes a map in an area.
-- The area is defined by a side (MAT_Left,MAT_Right)
-- on one of the closed lines.
--
-- If the set of lines contains only open lines:
-- --------------------------------------------
-- the map recovers all the plane.
--
-- Warning: Assume the orientation of the closed lines are
-- compatible.
--
-- Assume the explo contains only lines located in the
-- area where the bisecting locus will be computed.
--
-- Assume a line don't cross itself or an other line.
--
-- Remark:
-- the curves coming from the explorer can be
-- decomposed in different parts. It the case for the
-- curves other than circles or lines.
--
-- The map of bisecting locus is described by a graph.
-- - The BasicsElements correspond to elements on
-- the figure described by the Explorer from BRepMAT2d.
-- - The Arcs correspond to the bisectors.
-- - The Nodes are the extremities of the arcs.
uses
JoinType from GeomAbs,
Graph from MAT,
Arc from MAT,
BasicElt from MAT,
Node from MAT,
Side from MAT,
DataMapOfIntegerBasicElt from MAT,
DataMapOfBiIntInteger from MAT2d,
Bisec from Bisector,
Geometry from Geom2d,
Pnt2d from gp,
Tool2d from MAT2d,
Explorer from BRepMAT2d
is
Create returns BisectingLocus from BRepMAT2d;
---Category: Construction.
Compute (me : in out ;
anExplo : in out Explorer from BRepMAT2d;
LineIndex : Integer = 1;
aSide : Side from MAT = MAT_Left;
aJoinType : JoinType from GeomAbs = GeomAbs_Arc;
IsOpenResult : Boolean = Standard_False)
--- Purpose : Computation of the Bisector_Locus in a set of Lines
-- defined in <anExplo>.
-- The bisecting locus are computed on the side <aSide>
-- from the line <LineIndex> in <anExplo>.
is static;
---Category: Querying.
IsDone (me) returns Boolean from Standard
---Purpose: Returns True if Compute has succeeded.
is static;
Graph(me) returns Graph from MAT
--- Purpose : Returns <theGraph> of <me>.
is static;
NumberOfContours (me)
---Purpose: Returns the number of contours.
returns Integer from Standard
is static;
NumberOfElts( me ; IndLine : Integer)
---Purpose: Returns the number of BasicElts on the line
-- <IndLine>.
returns Integer from Standard
is static;
NumberOfSections (me; IndLine : Integer; Index : Integer)
---Purpose: Returns the number of sections of a curve.
-- this curve is the Indexth curve in the IndLineth contour
-- given by anExplo.
--
returns Integer from Standard
is static;
BasicElt ( me ; IndLine : Integer ; Index : Integer)
---Purpose: Returns the BasicElts located at the position
-- <Index> on the contour designed by <IndLine>.
-- Remark: the BasicElts on a contour are sorted.
--
returns BasicElt from MAT
is static;
GeomElt(me ; aBasicElt : BasicElt from MAT)
--- Purpose : Returns the geometry linked to the <BasicElt>.
returns Geometry from Geom2d
is static;
GeomElt(me ; aNode : Node from MAT)
--- Purpose : Returns the geometry of type <gp> linked to
-- the <Node>.
returns Pnt2d from gp
is static;
GeomBis(me ; anArc : Arc from MAT ; Reverse :in out Boolean from Standard)
--- Purpose : Returns the geometry of type <Bissec>
-- linked to the arc <ARC>.
-- <Reverse> is False when the FirstNode of <anArc>
-- correspond to the first point of geometry.
--
returns Bisec from Bisector
is static;
---Category: private methods.
Fusion(me : in out)
is static private;
RenumerationAndFusion
(me : in out;
IndexLine : Integer;
LengthLine : Integer;
IndexLast : in out Integer;
NewMap : in out DataMapOfIntegerBasicElt from MAT)
is static private;
fields
theGraph : Graph from MAT;
theTool : Tool2d from MAT2d;
isDone : Boolean from Standard;
nbSect : DataMapOfBiIntInteger from MAT2d;
nbContours : Integer from Standard;
end BisectingLocus;

View File

@@ -14,28 +14,30 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
# include <BRepMAT2d_BisectingLocus.ixx>
# include <MAT2d_Mat2d.hxx>
# include <MAT2d_Tool2d.hxx>
# include <MAT2d_Circuit.hxx>
# include <MAT2d_CutCurve.hxx>
# include <MAT2d_BiInt.hxx>
# include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
# include <MAT_Graph.hxx>
# include <MAT_Arc.hxx>
# include <MAT_BasicElt.hxx>
# include <MAT_Node.hxx>
# include <MAT_Bisector.hxx>
# include <MAT_ListOfBisector.hxx>
# include <MAT_DataMapOfIntegerBasicElt.hxx>
# include <MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx>
# include <Geom2d_TrimmedCurve.hxx>
# include <gp_Pnt2d.hxx>
# include <TColGeom2d_SequenceOfGeometry.hxx>
# include <Precision.hxx>
#include <Bisector_Bisec.hxx>
#include <BRepMAT2d_BisectingLocus.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <Geom2d_Geometry.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <gp_Pnt2d.hxx>
#include <MAT2d_BiInt.hxx>
#include <MAT2d_Circuit.hxx>
#include <MAT2d_CutCurve.hxx>
#include <MAT2d_Mat2d.hxx>
#include <MAT2d_SequenceOfSequenceOfGeometry.hxx>
#include <MAT2d_Tool2d.hxx>
#include <MAT_Arc.hxx>
#include <MAT_BasicElt.hxx>
#include <MAT_Bisector.hxx>
#include <MAT_DataMapIteratorOfDataMapOfIntegerBasicElt.hxx>
#include <MAT_DataMapOfIntegerBasicElt.hxx>
#include <MAT_Graph.hxx>
#include <MAT_ListOfBisector.hxx>
#include <MAT_Node.hxx>
#include <Precision.hxx>
#include <Standard_OutOfRange.hxx>
#include <TColGeom2d_SequenceOfGeometry.hxx>
static void CutSketch (MAT2d_SequenceOfSequenceOfGeometry& Figure,
MAT2d_DataMapOfBiIntInteger& NbSect);

View File

@@ -0,0 +1,158 @@
// 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.
#ifndef _BRepMAT2d_BisectingLocus_HeaderFile
#define _BRepMAT2d_BisectingLocus_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <MAT2d_Tool2d.hxx>
#include <Standard_Boolean.hxx>
#include <MAT2d_DataMapOfBiIntInteger.hxx>
#include <Standard_Integer.hxx>
#include <MAT_Side.hxx>
#include <GeomAbs_JoinType.hxx>
#include <MAT_DataMapOfIntegerBasicElt.hxx>
class MAT_Graph;
class BRepMAT2d_Explorer;
class MAT_BasicElt;
class Geom2d_Geometry;
class gp_Pnt2d;
class MAT_Node;
class Bisector_Bisec;
class MAT_Arc;
//! BisectingLocus generates and contains the Bisecting_Locus
//! of a set of lines from Geom2d, defined by <ExploSet>.
//!
//! If the set of lines contains closed lines:
//! ------------------------------------------
//! These lines cut the plane in areas.
//! One map can be computed for each area.
//!
//! Bisecting locus computes a map in an area.
//! The area is defined by a side (MAT_Left,MAT_Right)
//! on one of the closed lines.
//!
//! If the set of lines contains only open lines:
//! --------------------------------------------
//! the map recovers all the plane.
//!
//! Warning: Assume the orientation of the closed lines are
//! compatible.
//!
//! Assume the explo contains only lines located in the
//! area where the bisecting locus will be computed.
//!
//! Assume a line don't cross itself or an other line.
//!
//! Remark:
//! the curves coming from the explorer can be
//! decomposed in different parts. It the case for the
//! curves other than circles or lines.
//!
//! The map of bisecting locus is described by a graph.
//! - The BasicsElements correspond to elements on
//! the figure described by the Explorer from BRepMAT2d.
//! - The Arcs correspond to the bisectors.
//! - The Nodes are the extremities of the arcs.
class BRepMAT2d_BisectingLocus
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepMAT2d_BisectingLocus();
//! Computation of the Bisector_Locus in a set of Lines
//! defined in <anExplo>.
//! The bisecting locus are computed on the side <aSide>
//! from the line <LineIndex> in <anExplo>.
Standard_EXPORT void Compute (BRepMAT2d_Explorer& anExplo, const Standard_Integer LineIndex = 1, const MAT_Side aSide = MAT_Left, const GeomAbs_JoinType aJoinType = GeomAbs_Arc, const Standard_Boolean IsOpenResult = Standard_False);
//! Returns True if Compute has succeeded.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Returns <theGraph> of <me>.
Standard_EXPORT Handle(MAT_Graph) Graph() const;
//! Returns the number of contours.
Standard_EXPORT Standard_Integer NumberOfContours() const;
//! Returns the number of BasicElts on the line
//! <IndLine>.
Standard_EXPORT Standard_Integer NumberOfElts (const Standard_Integer IndLine) const;
//! Returns the number of sections of a curve.
//! this curve is the Indexth curve in the IndLineth contour
//! given by anExplo.
Standard_EXPORT Standard_Integer NumberOfSections (const Standard_Integer IndLine, const Standard_Integer Index) const;
//! Returns the BasicElts located at the position
//! <Index> on the contour designed by <IndLine>.
//! Remark: the BasicElts on a contour are sorted.
Standard_EXPORT Handle(MAT_BasicElt) BasicElt (const Standard_Integer IndLine, const Standard_Integer Index) const;
//! Returns the geometry linked to the <BasicElt>.
Standard_EXPORT Handle(Geom2d_Geometry) GeomElt (const Handle(MAT_BasicElt)& aBasicElt) const;
//! Returns the geometry of type <gp> linked to
//! the <Node>.
Standard_EXPORT gp_Pnt2d GeomElt (const Handle(MAT_Node)& aNode) const;
//! Returns the geometry of type <Bissec>
//! linked to the arc <ARC>.
//! <Reverse> is False when the FirstNode of <anArc>
//! correspond to the first point of geometry.
Standard_EXPORT Bisector_Bisec GeomBis (const Handle(MAT_Arc)& anArc, Standard_Boolean& Reverse) const;
protected:
private:
Standard_EXPORT void Fusion();
Standard_EXPORT void RenumerationAndFusion (const Standard_Integer IndexLine, const Standard_Integer LengthLine, Standard_Integer& IndexLast, MAT_DataMapOfIntegerBasicElt& NewMap);
Handle(MAT_Graph) theGraph;
MAT2d_Tool2d theTool;
Standard_Boolean isDone;
MAT2d_DataMapOfBiIntInteger nbSect;
Standard_Integer nbContours;
};
#endif // _BRepMAT2d_BisectingLocus_HeaderFile

View File

@@ -1,155 +0,0 @@
-- Created on: 1994-10-04
-- 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 Explorer from BRepMAT2d
---Purpose: Construct an explorer from wires, face, set of curves
-- from Geom2d to compute the bisecting Locus.
uses
SequenceOfCurve from TColGeom2d,
SequenceOfSequenceOfCurve from MAT2d,
SequenceOfBoolean from TColStd,
Curve from Geom2d,
Wire from TopoDS,
Face from TopoDS,
Shape from TopoDS,
IndexedDataMapOfShapeShape from TopTools
is
Create returns Explorer from BRepMAT2d;
Create (aFace : Face from TopoDS) returns Explorer from BRepMAT2d;
Clear (me : in out)
--- Purpose : Clear the contents of <me>.
is static;
---Category: Construction from a face
Perform ( me : in out ;aFace : Face from TopoDS)
is static;
-- Modified by Sergey KHROMOV - Tue Nov 26 15:48:41 2002 Begin
-- Correction of a face. Creation of a new face where all wires are
-- connected in 2d.
-- Add (me : in out; Spine : Wire from TopoDS; aFace : Face from TopoDS)
-- is static private;
Add (me : in out; Spine : Wire from TopoDS; aFace : Face from TopoDS;
aNewFace: in out Face from TopoDS)
is static private;
-- Modified by Sergey KHROMOV - Tue Nov 26 15:48:43 2002 End
---Purpose: Construction from a set of cuves from Geom2d.
-- Assume the orientation of the closed lines are
-- compatible. (ie if A is in B, the orientation of A and B
-- has to be different.
--
-- Assume the explo contains only lines located in the
-- area where the bisecting locus will be computed.
--
-- Assume a line don't cross itself or an other line.
--
-- A contour has to be construct in adding each curve in
-- respect to the sense of the contour.
--
-- afirst point of a curve in a contour is equal to the last
-- point of the precedent curve.
--
-- No control of this rules is done in the construction
-- of the explorer
-- Modified by Sergey KHROMOV - Tue Nov 26 17:19:09 2002 Begin
--This method is useless. All its functionality is
--in the previous method Add(..) now.
-- CheckConnection (me : in out)
-- is static private;
-- Modified by Sergey KHROMOV - Tue Nov 26 17:19:09 2002 End
NewContour (me : in out)
is static private;
Add (me : in out ; aCurve : Curve from Geom2d)
--- Purpose : Add the curve <aCurve> at me.
is static private;
---Category: Querying
NumberOfContours(me) returns Integer
--- Purpose : Returns the Number of contours.
is static;
NumberOfCurves(me ; IndexContour : Integer) returns Integer
--- Purpose : Returns the Number of Curves in the Contour number
-- <IndexContour>.
is static;
Init(me : in out ; IndexContour : Integer)
--- Purpose : Initialisation of an Iterator on the curves of
-- the Contour number <IndexContour>.
is static;
More(me) returns Boolean from Standard
--- Purpose : Return False if there is no more curves on the Contour
-- initialised by the method Init.
is static;
Next(me : in out)
--- Purpose : Move to the next curve of the current Contour.
is static;
Value(me) returns Curve from Geom2d
--- Purpose : Returns the current curve on the current Contour.
is static;
Shape (me) returns Shape from TopoDS
is static ;
Contour (me; IndexContour : Integer from Standard)
returns SequenceOfCurve from TColGeom2d
---C++: return const&
is static;
-- Modified by Sergey KHROMOV - Tue Nov 26 15:51:56 2002
IsModified(me; aShape: Shape from TopoDS)
returns Boolean from Standard
is static;
ModifiedShape(me; aShape: Shape from TopoDS)
--- Purpose : If the shape is not modified, returns the shape itself.
returns Shape from TopoDS
is static;
GetIsClosed (me)
returns SequenceOfBoolean from TColStd
---C++: return const&
is static;
-- Modified by Sergey KHROMOV - Wed Mar 6 16:05:52 2002
fields
theCurves : SequenceOfSequenceOfCurve from MAT2d;
current : Integer;
currentContour : Integer;
myShape : Shape from TopoDS;
myIsClosed : SequenceOfBoolean from TColStd;
-- Modified by Sergey KHROMOV - Tue Nov 26 15:48:02 2002 Begin
myModifShapes : IndexedDataMapOfShapeShape from TopTools;
-- Modified by Sergey KHROMOV - Tue Nov 26 15:48:03 2002 End
end Explorer;

View File

@@ -14,41 +14,45 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepMAT2d_Explorer.ixx>
#include <MAT2d_SequenceOfSequenceOfCurve.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <TopLoc_Location.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GeomAPI.hxx>
#include <BRep_Tool.hxx>
#include <gp.hxx>
#include <gp_Pln.hxx>
#include <TopExp_Explorer.hxx>
#include <TopAbs.hxx>
#include <TopoDS.hxx>
#include <Precision.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2dConvert.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <TopExp.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepLib.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <GeomAbs_CurveType.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <GCE2d_MakeArcOfCircle.hxx>
#include <GCE2d_MakeSegment.hxx>
#include <Geom2d_BoundedCurve.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BoundedCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dConvert.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAbs_CurveType.hxx>
#include <GeomAPI.hxx>
#include <gp.hxx>
#include <gp_Pln.hxx>
#include <MAT2d_SequenceOfSequenceOfCurve.hxx>
#include <Precision.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
//
// Modified by Sergey KHROMOV - Thu Dec 5 10:38:14 2002 Begin
static TopoDS_Edge MakeEdge(const Handle(Geom2d_Curve) &theCurve,

View File

@@ -0,0 +1,141 @@
// Created on: 1994-10-04
// 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 _BRepMAT2d_Explorer_HeaderFile
#define _BRepMAT2d_Explorer_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <MAT2d_SequenceOfSequenceOfCurve.hxx>
#include <Standard_Integer.hxx>
#include <TopoDS_Shape.hxx>
#include <TColStd_SequenceOfBoolean.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <Standard_Boolean.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
class TopoDS_Face;
class TopoDS_Wire;
class Geom2d_Curve;
class TopoDS_Shape;
//! Construct an explorer from wires, face, set of curves
//! from Geom2d to compute the bisecting Locus.
class BRepMAT2d_Explorer
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepMAT2d_Explorer();
Standard_EXPORT BRepMAT2d_Explorer(const TopoDS_Face& aFace);
//! Clear the contents of <me>.
Standard_EXPORT void Clear();
Standard_EXPORT void Perform (const TopoDS_Face& aFace);
//! Returns the Number of contours.
Standard_EXPORT Standard_Integer NumberOfContours() const;
//! Returns the Number of Curves in the Contour number
//! <IndexContour>.
Standard_EXPORT Standard_Integer NumberOfCurves (const Standard_Integer IndexContour) const;
//! Initialisation of an Iterator on the curves of
//! the Contour number <IndexContour>.
Standard_EXPORT void Init (const Standard_Integer IndexContour);
//! Return False if there is no more curves on the Contour
//! initialised by the method Init.
Standard_EXPORT Standard_Boolean More() const;
//! Move 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;
Standard_EXPORT TopoDS_Shape Shape() const;
Standard_EXPORT const TColGeom2d_SequenceOfCurve& Contour (const Standard_Integer IndexContour) const;
Standard_EXPORT Standard_Boolean IsModified (const TopoDS_Shape& aShape) const;
//! If the shape is not modified, returns the shape itself.
Standard_EXPORT TopoDS_Shape ModifiedShape (const TopoDS_Shape& aShape) const;
Standard_EXPORT const TColStd_SequenceOfBoolean& GetIsClosed() const;
protected:
private:
//! Construction from a set of cuves from Geom2d.
//! Assume the orientation of the closed lines are
//! compatible. (ie if A is in B, the orientation of A and B
//! has to be different.
//!
//! Assume the explo contains only lines located in the
//! area where the bisecting locus will be computed.
//!
//! Assume a line don't cross itself or an other line.
//!
//! A contour has to be construct in adding each curve in
//! respect to the sense of the contour.
//!
//! afirst point of a curve in a contour is equal to the last
//! point of the precedent curve.
//!
//! No control of this rules is done in the construction
//! of the explorer
Standard_EXPORT void Add (const TopoDS_Wire& Spine, const TopoDS_Face& aFace, TopoDS_Face& aNewFace);
Standard_EXPORT void NewContour();
//! Add the curve <aCurve> at me.
Standard_EXPORT void Add (const Handle(Geom2d_Curve)& aCurve);
MAT2d_SequenceOfSequenceOfCurve theCurves;
Standard_Integer current;
Standard_Integer currentContour;
TopoDS_Shape myShape;
TColStd_SequenceOfBoolean myIsClosed;
TopTools_IndexedDataMapOfShapeShape myModifShapes;
};
#endif // _BRepMAT2d_Explorer_HeaderFile

View File

@@ -1,106 +0,0 @@
-- Created on: 1994-10-07
-- 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 LinkTopoBilo from BRepMAT2d
---Purpose:Constucts links between the Wire or the Face of the explorer and
-- the BasicElts contained in the bisecting locus.
uses
Shape from TopoDS,
Wire from TopoDS,
Explorer from BRepMAT2d,
DataMapOfShapeSequenceOfBasicElt from BRepMAT2d,
DataMapOfBasicEltShape from BRepMAT2d,
BisectingLocus from BRepMAT2d,
BasicElt from MAT
raises
ConstructionError from Standard
is
Create returns LinkTopoBilo from BRepMAT2d;
Create( Explo : Explorer from BRepMAT2d;
BiLo : BisectingLocus from BRepMAT2d)
returns LinkTopoBilo from BRepMAT2d
---Purpose: Constructs the links Between S and BiLo.
--
raises
ConstructionError from Standard;
---Purpose: raises if <S> is not a face.
Perform( me : in out;
Explo : Explorer from BRepMAT2d;
BiLo : BisectingLocus from BRepMAT2d)
---Purpose: Constructs the links Between S and BiLo.
--
raises
ConstructionError from Standard
---Purpose: raises if <S> is not a face or a wire.
is static;
Init (me : in out; S : Shape from TopoDS)
---Purpose: Initialise the Iterator on <S>
-- <S> is an edge or a vertex of the initial
-- wire or face.
raises
ConstructionError from Standard
---Purpose: raises if <S> is not an edge or a vertex.
is static;
More (me : in out) returns Boolean from Standard
---Purpose: Returns True if there is a current BasicElt.
is static;
Next (me : in out)
---Purpose: Proceed to the next BasicElt.
is static;
Value(me) returns BasicElt from MAT
---Purpose: Returns the current BasicElt.
is static;
GeneratingShape (me ; aBE : BasicElt from MAT)
---Purpose: Returns the Shape linked to <aBE>.
returns Shape from TopoDS
is static;
LinkToWire (me : in out;
W : Wire from TopoDS;
Explo : Explorer from BRepMAT2d;
IndexContour : Integer from Standard;
BiLo : BisectingLocus from BRepMAT2d)
is static private;
fields
myMap : DataMapOfShapeSequenceOfBasicElt from BRepMAT2d;
myBEShape : DataMapOfBasicEltShape from BRepMAT2d;
myKey : Shape from TopoDS;
current : Integer from Standard;
isEmpty : Boolean from Standard;
end ;

View File

@@ -14,35 +14,38 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepMAT2d_LinkTopoBilo.ixx>
#include <TopAbs.hxx>
#include <TopExp_Explorer.hxx>
#include <TopExp.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <Standard_Type.hxx>
#include <Geom2d_Geometry.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_CartesianPoint.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
#include <MAT_Graph.hxx>
#include <MAT_BasicElt.hxx>
#include <MAT_SequenceOfBasicElt.hxx>
#include <BRepMAT2d_BisectingLocus.hxx>
#include <BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx>
#include <BRepMAT2d_Explorer.hxx>
#include <BRepMAT2d_LinkTopoBilo.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom2d_CartesianPoint.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Geometry.hxx>
#include <gp_Pnt2d.hxx>
#include <MAT_BasicElt.hxx>
#include <MAT_Graph.hxx>
#include <MAT_SequenceOfBasicElt.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_Type.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfIntegerInteger.hxx>
#include <TColStd_DataMapOfIntegerInteger.hxx>
#include <Precision.hxx>
#include <gp_Pnt2d.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_SequenceOfShape.hxx>
//=======================================================================
//function : BRepMAT2d_LinkTopoBilo
//purpose :
//=======================================================================
BRepMAT2d_LinkTopoBilo::BRepMAT2d_LinkTopoBilo()
{
}

View File

@@ -0,0 +1,106 @@
// Created on: 1994-10-07
// 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 _BRepMAT2d_LinkTopoBilo_HeaderFile
#define _BRepMAT2d_LinkTopoBilo_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx>
#include <BRepMAT2d_DataMapOfBasicEltShape.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
class Standard_ConstructionError;
class BRepMAT2d_Explorer;
class BRepMAT2d_BisectingLocus;
class TopoDS_Shape;
class MAT_BasicElt;
class TopoDS_Wire;
//! Constucts links between the Wire or the Face of the explorer and
//! the BasicElts contained in the bisecting locus.
class BRepMAT2d_LinkTopoBilo
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepMAT2d_LinkTopoBilo();
//! Constructs the links Between S and BiLo.
//!
//! raises if <S> is not a face.
Standard_EXPORT BRepMAT2d_LinkTopoBilo(const BRepMAT2d_Explorer& Explo, const BRepMAT2d_BisectingLocus& BiLo);
//! Constructs the links Between S and BiLo.
//!
//! raises if <S> is not a face or a wire.
Standard_EXPORT void Perform (const BRepMAT2d_Explorer& Explo, const BRepMAT2d_BisectingLocus& BiLo);
//! Initialise the Iterator on <S>
//! <S> is an edge or a vertex of the initial
//! wire or face.
//! raises if <S> is not an edge or a vertex.
Standard_EXPORT void Init (const TopoDS_Shape& S);
//! Returns True if there is a current BasicElt.
Standard_EXPORT Standard_Boolean More();
//! Proceed to the next BasicElt.
Standard_EXPORT void Next();
//! Returns the current BasicElt.
Standard_EXPORT Handle(MAT_BasicElt) Value() const;
//! Returns the Shape linked to <aBE>.
Standard_EXPORT TopoDS_Shape GeneratingShape (const Handle(MAT_BasicElt)& aBE) const;
protected:
private:
Standard_EXPORT void LinkToWire (const TopoDS_Wire& W, const BRepMAT2d_Explorer& Explo, const Standard_Integer IndexContour, const BRepMAT2d_BisectingLocus& BiLo);
BRepMAT2d_DataMapOfShapeSequenceOfBasicElt myMap;
BRepMAT2d_DataMapOfBasicEltShape myBEShape;
TopoDS_Shape myKey;
Standard_Integer current;
Standard_Boolean isEmpty;
};
#endif // _BRepMAT2d_LinkTopoBilo_HeaderFile

View File

@@ -1,4 +1,10 @@
BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx
BRepMAT2d_BisectingLocus.cxx
BRepMAT2d_BisectingLocus.hxx
BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape.hxx
BRepMAT2d_DataMapIteratorOfDataMapOfShapeSequenceOfBasicElt.hxx
BRepMAT2d_DataMapOfBasicEltShape.hxx
BRepMAT2d_DataMapIteratorOfDataMapOfBasicEltShape.hxx
BRepMAT2d_DataMapOfShapeSequenceOfBasicElt.hxx
BRepMAT2d_Explorer.cxx
BRepMAT2d_Explorer.hxx
BRepMAT2d_LinkTopoBilo.cxx
BRepMAT2d_LinkTopoBilo.hxx