mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 01:22:05 +05:00
PAL12874: Object Vector. Display a vector with arrow on its end.
This commit is contained in:
parent
916e6ce885
commit
47e6e80618
@ -40,6 +40,7 @@
|
|||||||
#include "GEOM_Actor.h"
|
#include "GEOM_Actor.h"
|
||||||
#include "GEOM_AssemblyBuilder.h"
|
#include "GEOM_AssemblyBuilder.h"
|
||||||
#include "GEOM_AISShape.hxx"
|
#include "GEOM_AISShape.hxx"
|
||||||
|
#include "GEOM_AISVector.hxx"
|
||||||
#include "GEOM_AISTrihedron.hxx"
|
#include "GEOM_AISTrihedron.hxx"
|
||||||
#include "GEOM_VTKTrihedron.hxx"
|
#include "GEOM_VTKTrihedron.hxx"
|
||||||
|
|
||||||
@ -520,7 +521,12 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
{
|
{
|
||||||
if ( !myShape.IsNull() )
|
if ( !myShape.IsNull() )
|
||||||
{
|
{
|
||||||
Handle(GEOM_AISShape) AISShape = new GEOM_AISShape( myShape, "" );
|
//Handle(GEOM_AISShape) AISShape = new GEOM_AISShape( myShape, "" );
|
||||||
|
Handle(GEOM_AISShape) AISShape;
|
||||||
|
if (myType == GEOM_VECTOR)
|
||||||
|
AISShape = new GEOM_AISVector (myShape, "");
|
||||||
|
else
|
||||||
|
AISShape = new GEOM_AISShape (myShape, "");
|
||||||
// Temporary staff: vertex must be infinite for correct visualization
|
// Temporary staff: vertex must be infinite for correct visualization
|
||||||
AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX );
|
AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX );
|
||||||
|
|
||||||
@ -530,7 +536,8 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs )
|
|||||||
|
|
||||||
// Set color and number for iso lines
|
// Set color and number for iso lines
|
||||||
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
|
||||||
QColor col = aResMgr->colorValue( "Geometry", "isos_color", QColor(int(0.5*255), int(0.5*255), int(0.5*255)) );
|
QColor col = aResMgr->colorValue( "Geometry", "isos_color",
|
||||||
|
QColor(int(0.5*255), int(0.5*255), int(0.5*255)) );
|
||||||
Quantity_Color aColor = SalomeApp_Tools::color( col );
|
Quantity_Color aColor = SalomeApp_Tools::color( col );
|
||||||
int anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
|
int anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1);
|
||||||
int aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
|
int aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1);
|
||||||
@ -675,7 +682,7 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
|
|||||||
|
|
||||||
vtkActorCollection* theActors = 0;
|
vtkActorCollection* theActors = 0;
|
||||||
|
|
||||||
if ( myType == GEOM_MARKER && !myShape.IsNull() && myShape.ShapeType() == TopAbs_FACE )
|
if ( myType == GEOM_MARKER && myShape.ShapeType() == TopAbs_FACE )
|
||||||
{
|
{
|
||||||
myToActivate = false;
|
myToActivate = false;
|
||||||
GEOM_VTKTrihedron* aTrh = GEOM_VTKTrihedron::New();
|
GEOM_VTKTrihedron* aTrh = GEOM_VTKTrihedron::New();
|
||||||
@ -703,7 +710,10 @@ void GEOM_Displayer::Update( SALOME_VTKPrs* prs )
|
|||||||
theActors->AddItem( aTrh );
|
theActors->AddItem( aTrh );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
theActors = GEOM_AssemblyBuilder::BuildActors( myShape, 0, 0, Standard_True );
|
{
|
||||||
|
bool isVector = (myType == GEOM_VECTOR);
|
||||||
|
theActors = GEOM_AssemblyBuilder::BuildActors( myShape, 0, 0, Standard_True, isVector );
|
||||||
|
}
|
||||||
|
|
||||||
theActors->InitTraversal();
|
theActors->InitTraversal();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user