1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0024734: Convertation of the generic classes to the non-generic. Part 4

Generic classes "LProp_FuncCurExt", "LProp_FuncCurNul" and "LProp_NumericCurInf" from "LProp" package converted to the non-generic classes and moved to the "Geom2dLProp" package. Therefore names of this classes were changed to "Geom2dLProp_FuncCurExt", "Geom2dLProp_FuncCurNul" and "Geom2dLProp_NumericCurInf".
Generic class "Sweep_LinearRegularSweep" from "Sweep" package converted to the non-generic classes and moved to the "BRepSweep" package. Therefore name of this class was changed to "BRepSweep_NumLinearRegularSweep". Also 2 internal classes of "BRepSweep_NumLinearRegularSweep" moved to "BRepSweep.cdl".
Generic classes "Primitives_Wedge" and "Primitives_OneAxis" from "Primitives" package converted to the non-generic classes and moved to the "BRepPrim" package. Therefore names of this classes were changed to "BRepPrim_GWedge" and "BRepPrim_OneAxis". Also enum "Direction" moved to BRepPrim. Therefore all "Primitives" package was deleted.
And some other minor changes were done.

Internal classes Array2OfShapes and SequenceOfShapes from BRepSweep_NumLinearRegularSweep replaced to Array2OfShape and SequenceOfShape from TopTools.
This commit is contained in:
dln 2014-03-27 16:29:16 +04:00 committed by apn
parent 04f7bd75e3
commit a104bb8fe2
29 changed files with 622 additions and 1159 deletions

View File

@ -171,7 +171,6 @@ p MAT
p MAT2d p MAT2d
p NLPlate p NLPlate
p Plate p Plate
p Primitives
p ShapeAlgo p ShapeAlgo
p ShapeAnalysis p ShapeAnalysis
p ShapeBuild p ShapeBuild

View File

@ -41,20 +41,18 @@ uses
gp, gp,
Geom2d, Geom2d,
Geom, Geom,
Primitives,
TopoDS, TopoDS,
BRep BRep
is is
enumeration Direction is
---Purpose:
XMin, XMax, YMin, YMax, ZMin, ZMax
end Direction;
class Builder; class Builder;
deferred class OneAxis instantiates OneAxis from Primitives( deferred class OneAxis;
Shell from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
Builder from BRepPrim);
class Revolution; class Revolution;
@ -66,13 +64,7 @@ is
class Torus; class Torus;
class GWedge instantiates Wedge from Primitives( class GWedge;
Shell from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
Builder from BRepPrim);
class Wedge; class Wedge;

View File

@ -14,13 +14,8 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
generic class Wedge from Primitives( class GWedge from BRepPrim
TheShell as any;
TheFace as any;
TheWire as any;
TheEdge as any;
TheVertex as any;
TheBuilder as any)
---Purpose: A wedge is defined by : ---Purpose: A wedge is defined by :
-- --
@ -45,21 +40,27 @@ generic class Wedge from Primitives(
uses uses
Direction from Primitives, Direction from BRepPrim,
Ax2 from gp, Ax2 from gp,
Pln from gp, Pln from gp,
Lin from gp, Lin from gp,
Pnt from gp Pnt from gp,
Shell from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
Builder from BRepPrim
raises raises
DomainError, DomainError,
OutOfRange OutOfRange
is is
Create(B : TheBuilder; Axes : Ax2 from gp; dx, dy, dz : Real) Create(B : Builder from BRepPrim; Axes : Ax2 from gp; dx, dy, dz : Real)
returns Wedge from Primitives returns GWedge from BRepPrim
---Purpose: Creates a Wedge algorithm. <Axes> is the axis ---Purpose: Creates a GWedge algorithm. <Axes> is the axis
-- system for the primitive. -- system for the primitive.
-- --
-- XMin, YMin, ZMin are set to 0 -- XMin, YMin, ZMin are set to 0
@ -72,9 +73,9 @@ is
-- dx,dy,dz should be positive -- dx,dy,dz should be positive
raises DomainError; raises DomainError;
Create(B : TheBuilder; Axes : Ax2 from gp; dx, dy, dz, ltx : Real) Create(B : Builder from BRepPrim; Axes : Ax2 from gp; dx, dy, dz, ltx : Real)
returns Wedge from Primitives returns GWedge from BRepPrim
---Purpose: Creates a Wedge primitive. <Axes> is the axis ---Purpose: Creates a GWedge primitive. <Axes> is the axis
-- system for the primitive. -- system for the primitive.
-- --
-- XMin, YMin, ZMin are set to 0 -- XMin, YMin, ZMin are set to 0
@ -88,10 +89,10 @@ is
-- ltx should not be negative -- ltx should not be negative
raises DomainError; raises DomainError;
Create(B : TheBuilder; Axes : Ax2 from gp; xmin, ymin, zmin, z2min, x2min, Create(B : Builder from BRepPrim; Axes : Ax2 from gp; xmin, ymin, zmin, z2min, x2min,
xmax, ymax, zmax, z2max, x2max : Real) xmax, ymax, zmax, z2max, x2max : Real)
returns Wedge from Primitives returns GWedge from BRepPrim
---Purpose: Create a Wedge primitive. <Axes> is the axis ---Purpose: Create a GWedge primitive. <Axes> is the axis
-- system for the primitive. -- system for the primitive.
-- --
-- all the fields are set to the corresponding value -- all the fields are set to the corresponding value
@ -143,80 +144,80 @@ is
---Purpose: Returns X2Max value from <me>. ---Purpose: Returns X2Max value from <me>.
is static; is static;
Open(me : in out; d1 : Direction from Primitives) Open(me : in out; d1 : Direction from BRepPrim)
---Purpose: Opens <me> in <d1> direction. A face and its edges ---Purpose: Opens <me> in <d1> direction. A face and its edges
-- or vertices are said nonexistant. -- or vertices are said nonexistant.
raises DomainError raises DomainError
is static; is static;
Close(me : in out; d1 : Direction from Primitives) Close(me : in out; d1 : Direction from BRepPrim)
---Purpose: Closes <me> in <d1> direction. A face and its ---Purpose: Closes <me> in <d1> direction. A face and its
-- edges or vertices are said existant. -- edges or vertices are said existant.
raises DomainError raises DomainError
is static; is static;
IsInfinite(me; d1 : Direction from Primitives) IsInfinite(me; d1 : Direction from BRepPrim)
---Purpose: Returns True if <me> is open in <d1> direction. ---Purpose: Returns True if <me> is open in <d1> direction.
returns Boolean; returns Boolean;
Shell(me : in out) returns TheShell Shell(me : in out) returns Shell from TopoDS
---Purpose: Returns the Shell containing the Faces of <me>. ---Purpose: Returns the Shell containing the Faces of <me>.
-- --
---C++: return const & ---C++: return const &
is static; is static;
HasFace(me; d1 : Direction from Primitives) HasFace(me; d1 : Direction from BRepPrim)
---Purpose: Returns True if <me> has a Face in <d1> direction. ---Purpose: Returns True if <me> has a Face in <d1> direction.
returns Boolean; returns Boolean;
Face(me : in out; d1 : Direction from Primitives) returns TheFace Face(me : in out; d1 : Direction from BRepPrim) returns Face from TopoDS
---Purpose: Returns the Face of <me> located in <d1> direction. ---Purpose: Returns the Face of <me> located in <d1> direction.
-- --
---C++: return const & ---C++: return const &
raises DomainError raises DomainError
is static; is static;
Plane(me : in out; d1 : Direction from Primitives) returns Pln from gp Plane(me : in out; d1 : Direction from BRepPrim) returns Pln from gp
---Purpose: Returns the plane of the Face of <me> located in ---Purpose: Returns the plane of the Face of <me> located in
-- <d1> direction. -- <d1> direction.
raises DomainError raises DomainError
is static; is static;
HasWire(me; d1 : Direction from Primitives) HasWire(me; d1 : Direction from BRepPrim)
---Purpose: Returns True if <me> has a Wire in <d1> direction. ---Purpose: Returns True if <me> has a Wire in <d1> direction.
returns Boolean; returns Boolean;
Wire(me : in out; d1 : Direction from Primitives) returns TheWire Wire(me : in out; d1 : Direction from BRepPrim) returns Wire from TopoDS
---Purpose: Returns the Wire of <me> located in <d1> direction. ---Purpose: Returns the Wire of <me> located in <d1> direction.
-- --
---C++: return const & ---C++: return const &
raises DomainError raises DomainError
is static; is static;
HasEdge(me; d1, d2 : Direction from Primitives) HasEdge(me; d1, d2 : Direction from BRepPrim)
---Purpose: Returns True if <me> has an Edge in <d1><d2> direction. ---Purpose: Returns True if <me> has an Edge in <d1><d2> direction.
returns Boolean; returns Boolean;
Edge(me : in out; d1, d2 : Direction from Primitives) returns TheEdge Edge(me : in out; d1, d2 : Direction from BRepPrim) returns Edge from TopoDS
---Purpose: Returns the Edge of <me> located in <d1><d2> direction. ---Purpose: Returns the Edge of <me> located in <d1><d2> direction.
-- --
---C++: return const & ---C++: return const &
raises DomainError raises DomainError
is static; is static;
Line(me : in out; d1, d2 : Direction from Primitives) returns Lin from gp Line(me : in out; d1, d2 : Direction from BRepPrim) returns Lin from gp
---Purpose: Returns the line of the Edge of <me> located in ---Purpose: Returns the line of the Edge of <me> located in
-- <d1><d2> direction. -- <d1><d2> direction.
raises DomainError raises DomainError
is static; is static;
HasVertex(me; d1, d2, d3 : Direction from Primitives) HasVertex(me; d1, d2, d3 : Direction from BRepPrim)
---Purpose: Returns True if <me> has a Vertex in <d1><d2><d3> ---Purpose: Returns True if <me> has a Vertex in <d1><d2><d3>
-- direction. -- direction.
returns Boolean; returns Boolean;
Vertex(me : in out; d1, d2, d3 : Direction from Primitives) Vertex(me : in out; d1, d2, d3 : Direction from BRepPrim)
returns TheVertex returns Vertex from TopoDS
---Purpose: Returns the Vertex of <me> located in <d1><d2><d3> ---Purpose: Returns the Vertex of <me> located in <d1><d2><d3>
-- direction. -- direction.
-- --
@ -224,7 +225,7 @@ is
raises DomainError raises DomainError
is static; is static;
Point(me : in out; d1, d2, d3 : Direction from Primitives) Point(me : in out; d1, d2, d3 : Direction from BRepPrim)
returns Pnt from gp returns Pnt from gp
---Purpose: Returns the point of the Vertex of <me> located in ---Purpose: Returns the point of the Vertex of <me> located in
-- <d1><d2><d3> direction. -- <d1><d2><d3> direction.
@ -232,7 +233,7 @@ is
is static; is static;
fields fields
myBuilder : TheBuilder; myBuilder : Builder from BRepPrim;
myAxes : Ax2 from gp; myAxes : Ax2 from gp;
XMin : Real; XMin : Real;
@ -248,10 +249,10 @@ fields
-- the Topology -- the Topology
myShell : TheShell; myShell : Shell from TopoDS;
ShellBuilt : Boolean; ShellBuilt : Boolean;
myVertices : TheVertex [8]; myVertices : Vertex from TopoDS [8];
-- 0 : xmin ymin zmin -- 0 : xmin ymin zmin
-- 1 : xmax ymin zmin -- 1 : xmax ymin zmin
-- 2 : xmin ymax zmin -- 2 : xmin ymax zmin
@ -262,7 +263,7 @@ fields
-- 7 : xmax ymax zmax -- 7 : xmax ymax zmax
VerticesBuilt : Boolean [8]; VerticesBuilt : Boolean [8];
myEdges : TheEdge [12]; myEdges : Edge from TopoDS [12];
-- 0 : xmin ymin -- 0 : xmin ymin
-- 1 : xmax ymin -- 1 : xmax ymin
-- 2 : xmin ymax -- 2 : xmin ymax
@ -277,7 +278,7 @@ fields
-- 11 : zmax xmax -- 11 : zmax xmax
EdgesBuilt : Boolean [12]; EdgesBuilt : Boolean [12];
myWires : TheWire [6]; myWires : Wire from TopoDS [6];
-- 0 : xmin -- 0 : xmin
-- 1 : xmax -- 1 : xmax
-- 2 : ymin -- 2 : ymin
@ -286,7 +287,7 @@ fields
-- 5 : zmax -- 5 : zmax
WiresBuilt : Boolean [6]; WiresBuilt : Boolean [6];
myFaces : TheFace [6]; myFaces : Face from TopoDS [6];
-- 0 : xmin -- 0 : xmin
-- 1 : xmax -- 1 : xmax
-- 2 : ymin -- 2 : ymin
@ -303,4 +304,4 @@ fields
-- 4 : zmin -- 4 : zmin
-- 5 : zmax -- 5 : zmax
end Wedge; end GWedge;

View File

@ -14,6 +14,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <BRepPrim_GWedge.ixx>
#include <Precision.hxx> #include <Precision.hxx>
#include <gp_Vec.hxx> #include <gp_Vec.hxx>
#include <gp_Pln.hxx> #include <gp_Pln.hxx>
@ -21,6 +23,14 @@
#include <ElSLib.hxx> #include <ElSLib.hxx>
#include <ElCLib.hxx> #include <ElCLib.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRepPrim_Builder.hxx>
#include <BRepPrim_Direction.hxx>
#include <Standard_DomainError.hxx> #include <Standard_DomainError.hxx>
#include <Standard_OutOfRange.hxx> #include <Standard_OutOfRange.hxx>
@ -45,41 +55,41 @@ static const Standard_Integer tab[6][6] = {{-1,-1, 0, 1, 8, 9},
{ 9,11, 5, 7,-1,-1}}; { 9,11, 5, 7,-1,-1}};
//======================================================================= //=======================================================================
//function : Primitives_Wedge_NumDir1 //function : BRepPrim_Wedge_NumDir1
//purpose : when giving a direction return the range of the face //purpose : when giving a direction return the range of the face
//======================================================================= //=======================================================================
static Standard_Integer Primitives_Wedge_NumDir1 static Standard_Integer BRepPrim_Wedge_NumDir1
(const Primitives_Direction d1) { return num[d1]; } (const BRepPrim_Direction d1) { return num[d1]; }
//======================================================================= //=======================================================================
//function : Primitives_Wedge_NumDir2 //function : BRepPrim_Wedge_NumDir2
//purpose : when giving two directions return the range of the edge //purpose : when giving two directions return the range of the edge
//======================================================================= //=======================================================================
static Standard_Integer Primitives_Wedge_NumDir2 static Standard_Integer BRepPrim_Wedge_NumDir2
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2) const BRepPrim_Direction d2)
{ {
Standard_Integer i1 = Primitives_Wedge_NumDir1(d1); Standard_Integer i1 = BRepPrim_Wedge_NumDir1(d1);
Standard_Integer i2 = Primitives_Wedge_NumDir1(d2); Standard_Integer i2 = BRepPrim_Wedge_NumDir1(d2);
if ( i1/2 == i2/2 ) Standard_DomainError::Raise(); if ( i1/2 == i2/2 ) Standard_DomainError::Raise();
return tab[i1][i2]; return tab[i1][i2];
} }
//======================================================================= //=======================================================================
//function : Primitives_Wedge_NumDir3 //function : BRepPrim_Wedge_NumDir3
//purpose : when giving three directions return the range of the vertex //purpose : when giving three directions return the range of the vertex
//======================================================================= //=======================================================================
static Standard_Integer Primitives_Wedge_NumDir3 static Standard_Integer BRepPrim_Wedge_NumDir3
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2, const BRepPrim_Direction d2,
const Primitives_Direction d3) const BRepPrim_Direction d3)
{ {
Standard_Integer i1 = Primitives_Wedge_NumDir1(d1); Standard_Integer i1 = BRepPrim_Wedge_NumDir1(d1);
Standard_Integer i2 = Primitives_Wedge_NumDir1(d2); Standard_Integer i2 = BRepPrim_Wedge_NumDir1(d2);
Standard_Integer i3 = Primitives_Wedge_NumDir1(d3); Standard_Integer i3 = BRepPrim_Wedge_NumDir1(d3);
if (( i1/2 == i2/2 ) || if (( i1/2 == i2/2 ) ||
( i2/2 == i3/2 ) || ( i2/2 == i3/2 ) ||
( i3/2 == i1/2 )) Standard_DomainError::Raise(); ( i3/2 == i1/2 )) Standard_DomainError::Raise();
@ -87,11 +97,11 @@ static Standard_Integer Primitives_Wedge_NumDir3
} }
//======================================================================= //=======================================================================
//function : Primitives_Wedge_Check //function : BRepPrim_Wedge_Check
//purpose : raise Standard_DomainError if something was built //purpose : raise Standard_DomainError if something was built
//======================================================================= //=======================================================================
static void Primitives_Wedge_Check(const Standard_Boolean V[], static void BRepPrim_Wedge_Check(const Standard_Boolean V[],
const Standard_Boolean E[], const Standard_Boolean E[],
const Standard_Boolean W[], const Standard_Boolean W[],
const Standard_Boolean F[]) const Standard_Boolean F[])
@ -108,11 +118,11 @@ static void Primitives_Wedge_Check(const Standard_Boolean V[],
} }
//======================================================================= //=======================================================================
//function : Primitives_Wedge_Init //function : BRepPrim_Wedge_Init
//purpose : Set arrays to Standard_False //purpose : Set arrays to Standard_False
//======================================================================= //=======================================================================
static void Primitives_Wedge_Init(Standard_Boolean& S, static void BRepPrim_Wedge_Init(Standard_Boolean& S,
Standard_Boolean V[], Standard_Boolean V[],
Standard_Boolean E[], Standard_Boolean E[],
Standard_Boolean W[], Standard_Boolean W[],
@ -131,11 +141,11 @@ static void Primitives_Wedge_Init(Standard_Boolean& S,
} }
//======================================================================= //=======================================================================
//function : Primitives_Wedge //function : BRepPrim_GWedge
//purpose : build a box //purpose : build a box
//======================================================================= //=======================================================================
Primitives_Wedge::Primitives_Wedge (const TheBuilder& B, BRepPrim_GWedge::BRepPrim_GWedge (const BRepPrim_Builder& B,
const gp_Ax2& Axes, const gp_Ax2& Axes,
const Standard_Real dx, const Standard_Real dx,
const Standard_Real dy, const Standard_Real dy,
@ -158,16 +168,16 @@ Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
( dy <= Precision::Confusion() ) || ( dy <= Precision::Confusion() ) ||
( dz <= Precision::Confusion() ) ) ( dz <= Precision::Confusion() ) )
Standard_DomainError::Raise(); Standard_DomainError::Raise();
Primitives_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt, BRepPrim_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt); WiresBuilt,FacesBuilt);
} }
//======================================================================= //=======================================================================
//function : Primitives_Wedge //function : BRepPrim_GWedge
//purpose : build a STEP wedge //purpose : build a STEP wedge
//======================================================================= //=======================================================================
Primitives_Wedge::Primitives_Wedge (const TheBuilder& B, BRepPrim_GWedge::BRepPrim_GWedge (const BRepPrim_Builder& B,
const gp_Ax2& Axes, const gp_Ax2& Axes,
const Standard_Real dx, const Standard_Real dx,
const Standard_Real dy, const Standard_Real dy,
@ -192,16 +202,16 @@ Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
( dz <= Precision::Confusion() ) || ( dz <= Precision::Confusion() ) ||
( ltx < 0 ) ) ( ltx < 0 ) )
Standard_DomainError::Raise(); Standard_DomainError::Raise();
Primitives_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt, BRepPrim_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt); WiresBuilt,FacesBuilt);
} }
//======================================================================= //=======================================================================
//function : Primitives_Wedge //function : BRepPrim_GWedge
//purpose : build a wedge by giving all the fields //purpose : build a wedge by giving all the fields
//======================================================================= //=======================================================================
Primitives_Wedge::Primitives_Wedge (const TheBuilder& B, BRepPrim_GWedge::BRepPrim_GWedge (const BRepPrim_Builder& B,
const gp_Ax2& Axes, const gp_Ax2& Axes,
const Standard_Real xmin, const Standard_Real xmin,
const Standard_Real ymin, const Standard_Real ymin,
@ -233,7 +243,7 @@ Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
( Z2Max-Z2Min < 0 ) || ( Z2Max-Z2Min < 0 ) ||
( X2Max-X2Min < 0 ) ) ( X2Max-X2Min < 0 ) )
Standard_DomainError::Raise(); Standard_DomainError::Raise();
Primitives_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt, BRepPrim_Wedge_Init(ShellBuilt,VerticesBuilt,EdgesBuilt,
WiresBuilt,FacesBuilt); WiresBuilt,FacesBuilt);
} }
@ -244,27 +254,27 @@ Primitives_Wedge::Primitives_Wedge (const TheBuilder& B,
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
gp_Ax2 Primitives_Wedge::Axes () const { return myAxes; } gp_Ax2 BRepPrim_GWedge::Axes () const { return myAxes; }
Standard_Real Primitives_Wedge::GetXMin () const { return XMin; } Standard_Real BRepPrim_GWedge::GetXMin () const { return XMin; }
Standard_Real Primitives_Wedge::GetYMin () const { return YMin; } Standard_Real BRepPrim_GWedge::GetYMin () const { return YMin; }
Standard_Real Primitives_Wedge::GetZMin () const { return ZMin; } Standard_Real BRepPrim_GWedge::GetZMin () const { return ZMin; }
Standard_Real Primitives_Wedge::GetZ2Min () const { return Z2Min; } Standard_Real BRepPrim_GWedge::GetZ2Min () const { return Z2Min; }
Standard_Real Primitives_Wedge::GetX2Min () const { return X2Min; } Standard_Real BRepPrim_GWedge::GetX2Min () const { return X2Min; }
Standard_Real Primitives_Wedge::GetXMax () const { return XMax; } Standard_Real BRepPrim_GWedge::GetXMax () const { return XMax; }
Standard_Real Primitives_Wedge::GetYMax () const { return YMax; } Standard_Real BRepPrim_GWedge::GetYMax () const { return YMax; }
Standard_Real Primitives_Wedge::GetZMax () const { return ZMax; } Standard_Real BRepPrim_GWedge::GetZMax () const { return ZMax; }
Standard_Real Primitives_Wedge::GetZ2Max () const { return Z2Max; } Standard_Real BRepPrim_GWedge::GetZ2Max () const { return Z2Max; }
Standard_Real Primitives_Wedge::GetX2Max () const { return X2Max; } Standard_Real BRepPrim_GWedge::GetX2Max () const { return X2Max; }
//======================================================================= //=======================================================================
//function : Open //function : Open
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
void Primitives_Wedge::Open (const Primitives_Direction d1) void BRepPrim_GWedge::Open (const BRepPrim_Direction d1)
{ {
Primitives_Wedge_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt); BRepPrim_Wedge_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
myInfinite[Primitives_Wedge_NumDir1(d1)] = Standard_True; myInfinite[BRepPrim_Wedge_NumDir1(d1)] = Standard_True;
} }
//======================================================================= //=======================================================================
@ -272,10 +282,10 @@ void Primitives_Wedge::Open (const Primitives_Direction d1)
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
void Primitives_Wedge::Close (const Primitives_Direction d1) void BRepPrim_GWedge::Close (const BRepPrim_Direction d1)
{ {
Primitives_Wedge_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt); BRepPrim_Wedge_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
myInfinite[Primitives_Wedge_NumDir1(d1)] = Standard_False; myInfinite[BRepPrim_Wedge_NumDir1(d1)] = Standard_False;
} }
//======================================================================= //=======================================================================
@ -283,30 +293,30 @@ void Primitives_Wedge::Close (const Primitives_Direction d1)
//purpose : true if it is open in the given direction //purpose : true if it is open in the given direction
//======================================================================= //=======================================================================
Standard_Boolean Primitives_Wedge::IsInfinite (const Primitives_Direction d1) const Standard_Boolean BRepPrim_GWedge::IsInfinite (const BRepPrim_Direction d1) const
{ return myInfinite[Primitives_Wedge_NumDir1(d1)]; } { return myInfinite[BRepPrim_Wedge_NumDir1(d1)]; }
//======================================================================= //=======================================================================
//function : Shell //function : Shell
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheShell& Primitives_Wedge::Shell() { const TopoDS_Shell& BRepPrim_GWedge::Shell() {
if (!ShellBuilt) { if (!ShellBuilt) {
myBuilder.MakeShell(myShell); myBuilder.MakeShell(myShell);
if (HasFace(Primitives_XMin)) if (HasFace(BRepPrim_XMin))
myBuilder.AddShellFace(myShell,Face(Primitives_XMin)); myBuilder.AddShellFace(myShell,Face(BRepPrim_XMin));
if (HasFace(Primitives_XMax)) if (HasFace(BRepPrim_XMax))
myBuilder.AddShellFace(myShell,Face(Primitives_XMax)); myBuilder.AddShellFace(myShell,Face(BRepPrim_XMax));
if (HasFace(Primitives_YMin)) if (HasFace(BRepPrim_YMin))
myBuilder.AddShellFace(myShell,Face(Primitives_YMin)); myBuilder.AddShellFace(myShell,Face(BRepPrim_YMin));
if (HasFace(Primitives_YMax)) if (HasFace(BRepPrim_YMax))
myBuilder.AddShellFace(myShell,Face(Primitives_YMax)); myBuilder.AddShellFace(myShell,Face(BRepPrim_YMax));
if (HasFace(Primitives_ZMin)) if (HasFace(BRepPrim_ZMin))
myBuilder.AddShellFace(myShell,Face(Primitives_ZMin)); myBuilder.AddShellFace(myShell,Face(BRepPrim_ZMin));
if (HasFace(Primitives_ZMax)) if (HasFace(BRepPrim_ZMax))
myBuilder.AddShellFace(myShell,Face(Primitives_ZMax)); myBuilder.AddShellFace(myShell,Face(BRepPrim_ZMax));
myBuilder.CompleteShell(myShell); myBuilder.CompleteShell(myShell);
ShellBuilt = Standard_True; ShellBuilt = Standard_True;
@ -319,10 +329,10 @@ const TheShell& Primitives_Wedge::Shell() {
//purpose : true if the face exist in one direction //purpose : true if the face exist in one direction
//======================================================================= //=======================================================================
Standard_Boolean Primitives_Wedge::HasFace (const Primitives_Direction d1) const Standard_Boolean BRepPrim_GWedge::HasFace (const BRepPrim_Direction d1) const
{ {
Standard_Boolean state = !myInfinite[Primitives_Wedge_NumDir1(d1)]; Standard_Boolean state = !myInfinite[BRepPrim_Wedge_NumDir1(d1)];
if ( d1 == Primitives_YMax ) state = state && ( Z2Max != Z2Min ) if ( d1 == BRepPrim_YMax ) state = state && ( Z2Max != Z2Min )
&& ( X2Max != X2Min ); && ( X2Max != X2Min );
return state; return state;
} }
@ -332,10 +342,10 @@ Standard_Boolean Primitives_Wedge::HasFace (const Primitives_Direction d1) const
//purpose : //purpose :
//======================================================================= //=======================================================================
gp_Pln Primitives_Wedge::Plane(const Primitives_Direction d1) gp_Pln BRepPrim_GWedge::Plane(const BRepPrim_Direction d1)
{ {
Standard_Integer i = Primitives_Wedge_NumDir1(d1); Standard_Integer i = BRepPrim_Wedge_NumDir1(d1);
gp_Dir D; gp_Dir D;
gp_Vec VX = myAxes.XDirection(); gp_Vec VX = myAxes.XDirection();
@ -422,11 +432,11 @@ gp_Pln Primitives_Wedge::Plane(const Primitives_Direction d1)
//purpose : the face in one direction //purpose : the face in one direction
//======================================================================= //=======================================================================
const TheFace& Primitives_Wedge::Face const TopoDS_Face& BRepPrim_GWedge::Face
(const Primitives_Direction d1) (const BRepPrim_Direction d1)
{ {
Standard_Integer i = Primitives_Wedge_NumDir1(d1); Standard_Integer i = BRepPrim_Wedge_NumDir1(d1);
if (!FacesBuilt[i]) { if (!FacesBuilt[i]) {
gp_Pln P = Plane(d1); gp_Pln P = Plane(d1);
@ -436,33 +446,33 @@ const TheFace& Primitives_Wedge::Face
// pcurves // pcurves
Primitives_Direction dd1 = Primitives_ZMin, dd2 = Primitives_YMax, BRepPrim_Direction dd1 = BRepPrim_ZMin, dd2 = BRepPrim_YMax,
dd3 = Primitives_ZMax,dd4 = Primitives_YMin; dd3 = BRepPrim_ZMax,dd4 = BRepPrim_YMin;
switch (i/2) { switch (i/2) {
case 0 : case 0 :
// XMin XMax // XMin XMax
dd1 = Primitives_ZMin; dd1 = BRepPrim_ZMin;
dd2 = Primitives_YMax; dd2 = BRepPrim_YMax;
dd3 = Primitives_ZMax; dd3 = BRepPrim_ZMax;
dd4 = Primitives_YMin; dd4 = BRepPrim_YMin;
break; break;
case 1 : case 1 :
// YMin YMax // YMin YMax
dd1 = Primitives_XMin; dd1 = BRepPrim_XMin;
dd2 = Primitives_ZMax; dd2 = BRepPrim_ZMax;
dd3 = Primitives_XMax; dd3 = BRepPrim_XMax;
dd4 = Primitives_ZMin; dd4 = BRepPrim_ZMin;
break; break;
case 2 : case 2 :
// ZMin ZMax // ZMin ZMax
dd1 = Primitives_YMin; dd1 = BRepPrim_YMin;
dd2 = Primitives_XMax; dd2 = BRepPrim_XMax;
dd3 = Primitives_YMax; dd3 = BRepPrim_YMax;
dd4 = Primitives_XMin; dd4 = BRepPrim_XMin;
break; break;
}; };
@ -476,7 +486,7 @@ const TheFace& Primitives_Wedge::Face
ElSLib::Parameters(P,L.Location(),U,V); ElSLib::Parameters(P,L.Location(),U,V);
DU = L.Direction() * DX; DU = L.Direction() * DX;
DV = L.Direction() * DY; DV = L.Direction() * DY;
myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd4)], myBuilder.SetPCurve(myEdges[BRepPrim_Wedge_NumDir2(d1,dd4)],
myFaces[i], myFaces[i],
gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV))); gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
} }
@ -485,7 +495,7 @@ const TheFace& Primitives_Wedge::Face
ElSLib::Parameters(P,L.Location(),U,V); ElSLib::Parameters(P,L.Location(),U,V);
DU = L.Direction() * DX; DU = L.Direction() * DX;
DV = L.Direction() * DY; DV = L.Direction() * DY;
myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd3)], myBuilder.SetPCurve(myEdges[BRepPrim_Wedge_NumDir2(d1,dd3)],
myFaces[i], myFaces[i],
gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV))); gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
} }
@ -495,7 +505,7 @@ const TheFace& Primitives_Wedge::Face
ElSLib::Parameters(P,L.Location(),U,V); ElSLib::Parameters(P,L.Location(),U,V);
DU = L.Direction() * DX; DU = L.Direction() * DX;
DV = L.Direction() * DY; DV = L.Direction() * DY;
myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd2)], myBuilder.SetPCurve(myEdges[BRepPrim_Wedge_NumDir2(d1,dd2)],
myFaces[i], myFaces[i],
gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV))); gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
} }
@ -505,7 +515,7 @@ const TheFace& Primitives_Wedge::Face
ElSLib::Parameters(P,L.Location(),U,V); ElSLib::Parameters(P,L.Location(),U,V);
DU = L.Direction() * DX; DU = L.Direction() * DX;
DV = L.Direction() * DY; DV = L.Direction() * DY;
myBuilder.SetPCurve(myEdges[Primitives_Wedge_NumDir2(d1,dd1)], myBuilder.SetPCurve(myEdges[BRepPrim_Wedge_NumDir2(d1,dd1)],
myFaces[i], myFaces[i],
gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV))); gp_Lin2d(gp_Pnt2d(U,V),gp_Dir2d(DU,DV)));
} }
@ -524,37 +534,37 @@ const TheFace& Primitives_Wedge::Face
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
Standard_Boolean Primitives_Wedge::HasWire (const Primitives_Direction d1) const Standard_Boolean BRepPrim_GWedge::HasWire (const BRepPrim_Direction d1) const
{ {
Standard_Integer i = Primitives_Wedge_NumDir1(d1); Standard_Integer i = BRepPrim_Wedge_NumDir1(d1);
if (myInfinite[i]) return Standard_False; if (myInfinite[i]) return Standard_False;
Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin; BRepPrim_Direction dd1 = BRepPrim_XMin,dd2 = BRepPrim_YMax,dd3 = BRepPrim_XMax ,dd4 = BRepPrim_ZMin;
switch (i/2) { switch (i/2) {
case 0 : case 0 :
// XMin XMax // XMin XMax
dd1 = Primitives_ZMin; dd1 = BRepPrim_ZMin;
dd2 = Primitives_YMax; dd2 = BRepPrim_YMax;
dd3 = Primitives_ZMax; dd3 = BRepPrim_ZMax;
dd4 = Primitives_YMin; dd4 = BRepPrim_YMin;
break; break;
case 1 : case 1 :
// YMin YMax // YMin YMax
dd1 = Primitives_XMin; dd1 = BRepPrim_XMin;
dd2 = Primitives_ZMax; dd2 = BRepPrim_ZMax;
dd3 = Primitives_XMax; dd3 = BRepPrim_XMax;
dd4 = Primitives_ZMin; dd4 = BRepPrim_ZMin;
break; break;
case 2 : case 2 :
// ZMin ZMax // ZMin ZMax
dd1 = Primitives_YMin; dd1 = BRepPrim_YMin;
dd2 = Primitives_XMax; dd2 = BRepPrim_XMax;
dd3 = Primitives_YMax; dd3 = BRepPrim_YMax;
dd4 = Primitives_XMin; dd4 = BRepPrim_XMin;
break; break;
#ifndef DEB #ifndef DEB
default: default:
@ -571,12 +581,12 @@ Standard_Boolean Primitives_Wedge::HasWire (const Primitives_Direction d1) const
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
const TheWire& Primitives_Wedge::Wire const TopoDS_Wire& BRepPrim_GWedge::Wire
(const Primitives_Direction d1) (const BRepPrim_Direction d1)
{ {
Standard_Integer i = Primitives_Wedge_NumDir1(d1); Standard_Integer i = BRepPrim_Wedge_NumDir1(d1);
Primitives_Direction dd1 = Primitives_XMin,dd2 = Primitives_YMax,dd3 = Primitives_XMax ,dd4 = Primitives_ZMin; BRepPrim_Direction dd1 = BRepPrim_XMin,dd2 = BRepPrim_YMax,dd3 = BRepPrim_XMax ,dd4 = BRepPrim_ZMin;
if (!WiresBuilt[i]) { if (!WiresBuilt[i]) {
@ -584,26 +594,26 @@ const TheWire& Primitives_Wedge::Wire
case 0 : case 0 :
// XMin XMax // XMin XMax
dd1 = Primitives_ZMin; dd1 = BRepPrim_ZMin;
dd2 = Primitives_YMax; dd2 = BRepPrim_YMax;
dd3 = Primitives_ZMax; dd3 = BRepPrim_ZMax;
dd4 = Primitives_YMin; dd4 = BRepPrim_YMin;
break; break;
case 1 : case 1 :
// YMin YMax // YMin YMax
dd1 = Primitives_XMin; dd1 = BRepPrim_XMin;
dd2 = Primitives_ZMax; dd2 = BRepPrim_ZMax;
dd3 = Primitives_XMax; dd3 = BRepPrim_XMax;
dd4 = Primitives_ZMin; dd4 = BRepPrim_ZMin;
break; break;
case 2 : case 2 :
// ZMin ZMax // ZMin ZMax
dd1 = Primitives_YMin; dd1 = BRepPrim_YMin;
dd2 = Primitives_XMax; dd2 = BRepPrim_XMax;
dd3 = Primitives_YMax; dd3 = BRepPrim_YMax;
dd4 = Primitives_XMin; dd4 = BRepPrim_XMin;
break; break;
default: default:
break; break;
@ -633,12 +643,12 @@ const TheWire& Primitives_Wedge::Wire
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
Standard_Boolean Primitives_Wedge::HasEdge (const Primitives_Direction d1, Standard_Boolean BRepPrim_GWedge::HasEdge (const BRepPrim_Direction d1,
const Primitives_Direction d2) const const BRepPrim_Direction d2) const
{ {
Standard_Boolean state = !(myInfinite[Primitives_Wedge_NumDir1(d1)] || Standard_Boolean state = !(myInfinite[BRepPrim_Wedge_NumDir1(d1)] ||
myInfinite[Primitives_Wedge_NumDir1(d2)]); myInfinite[BRepPrim_Wedge_NumDir1(d2)]);
Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2); Standard_Integer i = BRepPrim_Wedge_NumDir2(d1,d2);
if ( i == 6 || i == 7 ) state = state && ( X2Max != X2Min ); if ( i == 6 || i == 7 ) state = state && ( X2Max != X2Min );
else if ( i == 1 || i == 3 ) state = state && ( Z2Max != Z2Min ); else if ( i == 1 || i == 3 ) state = state && ( Z2Max != Z2Min );
return state; return state;
@ -649,13 +659,13 @@ Standard_Boolean Primitives_Wedge::HasEdge (const Primitives_Direction d1,
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
gp_Lin Primitives_Wedge::Line gp_Lin BRepPrim_GWedge::Line
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2) const BRepPrim_Direction d2)
{ {
if (!HasEdge(d1,d2)) Standard_DomainError::Raise(); if (!HasEdge(d1,d2)) Standard_DomainError::Raise();
Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2); Standard_Integer i = BRepPrim_Wedge_NumDir2(d1,d2);
Standard_Real X =0., Y =0., Z =0.; Standard_Real X =0., Y =0., Z =0.;
@ -790,33 +800,33 @@ gp_Lin Primitives_Wedge::Line
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
const TheEdge& Primitives_Wedge::Edge const TopoDS_Edge& BRepPrim_GWedge::Edge
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2) const BRepPrim_Direction d2)
{ {
if (!HasEdge(d1,d2)) Standard_DomainError::Raise(); if (!HasEdge(d1,d2)) Standard_DomainError::Raise();
Standard_Integer i = Primitives_Wedge_NumDir2(d1,d2); Standard_Integer i = BRepPrim_Wedge_NumDir2(d1,d2);
if (!EdgesBuilt[i]) { if (!EdgesBuilt[i]) {
Primitives_Direction dd1 = Primitives_XMin ,dd2 = Primitives_XMax; BRepPrim_Direction dd1 = BRepPrim_XMin ,dd2 = BRepPrim_XMax;
switch (i/4) { switch (i/4) {
case 0 : case 0 :
dd1 = Primitives_ZMin; dd1 = BRepPrim_ZMin;
dd2 = Primitives_ZMax; dd2 = BRepPrim_ZMax;
break; break;
case 1 : case 1 :
dd1 = Primitives_XMin; dd1 = BRepPrim_XMin;
dd2 = Primitives_XMax; dd2 = BRepPrim_XMax;
break; break;
case 2 : case 2 :
dd1 = Primitives_YMin; dd1 = BRepPrim_YMin;
dd2 = Primitives_YMax; dd2 = BRepPrim_YMax;
break; break;
default: default:
@ -871,27 +881,27 @@ const TheEdge& Primitives_Wedge::Edge
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
Standard_Boolean Primitives_Wedge::HasVertex Standard_Boolean BRepPrim_GWedge::HasVertex
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2, const BRepPrim_Direction d2,
const Primitives_Direction d3) const const BRepPrim_Direction d3) const
{ return !(myInfinite[Primitives_Wedge_NumDir1(d1)] || { return !(myInfinite[BRepPrim_Wedge_NumDir1(d1)] ||
myInfinite[Primitives_Wedge_NumDir1(d2)] || myInfinite[BRepPrim_Wedge_NumDir1(d2)] ||
myInfinite[Primitives_Wedge_NumDir1(d3)]); } myInfinite[BRepPrim_Wedge_NumDir1(d3)]); }
//======================================================================= //=======================================================================
//function : Point //function : Point
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
gp_Pnt Primitives_Wedge::Point gp_Pnt BRepPrim_GWedge::Point
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2, const BRepPrim_Direction d2,
const Primitives_Direction d3) const BRepPrim_Direction d3)
{ {
if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise(); if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise();
Standard_Integer i = Primitives_Wedge_NumDir3(d1,d2,d3); Standard_Integer i = BRepPrim_Wedge_NumDir3(d1,d2,d3);
Standard_Real X =0., Y =0., Z =0.; Standard_Real X =0., Y =0., Z =0.;
@ -959,14 +969,14 @@ gp_Pnt Primitives_Wedge::Point
//purpose : trivial //purpose : trivial
//======================================================================= //=======================================================================
const TheVertex& Primitives_Wedge::Vertex const TopoDS_Vertex& BRepPrim_GWedge::Vertex
(const Primitives_Direction d1, (const BRepPrim_Direction d1,
const Primitives_Direction d2, const BRepPrim_Direction d2,
const Primitives_Direction d3) const BRepPrim_Direction d3)
{ {
if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise(); if (!HasVertex(d1,d2,d3)) Standard_DomainError::Raise();
Standard_Integer i = Primitives_Wedge_NumDir3(d1,d2,d3); Standard_Integer i = BRepPrim_Wedge_NumDir3(d1,d2,d3);
if (!VerticesBuilt[i]) { if (!VerticesBuilt[i]) {

View File

@ -14,13 +14,7 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
deferred generic class OneAxis from Primitives( deferred class OneAxis from BRepPrim
TheShell as any;
TheFace as any;
TheWire as any;
TheEdge as any;
TheVertex as any;
TheBuilder as any)
---Purpose: Algorithm to build primitives with one axis of ---Purpose: Algorithm to build primitives with one axis of
-- revolution. -- revolution.
@ -59,8 +53,14 @@ deferred generic class OneAxis from Primitives(
uses uses
Ax2 from gp, Ax2 from gp,
Pnt2d from gp Pnt2d from gp,
Shell from TopoDS,
Face from TopoDS,
Wire from TopoDS,
Edge from TopoDS,
Vertex from TopoDS,
Builder from BRepPrim
raises raises
DomainError, DomainError,
@ -70,7 +70,7 @@ is
Delete(me:out) is virtual ; Delete(me:out) is virtual ;
---C++: alias ~ ---C++: alias ~
Initialize(B : TheBuilder; Initialize(B : Builder from BRepPrim;
A : Ax2 from gp; A : Ax2 from gp;
VMin, VMax : Real from Standard); VMin, VMax : Real from Standard);
---Purpose: Creates a OneAxis algorithm. <B> is used to build ---Purpose: Creates a OneAxis algorithm. <B> is used to build
@ -120,7 +120,7 @@ is
-- They should be redefined in inherited classes -- They should be redefined in inherited classes
-- --
MakeEmptyLateralFace(me) returns TheFace MakeEmptyLateralFace(me) returns Face from TopoDS
---Purpose: Returns a face with no edges. The surface is the ---Purpose: Returns a face with no edges. The surface is the
-- lateral surface with normals pointing outward. The -- lateral surface with normals pointing outward. The
-- U parameter is the angle with the origin on the X -- U parameter is the angle with the origin on the X
@ -128,13 +128,13 @@ is
-- meridian. -- meridian.
is deferred; is deferred;
MakeEmptyMeridianEdge(me; Ang : Real) returns TheEdge MakeEmptyMeridianEdge(me; Ang : Real) returns Edge from TopoDS
---Purpose: Returns an edge with a 3D curve made from the ---Purpose: Returns an edge with a 3D curve made from the
-- meridian in the XZ plane rotated by <Ang> around -- meridian in the XZ plane rotated by <Ang> around
-- the Z-axis. Ang may be 0 or myAngle. -- the Z-axis. Ang may be 0 or myAngle.
is deferred; is deferred;
SetMeridianPCurve(me; E : in out TheEdge; F : TheFace) SetMeridianPCurve(me; E : in out Edge from TopoDS; F : Face from TopoDS)
---Purpose: Sets the parametric curve of the edge <E> in the ---Purpose: Sets the parametric curve of the edge <E> in the
-- face <F> to be the 2d representation of the -- face <F> to be the 2d representation of the
-- meridian. -- meridian.
@ -199,7 +199,7 @@ is
-- --
-- the shell -- the shell
Shell(me : in out) returns TheShell Shell(me : in out) returns Shell from TopoDS
---Purpose: Returns the Shell containing all the Faces of the ---Purpose: Returns the Shell containing all the Faces of the
-- primitive. -- primitive.
-- --
@ -208,14 +208,14 @@ is
-- the Faces -- the Faces
LateralFace(me : in out) returns TheFace LateralFace(me : in out) returns Face from TopoDS
---Purpose: Returns the lateral Face. It is oriented toward ---Purpose: Returns the lateral Face. It is oriented toward
-- the outside of the primitive. -- the outside of the primitive.
-- --
---C++: return const & ---C++: return const &
is static; is static;
TopFace(me : in out) returns TheFace TopFace(me : in out) returns Face from TopoDS
---Purpose: Returns the top planar Face. It is Oriented ---Purpose: Returns the top planar Face. It is Oriented
-- toward the +Z axis (outside). -- toward the +Z axis (outside).
-- --
@ -223,7 +223,7 @@ is
raises DomainError -- if !HasTop() raises DomainError -- if !HasTop()
is static; is static;
BottomFace(me : in out) returns TheFace BottomFace(me : in out) returns Face from TopoDS
---Purpose: Returns the Bottom planar Face. It is Oriented ---Purpose: Returns the Bottom planar Face. It is Oriented
-- toward the -Z axis (outside). -- toward the -Z axis (outside).
-- --
@ -231,7 +231,7 @@ is
raises DomainError -- if !HasBottom() raises DomainError -- if !HasBottom()
is static; is static;
StartFace(me : in out) returns TheFace StartFace(me : in out) returns Face from TopoDS
---Purpose: Returns the Face starting the slice, it is ---Purpose: Returns the Face starting the slice, it is
-- oriented toward the exterior of the primitive. -- oriented toward the exterior of the primitive.
-- --
@ -239,7 +239,7 @@ is
raises DomainError -- if !HasSides() raises DomainError -- if !HasSides()
is static; is static;
EndFace(me : in out) returns TheFace EndFace(me : in out) returns Face from TopoDS
---Purpose: Returns the Face ending the slice, it is oriented ---Purpose: Returns the Face ending the slice, it is oriented
-- toward the exterior of the primitive. -- toward the exterior of the primitive.
-- --
@ -249,14 +249,14 @@ is
-- Wires -- Wires
LateralWire(me : in out) returns TheWire LateralWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire in the lateral face. ---Purpose: Returns the wire in the lateral face.
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if VMinInfinite() && VMaxInfinite() raises DomainError -- if VMinInfinite() && VMaxInfinite()
is static; is static;
LateralStartWire(me : in out) returns TheWire LateralStartWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire in the lateral face with the ---Purpose: Returns the wire in the lateral face with the
-- start edge. -- start edge.
-- --
@ -264,7 +264,7 @@ is
raises DomainError -- if ! (VMinInfinite() && VMaxInfinite()) raises DomainError -- if ! (VMinInfinite() && VMaxInfinite())
is static; is static;
LateralEndWire(me : in out) returns TheWire LateralEndWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire with in lateral face with the end ---Purpose: Returns the wire with in lateral face with the end
-- edge. -- edge.
-- --
@ -272,28 +272,28 @@ is
raises DomainError -- if ! (VMinInfinite() && VMaxInfinite()) raises DomainError -- if ! (VMinInfinite() && VMaxInfinite())
is static; is static;
TopWire(me : in out) returns TheWire TopWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire in the top face. ---Purpose: Returns the wire in the top face.
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if !HasTop() raises DomainError -- if !HasTop()
is static; is static;
BottomWire(me : in out) returns TheWire BottomWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire in the bottom face. ---Purpose: Returns the wire in the bottom face.
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if !HasBottom() raises DomainError -- if !HasBottom()
is static; is static;
StartWire(me : in out) returns TheWire StartWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire in the start face. ---Purpose: Returns the wire in the start face.
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if !HasSides() raises DomainError -- if !HasSides()
is static; is static;
AxisStartWire(me : in out) returns TheWire AxisStartWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the wire in the start face with the ---Purpose: Returns the wire in the start face with the
-- AxisEdge. -- AxisEdge.
-- --
@ -301,14 +301,14 @@ is
raises DomainError -- if !HasSides() ! (VMinInfinite() && VMaxInfinite()) raises DomainError -- if !HasSides() ! (VMinInfinite() && VMaxInfinite())
is static; is static;
EndWire(me : in out) returns TheWire EndWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the Wire in the end face. ---Purpose: Returns the Wire in the end face.
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if !HasSides() raises DomainError -- if !HasSides()
is static; is static;
AxisEndWire(me : in out) returns TheWire AxisEndWire(me : in out) returns Wire from TopoDS
---Purpose: Returns the Wire in the end face with the ---Purpose: Returns the Wire in the end face with the
-- AxisEdge. -- AxisEdge.
-- --
@ -319,7 +319,7 @@ is
-- Edges -- Edges
AxisEdge(me : in out) returns TheEdge AxisEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the Edge built along the Axis and oriented ---Purpose: Returns the Edge built along the Axis and oriented
-- on +Z of the Axis. -- on +Z of the Axis.
-- --
@ -327,20 +327,20 @@ is
raises DomainError -- if ! (MeridianOnAxis(VMin) || MeridianOnAxis(VMax)) raises DomainError -- if ! (MeridianOnAxis(VMin) || MeridianOnAxis(VMax))
is static; is static;
StartEdge(me : in out) returns TheEdge StartEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the Edge at angle 0. ---Purpose: Returns the Edge at angle 0.
-- --
---C++: return const & ---C++: return const &
is static; is static;
EndEdge(me : in out) returns TheEdge EndEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the Edge at angle Angle. If !HasSides() ---Purpose: Returns the Edge at angle Angle. If !HasSides()
-- the StartEdge and the EndEdge are the same edge. -- the StartEdge and the EndEdge are the same edge.
-- --
---C++: return const & ---C++: return const &
is static; is static;
StartTopEdge(me : in out) returns TheEdge StartTopEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the linear Edge between start Face and top ---Purpose: Returns the linear Edge between start Face and top
-- Face. -- Face.
-- --
@ -348,7 +348,7 @@ is
raises DomainError -- if ! (HasTop() && HasSides()) raises DomainError -- if ! (HasTop() && HasSides())
is static; is static;
StartBottomEdge(me : in out) returns TheEdge StartBottomEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the linear Edge between start Face and ---Purpose: Returns the linear Edge between start Face and
-- bottom Face. -- bottom Face.
-- --
@ -356,7 +356,7 @@ is
raises DomainError -- if ! (HasBottom() && HasSides()) raises DomainError -- if ! (HasBottom() && HasSides())
is static; is static;
EndTopEdge(me : in out) returns TheEdge EndTopEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the linear Edge between end Face and top ---Purpose: Returns the linear Edge between end Face and top
-- Face. -- Face.
-- --
@ -364,7 +364,7 @@ is
raises DomainError -- if ! (HasTop() && HasSides()) raises DomainError -- if ! (HasTop() && HasSides())
is static; is static;
EndBottomEdge(me : in out) returns TheEdge EndBottomEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the linear Edge between end Face and ---Purpose: Returns the linear Edge between end Face and
-- bottom Face. -- bottom Face.
-- --
@ -372,7 +372,7 @@ is
raises DomainError -- if ! (HasBottom() && HasSides()) raises DomainError -- if ! (HasBottom() && HasSides())
is static; is static;
TopEdge(me : in out) returns TheEdge TopEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the edge at VMax. If MeridianClosed() the ---Purpose: Returns the edge at VMax. If MeridianClosed() the
-- TopEdge and the BottomEdge are the same edge. -- TopEdge and the BottomEdge are the same edge.
-- --
@ -380,7 +380,7 @@ is
raises DomainError -- if VMaxInfinite() raises DomainError -- if VMaxInfinite()
is static; is static;
BottomEdge(me : in out) returns TheEdge BottomEdge(me : in out) returns Edge from TopoDS
---Purpose: Returns the edge at VMin. If MeridianClosed() the ---Purpose: Returns the edge at VMin. If MeridianClosed() the
-- TopEdge and the BottomEdge are the same edge. -- TopEdge and the BottomEdge are the same edge.
-- --
@ -390,14 +390,14 @@ is
-- Vertices -- Vertices
AxisTopVertex(me : in out) returns TheVertex AxisTopVertex(me : in out) returns Vertex from TopoDS
---Purpose: Returns the Vertex at the Top altitude on the axis. ---Purpose: Returns the Vertex at the Top altitude on the axis.
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if !MeridianOnAxis(VMax) raises DomainError -- if !MeridianOnAxis(VMax)
is static; is static;
AxisBottomVertex(me : in out) returns TheVertex AxisBottomVertex(me : in out) returns Vertex from TopoDS
---Purpose: Returns the Vertex at the Bottom altitude on the ---Purpose: Returns the Vertex at the Bottom altitude on the
-- axis. -- axis.
-- --
@ -405,28 +405,28 @@ is
raises DomainError -- if !MeridianOnAxis(VMin) raises DomainError -- if !MeridianOnAxis(VMin)
is static; is static;
TopStartVertex(me : in out) returns TheVertex TopStartVertex(me : in out) returns Vertex from TopoDS
---Purpose: Returns the vertex (0,VMax) ---Purpose: Returns the vertex (0,VMax)
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if VMaxInfinite() raises DomainError -- if VMaxInfinite()
is static; is static;
TopEndVertex(me : in out) returns TheVertex TopEndVertex(me : in out) returns Vertex from TopoDS
---Purpose: Returns the vertex (angle,VMax) ---Purpose: Returns the vertex (angle,VMax)
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if VMaxInfinite() raises DomainError -- if VMaxInfinite()
is static; is static;
BottomStartVertex(me : in out) returns TheVertex BottomStartVertex(me : in out) returns Vertex from TopoDS
---Purpose: Returns the vertex (0,VMin) ---Purpose: Returns the vertex (0,VMin)
-- --
---C++: return const & ---C++: return const &
raises DomainError -- if VMinInfinite() raises DomainError -- if VMinInfinite()
is static; is static;
BottomEndVertex(me : in out) returns TheVertex BottomEndVertex(me : in out) returns Vertex from TopoDS
---Purpose: Returns the vertex (angle,VMax) ---Purpose: Returns the vertex (angle,VMax)
-- --
---C++: return const & ---C++: return const &
@ -434,7 +434,7 @@ is
is static; is static;
fields fields
myBuilder : TheBuilder is protected; myBuilder : Builder from BRepPrim is protected;
myAxes : Ax2 from gp; myAxes : Ax2 from gp;
myAngle : Real from Standard; myAngle : Real from Standard;
@ -444,10 +444,10 @@ fields
-- the Topology -- the Topology
myShell : TheShell; myShell : Shell from TopoDS;
ShellBuilt : Boolean; ShellBuilt : Boolean;
myVertices : TheVertex [6]; myVertices : Vertex from TopoDS [6];
-- 0 : Vertex on top of the axis -- 0 : Vertex on top of the axis
-- 1 : on bottom of the axis -- 1 : on bottom of the axis
-- 2 : top, start -- 2 : top, start
@ -456,7 +456,7 @@ fields
-- 5 : bottom, end -- 5 : bottom, end
VerticesBuilt : Boolean [6]; VerticesBuilt : Boolean [6];
myEdges : TheEdge [9]; myEdges : Edge from TopoDS [9];
-- 0 : Edge on the Axis -- 0 : Edge on the Axis
-- 1 : Start Edge -- 1 : Start Edge
-- 2 : End Edge -- 2 : End Edge
@ -468,7 +468,7 @@ fields
-- 8 : Bottom -- 8 : Bottom
EdgesBuilt : Boolean [9]; EdgesBuilt : Boolean [9];
myWires : TheWire [9]; myWires : Wire from TopoDS [9];
-- 0 : wire Lateral -- 0 : wire Lateral
-- 1 : Lateral Start -- 1 : Lateral Start
-- 2 : Lateral End -- 2 : Lateral End
@ -480,7 +480,7 @@ fields
-- 8 : Axis End -- 8 : Axis End
WiresBuilt : Boolean [9]; WiresBuilt : Boolean [9];
myFaces : TheFace [5]; myFaces : Face from TopoDS [5];
-- 0 : Lateral Face -- 0 : Lateral Face
-- 1 : Top -- 1 : Top
-- 2 : Bottom -- 2 : Bottom

View File

@ -14,8 +14,18 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <BRepPrim_OneAxis.ixx>
#include <Precision.hxx> #include <Precision.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <BRepPrim_Builder.hxx>
#include <BRepPrim_Direction.hxx>
#include <gp_Pln.hxx> #include <gp_Pln.hxx>
#include <gp_Lin2d.hxx> #include <gp_Lin2d.hxx>
#include <gp_Circ2d.hxx> #include <gp_Circ2d.hxx>
@ -68,11 +78,11 @@
#define FEND 4 #define FEND 4
//======================================================================= //=======================================================================
//function : Primitives_OneAxis_Check //function : BRepPrim_OneAxis_Check
//purpose : raise Standard_DomainError if something was built //purpose : raise Standard_DomainError if something was built
//======================================================================= //=======================================================================
static void Primitives_OneAxis_Check(const Standard_Boolean V[], static void BRepPrim_OneAxis_Check(const Standard_Boolean V[],
const Standard_Boolean E[], const Standard_Boolean E[],
const Standard_Boolean W[], const Standard_Boolean W[],
const Standard_Boolean F[]) const Standard_Boolean F[])
@ -89,11 +99,11 @@ static void Primitives_OneAxis_Check(const Standard_Boolean V[],
} }
//======================================================================= //=======================================================================
//function : Primitives_OneAxis //function : BRepPrim_OneAxis
//purpose : //purpose :
//======================================================================= //=======================================================================
Primitives_OneAxis::Primitives_OneAxis(const TheBuilder& B, BRepPrim_OneAxis::BRepPrim_OneAxis(const BRepPrim_Builder& B,
const gp_Ax2& A, const gp_Ax2& A,
const Standard_Real VMin, const Standard_Real VMin,
const Standard_Real VMax) : const Standard_Real VMax) :
@ -119,7 +129,7 @@ Primitives_OneAxis::Primitives_OneAxis(const TheBuilder& B,
} }
void Primitives_OneAxis::Delete() void BRepPrim_OneAxis::Delete()
{} {}
//======================================================================= //=======================================================================
@ -127,7 +137,7 @@ void Primitives_OneAxis::Delete()
//purpose : //purpose :
//======================================================================= //=======================================================================
void Primitives_OneAxis::SetMeridianOffset(const Standard_Real O) void BRepPrim_OneAxis::SetMeridianOffset(const Standard_Real O)
{ {
myMeridianOffset = O; myMeridianOffset = O;
} }
@ -137,47 +147,47 @@ void Primitives_OneAxis::SetMeridianOffset(const Standard_Real O)
//purpose : //purpose :
//======================================================================= //=======================================================================
const gp_Ax2& Primitives_OneAxis::Axes () const const gp_Ax2& BRepPrim_OneAxis::Axes () const
{ {
return myAxes; return myAxes;
} }
void Primitives_OneAxis::Axes (const gp_Ax2& A) void BRepPrim_OneAxis::Axes (const gp_Ax2& A)
{ {
Primitives_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt); BRepPrim_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
myAxes = A; myAxes = A;
} }
Standard_Real Primitives_OneAxis::Angle () const Standard_Real BRepPrim_OneAxis::Angle () const
{ {
return myAngle; return myAngle;
} }
void Primitives_OneAxis::Angle (const Standard_Real A) void BRepPrim_OneAxis::Angle (const Standard_Real A)
{ {
Primitives_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt); BRepPrim_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
myAngle = A; myAngle = A;
} }
Standard_Real Primitives_OneAxis::VMin () const Standard_Real BRepPrim_OneAxis::VMin () const
{ {
return myVMin; return myVMin;
} }
void Primitives_OneAxis::VMin (const Standard_Real V) void BRepPrim_OneAxis::VMin (const Standard_Real V)
{ {
Primitives_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt); BRepPrim_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
myVMin = V; myVMin = V;
} }
Standard_Real Primitives_OneAxis::VMax () const Standard_Real BRepPrim_OneAxis::VMax () const
{ {
return myVMax; return myVMax;
} }
void Primitives_OneAxis::VMax (const Standard_Real V) void BRepPrim_OneAxis::VMax (const Standard_Real V)
{ {
Primitives_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt); BRepPrim_OneAxis_Check(VerticesBuilt,EdgesBuilt,WiresBuilt,FacesBuilt);
myVMax = V; myVMax = V;
} }
@ -186,7 +196,7 @@ void Primitives_OneAxis::VMax (const Standard_Real V)
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::MeridianOnAxis Standard_Boolean BRepPrim_OneAxis::MeridianOnAxis
(const Standard_Real V) const (const Standard_Real V) const
{ {
return Abs(MeridianValue(V).X()) < Precision::Confusion(); return Abs(MeridianValue(V).X()) < Precision::Confusion();
@ -197,7 +207,7 @@ Standard_Boolean Primitives_OneAxis::MeridianOnAxis
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::MeridianClosed() const Standard_Boolean BRepPrim_OneAxis::MeridianClosed() const
{ {
if (VMaxInfinite()) return Standard_False; if (VMaxInfinite()) return Standard_False;
if (VMinInfinite()) return Standard_False; if (VMinInfinite()) return Standard_False;
@ -210,7 +220,7 @@ Standard_Boolean Primitives_OneAxis::MeridianClosed() const
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::VMaxInfinite() const Standard_Boolean BRepPrim_OneAxis::VMaxInfinite() const
{ {
return Precision::IsPositiveInfinite(myVMax); return Precision::IsPositiveInfinite(myVMax);
} }
@ -220,7 +230,7 @@ Standard_Boolean Primitives_OneAxis::VMaxInfinite() const
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::VMinInfinite() const Standard_Boolean BRepPrim_OneAxis::VMinInfinite() const
{ {
return Precision::IsNegativeInfinite(myVMin); return Precision::IsNegativeInfinite(myVMin);
} }
@ -230,7 +240,7 @@ Standard_Boolean Primitives_OneAxis::VMinInfinite() const
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::HasTop() const Standard_Boolean BRepPrim_OneAxis::HasTop() const
{ {
if (VMaxInfinite()) return Standard_False; if (VMaxInfinite()) return Standard_False;
if (MeridianClosed()) return Standard_False; if (MeridianClosed()) return Standard_False;
@ -243,7 +253,7 @@ Standard_Boolean Primitives_OneAxis::HasTop() const
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::HasBottom() const Standard_Boolean BRepPrim_OneAxis::HasBottom() const
{ {
if (VMinInfinite()) return Standard_False; if (VMinInfinite()) return Standard_False;
if (MeridianClosed()) return Standard_False; if (MeridianClosed()) return Standard_False;
@ -256,7 +266,7 @@ Standard_Boolean Primitives_OneAxis::HasBottom() const
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Primitives_OneAxis::HasSides() const Standard_Boolean BRepPrim_OneAxis::HasSides() const
{ {
return 2*M_PI - myAngle > Precision::Angular(); return 2*M_PI - myAngle > Precision::Angular();
} }
@ -266,7 +276,7 @@ Standard_Boolean Primitives_OneAxis::HasSides() const
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheShell& Primitives_OneAxis::Shell() const TopoDS_Shell& BRepPrim_OneAxis::Shell()
{ {
if (!ShellBuilt) { if (!ShellBuilt) {
myBuilder.MakeShell(myShell); myBuilder.MakeShell(myShell);
@ -292,7 +302,7 @@ const TheShell& Primitives_OneAxis::Shell()
//purpose : build the lateral face //purpose : build the lateral face
//======================================================================= //=======================================================================
const TheFace& Primitives_OneAxis::LateralFace () const TopoDS_Face& BRepPrim_OneAxis::LateralFace ()
{ {
// do it if not done // do it if not done
if (!FacesBuilt[FLATERAL]) { if (!FacesBuilt[FLATERAL]) {
@ -365,13 +375,13 @@ const TheFace& Primitives_OneAxis::LateralFace ()
//purpose : build and return the TopFace //purpose : build and return the TopFace
//======================================================================= //=======================================================================
const TheFace& Primitives_OneAxis::TopFace () const TopoDS_Face& BRepPrim_OneAxis::TopFace ()
{ {
// do it if not done // do it if not done
if (!FacesBuilt[FTOP]) { if (!FacesBuilt[FTOP]) {
Standard_DomainError_Raise_if(!HasTop(), Standard_DomainError_Raise_if(!HasTop(),
"Primitives_OneAxis::TopFace:No top face"); "BRepPrim_OneAxis::TopFace:No top face");
// make the empty face by translating the axes // make the empty face by translating the axes
Standard_Real z = MeridianValue(myVMax).Y(); Standard_Real z = MeridianValue(myVMax).Y();
@ -405,13 +415,13 @@ const TheFace& Primitives_OneAxis::TopFace ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheFace& Primitives_OneAxis::BottomFace () const TopoDS_Face& BRepPrim_OneAxis::BottomFace ()
{ {
// do it if not done // do it if not done
if (!FacesBuilt[FBOTTOM]) { if (!FacesBuilt[FBOTTOM]) {
Standard_DomainError_Raise_if(!HasBottom(), Standard_DomainError_Raise_if(!HasBottom(),
"Primitives_OneAxis::BottomFace:No bottom face"); "BRepPrim_OneAxis::BottomFace:No bottom face");
// make the empty face by translating the axes // make the empty face by translating the axes
Standard_Real z = MeridianValue(myVMin).Y(); Standard_Real z = MeridianValue(myVMin).Y();
@ -446,13 +456,13 @@ const TheFace& Primitives_OneAxis::BottomFace ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheFace& Primitives_OneAxis::StartFace () const TopoDS_Face& BRepPrim_OneAxis::StartFace ()
{ {
// do it if not done // do it if not done
if (!FacesBuilt[FSTART]) { if (!FacesBuilt[FSTART]) {
Standard_DomainError_Raise_if(!HasSides(), Standard_DomainError_Raise_if(!HasSides(),
"Primitives_OneAxes::StartFace:No side faces"); "BRepPrim_OneAxes::StartFace:No side faces");
// build the empty face, perpendicular to myTool.Axes() // build the empty face, perpendicular to myTool.Axes()
gp_Ax2 axes(myAxes.Location(),myAxes.YDirection().Reversed(),myAxes.XDirection()); gp_Ax2 axes(myAxes.Location(),myAxes.YDirection().Reversed(),myAxes.XDirection());
@ -489,13 +499,13 @@ const TheFace& Primitives_OneAxis::StartFace ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheFace& Primitives_OneAxis::EndFace () const TopoDS_Face& BRepPrim_OneAxis::EndFace ()
{ {
// do it if not done // do it if not done
if (!FacesBuilt[FEND]) { if (!FacesBuilt[FEND]) {
Standard_DomainError_Raise_if(!HasSides(), Standard_DomainError_Raise_if(!HasSides(),
"Primitives_OneAxes::EndFace:No side faces"); "BRepPrim_OneAxes::EndFace:No side faces");
// build the empty face, perpendicular to myTool.Axes() // build the empty face, perpendicular to myTool.Axes()
gp_Ax2 axes(myAxes.Location(),myAxes.YDirection().Reversed(),myAxes.XDirection()); gp_Ax2 axes(myAxes.Location(),myAxes.YDirection().Reversed(),myAxes.XDirection());
@ -533,7 +543,7 @@ const TheFace& Primitives_OneAxis::EndFace ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::LateralWire () const TopoDS_Wire& BRepPrim_OneAxis::LateralWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WLATERAL]) { if (!WiresBuilt[WLATERAL]) {
@ -560,7 +570,7 @@ const TheWire& Primitives_OneAxis::LateralWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::LateralStartWire () const TopoDS_Wire& BRepPrim_OneAxis::LateralStartWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WLATERALSTART]) { if (!WiresBuilt[WLATERALSTART]) {
@ -582,7 +592,7 @@ const TheWire& Primitives_OneAxis::LateralStartWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::LateralEndWire () const TopoDS_Wire& BRepPrim_OneAxis::LateralEndWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WLATERALEND]) { if (!WiresBuilt[WLATERALEND]) {
@ -603,13 +613,13 @@ const TheWire& Primitives_OneAxis::LateralEndWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::TopWire () const TopoDS_Wire& BRepPrim_OneAxis::TopWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WTOP]) { if (!WiresBuilt[WTOP]) {
Standard_DomainError_Raise_if(!HasTop(), Standard_DomainError_Raise_if(!HasTop(),
"Primitives_OneAxis::TopWire: no top"); "BRepPrim_OneAxis::TopWire: no top");
myBuilder.MakeWire(myWires[WTOP]); myBuilder.MakeWire(myWires[WTOP]);
@ -630,13 +640,13 @@ const TheWire& Primitives_OneAxis::TopWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::BottomWire () const TopoDS_Wire& BRepPrim_OneAxis::BottomWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WBOTTOM]) { if (!WiresBuilt[WBOTTOM]) {
Standard_DomainError_Raise_if(!HasBottom(), Standard_DomainError_Raise_if(!HasBottom(),
"Primitives_OneAxis::BottomWire: no bottom"); "BRepPrim_OneAxis::BottomWire: no bottom");
myBuilder.MakeWire(myWires[WBOTTOM]); myBuilder.MakeWire(myWires[WBOTTOM]);
@ -658,13 +668,13 @@ const TheWire& Primitives_OneAxis::BottomWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::StartWire () const TopoDS_Wire& BRepPrim_OneAxis::StartWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WSTART]) { if (!WiresBuilt[WSTART]) {
Standard_DomainError_Raise_if(!HasSides(), Standard_DomainError_Raise_if(!HasSides(),
"Primitives_OneAxes::StartWire:no sides"); "BRepPrim_OneAxes::StartWire:no sides");
myBuilder.MakeWire(myWires[WSTART]); myBuilder.MakeWire(myWires[WSTART]);
@ -692,22 +702,22 @@ const TheWire& Primitives_OneAxis::StartWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::AxisStartWire () const TopoDS_Wire& BRepPrim_OneAxis::AxisStartWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WAXISSTART]) { if (!WiresBuilt[WAXISSTART]) {
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!HasSides(), (!HasSides(),
"Primitives_OneAxes::AxisStartWire:no sides"); "BRepPrim_OneAxes::AxisStartWire:no sides");
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!VMaxInfinite() || !VMinInfinite(), (!VMaxInfinite() || !VMinInfinite(),
"Primitives_OneAxes::AxisStartWire:not infinite"); "BRepPrim_OneAxes::AxisStartWire:not infinite");
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(MeridianClosed(), (MeridianClosed(),
"Primitives_OneAxes::AxisStartWire:meridian closed"); "BRepPrim_OneAxes::AxisStartWire:meridian closed");
myBuilder.MakeWire(myWires[WAXISSTART]); myBuilder.MakeWire(myWires[WAXISSTART]);
@ -725,13 +735,13 @@ const TheWire& Primitives_OneAxis::AxisStartWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::EndWire () const TopoDS_Wire& BRepPrim_OneAxis::EndWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WEND]) { if (!WiresBuilt[WEND]) {
Standard_DomainError_Raise_if(!HasSides(), Standard_DomainError_Raise_if(!HasSides(),
"Primitives_OneAxes::EndWire:no sides"); "BRepPrim_OneAxes::EndWire:no sides");
myBuilder.MakeWire(myWires[WEND]); myBuilder.MakeWire(myWires[WEND]);
@ -757,22 +767,22 @@ const TheWire& Primitives_OneAxis::EndWire ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheWire& Primitives_OneAxis::AxisEndWire () const TopoDS_Wire& BRepPrim_OneAxis::AxisEndWire ()
{ {
// do it if not done // do it if not done
if (!WiresBuilt[WAXISEND]) { if (!WiresBuilt[WAXISEND]) {
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!HasSides(), (!HasSides(),
"Primitives_OneAxes::AxisEndWire:no sides"); "BRepPrim_OneAxes::AxisEndWire:no sides");
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!VMaxInfinite() || !VMinInfinite(), (!VMaxInfinite() || !VMinInfinite(),
"Primitives_OneAxes::AxisEndWire:not infinite"); "BRepPrim_OneAxes::AxisEndWire:not infinite");
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(MeridianClosed(), (MeridianClosed(),
"Primitives_OneAxes::AxisEndWire:meridian closed"); "BRepPrim_OneAxes::AxisEndWire:meridian closed");
myBuilder.MakeWire(myWires[WAXISEND]); myBuilder.MakeWire(myWires[WAXISEND]);
@ -789,15 +799,15 @@ const TheWire& Primitives_OneAxis::AxisEndWire ()
//purpose : make the edge on the axis, oriented +Z //purpose : make the edge on the axis, oriented +Z
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::AxisEdge () const TopoDS_Edge& BRepPrim_OneAxis::AxisEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[EAXIS]) { if (!EdgesBuilt[EAXIS]) {
Standard_DomainError_Raise_if(!HasSides(), Standard_DomainError_Raise_if(!HasSides(),
"Primitives_OneAxis::AxisEdge:no sides"); "BRepPrim_OneAxis::AxisEdge:no sides");
Standard_DomainError_Raise_if(MeridianClosed(), Standard_DomainError_Raise_if(MeridianClosed(),
"Primitives_OneAxis::AxisEdge:closed"); "BRepPrim_OneAxis::AxisEdge:closed");
// build the empty edge. // build the empty edge.
myBuilder.MakeEdge(myEdges[EAXIS],gp_Lin(myAxes.Axis())); myBuilder.MakeEdge(myEdges[EAXIS],gp_Lin(myAxes.Axis()));
@ -821,7 +831,7 @@ const TheEdge& Primitives_OneAxis::AxisEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::StartEdge () const TopoDS_Edge& BRepPrim_OneAxis::StartEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[ESTART]) { if (!EdgesBuilt[ESTART]) {
@ -871,7 +881,7 @@ const TheEdge& Primitives_OneAxis::StartEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::EndEdge () const TopoDS_Edge& BRepPrim_OneAxis::EndEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[EEND]) { if (!EdgesBuilt[EEND]) {
@ -921,14 +931,14 @@ const TheEdge& Primitives_OneAxis::EndEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::StartTopEdge () const TopoDS_Edge& BRepPrim_OneAxis::StartTopEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[ETOPSTART]) { if (!EdgesBuilt[ETOPSTART]) {
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!HasTop() || !HasSides(), (!HasTop() || !HasSides(),
"Primitives_OneAxis::StartTopEdge:no sides or no top"); "BRepPrim_OneAxis::StartTopEdge:no sides or no top");
// build the empty Edge // build the empty Edge
gp_Vec V = myAxes.Direction(); gp_Vec V = myAxes.Direction();
@ -953,14 +963,14 @@ const TheEdge& Primitives_OneAxis::StartTopEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::StartBottomEdge () const TopoDS_Edge& BRepPrim_OneAxis::StartBottomEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[EBOTSTART]) { if (!EdgesBuilt[EBOTSTART]) {
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!HasBottom() || !HasSides(), (!HasBottom() || !HasSides(),
"Primitives_OneAxis::StartBottomEdge:no sides or no top"); "BRepPrim_OneAxis::StartBottomEdge:no sides or no top");
// build the empty Edge // build the empty Edge
gp_Vec V = myAxes.Direction(); gp_Vec V = myAxes.Direction();
@ -985,14 +995,14 @@ const TheEdge& Primitives_OneAxis::StartBottomEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::EndTopEdge () const TopoDS_Edge& BRepPrim_OneAxis::EndTopEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[ETOPEND]) { if (!EdgesBuilt[ETOPEND]) {
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!HasTop() || !HasSides(), (!HasTop() || !HasSides(),
"Primitives_OneAxis::EndTopEdge:no sides or no top"); "BRepPrim_OneAxis::EndTopEdge:no sides or no top");
// build the empty Edge // build the empty Edge
gp_Vec V = myAxes.Direction(); gp_Vec V = myAxes.Direction();
@ -1019,7 +1029,7 @@ const TheEdge& Primitives_OneAxis::EndTopEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::EndBottomEdge () const TopoDS_Edge& BRepPrim_OneAxis::EndBottomEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[EBOTEND]) { if (!EdgesBuilt[EBOTEND]) {
@ -1027,7 +1037,7 @@ const TheEdge& Primitives_OneAxis::EndBottomEdge ()
Standard_DomainError_Raise_if Standard_DomainError_Raise_if
(!HasBottom() || !HasSides(), (!HasBottom() || !HasSides(),
"Primitives_OneAxis::EndBottomEdge:no sides or no bottom"); "BRepPrim_OneAxis::EndBottomEdge:no sides or no bottom");
// build the empty Edge // build the empty Edge
gp_Vec V = myAxes.Direction(); gp_Vec V = myAxes.Direction();
@ -1054,7 +1064,7 @@ const TheEdge& Primitives_OneAxis::EndBottomEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::TopEdge () const TopoDS_Edge& BRepPrim_OneAxis::TopEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[ETOP]) { if (!EdgesBuilt[ETOP]) {
@ -1108,7 +1118,7 @@ const TheEdge& Primitives_OneAxis::TopEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheEdge& Primitives_OneAxis::BottomEdge () const TopoDS_Edge& BRepPrim_OneAxis::BottomEdge ()
{ {
// do it if not done // do it if not done
if (!EdgesBuilt[EBOTTOM]) { if (!EdgesBuilt[EBOTTOM]) {
@ -1163,7 +1173,7 @@ const TheEdge& Primitives_OneAxis::BottomEdge ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheVertex& Primitives_OneAxis::AxisTopVertex () const TopoDS_Vertex& BRepPrim_OneAxis::AxisTopVertex ()
{ {
// do it if not done // do it if not done
if (!VerticesBuilt[VAXISTOP]) { if (!VerticesBuilt[VAXISTOP]) {
@ -1177,9 +1187,9 @@ const TheVertex& Primitives_OneAxis::AxisTopVertex ()
else { else {
Standard_DomainError_Raise_if(MeridianClosed(), Standard_DomainError_Raise_if(MeridianClosed(),
"Primitives_OneAxis::AxisTopVertex"); "BRepPrim_OneAxis::AxisTopVertex");
Standard_DomainError_Raise_if(VMaxInfinite(), Standard_DomainError_Raise_if(VMaxInfinite(),
"Primitives_OneAxis::AxisTopVertex"); "BRepPrim_OneAxis::AxisTopVertex");
gp_Vec V = myAxes.Direction(); gp_Vec V = myAxes.Direction();
V.Multiply(MeridianValue(myVMax).Y()); V.Multiply(MeridianValue(myVMax).Y());
@ -1198,7 +1208,7 @@ const TheVertex& Primitives_OneAxis::AxisTopVertex ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheVertex& Primitives_OneAxis::AxisBottomVertex () const TopoDS_Vertex& BRepPrim_OneAxis::AxisBottomVertex ()
{ {
// do it if not done // do it if not done
if (!VerticesBuilt[VAXISBOT]) { if (!VerticesBuilt[VAXISBOT]) {
@ -1212,9 +1222,9 @@ const TheVertex& Primitives_OneAxis::AxisBottomVertex ()
else { else {
Standard_DomainError_Raise_if(MeridianClosed(), Standard_DomainError_Raise_if(MeridianClosed(),
"Primitives_OneAxis::AxisBottomVertex"); "BRepPrim_OneAxis::AxisBottomVertex");
Standard_DomainError_Raise_if(VMinInfinite(), Standard_DomainError_Raise_if(VMinInfinite(),
"Primitives_OneAxis::AxisBottomVertex"); "BRepPrim_OneAxis::AxisBottomVertex");
gp_Vec V = myAxes.Direction(); gp_Vec V = myAxes.Direction();
V.Multiply(MeridianValue(myVMin).Y()); V.Multiply(MeridianValue(myVMin).Y());
@ -1233,7 +1243,7 @@ const TheVertex& Primitives_OneAxis::AxisBottomVertex ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheVertex& Primitives_OneAxis::TopStartVertex () const TopoDS_Vertex& BRepPrim_OneAxis::TopStartVertex ()
{ {
// do it if not done // do it if not done
if (!VerticesBuilt[VTOPSTART]) { if (!VerticesBuilt[VTOPSTART]) {
@ -1270,7 +1280,7 @@ const TheVertex& Primitives_OneAxis::TopStartVertex ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheVertex& Primitives_OneAxis::TopEndVertex () const TopoDS_Vertex& BRepPrim_OneAxis::TopEndVertex ()
{ {
// do it if not done // do it if not done
if (!VerticesBuilt[VTOPEND]) { if (!VerticesBuilt[VTOPEND]) {
@ -1309,7 +1319,7 @@ const TheVertex& Primitives_OneAxis::TopEndVertex ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheVertex& Primitives_OneAxis::BottomStartVertex () const TopoDS_Vertex& BRepPrim_OneAxis::BottomStartVertex ()
{ {
// do it if not done // do it if not done
if (!VerticesBuilt[VBOTSTART]) { if (!VerticesBuilt[VBOTSTART]) {
@ -1346,7 +1356,7 @@ const TheVertex& Primitives_OneAxis::BottomStartVertex ()
//purpose : //purpose :
//======================================================================= //=======================================================================
const TheVertex& Primitives_OneAxis::BottomEndVertex () const TopoDS_Vertex& BRepPrim_OneAxis::BottomEndVertex ()
{ {
// do it if not done // do it if not done
if (!VerticesBuilt[VBOTEND]) { if (!VerticesBuilt[VBOTEND]) {

View File

@ -1,164 +0,0 @@
// 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 _BRepPrim_OneAxis_HeaderFile
#define _BRepPrim_OneAxis_HeaderFile
#include <BRepPrim_Builder.hxx>
#include <gp_Ax2.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Face.hxx>
class Standard_DomainError;
class Standard_OutOfRange;
class TopoDS_Shell;
class TopoDS_Face;
class TopoDS_Wire;
class TopoDS_Edge;
class TopoDS_Vertex;
class BRepPrim_Builder;
class gp_Ax2;
class gp_Pnt2d;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineAlloc_HeaderFile
#include <Standard_DefineAlloc.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class BRepPrim_OneAxis {
public:
DEFINE_STANDARD_ALLOC
// Methods PUBLIC
//
Standard_EXPORT virtual void Delete() ;
Standard_EXPORT virtual ~BRepPrim_OneAxis()
//Standard_EXPORT virtual ~()
{
Delete();
}
Standard_EXPORT void SetMeridianOffset(const Standard_Real MeridianOffset = 0) ;
Standard_EXPORT const gp_Ax2& Axes() const;
Standard_EXPORT void Axes(const gp_Ax2& A) ;
Standard_EXPORT Standard_Real Angle() const;
Standard_EXPORT void Angle(const Standard_Real A) ;
Standard_EXPORT Standard_Real VMin() const;
Standard_EXPORT void VMin(const Standard_Real V) ;
Standard_EXPORT Standard_Real VMax() const;
Standard_EXPORT void VMax(const Standard_Real V) ;
Standard_EXPORT virtual TopoDS_Face MakeEmptyLateralFace() const = 0;
Standard_EXPORT virtual TopoDS_Edge MakeEmptyMeridianEdge(const Standard_Real Ang) const = 0;
Standard_EXPORT virtual void SetMeridianPCurve(TopoDS_Edge& E,const TopoDS_Face& F) const = 0;
Standard_EXPORT virtual gp_Pnt2d MeridianValue(const Standard_Real V) const = 0;
Standard_EXPORT virtual Standard_Boolean MeridianOnAxis(const Standard_Real V) const;
Standard_EXPORT virtual Standard_Boolean MeridianClosed() const;
Standard_EXPORT virtual Standard_Boolean VMaxInfinite() const;
Standard_EXPORT virtual Standard_Boolean VMinInfinite() const;
Standard_EXPORT virtual Standard_Boolean HasTop() const;
Standard_EXPORT virtual Standard_Boolean HasBottom() const;
Standard_EXPORT virtual Standard_Boolean HasSides() const;
Standard_EXPORT const TopoDS_Shell& Shell() ;
Standard_EXPORT const TopoDS_Face& LateralFace() ;
Standard_EXPORT const TopoDS_Face& TopFace() ;
Standard_EXPORT const TopoDS_Face& BottomFace() ;
Standard_EXPORT const TopoDS_Face& StartFace() ;
Standard_EXPORT const TopoDS_Face& EndFace() ;
Standard_EXPORT const TopoDS_Wire& LateralWire() ;
Standard_EXPORT const TopoDS_Wire& LateralStartWire() ;
Standard_EXPORT const TopoDS_Wire& LateralEndWire() ;
Standard_EXPORT const TopoDS_Wire& TopWire() ;
Standard_EXPORT const TopoDS_Wire& BottomWire() ;
Standard_EXPORT const TopoDS_Wire& StartWire() ;
Standard_EXPORT const TopoDS_Wire& AxisStartWire() ;
Standard_EXPORT const TopoDS_Wire& EndWire() ;
Standard_EXPORT const TopoDS_Wire& AxisEndWire() ;
Standard_EXPORT const TopoDS_Edge& AxisEdge() ;
Standard_EXPORT const TopoDS_Edge& StartEdge() ;
Standard_EXPORT const TopoDS_Edge& EndEdge() ;
Standard_EXPORT const TopoDS_Edge& StartTopEdge() ;
Standard_EXPORT const TopoDS_Edge& StartBottomEdge() ;
Standard_EXPORT const TopoDS_Edge& EndTopEdge() ;
Standard_EXPORT const TopoDS_Edge& EndBottomEdge() ;
Standard_EXPORT const TopoDS_Edge& TopEdge() ;
Standard_EXPORT const TopoDS_Edge& BottomEdge() ;
Standard_EXPORT const TopoDS_Vertex& AxisTopVertex() ;
Standard_EXPORT const TopoDS_Vertex& AxisBottomVertex() ;
Standard_EXPORT const TopoDS_Vertex& TopStartVertex() ;
Standard_EXPORT const TopoDS_Vertex& TopEndVertex() ;
Standard_EXPORT const TopoDS_Vertex& BottomStartVertex() ;
Standard_EXPORT const TopoDS_Vertex& BottomEndVertex() ;
protected:
// Methods PROTECTED
//
Standard_EXPORT BRepPrim_OneAxis(const BRepPrim_Builder& B,const gp_Ax2& A,const Standard_Real VMin,const Standard_Real VMax);
// Fields PROTECTED
//
BRepPrim_Builder myBuilder;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
gp_Ax2 myAxes;
Standard_Real myAngle;
Standard_Real myVMin;
Standard_Real myVMax;
Standard_Real myMeridianOffset;
TopoDS_Shell myShell;
Standard_Boolean ShellBuilt;
TopoDS_Vertex myVertices[6];
Standard_Boolean VerticesBuilt[6];
TopoDS_Edge myEdges[9];
Standard_Boolean EdgesBuilt[9];
TopoDS_Wire myWires[9];
Standard_Boolean WiresBuilt[9];
TopoDS_Face myFaces[5];
Standard_Boolean FacesBuilt[5];
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,71 +0,0 @@
# 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.
proc BRepPrim_Replace:AdmFileType {} {
return "dbadmfile";
}
proc BRepPrim_Replace:OutputDirTypeName {} {
return "dbtmpfile";
}
proc BRepPrim_Replace:HandleInputFile { ID } {
scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
switch $name {
BRepPrim_OneAxis.hxx {return 1;}
default {
return 0;
}
}
}
proc BRepPrim_Replace:Execute { unit args } {
global tcl_interactive
set tcl_interactive 1
package require Wokutils
msgprint -i -c "BRepPrim_Replace:Execute" "Copying of BRepPrim includes"
if { [wokparam -e %Station $unit] != "wnt" } {
set copycmd "cp -p "
set replstr "/"
} {
set copycmd "cmd /c copy"
set replstr "\\\\\\\\"
}
foreach file $args {
scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name
regsub ".hxx" $name ".hxx" sourcename
set source [woklocate -p BRepPrim:source:$sourcename [wokinfo -N $unit]]
set vistarget [woklocate -p BRepPrim:pubinclude:$name [wokinfo -N $unit]]
set target [wokinfo -p pubinclude:$name $unit]
regsub -all "/" " $source $target" $replstr TheArgs
msgprint -i -c "BRepPrim_Replace:Execute" "Copy $source to $target"
if { [file exist $target] && [wokparam -e %Station] != "wnt" } {
eval exec "chmod u+w $target"
}
eval exec "$copycmd $TheArgs"
}
return 0;
}

View File

@ -1,26 +0,0 @@
-- Created by: JR
-- Copyright (c) 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.
@ifnotdefined ( %BRepPrim_WOKSteps_EDL) then
@set %BRepPrim_WOKSteps_EDL = "";
@string %WOKSteps_XcppGroup += " xcpp.repl ";
@set %WOKSteps_xcpp_repl = "*BRepPrim_Replace(xcpp.header)";
@set %BRepPrim_UseSourceInclude = "";
@endif;

View File

@ -1,3 +0,0 @@
BRepPrim_OneAxis.hxx
BRepPrim_Replace.tcl
BRepPrim_WOKSteps.edl

View File

@ -17,7 +17,7 @@
#include <BRepPrimAPI_MakeBox.ixx> #include <BRepPrimAPI_MakeBox.ixx>
#include <BRepBuilderAPI.hxx> #include <BRepBuilderAPI.hxx>
#include <TopoDS.hxx> #include <TopoDS.hxx>
#include <Primitives_Direction.hxx> #include <BRepPrim_Direction.hxx>
inline gp_Pnt pmin(const gp_Pnt& p, inline gp_Pnt pmin(const gp_Pnt& p,
@ -171,7 +171,7 @@ BRepPrimAPI_MakeBox::operator TopoDS_Solid()
const TopoDS_Face& BRepPrimAPI_MakeBox::BottomFace () { const TopoDS_Face& BRepPrimAPI_MakeBox::BottomFace () {
return myWedge.Face (Primitives_ZMin); return myWedge.Face (BRepPrim_ZMin);
} }
@ -183,7 +183,7 @@ const TopoDS_Face& BRepPrimAPI_MakeBox::BottomFace () {
const TopoDS_Face& BRepPrimAPI_MakeBox::BackFace () { const TopoDS_Face& BRepPrimAPI_MakeBox::BackFace () {
return myWedge.Face (Primitives_XMin); return myWedge.Face (BRepPrim_XMin);
} }
@ -194,7 +194,7 @@ const TopoDS_Face& BRepPrimAPI_MakeBox::BackFace () {
const TopoDS_Face& BRepPrimAPI_MakeBox::FrontFace () { const TopoDS_Face& BRepPrimAPI_MakeBox::FrontFace () {
return myWedge.Face (Primitives_XMax); return myWedge.Face (BRepPrim_XMax);
} }
@ -205,7 +205,7 @@ const TopoDS_Face& BRepPrimAPI_MakeBox::FrontFace () {
const TopoDS_Face& BRepPrimAPI_MakeBox::LeftFace () { const TopoDS_Face& BRepPrimAPI_MakeBox::LeftFace () {
return myWedge.Face (Primitives_YMin); return myWedge.Face (BRepPrim_YMin);
} }
@ -216,7 +216,7 @@ const TopoDS_Face& BRepPrimAPI_MakeBox::LeftFace () {
const TopoDS_Face& BRepPrimAPI_MakeBox::RightFace () { const TopoDS_Face& BRepPrimAPI_MakeBox::RightFace () {
return myWedge.Face (Primitives_YMax); return myWedge.Face (BRepPrim_YMax);
} }
@ -227,7 +227,7 @@ const TopoDS_Face& BRepPrimAPI_MakeBox::RightFace () {
const TopoDS_Face& BRepPrimAPI_MakeBox::TopFace () { const TopoDS_Face& BRepPrimAPI_MakeBox::TopFace () {
return myWedge.Face (Primitives_ZMax); return myWedge.Face (BRepPrim_ZMax);
} }

View File

@ -46,19 +46,8 @@ is
class Iterator; class Iterator;
---Purpose: Iterator on the subShapes of a shape. ---Purpose: Iterator on the subShapes of a shape.
deferred class NumLinearRegularSweep deferred class NumLinearRegularSweep;
instantiates LinearRegularSweep from Sweep(
Shape from TopoDS, -- Resulting topological objects.
Shape from TopoDS, -- Generating Shape.
NumShape from Sweep, -- Directing Wire.
Builder from BRepSweep,
Tool from BRepSweep, -- GenTool
NumShapeTool from Sweep, -- DirTool
Iterator from BRepSweep, -- Resulting objects Iterator
Iterator from BRepSweep, -- GenIterator
NumShapeIterator from Sweep); -- DirSubEdgeIterator
deferred class Trsf; deferred class Trsf;
--- This class is inherited from LinearRegularSweep to implement --- This class is inherited from LinearRegularSweep to implement

View File

@ -14,33 +14,23 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
deferred generic class LinearRegularSweep from Sweep ( deferred class NumLinearRegularSweep from BRepSweep
TheShape as any; -- resulting topological objects.
TheGenShape as any; -- Generating topological objects.
TheDirShape as any; -- Directing topological objects.
TheBuilder as any;
TheGenShapeTool as any;
TheDirShapeTool as any;
TheShapeIterator as any;
TheGenShapeIterator as any;
TheDirShapeIterator as any)
---Purpose: This a generic class is used to build Sweept ---Purpose: This a generic class is used to build Sweept
-- primitives with a generating "shape" and a -- primitives with a generating "shape" and a
-- directing "line". -- directing "line".
-- --
-- The indexation and type analysis services required -- The indexation and type analysis services required
-- for the generatrix are given by <TheGenShapeTool>. -- for the generatrix are given by <Tool from BRepSweep>.
-- --
-- The indexation and type analysis services required -- The indexation and type analysis services required
-- for the directrix are given by <TheDirShapeTool>. -- for the directrix are given by <NumShapeTool from Sweep>.
-- --
-- The iteration services required for the generatrix -- The iteration services required for the generatrix
-- are given by <TheGenShapeIterator>. -- are given by <Iterator from BRepSweep>.
-- --
-- The iteration services required for the directrix -- The iteration services required for the directrix
-- are given by <TheDirShapeIterator>. -- are given by <NumShapeIterator from Sweep>.
-- --
-- The topology is like a grid of shapes. Each shape -- The topology is like a grid of shapes. Each shape
-- of the grid must be addressable without confusion -- of the grid must be addressable without confusion
@ -67,7 +57,16 @@ deferred generic class LinearRegularSweep from Sweep (
uses uses
Orientation from TopAbs, Orientation from TopAbs,
Array2OfBoolean from TColStd Array2OfBoolean from TColStd,
Shape from TopoDS,
NumShape from Sweep,
Builder from BRepSweep,
Tool from BRepSweep,
NumShapeTool from Sweep,
Iterator from BRepSweep,
NumShapeIterator from Sweep,
Array2OfShape from TopTools,
SequenceOfShape from TopTools
raises raises
@ -75,13 +74,7 @@ raises
NoSuchObject from Standard, NoSuchObject from Standard,
RangeError from Standard, RangeError from Standard,
DomainError from Standard DomainError from Standard
-- Nested classes
class Array2OfShapes
instantiates Array2 from TCollection (TheShape);
class SequenceOfShapes
instantiates Sequence from TCollection (TheShape);
is is
@ -91,10 +84,10 @@ is
Delete(me:out) is virtual ; Delete(me:out) is virtual ;
---C++: alias ~ ---C++: alias ~
Initialize(aBuilder : TheBuilder; Initialize(aBuilder : Builder from BRepSweep;
aGenShape : TheGenShape; aGenShape : Shape from TopoDS;
aDirWire : TheDirShape); aDirWire : NumShape from Sweep);
---Purpose: Creates a LinearRegularSweep. <aBuilder> gives ---Purpose: Creates a NumLinearRegularSweep. <aBuilder> gives
-- basic topological services. -- basic topological services.
@ -103,61 +96,61 @@ is
-- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
MakeEmptyVertex(me : in out; aGenV: TheGenShape; aDirV: TheDirShape) MakeEmptyVertex(me : in out; aGenV: Shape from TopoDS; aDirV: NumShape from Sweep)
returns TheShape returns Shape from TopoDS
---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its ---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its
-- geometric part, but without subcomponents. -- geometric part, but without subcomponents.
is deferred; is deferred;
MakeEmptyDirectingEdge(me: in out; aGenV: TheGenShape; aDirE: TheDirShape) MakeEmptyDirectingEdge(me: in out; aGenV: Shape from TopoDS; aDirE: NumShape from Sweep)
returns TheShape returns Shape from TopoDS
---Purpose: Builds the edge addressed by [aGenV,aDirE], with its ---Purpose: Builds the edge addressed by [aGenV,aDirE], with its
-- geometric part, but without subcomponents. -- geometric part, but without subcomponents.
is deferred; is deferred;
MakeEmptyGeneratingEdge(me: in out; aGenE: TheGenShape; aDirV: TheDirShape) MakeEmptyGeneratingEdge(me: in out; aGenE: Shape from TopoDS; aDirV: NumShape from Sweep)
returns TheShape returns Shape from TopoDS
---Purpose: Builds the edge addressed by [aGenE,aDirV], with its ---Purpose: Builds the edge addressed by [aGenE,aDirV], with its
-- geometric part, but without subcomponents. -- geometric part, but without subcomponents.
is deferred; is deferred;
SetParameters(me : in out; SetParameters(me : in out;
aNewFace : TheShape; aNewFace : Shape from TopoDS;
aNewVertex : in out TheShape; aNewVertex : in out Shape from TopoDS;
aGenF : TheGenShape; aGenF : Shape from TopoDS;
aGenV : TheGenShape; aGenV : Shape from TopoDS;
aDirV : TheDirShape) aDirV : NumShape from Sweep)
---Purpose: Sets the parameters of the new vertex on the new ---Purpose: Sets the parameters of the new vertex on the new
-- face. The new face and new vertex where generated -- face. The new face and new vertex where generated
-- from aGenF, aGenV and aDirV . -- from aGenF, aGenV and aDirV .
is deferred; is deferred;
SetDirectingParameter(me : in out; SetDirectingParameter(me : in out;
aNewEdge : TheShape; aNewEdge : Shape from TopoDS;
aNewVertex : in out TheShape; aNewVertex : in out Shape from TopoDS;
aGenV : TheGenShape; aGenV : Shape from TopoDS;
aDirE : TheDirShape; aDirE : NumShape from Sweep;
aDirV : TheDirShape) aDirV : NumShape from Sweep)
---Purpose: Sets the parameter of the new vertex on the new ---Purpose: Sets the parameter of the new vertex on the new
-- edge. The new edge and new vertex where generated -- edge. The new edge and new vertex where generated
-- from aGenV aDirE, and aDirV. -- from aGenV aDirE, and aDirV.
is deferred; is deferred;
SetGeneratingParameter(me : in out; SetGeneratingParameter(me : in out;
aNewEdge : TheShape; aNewEdge : Shape from TopoDS;
aNewVertex : in out TheShape; aNewVertex : in out Shape from TopoDS;
aGenE : TheGenShape; aGenE : Shape from TopoDS;
aGenV : TheGenShape; aGenV : Shape from TopoDS;
aDirV : TheDirShape) aDirV : NumShape from Sweep)
---Purpose: Sets the parameter of the new vertex on the new ---Purpose: Sets the parameter of the new vertex on the new
-- edge. The new edge and new vertex where generated -- edge. The new edge and new vertex where generated
-- from aGenE, aGenV and aDirV . -- from aGenE, aGenV and aDirV .
is deferred; is deferred;
MakeEmptyFace(me : in out; MakeEmptyFace(me : in out;
aGenS : TheGenShape; aGenS : Shape from TopoDS;
aDirS : TheDirShape) aDirS : NumShape from Sweep)
returns TheShape returns Shape from TopoDS
---Purpose: Builds the face addressed by [aGenS,aDirS], with ---Purpose: Builds the face addressed by [aGenS,aDirS], with
-- its geometric part, but without subcomponents. The -- its geometric part, but without subcomponents. The
-- couple aGenS, aDirS can be a "generating face and -- couple aGenS, aDirS can be a "generating face and
@ -166,11 +159,11 @@ is
is deferred; is deferred;
SetPCurve(me : in out; SetPCurve(me : in out;
aNewFace : TheShape; aNewFace : Shape from TopoDS;
aNewEdge : in out TheShape; aNewEdge : in out Shape from TopoDS;
aGenF : TheGenShape; aGenF : Shape from TopoDS;
aGenE : TheGenShape; aGenE : Shape from TopoDS;
aDirV : TheDirShape; aDirV : NumShape from Sweep;
orien : Orientation from TopAbs) orien : Orientation from TopAbs)
---Purpose: Sets the PCurve for a new edge on a new face. The ---Purpose: Sets the PCurve for a new edge on a new face. The
-- new edge and the new face were generated using -- new edge and the new face were generated using
@ -178,11 +171,11 @@ is
is deferred; is deferred;
SetGeneratingPCurve(me : in out; SetGeneratingPCurve(me : in out;
aNewFace : TheShape; aNewFace : Shape from TopoDS;
aNewEdge : in out TheShape; aNewEdge : in out Shape from TopoDS;
aGenE : TheGenShape; aGenE : Shape from TopoDS;
aDirE : TheDirShape; aDirE : NumShape from Sweep;
aDirV : TheDirShape; aDirV : NumShape from Sweep;
orien : Orientation from TopAbs) orien : Orientation from TopAbs)
---Purpose: Sets the PCurve for a new edge on a new face. The ---Purpose: Sets the PCurve for a new edge on a new face. The
@ -191,11 +184,11 @@ is
is deferred; is deferred;
SetDirectingPCurve(me : in out; SetDirectingPCurve(me : in out;
aNewFace : TheShape; aNewFace : Shape from TopoDS;
aNewEdge : in out TheShape; aNewEdge : in out Shape from TopoDS;
aGenE : TheGenShape; aGenE : Shape from TopoDS;
aGenV : TheGenShape; aGenV : Shape from TopoDS;
aDirE : TheDirShape; aDirE : NumShape from Sweep;
orien : Orientation from TopAbs) orien : Orientation from TopAbs)
---Purpose: Sets the PCurve for a new edge on a new face. The ---Purpose: Sets the PCurve for a new edge on a new face. The
@ -204,8 +197,8 @@ is
is deferred; is deferred;
DirectSolid(me : in out; DirectSolid(me : in out;
aGenS : TheGenShape; aGenS : Shape from TopoDS;
aDirS : TheDirShape) aDirS : NumShape from Sweep)
returns Orientation from TopAbs returns Orientation from TopAbs
---Purpose: Returns the Orientation of the shell in the solid ---Purpose: Returns the Orientation of the shell in the solid
-- generated by the face aGenS with the edge aDirS. -- generated by the face aGenS with the edge aDirS.
@ -214,11 +207,11 @@ is
is deferred; is deferred;
GGDShapeIsToAdd (me; GGDShapeIsToAdd (me;
aNewShape : TheShape; aNewShape : Shape from TopoDS;
aNewSubShape : TheShape; aNewSubShape : Shape from TopoDS;
aGenS : TheGenShape; aGenS : Shape from TopoDS;
aSubGenS : TheGenShape; aSubGenS : Shape from TopoDS;
aDirS : TheDirShape) aDirS : NumShape from Sweep)
returns Boolean from Standard returns Boolean from Standard
---Purpose: Returns true if aNewSubShape (addressed by ---Purpose: Returns true if aNewSubShape (addressed by
-- aSubGenS and aDirS) must be added in aNewShape -- aSubGenS and aDirS) must be added in aNewShape
@ -226,11 +219,11 @@ is
is deferred; is deferred;
GDDShapeIsToAdd (me; GDDShapeIsToAdd (me;
aNewShape : TheShape; aNewShape : Shape from TopoDS;
aNewSubShape : TheShape; aNewSubShape : Shape from TopoDS;
aGenS : TheGenShape; aGenS : Shape from TopoDS;
aDirS : TheDirShape; aDirS : NumShape from Sweep;
aSubDirS : TheDirShape) aSubDirS : NumShape from Sweep)
returns Boolean from Standard returns Boolean from Standard
---Purpose: Returns true if aNewSubShape (addressed by ---Purpose: Returns true if aNewSubShape (addressed by
-- aGenS and aSubDirS) must be added in aNewShape -- aGenS and aSubDirS) must be added in aNewShape
@ -239,11 +232,11 @@ is
SeparatedWires (me; SeparatedWires (me;
aNewShape : TheShape; aNewShape : Shape from TopoDS;
aNewSubShape : TheShape; aNewSubShape : Shape from TopoDS;
aGenS : TheGenShape; aGenS : Shape from TopoDS;
aSubGenS : TheGenShape; aSubGenS : Shape from TopoDS;
aDirS : TheDirShape) aDirS : NumShape from Sweep)
returns Boolean from Standard returns Boolean from Standard
---Purpose: In some particular cases the topology of a ---Purpose: In some particular cases the topology of a
-- generated face must be composed of independant -- generated face must be composed of independant
@ -252,8 +245,8 @@ is
is deferred; is deferred;
SplitShell (me; aNewShape : TheShape) SplitShell (me; aNewShape : Shape from TopoDS)
returns TheShape returns Shape from TopoDS
---Purpose: In some particular cases the topology of a ---Purpose: In some particular cases the topology of a
-- generated Shell must be composed of independant -- generated Shell must be composed of independant
-- closed Shells, in this case this function returns -- closed Shells, in this case this function returns
@ -264,7 +257,7 @@ is
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-- Method coding the continuities on the edges between 2 faces -- Method coding the continuities on the edges between 2 faces
-- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
SetContinuity(me : in out; aGenS : TheGenShape; aDirS : TheDirShape) SetContinuity(me : in out; aGenS : Shape from TopoDS; aDirS : NumShape from Sweep)
---Purpose: Called to propagate the continuity of every vertex ---Purpose: Called to propagate the continuity of every vertex
-- between two edges of the generating wire aGenS on -- between two edges of the generating wire aGenS on
-- the generated edge and faces. -- the generated edge and faces.
@ -279,7 +272,7 @@ is
-- Shapes -- Shapes
-- """""" -- """"""
HasShape(me; aGenS : TheGenShape; aDirS : TheDirShape) HasShape(me; aGenS : Shape from TopoDS; aDirS : NumShape from Sweep)
returns Boolean from Standard returns Boolean from Standard
---Purpose: Returns true if aDirS and aGenS addresses a ---Purpose: Returns true if aDirS and aGenS addresses a
-- resulting Shape. In some specific cases the shape -- resulting Shape. In some specific cases the shape
@ -287,46 +280,46 @@ is
-- function returns false. -- function returns false.
is deferred; is deferred;
Shape(me: in out; aGenS : TheGenShape; aDirS : TheDirShape) Shape(me: in out; aGenS : Shape from TopoDS; aDirS : NumShape from Sweep)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by aDirS and ---Purpose: Returns the resulting Shape indexed by aDirS and
-- aGenS. -- aGenS.
is static; is static;
Shape(me: in out; aGenS : TheGenShape) Shape(me: in out; aGenS : Shape from TopoDS)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by myDirWire ---Purpose: Returns the resulting Shape indexed by myDirWire
-- and aGenS. -- and aGenS.
is static; is static;
Shape(me: in out) Shape(me: in out)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by myDirWire ---Purpose: Returns the resulting Shape indexed by myDirWire
-- and myGenShape. -- and myGenShape.
is static; is static;
FirstShape(me: in out) FirstShape(me: in out)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by the first ---Purpose: Returns the resulting Shape indexed by the first
-- Vertex of myDirWire and myGenShape. -- Vertex of myDirWire and myGenShape.
is static; is static;
LastShape(me: in out) LastShape(me: in out)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by the last ---Purpose: Returns the resulting Shape indexed by the last
-- Vertex of myDirWire and myGenShape. -- Vertex of myDirWire and myGenShape.
is static; is static;
FirstShape(me: in out; aGenS : TheGenShape) FirstShape(me: in out; aGenS : Shape from TopoDS)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by the first ---Purpose: Returns the resulting Shape indexed by the first
-- Vertex of myDirWire and aGenS. -- Vertex of myDirWire and aGenS.
is static; is static;
LastShape(me: in out; aGenS : TheGenShape) LastShape(me: in out; aGenS : Shape from TopoDS)
returns TheShape returns Shape from TopoDS
---Purpose: Returns the resulting Shape indexed by the last ---Purpose: Returns the resulting Shape indexed by the last
-- Vertex of myDirWire and aGenS. -- Vertex of myDirWire and aGenS.
is static; is static;
@ -339,25 +332,25 @@ fields
-- Topology builder. -- Topology builder.
myBuilder : TheBuilder is protected; myBuilder : Builder from BRepSweep is protected;
-- Generating shape -- Generating shape
myGenShape : TheGenShape is protected; myGenShape : Shape from TopoDS is protected;
-- Directing line -- Directing line
myDirWire : TheDirShape is protected; myDirWire : NumShape from Sweep is protected;
-- shape tools. -- shape tools.
myGenShapeTool : TheGenShapeTool is protected; myGenShapeTool : Tool from BRepSweep is protected;
myDirShapeTool : TheDirShapeTool is protected; myDirShapeTool : NumShapeTool from Sweep is protected;
-- Array of built objects (NbGShapes,NbDShapes). -- Array of built objects (NbGShapes,NbDShapes).
myShapes : Array2OfShapes is protected; myShapes : Array2OfShape from TopTools is protected;
-- Array of built objects flags (NbGShapes,NbDShapes). -- Array of built objects flags (NbGShapes,NbDShapes).
myBuiltShapes : Array2OfBoolean from TColStd is protected; myBuiltShapes : Array2OfBoolean from TColStd is protected;
end LinearRegularSweep; end NumLinearRegularSweep;

View File

@ -14,23 +14,34 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <BRepSweep_NumLinearRegularSweep.ixx>
#include <Standard_RangeError.hxx> #include <Standard_RangeError.hxx>
#include <Standard_NoSuchObject.hxx> #include <Standard_NoSuchObject.hxx>
#include <Standard_NoMoreObject.hxx> #include <Standard_NoMoreObject.hxx>
#include <Standard_DomainError.hxx> #include <Standard_DomainError.hxx>
#include <TopoDS_Shape.hxx>
#include <Sweep_NumShape.hxx>
#include <BRepSweep_Builder.hxx>
#include <BRepSweep_Tool.hxx>
#include <Sweep_NumShapeTool.hxx>
#include <BRepSweep_Iterator.hxx>
#include <Sweep_NumShapeIterator.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopAbs_Orientation.hxx> #include <TopAbs_Orientation.hxx>
#include <TopAbs.hxx> #include <TopAbs.hxx>
//======================================================================= //=======================================================================
//function : Sweep_LinearRegularSweep //function : BRepSweep_NumLinearRegularSweep
//purpose : Create a Regular Sweep. //purpose : Create a Regular Sweep.
//======================================================================= //=======================================================================
Sweep_LinearRegularSweep::Sweep_LinearRegularSweep BRepSweep_NumLinearRegularSweep::BRepSweep_NumLinearRegularSweep
(const TheBuilder& aBuilder, (const BRepSweep_Builder& aBuilder,
const TheGenShape& aGenShape, const TopoDS_Shape& aGenShape,
const TheDirShape& aDirShape): const Sweep_NumShape& aDirShape):
myBuilder(aBuilder), myBuilder(aBuilder),
myGenShape(aGenShape), myGenShape(aGenShape),
@ -51,7 +62,7 @@ Sweep_LinearRegularSweep::Sweep_LinearRegularSweep
myBuiltShapes.Init(Standard_False); myBuiltShapes.Init(Standard_False);
} }
void Sweep_LinearRegularSweep::Delete() void BRepSweep_NumLinearRegularSweep::Delete()
{} {}
//======================================================================= //=======================================================================
@ -59,11 +70,11 @@ void Sweep_LinearRegularSweep::Delete()
//purpose : Returns the global Shape. //purpose : Returns the global Shape.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::Shape () TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape ()
{ {
if (HasShape(myGenShape,myDirWire)) return Shape(myGenShape,myDirWire); if (HasShape(myGenShape,myDirWire)) return Shape(myGenShape,myDirWire);
else { else {
TheShape bidon; TopoDS_Shape bidon;
return bidon; return bidon;
} }
} }
@ -74,12 +85,12 @@ TheShape Sweep_LinearRegularSweep::Shape ()
//purpose : Returns the Shape generated with aGenS. //purpose : Returns the Shape generated with aGenS.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS) TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS)
{ {
if (myGenShapeTool.Index(aGenS) != 0 && if (myGenShapeTool.Index(aGenS) != 0 &&
HasShape(aGenS,myDirWire)) return Shape(aGenS,myDirWire); HasShape(aGenS,myDirWire)) return Shape(aGenS,myDirWire);
else { else {
TheShape bidon; TopoDS_Shape bidon;
return bidon; return bidon;
} }
} }
@ -90,18 +101,18 @@ TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS)
//purpose : Returns the Shape indexed by the arguments. //purpose : Returns the Shape indexed by the arguments.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS, TopoDS_Shape BRepSweep_NumLinearRegularSweep::Shape (const TopoDS_Shape& aGenS,
const TheDirShape& aDirS) const Sweep_NumShape& aDirS)
{ {
Standard_Integer iGenS = myGenShapeTool.Index(aGenS); Standard_Integer iGenS = myGenShapeTool.Index(aGenS);
Standard_Integer iDirS = myDirShapeTool.Index(aDirS); Standard_Integer iDirS = myDirShapeTool.Index(aDirS);
if (!myBuiltShapes(iGenS,iDirS)){ if (!myBuiltShapes(iGenS,iDirS)){
TheShape newShape; TopoDS_Shape newShape;
TheGenShape bGenS,cGenS,subGenS,subsubGenS; TopoDS_Shape bGenS,cGenS,subGenS,subsubGenS;
TheDirShape bDirS,subDirS; Sweep_NumShape bDirS,subDirS;
TheGenShapeIterator It; BRepSweep_Iterator It;
TheDirShapeIterator Kt; Sweep_NumShapeIterator Kt;
TheShapeIterator Lt; BRepSweep_Iterator Lt;
TopAbs_Orientation Or,Pr; TopAbs_Orientation Or,Pr;
if (myDirShapeTool.Type(aDirS)==TopAbs_VERTEX){ if (myDirShapeTool.Type(aDirS)==TopAbs_VERTEX){
//Ici on construit les "planchers" du Shape. //Ici on construit les "planchers" du Shape.
@ -162,14 +173,14 @@ TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS,
aGenS,subGenS,aDirS,Or); aGenS,subGenS,aDirS,Or);
} }
else if(subGenSType==TopAbs_WIRE){ else if(subGenSType==TopAbs_WIRE){
TheGenShapeIterator Jt; BRepSweep_Iterator Jt;
cGenS = subGenS; cGenS = subGenS;
myGenShapeTool.SetOrientation(cGenS,TopAbs_FORWARD); myGenShapeTool.SetOrientation(cGenS,TopAbs_FORWARD);
for (Jt.Init(cGenS);Jt.More();Jt.Next()){ for (Jt.Init(cGenS);Jt.More();Jt.Next()){
subsubGenS = Jt.Value(); subsubGenS = Jt.Value();
Pr = Jt.Orientation(); Pr = Jt.Orientation();
if(HasShape(subsubGenS,aDirS)){ if(HasShape(subsubGenS,aDirS)){
TheShape newsubEdge = Shape(subsubGenS,aDirS); TopoDS_Shape newsubEdge = Shape(subsubGenS,aDirS);
SetPCurve(myShapes(iGenS,iDirS),newsubEdge, SetPCurve(myShapes(iGenS,iDirS),newsubEdge,
aGenS,subsubGenS,aDirS,Pr); aGenS,subsubGenS,aDirS,Pr);
} }
@ -187,8 +198,8 @@ TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS,
else if (myDirShapeTool.Type(aDirS)==TopAbs_EDGE){ else if (myDirShapeTool.Type(aDirS)==TopAbs_EDGE){
//Ici on construit les murs du Shape. //Ici on construit les murs du Shape.
TopAbs_ShapeEnum aGenSType = myGenShapeTool.Type(aGenS); TopAbs_ShapeEnum aGenSType = myGenShapeTool.Type(aGenS);
TheShape newWire,newShell; TopoDS_Shape newWire,newShell;
Sweep_SequenceOfShapes WireSeq; TopTools_SequenceOfShape WireSeq;
Standard_Boolean sepwires = Standard_False; Standard_Boolean sepwires = Standard_False;
switch (aGenSType){ switch (aGenSType){
case TopAbs_VERTEX : case TopAbs_VERTEX :
@ -242,7 +253,7 @@ TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS,
if (SeparatedWires(myShapes(iGenS,iDirS),newShape, if (SeparatedWires(myShapes(iGenS,iDirS),newShape,
aGenS,subGenS,aDirS)){ aGenS,subGenS,aDirS)){
sepwires = Standard_True; sepwires = Standard_True;
TheShape wi; TopoDS_Shape wi;
myBuilder.MakeWire(wi); myBuilder.MakeWire(wi);
myBuilder.Add(wi,newShape,Or); myBuilder.Add(wi,newShape,Or);
WireSeq.Append(wi); WireSeq.Append(wi);
@ -326,7 +337,7 @@ TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS,
SetContinuity(aGenS,aDirS); SetContinuity(aGenS,aDirS);
} }
if (aGenSType==TopAbs_FACE){ if (aGenSType==TopAbs_FACE){
TheShape temp = SplitShell(newShell); TopoDS_Shape temp = SplitShell(newShell);
TopAbs_Orientation Or = DirectSolid(aGenS,aDirS); TopAbs_Orientation Or = DirectSolid(aGenS,aDirS);
Lt.Init(temp); Lt.Init(temp);
if(Lt.More()) Lt.Next(); if(Lt.More()) Lt.Next();
@ -390,9 +401,9 @@ TheShape Sweep_LinearRegularSweep::Shape (const TheGenShape& aGenS,
//purpose : Returns the Shape indexed by the arguments. //purpose : Returns the Shape indexed by the arguments.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::FirstShape () TopoDS_Shape BRepSweep_NumLinearRegularSweep::FirstShape ()
{ {
TheShape result; TopoDS_Shape result;
if (myDirShapeTool.HasFirstVertex()){ if (myDirShapeTool.HasFirstVertex()){
if(HasShape(myGenShape,myDirShapeTool.FirstVertex())) if(HasShape(myGenShape,myDirShapeTool.FirstVertex()))
result = Shape(myGenShape,myDirShapeTool.FirstVertex()); result = Shape(myGenShape,myDirShapeTool.FirstVertex());
@ -406,9 +417,9 @@ TheShape Sweep_LinearRegularSweep::FirstShape ()
//purpose : Returns the Shape indexed by the arguments. //purpose : Returns the Shape indexed by the arguments.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::LastShape () TopoDS_Shape BRepSweep_NumLinearRegularSweep::LastShape ()
{ {
TheShape result; TopoDS_Shape result;
if (myDirShapeTool.HasLastVertex()){ if (myDirShapeTool.HasLastVertex()){
if(HasShape(myGenShape,myDirShapeTool.LastVertex())) if(HasShape(myGenShape,myDirShapeTool.LastVertex()))
result = Shape(myGenShape,myDirShapeTool.LastVertex()); result = Shape(myGenShape,myDirShapeTool.LastVertex());
@ -422,9 +433,9 @@ TheShape Sweep_LinearRegularSweep::LastShape ()
//purpose : Returns the Shape indexed by the arguments. //purpose : Returns the Shape indexed by the arguments.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::FirstShape (const TheGenShape& aGenS) TopoDS_Shape BRepSweep_NumLinearRegularSweep::FirstShape (const TopoDS_Shape& aGenS)
{ {
TheShape result; TopoDS_Shape result;
if (myDirShapeTool.HasFirstVertex()){ if (myDirShapeTool.HasFirstVertex()){
if(HasShape(aGenS,myDirShapeTool.FirstVertex())) if(HasShape(aGenS,myDirShapeTool.FirstVertex()))
result = Shape(aGenS,myDirShapeTool.FirstVertex()); result = Shape(aGenS,myDirShapeTool.FirstVertex());
@ -438,9 +449,9 @@ TheShape Sweep_LinearRegularSweep::FirstShape (const TheGenShape& aGenS)
//purpose : Returns the Shape indexed by the arguments. //purpose : Returns the Shape indexed by the arguments.
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::LastShape (const TheGenShape& aGenS) TopoDS_Shape BRepSweep_NumLinearRegularSweep::LastShape (const TopoDS_Shape& aGenS)
{ {
TheShape result; TopoDS_Shape result;
if (myDirShapeTool.HasLastVertex()){ if (myDirShapeTool.HasLastVertex()){
if(HasShape(aGenS,myDirShapeTool.LastVertex())) if(HasShape(aGenS,myDirShapeTool.LastVertex()))
result = Shape(aGenS,myDirShapeTool.LastVertex()); result = Shape(aGenS,myDirShapeTool.LastVertex());
@ -453,7 +464,7 @@ TheShape Sweep_LinearRegularSweep::LastShape (const TheGenShape& aGenS)
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean Sweep_LinearRegularSweep::Closed()const Standard_Boolean BRepSweep_NumLinearRegularSweep::Closed()const
{ {
return myDirWire.Closed(); return myDirWire.Closed();
} }
@ -463,9 +474,9 @@ Standard_Boolean Sweep_LinearRegularSweep::Closed()const
//purpose : //purpose :
//======================================================================= //=======================================================================
TheShape Sweep_LinearRegularSweep::SplitShell(const TheShape& aNewShape)const TopoDS_Shape BRepSweep_NumLinearRegularSweep::SplitShell(const TopoDS_Shape& aNewShape)const
{ {
TheShape comp; TopoDS_Shape comp;
myBuilder.MakeCompound(comp); myBuilder.MakeCompound(comp);
myBuilder.Add(comp,aNewShape); myBuilder.Add(comp,aNewShape);
return comp; return comp;

View File

@ -1,135 +0,0 @@
// 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 _BRepSweep_NumLinearRegularSweep_HeaderFile
#define _BRepSweep_NumLinearRegularSweep_HeaderFile
#include <BRepSweep_Builder.hxx>
#include <TopoDS_Shape.hxx>
#include <Sweep_NumShape.hxx>
#include <BRepSweep_Tool.hxx>
#include <Sweep_NumShapeTool.hxx>
#include <BRepSweep_Array2OfShapesOfNumLinearRegularSweep.hxx>
#include <TColStd_Array2OfBoolean.hxx>
#include <BRepSweep_SequenceNodeOfSequenceOfShapesOfNumLinearRegularSweep.hxx>
#include <TopAbs_Orientation.hxx>
class Standard_NoMoreObject;
class Standard_NoSuchObject;
class Standard_RangeError;
class Standard_DomainError;
class TopoDS_Shape;
class Sweep_NumShape;
class BRepSweep_Builder;
class BRepSweep_Tool;
class Sweep_NumShapeTool;
class BRepSweep_Iterator;
class Sweep_NumShapeIterator;
class BRepSweep_Array2OfShapesOfNumLinearRegularSweep;
class BRepSweep_SequenceOfShapesOfNumLinearRegularSweep;
class BRepSweep_SequenceNodeOfSequenceOfShapesOfNumLinearRegularSweep;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineAlloc_HeaderFile
#include <Standard_DefineAlloc.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class BRepSweep_NumLinearRegularSweep {
public:
DEFINE_STANDARD_ALLOC
// Methods PUBLIC
//
Standard_EXPORT virtual void Delete() ;
Standard_EXPORT virtual ~BRepSweep_NumLinearRegularSweep()
{
Delete();
}
Standard_EXPORT virtual TopoDS_Shape MakeEmptyVertex(const TopoDS_Shape& aGenV,const Sweep_NumShape& aDirV) = 0;
Standard_EXPORT virtual TopoDS_Shape MakeEmptyDirectingEdge(const TopoDS_Shape& aGenV,const Sweep_NumShape& aDirE) = 0;
Standard_EXPORT virtual TopoDS_Shape MakeEmptyGeneratingEdge(const TopoDS_Shape& aGenE,const Sweep_NumShape& aDirV) = 0;
Standard_EXPORT virtual void SetParameters(const TopoDS_Shape& aNewFace,TopoDS_Shape& aNewVertex,const TopoDS_Shape& aGenF,const TopoDS_Shape& aGenV,const Sweep_NumShape& aDirV) = 0;
Standard_EXPORT virtual void SetDirectingParameter(const TopoDS_Shape& aNewEdge,TopoDS_Shape& aNewVertex,const TopoDS_Shape& aGenV,const Sweep_NumShape& aDirE,const Sweep_NumShape& aDirV) = 0;
Standard_EXPORT virtual void SetGeneratingParameter(const TopoDS_Shape& aNewEdge,TopoDS_Shape& aNewVertex,const TopoDS_Shape& aGenE,const TopoDS_Shape& aGenV,const Sweep_NumShape& aDirV) = 0;
Standard_EXPORT virtual TopoDS_Shape MakeEmptyFace(const TopoDS_Shape& aGenS,const Sweep_NumShape& aDirS) = 0;
Standard_EXPORT virtual void SetPCurve(const TopoDS_Shape& aNewFace,TopoDS_Shape& aNewEdge,const TopoDS_Shape& aGenF,const TopoDS_Shape& aGenE,const Sweep_NumShape& aDirV,const TopAbs_Orientation orien) = 0;
Standard_EXPORT virtual void SetGeneratingPCurve(const TopoDS_Shape& aNewFace,TopoDS_Shape& aNewEdge,const TopoDS_Shape& aGenE,const Sweep_NumShape& aDirE,const Sweep_NumShape& aDirV,const TopAbs_Orientation orien) = 0;
Standard_EXPORT virtual void SetDirectingPCurve(const TopoDS_Shape& aNewFace,TopoDS_Shape& aNewEdge,const TopoDS_Shape& aGenE,const TopoDS_Shape& aGenV,const Sweep_NumShape& aDirE,const TopAbs_Orientation orien) = 0;
Standard_EXPORT virtual TopAbs_Orientation DirectSolid(const TopoDS_Shape& aGenS,const Sweep_NumShape& aDirS) = 0;
Standard_EXPORT virtual Standard_Boolean GGDShapeIsToAdd(const TopoDS_Shape& aNewShape,const TopoDS_Shape& aNewSubShape,const TopoDS_Shape& aGenS,const TopoDS_Shape& aSubGenS,const Sweep_NumShape& aDirS) const = 0;
Standard_EXPORT virtual Standard_Boolean GDDShapeIsToAdd(const TopoDS_Shape& aNewShape,const TopoDS_Shape& aNewSubShape,const TopoDS_Shape& aGenS,const Sweep_NumShape& aDirS,const Sweep_NumShape& aSubDirS) const = 0;
Standard_EXPORT virtual Standard_Boolean SeparatedWires(const TopoDS_Shape& aNewShape,const TopoDS_Shape& aNewSubShape,const TopoDS_Shape& aGenS,const TopoDS_Shape& aSubGenS,const Sweep_NumShape& aDirS) const = 0;
Standard_EXPORT virtual TopoDS_Shape SplitShell(const TopoDS_Shape& aNewShape) const;
Standard_EXPORT virtual void SetContinuity(const TopoDS_Shape& aGenS,const Sweep_NumShape& aDirS) = 0;
Standard_EXPORT virtual Standard_Boolean HasShape(const TopoDS_Shape& aGenS,const Sweep_NumShape& aDirS) const = 0;
Standard_EXPORT TopoDS_Shape Shape(const TopoDS_Shape& aGenS,const Sweep_NumShape& aDirS) ;
Standard_EXPORT TopoDS_Shape Shape(const TopoDS_Shape& aGenS) ;
Standard_EXPORT TopoDS_Shape Shape() ;
Standard_EXPORT TopoDS_Shape FirstShape() ;
Standard_EXPORT TopoDS_Shape LastShape() ;
Standard_EXPORT TopoDS_Shape FirstShape(const TopoDS_Shape& aGenS) ;
Standard_EXPORT TopoDS_Shape LastShape(const TopoDS_Shape& aGenS) ;
Standard_EXPORT Standard_Boolean Closed() const;
protected:
// Methods PROTECTED
//
Standard_EXPORT BRepSweep_NumLinearRegularSweep(const BRepSweep_Builder& aBuilder,const TopoDS_Shape& aGenShape,const Sweep_NumShape& aDirWire);
// Fields PROTECTED
//
BRepSweep_Builder myBuilder;
TopoDS_Shape myGenShape;
Sweep_NumShape myDirWire;
BRepSweep_Tool myGenShapeTool;
Sweep_NumShapeTool myDirShapeTool;
BRepSweep_Array2OfShapesOfNumLinearRegularSweep myShapes;
TColStd_Array2OfBoolean myBuiltShapes;
private:
// Methods PRIVATE
//
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif

View File

@ -1,71 +0,0 @@
# 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.
proc BRepSweep_Replace:AdmFileType {} {
return "dbadmfile";
}
proc BRepSweep_Replace:OutputDirTypeName {} {
return "dbtmpfile";
}
proc BRepSweep_Replace:HandleInputFile { ID } {
scan $ID "%\[^:\]:%\[^:\]:%\[^:\]" unit type name
switch $name {
BRepSweep_NumLinearRegularSweep.hxx {return 1;}
default {
return 0;
}
}
}
proc BRepSweep_Replace:Execute { unit args } {
global tcl_interactive
set tcl_interactive 1
package require Wokutils
msgprint -i -c "BRepSweep_Replace:Execute" "Copying of BRepSweep includes"
if { [wokparam -e %Station $unit] != "wnt" } {
set copycmd "cp -p "
set replstr "/"
} {
set copycmd "cmd /c copy"
set replstr "\\\\\\\\"
}
foreach file $args {
scan $file "%\[^:\]:%\[^:\]:%\[^:\]" Unit type name
regsub ".hxx" $name ".hxx" sourcename
set source [woklocate -p BRepSweep:source:$sourcename [wokinfo -N $unit]]
set vistarget [woklocate -p BRepSweep:pubinclude:$name [wokinfo -N $unit]]
set target [wokinfo -p pubinclude:$name $unit]
regsub -all "/" " $source $target" $replstr TheArgs
msgprint -i -c "BRepSweep_Replace:Execute" "Copy $source to $target"
if { [file exist $target] && [wokparam -e %Station $unit] != "wnt" } {
eval exec "chmod u+w $target"
}
eval exec "$copycmd $TheArgs"
}
return 0;
}

View File

@ -1,24 +0,0 @@
-- Created by: JR
-- Copyright (c) 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.
@ifnotdefined ( %BRepSweep_WOKSteps_EDL) then
@set %BRepSweep_WOKSteps_EDL = "";
@string %WOKSteps_XcppGroup += " xcpp.repl ";
@set %WOKSteps_xcpp_repl = "*BRepSweep_Replace(xcpp.header)";
@endif;

View File

@ -1,3 +0,0 @@
BRepSweep_NumLinearRegularSweep.hxx
BRepSweep_WOKSteps.edl
BRepSweep_Replace.tcl

View File

@ -30,22 +30,21 @@ is
class Curve2dTool; class Curve2dTool;
class CLProps2d from Geom2dLProp class CLProps2d from Geom2dLProp instantiates
instantiates CLProps from LProp(Curve from Geom2d, CLProps from LProp(Curve from Geom2d,
Vec2d from gp, Vec2d from gp,
Pnt2d from gp, Pnt2d from gp,
Dir2d from gp, Dir2d from gp,
Curve2dTool from Geom2dLProp); Curve2dTool from Geom2dLProp);
class CurAndInf2d; class CurAndInf2d;
private class NumericCurInf2d instantiates NumericCurInf from LProp( private class FuncCurExt;
Curve from Geom2d, private class FuncCurNul;
Vec2d from gp, class NumericCurInf2d;
Pnt2d from gp, ---Purpose: Computes the locals extremas of curvature and the
Dir2d from gp, -- inflections of a bounded curve in 2d.
Curve2dTool from Geom2dLProp);
end Geom2dLProp;
end Geom2dLProp;

View File

@ -14,16 +14,17 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
private generic class FuncCurExt from LProp (Curve as any; private class FuncCurExt from Geom2dLProp inherits FunctionWithDerivative from math
Vec as any; -- as Vec or Vec2d
Pnt as any; -- as Pnt or Pnt2d
Dir as any; -- as Dir or Dir2d Vec
Tool as any) -- as Tool(Curve, Pnt, Vec)
inherits FunctionWithDerivative from math
---Purpose: Function used to find the extremas of curvature in 2d. ---Purpose: Function used to find the extremas of curvature in 2d.
uses Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp
is is
Create ( C : Curve ; Tol : Real) returns FuncCurExt from LProp; Create ( C : Curve from Geom2d ; Tol : Real) returns FuncCurExt from Geom2dLProp;
Value (me : in out; X : Real; F : out Real) Value (me : in out; X : Real; F : out Real)
---Purpose: Returns the value for the variable <X>. ---Purpose: Returns the value for the variable <X>.
@ -44,7 +45,7 @@ is
returns Boolean; returns Boolean;
fields fields
theCurve : Curve; theCurve : Curve from Geom2d;
epsX : Real from Standard; epsX : Real from Standard;
end FuncCurExt; end FuncCurExt;

View File

@ -14,6 +14,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <Geom2dLProp_FuncCurExt.ixx>
#include <gp_Pnt2d.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <gp.hxx> #include <gp.hxx>
#include <Precision.hxx> #include <Precision.hxx>
@ -21,9 +26,9 @@
//function : //function :
// purpose : // purpose :
//============================================================================= //=============================================================================
LProp_FuncCurExt::LProp_FuncCurExt(const Curve& C, Geom2dLProp_FuncCurExt::Geom2dLProp_FuncCurExt(const Handle(Geom2d_Curve)& C,
const Standard_Real Tol) const Standard_Real Tol)
:theCurve(C) :theCurve(C)
{ {
epsX = Tol; epsX = Tol;
} }
@ -33,13 +38,13 @@ LProp_FuncCurExt::LProp_FuncCurExt(const Curve& C,
// purpose : KC = (V1^V2.Z) / ||V1||^3 avec V1 tangente etV2 derivee seconde. // purpose : KC = (V1^V2.Z) / ||V1||^3 avec V1 tangente etV2 derivee seconde.
// F = d KC/ dU. // F = d KC/ dU.
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurExt::Value (const Standard_Real X, Standard_Boolean Geom2dLProp_FuncCurExt::Value (const Standard_Real X,
Standard_Real& F) Standard_Real& F)
{ {
Pnt P1; gp_Pnt2d P1;
Vec V1,V2,V3; gp_Vec2d V1,V2,V3;
Tool::D3(theCurve,X,P1,V1,V2,V3); Geom2dLProp_Curve2dTool::D3(theCurve,X,P1,V1,V2,V3);
Standard_Real CPV1V2 = V1.Crossed(V2); Standard_Real CPV1V2 = V1.Crossed(V2);
Standard_Real CPV1V3 = V1.Crossed(V3); Standard_Real CPV1V3 = V1.Crossed(V3);
Standard_Real V1V2 = V1.Dot(V2); Standard_Real V1V2 = V1.Dot(V2);
@ -60,8 +65,8 @@ Standard_Boolean LProp_FuncCurExt::Value (const Standard_Real X,
//function : Derivative //function : Derivative
// purpose : // purpose :
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurExt::Derivative(const Standard_Real X, Standard_Boolean Geom2dLProp_FuncCurExt::Derivative(const Standard_Real X,
Standard_Real& D) Standard_Real& D)
{ {
Standard_Real F; Standard_Real F;
return Values (X,F,D) ; return Values (X,F,D) ;
@ -71,14 +76,14 @@ Standard_Boolean LProp_FuncCurExt::Derivative(const Standard_Real X,
//function : Values //function : Values
// purpose : // purpose :
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurExt::Values (const Standard_Real X, Standard_Boolean Geom2dLProp_FuncCurExt::Values (const Standard_Real X,
Standard_Real& F, Standard_Real& F,
Standard_Real& D) Standard_Real& D)
{ {
Standard_Real F2; Standard_Real F2;
Standard_Real Dx= epsX/100.; Standard_Real Dx= epsX/100.;
if (X+Dx > Tool::LastParameter(theCurve)) {Dx = - Dx;} if (X+Dx > Geom2dLProp_Curve2dTool::LastParameter(theCurve)) {Dx = - Dx;}
Value (X,F); Value (X,F);
Value (X+Dx,F2); Value (X+Dx,F2);
@ -93,14 +98,14 @@ Standard_Boolean LProp_FuncCurExt::Values (const Standard_Real X,
// purpose : Teste si le parametere coorespond a un minimum du rayon de courbure // purpose : Teste si le parametere coorespond a un minimum du rayon de courbure
// par comparaison avec un point voisin. // par comparaison avec un point voisin.
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurExt::IsMinKC (const Standard_Real X) const Standard_Boolean Geom2dLProp_FuncCurExt::IsMinKC (const Standard_Real X) const
{ {
Pnt P1; gp_Pnt2d P1;
Vec V1,V2,V3; gp_Vec2d V1,V2,V3;
Standard_Real Dx= epsX; Standard_Real Dx= epsX;
Standard_Real KC,KP; Standard_Real KC,KP;
Tool::D3(theCurve,X,P1,V1,V2,V3); Geom2dLProp_Curve2dTool::D3(theCurve,X,P1,V1,V2,V3);
Standard_Real CPV1V2 = V1.Crossed(V2); Standard_Real CPV1V2 = V1.Crossed(V2);
Standard_Real V1V1 = V1.SquareMagnitude(); Standard_Real V1V1 = V1.SquareMagnitude();
Standard_Real NV1 = Sqrt(V1V1); Standard_Real NV1 = Sqrt(V1V1);
@ -110,14 +115,14 @@ Standard_Boolean LProp_FuncCurExt::IsMinKC (const Standard_Real X) const
KC = CPV1V2/V13; KC = CPV1V2/V13;
if (X+Dx > Tool::LastParameter(theCurve)) {Dx = - Dx;} if (X+Dx > Geom2dLProp_Curve2dTool::LastParameter(theCurve)) {Dx = - Dx;}
Tool::D3(theCurve,X+Dx,P1,V1,V2,V3); Geom2dLProp_Curve2dTool::D3(theCurve,X+Dx,P1,V1,V2,V3);
CPV1V2 = V1.Crossed(V2); CPV1V2 = V1.Crossed(V2);
V1V1 = V1.SquareMagnitude(); V1V1 = V1.SquareMagnitude();
NV1 = Sqrt(V1V1); NV1 = Sqrt(V1V1);
V13 = V1V1*NV1; V13 = V1V1*NV1;
if (V13 < gp::Resolution()) { return Standard_False;} if (V13 < gp::Resolution()) { return Standard_False;}
KP = CPV1V2/V13; KP = CPV1V2/V13;

View File

@ -14,16 +14,18 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
private generic class FuncCurNul from LProp (Curve as any; private class FuncCurNul from Geom2dLProp inherits FunctionWithDerivative from math
Vec as any; -- as Vec or Vec2d
Pnt as any; -- as Pnt or Pnt2d
Dir as any; -- as Dir or Dir2d Vec
Tool as any) -- as Tool(Curve, Pnt, Vec)
inherits FunctionWithDerivative from math
---Purpose: Function used to find the inflections in 2d. ---Purpose: Function used to find the inflections in 2d.
uses
Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp
is is
Create ( C : Curve) returns FuncCurNul from LProp; Create ( C : Curve from Geom2d) returns FuncCurNul from Geom2dLProp;
Value (me : in out; X : Real; F : out Real) Value (me : in out; X : Real; F : out Real)
---Purpose: Returns the value for the variable <X>. ---Purpose: Returns the value for the variable <X>.
@ -39,7 +41,7 @@ is
returns Boolean; returns Boolean;
fields fields
theCurve : Curve; theCurve : Curve from Geom2d;
end FuncCurNul; end FuncCurNul;

View File

@ -14,6 +14,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <Geom2dLProp_FuncCurNul.ixx>
#include <gp_Pnt2d.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <gp.hxx> #include <gp.hxx>
#include <Precision.hxx> #include <Precision.hxx>
@ -21,7 +26,7 @@
//function : //function :
// purpose : // purpose :
//============================================================================= //=============================================================================
LProp_FuncCurNul::LProp_FuncCurNul(const Curve& C) Geom2dLProp_FuncCurNul::Geom2dLProp_FuncCurNul(const Handle(Geom2d_Curve)& C)
:theCurve(C) :theCurve(C)
{ {
} }
@ -30,7 +35,7 @@ LProp_FuncCurNul::LProp_FuncCurNul(const Curve& C)
//function : Value //function : Value
// purpose : F = (V1^V2.Z)/||V1||*||V2|| // purpose : F = (V1^V2.Z)/||V1||*||V2||
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurNul::Value (const Standard_Real X, Standard_Boolean Geom2dLProp_FuncCurNul::Value (const Standard_Real X,
Standard_Real& F) Standard_Real& F)
{ {
Standard_Real D; Standard_Real D;
@ -41,7 +46,7 @@ Standard_Boolean LProp_FuncCurNul::Value (const Standard_Real X,
//function : Derivative //function : Derivative
// purpose : // purpose :
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurNul::Derivative(const Standard_Real X, Standard_Boolean Geom2dLProp_FuncCurNul::Derivative(const Standard_Real X,
Standard_Real& D) Standard_Real& D)
{ {
Standard_Real F; Standard_Real F;
@ -52,13 +57,13 @@ Standard_Boolean LProp_FuncCurNul::Derivative(const Standard_Real X,
//function : Values //function : Values
// purpose : F = (V1^V2.Z)/||V1||*||V2|| // purpose : F = (V1^V2.Z)/||V1||*||V2||
//============================================================================= //=============================================================================
Standard_Boolean LProp_FuncCurNul::Values (const Standard_Real X, Standard_Boolean Geom2dLProp_FuncCurNul::Values (const Standard_Real X,
Standard_Real& F, Standard_Real& F,
Standard_Real& D) Standard_Real& D)
{ {
Pnt P1; gp_Pnt2d P1;
Vec V1,V2,V3; gp_Vec2d V1,V2,V3;
Tool::D3(theCurve,X,P1,V1,V2,V3); Geom2dLProp_Curve2dTool::D3(theCurve,X,P1,V1,V2,V3);
Standard_Real CP1 = V1.Crossed(V2); Standard_Real CP1 = V1.Crossed(V2);
Standard_Real CP2 = V1.Crossed(V3); Standard_Real CP2 = V1.Crossed(V3);
Standard_Real V1V2 = V1.Dot(V2); Standard_Real V1V2 = V1.Dot(V2);

View File

@ -14,34 +14,33 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
generic class NumericCurInf from LProp (Curve as any; class NumericCurInf2d from Geom2dLProp
Vec as any; -- as Vec or Vec2d
Pnt as any; -- as Pnt or Pnt2d ---Purpose: Computes the locals extremas of curvature and the
Dir as any; -- as Dir or Dir2d Vec -- inflections of a bounded curve in 2d.
Tool as any) -- as Tool(Curve, Pnt, Vec)
---Purpose: Computes the locals extremas of curvature and the
-- inflections of a bounded curve in 2d.
uses uses
CurAndInf from LProp CurAndInf from LProp,
Curve from Geom2d,
Vec2d from gp,
Pnt2d from gp,
Dir2d from gp,
Curve2dTool from Geom2dLProp
private class FCurExt instantiates FuncCurExt from LProp (Curve,Vec,Pnt,Dir,Tool);
private class FCurNul instantiates FuncCurNul from LProp (Curve,Vec,Pnt,Dir,Tool);
is is
Create; Create;
PerformCurExt (me : in out; C : Curve; Result : in out CurAndInf) PerformCurExt (me : in out; C : Curve from Geom2d; Result : in out CurAndInf)
---Purpose: Computes the locals extremas of curvature. ---Purpose: Computes the locals extremas of curvature.
is static; is static;
PerformInf (me : in out; C : Curve; Result : in out CurAndInf) PerformInf (me : in out; C : Curve from Geom2d; Result : in out CurAndInf)
---Purpose: Computes the inflections. ---Purpose: Computes the inflections.
is static; is static;
PerformCurExt (me : in out; PerformCurExt (me : in out;
C : Curve ; C : Curve from Geom2d ;
UMin : Real; UMin : Real;
UMax : Real; UMax : Real;
Result : in out CurAndInf) Result : in out CurAndInf)
@ -50,7 +49,7 @@ is
is static; is static;
PerformInf (me : in out; PerformInf (me : in out;
C : Curve ; C : Curve from Geom2d ;
UMin : Real; UMin : Real;
UMax : Real; UMax : Real;
Result : in out CurAndInf) Result : in out CurAndInf)
@ -65,4 +64,4 @@ is
fields fields
isDone : Boolean from Standard; isDone : Boolean from Standard;
end NumericCurInf; end NumericCurInf2d;

View File

@ -14,6 +14,12 @@
// Alternatively, this file may be used under the terms of Open CASCADE // Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement. // commercial license or contractual agreement.
#include <Geom2dLProp_NumericCurInf2d.ixx>
#include <Geom2dLProp_FuncCurExt.hxx>
#include <Geom2dLProp_FuncCurNul.hxx>
#include <Geom2dLProp_Curve2dTool.hxx>
#include <math_FunctionRoots.hxx> #include <math_FunctionRoots.hxx>
#include <math_BracketedRoot.hxx> #include <math_BracketedRoot.hxx>
#include <Precision.hxx> #include <Precision.hxx>
@ -22,26 +28,26 @@
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
LProp_NumericCurInf::LProp_NumericCurInf() Geom2dLProp_NumericCurInf2d::Geom2dLProp_NumericCurInf2d()
{ {
} }
//======================================================================= //=======================================================================
//function : PerformCurExt //function : PerformCurExt
//purpose : //purpose :
//======================================================================= //=======================================================================
void LProp_NumericCurInf::PerformCurExt (const Curve& C,LProp_CurAndInf& Result) void Geom2dLProp_NumericCurInf2d::PerformCurExt (const Handle(Geom2d_Curve)& C,LProp_CurAndInf& Result)
{ {
PerformCurExt(C,Tool::FirstParameter(C),Tool::LastParameter(C),Result); PerformCurExt(C,Geom2dLProp_Curve2dTool::FirstParameter(C),Geom2dLProp_Curve2dTool::LastParameter(C),Result);
} }
//======================================================================= //=======================================================================
//function : PerformCurExt //function : PerformCurExt
//purpose : //purpose :
//======================================================================= //=======================================================================
void LProp_NumericCurInf::PerformCurExt (const Curve& C, void Geom2dLProp_NumericCurInf2d::PerformCurExt (const Handle(Geom2d_Curve)& C,
const Standard_Real UMin, const Standard_Real UMin,
const Standard_Real UMax, const Standard_Real UMax,
LProp_CurAndInf& Result) LProp_CurAndInf& Result)
{ {
isDone = Standard_True; isDone = Standard_True;
@ -51,7 +57,7 @@ void LProp_NumericCurInf::PerformCurExt (const Curve& C,
// la premiere recherce se fait avec une tolerance assez grande // la premiere recherce se fait avec une tolerance assez grande
// car la derivee de la fonction est estimee assez grossierement. // car la derivee de la fonction est estimee assez grossierement.
LProp_FCurExt F(C,EpsH); Geom2dLProp_FuncCurExt F(C,EpsH);
Standard_Integer NbSamples = 100; Standard_Integer NbSamples = 100;
Standard_Boolean SolType; Standard_Boolean SolType;
@ -62,9 +68,9 @@ void LProp_NumericCurInf::PerformCurExt (const Curve& C,
Standard_Real Param = SolRoot.Value(j); Standard_Real Param = SolRoot.Value(j);
// la solution est affinee. // la solution est affinee.
math_BracketedRoot BS (F, math_BracketedRoot BS (F,
Param - EpsH, Param - EpsH,
Param + EpsH, Param + EpsH,
Tol); Tol);
if (BS.IsDone()) {Param = BS.Root();} if (BS.IsDone()) {Param = BS.Root();}
SolType = F.IsMinKC(Param); SolType = F.IsMinKC(Param);
Result.AddExtCur(Param,SolType); Result.AddExtCur(Param,SolType);
@ -79,22 +85,22 @@ void LProp_NumericCurInf::PerformCurExt (const Curve& C,
//function : PerformInf //function : PerformInf
//purpose : //purpose :
//======================================================================= //=======================================================================
void LProp_NumericCurInf::PerformInf(const Curve& C,LProp_CurAndInf& Result) void Geom2dLProp_NumericCurInf2d::PerformInf(const Handle(Geom2d_Curve)& C,LProp_CurAndInf& Result)
{ {
PerformInf(C,Tool::FirstParameter(C),Tool::LastParameter(C),Result); PerformInf(C,Geom2dLProp_Curve2dTool::FirstParameter(C),Geom2dLProp_Curve2dTool::LastParameter(C),Result);
} }
//======================================================================= //=======================================================================
//function : PerformInf //function : PerformInf
//purpose : //purpose :
//======================================================================= //=======================================================================
void LProp_NumericCurInf::PerformInf(const Curve& C, void Geom2dLProp_NumericCurInf2d::PerformInf(const Handle(Geom2d_Curve)& C,
const Standard_Real UMin, const Standard_Real UMin,
const Standard_Real UMax, const Standard_Real UMax,
LProp_CurAndInf& Result) LProp_CurAndInf& Result)
{ {
isDone = Standard_True; isDone = Standard_True;
LProp_FCurNul F(C); Geom2dLProp_FuncCurNul F(C);
Standard_Real EpsX = 1.e-6; Standard_Real EpsX = 1.e-6;
Standard_Real EpsF = 1.e-6; Standard_Real EpsF = 1.e-6;
Standard_Integer NbSamples = 30; Standard_Integer NbSamples = 30;
@ -115,7 +121,7 @@ void LProp_NumericCurInf::PerformInf(const Curve& C,
//function : IsDone //function : IsDone
//purpose : //purpose :
//======================================================================= //=======================================================================
Standard_Boolean LProp_NumericCurInf::IsDone() const Standard_Boolean Geom2dLProp_NumericCurInf2d::IsDone() const
{ {
return isDone; return isDone;
} }

View File

@ -72,12 +72,6 @@ is
class AnalyticCurInf; class AnalyticCurInf;
---Purpose: Computes the locals extremas of curvature of a gp curve. ---Purpose: Computes the locals extremas of curvature of a gp curve.
private generic class FuncCurExt;
private generic class FuncCurNul;
generic class NumericCurInf, FCurExt, FCurNul;
---Purpose: Computes the locals extremas of curvature and the
-- inflections of a bounded curve in 2d.
private class SequenceOfCIType instantiates Sequence from TCollection private class SequenceOfCIType instantiates Sequence from TCollection
(CIType from LProp); (CIType from LProp);

View File

@ -1,50 +0,0 @@
-- Created on: 1991-07-23
-- Created by: Christophe MARION
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package Primitives
---Purpose: This package describes algorithms to build
-- topological primitives.
--
-- The algorithms in this package are generic. It
-- contains :
--
-- * The Builder signature class. Describes the
-- services required from the Topology Data
-- Structure to build the following primitives.
--
-- * The OneAxis generic class. Algorithm used to
-- build rotational primitives.
--
-- * The Wedge generic class. Algorithm to build
-- boxes and wedges.
uses
gp -- gp provides all geometrical information
is
enumeration Direction is
---Purpose:
XMin, XMax, YMin, YMax, ZMin, ZMax
end Direction;
deferred generic class OneAxis;
generic class Wedge;
end Primitives;

View File

@ -28,11 +28,6 @@ uses
is is
deferred generic class LinearRegularSweep,
Array2OfShapes,
SequenceOfShapes;
-- --
-- The following classes provides a directing topology for the -- The following classes provides a directing topology for the
-- LinearRegularSweep. This is the topology of an open or -- LinearRegularSweep. This is the topology of an open or

View File

@ -1,5 +1,4 @@
BRepPrim BRepPrim
Primitives
BRepSweep BRepSweep
Sweep Sweep
BRepPrimAPI BRepPrimAPI