TCollection_AsciiString filename = QString("C:/Users/pathToPicture/sky.png").toStdString().c_str(); Graphic3d_CubeMapPacked cubeMap(filename); m_view->SetBackgroundCubeMap(&cubeMap); Produces following error: TKOpenGl | Type: Error | ID: 0 | Severity: High | Message: Unable to get the first side of
Try to override ProcessDragging by simply translating the object to mouse position. I figure to do so I need the AIS_InteractiveObject and set its location. So the question is how to get the AIS_InteractiveObject or PrsMgr_PresentableObject from SelectMgr_EntityOwner? or maybe there is another way t
Hello. What is the best way to use animation of objects on scene (preferably, AIS_Shape entries)? I have looked at the mfc-related example, but it was not clear for me. Now I'd like to start from simpler example - move a cyllinder with certain speed to a point and the stop. There are two ways: 1. Us
Hi Bros, I'm new in OCCT, I learn the AIS with the code of Kirill Gavrilov https://unlimited3d.wordpress.com/2021/11/16/ais-object-computing-presen... , I try to get the imformation of the face I select, Maybe location an orient of Cylindrical surface. I thought I can get it with the help of BRepAda
Hi I move a AIS obejct by mouse in my program ,when set "myV3dView->Camera()->SetProjectionType(Graphic3d_Camera::Projection_Perspective)" when id move mouse , the AIS obejct can not follow the mouse , if i not set "myV3dView->Camera()->SetProjectionType(Graphic3d_Camera::Projection_Perspective)" ,i
Hi, I use OCC to display a coordinate system. When I zoom the window, the coordinate system shifts! This problem also exists in the OCC sample androidqt Who can help me? The code below: V3d_View::TriedronDisplay(Aspect_TOTP_LEFT_LOWER,Quantity_NOC_RED, 0.1, V3d_ZBUFFER);
Hi, after assembling a work setup I started to workout face selection. I rotate all elements to desired position and on selecting a face, I calculate a plane from the face and calculate intersection with the blue transparent box. Blue box is a Handle(AIS_Shape) member variable and rotation is perfor
Hello all I have trouble to positioning an AIS_TextLabel when I attache it to a parent. The Label shows on the given Position (0,0,3000) but when I move parent the text is moving not the same distance (~ 2.5 times more) but in the correct direction m_aisTextLabel = new AIS_TextLabel(); m_aisMain->Ad
Hi, I finally got the Euler angles thing figured out. This works quite well: I load a step file (SC_Setup00.jpg), which results in a misoriented model. I then rotate that to the desired position (SC_Setup01.jpg) and press "Set" (SC_Setup02.jpg). gp_Trsf t = model->Transformation(); const TopoDS_Shap
I have a single context and single viewer, but create multilple views so the scene can be viewed from different directions. For each view I create a Visual3d_Layer so that I can add text and linework. I'd like to add different text to each view. Unfortunately, all views appear to draw the same overl
I use AIS_Animation for rotate animation,but it interpolation tool is gp_QuaternionNLerp,thre result is not my want,What should i do use AIS_Animation for right rotate animation?
Hi guys, I would like the V3d_View to zoom or fit to a defined rectangle (the rubber band), there a V3d_View->FitAll method supplied with theMinXv, theMinYv, theMaxXv, theMaxYv but it doesn't look like what I'm looking for. Please help. Thank you.
Hello all! please, could someone tell me how to change the color of the faces when I hover over it with the mouse. Luxury problem, but drives me nuts Thank you! m_viewCube = new AIS_ViewCube(); m_viewCube->SetSize (60.0); m_viewCube->SetColor (Quantity_NOC_LIGHTGOLDENROD); m_viewCube->SetInnerColor(
Hi, I'm working on a little viewer and actually I have a problem understanding rotation. Out of curiosity I tried V3D_View::Rotate with the angles from spinboxes, but only rotation around X-axis works as expected. Rotation around Y- or Z-axis don't rotate around the axis, but around a centerline bet
I am trying to activate a single selection type (TopAbs_FACE) on a group of AIS_ColoredShape's and disable all selection on other AIS_ColoredShape's. I am currently able to get the desired behavior by in the code below. Handle(AIS_InteractiveContext) ic; Handle(AIS_ColoredShape) shapeToActivate; Han
Hello, I'm working on a viewer using OpenCASCADE. The user uses the STEP format to load geometric shapes. Actually, everything is working fine so far. First of all, these geometric shapes go into a kind of simulation and draw conclusions according to calculation. I have thousands of rows of data out
Hello, I was developing occt on top of Qt and when I open the application on scaled windows (native regulation 4k scaled to %150). I'm unable to click on the shape/mesh because of the scale, I had move mouse away from the shape/mesh able to "highlight" so I can click on it. Basically mouse position
Hello, I load my STL file via MeshVS, I can give color configs but I can't set transparency even If set "aMesh->SetTransparency(0.9);" value it still doesn't effect it.
Hello, I want to display a textured shape. The program doesn't crash, but the shapes are plain. I can change color, material, transparency, etc., but no textures. I found in other forum posts that I have to call SetSurfaceDetail(V3d_TEX_ALL) from my V3d_Viewer. However, this was deleted in OpenCASCA
Hello all, how to get the shape of a child of a AIS_Shape? Thanks! m_aisDisplay->addChild(...); PrsMgr_ListOfPresentableObjects children = m_aisDisplay->Children(); for(const Handle(PrsMgr_PresentableObject)& value : children) { { AIS_Shape s = static_cast<Handle(AIS_Shape)>(value); // doesn't work.
Hello, I want to know some fundamentals of how OCCT raytrace the BRep. For exmaple, raytracing triangle meshes is well understood and the most basic operation is ray-triangle intersect. How does OCCT handles ray-surface intersection with primitives like NURBS? Can someone point out where to look at?
Hello, I try to develop a simple CAM software in C# winform. Now when I change the selection mode to Solid or Face ...etc, and if I click nothing in the cad model(position like the image file attached, and I have already written if selected shape is null condition but it doesn't work), it will raise
Hello, I want to draw arrows to represent the direction of surface normal vector. And I took the https://dev.opencascade.org/content/arrow-representation and https://dev.opencascade.org/doc/occt-7.5.0/refman/html/class_prs3d___arrow.html as reference (my OCCT version is 7.5.0). However, I don't know
Dear, I'm trying to display a Poly_Triangulation (extracted from an STL-file using the RWSTL-module). I've currently found 2 ways that work but for each solution I'm facing a (different) problem. Note that I'm using the pythonocc wrapper, but the steps should be the same. METHOD 1 Using AIS_Triangul
Hi. I'm trying to add anti-aliasing to my WebAssembly application as follow, but it doesn't seems to work. Graphic3d_RenderingParams& aParams = view->ChangeRenderingParams(); aParams.IsAntialiasingEnabled = Standard_True; // I tried this as well not really sure how to use it aParams.NbMsaaSamples =
Hello, I encounter a crash when i try to delete OcctQtViewer. When OcctQtViewer destructor works, program crashes. I do not want OcctQtViewer live for the life cycle of the application. I need to open/close the page frequently. The same logic at https://github.com/gkv311/occt-samples-qopenglwidget a
Hello Guys, I decided to use AIS_PointCloud to draw set of points. My code is below: BRepMesh_IncrementalMesh(shape, 0.1); std::vector<gp_Pnt> vecPoints; GA_COMMON::CollectPoints(shape, vecPoints); Handle(Graphic3d_ArrayOfPoints) thePoints = new Graphic3d_ArrayOfPoints(vecPoints.size(), true, false)
Hello, We realized that, we encounter the crash when we try to delete OcctQtViewer. When OcctQtViewer destructor works, program crashes. We do not want OcctQtViewer live for the life cycle of the application. We need to open/close the page frequently. We apply the same logic at https://github.com/gk
Hello, is there a way to update just some AIS_InteractiveObject within an AIS_InteractiveContext when the ->UpdateCurrentViewer() method is called? In my application upon certain circumstances, I need to call repetitively this method in order to update something that changes its aspect very often (u
Hello, We have an application that models a printed circuit board (PCB) using electronic components imported from STEP models and primitives to define the other objects on the board. We import each STEP model and add it to the board model and then set the color of the added shape(s) in the board mod
Hello, I've looked through this forum for how to convert mouse coordinates in a 3D window to an actual location on a 3D model. Using our old viewer which uses Immediate mode OpenGL, it's quite easy. See Below: How is this done in Open Cascade? I've tried the V3d_View Convert method and it works, but
I wanna customizing a "Inspector". So, I do some steps according to Inspector guide like picture. But, some errors are occurred. there is no "inspector" folder that has .hpp and .cpp like "TInspector_Communicator.hxx" and "TInspectorAPI_PluginParameters.hxx"~~. But, there are some folders like "TIns
Hello, With the current use of glext.h, we are getting a build error in our project. When we manually change the name of glext.h to OpenGl_glext.h and then include the use on line 96 of OpenGl_GlFunctions.hxx with this new name and compile the source code from the beginning, we do not encounter any
I am trying to understand the following example: Handle(V3d_Viewer) theViewer; Handle(AIS_InteractiveContext) aContext = new AIS_InteractiveContext (theViewer); BRepPrimAPI_MakeWedge aWedgeMaker (theWedgeDX, theWedgeDY, theWedgeDZ, theWedgeLtx); TopoDS_Solid aShape = aWedgeMaker.Solid(); Handle(AIS_
Hello, We have been toying with setBgGradientColors() to set different background colours and gradients. And this works ok, but it would be cool if we could add a more "fancy" background such as a fog-like background as in Blender. Is there any way to implement a foggy background with an OpenGL shad
Hello, I can't toggle anymore between Graphic3d_TOSM_PBR and Graphic3d_TOSM_FRAGMENT by simply changing value Graphic3d_RenderingMode::ShadingModel and updating the view 3d (V3d_View::Redraw() ), has something change between 7.5.0 and 7.6.0 in that regards? In 7.6.0, if I start my application with G
I'm getting a crash when creating a new Xw_Window object. We're using a wxWidgets panel to display but I get a crash in the Aspect Window creation section below. Is there something I'm doing wrong? Works fine on Windows. Thanks very much. /* ----------------------------------------------------------
I'm trying to make a separate thread which has to work with visualization via AIS_InteractiveContext. It raises a problem of one OpenGl context for two threads. It's not obvious for me how to handle several OpenGl contexts in terms of OpenCascade (maybe even one and somehow shared). Could you please
Hello, for example,I crated an edge,I want to change the position of an endpoint,but I think more cpu will used if I delete it and the create new one,Is there a better way? How about a more complicated shape?
Hello, what is the best way to select a sub-shape (TopoDS_Shape) of an AIS_Shape? I want to do the reserve of what AIS_InteractiveContext::DetectedShape() gave me, starting from a state where nothing is selected in AIS_InteractiveContext and add a sub-selection using the API. Best regards, François.
I would like to have a possibility of selecting planes in AIS_Trihedron object, but I couldn't find any information about it (except one which is now deprecated - I'm using OpenCascade 7.5.0). Could you please answer if there any chance of having selectable planes in AIS_Trihedron?
Hello, When I use the opengl primitives in opencascade based application, according to ViewerTest_OpenGlCommands.cxx file, Below is a snippet of the code. He did draw what I wanted, but it was blocked by two triangle primitives , and I could see the following elements from the gap, such as the coord
Hi, I created a AIS_Point and show its name using AIS_TextLabel, but they're too close. I want to move the label a little bit to the upper right,what should I do?
Hi, I use the occwindow from transparency demo and until now everything worked fine. Now I started to move elements programmatically and that does not work. Well, the movement applied to the shapes works, but nothing happens on screen. I tried update(), updateView() and even direct call to paintGL()
Hi, I am using the clipping plane feature in OCC 7.5.2, and the following code (I'm using python bindings from pyOCCT ) works as expected on nearly all STEP files I've loaded. shape_viewer = ShapeViewerQt(width=512, height=320) shape_viewer.display_shape(foo, rgb=Quantity_Color(Quantity_NOC_BLUE)) s
Hello everyone, I created some shapes in the view. Each shape has a number. I want to get the serial number of the shape when I put the mouse on it, but I don't know how to connect the number with the shape. I tried to save AIS_InteractiveObject pointer when I created the shape, and use Context->Sel
Hello My platform is MS win7 64-bt, VS2015 VC14, .Net v4.5.2 and my application can work. But it gets an error when it's run in win10 system and the error message is below TKOpenGL | Type: Error | ID: 0 | Serverity: High | Message: OpenGL context reports version 4.6 but does not export required func
Hi, I want to create some OSD like display. For testing purpose I extended a Qt sample (hellogl2) which worked ootb. Trying to achieve the same with occ failed. Occ turned Qt transparent background into fully opaque. I tried to add Qt::WA_NativeWindow but that did not change anything. Is it possible
Hello there. I'm trying to make a simple simulation viewer with a qml project. I have OpenCASCADE viewer working in full frame. I want to add menu bar, tool bar stuff. I have reviewed the AndroidQt application. However, I think the viewer class is out of date. Is there anything you can suggest? The
Hi, I use AIS_ViewController in a Qt-Widget with stacked layout (like GeomWidget), but all other pages are Qt only stuff. On switching through all pages, when a Qt-page is activated the second time, event-handling for Qt is not working any more (see attached image). Looks like occ is "steeling" some
Hello Friends, I want to use clipping planes with hatching. Capping works but hatching style is not applied, only solid capping is rendered no matter what I set to SetCappingHatch. Code: Handle(Graphic3d_ClipPlane) plane = new Graphic3d_ClipPlane(); plane->SetCapping(true); plane->SetCappingHatchOn(
Hi, I would like to change the attributes of Edge presentation in DynamicHilightAttributes. But it does not work. Handle(AIS_InteractiveContext) ctx = ...; TopoDS_Shape shape = MakeBox(20, 20, 20); Handle(AIS_Shape) prs = new AIS_Shape(shape); prs->SetDynamicHilightAttributes(new Prs3d_Drawer()); pr
hello, the problem description: attached image shows the situation, when animated moving of object along the x-axis (po_Context->SetLocation (poAISShape, o_Trafo);) leads to unwanted effect of clipping. V3d_View object contains no clipping planes. when the scene is redrawn (it is enough to move the
Hi, I want to use occt + glfw + imgui to program a app. Here is how I init occt and render void OCCTRenderer::initViewer(GLFWwindow* win) { if (m_Display.IsNull()) m_Display = new Aspect_DisplayConnection; Handle(OpenGl_GraphicDriver) aGraphicDriver = new OpenGl_GraphicDriver (m_Display, false); Han