I want to make the shape rotate around an axis parallel to the Y-axis. The final result is right,but the animation process is wrong,the shape will translate and rotate in the same time.It's because the shape will first dot translate Mat to XYZ then rotate then translate to the original position? How
Hello, has anybody found a way of activating a mode in the AIS_ViewController where rotations are done only in the Z axis ("turntable mode")? I've tried using SetAllowRotation(true) + SetLockOrbitZUp(true) with AIS_MouseGesture_RotateOrbit or AIS_MouseGesture_RotateView and also various AIS_Rotation
As we know, FreeCAD decided to use Coin3D (OpenInventor) to increase visualization performance. So what about OCCT Visualization in 2021 ? Equal performance? may be better? or still worse?
Hello, I am trying to display a trihedron in my AIS_InteractiveContext at the origin. I would like for this trihedron to show "on top" of all other objects. I am aware of V3d_Viewer::TriedronDisplay() but this does not move relative to the context, it instead stays anchored to one location in the vi
I want to show the relationship between two edges, and I use AIS_TextLabel to achieve this function. For example, there are two parallel edges, I use the code below, however, it doesn't work. I know it should be converted to a unicode string, and I can show it on the widget made by Qt. TCollection_E
Hi guys, I need to display many 3D rows in OpenCascade viewer, the quiver plot (image is attached). I can do it by creating many TopoDS_Shape and displaying with AIS_Shape. But the point is it's getting slow to generate arrow shapes and display them. Do you guy have any idea to rendering the arrows
Hi all, I am writing about displaying Nurbs surface from TopAbs_FACE using gluNurbs. I searched about it from google. and I got snipped code. But I couldn't display nurbs surface on my program from snipped code. Please let me know what am I wrong. Handle(Geom_Surface) aGeomSurface = BRep_Tool::Surfa
Searching the forum did not reveal any result. For now I just do it by the following code: uorder = hBSpline->UDegree() + 1; vorder = hBSpline->VDegree() + 1; uknot_count = hBSpline->NbUKnots(); vknot_count = hBSpline->NbVKnots(); uknots = new float[uknot_count]; vknots = new float[vknot_count]; //k
Dear developers and users, I want to move objects by clicking on them and dragging them to a new location. Is this possible in opencascade? I already know how to translate objects, so it's a matter of tracking mouse position (in the form of coordinates) when an object is selected. Any ideas how to d
Hallo, I am using shiftselect to select several object with the rectangular area. This works fine so far but unfortunately objects that are behind other objects and can´t be seen from the view point, are selected as well. How can I change that behaviour that only objects/shapes that can be seen are
Initially after loading CAD files (using STEPCAFControl_Reader for example), if I hide that object using AIS_InteractiveContext::Erase, it does not hide. When I then make if visible again with Display and then Erase it again, it finally becomes invisible and it works as it is supposed to. So why is
In general the "UP" direction will be Z+. I have one use who needs Y+ to be the up direction in the 3D view. What woud be the best strategy to do this ?
Hi guys, I'm working with OpenCascade picking system. I can perform well a point/rectangle/polyline selection and query out the selected shapes. But how do I get the intersection point of selected shape (in point selection mode)? My code is very simple following what is written in: https://dev.openc
Hi all I want to show the bending process of the pipe like a animation.But I don't know how to make the process more smooth,just like a continuous process. But I don't know how to implement this process Greatly appreciate any help
I use AIS_Shape to display temporary geometries and prohibit these temporary geometries from being selected, but they are always selected now. How can geometry not be selected? Thanks a lot!
I am developing a C++ and OCCT based simple application on Mac OS Big Sur and trying to get visualization of the created STEP models (TopoDS_Shape) using VTK Integration Services (VIS) of OCCT. I installed OCCT on Mac using homebrew and I have the latest release of OCCT, 7.5.0. The problem I am faci
Hi, I am trying OCCT's visualization capabilities for the first time for a C++ based application on Mac OS Big Sur. I followed the user guide at https://dev.opencascade.org/doc/occt-7.5.0/overview/html/occt_user_guides__visualization.html#occt_visu_2 However, I was unable to get any visualization or
Hi OCC, Is there a way to zoom a AIS_Shape in the view?, So that the AIS_Shape is maximized in the view? Do you have any hints on how to achieve this? Thanks, Author
Hello, I am updating an application from OCC 6.7.0 to 7.5.0. Detecting of shapes or compounds in the viewer works well : - A colored wireframe is shown when moving the mouse over. Now I want to change the color by user for detecting. My Code is : try { myAISContext->MoveTo(point.x,point.y,myView,fal
Good morning everyone, I have this thread who is in charge to display and update multiple (custom) objects within an AIS_Context. In the meanwhile the user might want to zoom/pan/rotate (using the mouse) the scene during the process. I'm experiencing some (random) crashes when this is done and I fea
Hello, I'd like to create a custom interactive object displaying a Poly_Triangulation or, generally speakinig, a set of points organized in triangles. Is there a low level "graphic3d_" (or something) structure suitable for this task or should I display points and/or segments using Graphic3d_ArrayOfP
Hello everyone, I recently came across a graphics problem, when I tried to run my linux application with Qt (5.15) and OpenCASCASE (7.4) on a Windows-10 system inside the Windows Subsystem for Linux (WSL) system. I create the viewer widget very much like in the OCC C++ sample. This works very nicely
Hi deer! I am new to OCCT. I want to use Graphic3d_ClipPlane to clip 3D model. and my code as follow: void WidgetClipPlanes::setPlaneOn(Handle(Graphic3d_ClipPlane) &clipPlane, bool on) { clipPlane->SetOn(on); ... m_view->AddClipPlane(clipPlane); m_view->Redraw(); } but result is unexpected . the lin
Hello forum, => on Opencascade 7.3.0 - MSVC2015. I implemented mesh selection in an AIS_InteractiveContext using occMeshContext->Activate(meshVS,theMode) in which meshVS is a MeshVS_Mesh and theMode is one among MeshVS_SelectionModeFlags. The presentation builder was added in this way: occHandle(Mes
Hello, My app has its own OpenGL context and objects are typically drawn by calling their DrawOpenGL method that typically looks like this : DrawOpenGL_3D( void ) const { glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); glVertexPointer( 3, GL_FLOAT, 6*sizeof( GLfloat), Lef
Hello everyone, I'm trying to inherit from AIS_InteractiveObject in order to create a new object (usinig OCC 7.3.0) I've seen that, implementing properly the Compute() method I can build its presentation as desired (more or less). Of course I will vary its aspect according to "theMode" parameter in
Hi, is there a possibility to assign different colors to the arrows of a trihedron? I can set a color to every axis of the trihedron in the following way: Handle(AIS_Trihedron) axissystem = new AIS_Trihedron(anAxis); axissystem->SetSize(10); Handle(Prs3d_DatumAspect)datumaspect = new Prs3d_DatumAspe
I use OCC for robotics, how can I use the Package Media to record the motion in V3d_View, I know the view can be dumped to an image. The package is based on FFmpeg, but it seems like to be designed for a video player. I can't find any output API in it.
I am drawing some lines as topmost using SetZLayer(Graphic3d_ZLayerId_Topmost) It is displayed on top of all other objects but i want some other objects to bring front, so topmost lines will not be on top of these objects. Is that possible? I tried to change DisplayPriority but didnt work.
Hi I am displaying many objects thorugh recursive iteration. I can acess the reading and transfering progress with Reader().WS(); but how about progress of displaying shapes using Display() them ? I am displaying them in a recursive method. Is there a way to see the progress of displaying shapes?
Hello I am Hiding my shapes with Erase() and unhide with Display() it works perfect but, if my file is too big ııt takes some time to Display, I wonder ıf there is a way to hide Context without Erase(); Like setting it transparent and unselectable/touchable.
I use OCCTOverview, when I clicked Ray-tracing button, I get this error: TKOpenGl | Type: Error | ID: 0 | Severity: High | Message: Ray-tracing requires OpenGL 3.1 and higher my platform is MacOS wtih occt 7.5, Does anyone know how to set OpenGL version? or use QSurfaceFormat as version seter? Thank
Hello, I am using OpenCascade V7.4.0 on 32bit windows. I am making a process to select the line drawn on the screen and highlight the selected line. view and context are created from the parent viewer respectively. ----------------------------------------------------------------------------- context
Hello, I'm quite new to OpenCascade. I've successfully built a simple object from boolean a operation: a cone cut by a sphere. I've also been successful in displaying this object using the code: // Display Object TopoDS_Shape myShape1 = MakeObject(); Handle(AIS_Shape) AIS_Shape1 = new AIS_Shape( myS
Hi, I loaded colored sample cubes as XCAFPrs_AISObject's into a scene. When loaded it automatically extracts the colors specified on the shape. When I do SetColor, color changes and after using it I like to UnsetColor. I was thinking that unsetting will revert to original color specified by shape an
Hello there, I'm working on MFC samples, specifically, Animation sample but while the fan is moving I cannot do any other functionality like zoom-in, select it... In other words, when I do so the movement of the fan is stopped. After searching I get the reason, which is all these functionalities are
Hello, I try to clip one XCAFPrs_AISObject out of 2 in a scene using v3d for visualisation. If I generate the document, add a root and append 2 cubes in memory, put it into the scene, add a clipping plane to one of the cubes with hatching and color like in the user guide example it clips as wanted b
Handle(AIS_Shape) ais_Shape = Handle(AIS_Shape)::DownCast(aIO); ais_Shape->SetColor(aQC); ais_Shape->Attributes()->SetFaceBoundaryAspect(new Prs3d_LineAspect(Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.)); aCtx->Redisplay(ais_Shape, Standard_False); if i change the AIS_Shape color using above way it wor
Hello all I am upgrading from 6.9.1 to 7.5.0. There are good changes, particularly with new handles. One thing, which looks brocken is the StdPrs_WFDeflectionRestrictedFace:: Add (const Handle< Prs3d_Presentation > &aPresentation, const Handle< BRepAdaptor_HSurface > &aFace, const Standard_Boolean D
Hi, I am trying to add AIS_ColoredShape to the XCAFDoc_ShapeTool. Here is my code: TDF_Label addColoredShape(const Handle_AIS_ColoredShape& coloredShape, const Handle_XCAFDoc_ShapeTool& tool) { TopoDS_Shape shape = coloredShape->Shape(); TDF_Label shapeL; TopoDS_Builder builder; TopoDS_Compound comp
I had wrote the code by referring the sample code of occt7.5. However, I met a problem. When I run the program, the view of occt cannt show on the QWidget. When I open anthoer window on the view, the view will not display. I have to input an occt command to display the view when I meet the same prob
Hello, I would like to display some shaded box (opaque) with text inside it. I have a custom AIS_InteractiveObject for this task. The problem is that when I set the layer of the object to Graphic3d_ZLayerId_TopOSD, all the primitive I use to compose this object seems to be on the same depth. I tried
Hello, I wish to express my gratitude for OpenCASCADE developers. I have a question about OpenCASCADE 6.3 usage. I used OpenCASCADE as follows. (1) Set AutoActivateSelection OFF. myAISContext->SetAutoActivateSelection(Standard_False); (2) Create 3D object. gp_Pnt point(0.0, 0.0, 0.0); gp_Dir directi
Hi, I can't get the colors loaded from the step file when using the reader. If i use the standard reader it displays the stepfile without colors : STEPControl_Reader Reader; Reader.ReadFile("delta_complete.step"); std::cout << Reader.TransferRoots() << " Reader roots transferred." << std::endl; Topo
I can selected a face of a soild by using the MoveTo function, and get the topods_face by the DetectedShape function. However, I can't change the face color, because the functions in the AIS_InteractiveContext can't return the topods_face pointer. Is there other way to change the color of a topods_f
Hi, I am new to OpenCascade, i have a little problem. My first app is working as aspected, special thanks to Mr. HuguesDelorme He helped me with my first problem, rotating was very slow. That is solved. My app code : https://github.com/grotius-cnc/Skynet_Robot_Control_Rtos_Ethercat My problem : The
Hello! I've been attempting to render a texture via WebGL using the latest OCCT release (7.4.1 beta), but I can't quite get it to work. Ultimately the end result is a black surface and a browser warning: "RENDER WARNING: there is no texture bound to the unit 0". I'm compiling via Emscripten, and hav
For an AIS_Trihedron object when I set its ZLayer at Topmost then dynamic highlighting is broken : aisTrihedron->Attributes()->SetZLayer(Graphic3d_ZLayerId_Topmost); How to solve this ?
Hello, I'm having troubles with AIS_Trihedron + zoom persistence. I don't understand clearly how to make it work. I display an AIS_Trihedron located at some gp_Ax2 placement, this is working fine. Now to make that 3d object size "independent" from view zooming : aisTrihedron->SetTransformPersistence
Hello, I am trying to apply different colors to several linked AIS_ConnectedInteractive to the same AIS_Shape. But could not make it work. The SetColor function on AIS_ConnectedInteractive seems to do nothing. I am using OCCT 7.5. I already executed the example provided in the draw program: vinit bo
I have an application where I'm keeping some references to the topological data in the form of TopoDS_Shape objects and using AIS to display this data in the form of AIS_InteractiveObject s. However, I'm having a difficult time trying to figure out how to programmatically select an entity owner that
Hi, is there a way to display only boundary edges of a mesh solid? Using FaceBoundaryDraw and FaceBoundaryAspect works for TopoDS_Shape, but not for mesh object. Other graphic libraries get the result working only on opengl shaders parameters, so I'm wondering if there is a way to get this. Of cours