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

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

112
src/GccEnt/GccEnt.cdl Executable file
View File

@@ -0,0 +1,112 @@
-- File: GccEnt.cdl
-- Created: Tue Mar 5 12:06:03 1991
-- Author: Remy GILET
-- <reg@topsn3>
---Copyright: Matra Datavision 1991
package GccEnt
---Purpose: This package provides an implementation of the qualified
-- entities useful to create 2d entities with geometric
-- constraints. The qualifier explains which subfamily of
-- solutions we want to obtain. It uses the following law: the
-- matter/the interior side is at the left of the line, if we go
-- from the beginning to the end.
-- The qualifiers are:
-- Enclosing : the solution(s) must enclose the argument.
-- Enclosed : the solution(s) must be enclosed in the
-- argument.
-- Outside : both the solution(s) and the argument must be
-- outside to each other.
-- Unqualified : the position is undefined, so give all the
-- solutions.
-- The use of a qualifier is always required if such
-- subfamilies exist. For example, it is not used for a point.
-- Note: the interior of a curve is defined as the left-hand
-- side of the curve in relation to its orientation.
uses gp,
Standard,
TCollection
is
--- Level : Public
-- All methods of all classes will be public.
-- General deferred classes of geometric qualifiers:
exception BadQualifier inherits DomainError from Standard;
class QualifiedLin;
class QualifiedCirc;
generic class QualifiedCurv;
enumeration Position is
unqualified, enclosing, enclosed, outside, noqualifier;
---Purpose:
-- Qualifies the position of a solution of a construction
-- algorithm with respect to one of its arguments. This is one of the following:
-- - GccEnt_unqualified: the position of the solution
-- is undefined with respect to the argument,
-- - GccEnt_enclosing: the solution encompasses the argument,
-- - GccEnt_enclosed: the solution is encompassed by the argument,
-- - GccEnt_outside: the solution and the argument
-- are external to one another,
-- - GccEnt_noqualifier: the value returned during a
-- consultation of the qualifier when the argument is
-- defined as GccEnt_unqualified.
-- Note: the interior of a line or any open curve is
-- defined as the left-hand side of the line or curve in
-- relation to its orientation.
class Array1OfPosition instantiates
Array1 from TCollection (Position from GccEnt);
Unqualified(Obj : Lin2d from gp) returns QualifiedLin;
---Purpose: Constructs a qualified line,
-- so that the relative position to the circle or line of the
-- solution computed by a construction algorithm using the
-- qualified circle or line is not qualified, i.e. all solutions apply.
Unqualified(Obj : Circ2d from gp) returns QualifiedCirc;
---Purpose: Constructs a qualified circle
-- so that the relative position to the circle or line of the
-- solution computed by a construction algorithm using the
-- qualified circle or line is not qualified, i.e. all solutions apply.
Enclosing(Obj : Circ2d from gp) returns QualifiedCirc;
---Purpose:
-- Constructs such a qualified circle that the solution
-- computed by a construction algorithm using the qualified
-- circle encloses the circle.
Enclosed(Obj : Lin2d from gp) returns QualifiedLin;
---Purpose: Constructs a qualified line,
-- so that the solution computed by a construction
-- algorithm using the qualified circle or line is enclosed by
-- the circle or line.
Enclosed(Obj : Circ2d from gp) returns QualifiedCirc;
---Purpose: Constructs a qualified circle
-- so that the solution computed by a construction
-- algorithm using the qualified circle or line is enclosed by
-- the circle or line.
Outside(Obj : Lin2d from gp) returns QualifiedLin;
---Purpose: Constructs a qualified line,
-- so that the solution computed by a construction
-- algorithm using the qualified circle or line and the circle
-- or line are external to one another.
Outside(Obj : Circ2d from gp) returns QualifiedCirc;
---Purpose: Constructs a qualified circle
-- so that the solution computed by a construction
-- algorithm using the qualified circle or line and the circle
-- or line are external to one another.
end GccEnt;

43
src/GccEnt/GccEnt.cxx Executable file
View File

@@ -0,0 +1,43 @@
// File GccEnt.cxx, REG 13/08/91
//=========================================================================
// Methodes de package permettant de qualifier les objets. +
// +
//=========================================================================
#include <GccEnt.ixx>
GccEnt_QualifiedLin
GccEnt::Unqualified(const gp_Lin2d& Line) {
return GccEnt_QualifiedLin(Line,GccEnt_unqualified);
}
GccEnt_QualifiedCirc
GccEnt::Unqualified(const gp_Circ2d& Circle) {
return GccEnt_QualifiedCirc(Circle,GccEnt_unqualified);
}
GccEnt_QualifiedCirc
GccEnt::Enclosing(const gp_Circ2d& Circle) {
return GccEnt_QualifiedCirc(Circle,GccEnt_enclosing);
}
GccEnt_QualifiedLin
GccEnt::Enclosed(const gp_Lin2d& Line) {
return GccEnt_QualifiedLin(Line,GccEnt_enclosed);
}
GccEnt_QualifiedCirc
GccEnt::Enclosed(const gp_Circ2d& Circle) {
return GccEnt_QualifiedCirc(Circle,GccEnt_enclosed);
}
GccEnt_QualifiedCirc
GccEnt::Outside(const gp_Circ2d& Circle) {
return GccEnt_QualifiedCirc(Circle,GccEnt_outside);
}
GccEnt_QualifiedLin
GccEnt::Outside(const gp_Lin2d& Line) {
return GccEnt_QualifiedLin(Line,GccEnt_outside);
}

View File

@@ -0,0 +1,85 @@
-- File: QualifiedCirc.cdl<2>
-- Created: Mon Apr 15 15:32:39 1991
-- Author: Philippe DAUTRY
-- <fid@phobox>
---Copyright: Matra Datavision 1991
class QualifiedCirc
from GccEnt
---Purpose: Creates a qualified 2d Circle.
-- A qualified 2D circle is a circle (gp_Circ2d circle) with a
-- qualifier which specifies whether the solution of a
-- construction algorithm using the qualified circle (as an argument):
-- - encloses the circle, or
-- - is enclosed by the circle, or
-- - is built so that both the circle and it are external to one another, or
-- - is undefined (all solutions apply).
inherits Storable from Standard
uses Position from GccEnt,
Circ2d from gp
is
Create(Qualified : Circ2d from gp ;
Qualifier : Position from GccEnt ) returns QualifiedCirc from GccEnt;
---Purpose: Constructs a qualified circle by assigning the qualifier
-- Qualifier to the circle Qualified. Qualifier may be:
-- - GccEnt_enclosing if the solution computed by a
-- construction algorithm using the qualified circle
-- encloses the circle, or
-- - GccEnt_enclosed if the solution is enclosed by the circle, or
-- - GccEnt_outside if both the solution and the circle
-- are external to one another, or
-- - GccEnt_unqualified if all solutions apply.
Qualified(me) returns Circ2d from gp
is static;
---Purpose: Returns a 2D circle to which the qualifier is assigned.
Qualifier(me) returns Position from GccEnt
is static;
---Purpose: Returns
-- - the qualifier of this qualified circle, if it is enclosing,
-- enclosed or outside, or
-- - GccEnt_noqualifier if it is unqualified.
IsUnqualified(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the Circ2d is Unqualified and false in
-- the other cases.
IsEnclosing(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution computed by a construction
-- algorithm using this qualified circle encloses the circle.
IsEnclosed(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution computed by a construction
-- algorithm using this qualified circle is enclosed by the circle.
IsOutside(me) returns Boolean from Standard
is static;
---Purpose: Returns true if both the solution computed by a
-- construction algorithm using this qualified circle and the
-- circle are external to one another.
fields
TheQualified : Circ2d from gp;
TheQualifier : Position from GccEnt;
--friends
--Unqualified (Obj : Circ2d) from GccEnt,
--Enclosing (Obj : Circ2d) from GccEnt,
--Enclosed (Obj : Circ2d) from GccEnt,
--Outside (Obj : Circ2d) from GccEnt
end QualifiedCirc;

View File

@@ -0,0 +1,41 @@
//File GccEnt_QualifiedCirc.cxx, REG 19/07/91
#include <GccEnt_QualifiedCirc.ixx>
gp_Circ2d GccEnt_QualifiedCirc::
Qualified () const { return TheQualified; }
GccEnt_Position GccEnt_QualifiedCirc::
Qualifier () const { return TheQualifier; }
Standard_Boolean GccEnt_QualifiedCirc::
IsUnqualified () const {
if (TheQualifier == GccEnt_unqualified ) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedCirc::
IsEnclosing () const {
if (TheQualifier == GccEnt_enclosing) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedCirc::
IsEnclosed () const {
if (TheQualifier == GccEnt_enclosed) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedCirc::
IsOutside () const {
if (TheQualifier == GccEnt_outside) { return Standard_True; }
else { return Standard_False; }
}
GccEnt_QualifiedCirc::
GccEnt_QualifiedCirc (const gp_Circ2d& Qualified,
const GccEnt_Position Qualifier) {
TheQualified = Qualified;
TheQualifier = Qualifier;
}

View File

@@ -0,0 +1,60 @@
-- File: QualifiedCurv.cdl
-- Created: Mon Apr 15 15:34:24 1991
-- Author: Philippe DAUTRY
-- <fid@phobox>
---Copyright: Matra Datavision 1991
generic class QualifiedCurv from GccEnt (TheCurve as any)
---Purpose: Creates a qualified 2d line.
uses Position from GccEnt
is
Create(Curve : TheCurve ;
Qualifier : Position from GccEnt )
returns QualifiedCurv from GccEnt;
-- is private;
Qualified(me) returns TheCurve
is static;
Qualifier(me) returns Position from GccEnt
is static;
IsUnqualified(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is unqualified and false in the
-- other cases.
IsEnclosing(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Enclosing the Curv and false in
-- the other cases.
IsEnclosed(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Enclosed in the Curv and false in
-- the other cases.
IsOutside(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Outside the Curv and false in
-- the other cases.
fields
TheQualifier : Position from GccEnt;
TheQualified : TheCurve;
-- friends
-- Unqualified(Obj : Curv2d) from GccEnt,
-- Enclosing (Obj : Curv2d) from GccEnt,
-- Enclosed (Obj : Curv2d) from GccEnt,
-- Outside (Obj : Curv2d) from GccEnt
end QualifiedCurv;

View File

@@ -0,0 +1,38 @@
//File GccEnt_QualifiedCurv.gxx, REG 19/08/91
TheCurve GccEnt_QualifiedCurv::
Qualified () const { return TheQualified; }
GccEnt_Position GccEnt_QualifiedCurv::
Qualifier () const { return TheQualifier; }
Standard_Boolean GccEnt_QualifiedCurv::
IsUnqualified () const {
if (TheQualifier == GccEnt_unqualified ) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedCurv::
IsEnclosing () const {
if (TheQualifier == GccEnt_enclosing) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedCurv::
IsEnclosed () const {
if (TheQualifier == GccEnt_enclosed) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedCurv::
IsOutside () const {
if (TheQualifier == GccEnt_outside) { return Standard_True; }
else { return Standard_False; }
}
GccEnt_QualifiedCurv::
GccEnt_QualifiedCurv (const TheCurve& Curve,
const GccEnt_Position Qualifier) {
TheQualified = Curve;
TheQualifier = Qualifier;
}

View File

@@ -0,0 +1,81 @@
-- File: QualifiedLin.cdl
-- Created: Mon Apr 15 15:19:09 1991
-- Author: Philippe DAUTRY
-- <fid@phobox>
---Copyright: Matra Datavision 1991
class QualifiedLin
from GccEnt
inherits Storable from Standard
--- Purpose: Describes a qualified 2D line.
-- A qualified 2D line is a line (gp_Lin2d line) with a
-- qualifier which specifies whether the solution of a
-- construction algorithm using the qualified line (as an argument):
-- - is 'enclosed' by the line, or
-- - is built so that both the line and it are external to one another, or
-- - is undefined (all solutions apply).
-- Note: the interior of a line is defined as the left-hand
-- side of the line in relation to its orientation (i.e. when
-- moving from the start to the end of the curve).
uses Position from GccEnt,
Lin2d from gp
is
Create(Qualified : Lin2d from gp ;
Qualifier : Position from GccEnt )
returns QualifiedLin from GccEnt;
---Purpose:
-- Constructs a qualified line by assigning the qualifier
-- Qualifier to the line Qualified.
-- Qualifier may be:
-- - GccEnt_enclosed if the solution is enclosed by the line, or
-- - GccEnt_outside if both the solution and the line are external to one another, or
-- - GccEnt_unqualified if all solutions apply.
-- Note : the interior of a line is defined as the left-hand
-- side of the line in relation to its orientation.
Qualified(me) returns Lin2d from gp
is static;
---Purpose: Returns a 2D line to which the qualifier is assigned.
Qualifier(me) returns Position from GccEnt
is static;
---Purpose:
-- Returns the qualifier of this qualified line, if it is "enclosed" or
-- "outside", or
-- - GccEnt_noqualifier if it is unqualified.
IsUnqualified(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is unqualified and false in
-- the other cases.
IsEnclosed(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Enclosed in the Lin2d and false in
-- the other cases.
IsOutside(me) returns Boolean from Standard
is static;
---Purpose: Returns true if the solution is Outside the Lin2d and false in
-- the other cases.
fields
TheQualifier : Position from GccEnt;
TheQualified : Lin2d from gp;
--friends
--Unqualified(Obj : Lin2d) from GccEnt,
--Enclosed (Obj : Lin2d) from GccEnt,
--Outside (Obj : Lin2d) from GccEnt
end QualifiedLin;

View File

@@ -0,0 +1,36 @@
// File GccEnt_QualifiedLin.cxx, REG 02/08/91
#include <GccEnt_QualifiedLin.ixx>
gp_Lin2d GccEnt_QualifiedLin::
Qualified () const { return TheQualified; }
GccEnt_Position GccEnt_QualifiedLin::
Qualifier () const { return TheQualifier; }
Standard_Boolean GccEnt_QualifiedLin::
IsUnqualified () const {
if (TheQualifier == GccEnt_unqualified) { return Standard_True; }
else { return Standard_False; }
}
Standard_Boolean GccEnt_QualifiedLin::
IsEnclosed () const {
return (TheQualifier == GccEnt_enclosed);
}
Standard_Boolean GccEnt_QualifiedLin::
IsOutside () const {
if (TheQualifier == GccEnt_outside) { return Standard_True; }
else { return Standard_False; }
}
GccEnt_QualifiedLin::
GccEnt_QualifiedLin (const gp_Lin2d& Qualified,
const GccEnt_Position Qualifier) {
TheQualified = Qualified;
TheQualifier = Qualifier;
}