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

0024002: Overall code and build procedure refactoring -- automatic

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

View File

@@ -1,3 +1,25 @@
GUID.txt
TPrsStd_DataMapOfGUIDDriver.hxx
TPrsStd_AISPresentation.cxx
TPrsStd_AISPresentation.hxx
TPrsStd_AISViewer.cxx
TPrsStd_AISViewer.hxx
TPrsStd_AxisDriver.cxx
TPrsStd_AxisDriver.hxx
TPrsStd_ConstraintDriver.cxx
TPrsStd_ConstraintDriver.hxx
TPrsStd_ConstraintTools.cxx
TPrsStd_ConstraintTools.hxx
TPrsStd_DataMapIteratorOfDataMapOfGUIDDriver.hxx
TPrsStd_DataMapOfGUIDDriver.hxx
TPrsStd_Driver.cxx
TPrsStd_Driver.hxx
TPrsStd_DriverTable.cxx
TPrsStd_DriverTable.hxx
TPrsStd_GeometryDriver.cxx
TPrsStd_GeometryDriver.hxx
TPrsStd_NamedShapeDriver.cxx
TPrsStd_NamedShapeDriver.hxx
TPrsStd_PlaneDriver.cxx
TPrsStd_PlaneDriver.hxx
TPrsStd_PointDriver.cxx
TPrsStd_PointDriver.hxx

View File

@@ -1,77 +0,0 @@
-- Created on: 1997-03-16
-- Created by: SMO
-- Copyright (c) 1997-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 TPrsStd
---Purpose: The visualization attribute implements the
-- Application Interactive Services in the context
-- of Open CASCADE Application Framework.
---Category: GUID
-- 04fb4d05-5690-11d1-8940-080009dc3333 TPrsStd_AISViewer
-- 04fb4d00-5690-11d1-8940-080009dc3333 TPrsStd_AISPresentation
uses
Standard,
TCollection,
TColStd,
MMgt,
Quantity,
Graphic3d,
AIS,
V3d,
TDF,
TDataXtd,
Geom,
TopoDS,
gp,
Prs3d
is
---Category: Attributes
-- ==========
class AISViewer;
class AISPresentation;
---Category : Drivers to build and/or update AIS objects
-- ==========================================
deferred class Driver;
class PointDriver ; -- to display Point
class AxisDriver ; -- to display Axis
class PlaneDriver ; -- to display Plane
class GeometryDriver; -- to display Geometry
class ConstraintDriver; -- to display Constraint
class NamedShapeDriver; -- to display NamedShape
class DriverTable ;
---Category: Tools
-- =====
class ConstraintTools;
imported DataMapOfGUIDDriver;
imported DataMapIteratorOfDataMapOfGUIDDriver;
end TPrsStd;

View File

@@ -1,235 +0,0 @@
-- Created on: 1998-09-30
-- Created by: Denis PASCAL
-- Copyright (c) 1998-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.
-- Lastly modified by :
-- +---------------------------------------------------------------------------+
-- ! ivan ! SetMode ! 5-04-2001! 3.0-00-1!
-- +---------------------------------------------------------------------------+
class AISPresentation from TPrsStd inherits Attribute from TDF
---Purpose: An attribute to associate an
-- AIS_InteractiveObject to a label in an AIS viewer.
-- This attribute works in collaboration with TPrsStd_AISViewer.
-- Note that all the Set... and Unset... attribute
-- methods as well as the query methods for
-- visualization attributes and the HasOwn... test
-- methods are shortcuts to the respective
-- AIS_InteractiveObject settings.
uses GUID from Standard,
AttributeIndexedMap from TDF,
DataSet from TDF,
AttributeDelta from TDF,
Label from TDF,
RelocationTable from TDF,
InteractiveObject from AIS,
Length from Quantity,
NameOfColor from Quantity,
PlaneAngle from Quantity,
NameOfMaterial from Graphic3d,
Drawer from Prs3d
is
GetID (myclass) returns GUID from Standard;
---Purpose: Returns the GUID for TPrsStd_AISPresentation attributes.
---C++: return const &
Set (myclass; L : Label from TDF; driver : GUID from Standard)
---Purpose: Creates or retrieves the presentation attribute on
-- the label L, and sets the GUID driver.
returns AISPresentation from TPrsStd;
Unset (myclass; L : Label from TDF);
---Purpose: Delete (if exist) the presentation attribute associated to the label <L>.
Set (myclass; master : Attribute from TDF)
---Purpose: Creates or retrieves the AISPresentation
-- attribute attached to master.
-- The GUID of the driver will be the GUID of master.
-- master is the attribute you want to display.
returns AISPresentation from TPrsStd;
---Category: Presentation attribute implementation
-- ======================================
Create returns AISPresentation from TPrsStd;
SetDisplayed(me : mutable; B : Boolean from Standard);
Display (me : mutable; update : Boolean from Standard = Standard_False);
---Purpose: Display presentation of object in AIS viewer.
-- If <update> = True then AISObject is recomputed and all
-- the visualization settings are applied
Erase (me : mutable; remove : Boolean from Standard = Standard_False);
---Purpose: Removes the presentation of this AIS
-- presentation attribute from the TPrsStd_AISViewer.
-- If remove is true, this AIS presentation attribute
-- is removed from the interactive context.
Update (me : mutable);
---Purpose: Recompute presentation of object and apply the visualization settings
GetDriverGUID (me) returns GUID from Standard;
SetDriverGUID (me: mutable ; guid : GUID from Standard);
IsDisplayed (me)
returns Boolean from Standard;
---Purpose:
-- Returns true if this AIS presentation attribute is displayed.
GetAIS (me) returns InteractiveObject from AIS;
---Purpose: Returns AIS_InteractiveObject stored in the presentation attribute
AISUpdate (me : mutable)
---Purpose: Updates AIS_InteractiveObject stored in the attribute
-- and applies the visualization settings
is private;
AISDisplay (me : mutable)
---Purpose: Displays AIS_InteractiveObject stored in the attribute
is private;
AISErase (me : mutable; remove : Boolean from Standard = Standard_False)
---Purpose: Erases AIS_InteractiveObject stored in the attribute in
-- the viewer; If <remove> = True then AISObject is removed
-- from AIS_InteractiveContext instead of simple erasing in the viewer
is private;
---Category: Visualization settings of AIS_InteractiveObject
-- ================================================
Material(me) returns NameOfMaterial from Graphic3d;
---Purpose:
-- Returns the material setting for this presentation attribute.
SetMaterial(me : mutable; aName : NameOfMaterial from Graphic3d);
---Purpose: Sets the material aName for this presentation attribute.
HasOwnMaterial(me) returns Boolean from Standard;
---Purpose: Returns true if this presentation attribute already has a material setting.
UnsetMaterial(me : mutable);
---Purpose: Removes the material setting from this presentation attribute.
SetTransparency(me : mutable; aValue : Real from Standard=0.6);
--- Purpose:
-- Sets the transparency value aValue for this
-- presentation attribute.
-- This value is 0.6 by default.
Transparency(me) returns Real from Standard;
HasOwnTransparency(me) returns Boolean from Standard;
---Purpose: Returns true if this presentation attribute already has a transparency setting.
UnsetTransparency(me : mutable);
---Purpose: Removes the transparency setting from this presentation attribute.
Color(me) returns NameOfColor from Quantity;
SetColor(me: mutable; aColor : NameOfColor from Quantity);
---Purpose: Sets the color aColor for this presentation attribute.
HasOwnColor(me) returns Boolean from Standard;
---Purpose: Returns true if this presentation attribute already has a color setting.
UnsetColor(me : mutable);
---Purpose: Removes the color setting from this presentation attribute.
Width(me) returns Real from Standard ;
SetWidth(me: mutable; aWidth : Real from Standard);
---Purpose: Sets the width aWidth for this presentation attribute.
HasOwnWidth(me) returns Boolean from Standard;
---Purpose: Returns true if this presentation attribute already has a width setting.
UnsetWidth(me : mutable);
---Purpose: Removes the width setting from this presentation attribute.
Mode(me) returns Integer from Standard;
SetMode(me: mutable; theMode : Integer from Standard);
HasOwnMode(me) returns Boolean from Standard;
UnsetMode(me : mutable);
SelectionMode(me) returns Integer from Standard;
SetSelectionMode(me: mutable; theSelectionMode : Integer from Standard);
HasOwnSelectionMode(me) returns Boolean from Standard;
UnsetSelectionMode(me : mutable);
---Category: Methods of TDF_Attribute
-- ========================
ID(me)returns GUID from Standard;
---C++: return const &
NewEmpty(me)
returns Attribute from TDF;
Restore(me: mutable; with : Attribute from TDF);
Paste (me; into : Attribute from TDF;
RT : RelocationTable from TDF);
BackupCopy(me) returns Attribute from TDF is redefined;
---Category: Callbacks for viewer updating
-- =============================
AfterAddition (me: mutable)
is redefined;
BeforeRemoval (me: mutable)
is redefined;
BeforeForget(me: mutable)
is redefined;
AfterResume(me: mutable)
is redefined;
BeforeUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
forceIt : Boolean from Standard = Standard_False)
returns Boolean from Standard
is redefined;
AfterUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
forceIt : Boolean from Standard = Standard_False)
---Purpose: update AIS viewer according to delta
returns Boolean from Standard
is redefined;
fields
myDriverGUID : GUID from Standard;
myTransparency : Real from Standard;
myColor : NameOfColor from Quantity;
myMaterial : NameOfMaterial from Graphic3d;
myWidth : Real from Standard;
myMode : Integer from Standard;
mySelectionMode : Integer from Standard;
isDisplayed : Boolean from Standard;
hasOwnColor : Boolean from Standard;
hasOwnMaterial : Boolean from Standard;
hasOwnTransparency : Boolean from Standard;
hasOwnWidth : Boolean from Standard;
hasOwnMode : Boolean from Standard;
hasOwnSelectionMode: Boolean from Standard;
myAIS : InteractiveObject from AIS;
end AISPresentation;

View File

@@ -18,16 +18,22 @@
// +---------------------------------------------------------------------------+
// ! ivan ! SetMode ! 5-04-2001! 3.0-00-1!
// +---------------------------------------------------------------------------+
#include <TPrsStd_AISPresentation.ixx>
#include <TDF_DefaultDeltaOnRemoval.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DeltaOnAddition.hxx>
#include <TDF_Tool.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TPrsStd_AISViewer.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_AttributeDelta.hxx>
#include <TDF_DefaultDeltaOnModification.hxx>
#include <TDF_DefaultDeltaOnRemoval.hxx>
#include <TDF_DeltaOnAddition.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
#include <TPrsStd_AISPresentation.hxx>
#include <TPrsStd_AISViewer.hxx>
#include <TPrsStd_Driver.hxx>
#include <TPrsStd_DriverTable.hxx>

View File

@@ -0,0 +1,238 @@
// Created on: 1998-09-30
// Created by: Denis PASCAL
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_AISPresentation_HeaderFile
#define _TPrsStd_AISPresentation_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Real.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Graphic3d_NameOfMaterial.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_Attribute.hxx>
class AIS_InteractiveObject;
class Standard_GUID;
class TDF_Label;
class TDF_Attribute;
class TDF_RelocationTable;
class TDF_AttributeDelta;
class TPrsStd_AISPresentation;
DEFINE_STANDARD_HANDLE(TPrsStd_AISPresentation, TDF_Attribute)
//! An attribute to associate an
//! AIS_InteractiveObject to a label in an AIS viewer.
//! This attribute works in collaboration with TPrsStd_AISViewer.
//! Note that all the Set... and Unset... attribute
//! methods as well as the query methods for
//! visualization attributes and the HasOwn... test
//! methods are shortcuts to the respective
//! AIS_InteractiveObject settings.
class TPrsStd_AISPresentation : public TDF_Attribute
{
public:
//! Returns the GUID for TPrsStd_AISPresentation attributes.
Standard_EXPORT static const Standard_GUID& GetID();
//! Creates or retrieves the presentation attribute on
//! the label L, and sets the GUID driver.
Standard_EXPORT static Handle(TPrsStd_AISPresentation) Set (const TDF_Label& L, const Standard_GUID& driver);
//! Delete (if exist) the presentation attribute associated to the label <L>.
Standard_EXPORT static void Unset (const TDF_Label& L);
//! Creates or retrieves the AISPresentation
//! attribute attached to master.
//! The GUID of the driver will be the GUID of master.
//! master is the attribute you want to display.
Standard_EXPORT static Handle(TPrsStd_AISPresentation) Set (const Handle(TDF_Attribute)& master);
Standard_EXPORT TPrsStd_AISPresentation();
Standard_EXPORT void SetDisplayed (const Standard_Boolean B);
//! Display presentation of object in AIS viewer.
//! If <update> = True then AISObject is recomputed and all
//! the visualization settings are applied
Standard_EXPORT void Display (const Standard_Boolean update = Standard_False);
//! Removes the presentation of this AIS
//! presentation attribute from the TPrsStd_AISViewer.
//! If remove is true, this AIS presentation attribute
//! is removed from the interactive context.
Standard_EXPORT void Erase (const Standard_Boolean remove = Standard_False);
//! Recompute presentation of object and apply the visualization settings
Standard_EXPORT void Update();
Standard_EXPORT Standard_GUID GetDriverGUID() const;
Standard_EXPORT void SetDriverGUID (const Standard_GUID& guid);
//! Returns true if this AIS presentation attribute is displayed.
Standard_EXPORT Standard_Boolean IsDisplayed() const;
//! Returns AIS_InteractiveObject stored in the presentation attribute
Standard_EXPORT Handle(AIS_InteractiveObject) GetAIS() const;
//! Returns the material setting for this presentation attribute.
Standard_EXPORT Graphic3d_NameOfMaterial Material() const;
//! Sets the material aName for this presentation attribute.
Standard_EXPORT void SetMaterial (const Graphic3d_NameOfMaterial aName);
//! Returns true if this presentation attribute already has a material setting.
Standard_EXPORT Standard_Boolean HasOwnMaterial() const;
//! Removes the material setting from this presentation attribute.
Standard_EXPORT void UnsetMaterial();
//! Sets the transparency value aValue for this
//! presentation attribute.
//! This value is 0.6 by default.
Standard_EXPORT void SetTransparency (const Standard_Real aValue = 0.6);
Standard_EXPORT Standard_Real Transparency() const;
//! Returns true if this presentation attribute already has a transparency setting.
Standard_EXPORT Standard_Boolean HasOwnTransparency() const;
//! Removes the transparency setting from this presentation attribute.
Standard_EXPORT void UnsetTransparency();
Standard_EXPORT Quantity_NameOfColor Color() const;
//! Sets the color aColor for this presentation attribute.
Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor);
//! Returns true if this presentation attribute already has a color setting.
Standard_EXPORT Standard_Boolean HasOwnColor() const;
//! Removes the color setting from this presentation attribute.
Standard_EXPORT void UnsetColor();
Standard_EXPORT Standard_Real Width() const;
//! Sets the width aWidth for this presentation attribute.
Standard_EXPORT void SetWidth (const Standard_Real aWidth);
//! Returns true if this presentation attribute already has a width setting.
Standard_EXPORT Standard_Boolean HasOwnWidth() const;
//! Removes the width setting from this presentation attribute.
Standard_EXPORT void UnsetWidth();
Standard_EXPORT Standard_Integer Mode() const;
Standard_EXPORT void SetMode (const Standard_Integer theMode);
Standard_EXPORT Standard_Boolean HasOwnMode() const;
Standard_EXPORT void UnsetMode();
Standard_EXPORT Standard_Integer SelectionMode() const;
Standard_EXPORT void SetSelectionMode (const Standard_Integer theSelectionMode);
Standard_EXPORT Standard_Boolean HasOwnSelectionMode() const;
Standard_EXPORT void UnsetSelectionMode();
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with);
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const;
Standard_EXPORT virtual Handle(TDF_Attribute) BackupCopy() const Standard_OVERRIDE;
Standard_EXPORT virtual void AfterAddition() Standard_OVERRIDE;
Standard_EXPORT virtual void BeforeRemoval() Standard_OVERRIDE;
Standard_EXPORT virtual void BeforeForget() Standard_OVERRIDE;
Standard_EXPORT virtual void AfterResume() Standard_OVERRIDE;
Standard_EXPORT virtual Standard_Boolean BeforeUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
//! update AIS viewer according to delta
Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_AISPresentation,TDF_Attribute)
protected:
private:
//! Updates AIS_InteractiveObject stored in the attribute
//! and applies the visualization settings
Standard_EXPORT void AISUpdate();
//! Displays AIS_InteractiveObject stored in the attribute
Standard_EXPORT void AISDisplay();
//! Erases AIS_InteractiveObject stored in the attribute in
//! the viewer; If <remove> = True then AISObject is removed
//! from AIS_InteractiveContext instead of simple erasing in the viewer
Standard_EXPORT void AISErase (const Standard_Boolean remove = Standard_False);
Standard_GUID myDriverGUID;
Standard_Real myTransparency;
Quantity_NameOfColor myColor;
Graphic3d_NameOfMaterial myMaterial;
Standard_Real myWidth;
Standard_Integer myMode;
Standard_Integer mySelectionMode;
Standard_Boolean isDisplayed;
Standard_Boolean hasOwnColor;
Standard_Boolean hasOwnMaterial;
Standard_Boolean hasOwnTransparency;
Standard_Boolean hasOwnWidth;
Standard_Boolean hasOwnMode;
Standard_Boolean hasOwnSelectionMode;
Handle(AIS_InteractiveObject) myAIS;
};
#endif // _TPrsStd_AISPresentation_HeaderFile

View File

@@ -1,106 +0,0 @@
-- Created on: 1998-09-30
-- Created by: Denis PASCAL
-- Copyright (c) 1998-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class AISViewer from TPrsStd inherits Attribute from TDF
---Purpose: The groundwork to define an interactive viewer attribute.
-- This attribute stores an interactive context at the root label.
-- You can only have one instance of this class per data framework.
uses Attribute from TDF,
Label from TDF,
GUID from Standard,
DataSet from TDF,
RelocationTable from TDF,
InteractiveContext from AIS,
Viewer from V3d,
ExtendedString from TCollection
is
---Purpose: class methods
-- =============
GetID (myclass)
---C++: return const &
returns GUID from Standard;
Has (myclass; acces : Label from TDF)
---Purpose: returns True if there is an AISViewer attribute in
-- <acces> Data Framework.
returns Boolean from Standard;
New (myclass; access : Label from TDF; selector : InteractiveContext from AIS)
---Purpose: create and set an AISViewer at. Raise an exception if
-- Has.
returns AISViewer from TPrsStd;
New (myclass; acces : Label from TDF; viewer : Viewer from V3d)
---Purpose: create and set an AISAttribute at root label. The
-- interactive context is build. Raise an exception if
-- Has.
returns AISViewer from TPrsStd;
Find (myclass; acces : Label from TDF; A : in out AISViewer from TPrsStd)
returns Boolean from Standard;
---Purpose:
-- Finds the viewer attribute at the label access, the
-- root of the data framework. Calling this function can be used to initialize an AIS viewer
Find (myclass; acces : Label from TDF; IC : in out InteractiveContext from AIS)
returns Boolean from Standard;
Find (myclass; acces : Label from TDF; V : in out Viewer from V3d)
returns Boolean from Standard;
Update (myclass; acces : Label from TDF);
---Purpose: AISViewer methods
-- =================
Create
returns AISViewer from TPrsStd;
Update (me);
---Purpose: Updates the viewer at the label access.
-- access is the root of the data framework.
SetInteractiveContext (me : mutable; ctx : InteractiveContext from AIS);
---Purpose: Sets the interactive context ctx for this attribute.
GetInteractiveContext (me)
returns InteractiveContext from AIS;
---Purpose: Returns the interactive context in this attribute.
---Category: TDF_Attribute methods
-- =====================
ID (me)
---C++: return const &
returns GUID from Standard;
Restore(me: mutable; with : Attribute from TDF);
NewEmpty(me)
returns Attribute from TDF;
Paste (me; into : Attribute from TDF;
RT : RelocationTable from TDF);
fields
myInteractiveContext : InteractiveContext from AIS;
end AISViewer;

View File

@@ -14,14 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_AISViewer.ixx>
#include <AIS_InteractiveContext.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TPrsStd_AISViewer.hxx>
#include <V3d_Viewer.hxx>
//=======================================================================
//function : GetID
//purpose :
//=======================================================================
const Standard_GUID& TPrsStd_AISViewer::GetID ()
{
static Standard_GUID TPrsStd_AISViewerID("04fb4d05-5690-11d1-8940-080009dc3333");

View File

@@ -0,0 +1,119 @@
// Created on: 1998-09-30
// Created by: Denis PASCAL
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_AISViewer_HeaderFile
#define _TPrsStd_AISViewer_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TDF_Attribute.hxx>
#include <Standard_Boolean.hxx>
class AIS_InteractiveContext;
class Standard_GUID;
class TDF_Label;
class V3d_Viewer;
class TDF_Attribute;
class TDF_RelocationTable;
class TPrsStd_AISViewer;
DEFINE_STANDARD_HANDLE(TPrsStd_AISViewer, TDF_Attribute)
//! The groundwork to define an interactive viewer attribute.
//! This attribute stores an interactive context at the root label.
//! You can only have one instance of this class per data framework.
class TPrsStd_AISViewer : public TDF_Attribute
{
public:
//! class methods
//! =============
Standard_EXPORT static const Standard_GUID& GetID();
//! returns True if there is an AISViewer attribute in
//! <acces> Data Framework.
Standard_EXPORT static Standard_Boolean Has (const TDF_Label& acces);
//! create and set an AISViewer at. Raise an exception if
//! Has.
Standard_EXPORT static Handle(TPrsStd_AISViewer) New (const TDF_Label& access, const Handle(AIS_InteractiveContext)& selector);
//! create and set an AISAttribute at root label. The
//! interactive context is build. Raise an exception if
//! Has.
Standard_EXPORT static Handle(TPrsStd_AISViewer) New (const TDF_Label& acces, const Handle(V3d_Viewer)& viewer);
//! Finds the viewer attribute at the label access, the
//! root of the data framework. Calling this function can be used to initialize an AIS viewer
Standard_EXPORT static Standard_Boolean Find (const TDF_Label& acces, Handle(TPrsStd_AISViewer)& A);
Standard_EXPORT static Standard_Boolean Find (const TDF_Label& acces, Handle(AIS_InteractiveContext)& IC);
Standard_EXPORT static Standard_Boolean Find (const TDF_Label& acces, Handle(V3d_Viewer)& V);
//! AISViewer methods
//! =================
Standard_EXPORT static void Update (const TDF_Label& acces);
Standard_EXPORT TPrsStd_AISViewer();
//! Updates the viewer at the label access.
//! access is the root of the data framework.
Standard_EXPORT void Update() const;
//! Sets the interactive context ctx for this attribute.
Standard_EXPORT void SetInteractiveContext (const Handle(AIS_InteractiveContext)& ctx);
//! Returns the interactive context in this attribute.
Standard_EXPORT Handle(AIS_InteractiveContext) GetInteractiveContext() const;
Standard_EXPORT const Standard_GUID& ID() const;
Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with);
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const;
DEFINE_STANDARD_RTTI(TPrsStd_AISViewer,TDF_Attribute)
protected:
private:
Handle(AIS_InteractiveContext) myInteractiveContext;
};
#endif // _TPrsStd_AISViewer_HeaderFile

View File

@@ -1,42 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class AxisDriver from TPrsStd inherits Driver from TPrsStd
---Purpose: An implementation of TPrsStd_Driver for axes.
uses
GUID from Standard,
Label from TDF,
InteractiveObject from AIS
is
Create
returns AxisDriver from TPrsStd;
---Purpose: Constructs an empty axis driver.
Update (me : mutable ;
aLabel : Label from TDF;
anAISObject : in out InteractiveObject from AIS)
returns Boolean from Standard
is redefined virtual;
--- Purpose: Build the AISObject (if null) or update it.
-- No compute is done.
-- Returns <True> if informations was found
-- and AISObject updated.
end AxisDriver;

View File

@@ -11,20 +11,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_AxisDriver.ixx>
#include <TDF_Label.hxx>
#include <TDataXtd_Axis.hxx>
#include <TDataXtd_Geometry.hxx>
#include <AIS_Axis.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Geom_Line.hxx>
#include <gp_Lin.hxx>
#include <TNaming_Tool.hxx>
#include <Standard_Type.hxx>
#include <TDataXtd_Axis.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDF_Label.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Tool.hxx>
#include <TopoDS_Shape.hxx>
#include <TPrsStd_AxisDriver.hxx>
//=======================================================================
//function :

View File

@@ -0,0 +1,71 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_AxisDriver_HeaderFile
#define _TPrsStd_AxisDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_AxisDriver;
DEFINE_STANDARD_HANDLE(TPrsStd_AxisDriver, TPrsStd_Driver)
//! An implementation of TPrsStd_Driver for axes.
class TPrsStd_AxisDriver : public TPrsStd_Driver
{
public:
//! Constructs an empty axis driver.
Standard_EXPORT TPrsStd_AxisDriver();
//! Build the AISObject (if null) or update it.
//! No compute is done.
//! Returns <True> if informations was found
//! and AISObject updated.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& aLabel, Handle(AIS_InteractiveObject)& anAISObject) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_AxisDriver,TPrsStd_Driver)
protected:
private:
};
#endif // _TPrsStd_AxisDriver_HeaderFile

View File

@@ -1,41 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ConstraintDriver from TPrsStd inherits Driver from TPrsStd
---Purpose: An implementation of TPrsStd_Driver for constraints.
uses
GUID from Standard,
InteractiveObject from AIS,
Label from TDF
is
Create
returns ConstraintDriver from TPrsStd;
---Purpose: Constructs an empty constraint driver.
Update (me : mutable ;
aLabel : Label from TDF;
anAISObject : in out InteractiveObject from AIS)
returns Boolean from Standard
is redefined virtual;
--- Purpose: Build the AISObject (if null) or update it.
-- No compute is done.
-- Returns <True> if informations was found
-- and AISObject updated.
end ConstraintDriver;

View File

@@ -11,17 +11,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_ConstraintDriver.ixx>
#include <TDF_Label.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TPrsStd_ConstraintTools.hxx>
#include <Standard_ProgramError.hxx>
#include <Standard_GUID.hxx>
#include <TDataStd_Real.hxx>
#include <TDataXtd_Position.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Relation.hxx>
#include <Standard_GUID.hxx>
#include <Standard_ProgramError.hxx>
#include <Standard_Type.hxx>
#include <TDataStd_Real.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDataXtd_Position.hxx>
#include <TDF_Label.hxx>
#include <TPrsStd_ConstraintDriver.hxx>
#include <TPrsStd_ConstraintTools.hxx>
//=======================================================================
//function :

View File

@@ -0,0 +1,71 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_ConstraintDriver_HeaderFile
#define _TPrsStd_ConstraintDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_ConstraintDriver;
DEFINE_STANDARD_HANDLE(TPrsStd_ConstraintDriver, TPrsStd_Driver)
//! An implementation of TPrsStd_Driver for constraints.
class TPrsStd_ConstraintDriver : public TPrsStd_Driver
{
public:
//! Constructs an empty constraint driver.
Standard_EXPORT TPrsStd_ConstraintDriver();
//! Build the AISObject (if null) or update it.
//! No compute is done.
//! Returns <True> if informations was found
//! and AISObject updated.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& aLabel, Handle(AIS_InteractiveObject)& anAISObject) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_ConstraintDriver,TPrsStd_Driver)
protected:
private:
};
#endif // _TPrsStd_ConstraintDriver_HeaderFile

View File

@@ -1,141 +0,0 @@
-- Created on: 1997-08-20
-- Created by: Guest Design
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ConstraintTools from TPrsStd
uses
Constraint from TDataXtd,
InteractiveObject from AIS,
ExtendedString from TCollection,
Shape from TopoDS,
Geometry from Geom
is
UpdateOnlyValue (myclass; aConst : Constraint from TDataXtd;
anAIS : InteractiveObject from AIS);
ComputeDistance (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeParallel (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeTangent (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputePerpendicular (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeConcentric (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeSymmetry (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeMidPoint (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeAngle (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeRadius (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
--ota:
ComputeMinRadius (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeMaxRadius (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeEqualDistance (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
--end
ComputeEqualRadius (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeFix (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeDiameter (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeOffset (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputePlacement(myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeCoincident(myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeRound(myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeOthers (myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS);
ComputeTextAndValue(myclass; aConst : Constraint from TDataXtd;
aValue : in out Real from Standard;
aText : in out ExtendedString from TCollection;
anIsAngle : Boolean from Standard);
-- addition for one conical face angle
ComputeAngleForOneFace(myclass; aConst : Constraint from TDataXtd;
anAIS : in out InteractiveObject from AIS );
GetOneShape(myclass; aConst : Constraint from TDataXtd;
aShape : in out Shape from TopoDS)
is private;
GetGeom (myclass; aConst : Constraint from TDataXtd;
aGeom : in out Geometry from Geom)
is private;
GetTwoShapes(myclass; aConst : Constraint from TDataXtd;
aShape1 : in out Shape from TopoDS;
aShape2 : in out Shape from TopoDS)
is private;
GetShapesAndGeom(myclass; aConst : Constraint from TDataXtd;
aShape1 : in out Shape from TopoDS;
aShape2 : in out Shape from TopoDS;
aGeom : in out Geometry from Geom)
is private;
GetShapesAndGeom(myclass; aConst : Constraint from TDataXtd;
aShape1 : in out Shape from TopoDS;
aShape2 : in out Shape from TopoDS;
aShape3 : in out Shape from TopoDS;
aGeom : in out Geometry from Geom)
is private;
--ota --
GetShapesAndGeom(myclass; aConst : Constraint from TDataXtd;
aShape1 : in out Shape from TopoDS;
aShape2 : in out Shape from TopoDS;
aShape3 : in out Shape from TopoDS;
aShape4 : in out Shape from TopoDS;
aGeom : in out Geometry from Geom)
is private;
----
end ConstraintTools;

View File

@@ -16,82 +16,73 @@
// Purpose: Update AIS object from a TDataXtd_Constraint.
// Modified Mon 30 10:15:43 1998 by SZY
#include <TPrsStd_ConstraintTools.ixx>
#include <stdio.h>
#include <UnitsAPI.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TNaming_Tool.hxx>
#include <TNaming_Iterator.hxx>
#include <TNaming_NamedShape.hxx>
#include <TDF_Label.hxx>
#include <TDataStd_Real.hxx>
#include <TDataStd_Name.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDF_Reference.hxx>
#include <AIS_OffsetDimension.hxx>
#include <AIS_LengthDimension.hxx>
#include <AIS_ParallelRelation.hxx>
#include <AIS_TangentRelation.hxx>
#include <AIS_IdenticRelation.hxx>
#include <AIS_AngleDimension.hxx>
#include <AIS_RadiusDimension.hxx>
#include <AIS_DiameterDimension.hxx>
#include <AIS_FixRelation.hxx>
#include <AIS_PerpendicularRelation.hxx>
#include <AIS_ConcentricRelation.hxx>
#include <AIS_SymmetricRelation.hxx>
#include <AIS_MidPointRelation.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_EqualRadiusRelation.hxx>
#include <AIS_DiameterDimension.hxx>
#include <AIS_EqualDistanceRelation.hxx>
#include <AIS_MinRadiusDimension.hxx>
#include <AIS_EqualRadiusRelation.hxx>
#include <AIS_FixRelation.hxx>
#include <AIS_IdenticRelation.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_LengthDimension.hxx>
#include <AIS_MaxRadiusDimension.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <BRep_Tool.hxx>
#include <AIS_MidPointRelation.hxx>
#include <AIS_MinRadiusDimension.hxx>
#include <AIS_OffsetDimension.hxx>
#include <AIS_ParallelRelation.hxx>
#include <AIS_PerpendicularRelation.hxx>
#include <AIS_RadiusDimension.hxx>
#include <AIS_Relation.hxx>
#include <AIS_SymmetricRelation.hxx>
#include <AIS_TangentRelation.hxx>
#include <BRep_Builder.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <GC_MakePlane.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Geometry.hxx>
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Circle.hxx>
#include <gp_Pln.hxx>
#include <gp_Dir.hxx>
#include <GeomAbs_SurfaceType.hxx>
#include <gp_Ax1.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Dir.hxx>
#include <gp_Lin.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
#include <gp_Torus.hxx>
#include <GC_MakePlane.hxx>
#include <Precision.hxx>
#include <IntAna_QuadQuadGeo.hxx>
#include <Standard_ProgramError.hxx>
#include <Standard_ErrorHandler.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Precision.hxx>
#include <Prs3d_Drawer.hxx>
#include <AIS_Relation.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_ProgramError.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Name.hxx>
#include <TDataStd_Real.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDF_Label.hxx>
#include <TDF_Reference.hxx>
#include <TNaming_Iterator.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Tool.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TPrsStd_ConstraintTools.hxx>
#include <UnitsAPI.hxx>
#include <stdio.h>
static Standard_Boolean CheckShapesPair(const TopoDS_Shape& , const TopoDS_Shape& ); //ota
//=======================================================================

View File

@@ -0,0 +1,122 @@
// Created on: 1997-08-20
// Created by: Guest Design
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_ConstraintTools_HeaderFile
#define _TPrsStd_ConstraintTools_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class TDataXtd_Constraint;
class AIS_InteractiveObject;
class TCollection_ExtendedString;
class TopoDS_Shape;
class Geom_Geometry;
class TPrsStd_ConstraintTools
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static void UpdateOnlyValue (const Handle(TDataXtd_Constraint)& aConst, const Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeDistance (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeParallel (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeTangent (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputePerpendicular (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeConcentric (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeSymmetry (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeMidPoint (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeAngle (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeRadius (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeMinRadius (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeMaxRadius (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeEqualDistance (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeEqualRadius (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeFix (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeDiameter (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeOffset (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputePlacement (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeCoincident (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeRound (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeOthers (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
Standard_EXPORT static void ComputeTextAndValue (const Handle(TDataXtd_Constraint)& aConst, Standard_Real& aValue, TCollection_ExtendedString& aText, const Standard_Boolean anIsAngle);
Standard_EXPORT static void ComputeAngleForOneFace (const Handle(TDataXtd_Constraint)& aConst, Handle(AIS_InteractiveObject)& anAIS);
protected:
private:
Standard_EXPORT static void GetOneShape (const Handle(TDataXtd_Constraint)& aConst, TopoDS_Shape& aShape);
Standard_EXPORT static void GetGeom (const Handle(TDataXtd_Constraint)& aConst, Handle(Geom_Geometry)& aGeom);
Standard_EXPORT static void GetTwoShapes (const Handle(TDataXtd_Constraint)& aConst, TopoDS_Shape& aShape1, TopoDS_Shape& aShape2);
Standard_EXPORT static void GetShapesAndGeom (const Handle(TDataXtd_Constraint)& aConst, TopoDS_Shape& aShape1, TopoDS_Shape& aShape2, Handle(Geom_Geometry)& aGeom);
Standard_EXPORT static void GetShapesAndGeom (const Handle(TDataXtd_Constraint)& aConst, TopoDS_Shape& aShape1, TopoDS_Shape& aShape2, TopoDS_Shape& aShape3, Handle(Geom_Geometry)& aGeom);
Standard_EXPORT static void GetShapesAndGeom (const Handle(TDataXtd_Constraint)& aConst, TopoDS_Shape& aShape1, TopoDS_Shape& aShape2, TopoDS_Shape& aShape3, TopoDS_Shape& aShape4, Handle(Geom_Geometry)& aGeom);
};
#endif // _TPrsStd_ConstraintTools_HeaderFile

View File

@@ -1,65 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-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.
deferred class Driver from TPrsStd inherits TShared from MMgt
--- Purpose: Driver for AIS
-- ==============
-- An abstract class, which - in classes inheriting
-- from it - allows you to update an
-- AIS_InteractiveObject or create one if one does
-- not already exist.
-- For both creation and update, the interactive
-- object is filled with information contained in
-- attributes. These attributes are those found on
-- the label given as an argument in the method Update.
-- true is returned if the interactive object was modified by the update.
-- This class provide an algorithm to Build with its default
-- values (if Null) or Update (if !Null) an AIS_InteractiveObject
-- . Resources are found in attributes associated to a given
-- label.
-- The algorithm Returns <True> if the minimum resources are
-- found. The returned AIS may be null if algorithm failed
-- (values of resources attributes are not acceptable).
-- This algorithm may be called, even if an AISPresentation
-- attribute is not setted at the label (for simulation need by
-- example).
-- It belongs to the application to test the returned AIS object,
-- to set it in the AISPresentation attribute and to set the
-- owner of the AIS. See Tool class for default implementation of
-- those methods.
uses Label from TDF,
InteractiveObject from AIS
is
Initialize;
Update (me : mutable ; L : Label from TDF;
ais : in out InteractiveObject from AIS)
---Purpose:
-- Updates the interactive object ais with
-- information found on the attributes associated with the label L.
returns Boolean from Standard
is deferred;
end Driver;

View File

@@ -11,7 +11,11 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_Driver.ixx>
#include <AIS_InteractiveObject.hxx>
#include <Standard_Type.hxx>
#include <TDF_Label.hxx>
#include <TPrsStd_Driver.hxx>
TPrsStd_Driver::TPrsStd_Driver()
{}

View File

@@ -0,0 +1,83 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_Driver_HeaderFile
#define _TPrsStd_Driver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_Driver;
DEFINE_STANDARD_HANDLE(TPrsStd_Driver, MMgt_TShared)
//! Driver for AIS
//! ==============
//! An abstract class, which - in classes inheriting
//! from it - allows you to update an
//! AIS_InteractiveObject or create one if one does
//! not already exist.
//! For both creation and update, the interactive
//! object is filled with information contained in
//! attributes. These attributes are those found on
//! the label given as an argument in the method Update.
//! true is returned if the interactive object was modified by the update.
//! This class provide an algorithm to Build with its default
//! values (if Null) or Update (if !Null) an AIS_InteractiveObject
//! . Resources are found in attributes associated to a given
//! label.
class TPrsStd_Driver : public MMgt_TShared
{
public:
//! Updates the interactive object ais with
//! information found on the attributes associated with the label L.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& L, Handle(AIS_InteractiveObject)& ais) = 0;
DEFINE_STANDARD_RTTI(TPrsStd_Driver,MMgt_TShared)
protected:
Standard_EXPORT TPrsStd_Driver();
private:
};
#endif // _TPrsStd_Driver_HeaderFile

View File

@@ -1,72 +0,0 @@
-- Created on: 1999-08-04
-- Created by: Denis PASCAL
-- 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.
class DriverTable from TPrsStd inherits TShared from MMgt
---Purpose: This class is a container to record (AddDriver)
-- binding between GUID and TPrsStd_Driver.
-- You create a new instance of TPrsStd_Driver
-- and use the method AddDriver to load it into the driver table. the method
uses Boolean from Standard,
Attribute from TDF,
Label from TDF,
GUID from Standard,
IDList from TDF,
Driver from TPrsStd,
DataMapOfGUIDDriver from TPrsStd
is
Get (myclass) returns DriverTable from TPrsStd;
---Purpose: Returns the static table.
-- If it does not exist, creates it and fills it with standard drivers.
Create returns DriverTable from TPrsStd;
---Purpose: Default constructor
InitStandardDrivers (me : mutable);
---Purpose: Fills the table with standard drivers
AddDriver (me : mutable; guid : GUID from Standard;
driver : Driver from TPrsStd)
---Purpose: Returns true if the driver has been added successfully to the driver table.
returns Boolean from Standard;
FindDriver (me; guid : GUID from Standard;
driver : out Driver from TPrsStd)
---Purpose: Returns true if the driver was found.
returns Boolean from Standard;
RemoveDriver (me : mutable; guid : GUID from Standard)
---Purpose:
-- Removes a driver with the given GUID.
-- Returns true if the driver has been removed successfully.
returns Boolean from Standard;
Clear (me : mutable);
---Purpose: Removes all drivers. Returns
-- true if the driver has been removed successfully.
-- If this method is used, the InitStandardDrivers method should be
-- called to fill the table with standard drivers.
fields
myDrivers : DataMapOfGUIDDriver from TPrsStd;
end DriverTable;

View File

@@ -14,26 +14,25 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_DriverTable.ixx>
#include <TPrsStd_DataMapOfGUIDDriver.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataXtd_Axis.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDataXtd_Plane.hxx>
#include <TDataXtd_Point.hxx>
#include <TNaming_NamedShape.hxx>
#include <TPrsStd_AxisDriver.hxx>
#include <TPrsStd_ConstraintDriver.hxx>
#include <TPrsStd_DataMapOfGUIDDriver.hxx>
#include <TPrsStd_Driver.hxx>
#include <TPrsStd_DriverTable.hxx>
#include <TPrsStd_GeometryDriver.hxx>
#include <TPrsStd_NamedShapeDriver.hxx>
#include <TPrsStd_PlaneDriver.hxx>
#include <TPrsStd_PointDriver.hxx>
#include <TDataXtd_Axis.hxx>
#include <TDataXtd_Constraint.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TNaming_NamedShape.hxx>
#include <TDataXtd_Plane.hxx>
#include <TDataXtd_Point.hxx>
static Handle(TPrsStd_DriverTable) drivertable;
//=======================================================================

View File

@@ -0,0 +1,94 @@
// Created on: 1999-08-04
// Created by: Denis PASCAL
// 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.
#ifndef _TPrsStd_DriverTable_HeaderFile
#define _TPrsStd_DriverTable_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_DataMapOfGUIDDriver.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_Boolean.hxx>
class Standard_GUID;
class TPrsStd_Driver;
class TPrsStd_DriverTable;
DEFINE_STANDARD_HANDLE(TPrsStd_DriverTable, MMgt_TShared)
//! This class is a container to record (AddDriver)
//! binding between GUID and TPrsStd_Driver.
//! You create a new instance of TPrsStd_Driver
//! and use the method AddDriver to load it into the driver table. the method
class TPrsStd_DriverTable : public MMgt_TShared
{
public:
//! Returns the static table.
//! If it does not exist, creates it and fills it with standard drivers.
Standard_EXPORT static Handle(TPrsStd_DriverTable) Get();
//! Default constructor
Standard_EXPORT TPrsStd_DriverTable();
//! Fills the table with standard drivers
Standard_EXPORT void InitStandardDrivers();
//! Returns true if the driver has been added successfully to the driver table.
Standard_EXPORT Standard_Boolean AddDriver (const Standard_GUID& guid, const Handle(TPrsStd_Driver)& driver);
//! Returns true if the driver was found.
Standard_EXPORT Standard_Boolean FindDriver (const Standard_GUID& guid, Handle(TPrsStd_Driver)& driver) const;
//! Removes a driver with the given GUID.
//! Returns true if the driver has been removed successfully.
Standard_EXPORT Standard_Boolean RemoveDriver (const Standard_GUID& guid);
//! Removes all drivers. Returns
//! true if the driver has been removed successfully.
//! If this method is used, the InitStandardDrivers method should be
//! called to fill the table with standard drivers.
Standard_EXPORT void Clear();
DEFINE_STANDARD_RTTI(TPrsStd_DriverTable,MMgt_TShared)
protected:
private:
TPrsStd_DataMapOfGUIDDriver myDrivers;
};
#endif // _TPrsStd_DriverTable_HeaderFile

View File

@@ -1,42 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class GeometryDriver from TPrsStd inherits Driver from TPrsStd
---Purpose:
-- This method is an implementation of TPrsStd_Driver for geometries.
uses
GUID from Standard,
Label from TDF,
InteractiveObject from AIS
is
Create
returns GeometryDriver from TPrsStd;
---Purpose: Constructs an empty geometry driver.
Update (me : mutable ;
aLabel : Label from TDF;
anAISObject : in out InteractiveObject from AIS)
returns Boolean from Standard
is redefined virtual;
--- Purpose: Build the AISObject (if null) or update it.
-- No compute is done.
-- Returns <True> if informations was found
-- and AISObject updated.
end GeometryDriver;

View File

@@ -14,28 +14,30 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_GeometryDriver.ixx>
#include <AIS_Circle.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Line.hxx>
#include <AIS_Point.hxx>
#include <AIS_Shape.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Line.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
#include <TDataXtd.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDF_Label.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Tool.hxx>
#include <TDataXtd_Geometry.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Line.hxx>
#include <Geom_Circle.hxx>
#include <AIS_Line.hxx>
#include <AIS_Point.hxx>
#include <AIS_Circle.hxx>
#include <AIS_Shape.hxx>
#include <AIS_InteractiveContext.hxx>
#include <gp_Pnt.hxx>
#include <gp_Lin.hxx>
#include <gp_Circ.hxx>
#include <gp_Elips.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
#include <TPrsStd_GeometryDriver.hxx>
//=======================================================================
//function :

View File

@@ -0,0 +1,72 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_GeometryDriver_HeaderFile
#define _TPrsStd_GeometryDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_GeometryDriver;
DEFINE_STANDARD_HANDLE(TPrsStd_GeometryDriver, TPrsStd_Driver)
//! This method is an implementation of TPrsStd_Driver for geometries.
class TPrsStd_GeometryDriver : public TPrsStd_Driver
{
public:
//! Constructs an empty geometry driver.
Standard_EXPORT TPrsStd_GeometryDriver();
//! Build the AISObject (if null) or update it.
//! No compute is done.
//! Returns <True> if informations was found
//! and AISObject updated.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& aLabel, Handle(AIS_InteractiveObject)& anAISObject) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_GeometryDriver,TPrsStd_Driver)
protected:
private:
};
#endif // _TPrsStd_GeometryDriver_HeaderFile

View File

@@ -1,41 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class NamedShapeDriver from TPrsStd inherits Driver from TPrsStd
---Purpose: An implementation of TPrsStd_Driver for named shapes.
uses
GUID from Standard,
Label from TDF,
InteractiveObject from AIS
is
Create
returns NamedShapeDriver from TPrsStd;
---Purpose: Constructs an empty named shape driver.
Update (me : mutable ;
aLabel : Label from TDF;
anAISObject : in out InteractiveObject from AIS)
returns Boolean from Standard
is redefined virtual;
--- Purpose: Build the AISObject (if null) or update it.
-- No compute is done.
-- Returns <True> if informations was found
-- and AISObject updated.
end NamedShapeDriver;

View File

@@ -13,23 +13,24 @@
// last modified by SRN 01/08/2000
#include <TPrsStd_NamedShapeDriver.ixx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Shape.hxx>
#include <Geom_Transformation.hxx>
#include <Prs3d_Presentation.hxx>
#include <PrsMgr_Presentation.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TDataStd.hxx>
#include <TDF_Label.hxx>
#include <TNaming_NamedShape.hxx>
#include <AIS_Shape.hxx>
#include <AIS_InteractiveContext.hxx>
#include <TDataStd.hxx>
#include <Standard_GUID.hxx>
#include <TPrsStd_DriverTable.hxx>
#include <TNaming_Tool.hxx>
#include <TopLoc_Location.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#include <PrsMgr_Presentation.hxx>
#include <Prs3d_Presentation.hxx>
#include <PrsMgr_PresentationManager.hxx>
#include <Geom_Transformation.hxx>
#include <TPrsStd_DriverTable.hxx>
#include <TPrsStd_NamedShapeDriver.hxx>
#undef OPTIM_UPDATE // If this variable is defined there will be done
// more otimized update of AIS_Shape. If an object was

View File

@@ -0,0 +1,71 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_NamedShapeDriver_HeaderFile
#define _TPrsStd_NamedShapeDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_NamedShapeDriver;
DEFINE_STANDARD_HANDLE(TPrsStd_NamedShapeDriver, TPrsStd_Driver)
//! An implementation of TPrsStd_Driver for named shapes.
class TPrsStd_NamedShapeDriver : public TPrsStd_Driver
{
public:
//! Constructs an empty named shape driver.
Standard_EXPORT TPrsStd_NamedShapeDriver();
//! Build the AISObject (if null) or update it.
//! No compute is done.
//! Returns <True> if informations was found
//! and AISObject updated.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& aLabel, Handle(AIS_InteractiveObject)& anAISObject) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_NamedShapeDriver,TPrsStd_Driver)
protected:
private:
};
#endif // _TPrsStd_NamedShapeDriver_HeaderFile

View File

@@ -1,41 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class PlaneDriver from TPrsStd inherits Driver from TPrsStd
---Purpose: An implementation of TPrsStd_Driver for planes.
uses
GUID from Standard,
Label from TDF,
InteractiveObject from AIS
is
Create
returns PlaneDriver from TPrsStd;
---Purpose: Constructs an empty plane driver.
Update (me : mutable ;
aLabel : Label from TDF;
anAISObject : in out InteractiveObject from AIS)
returns Boolean from Standard
is redefined virtual;
--- Purpose: Build the AISObject (if null) or update it.
-- No compute is done.
-- Returns <True> if informations was found
-- and AISObject updated.
end PlaneDriver;

View File

@@ -11,19 +11,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_PlaneDriver.ixx>
#include <TDF_Label.hxx>
#include <TDataXtd_Plane.hxx>
//#include <TDataStd_Datum.hxx>
#include <TDataXtd_Geometry.hxx>
#include <AIS_Plane.hxx>
#include <AIS_InteractiveContext.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Tool.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Plane.hxx>
#include <Geom_Plane.hxx>
#include <gp_Pln.hxx>
#include <Standard_Type.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDataXtd_Plane.hxx>
#include <TDF_Label.hxx>
#include <TNaming_NamedShape.hxx>
#include <TNaming_Tool.hxx>
#include <TPrsStd_PlaneDriver.hxx>
//#include <TDataStd_Datum.hxx>
//=======================================================================
//function :
//purpose :

View File

@@ -0,0 +1,71 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_PlaneDriver_HeaderFile
#define _TPrsStd_PlaneDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_PlaneDriver;
DEFINE_STANDARD_HANDLE(TPrsStd_PlaneDriver, TPrsStd_Driver)
//! An implementation of TPrsStd_Driver for planes.
class TPrsStd_PlaneDriver : public TPrsStd_Driver
{
public:
//! Constructs an empty plane driver.
Standard_EXPORT TPrsStd_PlaneDriver();
//! Build the AISObject (if null) or update it.
//! No compute is done.
//! Returns <True> if informations was found
//! and AISObject updated.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& aLabel, Handle(AIS_InteractiveObject)& anAISObject) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_PlaneDriver,TPrsStd_Driver)
protected:
private:
};
#endif // _TPrsStd_PlaneDriver_HeaderFile

View File

@@ -1,41 +0,0 @@
-- Created on: 1997-08-01
-- Created by: SMO
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class PointDriver from TPrsStd inherits Driver from TPrsStd
---Purpose: An implementation of TPrsStd_Driver for points.
uses
GUID from Standard,
Label from TDF,
InteractiveObject from AIS
is
Create
returns PointDriver from TPrsStd;
---Purpose: Constructs an empty point driver.
Update (me : mutable ;
aLabel : Label from TDF;
anAISObject : in out InteractiveObject from AIS)
returns Boolean from Standard
is redefined virtual;
--- Purpose: Build the AISObject (if null) or update it.
-- No compute is done.
-- Returns <True> if informations was found
-- and AISObject updated.
end PointDriver;

View File

@@ -11,20 +11,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <TPrsStd_PointDriver.ixx>
#include <TDF_Label.hxx>
#include <TDataXtd_Point.hxx>
#include <TDataXtd_Geometry.hxx>
//#include <TDataStd_Datum.hxx>
#include <AIS_Point.hxx>
#include <AIS_InteractiveContext.hxx>
#include <Geom_Point.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Point.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_Point.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
#include <TDataXtd_Geometry.hxx>
#include <TDataXtd_Point.hxx>
#include <TDF_Label.hxx>
#include <TPrsStd_PointDriver.hxx>
//#include <TDataStd_Datum.hxx>
//=======================================================================
//function :
//purpose :

View File

@@ -0,0 +1,71 @@
// Created on: 1997-08-01
// Created by: SMO
// Copyright (c) 1997-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _TPrsStd_PointDriver_HeaderFile
#define _TPrsStd_PointDriver_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <TPrsStd_Driver.hxx>
#include <Standard_Boolean.hxx>
class TDF_Label;
class AIS_InteractiveObject;
class TPrsStd_PointDriver;
DEFINE_STANDARD_HANDLE(TPrsStd_PointDriver, TPrsStd_Driver)
//! An implementation of TPrsStd_Driver for points.
class TPrsStd_PointDriver : public TPrsStd_Driver
{
public:
//! Constructs an empty point driver.
Standard_EXPORT TPrsStd_PointDriver();
//! Build the AISObject (if null) or update it.
//! No compute is done.
//! Returns <True> if informations was found
//! and AISObject updated.
Standard_EXPORT virtual Standard_Boolean Update (const TDF_Label& aLabel, Handle(AIS_InteractiveObject)& anAISObject) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(TPrsStd_PointDriver,TPrsStd_Driver)
protected:
private:
};
#endif // _TPrsStd_PointDriver_HeaderFile