I am expanding a GLFW example with some code to work with Dear ImGui. My main subroutine looks like this: void GlfwOcctView::run() { initWindow (800, 600, "glfw occt"); initViewer(); initDemoScene(); if (myView.IsNull()) { return; } myView->MustBeResized(); myOcctWindow->Map(); initUI(); mainloop();
Dear developers, I'm trying to use a clipplane on an AIS_Shape built from an stl-file. The clipplane's hatching(/Capping) works fine for .brep but shows a hollow cross-section for .stl. The way I am building it is (note that I'm using the pythonocc-wrapper of OpenCascade): from OCC.Core.Graphic3d im
Hello, I've been working with textures in OCCT and came across an issue where, after calling the EnableRepeat function to enable loop sampling mode for textures, I still find that the UV parameters of the texture mapping are confined between 0 and 1. This limitation results in the texture being stre
Enable path tracking: aPrarms.IsGlobalIlluminationEnabled = true; aPrarms.Method = Graphic3d_RenderingMode::Graphic3d_RM_RAYTRACING; When rendering 30 models with pbr materials and BaseColorTexture present, the textures set later will be lost
I'd like to project a part to 2D using hidden line removal with HLRAlgo_Projector , but the projection is off and I can't figure out why. I've disabled the perspective transformation and the coordinate system is perfectly top down and it still looks like it's being projected with a perspective. Here
I use the following code to read the step file, and the result is no lighting display effect, but I use the following code to read the obj file, and the lighting display effect appears. What should I do if I want to read a display step file and have a lighting display? The STEP file and the OBJ file
I am reading STEP assembly using STEPCAFControl_Reader and putting all the compounds and solids in a tree structure. My tree node contains a name which I obtained from TDF_Label , and a shape which is AIS_ConnectedInteractive . I display this tree by recursively going thru all the nodes and using m_
I am using the following code to build a triangulation: Handle(AIS_Triangulation) m_hTriObject = new AIS_Triangulation(poly); m_hAisContext->Display(m_hTriObject, Standard_True); m_hTriObject->Attributes()->ShadingAspect()->Aspect()->SetInteriorStyle(Aspect_IS_SOLID); m_hAisContext->SetDisplayMode(m
Hello community. I wonder if there's any way to crop an AIS_Line that is drawn "under" an AIS_TextLabel. I create measure lines and would like to crop the line when the label is in front of it independently to the current view zoom. You can see in the snapshot my implementation on the left and what
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
Hey together, I'm getting started with pythonOCC for my thesis and I'm already struggeling at the installation-part :D but motivation is high. So: I managed to install pythonOCC (7.7.0) inside a venv with python 3.9 via Anaconda (took me longer than I want to admit...) on my Ubuntu 22.04 machine. An
When I cut the figure, I just want to get the outermost cut outline of the remaining figure, but I never know the right way to do it. BRepAlgoAPI_Section section(tube,ParentBox,Standard_True); section.ComputePCurveOn1(Standard_True); section.Approximation(Standard_True); section.Build(); OuterWiredr
i use AIS_Shape and AIS_TextLab set cullingsize.when Mousewheel,the ais_shape won't be rendered,but the text will.there is any way make text affect. Handle(AIS_InteractiveContext)thcontext=...; Handle(V3d_Viewer) theViwer=...; Graphic3d_ZLayerSetting aSetting=theViwer->ZLayerSetting(Graphic3d_ZLayer
Hello here. Is it possible in any way to display profile lines of shapes, especially curved shapes like cylinders / spheres ... ? See the screenshot in attachement to see what I want to achieve. Thank you very much.
Hello,everyone. I want to distinguish the lines and surfaces I selected. I want the selected surfaces and lines to appear in different colors or to make the selected lines thicker, but neither of these methods works, and I found that when highlighting a surface, The display effect is not that good,
Hi, I added few thousands of text object with different height. When text height goes beyond 100 the application consume huge amount of memory. I tried to set scale of the AIS label by setting SetLocalTranformation and reduce the height. But scaling doest have any impact on the text size. Is there a
Hello, I want to know how to draw the outer outline of AIS_Shape when AIS_Shape has holes 111.png is the effect I want to achieve. If it is a complete TopoDS_Wire, what I use is to traverse all faces, and then judge whether the normal direction of this face is parallel to the Y-axis. If it is parall
Hello, everyone! I have a question now. I want to select edge or face, then save the attribute of them. But when I use the code below, selectedShape is Null. TopoDS_Shape selectedShape = m_context->SelectedShape(); TopAbs_ShapeEnum objectType = selectedShape.ShapeType(); if (objectType == TopAbs_VER
I new myHilightDrawer and myDynHilight Drawer as selected Drawer and focus Drawer. But after selected the shape, the normal Drawer is not hide. How to hide normal Drawer when selected status? WireFrameDraw::WireFrameDraw(TopoDS_Shape const& shape) : AIS_Shape(shape) { { myHilightDrawer = new Prs3d_D
Hello, I'm trying to use the Visualization HLR as described in this tcl example( https://draw.sview.ru/visualization-hlr/ ). It works properly if there is no material setted on the AIS_Shape, setting properly the AIS_InteractiveContext's Default Drawer Shading Attributes: ais_context_->DefaultDrawer
when my mouse move in the UI window a transient model will appear and move with my mouse. After I clicked a place on screen the model is then placed. The way it is done is via putting new TopoDS_Shape into immediatelist. The problem that errs me is I have to create new TopoDS_Shapes. And I wander if
Hello, in my project, I am using AIS_ConnectedInteractive class to have multiple instances of the same TopoDS_Shape appropriately translated and scaled. Everything works fine except for the HLR representation. When I request this type of representation, the ComputeHLR method, which performs the fina
Hello OCCT Community, I've used "Selection Mode" with my AIS_InteractiveContext and when I assign "TopAbs_FACE" to the SelectionMode method (it can be seen below code block and the image of TopAbs_FACE), I am able to acquire the faces of my mesh object: ais_interactive_context_->Display (XCAF_Prs_AI
Hello All, I am selecting an edge on a part and moving the part along the direction of the edge. When I do so, the selected edge remains in the viewer. How can I delete/remove it from the viewer? I have attached screenshots. Thanks & Regards, Author
Hello everyone, I use OpenCascade 7.6 for my c# project and I don't know why can't change the transparency of AIS_Trihedron object. I've tried both methods and nothing's changed. So is there any other opinion to do that? _gnomon->SetTransparency(_transparency); _context->SetTransparency(_gnomon, _tr
Hello, I encountered a problem when using VIS that the ShapeId(IVtk_IdType) I obtained when selecting with the mouse was incorrect. Causing the obtained ShapeIdList(IVtk_ShapeIdList) to be empty. I don't know how to solve this problem. Do you have any good suggestions.
I am trying to determine the best way to highlight a section of the model programmatically using the name. I can iterate through the shapes and read the names of the nodes. So I can determine at match on the label but I cannot figure out how to highlight said label. When I find the match, I have tri
Hello, We encountered a problem while developing the OCCT program that we're unable to select the step model surface at mouse point position.Sometimes we did not select the surface where the mouse point was located, but the back of the step model. 1. Here's the codes to import step model; void OCCFe
Hello everyone, I import a stl file which likes a big cylinder and want to open hole inside of that shape. I have figured it out how to cut but I have problem from this point. Cut shape looks like empty and looks bad actually (like attached photo). And maybe there are some methods to fill inside of
Hi, we're currently checking if OpenCascade could be used as a replacement of our own graphic and mesh generation framework. So, as of now, I'm reading through the examples and checking the documentation. And a question spring to mind: If I have created a 3D representation of my structure, is there
Hello, I'd need to have some sort of link from an AIS_InteractiveObject (for example, after selecting on screen) and an underlying data I store elsewhere. It would be enough to have an user integer field usable as an array index, but I see no one.... Just the Owner field, which is a transient pointe
Hello, I want to make a dynamic selection, where the user see the shapes highlighted when hovering them with the cursor, and after clicking on them they will be selected and shown highlighted (as in 3d CAD software). Currently to highlight an object or parts of it, I open a localContext and set the
I tried to replicate this sample: https://github.com/gkv311/occt-samples-gtk/ While the original (which used GTK+-3.0) didn't start due to an old version of GTK+-3.0 being installed, my own implementation (using GTK4) did. However, I can't see anything on the blank GtkGlArea window, and I get: TKOpe
Hello forum using Tetgen I generated from a watertight surface mesh a volume mesh. Since I want a second order mesh I add, to each first order tetrahedron, the midside nodes, simply by calculating the midpoint of each mesh segment. Since I would like to have "curved", isoparametric elements I projec
My problem is I am opening CADRays, I am importing a STEP file and I am trying to add texture on it but CADRays doesn't shows my textures. I tried different images but no one works. Can somebody help? Why CADRays not showing textures?
I am currently working on a project that involves tesselating shapes using the BRepMesh_IncrementalMesh class in Open CASCADE Technology, and storing the vertix and index buffers for visualiation. However, I have encountered an issue specifically related to closed surfaces, such as spheres, where th
I want to use OCCT to develop a CAD for architecture, the buidling is large, so there are lots of shapes. As other architecture modeling software, when there model is large, it will hide some shapes of the building while zoom or rotate. I also want to do this with OCCT, but not find the way yet. For
Dear Community, We show Open CASCADE scene and OpenGL scene in different pages and dialog windows of our application. I'm having trouble with one, but not every dialog window, and it only happens on the windows side (it works fine on the Linux side). Error messages I get: TKOpenGl.WinSystem | Type:
Hello. I have managed to dispatch when selection occurs. I have have also managed to iterate of objects of class AIS_InteractiveObject . My final step would be obtaining geometric parameters of my selection - for example - coordinates of points. Here is my code: void GlfwOcctView::OnSelectionChanged
Hello everyone, Firstly I import step file and I read all labels. But when label is solid, I can get the color of label but if label is compound then could not get the color. Why this is not working on compound? For any help I will be appreciated. TDF_Label referred_label{ label }; Handle_XCAFPrs_AI
Dear OCCT Community, I have added a sphere to a vertex I have chosen in the scene and I am trying to locate an 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. I have solved an issue, but decided that project maintainers may be interested to know about it. I have followed example, managed to read STEP file and get its contents, in form of TopTools_HSequenceOfShape object. Now, I am displaying it in my 3D view(er)/AIS_InteractiveContext. and doing Fi
Hi there, I got a problem with interaction shapes rendered in VTK. i have followed guides ( https://old.opencascade.com/doc/occt-7.5.0/overview/html/occt_user_guide... ) step by step. But when I use 'Pick' function. It seems picked nothing. Here are my parts of codes. Build info: VTK 9.1 QT 6 OpenCA
hello forum, the elements (face or volume) of a first order mesh are efficiently highlighted when detected: see Fig.01: the mouse position is indicated by the black arrow. When the mesh is converted into a second order one, by adding midside nodes (and redefining each mesh element), the highlight me
Hello everyone, I use opencascade for my c# project and because of that I have a OCCTProxy like occt sample project. I want to open holes on stl file. Firstly I import a stl file and create a cylinder which will be a hole on stl file. While cutting the my stl file, I got an error about System.Access
Hi experts, I have 4 different V3d_View views in the same V3d_Viewer, and they have different orientations. I want to display grids in different planes in the 4 V3d_View views like below which is that in Rhinoceros. Archived image: external image However, it seems we can only display a grid by V3d_V
Hello! I have an array of Graphic3d_ArrayOfPrimitives which displays a chain of chained lines and tessellated arcs. I like to dynamically change the color and thickness of a line (two consecutive vertices) or an arc (a series of consecutive vertices) from the array when I move a slider control. How
Hello Everyone, I am trying to change transperency of AIS_Line using SetTransperency() , but it does not seem to work. Handle_AIS_Line line = new AIS_Line(aPnt1, aPnt2); Handle_Prs3d_Drawer myDrawer = new Prs3d_Drawer(); Handle_Prs3d_LineAspect asp = new Prs3d_LineAspect(Quantity_NOC_BLACK, Aspect_T
Hello forum, I have a MeshVS_Mesh object, that I displayed using a certain presentation builder occHandle(MeshVS_MeshPrsBuilder) aBuilder = new MeshVS_MeshPrsBuilder(aMesh, MeshVS_DMF_OCCMask, aMesh->GetDataSource()); customized through its drawer aBuilder->GetDrawer()->SetDouble(MeshVS_DA_EdgeWidth
Hello! I have an array of Graphic3d_ArrayOfPrimitives which contains segments colored with different colors. When highlighting it (using HilightSelected() and HilightOwnerWithColor()), I want to modify only the segment width of each element inside the array, but the colors to remain the same. Which
Hello all, this code will start and display the viewport on my HTC Vive: void OccView::cameraStereoVR() { Aspect_OpenVRSession* openVR = new Aspect_OpenVRSession(); m_view->View()->SetXRSession(openVR); m_view->View()->XRSession()->SetUnitFactor(1000); m_view->View()->XRSession()->SetTrackingOrigin(
Not sure if this is a bug, but sometimes, when adding an AIS_ColorScale object, it looks like the text is double printed, not sure what is happening there Anybody any experiences with this?
Hi all, When trying to run OpenVR is get following error: OpenVR, Unable to open actions manifest 'C:\Users\XXX\Documents\QtProjects\windows\build-GabbieCam-Desktop_Qt_5_15_2_MinGW_64_bit-Debug\GabbieCam\debug\GabbieCam.exe/occtvr_actions.json' I copied all the json-files from ...\opencascade-7.7.0\
Hello! I have a Graphic3d_ArrayOfPrimitives array created using indexes, and I like to indicate a specific color per segment , not per vertex. What is the recommended solution? If I cycle using myPArray->SetVertexColor() the segments are colored in gradient like in the picture attached, which is not