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

0024002: Overall code and build procedure refactoring -- automatic

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

View File

@@ -1,131 +0,0 @@
-- Created on: 1995-10-12
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package BRepOffset
---Purpose:
uses
MMgt,
Geom,
TopoDS,
TopAbs,
TCollection,
TopTools,
GeomAbs,
BRepAlgo,
BOPAlgo,
BOPDS,
BOPTools
is
enumeration Type is
Concave,
Convex,
Tangent,
FreeBoundary,
Other
end Type;
enumeration Mode is
Skin,
Pipe,
RectoVerso
end Mode;
---Purpose:
-- Lists the offset modes. These are the following:
-- - BRepOffset_Skin which describes the offset along
-- the surface of a solid, used to obtain a manifold topological space,
-- - BRepOffset_Pipe which describes the offset of a
-- curve, used to obtain a pre-surface,
-- - BRepOffset_RectoVerso which describes the offset
-- of a given surface shell along both sides of the surface.
enumeration Status is
---Purpose: status of an offset face
-- Good :
-- Reversed : e.g. Offset > Radius of a cylinder
-- Degenerated : e.g. Offset = Radius of a cylinder
-- Unknown : e.g. for a Beziersurf
Good,
Reversed,
Degenerated,
Unknown
end Status;
enumeration Error is
NoError,
OffsetSurfaceFailed,
UnCorrectClosingFace,
ExtentFaceFailed,
RadiusEqualOffset,
UnknownError
end Error;
class MakeOffset;
--class Loop;
class Inter3d;
class Inter2d;
class Offset;
class Analyse;
class MakeLoops;
class Tool;
--class Image;
--class AsDes;
class Interval;
imported ListOfInterval;
imported ListIteratorOfListOfInterval;
imported DataMapOfShapeListOfInterval;
imported DataMapIteratorOfDataMapOfShapeListOfInterval;
imported DataMapOfShapeOffset;
imported DataMapIteratorOfDataMapOfShapeOffset;
imported DataMapOfShapeMapOfShape;
imported DataMapIteratorOfDataMapOfShapeMapOfShape;
Surface( Surface : in Surface from Geom;
Offset : in Real from Standard;
Status : out Status from BRepOffset)
---Purpose: returns the Offset surface computed from the
-- surface <Surface> at an OffsetDistance <Offset>.
--
-- If possible, this method returns the real type of
-- the surface ( e.g. An Offset of a plane is a plane).
--
-- If no particular case is detected, the returned
-- surface will have the Type Geom_OffsetSurface.
returns Surface from Geom;
end BRepOffset;

View File

@@ -14,31 +14,29 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepOffset.ixx>
#include <Geom_Plane.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_ToroidalSurface.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <BRepOffset.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_OffsetSurface.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_Ax3.hxx>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_ToroidalSurface.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax3.hxx>
#include <gp_Dir.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
//=======================================================================
//function : Surface
//purpose :
//=======================================================================
Handle(Geom_Surface) BRepOffset::Surface(const Handle(Geom_Surface)& Surface,
const Standard_Real Offset,
BRepOffset_Status& Status)

View File

@@ -0,0 +1,86 @@
// Created on: 1995-10-12
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_HeaderFile
#define _BRepOffset_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <BRepOffset_Status.hxx>
class Geom_Surface;
class BRepOffset_MakeOffset;
class BRepOffset_Inter3d;
class BRepOffset_Inter2d;
class BRepOffset_Offset;
class BRepOffset_Analyse;
class BRepOffset_MakeLoops;
class BRepOffset_Tool;
class BRepOffset_Interval;
class BRepOffset
{
public:
DEFINE_STANDARD_ALLOC
//! returns the Offset surface computed from the
//! surface <Surface> at an OffsetDistance <Offset>.
//!
//! If possible, this method returns the real type of
//! the surface ( e.g. An Offset of a plane is a plane).
//!
//! If no particular case is detected, the returned
//! surface will have the Type Geom_OffsetSurface.
Standard_EXPORT static Handle(Geom_Surface) Surface (const Handle(Geom_Surface)& Surface, const Standard_Real Offset, BRepOffset_Status& Status);
protected:
private:
friend class BRepOffset_MakeOffset;
friend class BRepOffset_Inter3d;
friend class BRepOffset_Inter2d;
friend class BRepOffset_Offset;
friend class BRepOffset_Analyse;
friend class BRepOffset_MakeLoops;
friend class BRepOffset_Tool;
friend class BRepOffset_Interval;
};
#endif // _BRepOffset_HeaderFile

View File

@@ -1,137 +0,0 @@
-- Created on: 1995-10-20
-- Created by: Yves FRICAUD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Analyse from BRepOffset
---Purpose: Analyse of a shape consit to
-- Find the part of edges convex concave tangent.
uses
Shape from TopoDS,
Face from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
Compound from TopoDS,
IndexedDataMapOfShapeListOfShape from TopTools,
ListOfShape from TopTools,
MapOfShape from TopTools,
Interval from BRepOffset,
ListOfInterval from BRepOffset,
DataMapOfShapeListOfInterval from BRepOffset,
Type from BRepOffset
is
Create;
Create (S : Shape from TopoDS ;
Angle : Real from Standard)
returns Analyse from BRepOffset;
Perform (me : in out ;
S : Shape from TopoDS ;
Angle : Real from Standard)
is static;
IsDone (me)
returns Boolean from Standard
is static;
Clear(me : in out)
is static;
Type (me; E : Edge from TopoDS)
---C++: return const&
returns ListOfInterval from BRepOffset
is static;
Edges (me;
V : Vertex from TopoDS;
T : Type from BRepOffset;
L : in out ListOfShape from TopTools)
---Purpose: Stores in <L> all the edges of Type <T>
-- on the vertex <V>.
is static;
Edges (me;
F : Face from TopoDS;
T : Type from BRepOffset;
L : in out ListOfShape from TopTools)
---Purpose: Stores in <L> all the edges of Type <T>
-- on the face <F>.
is static;
TangentEdges(me;
Edge : Edge from TopoDS;
Vertex : Vertex from TopoDS;
Edges : in out ListOfShape from TopTools)
---Purpose: set in <Edges> all the Edges of <Shape> which are
-- tangent to <Edge> at the vertex <Vertex>.
is static;
HasAncestor (me ; S : Shape from TopoDS)
returns Boolean from Standard
is static;
Ancestors (me ; S : Shape from TopoDS)
---C++: return const &
returns ListOfShape from TopTools
is static;
Explode (me;
L : in out ListOfShape from TopTools;
Type : in Type from BRepOffset)
---Purpose: Explode in compounds of faces where
-- all the connex edges are of type <Side>
is static;
Explode (me;
L : in out ListOfShape from TopTools;
Type1 : in Type from BRepOffset;
Type2 : in Type from BRepOffset)
---Purpose: Explode in compounds of faces where
-- all the connex edges are of type <Side1> or <Side2>
is static;
AddFaces(me;
Face : Face from TopoDS;
Co : in out Compound from TopoDS;
Map : in out MapOfShape from TopTools;
Type : in Type from BRepOffset)
---Purpose: Add in <CO> the faces of the shell containing <Face>
-- where all the connex edges are of type <Side>.
is static;
AddFaces(me;
Face : Face from TopoDS;
Co : in out Compound from TopoDS;
Map : in out MapOfShape from TopTools;
Type1 : in Type from BRepOffset;
Type2 : in Type from BRepOffset)
---Purpose: Add in <CO> the faces of the shell containing <Face>
-- where all the connex edges are of type <Side1> or <Side2>.
is static;
fields
myDone : Boolean from Standard;
myShape : Shape from TopoDS;
mapEdgeType : DataMapOfShapeListOfInterval from BRepOffset;
ancestors : IndexedDataMapOfShapeListOfShape from TopTools;
angle : Real from Standard;
end Analyse;

View File

@@ -14,39 +14,37 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepOffset_Analyse.ixx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepOffset_ListIteratorOfListOfInterval.hxx>
#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <Adaptor3d_Surface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepOffset_Analyse.hxx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_ListIteratorOfListOfInterval.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepTools.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <gp.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Curve.hxx>
#include <Geom2d_Curve.hxx>
#include <gp_Vec.hxx>
#include <Precision.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <Precision.hxx>
#include <gp.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <Adaptor3d_Surface.hxx>
//
static void Correct2dPoint(const Adaptor3d_Surface& theS, gp_Pnt2d& theP2d);
//

View File

@@ -0,0 +1,121 @@
// Created on: 1995-10-20
// Created by: Yves FRICAUD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Analyse_HeaderFile
#define _BRepOffset_Analyse_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepOffset_DataMapOfShapeListOfInterval.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Standard_Real.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_Type.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
class TopoDS_Shape;
class TopoDS_Edge;
class TopoDS_Vertex;
class TopoDS_Face;
class TopoDS_Compound;
//! Analyse of a shape consit to
//! Find the part of edges convex concave tangent.
class BRepOffset_Analyse
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepOffset_Analyse();
Standard_EXPORT BRepOffset_Analyse(const TopoDS_Shape& S, const Standard_Real Angle);
Standard_EXPORT void Perform (const TopoDS_Shape& S, const Standard_Real Angle);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT void Clear();
Standard_EXPORT const BRepOffset_ListOfInterval& Type (const TopoDS_Edge& E) const;
//! Stores in <L> all the edges of Type <T>
//! on the vertex <V>.
Standard_EXPORT void Edges (const TopoDS_Vertex& V, const BRepOffset_Type T, TopTools_ListOfShape& L) const;
//! Stores in <L> all the edges of Type <T>
//! on the face <F>.
Standard_EXPORT void Edges (const TopoDS_Face& F, const BRepOffset_Type T, TopTools_ListOfShape& L) const;
//! set in <Edges> all the Edges of <Shape> which are
//! tangent to <Edge> at the vertex <Vertex>.
Standard_EXPORT void TangentEdges (const TopoDS_Edge& Edge, const TopoDS_Vertex& Vertex, TopTools_ListOfShape& Edges) const;
Standard_EXPORT Standard_Boolean HasAncestor (const TopoDS_Shape& S) const;
Standard_EXPORT const TopTools_ListOfShape& Ancestors (const TopoDS_Shape& S) const;
//! Explode in compounds of faces where
//! all the connex edges are of type <Side>
Standard_EXPORT void Explode (TopTools_ListOfShape& L, const BRepOffset_Type Type) const;
//! Explode in compounds of faces where
//! all the connex edges are of type <Side1> or <Side2>
Standard_EXPORT void Explode (TopTools_ListOfShape& L, const BRepOffset_Type Type1, const BRepOffset_Type Type2) const;
//! Add in <CO> the faces of the shell containing <Face>
//! where all the connex edges are of type <Side>.
Standard_EXPORT void AddFaces (const TopoDS_Face& Face, TopoDS_Compound& Co, TopTools_MapOfShape& Map, const BRepOffset_Type Type) const;
//! Add in <CO> the faces of the shell containing <Face>
//! where all the connex edges are of type <Side1> or <Side2>.
Standard_EXPORT void AddFaces (const TopoDS_Face& Face, TopoDS_Compound& Co, TopTools_MapOfShape& Map, const BRepOffset_Type Type1, const BRepOffset_Type Type2) const;
protected:
private:
Standard_Boolean myDone;
TopoDS_Shape myShape;
BRepOffset_DataMapOfShapeListOfInterval mapEdgeType;
TopTools_IndexedDataMapOfShapeListOfShape ancestors;
Standard_Real angle;
};
#endif // _BRepOffset_Analyse_HeaderFile

View File

@@ -0,0 +1,31 @@
// Created on: 1995-10-12
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Error_HeaderFile
#define _BRepOffset_Error_HeaderFile
enum BRepOffset_Error
{
BRepOffset_NoError,
BRepOffset_OffsetSurfaceFailed,
BRepOffset_UnCorrectClosingFace,
BRepOffset_ExtentFaceFailed,
BRepOffset_RadiusEqualOffset,
BRepOffset_UnknownError
};
#endif // _BRepOffset_Error_HeaderFile

View File

@@ -1,56 +0,0 @@
-- Created on: 1996-08-30
-- Created by: Yves FRICAUD
-- Copyright (c) 1996-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Modified by skv - Fri Dec 26 16:53:16 2003 OCC4455
class Inter2d from BRepOffset
---Purpose: Computes the intersections betwwen edges on a face
-- stores result is SD as AsDes from BRepOffset.
uses
AsDes from BRepAlgo,
Offset from BRepOffset,
Face from TopoDS,
IndexedMapOfShape from TopTools,
DataMapOfShapeShape from TopTools,
Real from Standard
is
Compute(myclass ; AsDes : AsDes from BRepAlgo;
F : Face from TopoDS;
NewEdges : IndexedMapOfShape from TopTools;
Tol : Real from Standard);
---Purpose: Computes the intersections between the edges stored
-- is AsDes as descendants of <F> . Intersections is computed
-- between two edges if one of them is bound in NewEdges.
-- Modified by skv - Fri Dec 26 16:53:16 2003 OCC4455 Begin
-- Add another parameter: offset value.
ConnexIntByInt(myclass ;
FI : Face from TopoDS;
OFI : in out Offset from BRepOffset;
MES : in out DataMapOfShapeShape from TopTools;
Build : DataMapOfShapeShape from TopTools;
AsDes : AsDes from BRepAlgo;
Offset: Real from Standard;
Tol : Real from Standard);
-- Modified by skv - Fri Dec 26 16:53:16 2003 OCC4455 End
end Inter2d;

View File

@@ -16,72 +16,68 @@
// Modified by skv - Wed Dec 24 18:08:39 2003 OCC4455
#include <stdio.h>
#include <BRepOffset_Inter2d.ixx>
#include <BRepAlgo_AsDes.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepOffset_Tool.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <gp_Pnt.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_GCurve.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <Precision.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAlgo_AsDes.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepOffset_Inter2d.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
#include <BRepLib.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <Adaptor3d_HSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Adaptor2d_HCurve2d.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <GeomLib.hxx>
#include <GeomProjLib.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <gp_Pnt.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <Precision.hxx>
#include <TColGeom2d_SequenceOfCurve.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BRepTools.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <stdio.h>
#ifdef DRAW
#include <DBRep.hxx>
#include <Geom2d_BoundedCurve.hxx>

View File

@@ -0,0 +1,71 @@
// Created on: 1996-08-30
// Created by: Yves FRICAUD
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Inter2d_HeaderFile
#define _BRepOffset_Inter2d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Standard_Real.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
class BRepAlgo_AsDes;
class TopoDS_Face;
class BRepOffset_Offset;
//! Computes the intersections betwwen edges on a face
//! stores result is SD as AsDes from BRepOffset.
class BRepOffset_Inter2d
{
public:
DEFINE_STANDARD_ALLOC
//! Computes the intersections between the edges stored
//! is AsDes as descendants of <F> . Intersections is computed
//! between two edges if one of them is bound in NewEdges.
Standard_EXPORT static void Compute (const Handle(BRepAlgo_AsDes)& AsDes, const TopoDS_Face& F, const TopTools_IndexedMapOfShape& NewEdges, const Standard_Real Tol);
Standard_EXPORT static void ConnexIntByInt (const TopoDS_Face& FI, BRepOffset_Offset& OFI, TopTools_DataMapOfShapeShape& MES, const TopTools_DataMapOfShapeShape& Build, const Handle(BRepAlgo_AsDes)& AsDes, const Standard_Real Offset, const Standard_Real Tol);
protected:
private:
};
#endif // _BRepOffset_Inter2d_HeaderFile

View File

@@ -1,124 +0,0 @@
-- Created on: 1996-08-30
-- Created by: Yves FRICAUD
-- Copyright (c) 1996-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Inter3d from BRepOffset
---Purpose: Computes the intersection face face in a set of faces
-- Store the result in a SD as AsDes.
uses
AsDes from BRepAlgo,
Image from BRepAlgo,
Analyse from BRepOffset,
DataMapOfShapeOffset from BRepOffset,
Shape from TopoDS,
Face from TopoDS,
ListOfShape from TopTools,
--MapOfShape from TopTools,
IndexedMapOfShape from TopTools,
DataMapOfShapeShape from TopTools,
DataMapOfShapeListOfShape from TopTools,
Real from Standard,
State from TopAbs
is
Create(AsDes : AsDes from BRepAlgo;
Side : State from TopAbs;
Tol : Real from Standard);
CompletInt (me : in out; SetOfFaces : ListOfShape from TopTools;
InitOffsetFace : Image from BRepAlgo )
is static;
FaceInter (me : in out;
F1, F2 : Face from TopoDS;
InitOffsetFace : Image from BRepAlgo)
is static;
ConnexIntByArc(me : in out;
SetOfFaces : ListOfShape from TopTools;
ShapeInit : Shape from TopoDS;
Analyse : Analyse from BRepOffset;
InitOffsetFace : Image from BRepAlgo)
is static;
ConnexIntByInt(me : in out;
SI : Shape from TopoDS;
MapSF : DataMapOfShapeOffset from BRepOffset;
A : Analyse from BRepOffset;
MES : in out DataMapOfShapeShape from TopTools;
Build : in out DataMapOfShapeShape from TopTools;
Failed : in out ListOfShape from TopTools)
is static;
ContextIntByInt( me : in out;
ContextFaces : IndexedMapOfShape from TopTools;
ExtentContext : Boolean from Standard;
MapSF : DataMapOfShapeOffset from BRepOffset;
A : Analyse from BRepOffset;
MES : in out DataMapOfShapeShape from TopTools;
Build : in out DataMapOfShapeShape from TopTools;
Failed : in out ListOfShape from TopTools)
is static;
ContextIntByArc(me : in out;
ContextFaces : IndexedMapOfShape from TopTools;
ExtentContext : Boolean from Standard;
Analyse : Analyse from BRepOffset;
InitOffsetFace : Image from BRepAlgo;
InitOffsetEdge : in out Image from BRepAlgo)
is static;
AddCommonEdges(me : in out;
SetOfFaces : ListOfShape from TopTools)
is static;
SetDone(me : in out; F1,F2 : Face from TopoDS)
is static;
---Category: Querying
IsDone(me ; F1,F2 : Face from TopoDS)
returns Boolean from Standard
is static;
TouchedFaces(me : in out) returns IndexedMapOfShape from TopTools
---C++: return &
is static;
AsDes(me) returns AsDes from BRepAlgo
is static;
NewEdges(me : in out) returns IndexedMapOfShape from TopTools
---C++: return &
is static;
---Category: Private
Store(me : in out;F1,F2 : Face from TopoDS;
LInt1,LInt2 : ListOfShape from TopTools)
is static private;
fields
myAsDes : AsDes from BRepAlgo;
myTouched : IndexedMapOfShape from TopTools;
myDone : DataMapOfShapeListOfShape from TopTools;
myNewEdges : IndexedMapOfShape from TopTools;
mySide : State from TopAbs;
myTol : Real from Standard;
end Inter3d;

View File

@@ -16,38 +16,39 @@
// Modified by skv - Fri Dec 26 12:20:14 2003 OCC4455
#include <BRepOffset_Inter3d.ixx>
#include <BRepOffset_Tool.hxx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_DataMapOfShapeOffset.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAlgo_AsDes.hxx>
#include <BRepAlgo_Image.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepOffset_Analyse.hxx>
#include <BRepOffset_DataMapOfShapeOffset.hxx>
#include <BRepOffset_Inter3d.hxx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepOffset_Tool.hxx>
#include <Extrema_ExtPC.hxx>
#include <Precision.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopOpeBRepTool_BoxSort.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Extrema_ExtPC.hxx>
#include <TopTools_MapOfShape.hxx>
#include <Precision.hxx>
//=======================================================================
//function : BRepOffset_Inter3d
//purpose :
//=======================================================================
BRepOffset_Inter3d::BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes,
const TopAbs_State Side ,
const Standard_Real Tol)

View File

@@ -0,0 +1,105 @@
// Created on: 1996-08-30
// Created by: Yves FRICAUD
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Inter3d_HeaderFile
#define _BRepOffset_Inter3d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopAbs_State.hxx>
#include <Standard_Real.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepOffset_DataMapOfShapeOffset.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <Standard_Boolean.hxx>
class BRepAlgo_AsDes;
class BRepAlgo_Image;
class TopoDS_Face;
class TopoDS_Shape;
class BRepOffset_Analyse;
//! Computes the intersection face face in a set of faces
//! Store the result in a SD as AsDes.
class BRepOffset_Inter3d
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepOffset_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes, const TopAbs_State Side, const Standard_Real Tol);
Standard_EXPORT void CompletInt (const TopTools_ListOfShape& SetOfFaces, const BRepAlgo_Image& InitOffsetFace);
Standard_EXPORT void FaceInter (const TopoDS_Face& F1, const TopoDS_Face& F2, const BRepAlgo_Image& InitOffsetFace);
Standard_EXPORT void ConnexIntByArc (const TopTools_ListOfShape& SetOfFaces, const TopoDS_Shape& ShapeInit, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace);
Standard_EXPORT void ConnexIntByInt (const TopoDS_Shape& SI, const BRepOffset_DataMapOfShapeOffset& MapSF, const BRepOffset_Analyse& A, TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed);
Standard_EXPORT void ContextIntByInt (const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean ExtentContext, const BRepOffset_DataMapOfShapeOffset& MapSF, const BRepOffset_Analyse& A, TopTools_DataMapOfShapeShape& MES, TopTools_DataMapOfShapeShape& Build, TopTools_ListOfShape& Failed);
Standard_EXPORT void ContextIntByArc (const TopTools_IndexedMapOfShape& ContextFaces, const Standard_Boolean ExtentContext, const BRepOffset_Analyse& Analyse, const BRepAlgo_Image& InitOffsetFace, BRepAlgo_Image& InitOffsetEdge);
Standard_EXPORT void AddCommonEdges (const TopTools_ListOfShape& SetOfFaces);
Standard_EXPORT void SetDone (const TopoDS_Face& F1, const TopoDS_Face& F2);
Standard_EXPORT Standard_Boolean IsDone (const TopoDS_Face& F1, const TopoDS_Face& F2) const;
Standard_EXPORT TopTools_IndexedMapOfShape& TouchedFaces();
Standard_EXPORT Handle(BRepAlgo_AsDes) AsDes() const;
Standard_EXPORT TopTools_IndexedMapOfShape& NewEdges();
protected:
private:
Standard_EXPORT void Store (const TopoDS_Face& F1, const TopoDS_Face& F2, const TopTools_ListOfShape& LInt1, const TopTools_ListOfShape& LInt2);
Handle(BRepAlgo_AsDes) myAsDes;
TopTools_IndexedMapOfShape myTouched;
TopTools_DataMapOfShapeListOfShape myDone;
TopTools_IndexedMapOfShape myNewEdges;
TopAbs_State mySide;
Standard_Real myTol;
};
#endif // _BRepOffset_Inter3d_HeaderFile

View File

@@ -1,62 +0,0 @@
-- Created on: 1995-10-20
-- Created by: Yves FRICAUD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Interval from BRepOffset
---Purpose:
uses
Type from BRepOffset
is
Create;
Create (U1,U2 : Real from Standard;
Type : Type from BRepOffset)
returns Interval from BRepOffset;
First (me : in out; U : Real from Standard)
---C++: inline
is static;
Last (me : in out; U : Real from Standard)
---C++: inline
is static;
Type (me : in out; T : Type from BRepOffset)
---C++: inline
is static;
First (me) returns Real from Standard
---C++: inline
is static;
Last (me) returns Real from Standard
---C++: inline
is static;
Type (me) returns Type from BRepOffset
---C++: inline
is static;
fields
f,l : Real from Standard;
type : Type from BRepOffset;
end Interval;

View File

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

View File

@@ -0,0 +1,79 @@
// Created on: 1995-10-20
// Created by: Yves FRICAUD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Interval_HeaderFile
#define _BRepOffset_Interval_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <BRepOffset_Type.hxx>
class BRepOffset_Interval
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepOffset_Interval();
Standard_EXPORT BRepOffset_Interval(const Standard_Real U1, const Standard_Real U2, const BRepOffset_Type Type);
void First (const Standard_Real U);
void Last (const Standard_Real U);
void Type (const BRepOffset_Type T);
Standard_Real First() const;
Standard_Real Last() const;
BRepOffset_Type Type() const;
protected:
private:
Standard_Real f;
Standard_Real l;
BRepOffset_Type type;
};
#include <BRepOffset_Interval.lxx>
#endif // _BRepOffset_Interval_HeaderFile

View File

@@ -1,48 +0,0 @@
-- Created on: 1996-09-05
-- Created by: Yves FRICAUD
-- Copyright (c) 1996-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class MakeLoops from BRepOffset
---Purpose:
uses
ListOfShape from TopTools,
AsDes from BRepAlgo,
Analyse from BRepOffset,
Image from BRepAlgo,
DataMapOfShapeShape from TopTools
is
Create;
Build (me: in out; LF : ListOfShape from TopTools;
AsDes : AsDes from BRepAlgo;
Image : in out Image from BRepAlgo);
BuildOnContext(me: in out; LContext : ListOfShape from TopTools;
Analyse : Analyse from BRepOffset;
AsDes : AsDes from BRepAlgo;
Image : in out Image from BRepAlgo;
InSide : Boolean from Standard);
BuildFaces (me: in out; LF : ListOfShape from TopTools;
AsDes : AsDes from BRepAlgo;
Image : in out Image from BRepAlgo);
fields
myVerVerMap : DataMapOfShapeShape from TopTools;
end MakeLoops;

View File

@@ -14,25 +14,26 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <BRepOffset_MakeLoops.ixx>
#include <BRepAlgo_Loop.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TVertex.hxx>
#include <BRepAlgo_AsDes.hxx>
#include <BRepAlgo_Image.hxx>
#include <BRepAlgo_Loop.hxx>
#include <BRepOffset_Analyse.hxx>
#include <BRepOffset_MakeLoops.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_TVertex.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <stdio.h>
#ifdef DRAW
#include <DBRep.hxx>
Standard_Integer NbF = 1;

View File

@@ -0,0 +1,72 @@
// Created on: 1996-09-05
// Created by: Yves FRICAUD
// Copyright (c) 1996-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_MakeLoops_HeaderFile
#define _BRepOffset_MakeLoops_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <Standard_Boolean.hxx>
class BRepAlgo_AsDes;
class BRepAlgo_Image;
class BRepOffset_Analyse;
class BRepOffset_MakeLoops
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepOffset_MakeLoops();
Standard_EXPORT void Build (const TopTools_ListOfShape& LF, const Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& Image);
Standard_EXPORT void BuildOnContext (const TopTools_ListOfShape& LContext, const BRepOffset_Analyse& Analyse, const Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& Image, const Standard_Boolean InSide);
Standard_EXPORT void BuildFaces (const TopTools_ListOfShape& LF, const Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& Image);
protected:
private:
TopTools_DataMapOfShapeShape myVerVerMap;
};
#endif // _BRepOffset_MakeLoops_HeaderFile

View File

@@ -1,228 +0,0 @@
-- Created on: 1995-10-26
-- Created by: Yves FRICAUD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Modified by skv - Tue Mar 15 16:17:37 2005
-- Add methods for supporting history.
class MakeOffset from BRepOffset
---Purpose:
uses
Image from BRepAlgo,
AsDes from BRepAlgo,
Analyse from BRepOffset,
Mode from BRepOffset,
DataMapOfShapeOffset from BRepOffset,
Error from BRepOffset,
Inter3d from BRepOffset,
DataMapOfShapeReal from TopTools,
Shape from TopoDS,
JoinType from GeomAbs,
Face from TopoDS,
Edge from TopoDS,
MapOfShape from TopTools,
IndexedMapOfShape from TopTools,
ListOfShape from TopTools,
MakeLoops from BRepOffset
is
Create;
Create ( S : Shape from TopoDS;
Offset : Real from Standard;
Tol : Real from Standard;
Mode : Mode from BRepOffset = BRepOffset_Skin;
Intersection : Boolean from Standard = Standard_False;
SelfInter : Boolean from Standard = Standard_False;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Thickening : Boolean from Standard = Standard_False)
returns MakeOffset from BRepOffset;
---Category: Initialization.
Initialize (me : in out;
S : Shape from TopoDS;
Offset : Real from Standard;
Tol : Real from Standard;
Mode : Mode from BRepOffset = BRepOffset_Skin;
Intersection : Boolean from Standard = Standard_False;
SelfInter : Boolean from Standard = Standard_False;
Join : JoinType from GeomAbs = GeomAbs_Arc;
Thickening : Boolean from Standard = Standard_False)
is static;
Clear (me : in out)
is static;
AddFace (me : in out; F : Face from TopoDS) is static;
---Purpose: Add Closing Faces, <F> has to be in the initial
-- shape S.
SetOffsetOnFace (me : in out;
F : Face from TopoDS;
Off : Real from Standard) is static;
---Purpose: set the offset <Off> on the Face <F>
---Category: Computation.
MakeOffsetShape (me : in out) is static;
MakeThickSolid (me : in out) is static;
---Category: Querying.
GetAnalyse(me)
---C++: return const &
returns Analyse from BRepOffset
is static;
IsDone (me) returns Boolean from Standard
is static;
Shape (me)
---C++: return const &
returns Shape from TopoDS
is static;
Error (me) returns Error from BRepOffset;
---Purpose: returns information if IsDone() = FALSE.
OffsetFacesFromShapes (me)
---Purpose: Returns <Image> containing links between initials
-- shapes and offset faces.
---C++: return const &
returns Image from BRepAlgo
is static;
-- Modified by skv - Tue Mar 15 16:17:37 2005 Begin
-- Query offset join type.
GetJoinType(me)
---Purpose: Returns myJoin.
returns JoinType from GeomAbs
is static;
-- Add methods for supporting history.
OffsetEdgesFromShapes (me)
---Purpose: Returns <Image> containing links between initials
-- shapes and offset edges.
---C++: return const &
returns Image from BRepAlgo
is static;
-- Modified by skv - Tue Mar 15 16:17:37 2005 End
ClosingFaces (me)
---Purpose: Returns the list of closing faces stores by AddFace
---C++: return const &
returns IndexedMapOfShape from TopTools
is static;
---Category: private methods
BuildOffsetByArc ( me : in out )
is static private;
BuildOffsetByInter ( me : in out )
is static private;
SelfInter (me : in out ;
Modif : in out MapOfShape from TopTools)
is static private;
Intersection3D (me : in out;
Inter : in out Inter3d from BRepOffset)
is static private;
Intersection2D ( me : in out ;
Modif : IndexedMapOfShape from TopTools;
NewEdges : IndexedMapOfShape from TopTools)
is static private;
MakeLoops ( me : in out ;
Modif : in out IndexedMapOfShape from TopTools)
is static private;
MakeLoopsOnContext ( me : in out ;
Modif : in out MapOfShape from TopTools)
is static private;
MakeFaces ( me : in out ;
Modif : in out IndexedMapOfShape from TopTools)
is static private;
MakeShells (me : in out )
is static private;
SelectShells (me : in out)
is static private;
EncodeRegularity( me : in out)
is static private;
MakeSolid (me : in out)
is static private;
ToContext (me : in out;
MapSF : in out DataMapOfShapeOffset from BRepOffset)
is static private;
UpdateFaceOffset (me: in out)
---Purpose: Private method use to update the map face<->offset
is static private;
CorrectConicalFaces (me: in out)
---Purpose: Private method used to correct degenerated edges on conical faces
is static private;
MakeMissingWalls (me: in out)
---Purpose: Private method used to build walls for thickening the shell
is static private;
fields
myOffset : Real from Standard;
myTol : Real from Standard;
myShape : Shape from TopoDS; -- Initial
myMode : Mode from BRepOffset;
myInter : Boolean from Standard;
mySelfInter : Boolean from Standard;
myJoin : JoinType from GeomAbs;
myThickening : Boolean from Standard;
myFaceOffset : DataMapOfShapeReal from TopTools;
myFaces : IndexedMapOfShape from TopTools;
myAnalyse : Analyse from BRepOffset;
myOffsetShape : Shape from TopoDS; -- Result
myInitOffsetFace : Image from BRepAlgo;
myInitOffsetEdge : Image from BRepAlgo;
myImageOffset : Image from BRepAlgo;
myWalls : ListOfShape from TopTools;
myAsDes : AsDes from BRepAlgo;
myDone : Boolean from Standard;
myError : Error from BRepOffset;
myMakeLoops : MakeLoops from BRepOffset;
end MakeOffset;

View File

@@ -16,110 +16,102 @@
// Modified by skv - Tue Mar 15 16:20:43 2005
// Add methods for supporting history.
// Modified by skv - Mon Jan 12 11:50:02 2004 OCC4455
#include <BRepOffset_MakeOffset.ixx>
#include <BRepOffset_Analyse.hxx>
#include <BRepOffset_DataMapOfShapeOffset.hxx>
#include <BRepOffset_DataMapOfShapeMapOfShape.hxx>
#include <BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepOffset_Inter2d.hxx>
#include <BRepOffset_Inter3d.hxx>
#include <BRepOffset_MakeLoops.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepCheck_Edge.hxx>
#include <BRepCheck_Vertex.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <BRep_PointRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TVertex.hxx>
#include <BRepTools_Quilt.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAlgo_AsDes.hxx>
#include <BRepAlgo_Image.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <BRepCheck_Edge.hxx>
#include <BRepCheck_Vertex.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepGProp.hxx>
#include <BRepLib.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepOffset_Analyse.hxx>
#include <BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx>
#include <BRepOffset_DataMapOfShapeMapOfShape.hxx>
#include <BRepOffset_DataMapOfShapeOffset.hxx>
#include <BRepOffset_Inter2d.hxx>
#include <BRepOffset_Inter3d.hxx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_MakeLoops.hxx>
#include <BRepOffset_MakeOffset.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepTools_Quilt.hxx>
#include <BRepTools_Substitution.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <ElCLib.hxx>
#include <ElSLib.hxx>
#include <GC_MakeCylindricalSurface.hxx>
#include <GCE2d_MakeLine.hxx>
#include <gce_MakeCone.hxx>
#include <gce_MakeDir.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_Circle.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomFill_Generator.hxx>
#include <GeomLib.hxx>
#include <gp_Cone.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt.hxx>
#include <GProp_GProps.hxx>
#include <IntTools_FClass2d.hxx>
#include <NCollection_List.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <Standard_NotImplemented.hxx>
#include <Standard_ConstructionError.hxx>
#include <Precision.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRep_TEdge.hxx>
#include <BRepTools.hxx>
#include <gp_Cone.hxx>
#include <ElSLib.hxx>
#include <ElCLib.hxx>
#include <gp_Lin2d.hxx>
#include <GCE2d_MakeLine.hxx>
#include <Geom2d_Line.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRepLib_MakeFace.hxx>
#include <Geom_Circle.hxx>
#include <BRep_PointRepresentation.hxx>
#include <BRep_ListIteratorOfListOfPointRepresentation.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <BRepTools_Substitution.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeReal.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapIteratorOfMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <gce_MakeDir.hxx>
#include <GC_MakeCylindricalSurface.hxx>
#include <gce_MakeCone.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <GeomLib.hxx>
#include <GeomFill_Generator.hxx>
#include <Geom_Plane.hxx>
#include <IntTools_FClass2d.hxx>
#include <BRepLib_FindSurface.hxx>
#include <BRepCheck_Analyzer.hxx>
#include <NCollection_List.hxx>
#include <GProp_GProps.hxx>
#include <BRepGProp.hxx>
// POP for NT
#include <stdio.h>
// POP for NT
#ifdef DRAW
#include <DBRep.hxx>

View File

@@ -0,0 +1,174 @@
// Created on: 1995-10-26
// Created by: Yves FRICAUD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_MakeOffset_HeaderFile
#define _BRepOffset_MakeOffset_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepOffset_Mode.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_JoinType.hxx>
#include <TopTools_DataMapOfShapeReal.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRepOffset_Analyse.hxx>
#include <BRepAlgo_Image.hxx>
#include <TopTools_ListOfShape.hxx>
#include <BRepOffset_Error.hxx>
#include <BRepOffset_MakeLoops.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepOffset_DataMapOfShapeOffset.hxx>
class BRepAlgo_AsDes;
class TopoDS_Shape;
class TopoDS_Face;
class BRepOffset_Analyse;
class BRepAlgo_Image;
class BRepOffset_Inter3d;
class BRepOffset_MakeOffset
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepOffset_MakeOffset();
Standard_EXPORT BRepOffset_MakeOffset(const TopoDS_Shape& S, const Standard_Real Offset, const Standard_Real Tol, const BRepOffset_Mode Mode = BRepOffset_Skin, const Standard_Boolean Intersection = Standard_False, const Standard_Boolean SelfInter = Standard_False, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Thickening = Standard_False);
Standard_EXPORT void Initialize (const TopoDS_Shape& S, const Standard_Real Offset, const Standard_Real Tol, const BRepOffset_Mode Mode = BRepOffset_Skin, const Standard_Boolean Intersection = Standard_False, const Standard_Boolean SelfInter = Standard_False, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Thickening = Standard_False);
Standard_EXPORT void Clear();
//! Add Closing Faces, <F> has to be in the initial
//! shape S.
Standard_EXPORT void AddFace (const TopoDS_Face& F);
//! set the offset <Off> on the Face <F>
Standard_EXPORT void SetOffsetOnFace (const TopoDS_Face& F, const Standard_Real Off);
Standard_EXPORT void MakeOffsetShape();
Standard_EXPORT void MakeThickSolid();
Standard_EXPORT const BRepOffset_Analyse& GetAnalyse() const;
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT const TopoDS_Shape& Shape() const;
//! returns information if IsDone() = FALSE.
Standard_EXPORT BRepOffset_Error Error() const;
//! Returns <Image> containing links between initials
//! shapes and offset faces.
Standard_EXPORT const BRepAlgo_Image& OffsetFacesFromShapes() const;
//! Returns myJoin.
Standard_EXPORT GeomAbs_JoinType GetJoinType() const;
//! Returns <Image> containing links between initials
//! shapes and offset edges.
Standard_EXPORT const BRepAlgo_Image& OffsetEdgesFromShapes() const;
//! Returns the list of closing faces stores by AddFace
Standard_EXPORT const TopTools_IndexedMapOfShape& ClosingFaces() const;
protected:
private:
Standard_EXPORT void BuildOffsetByArc();
Standard_EXPORT void BuildOffsetByInter();
Standard_EXPORT void SelfInter (TopTools_MapOfShape& Modif);
Standard_EXPORT void Intersection3D (BRepOffset_Inter3d& Inter);
Standard_EXPORT void Intersection2D (const TopTools_IndexedMapOfShape& Modif, const TopTools_IndexedMapOfShape& NewEdges);
Standard_EXPORT void MakeLoops (TopTools_IndexedMapOfShape& Modif);
Standard_EXPORT void MakeLoopsOnContext (TopTools_MapOfShape& Modif);
Standard_EXPORT void MakeFaces (TopTools_IndexedMapOfShape& Modif);
Standard_EXPORT void MakeShells();
Standard_EXPORT void SelectShells();
Standard_EXPORT void EncodeRegularity();
Standard_EXPORT void MakeSolid();
Standard_EXPORT void ToContext (BRepOffset_DataMapOfShapeOffset& MapSF);
//! Private method use to update the map face<->offset
Standard_EXPORT void UpdateFaceOffset();
//! Private method used to correct degenerated edges on conical faces
Standard_EXPORT void CorrectConicalFaces();
//! Private method used to build walls for thickening the shell
Standard_EXPORT void MakeMissingWalls();
Standard_Real myOffset;
Standard_Real myTol;
TopoDS_Shape myShape;
BRepOffset_Mode myMode;
Standard_Boolean myInter;
Standard_Boolean mySelfInter;
GeomAbs_JoinType myJoin;
Standard_Boolean myThickening;
TopTools_DataMapOfShapeReal myFaceOffset;
TopTools_IndexedMapOfShape myFaces;
BRepOffset_Analyse myAnalyse;
TopoDS_Shape myOffsetShape;
BRepAlgo_Image myInitOffsetFace;
BRepAlgo_Image myInitOffsetEdge;
BRepAlgo_Image myImageOffset;
TopTools_ListOfShape myWalls;
Handle(BRepAlgo_AsDes) myAsDes;
Standard_Boolean myDone;
BRepOffset_Error myError;
BRepOffset_MakeLoops myMakeLoops;
};
#endif // _BRepOffset_MakeOffset_HeaderFile

View File

@@ -0,0 +1,35 @@
// Created on: 1995-10-12
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Mode_HeaderFile
#define _BRepOffset_Mode_HeaderFile
//! Lists the offset modes. These are the following:
//! - BRepOffset_Skin which describes the offset along
//! the surface of a solid, used to obtain a manifold topological space,
//! - BRepOffset_Pipe which describes the offset of a
//! curve, used to obtain a pre-surface,
//! - BRepOffset_RectoVerso which describes the offset
//! of a given surface shell along both sides of the surface.
enum BRepOffset_Mode
{
BRepOffset_Skin,
BRepOffset_Pipe,
BRepOffset_RectoVerso
};
#endif // _BRepOffset_Mode_HeaderFile

View File

@@ -1,182 +0,0 @@
-- Created on: 1995-10-19
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Offset from BRepOffset
---Purpose: This class compute elemenary offset surface.
-- Evaluate the offset generated :
-- 1 - from a face.
-- 2 - from an edge.
-- 3 - from a vertex.
uses
Status from BRepOffset,
Shape from TopoDS,
Face from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
ListOfShape from TopTools,
DataMapOfShapeShape from TopTools,
Shape from GeomAbs,
JoinType from GeomAbs
is
Create returns Offset from BRepOffset;
Create( Face : Face from TopoDS;
Offset : Real from Standard;
OffsetOutside : Boolean from Standard = Standard_True;
JoinType : JoinType from GeomAbs = GeomAbs_Arc)
---Purpose:
returns Offset from BRepOffset;
Create( Face : Face from TopoDS;
Offset : Real from Standard;
Created : DataMapOfShapeShape from TopTools;
OffsetOutside : Boolean from Standard = Standard_True;
JoinType : JoinType from GeomAbs = GeomAbs_Arc)
---Purpose: This method will be called when you want to share
-- the edges soon generated from an other face.
-- e.g. when two faces are tangents the common edge
-- will generate only one edge ( no pipe).
--
-- The Map will be fill as follow:
--
-- Created(E) = E'
-- with: E = an edge of <Face>
-- E' = the image of E in the offseting of
-- another face sharing E with a
-- continuity at least G1
--
returns Offset from BRepOffset;
Create( Path : Edge from TopoDS;
Edge1 : Edge from TopoDS;
Edge2 : Edge from TopoDS;
Offset : Real from Standard;
Polynomial: Boolean from Standard = Standard_False;
Tol : Real from Standard = 1.0e-4;
Conti : Shape from GeomAbs = GeomAbs_C1)
---Purpose:
returns Offset from BRepOffset;
Create( Path : Edge from TopoDS;
Edge1 : Edge from TopoDS;
Edge2 : Edge from TopoDS;
Offset : Real from Standard;
FirstEdge : Edge from TopoDS;
LastEdge : Edge from TopoDS;
Polynomial: Boolean from Standard = Standard_False;
Tol : Real from Standard = 1.0e-4;
Conti : Shape from GeomAbs = GeomAbs_C1)
---Purpose:
returns Offset from BRepOffset;
Create( Vertex : Vertex from TopoDS;
LEdge : ListOfShape from TopTools;
Offset : Real from Standard;
Polynomial: Boolean from Standard = Standard_False;
Tol : Real from Standard = 1.0e-4;
Conti : Shape from GeomAbs = GeomAbs_C1)
---Purpose: Tol and Conti are only used if Polynomial is True
-- (Used to perfrom the approximation)
returns Offset from BRepOffset;
Init( me : in out;
Face : Face from TopoDS;
Offset : Real from Standard;
OffsetOutside : Boolean from Standard = Standard_True;
JoinType : JoinType from GeomAbs = GeomAbs_Arc)
---Purpose:
is static;
Init( me : in out;
Face : Face from TopoDS;
Offset : Real from Standard;
Created : DataMapOfShapeShape from TopTools;
OffsetOutside : Boolean from Standard = Standard_True;
JoinType : JoinType from GeomAbs = GeomAbs_Arc)
---Purpose:
is static;
Init( me : in out;
Path : Edge from TopoDS;
Edge1 : Edge from TopoDS;
Edge2 : Edge from TopoDS;
Offset : Real from Standard;
Polynomial: Boolean from Standard = Standard_False;
Tol : Real from Standard = 1.0e-4;
Conti : Shape from GeomAbs = GeomAbs_C1)
---Purpose:
is static;
Init( me : in out;
Path : Edge from TopoDS;
Edge1 : Edge from TopoDS;
Edge2 : Edge from TopoDS;
Offset : Real from Standard;
FirstEdge : Edge from TopoDS;
LastEdge : Edge from TopoDS;
Polynomial: Boolean from Standard = Standard_False;
Tol : Real from Standard = 1.0e-4;
Conti : Shape from GeomAbs = GeomAbs_C1)
---Purpose:
is static;
Init( me: in out;
Vertex : Vertex from TopoDS;
LEdge : ListOfShape from TopTools;
Offset : Real from Standard;
Polynomial: Boolean from Standard = Standard_False;
Tol : Real from Standard = 1.0e-4;
Conti : Shape from GeomAbs = GeomAbs_C1)
---Purpose: Tol and Conti are only used if Polynomial is True
-- (Used to perfrom the approximation)
is static;
Init( me : in out;
Edge : Edge from TopoDS;
Offset : Real from Standard)
---Purpose: Only used in Rolling Ball. Pipe on Free Boundary
is static;
InitialShape(me)
---C++: return const &
---C++: inline
returns Shape from TopoDS;
Face( me)
---C++: return const &
returns Face from TopoDS;
Generated(me; Shape : Shape from TopoDS)
---Purpose:
returns Shape from TopoDS;
Status( me)
---Purpose:
returns Status from BRepOffset;
fields
myShape : Shape from TopoDS;
myStatus : Status from BRepOffset;
myFace : Face from TopoDS;
myMap : DataMapOfShapeShape from TopTools;
end Offset;

View File

@@ -14,71 +14,72 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepOffset_Offset.ixx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <Adaptor3d_CurveOnSurface.hxx>
#include <BRepOffset.hxx>
#include <Adaptor3d_HCurveOnSurface.hxx>
#include <BRep_Builder.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_ListOfCurveRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRepGProp.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepOffset.hxx>
#include <BRepOffset_Offset.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepTools.hxx>
#include <BRep_Tool.hxx>
#include <BRep_Builder.hxx>
#include <ElSLib.hxx>
#include <GeomAPI.hxx>
#include <gce_MakePln.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom_Line.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_HSurface.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <GeomFill_Pipe.hxx>
#include <GeomProjLib.hxx>
#include <GeomAPI.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomConvert_ApproxSurface.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <GeomFill_Pipe.hxx>
#include <GeomLib.hxx>
#include <GeomProjLib.hxx>
#include <gp.hxx>
#include <gp_Ax3.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Torus.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt2d.hxx>
#include <BRep_GCurve.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_ListOfCurveRepresentation.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepOffset_Tool.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomLib.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <BRepLib_MakeWire.hxx>
#include <gce_MakePln.hxx>
#include <ShapeFix_Shape.hxx>
#include <gp_Torus.hxx>
#include <GProp_GProps.hxx>
#include <BRepGProp.hxx>
#include <Precision.hxx>
#include <ShapeFix_Shape.hxx>
#include <Standard_ConstructionError.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#ifdef OCCT_DEBUG
static Standard_Boolean Affich = Standard_False;

View File

@@ -0,0 +1,128 @@
// Created on: 1995-10-19
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Offset_HeaderFile
#define _BRepOffset_Offset_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepOffset_Status.hxx>
#include <TopoDS_Face.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <GeomAbs_JoinType.hxx>
#include <GeomAbs_Shape.hxx>
#include <TopTools_ListOfShape.hxx>
class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Vertex;
class TopoDS_Shape;
//! This class compute elemenary offset surface.
//! Evaluate the offset generated :
//! 1 - from a face.
//! 2 - from an edge.
//! 3 - from a vertex.
class BRepOffset_Offset
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepOffset_Offset();
Standard_EXPORT BRepOffset_Offset(const TopoDS_Face& Face, const Standard_Real Offset, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
//! This method will be called when you want to share
//! the edges soon generated from an other face.
//! e.g. when two faces are tangents the common edge
//! will generate only one edge ( no pipe).
//!
//! The Map will be fill as follow:
//!
//! Created(E) = E'
//! with: E = an edge of <Face>
//! E' = the image of E in the offseting of
//! another face sharing E with a
//! continuity at least G1
Standard_EXPORT BRepOffset_Offset(const TopoDS_Face& Face, const Standard_Real Offset, const TopTools_DataMapOfShapeShape& Created, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
Standard_EXPORT BRepOffset_Offset(const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
Standard_EXPORT BRepOffset_Offset(const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
//! Tol and Conti are only used if Polynomial is True
//! (Used to perfrom the approximation)
Standard_EXPORT BRepOffset_Offset(const TopoDS_Vertex& Vertex, const TopTools_ListOfShape& LEdge, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
Standard_EXPORT void Init (const TopoDS_Face& Face, const Standard_Real Offset, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
Standard_EXPORT void Init (const TopoDS_Face& Face, const Standard_Real Offset, const TopTools_DataMapOfShapeShape& Created, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
Standard_EXPORT void Init (const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
Standard_EXPORT void Init (const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
//! Tol and Conti are only used if Polynomial is True
//! (Used to perfrom the approximation)
Standard_EXPORT void Init (const TopoDS_Vertex& Vertex, const TopTools_ListOfShape& LEdge, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
//! Only used in Rolling Ball. Pipe on Free Boundary
Standard_EXPORT void Init (const TopoDS_Edge& Edge, const Standard_Real Offset);
const TopoDS_Shape& InitialShape() const;
Standard_EXPORT const TopoDS_Face& Face() const;
Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& Shape) const;
Standard_EXPORT BRepOffset_Status Status() const;
protected:
private:
TopoDS_Shape myShape;
BRepOffset_Status myStatus;
TopoDS_Face myFace;
TopTools_DataMapOfShapeShape myMap;
};
#include <BRepOffset_Offset.lxx>
#endif // _BRepOffset_Offset_HeaderFile

View File

@@ -0,0 +1,33 @@
// Created on: 1995-10-12
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Status_HeaderFile
#define _BRepOffset_Status_HeaderFile
//! status of an offset face
//! Good :
//! Reversed : e.g. Offset > Radius of a cylinder
//! Degenerated : e.g. Offset = Radius of a cylinder
//! Unknown : e.g. for a Beziersurf
enum BRepOffset_Status
{
BRepOffset_Good,
BRepOffset_Reversed,
BRepOffset_Degenerated,
BRepOffset_Unknown
};
#endif // _BRepOffset_Status_HeaderFile

View File

@@ -1,180 +0,0 @@
-- Created on: 1995-10-23
-- Created by: Yves FRICAUD
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Tool from BRepOffset
---Purpose:
uses
Edge from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Shape from TopoDS,
Orientation from TopAbs,
MapOfShape from TopTools,
IndexedMapOfShape from TopTools,
DataMapOfShapeShape from TopTools,
DataMapOfShapeListOfShape from TopTools,
ListOfShape from TopTools,
Vertex from TopoDS,
State from TopAbs,
Image from BRepAlgo,
AsDes from BRepAlgo,
Analyse from BRepOffset,
Curve from Geom
is
EdgeVertices (myclass; E : Edge from TopoDS;
V1 : in out Vertex from TopoDS;
V2 : in out Vertex from TopoDS);
---Purpose: <V1> is the FirstVertex ,<V2> is the Last Vertex of <Edge>
-- taking account the orientation of Edge.
OriEdgeInFace (myclass; E : Edge from TopoDS;
F : Face from TopoDS)
---Purpose: returns the cumul of the orientation of <Edge>
-- and thc containing wire in <Face>
returns Orientation from TopAbs;
OrientSection (myclass; E : Edge from TopoDS;
F1,F2 : Face from TopoDS;
O1,O2 : in out Orientation from TopAbs);
---Purpose: <E> is a section between <F1> and <F2>. Computes
-- <O1> the orientation of <E> in <F1> influenced by <F2>.
-- idem for <O2>.
HasCommonShapes (myclass; F1,F2 : Face from TopoDS;
LE : in out ListOfShape from TopTools;
LV : in out ListOfShape from TopTools)
---Purpose: Returns True if <F1> and <F2> has common Vertices
-- or edges , <LE> contains the common edges. <LV> the
-- common vertices.
returns Boolean from Standard;
Inter3D (myclass; F1, F2 : Face from TopoDS;
LInt1 : in out ListOfShape from TopTools;
LInt2 : in out ListOfShape from TopTools;
Side : State from TopAbs;
RefEdge : Edge from TopoDS;
IsRefEdgeDefined : Boolean from Standard = Standard_False);
---Purpose: Computes the Section betwwen <F1> and <F2> the
-- edges solution are stored in <LInt1> with the
-- orientation on <F1>, the sames edges are stored in
-- <Lint2> with the orientation on <F2>.
TryProject (myclass; F1, F2 : Face from TopoDS;
Edges : ListOfShape from TopTools;
LInt1 : in out ListOfShape from TopTools;
LInt2 : in out ListOfShape from TopTools;
Side : State from TopAbs;
TolConf: Real from Standard)
---Purpose: Find if the edges <Edges> of the face <F2> are on
-- the face <F1>.
-- Set in <LInt1> <LInt2> the updated edges.
-- If all the edges are computed, returns true.
--
returns Boolean from Standard;
PipeInter (myclass; F1, F2 : Face from TopoDS;
LInt1 : in out ListOfShape from TopTools;
LInt2 : in out ListOfShape from TopTools;
Side : State from TopAbs);
Inter2d (myclass; F : Face from TopoDS;
E1,E2 : Edge from TopoDS;
LV : in out ListOfShape from TopTools;
Tol : Real from Standard);
InterOrExtent (myclass; F1, F2 : Face from TopoDS;
LInt1 : in out ListOfShape from TopTools;
LInt2 : in out ListOfShape from TopTools;
Side : State from TopAbs);
CheckBounds(myclass; F : Face from TopoDS;
Analyse : Analyse from BRepOffset;
enlargeU, enlargeVfirst, enlargeVlast : out Boolean from Standard);
EnLargeFace(myclass; F : Face from TopoDS;
NF : in out Face from TopoDS;
ChangeGeom : Boolean from Standard;
UpDatePCurve : Boolean from Standard = Standard_False;
enlargeU : Boolean from Standard = Standard_True;
enlargeVfirst : Boolean from Standard = Standard_True;
enlargeVlast : Boolean from Standard = Standard_True)
---Purpose: if <ChangeGeom> is TRUE , the surface can be
-- changed .
-- if <UpdatePCurve> is TRUE, update the pcurves of the
-- edges of <F> on the new surface.if the surface has been changed,
-- Returns True if The Surface of <NF> has changed.
--
returns Boolean from Standard;
ExtentFace (myclass;
F : Face from TopoDS;
ConstShapes : in out DataMapOfShapeShape from TopTools;
ToBuild : in out DataMapOfShapeShape from TopTools;
Side : State from TopAbs ;
TolConf : Real from Standard;
NF : in out Face from TopoDS);
BuildNeighbour (myclass;
W : Wire from TopoDS;
F : Face from TopoDS;
NOnV1 : in out DataMapOfShapeShape from TopTools;
NOnV2 : in out DataMapOfShapeShape from TopTools);
---Purpose: Via the wire explorer store in <NOnV1> for
-- an Edge <E> of <W> his Edge neighbour on the first
-- vertex <V1> of <E>.
-- Store in NOnV2 the Neighbour of <E>on the last
-- vertex <V2> of <E>.
MapVertexEdges (myclass;
S : Shape from TopoDS;
MVE : in out DataMapOfShapeListOfShape from TopTools);
---Purpose: Store in MVE for a vertex <V> in <S> the incident
-- edges <E> in <S>.
-- An Edge is Store only one Time for a vertex.
Deboucle3D (myclass;
S : in Shape from TopoDS;
Boundary : in MapOfShape from TopTools)
---Purpose: Remove the non valid part of an offsetshape
-- 1 - Remove all the free boundary and the faces
-- connex to such edges.
-- 2 - Remove all the shapes not valid in the result
-- (according to the side of offseting)
-- in this verion only the first point is implemented.
returns Shape from TopoDS;
CorrectOrientation (myclass ;
SI : in Shape from TopoDS;
NewEdges : in IndexedMapOfShape from TopTools;
AsDes : in out AsDes from BRepAlgo;
InitOffset : in out Image from BRepAlgo;
Offset : in Real from Standard);
Gabarit(myclass ;
aCurve : Curve from Geom)
returns Real from Standard;
end Tool;

View File

@@ -14,134 +14,119 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <stdio.h>
#include <BRepOffset_Tool.ixx>
#include <BRepAlgo_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepBndLib.hxx>
#include <Bnd_Box2d.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPDS_DS.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_TEdge.hxx>
#include <BRep_Tool.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakePolygon.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepTools.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepTools_Modifier.hxx>
#include <BRepTools_TrsfModification.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAlgo_AsDes.hxx>
#include <BRepAlgo_Image.hxx>
#include <BRepAlgo_Tool.hxx>
#include <BRepBndLib.hxx>
#include <BRepLib.hxx>
#include <BRepLib_MakeEdge.hxx>
#include <BRepLib_MakeFace.hxx>
#include <BRepLib_MakePolygon.hxx>
#include <BRepLib_MakeVertex.hxx>
#include <BRepLib_MakeWire.hxx>
#include <BRepOffset_Analyse.hxx>
#include <BRepOffset_Interval.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepTools_Modifier.hxx>
#include <BRepTools_TrsfModification.hxx>
#include <BRepTools_WireExplorer.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <ElCLib.hxx>
#include <ElSLib.hxx>
#include <Extrema_ExtPC.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopAbs.hxx>
#include <Standard_ConstructionError.hxx>
#include <TopOpeBRepBuild_Builder.hxx>
#include <TopOpeBRepDS_HDataStructure.hxx>
#include <TopOpeBRepDS_CurveExplorer.hxx>
#include <TopOpeBRep_DSFiller.hxx>
#include <TopOpeBRepTool_GeomTool.hxx>
#include <TopOpeBRep_ShapeIntersector.hxx>
#include <TopOpeBRep_FacesFiller.hxx>
#include <TopOpeBRep_GeomTool.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <Geom_Surface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Extrema_ExtPC2d.hxx>
#include <GCPnts_AbscissaPoint.hxx>
#include <GCPnts_QuasiUniformDeflection.hxx>
#include <GCPnts_UniformAbscissa.hxx>
#include <Geom2d_BezierCurve.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 <Geom2dAdaptor_Curve.hxx>
#include <Geom2dConvert_ApproxCurve.hxx>
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_Conic.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Line.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Conic.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GCPnts_QuasiUniformDeflection.hxx>
#include <GeomLib.hxx>
#include <GeomAPI.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Line.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom2d_Circle.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_Parabola.hxx>
#include <Geom2d_Hyperbola.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dInt_GInter.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <GeomProjLib.hxx>
#include <GeomAPI.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomConvert_ApproxCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <GeomInt_IntSS.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <ProjLib_HProjectedCurve.hxx>
#include <ElSLib.hxx>
#include <ElCLib.hxx>
#include <GeomLib.hxx>
#include <GeomProjLib.hxx>
#include <gp.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <IntRes2d_IntersectionPoint.hxx>
#include <IntRes2d_IntersectionSegment.hxx>
#include <Precision.hxx>
#include <Standard_ConstructionError.hxx>
#include <BRep_TEdge.hxx>
#include <Extrema_ExtPC2d.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <GCPnts_AbscissaPoint.hxx>
//tma: for new boolean operation
#include <TopTools_SequenceOfShape.hxx>
#include <Geom_BSplineCurve.hxx>
#include <GeomConvert_CompCurveToBSplineCurve.hxx>
#include <Geom2dConvert_CompCurveToBSplineCurve.hxx>
#include <GeomConvert_ApproxCurve.hxx>
#include <Geom2dConvert_ApproxCurve.hxx>
#include <TopoDS_Compound.hxx>
#include <GCPnts_UniformAbscissa.hxx>
#include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
#include <BRep_CurveRepresentation.hxx>
#include <BRepOffset_ListOfInterval.hxx>
#include <BRepOffset_Interval.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <ProjLib_HProjectedCurve.hxx>
#include <ProjLib_ProjectedCurve.hxx>
#include <ShapeCustom_Curve2d.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <BOPDS_DS.hxx>
#include <BOPAlgo_PaveFiller.hxx>
#include <BOPTools_AlgoTools2D.hxx>
#include <Standard_ConstructionError.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <TopAbs.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Wire.hxx>
#include <TopOpeBRep_DSFiller.hxx>
#include <TopOpeBRep_FacesFiller.hxx>
#include <TopOpeBRep_GeomTool.hxx>
#include <TopOpeBRep_ShapeIntersector.hxx>
#include <TopOpeBRepBuild_Builder.hxx>
#include <TopOpeBRepDS_CurveExplorer.hxx>
#include <TopOpeBRepDS_HDataStructure.hxx>
#include <TopOpeBRepTool_GeomTool.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <stdio.h>
//tma: for new boolean operation
#ifdef DRAW
#include <DBRep.hxx>
#include <Geom2d_Conic.hxx>

View File

@@ -0,0 +1,146 @@
// Created on: 1995-10-23
// Created by: Yves FRICAUD
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Tool_HeaderFile
#define _BRepOffset_Tool_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopAbs_Orientation.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopAbs_State.hxx>
#include <Standard_Real.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
class TopoDS_Edge;
class TopoDS_Vertex;
class TopoDS_Face;
class BRepOffset_Analyse;
class TopoDS_Wire;
class TopoDS_Shape;
class BRepAlgo_AsDes;
class BRepAlgo_Image;
class Geom_Curve;
class BRepOffset_Tool
{
public:
DEFINE_STANDARD_ALLOC
//! <V1> is the FirstVertex ,<V2> is the Last Vertex of <Edge>
//! taking account the orientation of Edge.
Standard_EXPORT static void EdgeVertices (const TopoDS_Edge& E, TopoDS_Vertex& V1, TopoDS_Vertex& V2);
//! returns the cumul of the orientation of <Edge>
//! and thc containing wire in <Face>
Standard_EXPORT static TopAbs_Orientation OriEdgeInFace (const TopoDS_Edge& E, const TopoDS_Face& F);
//! <E> is a section between <F1> and <F2>. Computes
//! <O1> the orientation of <E> in <F1> influenced by <F2>.
//! idem for <O2>.
Standard_EXPORT static void OrientSection (const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, TopAbs_Orientation& O1, TopAbs_Orientation& O2);
//! Returns True if <F1> and <F2> has common Vertices
//! or edges , <LE> contains the common edges. <LV> the
//! common vertices.
Standard_EXPORT static Standard_Boolean HasCommonShapes (const TopoDS_Face& F1, const TopoDS_Face& F2, TopTools_ListOfShape& LE, TopTools_ListOfShape& LV);
//! Computes the Section betwwen <F1> and <F2> the
//! edges solution are stored in <LInt1> with the
//! orientation on <F1>, the sames edges are stored in
//! <Lint2> with the orientation on <F2>.
Standard_EXPORT static void Inter3D (const TopoDS_Face& F1, const TopoDS_Face& F2, TopTools_ListOfShape& LInt1, TopTools_ListOfShape& LInt2, const TopAbs_State Side, const TopoDS_Edge& RefEdge, const Standard_Boolean IsRefEdgeDefined = Standard_False);
//! Find if the edges <Edges> of the face <F2> are on
//! the face <F1>.
//! Set in <LInt1> <LInt2> the updated edges.
//! If all the edges are computed, returns true.
Standard_EXPORT static Standard_Boolean TryProject (const TopoDS_Face& F1, const TopoDS_Face& F2, const TopTools_ListOfShape& Edges, TopTools_ListOfShape& LInt1, TopTools_ListOfShape& LInt2, const TopAbs_State Side, const Standard_Real TolConf);
Standard_EXPORT static void PipeInter (const TopoDS_Face& F1, const TopoDS_Face& F2, TopTools_ListOfShape& LInt1, TopTools_ListOfShape& LInt2, const TopAbs_State Side);
Standard_EXPORT static void Inter2d (const TopoDS_Face& F, const TopoDS_Edge& E1, const TopoDS_Edge& E2, TopTools_ListOfShape& LV, const Standard_Real Tol);
Standard_EXPORT static void InterOrExtent (const TopoDS_Face& F1, const TopoDS_Face& F2, TopTools_ListOfShape& LInt1, TopTools_ListOfShape& LInt2, const TopAbs_State Side);
Standard_EXPORT static void CheckBounds (const TopoDS_Face& F, const BRepOffset_Analyse& Analyse, Standard_Boolean& enlargeU, Standard_Boolean& enlargeVfirst, Standard_Boolean& enlargeVlast);
//! if <ChangeGeom> is TRUE , the surface can be
//! changed .
//! if <UpdatePCurve> is TRUE, update the pcurves of the
//! edges of <F> on the new surface.if the surface has been changed,
//! Returns True if The Surface of <NF> has changed.
Standard_EXPORT static Standard_Boolean EnLargeFace (const TopoDS_Face& F, TopoDS_Face& NF, const Standard_Boolean ChangeGeom, const Standard_Boolean UpDatePCurve = Standard_False, const Standard_Boolean enlargeU = Standard_True, const Standard_Boolean enlargeVfirst = Standard_True, const Standard_Boolean enlargeVlast = Standard_True);
Standard_EXPORT static void ExtentFace (const TopoDS_Face& F, TopTools_DataMapOfShapeShape& ConstShapes, TopTools_DataMapOfShapeShape& ToBuild, const TopAbs_State Side, const Standard_Real TolConf, TopoDS_Face& NF);
//! Via the wire explorer store in <NOnV1> for
//! an Edge <E> of <W> his Edge neighbour on the first
//! vertex <V1> of <E>.
//! Store in NOnV2 the Neighbour of <E>on the last
//! vertex <V2> of <E>.
Standard_EXPORT static void BuildNeighbour (const TopoDS_Wire& W, const TopoDS_Face& F, TopTools_DataMapOfShapeShape& NOnV1, TopTools_DataMapOfShapeShape& NOnV2);
//! Store in MVE for a vertex <V> in <S> the incident
//! edges <E> in <S>.
//! An Edge is Store only one Time for a vertex.
Standard_EXPORT static void MapVertexEdges (const TopoDS_Shape& S, TopTools_DataMapOfShapeListOfShape& MVE);
//! Remove the non valid part of an offsetshape
//! 1 - Remove all the free boundary and the faces
//! connex to such edges.
//! 2 - Remove all the shapes not valid in the result
//! (according to the side of offseting)
//! in this verion only the first point is implemented.
Standard_EXPORT static TopoDS_Shape Deboucle3D (const TopoDS_Shape& S, const TopTools_MapOfShape& Boundary);
Standard_EXPORT static void CorrectOrientation (const TopoDS_Shape& SI, const TopTools_IndexedMapOfShape& NewEdges, Handle(BRepAlgo_AsDes)& AsDes, BRepAlgo_Image& InitOffset, const Standard_Real Offset);
Standard_EXPORT static Standard_Real Gabarit (const Handle(Geom_Curve)& aCurve);
protected:
private:
};
#endif // _BRepOffset_Tool_HeaderFile

View File

@@ -0,0 +1,30 @@
// Created on: 1995-10-12
// Created by: Bruno DUMORTIER
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BRepOffset_Type_HeaderFile
#define _BRepOffset_Type_HeaderFile
enum BRepOffset_Type
{
BRepOffset_Concave,
BRepOffset_Convex,
BRepOffset_Tangent,
BRepOffset_FreeBoundary,
BRepOffset_Other
};
#endif // _BRepOffset_Type_HeaderFile

View File

@@ -1,8 +1,32 @@
BRepOffset_ListOfInterval.hxx
BRepOffset_ListIteratorOfListOfInterval.hxx
BRepOffset_DataMapOfShapeListOfInterval.hxx
BRepOffset.cxx
BRepOffset.hxx
BRepOffset_Analyse.cxx
BRepOffset_Analyse.hxx
BRepOffset_DataMapIteratorOfDataMapOfShapeListOfInterval.hxx
BRepOffset_DataMapOfShapeOffset.hxx
BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx
BRepOffset_DataMapOfShapeMapOfShape.hxx
BRepOffset_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx
BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx
BRepOffset_DataMapOfShapeListOfInterval.hxx
BRepOffset_DataMapOfShapeMapOfShape.hxx
BRepOffset_DataMapOfShapeOffset.hxx
BRepOffset_Error.hxx
BRepOffset_Inter2d.cxx
BRepOffset_Inter2d.hxx
BRepOffset_Inter3d.cxx
BRepOffset_Inter3d.hxx
BRepOffset_Interval.cxx
BRepOffset_Interval.hxx
BRepOffset_Interval.lxx
BRepOffset_ListIteratorOfListOfInterval.hxx
BRepOffset_ListOfInterval.hxx
BRepOffset_MakeLoops.cxx
BRepOffset_MakeLoops.hxx
BRepOffset_MakeOffset.cxx
BRepOffset_MakeOffset.hxx
BRepOffset_Mode.hxx
BRepOffset_Offset.cxx
BRepOffset_Offset.hxx
BRepOffset_Offset.lxx
BRepOffset_Status.hxx
BRepOffset_Tool.cxx
BRepOffset_Tool.hxx
BRepOffset_Type.hxx