Salome HOME
projects
/
modules
/
geom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2488be8
)
Merge from BR_PORTING_VTK6 01/03/2013
author
vsr
<vsr@opencascade.com>
Fri, 1 Mar 2013 13:10:52 +0000
(13:10 +0000)
committer
vsr
<vsr@opencascade.com>
Fri, 1 Mar 2013 13:10:52 +0000
(13:10 +0000)
20 files changed:
src/OBJECT/GEOM_Actor.cxx
patch
|
blob
|
history
src/OBJECT/GEOM_Actor.h
patch
|
blob
|
history
src/OBJECT/GEOM_DeviceActor.cxx
patch
|
blob
|
history
src/OBJECT/GEOM_DeviceActor.h
patch
|
blob
|
history
src/OBJECT/GEOM_OCCReader.cxx
patch
|
blob
|
history
src/OBJECT/GEOM_OCCReader.h
patch
|
blob
|
history
src/OBJECT/GEOM_VTKTrihedron.cxx
patch
|
blob
|
history
src/OBJECT/GEOM_VTKTrihedron.hxx
patch
|
blob
|
history
src/OCC2VTK/GEOM_EdgeSource.cxx
patch
|
blob
|
history
src/OCC2VTK/GEOM_EdgeSource.h
patch
|
blob
|
history
src/OCC2VTK/GEOM_FaceSource.cxx
patch
|
blob
|
history
src/OCC2VTK/GEOM_FaceSource.h
patch
|
blob
|
history
src/OCC2VTK/GEOM_ShadingFace.cxx
patch
|
blob
|
history
src/OCC2VTK/GEOM_ShadingFace.h
patch
|
blob
|
history
src/OCC2VTK/GEOM_VertexSource.cxx
patch
|
blob
|
history
src/OCC2VTK/GEOM_VertexSource.h
patch
|
blob
|
history
src/OCC2VTK/GEOM_WireframeFace.cxx
patch
|
blob
|
history
src/OCC2VTK/GEOM_WireframeFace.h
patch
|
blob
|
history
src/OperationGUI/OperationGUI_ClippingDlg.cxx
patch
|
blob
|
history
src/VTKExport/VTKExport.cxx
patch
|
blob
|
history
diff --git
a/src/OBJECT/GEOM_Actor.cxx
b/src/OBJECT/GEOM_Actor.cxx
index 1552ee79425aa5ad416aeeda223ad481ae0a05c2..a62de04f9cffb3e1903363115612cf7675f60efc 100644
(file)
--- a/
src/OBJECT/GEOM_Actor.cxx
+++ b/
src/OBJECT/GEOM_Actor.cxx
@@
-119,7
+119,7
@@
GEOM_Actor::GEOM_Actor():
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
#endif
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
#endif
- myPolyDataMapper->SetInput
(myAppendFilter->GetOutpu
t());
+ myPolyDataMapper->SetInput
Connection(myAppendFilter->GetOutputPor
t());
vtkProperty* aProperty;
myHighlightProp->SetAmbient(0.5);
vtkProperty* aProperty;
myHighlightProp->SetAmbient(0.5);
@@
-132,48
+132,48
@@
GEOM_Actor::GEOM_Actor():
myHighlightProp->SetPointSize(SALOME_POINT_SIZE);
myHighlightActor->SetProperty(myHighlightProp.GetPointer());
myHighlightProp->SetPointSize(SALOME_POINT_SIZE);
myHighlightActor->SetProperty(myHighlightProp.GetPointer());
- this->myHighlightActor->SetInput(myAppendFilter->GetOutput(),false);
+ this->myHighlightActor->SetInput(myAppendFilter->GetOutput
Port
(),false);
myPreHighlightProp->SetColor(0,1,1);
myPreHighlightProp->SetPointSize(SALOME_POINT_SIZE+2);
myPreHighlightProp->SetLineWidth(SALOME_LINE_WIDTH+1);
myPreHighlightProp->SetRepresentationToWireframe();
myPreHighlightProp->SetColor(0,1,1);
myPreHighlightProp->SetPointSize(SALOME_POINT_SIZE+2);
myPreHighlightProp->SetLineWidth(SALOME_LINE_WIDTH+1);
myPreHighlightProp->SetRepresentationToWireframe();
- myAppendFilter->AddInput
(myVertexSource->GetOutpu
t());
- myVertexActor->SetInput(myVertexSource->GetOutput(),false);
+ myAppendFilter->AddInput
Connection(myVertexSource->GetOutputPor
t());
+ myVertexActor->SetInput(myVertexSource->GetOutput
Port
(),false);
aProperty = myVertexActor->GetProperty();
aProperty->SetRepresentation(VTK_POINTS);
aProperty->SetPointSize(3);
aProperty->SetColor(1, 1, 0);
aProperty = myVertexActor->GetProperty();
aProperty->SetRepresentation(VTK_POINTS);
aProperty->SetPointSize(3);
aProperty->SetColor(1, 1, 0);
- myAppendFilter->AddInput
(myIsolatedEdgeSource->GetOutpu
t());
- myIsolatedEdgeActor->SetInput(myIsolatedEdgeSource->GetOutput(),false);
+ myAppendFilter->AddInput
Connection(myIsolatedEdgeSource->GetOutputPor
t());
+ myIsolatedEdgeActor->SetInput(myIsolatedEdgeSource->GetOutput
Port
(),false);
aProperty = myIsolatedEdgeActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
myIsolatedEdgeColor[0] = 1; myIsolatedEdgeColor[1] = 0; myIsolatedEdgeColor[2] = 0;
aProperty->SetColor(myIsolatedEdgeColor[0], myIsolatedEdgeColor[1], myIsolatedEdgeColor[2]);
aProperty = myIsolatedEdgeActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
myIsolatedEdgeColor[0] = 1; myIsolatedEdgeColor[1] = 0; myIsolatedEdgeColor[2] = 0;
aProperty->SetColor(myIsolatedEdgeColor[0], myIsolatedEdgeColor[1], myIsolatedEdgeColor[2]);
- myAppendFilter->AddInput
(myOneFaceEdgeSource->GetOutpu
t());
- myOneFaceEdgeActor->SetInput(myOneFaceEdgeSource->GetOutput(),false);
+ myAppendFilter->AddInput
Connection(myOneFaceEdgeSource->GetOutputPor
t());
+ myOneFaceEdgeActor->SetInput(myOneFaceEdgeSource->GetOutput
Port
(),false);
aProperty = myOneFaceEdgeActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
myOneFaceEdgeColor[0] = 0; myOneFaceEdgeColor[1] = 1; myOneFaceEdgeColor[2] = 0;
aProperty->SetColor(myOneFaceEdgeColor[0], myOneFaceEdgeColor[1], myOneFaceEdgeColor[2]);
aProperty = myOneFaceEdgeActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
myOneFaceEdgeColor[0] = 0; myOneFaceEdgeColor[1] = 1; myOneFaceEdgeColor[2] = 0;
aProperty->SetColor(myOneFaceEdgeColor[0], myOneFaceEdgeColor[1], myOneFaceEdgeColor[2]);
- myAppendFilter->AddInput
(mySharedEdgeSource->GetOutpu
t());
- mySharedEdgeActor->SetInput(mySharedEdgeSource->GetOutput(),false);
+ myAppendFilter->AddInput
Connection(mySharedEdgeSource->GetOutputPor
t());
+ mySharedEdgeActor->SetInput(mySharedEdgeSource->GetOutput
Port
(),false);
aProperty = mySharedEdgeActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
mySharedEdgeColor[0] = 1; mySharedEdgeColor[1] = 1; mySharedEdgeColor[2] = 0;
aProperty->SetColor(mySharedEdgeColor[0], mySharedEdgeColor[1], mySharedEdgeColor[2]);
aProperty = mySharedEdgeActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
mySharedEdgeColor[0] = 1; mySharedEdgeColor[1] = 1; mySharedEdgeColor[2] = 0;
aProperty->SetColor(mySharedEdgeColor[0], mySharedEdgeColor[1], mySharedEdgeColor[2]);
- myAppendFilter->AddInput
(myWireframeFaceSource->GetOutpu
t());
- myWireframeFaceActor->SetInput(myWireframeFaceSource->GetOutput(),false);
+ myAppendFilter->AddInput
Connection(myWireframeFaceSource->GetOutputPor
t());
+ myWireframeFaceActor->SetInput(myWireframeFaceSource->GetOutput
Port
(),false);
aProperty = myWireframeFaceActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
aProperty->SetColor(0.5, 0.5, 0.5);
aProperty = myWireframeFaceActor->GetProperty();
aProperty->SetRepresentation(VTK_WIREFRAME);
aProperty->SetColor(0.5, 0.5, 0.5);
- myShadingFaceActor->SetInput(myShadingFaceSource->GetOutput(),true);
+ myShadingFaceActor->SetInput(myShadingFaceSource->GetOutput
Port
(),true);
myShadingFaceProp->SetRepresentation(VTKViewer::Representation::Surface);
myShadingFaceProp->SetInterpolationToGouraud();
myShadingFaceProp->SetRepresentation(VTKViewer::Representation::Surface);
myShadingFaceProp->SetInterpolationToGouraud();
@@
-219,7
+219,7
@@
New()
void Write(vtkPolyData* theDataSet, const char* theFileName){
vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
MESSAGE ("Write - "<<theFileName<<"' : "<<theDataSet->GetNumberOfPoints()<<"; "<<theDataSet->GetNumberOfCells());
void Write(vtkPolyData* theDataSet, const char* theFileName){
vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
MESSAGE ("Write - "<<theFileName<<"' : "<<theDataSet->GetNumberOfPoints()<<"; "<<theDataSet->GetNumberOfCells());
- aWriter->SetInput(theDataSet);
+ aWriter->SetInput
Data
(theDataSet);
aWriter->SetFileName(theFileName);
//aWriter->Write();
aWriter->Delete();
aWriter->SetFileName(theFileName);
//aWriter->Write();
aWriter->Delete();
@@
-601,10
+601,10
@@
void GEOM_Actor::Render(vtkRenderer *ren, vtkMapper *theMapper)
/* if(myShape.ShapeType() == TopAbs_VERTEX) {
if(ren){
//The parameter determine size of vertex actor relate to diagonal of RendererWindow
/* if(myShape.ShapeType() == TopAbs_VERTEX) {
if(ren){
//The parameter determine size of vertex actor relate to diagonal of RendererWindow
- static
vtkFloatingPointTyp
e delta = 0.01;
-
vtkFloatingPointTyp
e X1 = -1, Y1 = -1, Z1 = 0;
+ static
doubl
e delta = 0.01;
+
doubl
e X1 = -1, Y1 = -1, Z1 = 0;
ren->ViewToWorld(X1,Y1,Z1);
ren->ViewToWorld(X1,Y1,Z1);
-
vtkFloatingPointTyp
e X2 = +1, Y2 = +1, Z2 = 0;
+
doubl
e X2 = +1, Y2 = +1, Z2 = 0;
ren->ViewToWorld(X2,Y2,Z2);
Z2 = sqrt((X2-X1)*(X2-X1) + (Y2-Y1)*(Y2-Y1) + (Z2-Z1)*(Z2-Z1));
this->SetScale(Z2*delta);
ren->ViewToWorld(X2,Y2,Z2);
Z2 = sqrt((X2-X1)*(X2-X1) + (Y2-Y1)*(Y2-Y1) + (Z2-Z1)*(Z2-Z1));
this->SetScale(Z2*delta);
@@
-696,7
+696,7
@@
void GEOM_Actor::highlight(bool highlight)
SALOME_Actor::highlight(highlight);
}
SALOME_Actor::highlight(highlight);
}
-void GEOM_Actor::SetOpacity(
vtkFloatingPointTyp
e opa)
+void GEOM_Actor::SetOpacity(
doubl
e opa)
{
// enk:tested OK
myShadingFaceProp->SetOpacity(opa);
{
// enk:tested OK
myShadingFaceProp->SetOpacity(opa);
@@
-706,13
+706,13
@@
void GEOM_Actor::SetOpacity(vtkFloatingPointType opa)
myVertexActor->GetProperty()->SetOpacity(opa);
}
myVertexActor->GetProperty()->SetOpacity(opa);
}
-
vtkFloatingPointTyp
e GEOM_Actor::GetOpacity()
+
doubl
e GEOM_Actor::GetOpacity()
{
// enk:tested OK
return myShadingFaceProp->GetOpacity();
}
{
// enk:tested OK
return myShadingFaceProp->GetOpacity();
}
-void GEOM_Actor::SetColor(
vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetColor(
double r,double g,doubl
e b)
{
// set the same color to all sub-actors:
// - points
{
// set the same color to all sub-actors:
// - points
@@
-728,9
+728,9
@@
void GEOM_Actor::SetColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloat
myShadingBackFaceProp->SetColor(r,g,b); // back face shading color
}
myShadingBackFaceProp->SetColor(r,g,b); // back face shading color
}
-void GEOM_Actor::GetColor(
vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointTyp
e& b)
+void GEOM_Actor::GetColor(
double& r,double& g,doubl
e& b)
{
{
-
vtkFloatingPointTyp
e aRGB[3];
+
doubl
e aRGB[3];
myShadingFaceProp->GetColor(aRGB);
r = aRGB[0];
g = aRGB[1];
myShadingFaceProp->GetColor(aRGB);
r = aRGB[0];
g = aRGB[1];
@@
-741,7
+741,7
@@
void GEOM_Actor::GetColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFlo
\brief Set color of points
Points actor is shown in Wireframe mode only, see SetVisibility()
*/
\brief Set color of points
Points actor is shown in Wireframe mode only, see SetVisibility()
*/
-void GEOM_Actor::SetPointColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetPointColor(
double r, double g, doubl
e b)
{
myVertexActor->GetProperty()->SetColor(r, g, b);
}
{
myVertexActor->GetProperty()->SetColor(r, g, b);
}
@@
-751,7
+751,7
@@
void GEOM_Actor::SetPointColor(vtkFloatingPointType r, vtkFloatingPointType g,
This actor is shown in all display mode, see SetVisibility()
TODO: check - this color seems to be used not only for standalone edges
*/
This actor is shown in all display mode, see SetVisibility()
TODO: check - this color seems to be used not only for standalone edges
*/
-void GEOM_Actor::SetIsolatedEdgeColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetIsolatedEdgeColor(
double r, double g, doubl
e b)
{
myIsolatedEdgeColor[0] = r; myIsolatedEdgeColor[1] = g; myIsolatedEdgeColor[2] = b;
if ( myDisplayMode != (int)eShadingWithEdges )
{
myIsolatedEdgeColor[0] = r; myIsolatedEdgeColor[1] = g; myIsolatedEdgeColor[2] = b;
if ( myDisplayMode != (int)eShadingWithEdges )
@@
-763,7
+763,7
@@
void GEOM_Actor::SetIsolatedEdgeColor(vtkFloatingPointType r, vtkFloatingPointTy
This actor is shown only in wireframe and shading+edges display modes, see SetVisibility()
TODO: check - this seems to be not working currently
*/
This actor is shown only in wireframe and shading+edges display modes, see SetVisibility()
TODO: check - this seems to be not working currently
*/
-void GEOM_Actor::SetSharedEdgeColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetSharedEdgeColor(
double r, double g, doubl
e b)
{
mySharedEdgeColor[0] = r; mySharedEdgeColor[1] = g; mySharedEdgeColor[2] = b;
if ( myDisplayMode != (int)eShadingWithEdges )
{
mySharedEdgeColor[0] = r; mySharedEdgeColor[1] = g; mySharedEdgeColor[2] = b;
if ( myDisplayMode != (int)eShadingWithEdges )
@@
-775,7
+775,7
@@
void GEOM_Actor::SetSharedEdgeColor(vtkFloatingPointType r, vtkFloatingPointType
This actor is shown only in wireframe and shading+edges display modes, see SetVisibility()
TODO: this color should be used not only for faces
*/
This actor is shown only in wireframe and shading+edges display modes, see SetVisibility()
TODO: this color should be used not only for faces
*/
-void GEOM_Actor::SetFreeEdgeColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetFreeEdgeColor(
double r, double g, doubl
e b)
{
myOneFaceEdgeColor[0] = r; myOneFaceEdgeColor[1] = g; myOneFaceEdgeColor[2] = b;
if ( myDisplayMode != (int)eShadingWithEdges )
{
myOneFaceEdgeColor[0] = r; myOneFaceEdgeColor[1] = g; myOneFaceEdgeColor[2] = b;
if ( myDisplayMode != (int)eShadingWithEdges )
@@
-786,7
+786,7
@@
void GEOM_Actor::SetFreeEdgeColor(vtkFloatingPointType r, vtkFloatingPointType g
\brief Set color of iso-lines
This actor is shown only in wireframe display mode, see SetVisibility()
*/
\brief Set color of iso-lines
This actor is shown only in wireframe display mode, see SetVisibility()
*/
-void GEOM_Actor::SetIsosColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetIsosColor(
double r, double g, doubl
e b)
{
myWireframeFaceActor->GetProperty()->SetColor(r, g, b);
}
{
myWireframeFaceActor->GetProperty()->SetColor(r, g, b);
}
@@
-1072,7
+1072,7
@@
void GEOM_Actor::GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result)
this->Transform->Pop();
}
this->Transform->Pop();
}
-void GEOM_Actor::SetEdgesInShadingColor(
vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointTyp
e b)
+void GEOM_Actor::SetEdgesInShadingColor(
double r,double g,doubl
e b)
{
myEdgesInShadingColor[0] = r;
myEdgesInShadingColor[1] = g;
{
myEdgesInShadingColor[0] = r;
myEdgesInShadingColor[1] = g;
diff --git
a/src/OBJECT/GEOM_Actor.h
b/src/OBJECT/GEOM_Actor.h
index d773b6cf6b090fd89d622a7af34c49ce05a0d67a..a717b630a1ec8ce9ff82c4300c0767cd628a738b 100644
(file)
--- a/
src/OBJECT/GEOM_Actor.h
+++ b/
src/OBJECT/GEOM_Actor.h
@@
-121,24
+121,24
@@
public:
void ShallowCopy(vtkProp *prop);
// Opacity
void ShallowCopy(vtkProp *prop);
// Opacity
- void SetOpacity(
vtkFloatingPointTyp
e opa);
-
vtkFloatingPointTyp
e GetOpacity();
+ void SetOpacity(
doubl
e opa);
+
doubl
e GetOpacity();
// Color (same to all sub-actors/display modes)
// Color (same to all sub-actors/display modes)
- void SetColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
- void GetColor(
vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointTyp
e& b);
+ void SetColor(
double r, double g, doubl
e b);
+ void GetColor(
double& r, double& g, doubl
e& b);
// Color of points
// Color of points
- void SetPointColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
+ void SetPointColor(
double r, double g, doubl
e b);
// Color of standalone edges, wires, vectors
// Color of standalone edges, wires, vectors
- void SetIsolatedEdgeColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
+ void SetIsolatedEdgeColor(
double r, double g, doubl
e b);
// Color of shared edges
// Color of shared edges
- void SetSharedEdgeColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
+ void SetSharedEdgeColor(
double r, double g, doubl
e b);
// Color of free edges
// Color of free edges
- void SetFreeEdgeColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
+ void SetFreeEdgeColor(
double r, double g, doubl
e b);
// Color of edges in shading+edges display mode
// Color of edges in shading+edges display mode
- void SetEdgesInShadingColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
+ void SetEdgesInShadingColor(
double r, double g, doubl
e b);
// Color of iso-lines
// Color of iso-lines
- void SetIsosColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b);
+ void SetIsosColor(
double r, double g, doubl
e b);
// Material
// Material
@@
-263,11
+263,11
@@
private:
GEOM_Actor(const GEOM_Actor&);
void operator=(const GEOM_Actor&);
GEOM_Actor(const GEOM_Actor&);
void operator=(const GEOM_Actor&);
-
vtkFloatingPointTyp
e myEdgesInWireframeColor[3];
-
vtkFloatingPointTyp
e myEdgesInShadingColor[3];
-
vtkFloatingPointTyp
e myIsolatedEdgeColor[3];
-
vtkFloatingPointTyp
e mySharedEdgeColor[3];
-
vtkFloatingPointTyp
e myOneFaceEdgeColor[3];
+
doubl
e myEdgesInWireframeColor[3];
+
doubl
e myEdgesInShadingColor[3];
+
doubl
e myIsolatedEdgeColor[3];
+
doubl
e mySharedEdgeColor[3];
+
doubl
e myOneFaceEdgeColor[3];
};
#endif //GEOM_ACTOR_H
};
#endif //GEOM_ACTOR_H
diff --git
a/src/OBJECT/GEOM_DeviceActor.cxx
b/src/OBJECT/GEOM_DeviceActor.cxx
index 9a25e86e57f99c5e30f6c34d733eebdd19eb0015..3c09b57ce3a1a04bec00a020d1571a038bfb78d2 100755
(executable)
--- a/
src/OBJECT/GEOM_DeviceActor.cxx
+++ b/
src/OBJECT/GEOM_DeviceActor.cxx
@@
-38,8
+38,8
@@
GEOM_DeviceActor::GEOM_DeviceActor():
myPolyDataNormals(vtkPolyDataNormals::New(),true),
myActor(VTKViewer_Actor::New(),true)
{
myPolyDataNormals(vtkPolyDataNormals::New(),true),
myActor(VTKViewer_Actor::New(),true)
{
- myStripper->SetInput
(myPolyDataNormals->GetOutpu
t());
- myPolyDataMapper->SetInput
(myStripper->GetOutpu
t());
+ myStripper->SetInput
Connection(myPolyDataNormals->GetOutputPor
t());
+ myPolyDataMapper->SetInput
Connection(myStripper->GetOutputPor
t());
myActor->SetMapper(myPolyDataMapper.Get());
myActor->PickableOff();
myActor->SetMapper(myPolyDataMapper.Get());
myActor->PickableOff();
@@
-51,12
+51,16
@@
GEOM_DeviceActor::~GEOM_DeviceActor()
void
GEOM_DeviceActor::
void
GEOM_DeviceActor::
-SetInput(vtk
PolyData
* thePolyData, bool theUseStripper)
+SetInput(vtk
AlgorithmOutput
* thePolyData, bool theUseStripper)
{
if(theUseStripper)
{
if(theUseStripper)
- myPolyDataNormals->SetInput(thePolyData);
+ {
+ myPolyDataNormals->SetInputConnection(thePolyData);
+ myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort());
+ myPolyDataMapper->SetInputConnection(myStripper->GetOutputPort());
+ }
else
else
- myPolyDataMapper->SetInput(thePolyData);
+ myPolyDataMapper->SetInput
Connection
(thePolyData);
}
void
}
void
@@
-72,20
+76,20
@@
GetProperty()
{
return myActor->GetProperty();
}
{
return myActor->GetProperty();
}
-
-void
\r
-GEOM_DeviceActor::
\r
-SetBackfaceProperty(vtkProperty* theProperty)
\r
-{
\r
- myActor->SetBackfaceProperty(theProperty);
\r
-}
\r
-
\r
-vtkProperty*
\r
-GEOM_DeviceActor::
\r
-GetBackfaceProperty()
\r
-{
\r
- return myActor->GetBackfaceProperty();
\r
-}
\r
+
+void
+GEOM_DeviceActor::
+SetBackfaceProperty(vtkProperty* theProperty)
+{
+ myActor->SetBackfaceProperty(theProperty);
+}
+
+vtkProperty*
+GEOM_DeviceActor::
+GetBackfaceProperty()
+{
+ return myActor->GetBackfaceProperty();
+}
void
GEOM_DeviceActor::
void
GEOM_DeviceActor::
diff --git
a/src/OBJECT/GEOM_DeviceActor.h
b/src/OBJECT/GEOM_DeviceActor.h
index 67edada940fa30d9b8d691fc6e4c635ee3a392d9..c7baebeee885a3fe716daef584061341043438ca 100755
(executable)
--- a/
src/OBJECT/GEOM_DeviceActor.h
+++ b/
src/OBJECT/GEOM_DeviceActor.h
@@
-43,6
+43,7
@@
class vtkRenderer;
#include <vtkObject.h>
#include <vtkObject.h>
+class vtkAlgorithmOutput;
class VTK_EXPORT GEOM_DeviceActor: public vtkObject
{
class VTK_EXPORT GEOM_DeviceActor: public vtkObject
{
@@
-52,14
+53,14
@@
public:
void SetProperty(vtkProperty* theProperty);
vtkProperty* GetProperty();
void SetProperty(vtkProperty* theProperty);
vtkProperty* GetProperty();
-
\r
- void SetBackfaceProperty(vtkProperty* theProperty);
\r
+
+ void SetBackfaceProperty(vtkProperty* theProperty);
vtkProperty* GetBackfaceProperty();
void SetVisibility(int theVisibility);
int GetVisibility();
vtkProperty* GetBackfaceProperty();
void SetVisibility(int theVisibility);
int GetVisibility();
- void SetInput(vtk
PolyData
* thePolyData, bool theUseStripper);
+ void SetInput(vtk
AlgorithmOutput
* thePolyData, bool theUseStripper);
void AddToRender(vtkRenderer* theRenderer);
void RemoveFromRender(vtkRenderer* theRenderer);
void AddToRender(vtkRenderer* theRenderer);
void RemoveFromRender(vtkRenderer* theRenderer);
diff --git
a/src/OBJECT/GEOM_OCCReader.cxx
b/src/OBJECT/GEOM_OCCReader.cxx
index d9f1331a988553855750dcc540d927f993426ed2..0318da56780cc1f2e07069d261efbdb9e6ad7f52 100644
(file)
--- a/
src/OBJECT/GEOM_OCCReader.cxx
+++ b/
src/OBJECT/GEOM_OCCReader.cxx
@@
-33,6
+33,8
@@
#include <vtkObjectFactory.h>
#include <vtkPolyData.h>
#include <vtkObjectFactory.h>
#include <vtkPolyData.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
// OpenCASCADE Includes
#include <TopExp_Explorer.hxx>
// OpenCASCADE Includes
#include <TopExp_Explorer.hxx>
@@
-114,14
+116,18
@@
GEOM_OCCReader::~GEOM_OCCReader()
//=======================================================================
//=======================================================================
-// Function :
Execute
+// Function :
RequestData
// Purpose :
//=======================================================================
// Purpose :
//=======================================================================
+int GEOM_OCCReader::RequestData(vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+ vtkPolyData *output = vtkPolyData::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
-void GEOM_OCCReader::Execute() {
-
- vtkPolyData* output = this->GetOutput();
vtkPoints* Pts = NULL;
vtkCellArray* Cells = NULL;
TopLoc_Location aLoc;
vtkPoints* Pts = NULL;
vtkCellArray* Cells = NULL;
TopLoc_Location aLoc;
@@
-143,7
+149,7
@@
void GEOM_OCCReader::Execute() {
if(aPoly.IsNull()) {
Pts->Delete();
Cells->Delete();
if(aPoly.IsNull()) {
Pts->Delete();
Cells->Delete();
- return;
+ return
0
;
}
nbpts = aPoly->NbNodes();
}
nbpts = aPoly->NbNodes();
@@
-155,7
+161,7
@@
void GEOM_OCCReader::Execute() {
else {
Cells->Delete();
Pts->Delete();
else {
Cells->Delete();
Pts->Delete();
- return;
+ return
0
;
}
}
}
}
@@
-177,7
+183,7
@@
void GEOM_OCCReader::Execute() {
}
Pts->Delete();
Cells->Delete();
}
Pts->Delete();
Cells->Delete();
-
+ return 1;
}
//=======================================================================
}
//=======================================================================
diff --git
a/src/OBJECT/GEOM_OCCReader.h
b/src/OBJECT/GEOM_OCCReader.h
index c69b67d357cb2c9498bf653222d75cb44622ed09..350bb0113e6ec6cb91d6086474465eb1990623c5 100644
(file)
--- a/
src/OBJECT/GEOM_OCCReader.h
+++ b/
src/OBJECT/GEOM_OCCReader.h
@@
-35,7
+35,7
@@
#include "GEOM_OBJECT_defs.hxx"
#include "GEOM_OBJECT_defs.hxx"
-#include <vtk
PolyDataSource
.h>
+#include <vtk
Algorithm
.h>
class vtkPoints;
class vtkCellArray;
class vtkPoints;
class vtkCellArray;
@@
-46,7
+46,7
@@
class vtkCellArray;
#include <GeomAbs_IsoType.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <GeomAbs_IsoType.hxx>
#include <BRepAdaptor_Surface.hxx>
-class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtk
PolyDataSource
{
+class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtk
Algorithm
{
// methods
// methods
@@
-67,7
+67,8
@@
class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource {
GEOM_OCCReader();
~GEOM_OCCReader();
GEOM_OCCReader();
~GEOM_OCCReader();
- void Execute();
+
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells);
void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells);
void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells);
void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells);
diff --git
a/src/OBJECT/GEOM_VTKTrihedron.cxx
b/src/OBJECT/GEOM_VTKTrihedron.cxx
index 5c525974510114af88a3c53d4c6bf216e79449ae..74bf48e0ced51d7e639f6a44f6e6fc240c715067 100644
(file)
--- a/
src/OBJECT/GEOM_VTKTrihedron.cxx
+++ b/
src/OBJECT/GEOM_VTKTrihedron.cxx
@@
-66,15
+66,15
@@
public:
vtkTypeMacro( GEOM_VTKTrihedronAxis, VTKViewer_Axis );
static GEOM_VTKTrihedronAxis* New();
vtkTypeMacro( GEOM_VTKTrihedronAxis, VTKViewer_Axis );
static GEOM_VTKTrihedronAxis* New();
- void SetAxis( const gp_Ax1& theAxis, const int theRot,
vtkFloatingPointTyp
e theColor[ 3 ] );
+ void SetAxis( const gp_Ax1& theAxis, const int theRot,
doubl
e theColor[ 3 ] );
virtual void Render( vtkRenderer* theRenderer );
virtual void Render( vtkRenderer* theRenderer );
- virtual void SetSize(
vtkFloatingPointTyp
e theSize );
+ virtual void SetSize(
doubl
e theSize );
gp_Pnt GetOri() const;
gp_Pnt GetOri() const;
- void SetColor( const
vtkFloatingPointTyp
e theColor[ 3 ] );
+ void SetColor( const
doubl
e theColor[ 3 ] );
private:
private:
-
vtkFloatingPointTyp
e myOri[ 3 ];
+
doubl
e myOri[ 3 ];
vtkMatrix4x4* myMatrix;
vtkTransform* myTrsf;
};
vtkMatrix4x4* myMatrix;
vtkTransform* myTrsf;
};
@@
-94,9
+94,9
@@
GEOM_VTKTrihedronAxis::~GEOM_VTKTrihedronAxis()
myTrsf->Delete();
}
myTrsf->Delete();
}
-void GEOM_VTKTrihedronAxis::SetSize(
vtkFloatingPointTyp
e theSize )
+void GEOM_VTKTrihedronAxis::SetSize(
doubl
e theSize )
{
{
-
vtkFloatingPointTyp
e aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize,
+
doubl
e aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize,
myOri[ 1 ] + myDir[ 1 ] * theSize,
myOri[ 2 ] + myDir[ 2 ] * theSize };
myOri[ 1 ] + myDir[ 1 ] * theSize,
myOri[ 2 ] + myDir[ 2 ] * theSize };
@@
-154,7
+154,7
@@
gp_Pnt GEOM_VTKTrihedronAxis::GetOri() const
void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
const int theRot,
void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
const int theRot,
-
vtkFloatingPointTyp
e theColor[ 3 ] )
+
doubl
e theColor[ 3 ] )
{
gp_Pnt aLoc = theAxis.Location();
gp_Dir aDir = theAxis.Direction();
{
gp_Pnt aLoc = theAxis.Location();
gp_Dir aDir = theAxis.Direction();
@@
-167,7
+167,7
@@
void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
myDir[ 1 ] = aDir.Y();
myDir[ 2 ] = aDir.Z();
myDir[ 1 ] = aDir.Y();
myDir[ 2 ] = aDir.Z();
-
vtkFloatingPointTyp
e aColor[ 3 ] = { 0, 0, 0 };
+
doubl
e aColor[ 3 ] = { 0, 0, 0 };
aColor[ theRot ] = 1;
if ( theColor[ 0 ] == -1 )
VTKViewer_Axis::SetColor( aColor[ 0 ], aColor[ 1 ], aColor[ 2 ] );
aColor[ theRot ] = 1;
if ( theColor[ 0 ] == -1 )
VTKViewer_Axis::SetColor( aColor[ 0 ], aColor[ 1 ], aColor[ 2 ] );
@@
-185,7
+185,7
@@
void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis,
#endif
}
#endif
}
-void GEOM_VTKTrihedronAxis::SetColor( const
vtkFloatingPointTyp
e theColor[ 3 ] )
+void GEOM_VTKTrihedronAxis::SetColor( const
doubl
e theColor[ 3 ] )
{
VTKViewer_Axis::SetColor( theColor[ 0 ], theColor[ 1 ], theColor[ 2 ] );
}
{
VTKViewer_Axis::SetColor( theColor[ 0 ], theColor[ 1 ], theColor[ 2 ] );
}
@@
-227,7
+227,7
@@
GEOM_VTKTrihedron::~GEOM_VTKTrihedron()
myMapper->Delete();
}
myMapper->Delete();
}
-void GEOM_VTKTrihedron::SetSize(
vtkFloatingPointTyp
e theSize )
+void GEOM_VTKTrihedron::SetSize(
doubl
e theSize )
{
mySize = theSize;
for ( int i = 0; i < 3; i++ )
{
mySize = theSize;
for ( int i = 0; i < 3; i++ )
@@
-254,11
+254,11
@@
void GEOM_VTKTrihedron::SetSize( vtkFloatingPointType theSize )
aSrcZ->SetPoint2( aEndZ.X(), aEndZ.Y(), aEndZ.Z() );
vtkAppendPolyData* aRes = vtkAppendPolyData::New();
aSrcZ->SetPoint2( aEndZ.X(), aEndZ.Y(), aEndZ.Z() );
vtkAppendPolyData* aRes = vtkAppendPolyData::New();
- aRes->AddInput
( aSrcX->GetOutpu
t() );
- aRes->AddInput
( aSrcY->GetOutpu
t() );
- aRes->AddInput
( aSrcZ->GetOutpu
t() );
+ aRes->AddInput
Connection( aSrcX->GetOutputPor
t() );
+ aRes->AddInput
Connection( aSrcY->GetOutputPor
t() );
+ aRes->AddInput
Connection( aSrcZ->GetOutputPor
t() );
- myMapper->SetInput
( aRes->GetOutpu
t() );
+ myMapper->SetInput
Connection( aRes->GetOutputPor
t() );
SALOME_Actor::SetMapper( myMapper );
aSrcX->Delete();
SALOME_Actor::SetMapper( myMapper );
aSrcX->Delete();
@@
-362,7
+362,7
@@
void GEOM_VTKTrihedron::Render(vtkRenderer* r, vtkMapper *)
( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->Render( r );
}
( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->Render( r );
}
-void GEOM_VTKTrihedron::SetColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b )
+void GEOM_VTKTrihedron::SetColor(
double r, double g, doubl
e b )
{
myColor[ 0 ] = r;
myColor[ 1 ] = g;
{
myColor[ 0 ] = r;
myColor[ 1 ] = g;
@@
-373,7
+373,7
@@
void GEOM_VTKTrihedron::SetColor( vtkFloatingPointType r, vtkFloatingPointType g
if ( myAxis[ 2 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->SetColor( myColor );
}
if ( myAxis[ 2 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->SetColor( myColor );
}
-void GEOM_VTKTrihedron::GetColor(
vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointTyp
e& b )
+void GEOM_VTKTrihedron::GetColor(
double& r, double& g, doubl
e& b )
{
r = myColor[ 0 ];
g = myColor[ 1 ];
{
r = myColor[ 0 ];
g = myColor[ 1 ];
@@
-426,7
+426,7
@@
void GEOM_VTKTrihedron::ResetAxesColors()
SetAxesColors( myDefaultColor, true );
}
SetAxesColors( myDefaultColor, true );
}
-void GEOM_VTKTrihedron::SetAxesColors(
vtkFloatingPointTyp
e theColor[3], bool theIsDiffuse )
+void GEOM_VTKTrihedron::SetAxesColors(
doubl
e theColor[3], bool theIsDiffuse )
{
myAxis[ 0 ]->SetColor( theColor[0], theIsDiffuse ? 0.0 : theColor[1], theIsDiffuse ? 0.0 : theColor[2] );
myAxis[ 1 ]->SetColor( theIsDiffuse ? 0.0 : theColor[0], theColor[1], theIsDiffuse ? 0.0 : theColor[2] );
{
myAxis[ 0 ]->SetColor( theColor[0], theIsDiffuse ? 0.0 : theColor[1], theIsDiffuse ? 0.0 : theColor[2] );
myAxis[ 1 ]->SetColor( theIsDiffuse ? 0.0 : theColor[0], theColor[1], theIsDiffuse ? 0.0 : theColor[2] );
diff --git
a/src/OBJECT/GEOM_VTKTrihedron.hxx
b/src/OBJECT/GEOM_VTKTrihedron.hxx
index 897312ae006538a19a7d55e44601ce17b6277677..34b97d17ceb07769314c1c367704d87f47ef7a32 100644
(file)
--- a/
src/OBJECT/GEOM_VTKTrihedron.hxx
+++ b/
src/OBJECT/GEOM_VTKTrihedron.hxx
@@
-55,7
+55,7
@@
public:
vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor );
static GEOM_VTKTrihedron* New();
vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor );
static GEOM_VTKTrihedron* New();
- virtual
vtkFloatingPointTyp
e GetSize() { return mySize;}
+ virtual
doubl
e GetSize() { return mySize;}
virtual void SetVisibility( int theVisibility );
virtual void SetVisibility( VTKViewer_Trihedron::TVisibility theVis );
virtual void SetVisibility( int theVisibility );
virtual void SetVisibility( VTKViewer_Trihedron::TVisibility theVis );
@@
-74,11
+74,11
@@
public:
virtual void Render(vtkRenderer *, vtkMapper *);
virtual bool IsSetCamera() const;
virtual bool IsResizable() const;
virtual void Render(vtkRenderer *, vtkMapper *);
virtual bool IsSetCamera() const;
virtual bool IsResizable() const;
- virtual void SetSize(
vtkFloatingPointTyp
e );
+ virtual void SetSize(
doubl
e );
virtual void SetCamera( vtkCamera* );
virtual void SetCamera( vtkCamera* );
- void SetColor(
vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointTyp
e b );
- void GetColor(
vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointTyp
e& b );
+ void SetColor(
double r, double g, doubl
e b );
+ void GetColor(
double& r, double& g, doubl
e& b );
virtual bool hasHighlight() { return true; }
virtual bool hasHighlight() { return true; }
@@
-89,18
+89,18
@@
public:
protected:
virtual void ResetAxesColors();
protected:
virtual void ResetAxesColors();
- virtual void SetAxesColors(
vtkFloatingPointTyp
e theColor[3], bool theIsDiffuse = false );
+ virtual void SetAxesColors(
doubl
e theColor[3], bool theIsDiffuse = false );
protected:
VTKViewer_Axis* myAxis[3];
vtkPolyDataMapper* myMapper;
protected:
VTKViewer_Axis* myAxis[3];
vtkPolyDataMapper* myMapper;
-
vtkFloatingPointTyp
e mySize;
+
doubl
e mySize;
gp_Pnt myLocation;
gp_Dir myDirX, myDirY, myDirZ;
gp_Pnt myLocation;
gp_Dir myDirX, myDirY, myDirZ;
-
vtkFloatingPointTyp
e myColor[ 3 ];
-
vtkFloatingPointTyp
e myDefaultColor[ 3 ];
-
vtkFloatingPointTyp
e myPreHighlightColor[ 3 ];
-
vtkFloatingPointTyp
e myHighlightColor[ 3 ];
+
doubl
e myColor[ 3 ];
+
doubl
e myDefaultColor[ 3 ];
+
doubl
e myPreHighlightColor[ 3 ];
+
doubl
e myHighlightColor[ 3 ];
};
#endif
};
#endif
diff --git
a/src/OCC2VTK/GEOM_EdgeSource.cxx
b/src/OCC2VTK/GEOM_EdgeSource.cxx
index d7d3a41747fd0b1435b427f73e4fbb361460e204..6d8f0880bccf5945b0abf0d74abdb525a43c5882 100755
(executable)
--- a/
src/OCC2VTK/GEOM_EdgeSource.cxx
+++ b/
src/OCC2VTK/GEOM_EdgeSource.cxx
@@
-34,12
+34,15
@@
#include <vtkStripper.h>
#include <vtkPolyData.h>
#include <vtkStripper.h>
#include <vtkPolyData.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
vtkStandardNewMacro(GEOM_EdgeSource);
GEOM_EdgeSource::GEOM_EdgeSource() :
myIsVector(false)
{
vtkStandardNewMacro(GEOM_EdgeSource);
GEOM_EdgeSource::GEOM_EdgeSource() :
myIsVector(false)
{
+ this->SetNumberOfInputPorts(0);
}
GEOM_EdgeSource::~GEOM_EdgeSource()
}
GEOM_EdgeSource::~GEOM_EdgeSource()
@@
-53,11
+56,14
@@
void GEOM_EdgeSource::AddEdge (const TopoDS_Edge& theEdge,
myIsVector = theIsVector;
}
myIsVector = theIsVector;
}
-void
-GEOM_EdgeSource::
-
Execute(
)
+int GEOM_EdgeSource::RequestData(vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **vtkNotUsed(inputVector),
+
vtkInformationVector *outputVector
)
{
{
- vtkPolyData* aPolyData = GetOutput();
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+ vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
@@
-71,6
+77,7
@@
Execute()
anEdge.Orientation( TopAbs_FORWARD );
OCC2VTK(anEdge,aPolyData,aPts,myIsVector||myIsVectorMode);
}
anEdge.Orientation( TopAbs_FORWARD );
OCC2VTK(anEdge,aPolyData,aPts,myIsVector||myIsVectorMode);
}
+ return 1;
}
void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,
}
void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,
diff --git
a/src/OCC2VTK/GEOM_EdgeSource.h
b/src/OCC2VTK/GEOM_EdgeSource.h
index 282c4c906452f2739974e3749f1b2309a210454e..71e25a044e5e4d39c9fe3163413984cc90437778 100755
(executable)
--- a/
src/OCC2VTK/GEOM_EdgeSource.h
+++ b/
src/OCC2VTK/GEOM_EdgeSource.h
@@
-28,12
+28,14
@@
typedef NCollection_Set<TopoDS_Edge> TEdgeSet;
#include <vtkPoints.h>
typedef NCollection_Set<TopoDS_Edge> TEdgeSet;
#include <vtkPoints.h>
-#include <vtkPolyData
Source
.h>
+#include <vtkPolyData
Algorithm
.h>
-class OCC2VTK_EXPORT GEOM_EdgeSource: public vtkPolyDataSource
+class vtkPolyData;
+
+class OCC2VTK_EXPORT GEOM_EdgeSource: public vtkPolyDataAlgorithm
{
public:
{
public:
- vtkTypeMacro(GEOM_EdgeSource,vtkPolyData
Source
);
+ vtkTypeMacro(GEOM_EdgeSource,vtkPolyData
Algorithm
);
static GEOM_EdgeSource* New();
void AddEdge (const TopoDS_Edge& theEdge,
static GEOM_EdgeSource* New();
void AddEdge (const TopoDS_Edge& theEdge,
@@
-59,7
+61,7
@@
protected:
// representing a vector, can have only one edge.
bool myIsVector, myIsVectorMode;
// representing a vector, can have only one edge.
bool myIsVector, myIsVectorMode;
- v
oid Execute();
+ v
irtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
GEOM_EdgeSource();
~GEOM_EdgeSource();
GEOM_EdgeSource();
~GEOM_EdgeSource();
diff --git
a/src/OCC2VTK/GEOM_FaceSource.cxx
b/src/OCC2VTK/GEOM_FaceSource.cxx
index 868232a63c5fbd0f6fcfdb7536959cca680b1b80..dba3eb5e4cfda577a52c8b70eb7599a18fd3cafe 100755
(executable)
--- a/
src/OCC2VTK/GEOM_FaceSource.cxx
+++ b/
src/OCC2VTK/GEOM_FaceSource.cxx
@@
-29,6
+29,7
@@
GEOM_FaceSource::GEOM_FaceSource()
{
GEOM_FaceSource::GEOM_FaceSource()
{
+ this->SetNumberOfInputPorts(0);
}
GEOM_FaceSource::~GEOM_FaceSource()
}
GEOM_FaceSource::~GEOM_FaceSource()
diff --git
a/src/OCC2VTK/GEOM_FaceSource.h
b/src/OCC2VTK/GEOM_FaceSource.h
index 557c0605d86615f1a6e993c0a850b8318bbbbbd9..03163eff6a9a0a3bcc2261d539cb2be359a46148 100755
(executable)
--- a/
src/OCC2VTK/GEOM_FaceSource.h
+++ b/
src/OCC2VTK/GEOM_FaceSource.h
@@
-29,12
+29,14
@@
typedef NCollection_Set<TopoDS_Face> TFaceSet;
#include <vtkPoints.h>
typedef NCollection_Set<TopoDS_Face> TFaceSet;
#include <vtkPoints.h>
-#include <vtkPolyData
Source
.h>
+#include <vtkPolyData
Algorithm
.h>
-class OCC2VTK_EXPORT GEOM_FaceSource: public vtkPolyDataSource
+class vtkPolyData;
+
+class OCC2VTK_EXPORT GEOM_FaceSource: public vtkPolyDataAlgorithm
{
public:
{
public:
- vtkTypeMacro(GEOM_FaceSource,vtkPolyData
Source
);
+ vtkTypeMacro(GEOM_FaceSource,vtkPolyData
Algorithm
);
void AddFace(const TopoDS_Face& theFace);
void Clear(){ myFaceSet.Clear();}
void AddFace(const TopoDS_Face& theFace);
void Clear(){ myFaceSet.Clear();}
diff --git
a/src/OCC2VTK/GEOM_ShadingFace.cxx
b/src/OCC2VTK/GEOM_ShadingFace.cxx
index ad2ae5b186eff507d53547bb900ddd193901ed0a..7352e5eb64afd805856a0f92e767e856fa689ef2 100755
(executable)
--- a/
src/OCC2VTK/GEOM_ShadingFace.cxx
+++ b/
src/OCC2VTK/GEOM_ShadingFace.cxx
@@
-26,26
+26,32
@@
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
#include <BRep_Tool.hxx>
#include <Poly_Triangulation.hxx>
#include <BRep_Tool.hxx>
#include <Poly_Triangulation.hxx>
-
+
vtkStandardNewMacro(GEOM_ShadingFace);
GEOM_ShadingFace::GEOM_ShadingFace()
{
vtkStandardNewMacro(GEOM_ShadingFace);
GEOM_ShadingFace::GEOM_ShadingFace()
{
+ this->SetNumberOfInputPorts(0);
}
GEOM_ShadingFace::~GEOM_ShadingFace()
{
}
}
GEOM_ShadingFace::~GEOM_ShadingFace()
{
}
-void
-GEOM_ShadingFace::
-
Execute(
)
+int GEOM_ShadingFace::RequestData(vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **vtkNotUsed(inputVector),
+
vtkInformationVector *outputVector
)
{
{
- vtkPolyData* aPolyData = GetOutput();
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+ vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
@@
-56,6
+62,7
@@
Execute()
const TopoDS_Face& aFace = anIter.Value();
OCC2VTK(aFace,aPolyData,aPts);
}
const TopoDS_Face& aFace = anIter.Value();
OCC2VTK(aFace,aPolyData,aPts);
}
+ return 1;
}
void
}
void
diff --git
a/src/OCC2VTK/GEOM_ShadingFace.h
b/src/OCC2VTK/GEOM_ShadingFace.h
index 64ae2d0ba484ea1e650218871fbc9329bfcb3d1b..ee59b530dca6f2548dda5b491b37345e98c3e78d 100755
(executable)
--- a/
src/OCC2VTK/GEOM_ShadingFace.h
+++ b/
src/OCC2VTK/GEOM_ShadingFace.h
@@
-35,7
+35,7
@@
public:
vtkPoints* thePts);
protected:
vtkPoints* thePts);
protected:
- v
oid Execute();
+ v
irtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
GEOM_ShadingFace();
~GEOM_ShadingFace();
GEOM_ShadingFace();
~GEOM_ShadingFace();
diff --git
a/src/OCC2VTK/GEOM_VertexSource.cxx
b/src/OCC2VTK/GEOM_VertexSource.cxx
index daf61b192d71024fd34107279f2b176251b180a2..3bde4829eacb57c783d2052f0d412e9a6eaae719 100755
(executable)
--- a/
src/OCC2VTK/GEOM_VertexSource.cxx
+++ b/
src/OCC2VTK/GEOM_VertexSource.cxx
@@
-25,6
+25,8
@@
#include <vtkCellArray.h>
#include <vtkPolyData.h>
#include <vtkPolyDataMapper.h>
#include <vtkCellArray.h>
#include <vtkPolyData.h>
#include <vtkPolyDataMapper.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
#include <gp_Pnt.hxx>
#include <BRep_Tool.hxx>
#include <gp_Pnt.hxx>
#include <BRep_Tool.hxx>
@@
-33,6
+35,7
@@
vtkStandardNewMacro(GEOM_VertexSource);
GEOM_VertexSource::GEOM_VertexSource()
{
GEOM_VertexSource::GEOM_VertexSource()
{
+ this->SetNumberOfInputPorts(0);
}
GEOM_VertexSource::~GEOM_VertexSource()
}
GEOM_VertexSource::~GEOM_VertexSource()
@@
-46,11
+49,14
@@
AddVertex(const TopoDS_Vertex& theVertex)
myVertexSet.Add(theVertex);
}
myVertexSet.Add(theVertex);
}
-void
-GEOM_VertexSource::
-
Execute(
)
+int GEOM_VertexSource::RequestData(vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **vtkNotUsed(inputVector),
+
vtkInformationVector *outputVector
)
{
{
- vtkPolyData* aPolyData = GetOutput();
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+ vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
@@
-61,6
+67,7
@@
Execute()
const TopoDS_Vertex& aVertex = anIter.Value();
OCC2VTK(aVertex,aPolyData,aPts);
}
const TopoDS_Vertex& aVertex = anIter.Value();
OCC2VTK(aVertex,aPolyData,aPts);
}
+ return 1;
}
void
}
void
diff --git
a/src/OCC2VTK/GEOM_VertexSource.h
b/src/OCC2VTK/GEOM_VertexSource.h
index 9241b2d3afe6ec4177a8fd35eafa4365036b9bc0..4dfea778e1e11e6ac1b35309a57dc2f4d4c2f5ab 100755
(executable)
--- a/
src/OCC2VTK/GEOM_VertexSource.h
+++ b/
src/OCC2VTK/GEOM_VertexSource.h
@@
-28,12
+28,14
@@
typedef NCollection_Set<TopoDS_Vertex> TVertexSet;
#include <vtkPoints.h>
typedef NCollection_Set<TopoDS_Vertex> TVertexSet;
#include <vtkPoints.h>
-#include <vtkPolyData
Source
.h>
+#include <vtkPolyData
Algorithm
.h>
-class OCC2VTK_EXPORT GEOM_VertexSource: public vtkPolyDataSource
+class vtkPolyData;
+
+class OCC2VTK_EXPORT GEOM_VertexSource: public vtkPolyDataAlgorithm
{
public:
{
public:
- vtkTypeMacro(GEOM_VertexSource,vtkPolyData
Source
);
+ vtkTypeMacro(GEOM_VertexSource,vtkPolyData
Algorithm
);
static GEOM_VertexSource* New();
void AddVertex(const TopoDS_Vertex& theVertex);
static GEOM_VertexSource* New();
void AddVertex(const TopoDS_Vertex& theVertex);
@@
-47,7
+49,7
@@
public:
protected:
TVertexSet myVertexSet;
protected:
TVertexSet myVertexSet;
- v
oid Execute();
+ v
irtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
GEOM_VertexSource();
~GEOM_VertexSource();
GEOM_VertexSource();
~GEOM_VertexSource();
diff --git
a/src/OCC2VTK/GEOM_WireframeFace.cxx
b/src/OCC2VTK/GEOM_WireframeFace.cxx
index 49e2911aefbe459cf8bf2625e328703e25b56897..e66c5d010a2f62de7b5080bdd7b5db09a38ce6ab 100755
(executable)
--- a/
src/OCC2VTK/GEOM_WireframeFace.cxx
+++ b/
src/OCC2VTK/GEOM_WireframeFace.cxx
@@
-26,6
+26,8
@@
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolyData.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
#include <Precision.hxx>
#include <BRepTools.hxx>
#include <Precision.hxx>
#include <BRepTools.hxx>
@@
-55,17
+57,22
@@
GEOM_WireframeFace::GEOM_WireframeFace():
{
NbIso[0] = 1;
NbIso[1] = 1;
{
NbIso[0] = 1;
NbIso[1] = 1;
+
+ this->SetNumberOfInputPorts(0);
}
GEOM_WireframeFace::~GEOM_WireframeFace()
{
}
}
GEOM_WireframeFace::~GEOM_WireframeFace()
{
}
-void
-GEOM_WireframeFace::
-
Execute(
)
+int GEOM_WireframeFace::RequestData(vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **vtkNotUsed(inputVector),
+
vtkInformationVector *outputVector
)
{
{
- vtkPolyData* aPolyData = GetOutput();
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+ vtkPolyData *aPolyData = vtkPolyData::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
aPolyData->Allocate();
vtkPoints* aPts = vtkPoints::New();
aPolyData->SetPoints(aPts);
@@
-76,6
+83,7
@@
Execute()
const TopoDS_Face& aFace = anIter.Value();
OCC2VTK(aFace,aPolyData,aPts,NbIso,Discret);
}
const TopoDS_Face& aFace = anIter.Value();
OCC2VTK(aFace,aPolyData,aPts,NbIso,Discret);
}
+ return 1;
}
void GEOM_WireframeFace::SetNbIso(const int theNb[2])
}
void GEOM_WireframeFace::SetNbIso(const int theNb[2])
diff --git
a/src/OCC2VTK/GEOM_WireframeFace.h
b/src/OCC2VTK/GEOM_WireframeFace.h
index bd931a8edb9f987f646a80f4110b03cab2a599a2..2b2814329b9bf244b5c0db7ae147abefb7760f73 100755
(executable)
--- a/
src/OCC2VTK/GEOM_WireframeFace.h
+++ b/
src/OCC2VTK/GEOM_WireframeFace.h
@@
-26,7
+26,7
@@
#include <GeomAbs_IsoType.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <GeomAbs_IsoType.hxx>
#include <BRepAdaptor_Surface.hxx>
-#include <vtkPolyDataSource.h>
+class vtkPolyData;
class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource
{
class OCC2VTK_EXPORT GEOM_WireframeFace: public GEOM_FaceSource
{
@@
-85,7
+85,7
@@
protected:
vtkPolyData* thePolyData,
vtkPoints* thePts);
vtkPolyData* thePolyData,
vtkPoints* thePts);
- v
oid Execute();
+ v
irtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
GEOM_WireframeFace();
~GEOM_WireframeFace();
GEOM_WireframeFace();
~GEOM_WireframeFace();
diff --git
a/src/OperationGUI/OperationGUI_ClippingDlg.cxx
b/src/OperationGUI/OperationGUI_ClippingDlg.cxx
index 9e93a9cdbe4189c4de4d6a5ded924e913c48dccb..47f8b5b04f1ec6a58d5db15ef9885521e33c47d0 100644
(file)
--- a/
src/OperationGUI/OperationGUI_ClippingDlg.cxx
+++ b/
src/OperationGUI/OperationGUI_ClippingDlg.cxx
@@
-154,7
+154,7
@@
void OperationGUI_ClippingDlg::Init()
double position[3];
anActiveCamera->GetPosition( position );
double position[3];
anActiveCamera->GetPosition( position );
-
vtkFloatingPointTyp
e bounds[6];
+
doubl
e bounds[6];
aRenderer->ComputeVisiblePropBounds( bounds );
double center[3];
aRenderer->ComputeVisiblePropBounds( bounds );
double center[3];
@@
-170,7
+170,7
@@
void OperationGUI_ClippingDlg::Init()
( position[1]-center[1] ) * ( position[1]-center[1] ) +
( position[2]-center[2] ) * ( position[2]-center[2] ) );
( position[1]-center[1] ) * ( position[1]-center[1] ) +
( position[2]-center[2] ) * ( position[2]-center[2] ) );
-
vtkFloatingPointTyp
e range[2] = { distance - width/2.0, distance + width/2.0 };
+
doubl
e range[2] = { distance - width/2.0, distance + width/2.0 };
SpinBox_Near->setValue( range[0] );
SpinBox_Far->setValue( range[1] );
SpinBox_Near->setValue( range[0] );
SpinBox_Far->setValue( range[1] );
@@
-220,7
+220,7
@@
bool OperationGUI_ClippingDlg::ClickOnApply()
return false;
}
return false;
}
-
vtkFloatingPointTyp
e range[2] = { SpinBox_Near->value(), SpinBox_Far->value() };
+
doubl
e range[2] = { SpinBox_Near->value(), SpinBox_Far->value() };
if ( range[0] < 0.0 ) range[0] = 0.0;
anActiveCamera->SetClippingRange( range );
if ( range[0] < 0.0 ) range[0] = 0.0;
anActiveCamera->SetClippingRange( range );
@@
-302,7
+302,7
@@
void OperationGUI_ClippingDlg::onReset()
double position[3];
anActiveCamera->GetPosition( position );
double position[3];
anActiveCamera->GetPosition( position );
-
vtkFloatingPointTyp
e bounds[6];
+
doubl
e bounds[6];
aRenderer->ComputeVisiblePropBounds( bounds );
double center[3];
aRenderer->ComputeVisiblePropBounds( bounds );
double center[3];
@@
-318,7
+318,7
@@
void OperationGUI_ClippingDlg::onReset()
( position[1]-center[1] ) * ( position[1]-center[1] ) +
( position[2]-center[2] ) * ( position[2]-center[2] ) );
( position[1]-center[1] ) * ( position[1]-center[1] ) +
( position[2]-center[2] ) * ( position[2]-center[2] ) );
-
vtkFloatingPointTyp
e range[2] = { distance - width/2.0, distance + width/2.0 };
+
doubl
e range[2] = { distance - width/2.0, distance + width/2.0 };
SpinBox_Near->setValue( range[0] );
SpinBox_Far->setValue( range[1] );
SpinBox_Near->setValue( range[0] );
SpinBox_Far->setValue( range[1] );
diff --git
a/src/VTKExport/VTKExport.cxx
b/src/VTKExport/VTKExport.cxx
index d7ab92002138b360baaa4b5d13211eae62d47a1f..8312c28690f33b4535ad280c1dcd634664784279 100644
(file)
--- a/
src/VTKExport/VTKExport.cxx
+++ b/
src/VTKExport/VTKExport.cxx
@@
-81,12
+81,12
@@
extern "C"
GEOM_ShadingFace* myShadingFaceSource = GEOM_ShadingFace::New();
vtkAppendPolyData* myAppendFilter = vtkAppendPolyData::New();
GEOM_ShadingFace* myShadingFaceSource = GEOM_ShadingFace::New();
vtkAppendPolyData* myAppendFilter = vtkAppendPolyData::New();
- myAppendFilter->AddInput
( myVertexSource->GetOutpu
t() );
- myAppendFilter->AddInput
( myIsolatedEdgeSource->GetOutpu
t() );
- myAppendFilter->AddInput
( myOneFaceEdgeSource->GetOutpu
t() );
- myAppendFilter->AddInput
( mySharedEdgeSource->GetOutpu
t() );
- //myAppendFilter->AddInput
( myWireframeFaceSource->GetOutpu
t() ); // iso-lines are unnecessary
- myAppendFilter->AddInput
( myShadingFaceSource->GetOutpu
t() );
+ myAppendFilter->AddInput
Connection( myVertexSource->GetOutputPor
t() );
+ myAppendFilter->AddInput
Connection( myIsolatedEdgeSource->GetOutputPor
t() );
+ myAppendFilter->AddInput
Connection( myOneFaceEdgeSource->GetOutputPor
t() );
+ myAppendFilter->AddInput
Connection( mySharedEdgeSource->GetOutputPor
t() );
+ //myAppendFilter->AddInput
Connection( myWireframeFaceSource->GetOutputPor
t() ); // iso-lines are unnecessary
+ myAppendFilter->AddInput
Connection( myShadingFaceSource->GetOutputPor
t() );
float aDeflection = 0.001;
bool anIsVector = false;
float aDeflection = 0.001;
bool anIsVector = false;
@@
-131,7
+131,7
@@
extern "C"
Kernel_Utils::Localizer loc;
vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
Kernel_Utils::Localizer loc;
vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
- aWriter->SetInput
( myAppendFilter->GetOutpu
t() );
+ aWriter->SetInput
Connection( myAppendFilter->GetOutputPor
t() );
aWriter->SetFileName( theFileName.ToCString() );
aWriter->Write();
aWriter->Delete();
aWriter->SetFileName( theFileName.ToCString() );
aWriter->Write();
aWriter->Delete();