mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
48
src/PTopLoc/PTopLoc.cdl
Executable file
48
src/PTopLoc/PTopLoc.cdl
Executable file
@@ -0,0 +1,48 @@
|
||||
-- File: PTopLoc.cdl
|
||||
-- Created: Wed Mar 3 15:51:14 1993
|
||||
-- Author: Remi LEQUETTE
|
||||
-- <rle@phobox>
|
||||
-- Update: fma
|
||||
---Copyright: Matra Datavision 1993
|
||||
|
||||
|
||||
package PTopLoc
|
||||
|
||||
---Purpose: The PTopLoc package describes persistent
|
||||
-- structures for 3D local coordinate systems.
|
||||
--
|
||||
-- The class Datum3D describes an elementary local
|
||||
-- coordinate system. It is a linear transformation
|
||||
-- (Trsf from gp). The transformation is rigid
|
||||
-- (Rotation + Translation).
|
||||
--
|
||||
-- The private class ItemLocation represents an
|
||||
-- elementary local coordinate system (Datum3D)
|
||||
-- raised to an Integer power elevation. It is used
|
||||
-- to link coordinate systems in a Location.
|
||||
--
|
||||
-- The class Location describes a local coordinate
|
||||
-- system. It is a chain of elementary local
|
||||
-- coordinate systems raised to power elevations. The
|
||||
-- Location keeps track of how the coordinate system
|
||||
-- was built.
|
||||
|
||||
uses
|
||||
|
||||
Standard,
|
||||
gp
|
||||
|
||||
is
|
||||
class Datum3D;
|
||||
-- inherits Persistent from Standard
|
||||
---Purpose: Persistent elementary local coordinate system.
|
||||
|
||||
private class ItemLocation;
|
||||
-- inherits Persistent from Standard
|
||||
---Purpose: Persistent class used to implement Locations.
|
||||
|
||||
class Location;
|
||||
-- inherits Storable from Standard
|
||||
---Purpose: Storable composite local coordinate system.
|
||||
|
||||
end PTopLoc;
|
39
src/PTopLoc/PTopLoc_Datum3D.cdl
Executable file
39
src/PTopLoc/PTopLoc_Datum3D.cdl
Executable file
@@ -0,0 +1,39 @@
|
||||
-- File: PTopLoc_Datum3D.cdl
|
||||
-- Created: Wed Mar 3 16:18:51 1993
|
||||
-- Author: Remi LEQUETTE
|
||||
-- <rle@phobox>
|
||||
-- Update: fma
|
||||
---Copyright: Matra Datavision 1993
|
||||
|
||||
|
||||
class Datum3D from PTopLoc inherits Persistent from Standard
|
||||
|
||||
---Purpose: An elementary local coordinate system. It may be
|
||||
-- shared in the Database.
|
||||
|
||||
uses
|
||||
Trsf from gp
|
||||
|
||||
raises
|
||||
ConstructionError from Standard
|
||||
|
||||
is
|
||||
Create(T : Trsf from gp) returns mutable Datum3D from PTopLoc
|
||||
---Purpose: Creates a local coordinate system with the
|
||||
-- transformation. An error is raised if the
|
||||
-- transformation is not rigid.
|
||||
---Level: Internal
|
||||
raises
|
||||
ConstructionError from Standard;
|
||||
|
||||
Transformation(me) returns Trsf from gp
|
||||
---Purpose: Returns the transformation defining the coordinate
|
||||
-- system.
|
||||
---Level: Internal
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
myTrsf : Trsf from gp;
|
||||
|
||||
end Datum3D;
|
37
src/PTopLoc/PTopLoc_Datum3D.cxx
Executable file
37
src/PTopLoc/PTopLoc_Datum3D.cxx
Executable file
@@ -0,0 +1,37 @@
|
||||
// File: PTopLoc_Datum3D.cxx
|
||||
// Created: Wed Mar 3 18:19:54 1993
|
||||
// Author: Remi LEQUETTE
|
||||
// <rle@phobox>
|
||||
|
||||
|
||||
#include <PTopLoc_Datum3D.ixx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : PTopLoc_Datum3D
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
PTopLoc_Datum3D::PTopLoc_Datum3D(const gp_Trsf& T) :
|
||||
myTrsf(T)
|
||||
{
|
||||
// Update 7-05-96 FMA : validity control is not performed during
|
||||
// Persistant instance construction
|
||||
// check the validity of the transformation
|
||||
//if (Abs(1. - myTrsf.VectorialPart().Determinant()) > 1.e-7)
|
||||
//Standard_ConstructionError::Raise
|
||||
//("PTopLoc_Datum3D::Non rigid transformation");
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Transformation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
gp_Trsf PTopLoc_Datum3D::Transformation()const
|
||||
{
|
||||
return myTrsf;
|
||||
}
|
||||
|
||||
|
41
src/PTopLoc/PTopLoc_ItemLocation.cdl
Executable file
41
src/PTopLoc/PTopLoc_ItemLocation.cdl
Executable file
@@ -0,0 +1,41 @@
|
||||
-- File: PTopLoc_ItemLocation.cdl
|
||||
-- Created: Wed Mar 3 16:24:05 1993
|
||||
-- Author: Remi LEQUETTE
|
||||
-- <rle@phobox>
|
||||
---Copyright: Matra Datavision 1993
|
||||
|
||||
|
||||
private class ItemLocation from PTopLoc inherits Persistent
|
||||
|
||||
---Purpose: Provides support for the implementation of the
|
||||
-- class Location.
|
||||
|
||||
uses
|
||||
Datum3D from PTopLoc,
|
||||
Location from PTopLoc
|
||||
|
||||
is
|
||||
Create(D : Datum3D from PTopLoc;
|
||||
P : Integer from Standard;
|
||||
N : Location from PTopLoc)
|
||||
returns mutable ItemLocation from PTopLoc;
|
||||
---Level: Internal
|
||||
|
||||
Datum3D(me) returns Datum3D from PTopLoc
|
||||
is static;
|
||||
---Level: Internal
|
||||
|
||||
Power(me) returns Integer from Standard
|
||||
is static;
|
||||
---Level: Internal
|
||||
|
||||
Next(me) returns Location from PTopLoc
|
||||
is static;
|
||||
---Level: Internal
|
||||
|
||||
fields
|
||||
myDatum : Datum3D from PTopLoc;
|
||||
myPower : Integer from Standard;
|
||||
myNext : Location from PTopLoc;
|
||||
|
||||
end ItemLocation;
|
56
src/PTopLoc/PTopLoc_ItemLocation.cxx
Executable file
56
src/PTopLoc/PTopLoc_ItemLocation.cxx
Executable file
@@ -0,0 +1,56 @@
|
||||
// File: PTopLoc_ItemLocation.cxx
|
||||
// Created: Wed Mar 3 18:22:47 1993
|
||||
// Author: Remi LEQUETTE
|
||||
// <rle@phobox>
|
||||
|
||||
|
||||
#include <PTopLoc_ItemLocation.ixx>
|
||||
|
||||
//=======================================================================
|
||||
//function : PTopLoc_ItemLocation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
PTopLoc_ItemLocation::PTopLoc_ItemLocation(const Handle(PTopLoc_Datum3D)& D,
|
||||
const Standard_Integer P,
|
||||
const PTopLoc_Location& N) :
|
||||
myDatum(D),
|
||||
myPower(P),
|
||||
myNext(N)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Datum3D
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(PTopLoc_Datum3D) PTopLoc_ItemLocation::Datum3D()const
|
||||
{
|
||||
return myDatum;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Power
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer PTopLoc_ItemLocation::Power()const
|
||||
{
|
||||
return myPower;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Next
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
PTopLoc_Location PTopLoc_ItemLocation::Next()const
|
||||
{
|
||||
return myNext;
|
||||
}
|
||||
|
||||
|
71
src/PTopLoc/PTopLoc_Location.cdl
Executable file
71
src/PTopLoc/PTopLoc_Location.cdl
Executable file
@@ -0,0 +1,71 @@
|
||||
-- File: PTopLoc_Location.cdl
|
||||
-- Created: Wed Mar 3 16:39:18 1993
|
||||
-- Author: Remi LEQUETTE
|
||||
-- <rle@phobox>
|
||||
---Copyright: Matra Datavision 1993
|
||||
|
||||
|
||||
|
||||
class Location from PTopLoc inherits Storable
|
||||
|
||||
---Purpose: A Storable composed local coordinate system. Made
|
||||
-- with local coordinate systems raised to power
|
||||
-- elevation.
|
||||
--
|
||||
-- A Location is either :
|
||||
--
|
||||
-- * The Identity.
|
||||
--
|
||||
-- * The product of a Datum3D raised to a power and
|
||||
-- an other Location called the next Location.
|
||||
|
||||
uses
|
||||
Datum3D from PTopLoc,
|
||||
ItemLocation from PTopLoc
|
||||
|
||||
raises
|
||||
NoSuchObject from Standard
|
||||
|
||||
is
|
||||
Create returns Location from PTopLoc;
|
||||
---Purpose: Creates an Identity Location.
|
||||
---Level: Internal
|
||||
|
||||
Create(D : Datum3D from PTopLoc;
|
||||
P : Integer from Standard;
|
||||
N : Location from PTopLoc)
|
||||
returns Location from PTopLoc;
|
||||
---Purpose: Creates a location being the product.
|
||||
-- N * D ^ P
|
||||
---Level: Internal
|
||||
|
||||
IsIdentity(me) returns Boolean from Standard
|
||||
---Purpose: True when the location is an identity.
|
||||
---Level: Internal
|
||||
is static;
|
||||
|
||||
Datum3D(me) returns Datum3D from PTopLoc
|
||||
---Purpose: Returns the first Datum. An error is raised if the
|
||||
-- location is an identity.
|
||||
---Level: Internal
|
||||
raises NoSuchObject from Standard
|
||||
is static;
|
||||
|
||||
Power(me) returns Integer from Standard
|
||||
---Purpose: Returns the power elevation of the first datum. An
|
||||
-- error is raised if the location is an identity.
|
||||
---Level: Internal
|
||||
raises NoSuchObject from Standard
|
||||
is static;
|
||||
|
||||
Next(me) returns Location from PTopLoc
|
||||
---Purpose: Returns next Location. An error is raised if the
|
||||
-- location is an identity.
|
||||
---Level: Internal
|
||||
raises NoSuchObject from Standard
|
||||
is static;
|
||||
|
||||
fields
|
||||
myData : ItemLocation from PTopLoc;
|
||||
|
||||
end Location;
|
79
src/PTopLoc/PTopLoc_Location.cxx
Executable file
79
src/PTopLoc/PTopLoc_Location.cxx
Executable file
@@ -0,0 +1,79 @@
|
||||
// File: PTopLoc_Location.cxx
|
||||
// Created: Wed Mar 3 18:25:03 1993
|
||||
// Author: Remi LEQUETTE
|
||||
// <rle@phobox>
|
||||
|
||||
|
||||
#include <PTopLoc_Location.ixx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : PTopLoc_Location
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
PTopLoc_Location::PTopLoc_Location()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : PTopLoc_Location
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
PTopLoc_Location::PTopLoc_Location(const Handle(PTopLoc_Datum3D)& D,
|
||||
const Standard_Integer P,
|
||||
const PTopLoc_Location& N)
|
||||
{
|
||||
myData = new PTopLoc_ItemLocation(D,P,N);
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : IsIdentity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean PTopLoc_Location::IsIdentity() const
|
||||
{
|
||||
return myData.IsNull();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Datum3D
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(PTopLoc_Datum3D) PTopLoc_Location::Datum3D()const
|
||||
{
|
||||
Standard_NoSuchObject_Raise_if(IsIdentity(),"PTopLoc_Location::Datum3D");
|
||||
return myData->Datum3D();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Power
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Integer PTopLoc_Location::Power()const
|
||||
{
|
||||
Standard_NoSuchObject_Raise_if(IsIdentity(),"PTopLoc_Location::Power");
|
||||
return myData->Power();
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : PTopLoc_Location
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
PTopLoc_Location PTopLoc_Location::Next() const
|
||||
{
|
||||
Standard_NoSuchObject_Raise_if(IsIdentity(),"PTopLoc_Location::Next");
|
||||
return myData->Next();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user