Hello forum I would like to visualize a mesh made of beams, already created, in which each beam has its own color. Which among the available MeshVS_PrsBulder should I use? Nodal or elemental presentation builder? I have data by nodes, and by element, so for my application there is no difference Not
I am trying to create the instance of the "RWGLtf_CafReader" class, but it is giving the following issues RWGLtf_CafReader reader; (This line I am using to create the instance of "RWGLtf_CafReader" class). ISSUES: 1.:-1: error: CMakeFiles/temp.dir/main.cpp.o: warning: relocation against `_ZTV16RWGlt
Hello, I am using Open cascade in Qt Qml for drawing lines. I have activated the grid and also I am able to do drawing. But I need to display the x y co ordinates values for the grid at the corner of the window as per the attached image. When I zoom in / out the co ordinates values should change bas
Hi, I followed the example in the tutorial, but it does not work correctly. What should I do? The following is part of my code: class CustomInteractiveStyle : public vtkInteractorStyleTrackballCamera{ ...... void OnLeftButtonDown() override{ vtkInteractorStyleTrackballCamera::OnLeftButtonDown(); pic
[EDIT] The line width problem described here was because of OpenGL's core profile beiing set. It was a fix for the text not rendering properly, so now the problem is how to fix the text rendering in Qt (which is linked to the OCCT upgrade, probably because of the openGL dll) ? Since upgrading to 7.8
When I use BRepOffsetAPI_MakePipeShell build pipe,around the corner, have a blank.How to optimize this thing? Here's my code gp_Circ circle(gp_Ax2(p, vec.Normalized()), 2.0); Handle(Geom_Circle) geomCircle = new Geom_Circle(circle); BRepBuilderAPI_MakeEdge edgecircle(geomCircle); TopoDS_Wire circlew
Hi, The AIS_ViewCube works correctly, but when I change the selection method to for example edge selection, I clear all other selection methods, before setting the desired selection method Handle(AIS_InteractiveContext) hAISContext = GetAISContext(); if (hAISContext) { hAISContext->Deactivate(); hAI
The steps about the issue are as follows: First, In class AIS_ViewController add MouseGesture AIS_MouseGesture_RotateView to myMouseGestureMap in its constructor function. Second, Create as AIS_ViewCube object in OCC_3dView Third, draw a box and click the top of the AIS_ViewCube object. The last, wh
Hello here. I have some problems using metallic materials in a PBR environment. I have a VisualMaterial with a PBR material defined like this: - use a texture file that contains transparent colors where alpha can be any value and opaque colors (see attached example, it has green fully opaque and red
Hi everyone, I don’t know if you have any experience in creating animations using AIS_Animation . When I used AIS_Animation to create a rotation animation, I specified a starting rotation angle of 0 degrees and a stop rotation angle of 360 degrees to AIS_Shape. The animation time set was 10s. As a r
Hello community. I have a last problem for my OpenCascade 3D viewer. I have a shape (a rectangle) composed of two faces, one for the front face and one for the back face. I managed my shape like this because I have to draw different materials on the each face and need to be able to select independen
Hello there, l already have a shape . And l want to let this shape translate first and then rotate . Show the whole process in the form of animation. l have already know need use AIS_AnimationObject class to creat a single animation and add them to AIS_Animation class. And now l can let the shape tr
I want to apply animation to component. Animation consist of one translation motion and rotation around itself 360. I am able to apply translation and after that I am applying rotation. So animation looks like first object move from one point to another point then on second point it complete revolut
Dear developers: I inherit the AIS_Manipulator in my project, named MyManipulator. And I want to change the AIS_Shape style of the manipulator. For example, the rotation parts are quarter of a circle. Not a whole circle. I tried to inherit the AIS_Manipulator::Axis and edit source code of the AIS_Ma
Hi all, I'm trying to import a huge CAD file in OpenCASCADE application (over 100 MB), and it takes to import and render on the screen. Are there any optimized parameters or methods in STEPControl_Reader / IGESControl_Reader / STLControl_Reader to make the process more faster?
Hi, In my 3D scene i got a lot of shapes with a lot of details, so i want to zoom many many times to see those details. However the more i zoom, the less the zoom is strong till it not zoom at all, i guess it s due to a pourcentage factor on view. I would like to know if someone have an idea about h
I want to visualize an OCCT topological shape in VTK viewer. I refer to the tutorial of VIS.However there throw exception in 'Mapper->SetInputConnection(DS->GetOutputPort());' Here is my code: // 1 . Create IVtkOCC_Shape instance(VIS wrapper for OCCT shape) and initialize it with TopoDS_Shape object
Hello guys, I have troubles with visualizing AIS_Point . I create about 0.33 million (330000) AIS_Point and use context->Load() to display them on screen, then I see a huge memory consumption (About 4.3 GB memory) and low frame rate. Could you please help me with this problem? My point class: class
When using AIS_PointCloud with SM_SubsetOfPoints, you can select individual points through a box or polygon selection and getting the indices of the selected points as follows: Handle(SelectMgr_EntityOwner) aSelOwner = myAISContext->SelectedOwner(); Handle(AIS_PointCloudOwner) hPointCloudOwner = Han
I need a polyline with colored segments/edges and every individual edge should be selectable. Basically what you can do with BRepBuilderAPI_MakePolygon would serve my needs, except that I can't give colors to the edges (as far as I can see). The code below is an example only showing a few points in
Hello community. Is there any way to define a texture tiling for a material, without changing all objects linked to the PBR material UVs ? I'm using a XCAFDoc_VisMaterial object and defines its XCAFDoc_VisMaterialPBR object with textures (diffuse, normal, metallic...) and i would need to tile these
I have a test program where I generate a cube and activate the edge selection with myAISContext->Activate(AIS_Shape::SelectionMode(TopAbs_EDGE)); In 7.5 it works fine, in 7.8 I get a crash in StdPrs_WFShape::Add at line 127 const Handle(Prs3d_LineAspect)& anIsoAspectV = theDrawer->VIsoAspect(); if (
Hello, I am using the ClipPlane mechanism to implement clipping functionality in my application. In my scene, I am rendering several hundred AIS objects and have added a single clipping plane to them with the following code: Handle(Graphic3d_ClipPlane) aClip = new Graphic3d_ClipPlane(plane); aClip->
Hello I am having trouble building the WebGL example for the past couple hours. I wanted to know first if for Emscripten do I need to build it from source or can I just follow the Installation instructions using the emsdk. ( https://emscripten.org/docs/getting_started/downloads.html ) The only reaso
Hello, everybody! I know how to display Automatic highlighting,It's about moveto.But as far as I know, const Handle(Prs3d_Drawer)& aPartSelStyle = myContext->HighlightStyle(Prs3d_TypeOfHighlight_LocalSelected); The above method can control the highlight status after the selection, aPartSelStyle->Set
Hello community. I use AIS framework to display some 3D data and I create measure objects, such as distance and angles, and display them creating a root object and child objects (lines / arcs / labels). To do so, the root object I used is actually an AIS_Trihedron with its axes / arrows and labels h
Hi gentlemen, I just checked that picking and selection are not working for a simple shape (OCC 7.8.0, windows 10, VS 2022). I wanted to register a bug in bug tracker but do not find a way, so I post it here. Please find in the attached .zip a brep file and a small tcl script to reproduce on you sys
Hello community. In my application, I have a custom treatment to generate back faces as single shapes because front and back faces should be distinguished as single entities when the user select a front / back face of a surface shape. Thus I specified my view calling the "SetBackFacingModel" method
Hi, To find shapes under a rectangle area OCC provides "SelectRectangle" function from AISInteractiveContext which accepts pixel(view) coordinates. Is there any function to use scene coordinates to get shapes instead of pixel coordinates ? also Is it possible to only find the objects instead of sele
Hi, I would like to know if someone know how modify the transparency of a shape defined as a Wire. I have already tried the method SetTransparency() of AIS_Shape and SetTransparency() of ShadingAspect but it still not working. PS : I use my own WireAspect Thanks in advance, Nathan,
Hello all. I'm facing a problem using AIS_TextLabel and the vertical alignement. I'm placing such object near to a line with the SetPosition function (in fact at the center of a line). When using the SetVJustification function with Graphic3d_VTA_TOP, the display is nice, there is a small space behin
Good afternoon, Currently I am building a small piece of code to make pictures of .stp files. The code will run on a system without any gpu/graphics, so I am trying to use the mesa3d software implementation of OpenGL. The code works, but when i call the method that creates a screenshot a second time
The next code Handle(Geom_Plane) hRefPlane0; hRefPlane0 = new Geom_Plane(gp_Pnt(0, 0, 0), gpDirRef); Handle(AIS_Plane) hRefbottomPlane = new AIS_Plane(hRefPlane0); hRefbottomPlane->SetSize(500.0, 500.0); hRefbottomPlane->SetColor(Quantity_NOC_LAWNGREEN); aShapes.Append(hRefbottomPlane); worked in 7.
In 7.5 I had a derived class from AIS_ColorScale which had a constructor like this: AIS_TrajectoryColorScale::AIS_TrajectoryColorScale(NODE_UUID iChannelUUID, bool bSmooth, int NumSegments) { ...... SetLabelType(Aspect_TOCSD_AUTO); SetZLayer(Graphic3d_ZLayerId_TopOSD); SetPosition(0, 0); // lower le
Hello, I want to make the surface of MeshVS_Mesh shiny, as shown in picture1. In the picture left model is created using MeshVS_MeshPrsBuilder , it can set the material through: meshvs_mesh->GetDrawer()->SetMaterial(MeshVS_DA_FrontMaterial, Graphic3d_NOM_SHINY_PLASTIC); But when I use MeshVS_NodalCo
Hey, I would like to use the sample https://github.com/gkv311/occt-samples-qopenglwidget with QT Version 5.15.10 and opencascade 7.8.0. It was working as expected with the OCCT Version 7.6.0. While i was upgrading opencascade, I encountered a Segmentation Fault in the Init line of the code below. It
Hello, I would like to know if it's possible to modify the BVH structure of a SelectionManager or even replace it with my own optimisation structure. I am currently working on some large AIS_Wire ? I also would like to know if there is an optimisation structure only for the visualization (i guess no
Hi, I created two Prs3d_Drawer with different Zlayer value and added two rectangular face shapes inside Compute function. Even though I set the different value of Z using the function Prs3d_Drawer->SetZLayer. It paints both the shapes with different colors that was set on Prs3d_Drawer objects. But I
Hello community. Today, I'm trying to create a custom manipulator and I'd like to know if there is a way to project a 2D point (mouse position) to a 3D point that is on a specific plane (using gp_Pln for example) regardless of the camera eye direction. I know the "Convert" function of the view but t
Hi community. I want to implement a zoom on the cursor position but I have an issue or a misunderstanding of the "ZoomAtPoint" feature. First of all, I don't have the issue with orthographic projection, when zooming in this mode, my cursor always stays on top of the exact same point in the 3D view.
Case 1: When I move the the component in X by 500 and Y by 500 , then the transformation (local transformation) is given by API is X=500 Y=500 Z=0.00 (Refer image 1) Case 2: Now I am applying the rotation to X axis and Y axis by 50 each then the values of transformation is as follow : X: -281.79 Y=4
Component is rotated around 45 degree around X and Y axis. I am trying to get the values after rotation. I tried following methods 1] By gp_Quaternion gp_Quaternion q =CurrentObject->LocalTransformation().GetRotation(); double aProbe, bProbe, cProbe; q.GetEulerAngles(gp_Intrinsic_XYZ, aProbe, bProbe
Hello, while upgrading from 7.5.0 to 7.8.0 we no longer find the collection AIS_SequenceOfInteractive available. While it could easily be restored, I'm asking the reason of such a deletion! It has be found to be not efficient or something else? Do you have any suggestion for its replacement? Thanks
I am having trouble figuring out how to get the TDF_Label from the selected object. I am trying to display the label when a user selects a shape in the viewer. TopoDS_Shape selectedshape = myContext->SelectedShape(); Gets the selected shape but I cannot figure out how to get the label from the TopoD
Hi guys, I have built a simple visualization program in qt with OcctWindow class and the description in the OCC document. The problem is the view can be showed, but only for a second(maybe less than that). I have tried to debug it, found that the view is good until the statement "return a.exec()” wa
I used to create 3d viewer by using OpenCASCADE 7.4 and MSVC 2019. I got a error at new in below, MyGraphicDevice = new OpenGl_GraphicDriver(aDisplayConnection); Can anyone tell me which header file use for new Please help me to solve this, View attached image
Hello, I would like implement the functionality where I am attaching a manipulator to a component and then use the manipulator's rotation axis to rotate the component along different axes to place it correctly . After rotating the component, I want to save that transformation. Currently, I can attac
Hello, When i use an AIS_PointCloud with his points and his PointAspect() with a variable scale Standard_Real pointSize {10.0}; Prs3d_PointAspect* pt = new Prs3d_PointAspect(Aspect_TypeOfMarker::Aspect_TOM_POINT, c, pointSize); pAisCloud->Attributes()->SetPointAspect(aspect); // pAisCloud is my AIS_
Memory will increase when MustBeResized is called. Then it will not be released... Opencascade V7.4.0 PC OpenGL 3.1 Is there a way to release the memory? code >>>>> Handle_V3d_View m_view ... m_view->MustBeResized(); // <---- <<<<< code This problem does not occur on an OpenGL 4.6 PC. Best Regard!
Hello there! I am having an issue with my implementation. I have created a QApplication which is based on a QMainWindow, with several widgets embedded to it. One of the widgets is used to visualize occt entities using a V3d_Viewer, V3d_View etc. In my implementation I use the following line of code
With AIS_PointCloud ,I want to select points from two point clouds. After selecting the first point, when I select the second point, the first point should be deselected. How should I proceed? I tried using AIS_SelectionScheme_Add , but it doesn't work.
Hey Everyone I was wondering if it's possible to set the material(Graphic3d_MaterialAspect) of each individual subShape of a AIS_ColoredShape object. Best regards
This question is similar to this: https://dev.opencascade.org/content/using-opencascade-opengl I understand that the Viewer is typically used for handling three-dimensional objects, but I have a requirement to draw an image using OpenGL in the OpenCASCADE Viewer and place it at the bottom of the Vie