Using AIS_InteractiveContext & V3d_View, i would like to be able to do 2 types of box selection (right/left): one includes all elements touching the selection square, and the other selects whats completely insde the selection square. On top of it, i would love to have feedback (highligt/detection) o
As mentioned, im very new in OpenCASADE, im sorry if my questions are a tad dumb, Using the C# WPF D3D sample, i import this step file (33.zip) and it seems like some surfaces are shown funny (image SURFACE ISSUE.png). It as well does not show the original face colors from the step file (in spacecla
Helllo forum I have a Qt 3D viewer, based on the Open Cascade Kernel: see Picture 1. I highlighted three lighting properties: ambient, diffuse, specular, that are passed as float values [0,1] to the opencascade widget, set as qt central widget of the QMainWindow In using OCC7.3.0 I use this code, wh
Hello all, I wrote following to export a shape to OBJ. works all so fare but have trouble with texture: when import into blender the texture is showing correct in Preview but not on the model. I already had an import in my app and all other obj are import correct with texture. import my just exporte
hi, I have this problem programming a MFC c++ application to select a Face inside another model that is transparent, there is a wireframe, it does not selecting correctly, and I have already used all possible methods. The frame outline is superior and catches attempts at internal selection. I show i
Up to now I've been using QT6 to host OCC. But, it's one hell of a platform (with complex licensing) to just host some basic windowing to get OCC operational - and do nothing more with (I have a basic window and buttons - everything else is OCC or local code). Does anyone have any recommendations fo
Sorry, this might be more of a QT question than OCC, but here goes... I've embedded my OccView (via QOpenGLWidget) into a QDockWidget (using mostly sample code). All is well: it views, it resizes, generally happy bunny. BUT - any attempt to un-dock the widget results in an exception being thrown: As
Hi Everybody, I am a little bit novice in opencascade technology. Since several days, I encounter an issue on my little Qt project including opencascade libraries. I am trying to build a little simple application (on Window 10) which shall able to read, and visualize an iges file in the mainwindow a
Hi, I am looking at using OpenCascade for a 3D modeling app that needs to work across Windows, Mac and Linux. OpenGL works fine, but Apple have deprecated it and support is limited to OpenGL4.1. The current version is 4.6, but AFAIK openGL is no longer in active development and 4.6 was released in 2
Hi all, Im extremely new to OCCT3D, been basically checking some of the demos and i was wondering how to change the display mode of my shapes to a very specific visualization mode: All Faces have to be shown in the color of the face (or body if no face color is defined) All Edges have to be shown in
I am trying to implement the translation of a box using an AIS_Manipulator in my Qt application and I am encountering several issues. The first one: after I click on the box to select it, I am assigning the manipulator, but myManipulator->HasActiveMode() is always returning false for some reason. He
Dear devs: I change the selection type of context to TopAbs_FACE. And I also set hilight style of every AIS_Shape. When I choosed a face by mouse, the hilighted face is incomplete. Here are the codes. ```cpp // Firstly, set the hilight style of the AIS_InteractiveObject void KernelData::SetHighlight
Hi everyone. Does anyone know any way to initiate a 3D view wihin an Avalonia window / control ? It should build for all platforms (windows / linux / macos) so I don't know how to achieve this because all samples I've seen use a WNT_Window or Xw_Window handle, so it would require to create custom co
Just testing GLFW sample code that ships with OpenCascade. I tried adding ViewCube to that code by just adding two lines in GlfwOcctView::initViewer() // Create interactive context myContext = new AIS_InteractiveContext (aViewer); Handle(AIS_ViewCube) aViewCube = new AIS_ViewCube(); myContext->Displ
Hi! I'm trying to use custom shaders with OCCT to learn how to use this kind of libraries. At this moment, I know how to create a vertexShader and fragmentShader from a file and attach them to a new shaderProgram. Also, I am able to push different variables, and those are received correctly in the s
Hi gentlemen, I am using ToPixmap(...) to generate a nice image from a ray tracing view, but there is only one call to Redraw() in ToPixmap() so my image is 'not finished' as it requires many more passes... I am thinking to create a new class that inherits from V3d_View and override the redraw funct
I have an `AIS_Shape` representing a cube as theCubeShape ( refer `Cylinder_cube.gltf`). I created a new point at position (7.0, 0.0, 0.0) and converted it into an `AIS_Shape` as thePointShape . I then added `theCubeShape` as a child to `thePointShape` using the APIs AddChildWithCurrentTransformatio
When defining a custom shape (descended from AIS_InteractiveObject), how can you get a select based on the internal contents, rather than the Object itself? To be specific, I'm defining a shape with Vertexes and Lines (a wireframe), the ComputeSelection looks like this: void ComputeSelection (const
No doubt, this is probably a simple one (again)... I'm trying to move some shapes on screen, following instruction from the mouse pointer. Tried a couple of different methods, but they all end up with the Translation being scaled way bigger than the actual mouse movement - for a small mouse movement
Hi, I have a huge set of Handle(Graphic3d_ArrayOfTriangles) objects. I would like to merge them together as single object before adding to Graphics3d_Group in order to improve rendering performance. Is there any direct way to do so ?
Hey everyone i'm trying to build a hierarchical treeview from an imported step file preserving relationship between assemblies and objects. Like the model browser in CAD Assistant. I've been using AIS_MultipleConnectedInteractive to combine multiple representations into one. I connect (sub-)assembli
Hi, I have the next issue: I create 2 cubes, one is child to the other [CViewer3dView::Addcubeandchildcube] The second cube is made child to the first with hAISCubeParent->AddChild(hAISCubeChild); I remove the child cube [CViewer3dView::Removechildcube] The recursive routine RecurseRemove uses AIS_I
it is about developing. In PrsMgr_PresentationManager.hxx file, there are calls to V3d_Viewer . it means a low level framework calls a high level framework. It makes if you want to to develop something not invlved in AIS or V3d but with SelectMgr_SelectableObject become impossible. My question is th
Hello all, When set in a 2D view (View->SetProj(V3d_Zpos)), what is the best topology to display a shape? It sounds like a weird question, bear with me... I have a setup whereby the user can create (2D) shape outlines using AIS_Point() and AIS_Line(). When the shape is closed, I'm creating an AIS_Co
Hello, does anyone know how to represent a BREP model with triangular facets after discretizing each surface in the model using STP format? I have tried using TopoDS_Face and BRepBuilderAPI_Sewing with occ-7.5.1, but the resulting STP file is empty. I would appreciate any suggestions, thank you!
Q: How can I limit pan and zoom operations to within the grid boundaries? To explain, I'm using OCCT in a purely 2D mode: looking down onto X,Y and forcing Z=0. i'm finding Pan and Zoom operations can get very excitable (esp on touchpads): resulting in the grid disappearing off into another dimensio
Dear all: I know AIS_Shape is more convenient. But some big files are not necessary to load the Topo data. So I try to load STL file just for visualization. For this goal, I hit plateaus. First, I can't add ComputeSelection to AIS_Triangulation, because there are no topos. How to add ComputeSelectio
When I execute this method, there is no problem, but an error occurs when the program exits. There is no issue when not using the AIS_ConnectedInteractive. auto boxshape= BRepPrimAPI_MakeBox(1,2,3).Shape(); Handle_AIS_ColoredShape cshape = new AIS_ColoredShape(boxshape); cshape->SetColor(Quantity_NO
Hi, I am building an application, that displays a 3D model on top of a background image so that the model is partially transparent and therefore the image can be seen as well behind the model. How can I achieve it? Crrently I am setting the background image with the AIS_View::SetBackgroundImage meth
Hello everyone, Got problems with showing STEP file. This code show only show black rectangle. reader.TransferRoots(); TopoDS_Shape shape = reader.OneShape(); // Create a new context and view Handle(AIS_InteractiveContext) newContext = new AIS_InteractiveContext(SharedViewer::getViewer());//just cla
What is the package or class name for mouse click events? AIS_Mousegesture is not what i am looking for i guess. how to get user clicks and convert it as gp_Pnt? Right now, i have it like this. I am working in Windows, MFC. gp_Pnt startpoint(0, 0, 0); gp_Pnt endpoint(100, 0, 0); Handle(Geom_TrimmedC
Hi everyone could somebody explain me about overloading DoResize() method, in class inherited from Aspect_Window. As in example /OCCT/samples/qt/OCCTOverview file:OcctWindow.h Aspect_TypeOfResize OcctWindow::DoResize() { int aMask = 0; Aspect_TypeOfResize aMode = Aspect_TOR_UNKNOWN; if (!myWidget->i
Hello, I am using ubuntu 24.04, when starting a occ+qt base app,and debugging goes into a mobile branch,namely in OpenGl_Context.cxx from line 954 Standard_Boolean OpenGl_Context::Init (const Standard_Boolean theIsCoreProfile) { ...... #if defined(HAVE_EGL) ......Debugging goes into here...... .....
Hi, I found that OCC application can't work on wayland, that's because you can't get the window handle from winId(). https://bugreports.qt.io/plugins/servlet/mobile#issue/QTBUG-76983 Although, I can simply set export QT_QPA_PLATFORM=xcb to make it work, but that isn't the final solution. I found the
Hello everyone, after importing the STEP file, I selected a surface and unfolded it, but the distance between the unfolded and original surfaces, as shown in the picture, is a bit far. I need to scale and rotate them. How can I adjust the settings to reduce the distance between the two surfaces dire
When building a cuboid that is large in length and width (500*500), but about 5 in height, construct a larger face (5000*5000) at the bottom of this cuboid. When the model is too far away from the camera or at an Angle, MoveTo will not be able to accurately detect the cuboid
After TopoDS_Shape is rendered by AIS_Shape, triangulation data will be automatically generated, and this data will be stored inside TopoDS_Shape. After this data is rendered, it will still occupy memory. How can I clean up this part of memory?
Hi, There is way to set selection tolerance(SensitivityFactor) for a Select3D_SensitiveEntity in pixels. Is there any way to set selection tolerance value in world coordinates system?. When we set by pixels value, irrespective of zoom level it does selection. But i would like have selection in preci
Hi All, I'am developing graphical utility which should visualize animation of 4 primitive 3D parts (i create them with BRepPrimAPI_MakeCylinder and BRepPrimAPI_MakeCone) Also I have to visualize static lines and arcs (AIS_Line, AIS_Circle). There could be tens thousands of this primitives. Animation
Hi, I'm trying to make a rubber band selection feature. But I've found a weird situation. When I drag all shapes in my view, some specific shapes were not selected. It was Cylinder and Cone Here is my sample test code. I made 5 functions for creating shapes. Box, Sphere, Cylinder, Cone, Torus. Like
Hi gentlemen, I am migrating a MFC application to Qt, and I need to replace the WNT_Window by its Qt equivalent, unfortunatelly nothing is provided by OCC team. I found some example in OCCTOverview but it is for Qt 5.x so I am not sure it will work for Qt6. Does someone know if there is an implement
I am working on drawing a large number of identical elements (with the same geometric content but different Transforms). By using AIS_ConnectedInteractive, I can reuse the Presentation data without recalculating it repeatedly. However, even with this technique, each element still requires an individ
I need to render a large number of elements, and the rendering performance decreases significantly, causing the frame rate to drop. Even when the AIS objects themselves remain mostly unchanged and do not require recomputation, after the camera parameters are modified, the V3d_View redraw still consu
Hello all, i am running m_manipulator->Transform(thePoint.x(), thePoint.y(), m_view) to move and rotate an AIS_InteractiveObject. I would like that when I hold the ctrl key that rotation or movements go in steps like +-15 degrees for rotation or or 5mm steps for translation. I was expecting to find
Hello all. When a move into my view using interactiveContext->MoveTo(...), I can highlight the part of an AIS_Manipulator that is under the mouse cursor. Now, when I click on this part, I'd like to make it selected and when I release the mouse cursor, to unselect it. Does anyone know how to achieve
Hey Got some issues using the Manipulator. Selection & Highlighting of the AIS_InteractiveObject has some weird glitches: 1) When the AIS is moved to a new location with the manipulator then selection and highlight is not working anymore. I.e not 'selectable anymore' 2) There is some 'selection tear
I have created an XYZ clipping plane by simultaneously creating three planes for the X, Y, and Z axes and placed them at the center of the cube. You can see this setup in the first image (Clipping_PlaneXYZ.jpg). Now, when I enabled the "face boundary" option using the API from Prs3d_Drawer: SetFaceB
Hello team. I have a very strange problem and I really don't know how to fix it. I didn't use standard dimensions and created my custom ones because I have some needs that dimensions don't provide. To define an angle dimension, I created some lines using a custom AIS object that have, for parent, an
Hi All, I have override the 'Compute' method of an AIS_PointCloud to show manage my own visualisation, i use the structs 'Graphic3d_ArrayOfPoints' and 'Graphic3d_ArrayOfPolylines' to show points and lines. When i call SetVertexColor of Graphic3d_ArrayOfPolylines i get a gradient on color, it works v
Hello forum, I generated a fully tetrahedral mesh of a simple model: see Fig. 1. Now I would interactively select a certain number of elements, using a box selection: see Fig. 2. The mechanism is working perfectly: see Fig. 3 (here the selection are wirefrane highlighted) and Fig. 4 (here the select
Hello, I opened my STL file via MeshVS_Mesh and with certain display modes I can see nodes and triangles but is there way to select that triangles/surfaces and vertices one by one or multi select in certain area.
Dear All, I have loaded and visualized a STL file using RWStl::ReadFile and then MeshVS_Mesh function calls( See Attached PDF file). The mesh comes well displayed and with smooth and fluid movements while zooming,orbiting and so on , despite about 8000 Nodes and 17 000 triangles I am also playing ar
Hello everyone. In my 3D viewer, I use a PBR environment for realistic rendering of materials. I set the shading model to Graphic3d_TypeOfShadingModel_Pbr and Graphic3d_RenderingParams.IsShadowEnabled to true. I also allow users to put some texts where they want using AIS_TextLabel shapes, for examp
Hello, I'm trying to apply MSAA on WebGL. I'm on 7.7.2, so the workaround with InitRenderBuffer() should work, but NbMsaaSamples simply doesn't do anything and shows jagged edges (MRE below). I'm wondering if I'm building via Emscripten with missing options or something. (If we had examples in C++ i
Hello guys, when I use the 7.4.0 OpenCascade version of the MFC example, I drag the window at will, so that the memory rises from 52.2MB to 637.1MB, but after a while the memory will come down, how to solve it, can solve the problem of excessive memory growth, thank you for your guidance
I am trying to create a length dim in the 3dViewer. I thought that is helpful to see my attachments file first. That attachment file shows the result about these codes. // Code Starts // Handle(Geom_Point) handle_PointA = new Geom_CartesianPoint(messuare_PointA); Handle(Geom_Point) handle_PointB = n