mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0022751: Issues around Prs3d_TextAspect::Print()
This commit is contained in:
@@ -33,7 +33,6 @@ Graphic3d_Group.pxx
|
||||
Graphic3d_Group_1.cxx
|
||||
Graphic3d_Group_2.cxx
|
||||
Graphic3d_Group_3.cxx
|
||||
Graphic3d_Group_4.cxx
|
||||
Graphic3d_Group_5.cxx
|
||||
Graphic3d_Group_7.cxx
|
||||
Graphic3d_Group_8.cxx
|
||||
|
@@ -320,59 +320,6 @@ is
|
||||
is deferred;
|
||||
---Purpose: call_togl_structure
|
||||
|
||||
--------------------------------
|
||||
-- Category: Exploration methods
|
||||
--------------------------------
|
||||
|
||||
DumpGroup ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_structure_exploration
|
||||
|
||||
DumpStructure ( me : mutable;
|
||||
ACStructure : CStructure from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_structure_exploration
|
||||
|
||||
DumpView ( me : mutable;
|
||||
ACView : CView from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_view_exploration
|
||||
|
||||
ElementExploration ( me : mutable;
|
||||
ACStructure : CStructure from Graphic3d;
|
||||
ElementNumber : Integer from Standard;
|
||||
AVertex : out VertexNC from Graphic3d;
|
||||
AVector : out Vector from Graphic3d )
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
---Purpose: call_togl_element_exploration
|
||||
|
||||
ElementType ( me : mutable;
|
||||
ACStructure : CStructure from Graphic3d;
|
||||
ElementNumber : Integer from Standard )
|
||||
returns TypeOfPrimitive from Graphic3d
|
||||
is deferred;
|
||||
---Purpose: call_togl_element_type
|
||||
|
||||
------------------------------------
|
||||
-- Category: Pick management methods
|
||||
------------------------------------
|
||||
|
||||
InitPick ( me : mutable )
|
||||
is deferred;
|
||||
---Purpose: call_togl_init_pick
|
||||
|
||||
Pick ( me : mutable;
|
||||
ACPick : out CPick from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_pick
|
||||
|
||||
PickId ( me : mutable;
|
||||
ACGroup : CGroup from Graphic3d )
|
||||
is deferred;
|
||||
---Purpose: call_togl_pickid
|
||||
|
||||
------------------------------------
|
||||
-- Category: Structured mode methods
|
||||
------------------------------------
|
||||
|
@@ -233,34 +233,6 @@
|
||||
-- group <me>.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
--------------------------------------------------
|
||||
-- Category: Methods to manage the pick identifier
|
||||
--------------------------------------------------
|
||||
|
||||
PickId ( me )
|
||||
returns Integer from Standard
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the pick identifier of the group <me>.
|
||||
-- Category: Methods to manage the pick identifier
|
||||
-- Warning: Returns 0 if the pick identifier is not defined.
|
||||
|
||||
RemovePickId ( me : mutable )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Removes the pick identifier of the group <me>.
|
||||
-- Category: Methods to manage the pick identifier
|
||||
-- Warning: Now the Pick Identifier is null.
|
||||
|
||||
SetPickId ( me : mutable;
|
||||
Id : Integer from Standard )
|
||||
---Level: Public
|
||||
---Purpose: Places a pick identifier in the group <me>.
|
||||
-- Category: Methods to manage the pick identifier
|
||||
-- Warning: A Pick Identifier is an integer greater than zero.
|
||||
--- Raises PickIdDefinitionError if <Id> is a negative value.
|
||||
raises PickIdDefinitionError from Graphic3d is static;
|
||||
|
||||
-------------------------------------
|
||||
-- Category: Methods to create Marker
|
||||
-------------------------------------
|
||||
@@ -975,13 +947,7 @@
|
||||
----------------------------
|
||||
-- Category: Private methods
|
||||
----------------------------
|
||||
|
||||
Exploration ( me )
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Purpose: Prints informations about the group <me>.
|
||||
---Category: Private methods
|
||||
|
||||
|
||||
Labels ( me;
|
||||
LB, LE : in out Integer from Standard )
|
||||
is static private;
|
||||
|
@@ -109,14 +109,6 @@ void Graphic3d_Group::Labels (Standard_Integer& LB, Standard_Integer& LE) const
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Exploration () const {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
MyGraphicDriver->DumpGroup (MyCGroup);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::Update () const {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
@@ -1,61 +0,0 @@
|
||||
|
||||
// File Graphic3d_Group_4.cxx (PickId)
|
||||
// Created Fevrier 1992
|
||||
// Author NW,JPB,CAL
|
||||
|
||||
//-Copyright MatraDatavision 1991,1992
|
||||
|
||||
//-Version
|
||||
|
||||
//-Design Declaration des variables specifiques aux groupes
|
||||
// de primitives
|
||||
|
||||
//-Warning Un groupe est defini dans une structure
|
||||
// Il s'agit de la plus petite entite editable
|
||||
|
||||
//-References
|
||||
|
||||
//-Language C++ 2.0
|
||||
|
||||
//-Declarations
|
||||
|
||||
// for the class
|
||||
#include <Graphic3d_Group.jxx>
|
||||
#include <Graphic3d_Group.pxx>
|
||||
|
||||
//-Methods, in order
|
||||
|
||||
Standard_Integer Graphic3d_Group::PickId () const {
|
||||
|
||||
return (Standard_Integer (MyCGroup.PickId.Value));
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::RemovePickId () {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
MyCGroup.PickId.IsDef = 0;
|
||||
MyCGroup.PickId.Value = 0;
|
||||
|
||||
MyGraphicDriver->PickId (MyCGroup);
|
||||
|
||||
MyCGroup.PickId.IsSet = 0;
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Group::SetPickId (const Standard_Integer Id) {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
if (Id <= 0)
|
||||
Graphic3d_PickIdDefinitionError::Raise ("Bad value for PickId");
|
||||
|
||||
MyCGroup.PickId.IsDef = 1;
|
||||
MyCGroup.PickId.Value = int (Id);
|
||||
|
||||
MyGraphicDriver->PickId (MyCGroup);
|
||||
|
||||
MyCGroup.PickId.IsSet = 1;
|
||||
|
||||
}
|
||||
|
@@ -414,90 +414,7 @@ is
|
||||
-- Polygons, Triangles or Quadrangles.
|
||||
---Category: Inquire methods
|
||||
|
||||
Exploration ( me;
|
||||
ElementNumber : Integer from Standard;
|
||||
AVertex : out VertexNC from Graphic3d;
|
||||
AVector : out Vector from Graphic3d )
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Purpose: Explores a structure element of <me>.
|
||||
-- Returns Standard_True if the exploration succeded and
|
||||
-- Standard_False if the exploration is done or if the
|
||||
-- specified structure element is not in the structure.
|
||||
-- <AVertex> contains the coordinates, the normal and
|
||||
-- the color of the vertex found in the structure element.
|
||||
-- <AVector> contains the normal of the face.
|
||||
-- Warning: - The structure element number is given by
|
||||
-- Visual3d_ViewManager::Pick method.
|
||||
-- - The primitive type is given by
|
||||
-- Graphic3d_Structure::Type method.
|
||||
-- - The normal is (0.0, 0.0, 0.0) when the normal is not
|
||||
-- specified in the structure element.
|
||||
-- - The color is (0.0, 0.0, 0.0) when the color is not
|
||||
-- specified in the structure element.
|
||||
-- - To initialize the exploration, you have to call the
|
||||
-- Graphic3d_Structure::Type method before this method.
|
||||
--
|
||||
-- Programming example :
|
||||
--
|
||||
-- // Define a graphic device
|
||||
-- Handle(Graphic3d_GraphicDevice) GD =
|
||||
-- new Graphic3d_GraphicDevice ("dummy:0.0");
|
||||
--
|
||||
-- // Define a view manager
|
||||
-- Handle(Visual3d_ViewManager) VM = new Visual3d_ViewManager (GD);
|
||||
--
|
||||
-- // Define a view
|
||||
-- Handle(Visual3d_View) V = new Visual3d_View (VM);
|
||||
--
|
||||
-- // Define a window
|
||||
-- Handle(Aspect_Window) W = new Aspect_Window
|
||||
-- (GD, "Graphic View 1", 0.695, 0.695, 0.600, 0.600,
|
||||
-- Xw_WQ_3DQUALITY, Quantity_NOC_MATRAGRAY);
|
||||
--
|
||||
-- // Define a context pick
|
||||
-- Visual3d_ContextPick CTXP;
|
||||
--
|
||||
-- // Activate the view
|
||||
-- V->SetWindow (W);
|
||||
-- V->Activate ();
|
||||
--
|
||||
-- // Create a structure
|
||||
-- Handle(Graphic3d_Structure) S = new Graphic3d_Structure (V);
|
||||
-- Handle(Graphic3d_Group) G = new Graphic3d_Group (S);
|
||||
--
|
||||
-- // Create a polygon
|
||||
-- G->Polygon (PtsArray);
|
||||
--
|
||||
-- // Display the structure
|
||||
-- S->Display ();
|
||||
--
|
||||
-- // Pick
|
||||
-- Visual3d_PickDescriptor PDes (CTXP);
|
||||
-- PDes.Clear ();
|
||||
-- PDes = V->Pick (CTXP, W, x, y);
|
||||
--
|
||||
-- // Explore the top structure
|
||||
-- Standard_Boolean Next = Standard_True;
|
||||
-- Graphic3d_Vertex AVertex;
|
||||
-- Graphic3d_Vector AVector;
|
||||
-- if ((PDes.TopStructure ())->Type () == Graphic3d_TOP_POLYGON)
|
||||
-- while (Next) {
|
||||
-- Next = S->Exploration (PDes.TopElementNumber (),
|
||||
-- AVertex, AVector);
|
||||
-- if (Next) {
|
||||
-- cout << "Point " << AVertex.X () << " , "
|
||||
-- << AVertex.Y () << " , " << AVertex.Z () << "\n";
|
||||
-- if (! AVector.LengthZero ())
|
||||
-- cout << "Normal " << AVector.X () << " , "
|
||||
-- << AVector.Y () << " , " << AVector.Z () << "\n";
|
||||
-- cout << flush;
|
||||
-- }
|
||||
-- }
|
||||
--
|
||||
---Category: Inquire methods
|
||||
|
||||
|
||||
FillArea3dAspect ( me )
|
||||
returns AspectFillArea3d from Graphic3d
|
||||
is static;
|
||||
@@ -641,20 +558,6 @@ is
|
||||
---Purpose: Returns the values of the current default attributes.
|
||||
---Category: Inquire methods
|
||||
|
||||
Type ( me;
|
||||
ElementNumber : Integer from Standard )
|
||||
returns TypeOfPrimitive from Graphic3d
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Returns the primitive type stored in the structure
|
||||
-- element <ElementNumber>.
|
||||
-- Initialises the exploration of this primitive.
|
||||
-- If the structure element is not a primitive, returns
|
||||
-- Graphic3d_TOP_UNDEFINED.
|
||||
-- Warning: The structure element number is given by
|
||||
-- Visual3d_ViewManager::Pick method.
|
||||
---Category: Inquire methods
|
||||
|
||||
Visual ( me )
|
||||
returns TypeOfStructure from Graphic3d
|
||||
is static;
|
||||
@@ -900,12 +803,6 @@ is
|
||||
-- <ADelta> = +1 or -1
|
||||
---Category: Private methods
|
||||
|
||||
Exploration ( me )
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Purpose: Prints informations about the structure <me>.
|
||||
---Category: Private methods
|
||||
|
||||
GraphicClear ( me : mutable;
|
||||
WithDestruction : Boolean from Standard )
|
||||
is static;
|
||||
|
@@ -1875,39 +1875,6 @@ Handle(Graphic3d_StructureManager) Graphic3d_Structure::StructureManager () cons
|
||||
|
||||
}
|
||||
|
||||
Graphic3d_TypeOfPrimitive Graphic3d_Structure::Type (const Standard_Integer ElementNumber) const {
|
||||
|
||||
if (IsDeleted ()) return (Graphic3d_TOP_UNDEFINED);
|
||||
|
||||
Graphic3d_TypeOfPrimitive Result;
|
||||
|
||||
Result = MyGraphicDriver->ElementType
|
||||
(MyCStructure, ElementNumber);
|
||||
|
||||
return (Result);
|
||||
|
||||
}
|
||||
|
||||
Standard_Boolean Graphic3d_Structure::Exploration (const Standard_Integer ElementNumber, Graphic3d_VertexNC& AVertex, Graphic3d_Vector& AVector) const {
|
||||
|
||||
Standard_Boolean Result = Standard_False;
|
||||
|
||||
if (IsDeleted ()) return (Result);
|
||||
|
||||
Result = MyGraphicDriver->ElementExploration
|
||||
(MyCStructure, ElementNumber, AVertex, AVector);
|
||||
|
||||
return (Result);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Structure::Exploration () const {
|
||||
|
||||
if (IsDeleted ()) return;
|
||||
|
||||
MyGraphicDriver->DumpStructure (MyCStructure);
|
||||
|
||||
}
|
||||
|
||||
void Graphic3d_Structure::MinMaxCoord (Standard_Real& XMin, Standard_Real& YMin, Standard_Real& ZMin, Standard_Real& XMax, Standard_Real& YMax, Standard_Real& ZMax) const {
|
||||
|
||||
|
Reference in New Issue
Block a user