MantisBT - Open CASCADE
View Issue Details
0029187Open CASCADE[OCCT] OCCT:VISpublic2017-10-05 14:352019-07-19 11:38
apn 
apn 
normalminor 
assignedopen 
macOS Sierra 10.12
 
[OCCT] 7.5.0* 
Not needed
0029187: VIS - TKIVtkDraw should support Cocoa on macOS
USE_VTK option was turned on for successfully testing occt on macOS platform. I'm trying to build occt with vtk-7.1.1 (built with option VTK_USE_X) and get following error:
/OCCT_SRC/src/IVtkDraw/IVtkDraw.cxx:217:15: error: use of undeclared identifier 'Xw_Window'; did you mean 'XtWindow'?
/OCCT_SRC/src/IVtkDraw/IVtkDraw.cxx:217:15: error: template argument for template type parameter must be a type
static Handle(Xw_Window)& GetWindow()
              ^~~~~~~~~

Used vtk: /Users/mnt/tools/WOK680/3rdparty/mac64/vtk-7.1.1
No tags attached.
child of 0022877closed bugmaster Draw Harness - add plugin for VIS component 
Issue History
2017-10-05 14:35apnNew Issue
2017-10-05 14:35apnAssigned To => kgv
2017-10-05 14:42kgvAssigned Tokgv => san
2017-10-05 14:42kgvCategoryOCCT:Visualization => OCCT:VIS
2017-10-05 14:42kgvSummaryCompilation error in IVtkDraw => VIS - TKIVtkDraw should support Cocoa on macOS
2017-10-05 14:42kgvRelationship addedchild of 0022877
2017-10-11 15:57gitNote Added: 0071346
2017-10-12 18:01gitNote Added: 0071382
2017-10-12 18:26gitNote Added: 0071383
2017-10-13 18:40apnTest case number => Not needed
2017-10-13 18:40apnNote Added: 0071424
2017-10-13 18:40apnAssigned Tosan => kgv
2017-10-13 18:40apnStatusnew => resolved
2017-10-13 19:00kgvNote Added: 0071428
2017-10-13 19:00kgvAssigned Tokgv => apn
2017-10-13 19:00kgvStatusresolved => assigned
2017-11-01 12:53gitNote Added: 0071904
2019-07-19 11:38apnTarget Version7.4.0 => 7.5.0*

Notes
(0071346)
git   
2017-10-11 15:57   
Branch CR29187 has been created by apn.

SHA-1: ee7db175d70852c985cfe0923a0362094cebd5f4


Detailed log of new commits:

Author: apn
Date: Wed Oct 11 15:56:44 2017 +0300

    0029187: VIS - TKIVtkDraw should support Cocoa on macOS
    
    Adding support of Cocoa on macOS
    Fox launching test cases on macOS
    Test cases failed when $lst starts with numeral, because upvar guesses that its first parameter is level rather than otherVar.
    The fix is to explicitly supply level to 1 (default value if uplevel is omitted) to avoid tcl exception "expected integer but got 3dviewer".
(0071382)
git   
2017-10-12 18:01   
Branch CR29187 has been updated forcibly by apn.

SHA-1: 2c9aea2ded19f8f5bd85d360c967cf75796345dc
(0071383)
git   
2017-10-12 18:26   
Branch CR29187 has been updated forcibly by apn.

SHA-1: 64040ebb714549e3bb46d68709dbfd4ad0655850
(0071424)
apn   
2017-10-13 18:40   
Dear kgv, could you please review CR29187.
(0071428)
kgv   
2017-10-13 19:00   
> Solve compatibility problem with VTK-7.x.x,
> since vtkRenderingFreeTypeOpenGL used only if VTK_OPENGL2_BACKEND is defined.
It looks unrelated to the bug - please move correction for VTK-7 compatibility to another issue.

> Test cases failed when $lst starts with numeral,
> because upvar guesses that its first parameter is level rather than otherVar.
Sorry, how this issue occurred?
It also looks unrelated to this bug.

#ifndef _WIN32
 #include <X11/X.h>
 #include <X11/Shell.h>
 #include <X11/Xlib.h>
 #include <GL/glx.h>
-#include <Xw_Window.hxx>
 #include <vtkXRenderWindowInteractor.h>
 #include <vtkXOpenGLRenderWindow.h>
 #include <X11/Xutil.h>
 #include <tk.h>
#endif

Shouldn't all these X11 includes fail on macOS?

+#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
+  // __APPLE__
+#else
+  // _WIN32
+  aRenWin->SetWindowId((void*)GetWindow()->HWindow());
+#endif

How this is supposed to work if Cocoa_Window is not associated with vtkRenderWindow in any way?
Also - broken indentation on these lines.
(0071904)
git   
2017-11-01 12:53   
Branch CR29187 has been updated forcibly by apn.

SHA-1: 18bf6aa82f1a4aae7011dcbd1a7b7b1cb55e1a31