Using PrsDim_LengthDimension is there a way to customize only the helper/flyout lines? What I want to achieve is this: From the center of the object the helper line should be dotted. The arrow line with the calculated distance should be solid.
How to remove the white background of a symbol when outputting using OpenCascade's AIS_Textlabel? Hello everyone, I'm implementing a program for working with shapes using OpenCascade. Please help me remove the white background around a symbol when outputting symbols using OpenCascade's AIS_Textlabel
The `V3d_View` class has a `ToPixMap` method that renders the view into the specified image buffer. But is it possible to use this function without attaching any `Aspect_Window` to the view? I just created a new `V3d_View`, set up its camera, and called `ToPixMap`. It fails inside the function becau
I want to select objects with some tolerance value in world coordinates. Currently OCC support pixel based tolerance value using SelectMgr_SelectingVolumeManager::SetPixelTolerance(). But its works based on zoom value. Is there any way to set own SelectMgr_BaseIntersector object to SelectMgr_Selecti
Avalonia UI is Free & open source UI framework for stunning, performant cross-platform apps with .NET. OCCT-Avalonia project make OCCT View as UserControl in Avalonia Window, and it is MIT License. https://github.com/BIMCoderLiang/OCCT-Avalonia All suggestions are welcome~
Hi there, I'm working on a 3D-Viewer for loading OBJ-files with the OpenCascade-rendering-technology. It works perfectly, but now I run into a possible limitation regarding materials/textures. In the Graphic3d_RM_RASTERIZATION-mode I can load any OBJ-file with hundrets of different materials with te
PrsMgr_PresentableObject transformation defined by TopLoc_Datum3D, which is essentially just a gp_Trsf. gp_Trsf supports only uniform scales. Such limitations are understandable for shapes, but for meshes, they impose a serious limitation on rendering certain real 3D models. For sure, transformation
Rendering 10,000+ identical objects generates a massive number of draw calls. While using AIS_ConnectedInteractive avoids re-submitting rendering data, it does not reduce the number of draw calls. Is there a way to achieve an effect similar to native OpenGL's glDrawArraysInstanced? Specifically, can
Is there any way to set mat3 or mat4 uniform into my custom fragment shader? Graphic3d_ShaderProgram::PushVariable supports only a limited set of types :(
Hello all, I try to build an app in android to visualize a step file and I am using something like that myViewer = new V3d_Viewer(aGlDriver); The error what give me AS is: No matching constructor for initialization of 'V3d_Viewer' candidate constructor (the implicit default constructor) not viable:
I am trying to render V3d_View into an ImGui viewport: m_FBO = Handle(OpenGl_FrameBuffer)::DownCast(myView->View()->FBOCreate(theWidth, theHeight)); m_FBO->ColorTexture()->Sampler()->Parameters()->SetFilter(Graphic3d_TOTF_BILINEAR); myView->View()->SetFBO(m_FBO); It successfully renders the view int
The base code is taken from the OCCT Samples and I want to add the IMGUI controls on top of it. I get some weird behaviour(continuous flickering) as you can see here: Archived image: external image . I tried setting: graphicDriver->SetBuffersNoSwap(true); , but the result generated displays only the
I am currently using Open CASCADE Technology (OCCT) 7.5 to load a large STL model of approximately 1.9 GB. After reading the file and displaying it using AIS_Shape, I experience severe performance issues during basic interactions such as model rotation, translation, and bounding box updates. The vie
Hello, I have migrate my Qt/OCC integration from V3d_View/QWidget to V3d_View/QOpenGLWidget like done in the OcctQtViewer sample application https://github.com/gkv311/occt-samples-qopenglwidget but now the linewidth of wireframe shape is not working anymore (see difference in attached image, left is
Hello, Anybody any pointers on how to render into a QQuickItem? So far I am able to render into a qquickitem by using a QQuickFramebufferObject derived class and creating a renderer. This works but always renders in the complete window instead of only the QQuickItem contents. I tried with deriving m
Hello, My team and I are currently working on a modeling software. We are using AIS_ViewController and are encountering some issues in achieving the desired behavior. We would like to have the following behavior: 1) The user clicks on an object, and a gizmo appears. 2) The user clicks and holds on t
Hello OCCT Community, I would like to handle on our Qt project with multi touch screens. I've tried that CAD Assistant application works very well with multi-touch screens and I've investigated some multi-touch methods on OCCT side. However, I couldn't overcome multi-touch problems on our project. I
Hello everyone, I’ve encountered an issue as shown in the attachment. For the same Shape, when hovering the mouse to highlight or clicking to highlight different Faces, one of the faces displays abnormally, looking like it’s broken. Could anyone please advise on a solution to this problem?Thank you
In the previous version (Open Cascade 7.7), I derived a class from AIS_Animation and overrode the Update method. Within this method, I retrieved the interpolated transformation values using gp_TrsfNLerp myTrsfLerp. However, in Open Cascade 7.9, this variable has been made private, so it is no longer
I am using this code in the initviewer function to try to load the model and set the highlight style. // Create AIS context myContext = new AIS_InteractiveContext (myViewer); myContext->SetDisplayMode ((int )AIS_DisplayMode::AIS_Shaded, false); myContext->DefaultDrawer ()->SetFaceBoundaryDraw(true);
While reading a STEP file, I’ve created a tree data structure representing assemblies and parts. An assembly can contain sub-assemblies and parts. A part is always the last node in the hierarchy. For assemblies, I save the label using: auto shape = XCAFDoc_ShapeTool::GetShape(assmLabel).Located(loc,
Hello here. I'm trying to write a custom shader to display selected faces of drawn shapes through the drawer retrieved by myInteractiveContext->HighlightStyle(Prs3d_TypeOfHighlight_LocalSelected). I want to draw some kind of hatch pattern on selected faces through a shader program. I'd like to draw
i use occt 7.7 ,the whole program create in .NET CLR in the using progress,i find when i zoom the object to the max scale,the display effect will deteriorate. the example is such as the figure 11 and 12 i can use which method to control this display behavior ,i expect your help ,think you very much
Hello, I'm working on adding an interactive extrusion preview feature in my OCCT-based application, similar to how extrusion arrows behave in CAD software like Autodesk Inventor or Fusion 360. I want to display a draggable arrow manipulator that: Appears perpendicular to a selected planar face Start
I have loaded a STEP file into the viewer and selected the AIS_InteractiveObject representing a part. For that part, I attached an AIS_Manipulator to enable interactive rotation. I enabled the rotation axis using: AIS_ManipulatorMode::AIS_MM_Rotation To perform rotation, I selected the axis and drag
Hello! I have an AIS_PointCloud data and try to hide some of its elements by re-uploading modified portion of Graphic3d_ArrayOfPrimitives without recomputing entire presentation using Graphic3d_Buffer::InvalidatedRange() mechanism. I indicate below the code used for this: // define the points array
Hi everyone, Is there a way to work with a mutable array of graphic points in OpenCascade? I have a fixed-size set of points - potentially several megabytes of point data!- that need to be shown or hidden dynamically at runtime. Ideally, I’m looking for something similar to a mutable Graphic3d_Array
I write a sample program, custom a subclass of AIS_InteractiveObject, and display. when i run this code in a pc with GPU Intel770, it is ok, but when i run in a pc with GPU intel 770 and nvidiat1000, it collapse, and i get info : "An exception occurred at 0x00007FFD09C711B2 (TKV3d.dll) in ...exe: 0x
i write a sample program, custom a subclass of AIS_InteractiveObject, and display. when i run this code in a pc with GPU Intel770, it is ok, but when i run in a pc with GPU intel 770 and nvidiat1000, it collapse, and i get info : "An exception occurred at 0x00007FFD09C711B2 (TKV3d.dll) in ...exe: 0x
Hello, I’m working with a 3D model in Open CASCADE that includes a rim consisting of three layered parts. These parts are stacked such that the first part visually covers the second when viewed from the front. In my use case: - I have selected the second part, which is correctly highlighted in yello
Hello everyone, I'm facing an issue with selecting and translating multiple parts in my application built using OpenCascade. Here's the scenario: Condition 1 I first select Part_A, then select Part_B. Now both parts appear selected. When I apply a translation along any axis, only one part moves, the
Hello! I’m currently receiving controlled-size chunks of vertex data over time and accumulating them into a final vertex array/vector. Each packet may contain between 1 and 1 million vertices. Once I received the final packet of data, I build a Graphic3d_ArrayOfPrimitives with Graphic3d_TOPA_SEGMENT
In short: When already using a GUI toolkit such as Qt, why do OpenGl_GraphicDriver/OpenGl_Window etc still want access to things like native window handles, even when it's not responsible for creating any windows or GL contexts? For example, the OpenGl_View does not seem to do anything useful unless
I am using OpenCascade for drawing lines. I can pan inside the view to indefinite coordinates. Right now my requirement is to set a limit for panning inside the drawing area. Example: To set a limit of +- 200. Above this coordinates limit the application should stop panning. Could any one please hel
The SetTextureFileName() method in class AIS_TextureShape sets texture maps. After rendering, then the source image is occupied and cannot be deleted, in version 7.8.1 the same method in version 7.7.0 ,I can do it, Why? Have any modifications been made here? I hope someone can help me.
Dear OCCT Community, I have added a sphere to a vertex I have chosen in the scene and I am trying to locate a AIS_Trihedron at the origin of this sphere. The direction information is correct, but its position is far from where I set it and it is drawn. I've added the image about this issue and I am
Hello forum, I generated and visualized a volume mesh of a solid, made of first order tetrahedra. I'm able to dynamically select and highlight the volume elements using an elemental color presentation builder (MeshVS_ElementalColorPrsBuilder) and issuing AISContext->Activate(meshIO,MeshVS_SMF_Volume
Hi all. For drawing performance issues i made TopoDS_Compound object from thousands of lines and arcs, smth like that: BRep_Builder builder; TopoDS_Compound compound; builder.MakeCompound(compound); ... adding in cycle line->topoShape = BRepBuilderAPI_MakeEdge(line->startPoint, line->endPoint).Edge(
Hopefully a pretty simple one... How do you use AIS_InteractiveContext ImmediateMode drawing? I guessed it was something like this: _context->BeginImmediateDraw(); for(//something) { Handle(AIS_InteractiveObject) a = //object _context->ImmediateAdd(a); } _context->EndImmediateDraw(); _context->Redra
I have an AIS_Shape which has been loaded from file, then had SetLocalTransformation() applied to it (rotation + scaling). It display fine... I now want to process vertices from this shape, using TopExp_Explorer - but just walking the underlying TopoDS_Shape gives me the pre-local-transformation rot
Hi there, While working with the CSharp_D3D example, i have noticed that in some operations, like rotate or pan (specially with a complex part in fullscreen), the amount of AIS_InteractiveContext::UpdateCurrentViewer() calls become way too many for the Redraw method to respond to the point that it s
How to determine which selected object is on the top from multiple AIS_InteractiveContext when clicking to select objects in V3d_Viewer? I am currently iterating through all AIS_InteractiveContexts, calling SelectPoint to find the topmost object in each context. However, I cannot determine which obj
could have sworn this worked before upgrading to 7.9.0... I've got a problem with AIS_Manipulator::HasActiveMode() never returning true... Implementing AIS_Manipulator as: void Ccanvas::showManipulator(CCutShape *selection) { if (m_Manipulator->IsAttached()) m_Manipulator->Detach(); AIS_Manipulator:
I'm trying to unbind the left-hand mouse button, but can't seem to get it to un-function! From my AIS_ViewController descendant class... myMouseGestureMap.Clear(); myMouseGestureMap.UnBind(Aspect_VKeyMouse_LeftButton); myMouseGestureMap.UnBind(Aspect_VKeyMouse_RightButton); myMouseGestureMap.Bind(As
Handle(Graphic3d_CLight) m_light = new V3d_SpotLight(gp_Pnt(0.0, 0.0, 5000.0), V3d_XposYneg, Quantity_NOC_WHITE); m_AISLightSource = new AIS_LightSource(m_light); doesn't matter what I do, the spotlight always points down (z-). Also when I change with setDirection(gp_Dir(...)); the m_AISLightSource
I have such a requirement, I need to build the software in linux with qt, and embed OCCT in the middle of the software. Currently, the embedding can be completed, but there is a problem, when I render the embedded OCCT, the occt control cannot fill the display, as shown in the following figure,The s
Hi, I am using AIS_Animation to make an animation, but I got a weird result. I am new to opencascade, I am not sure if there is something wrong with my code. Here is my code: TopoDS_Shape part = BRepPrimAPI_MakeBox(50.0, 50.0, 50.0).Shape(); gp_Trsf tsf; tsf.SetTranslation(gp_Vec(80.0, 180.0, 0.0));
I am using Open CASCADE’s Image_VideoRecorder to export videos, but I am facing performance issues. System Configuration: CPU: Intel i7-12700F GPU: RTX 3050 (6GB) RAM: 32GB Storage: 1TB SSD Monitor: 4K Issue: When exporting videos at 4K 60 FPS or 4K 30 FPS, the first 8–9 frames are high quality, but
Hello everyone, I am creating animations in a MFC based application using opencascade. Is there any way to export it to a video file like MP4 ? Thanks, Author
Hello, I have a 3D application using OCC/V3d_View base on Qt 5.15... The application run fine... but I have notice this error recently when I left my computer on with the application running all night, when I come back the next morning I got this error: TKOpenGl.WinSystem | Type: Error | ID: 6 | Sev
Hello all, how to delete a PrsDim_LengthDimension? void OccBase::clearDimensions() { qDebug() << "dimensions before cleaning" << m_dimensions.size(); Handle(PrsDim_LengthDimension) dim; for (int i=0; i<m_dimensions.size(); i++) { dim = m_dimensions.at(i); OccViewManager::instance()->myContext()->Era
Hello all when I set the displaymode=2 on an ais_shape I get a dotted line around the dimensions of TopoDS_Shape. when I increase the dimensions of the TopoDS_Shape the dotted outline is updated correct - so far, so good. but if I make a dimension of the TopoDS_Shape smaller, for example the length,
When I tried to use AISnManigator to control the clip plane, I encountered some issues: I feel like I used the wrong transformation of the plane, and when I use the manipulator to control it, I don't feel like it met my expectations; When I try to drag the plane for translation, the manipulator disa
Hi! I am drawing huge shapes by loading measures with a lot of vertices (over 5 million). Given the amount of vertices, instead of generating a face for every triangle, I am using a function like this one: //Build face/shape from triangulation const Handle(Poly_Triangulation) aTris = new Poly_Triang
Hello, AIS_InteractiveContext::SetDisplayMode(AIS_WireFrame,true/); shifts the current view of a set of AIS_Shape(s) to wireframe mode. From pic00.png to pic01.png. Here each wireframe of each shape is displayed with the color of the shape. I would like to display the wireframe of each shape in a ce
Hello there, I'm looking for a solution to add 3D model viewer to CADBase platform website. Ideally, the viewer should support glTF format and engineer-oriented functionality (dimensions/distances, etc. as in https://github.com/fougue/mayo/blob/develop/doc/screencast_1.gif). One of the nuances is th
Hello everybody, as the window hosting my OCC application can be resized, I've noticed that the zoom factor is adjusted in some way (sometimes) when the user changes the window sizes. More in detail, I've seen that when the X size is modified, the zoom level tends to stay the same as long as the sce
hello , I met a problem when trying to get the Z locaion of a plane by selection. I am using OCCT 7.7 on ubuntu 22.04. I made a window to show the step file, and selected a face on the body. I want to get the Z location of the face but got two different result which really makes me confused. // this
Content: I am working with OCCT in C# and trying to set different colors for edges and faces when using SetHighlightStyle(LocalDynamic). Below is the Prs3d_Drawer setup I am using: var drawer = new Prs3d_Drawer(); drawer.SetZLayer(-2); drawer.SetupOwnDefaults(); drawer.SetDisplayMode(1); drawer.SetC
This was working with 7.7.0 and now I get an error with 7.9.0: Graphic3d_PBRMaterial pbrMaterial; pbrMaterial.SetEmission(Graphic3d_Vec3(0,0,0)); Graphic3d_BSDF bsdfGlass = Graphic3d_BSDF::CreateGlass(Graphic3d_Vec3(0,0,0), Graphic3d_Vec3(0,0,0), 0.5,0.5); /*hangs now here -> */ pbrMaterial.SetBSDF(