DiscussionsIssue archiveOCCT:Visualization

Archived issue #0031401

Visualization - revise Toolkits dependency graph

Open CASCADEOCCT:Visualizationnew1 public note

Search issues

Description

Visualization module consists of the following Toolkits:
- TKService
  Key dependencies: TKBRep.
  External: FreeType, FreeImage (optional), FFmpeg (optional).
- TKV3d
  Key dependencies: TKService, TKBRep, TKHLR, TKMesh [implies TKShHealing since #0026106]
- TKOpenGl [depends on TKV3d and OpenGL]
- TKMeshVS [depends on TKV3d]
- TKD3DHost [depends on TKOpenGl and D3D9]
- TKIVtk [depends on TKV3d and VTK]

There are numerous problems in current dependency graph:
- TKOpenGl depends on a bunch of unrelated libraries,
  while it is supposed only to provide OpenGL backend
  to Graphic3d_GraphicDriver interface.
     * Proposition: Move out Graphic3d package from TKV3d to dedicated toolkit TKGraphic3d.
     * Problems: Should be trivial to do?
- TKService depends on TKBRep for implementing Font_BRepFont class
  (previously depending also on TKShHealing, which has been eliminated #0025852).
     * Proposition: Move out Font_BRepFont to another toolkit.
     * Problems: ?.
- TKV3d depends on TKMesh (implying TKShHealing and big set of fat dependencies)
     * Proposition: Move out TKMesh dependency by using plugin interface (IMeshTools_MeshAlgoFactory).
     * Problems: Make sure making porting of existing applications implicit or smooth.
- TKV3d depends on TKHLR
     * Proposition: HLR is a rarely used presentation, which is better being provided via plugin interface.
     * Problems: implement transparent plugin interface and make porting of existing application smooth.
- TKV3d depends on TKBRep
     * Proposition: move out TopoDS_Shape from TKV3d to dedicated toolkit.
     * Problems: AIS, StdPrs and StdSelect are tightly bound/mixed with TopoDS_Shape;
                 separating will require splitting existing packages, renaming classes
                 and probably introduction of new sub-classes
                (how to handle AIS_InteractiveContext - remove deprecated methods?).
- TKService depends on FreeType unconditionally;
  in rare cases, it is acceptable using OCCT 3D Viewer without text output.
     * Proposition: make FreeType dependency optional #0031087.
     * Problems: updating CMake scripts.

This is a meta issue - progress is expected to be done by small steps as child issues.

Public activity

1 archived note

Participants are labeled by their role within this record.

01Commenter 1
It is strange that BRepMesh requires ShapeHealing.

Actually it depends on ShapeAnalysis. The dependence of ShapeAnalysis_Edge is easy to avoid.

Concerning ShapeAnalysis_Wire (used for reorder) may be to put this tool in more "core" packages?

Related records