I am currently using AIS_RubberBand to display a selection rectangle on the screen. However, when the View's width is significantly longer than its height (approximately a 4:1 aspect ratio), the Rubber Band is visualized in the wrong position. This issue is also reproducible in the standard Sample w
Hello everyone. I am new to this repo. I am trying to create temporary shape visual while drawing line for my mini CAD program. This is my code snippet that updates and redisplays line while mouse moving. But if i move mouse fastly, it crashes. How to solve this problem properly? Thanks. bool showTe
Preface Open CASCADE Technology contains TKMeshVS - a component completing the AIS classes from TKV3d component with capabilities to display mesh structures not necessarily bound to any TopoDS_Shape . TKMeshVS does not define any own data structure for storing mesh information; instead, it defines q
An exception occurs and I don't understand why. All values are entered, but an exception error occurs when the 581st for loop is executed. Please help. for (int i = 1; i <= triangles.Length(); i++) { try { Poly_Triangle triangle = triangles.Value(i); int n1 = 0, n2 = 0, n3 = 0; triangle.Get(n1, n2
When using a webassembly based on sample to make a client side viewer in a commercial use, should i separate the OCCT code and use dynamic linking instead of a single webassembly file if i want to keep my additional code proprietary. Otherwise, are we in case of static linking to avoid of LGPL2? htt
Dear developer: In my project, there are 6 shapes. And I try to detect the collide sitituaiton in animation. One shape is fixed, and other shapes are keep moving. Each shape have a BVH_Box. After shapes moved, I don't want to recompute the shape's BVH, the cost is expensive. I want to apply the gp_T
Sup OpenCASCADE, I'm an inventor/researcher coming to OpenCASCADE for modelling and meshing, and I am looking for a tool that would be able to run 100% on GPU, or even TPUs (tensor processing unit). I'm building something that needs high performance(AI/ML), and that something shouldn't query CPU at
I am following OpenCascade tutorials but am using window10 with VS 2019 IDE. I have installed OpenCascade 7.7.0 and VTK 6.1.0. At first, the compiler didn't recognize vtkNew but this was solved by adding #include <vtkNew.h> But then I got squiggles on these 5 lines: renwin->AddRenderer(ren); iren->S
Hi Everyone: I have tried to use AIS_Animation and AIS_AnimationObject to do a basic Two-link Animation. And when I click the Winform button, then start to play animation. The animation code is written in the OCCTProxy project, which is a function. But when I clicked, things did not happen. And here
Hello community. Is there any way to use transparent textures for PBR materials diffuse and let transparent section be really transparent on shapes where the material is applied ? I use the texture in the attached picture, but it gives me the result of the other attached picture, pbr_occt.png (emiss
Development branch of Open CASCADE Technology (will be available in OCCT 7.3.0) introduces a new small feature for analyzing rendering performance issues #0029346. Graphic3d_RenderingParams structure has been extended with a set of new properties for collecting and displaying performance counters in
Hi, I try to use the AIS_ViewCube to change the view orientation. I write it in my project, but nothing happens when I click the plane of the cube. Does anyone know if there need to set something? The version of occ is 7.5.0, here is my code. /// <summary> /// Initialize a viewer /// </summary> bool
Hello everyone! I have a transparent AIS_Shape, which I create like this: auto ais_shape = tira::xocc::makeHandle<AIS_Shape>(TopoDS_Shape{}); ais_shape->Attributes()->SetShadingModel(Graphic3d_TOSM_UNLIT); ais_shape->Attributes()->ShadingAspect()->Aspect()->SetAlphaMode(Graphic3d_AlphaMode_Blend, 0.
I noticed this very annoying regression in visualization. The object seems topologically correct, but something in the translation to OpenGL must happen? See the attached picture for the end result of the code below (C#, snippet appended to the sample project importExportWPF): TopoDS_Compound comp =
Hello everyone, This problem has troubled me for several days. I try to compile OCC and VTK,But no effect. My configuration: vs2019 + occ 7.6 +vtk 8.2/9.1 this is my simple code: #include <BRepPrimAPI_MakeBox.hxx> #include <IVtkTools_ShapeDataSource.hxx> #include <vtkType.h> #include <vtkAutoInit.h>
I have encountered an issue while using Open CASCADE Technology (OCCT) version 7.7.2. The function GeomAPI_PointsToBSpline creates a curve ( curveA ) with parameters (-nan, -nan) without raising any error message. When an AIS_Shape derived from curveA is passed to SelectMgr_SelectionManager.Activate
This article provides a high-level overview of a frame rendering graph implemented by TKOpenGl ( OpenGl_GraphicDriver ). Although it is named here as a “graph”, it’s not that flexible and the overall structure looks pretty flat, as could be seen later on diagrams. Article might be useful to OCCT dev
Hi, I have a scene with AIS_Shape's which cast shadows. And I want some of them (e.g. shapes created from wires) do not cast shadows. Is this possible to do in opencascade? Kind regards
Hello, I have defined a scene and use it to render images using path tracing with OCCT770. The components of the scene are: - a CAD modell (stud) - light source (V3d_PositionalLight) - a grid that is placed in front of the light source (stripes) - a camera The generated stripes do not seem to be rig
Hi! I've been using CADrays for about 6 months and love the software's capabilities. I am wondering how to save camera views so then if I need to zoom in or out to change something, I can go back to one of the camera views I saved. This is a really important feature for me and appreciate any directi
I need to display the triangulation of a Step model.Now I could use TopExp_Explorer to get each face in this model and get all triangles.How can I display one of these triangles ? BRepExtrema_ShapeList aFaceList; for (TopExp_Explorer faceExplorer(aisShape->Shape(), TopAbs_FACE); faceExplorer.More();
The selection and pick of custom AIS objects in OOC is something I haven't quite figured out. There is finally a section in occ7.7.0 that addresses this issue.(https://dev.opencascade.org/doc/overview/html/tutorials__ais_object.html) I tried the example in the draw toolkit and it worked as described
Question1: I use OCC's visualization module to display the model. However, I found that the edges of some simple models were seriously aliased when they were being visualized. Is there any way to reduce the impact of aliasing in OCC Visualization without modifying the model file? For example, when I
On the 2D layer, I tried Sample2D_Image and AIS_TexturedShape and set their AlphaCutoff, but nothing happened. Here is my code: // create the textured shape Handle(AIS_TexturedShape) myTexturedShape = new AIS_TexturedShape(MakeIconShape(size, size)); // set the image Handle(Image_AlienPixMap) anImag
Hi, I am creating a function to display the Triedron in the <0.0,0.0,0.0> point. The triedron is displayed fine with correct colors , but without "X" , "Y", "Z" labels How to fix? Where I am wrong? Thanks in advance, for any suggestion This is the code: Handle_AIS_Trihedron MyOcc::createTrihedron()
Hello, I cannot get the selection of a AIS_Triangulation. Indeed, ComputeSelection() is void implemented, at least in 7.4.0: void AIS_Triangulation::ComputeSelection(const Handle(SelectMgr_Selection)& /*aSelection*/, const Standard_Integer /*aMode*/) { } Poly_Triangulation is not a TopoDS_Shape, so
Stereoscopic rendering has been first introduced in Open CASCADE Technology 6.8.0 . Initial support has been limited to shutter glasses and off-screen rendering. OCCT 6.9.1 improves this functionality and extends the list of supported consumer display devices. Archived image: external image break Ov
Hi, I have hundreds of polygons and want to display text on each polygon, Texts should appear and disappear dynamically based on zoom level. For example in QT there is option called LOD(level of details), while painting any QGgraphicsItem we can check the LOD value and discard painting. Is there any
Hi everyone, I want to have vertex, edge, face or full body selection on AIS_Shape according to selection mode. Actually, if the vertex that I want to go from is selected, I need to obtain the coordinates of the vertex. If edge is selected I need to calculate the length. Surface area even if face is
OCCT 7.5.0 has introduced PBR (physically-based rendering) metal-roughness material workflow in it’s real-time rendering engine. This feature brings more realistic rendering of metal materials and, which might be even more important, an industry-adopted material definition supported by many 3D appli
Historically, OCCT 3D Viewer provided two options for dumping view content: V3d_View::ToPixMap() saving an image screenshot (bitmap) into formats like PNG, BMP, JPG. V3d_View::Export() exporting into vector graphics image format into formats like SVG, PDF, PS. The latter one was provided with help o
Hello I have found a strange and unwanted behavior in visualization component in version 7.5.0, while up to 7.4.0 it was OK. I'm talking about trihedron kind of TransformPersistence. You can set TransformPersistence for an object at a defined x,y distance from each corner of the view, and it shows i
Forthcoming OCCT 7.5.0 release extends its real-time rendering engine with a PBR (physically-based rendering) mode. OCCT implements PBR metal-roughness material workflow described by core glTF 2.0 specifications and also includes glTF data exchange components. New functionality opens a door to a new
Before talking about sRGB, lets figure out what was wrong with old OCCT 3D Viewer. Take a look onto a pair of screenshots: Archived image: external image Sphere lighting before (left) and after (right) switching to sRGB-aware renderer. The left image demonstrates a soft transition of a light into a
Mesh displayed in 3D Viewer may come from different sources - imported from external file (glTF, JT , STL, PLY, OBJ), computed for analytical BRep geometry by BRepMesh (part of OCCT) and ExpressMesh (OCC component) algorithms or generated directly by application code. The mesh is usually displayed s
OCCT provides built-in Interactive Services based on own OpenGL-based Visualization component. The basic functionality consists of but not limited to presentation and selection of topological shapes (TopoDS_Shape), which are the key objects in OCCT, but also various presentations for arbitrary mesh
Hi all, just for interest: will there be further development of NIS? Or would it make sense merging NIS functionality in the "Standard visualization"? Greets, Author
Local Context was an essential part of OCCT 3D Viewer (AIS_InteractiveContext) for a long time. The concept of Local Context is quite simple and powerful - differentiation of two Viewer states: Neutral Point where all model objects reside, and Local Context augmenting main model presentations with a
Open CASCADE Technology 7.2.0 introduces a new feature in OCCT 3D Viewer for handling translucent presentations Weighted Blended Order-Independent Transparency (OIT) , #0027925. Archived image: external image Archived image: external image break Apart from the new algorithm itself, the improvement s
Is there any plan for support rendering with DirectX11 using WGL_NV_DX_interop2? It will be very useful to have even the version for DirectX11 plus the actual DirectX9 version.
When starting our OCC-based application with an older graphics card (Nvidia Quadro FX 1700 with 500 MB GPU memory) a user received an error message that the application requested more GPU memory than is available. When checking we realized that the main reason for the hight GPU memory consumption is
In the past, graphic card in computer was designed to perform limited set of operations. At some point, all cards had to provide the hardware-accelerated functionality called Transformation and Lighting (T&L). Application developers had to implement all features and visual effects that were not part
Clipping visualized 3D models with user-defined clipping planes is one of basic OpenGL features that allows the user to look inside the models. However, in some cases it is more interesting to investigate the cross-section shape rather than the model's internals. For this purpose, the cross-section
Hi, I've been working on an example [1] where I'm using (Python)OCC ( still on 6.8.0 ) and (Py)Qt4 to overpaint a V3d_View. The objective here is to be able to embed Qt widgets in the opengl view. I've had a 1st success: I'm able to use QPainter to overpaint the V3d_View, huzzzaaah ;) Now, this woul
One of the most breaking changes in visualization component in OCCT 6.9.0 is complete reconsideration of selection mechanism. The new algorithm is designed to improve performance of dynamic selection of complex scenes by using effective 3D acceleration structures which are built only once and are au
I've tested occt 6.9.0 beta and noticed that displaying AIS_IO now requires more time than earlier. Investigating this I detected that AIS_InteractiveContext::Display spends 95% of time to add AIS_IO to selection manager, 75% of which is spent to find element in NCollection_BaseSequence. NCollection
OCCT 3D viewer provides the way for rendering temporary presentations without redrawing previously drawn content. This feature is designed to optimize viewer performance when only small part of the scene is changed dynamically, usually providing some feedback for user actions. Archived image: Dynami
As implementation of one of the strategic steps in OCCT visualization component development road-map, support for GLSL shader programs has been added in Open CASCADE Technology 6.7.0. Archived image: external image Archived image: external image Shader programs have become a part of aspect classes i
Hi OCC Visualization Team, I found that the selection in OCC is in 2D graphic space, so when switch selection mode or change the view camera, the AIS_Shape will use void StdSelect_ViewerSelector3d::Convert (const Handle(SelectMgr_Selection)& theSel) to convert the object world coordinate from 3d to
In some cases when a rendered closed shell consists of faces with different colors, visual artifacts at the edge of faces appearing at a certain view angle (Fig. 1). Archived image: external image Fig. 1. The visual artifacts on a simple cube The back-face culling mechanism allows removing these art
The attached materials review a drawback of the current visualization workflow which has to block the app GUI thread and thus decreases GUI responsiveness. Performance data have been collected to estimate potential gain of the improved workflow. The materials are based on discussions with Open CASCA
Version 6.8.0 apparently introduced some significant change about how the IO's can be connected. The former use case as explained in my blog post ( http://opencascade.blogspot.ru/2013/11/ais-connecting-objects.html ) has been broken. In particular an exception is currently thrown in ConnectedInterac
We are very likely to consider 2D layer (API for drawing 2D objects over the 3D scene) design improvement as one of further improvements of OCCT visualization. Removing "underlayer" and keeping only one 2D layer ("overlayer") would simplify this work to a certain extent. Our feeling is that many peo
Hi, I've noticed that the Cocoa_Window does not support retina / Hi-DPI screen ( like you find on a mac book pro or an android or iOS device ). Cocoa is conservative and won't go into retina mode, unless NSView's setViewWantsBestResolutionOpenGLSurface( true) method is called. There is a pretty dece
Few months ago, the OCCT ray tracing algorithm was rewritten using GLSL. Apart from better portability and certain performance gain, this step opened the door to some important features that can be added most naturally using close OpenGL and GLSL interoperation - such as visualization of lines and t
OCCT 6.7.0 introduces several major improvements of the visualization component. One of the most breaking changes in OCCT visualization concerns simplified implementation of ray tracing algorithm for regular OCCT visualization primitives . This algorithm is implemented using OpenCL. Being a part of
Is there any plan to support even the DirectX Visualization? Developing another dll for rendering such as TKDirectX instead of only TKOpenGL? I need to integrate the OpenCascade view into WPF application, as with DirectX and Direct3D rendering it is possible to avoid the airpsace issue, I'd like to
I have seen the roadmap for the future works in visualization project, but I haven't understood right the points: - Improvement of "immediate mode" behavior - OpenGL-based rubber band to replace the application-level implementations based on windows system API. Can you explain them with more details
What we observed in our work with OCCT and graphics drivers (NVIDIA mostly) is that the application behaves differently depending on the settings/profile we use. For example, until recently I had had a driver from December 2012 for my Quadro 1000M. In an OCCT application, which performs motion simul