Hello, in my application, I first import a file in the .STL format, storing its vertexes and triangles in two different arrays, and then I try to represent the imported geometry using Opencascade (7.4.0). Te following is the code I'm using to display the geometry starting from vertexes and triangles
Hello forum, I'm not able to change the default styles of mesh highlight and selection (OCC 7.3.0). See the attached pictures, showing a surface mesh, an element with highlight and a few elements selected. The mesh presentation builder has been added to the MeshVS_Mesh object with the flag "treat as
Hi, i am trying to render shadow in opencascade by shadow mapping. In glsl, you need to create a frame buffer object for shadow map texture. I wonder how to do this in opencascade.
Hello everyone, I found that when the camera is set to Projection_Perspective, ais_viewcube becomes strange, but when Projection_Orthographic, ais_viewcube is normal. I don't know how to modify it? Thank you all. switch (projectionType) { case PROJECTION_TYPE_ORTHOGONAL: { myView->Camera()->SetProje
Hello Team, It looks like FastConverter for Voxels is not distributed with version 7.4 of OCC. What library I could use for generating voxels from shapes ? I found some vtkVoxel library. Is that what I am searching for ? Thanks. With respects, Author.
Hello Everyone, I've got some problem with roundtrip using of vtkVoxelModeller from Open CASCADE environment. I constructed vtk object from TopoDS_Shape, executed voxel modeller, but I do not understand, how to convert back the result to TopoDS_Shape. Is it possible in principal? Thank you in advanc
Hello, I was wondering if someone might have a clue on how to achieve the kind of shading found in the attached pictures using Open Cascade. I could easily do mesh facet base shading and mesh node base shading, but this is something else. Best regards, François.
Hello, I use open cascade version V7.4.0. When an edge is selected, the selection color differs in the following two patterns. ・ TopoDS_Wire is displayed ・ TopoDS_Edge is displayed I want to change the selection color of Edge which is child of Wire. Anyone had this problem? // Create Context m_conte
Hello, I' trying to triangulate and visualize some STEP models in the custom visualizer and I spotted an issue with normals of one specific model (model s1-tu-203 available at the https://www.cax-if.de/cax/cax_stepLib.php ). I tried to visualize the same model using CAD Assistant and the normals see
Hello, is it possible to render in frame buffer object created with QT? I'm trying to create a FBO using QOpenGLFrameBuffer object and I bind to the context. The QT openGL context is created using the native context created by OCCT. now if I check the current bound frame buffer before and after a vi
Hi, I have seen that the conversion of mouse coordinates have some problem especially in 3d. I have converted the mouse coordiantes and displayed in the statusbar. In Any planar mode, the corresponding horizontal and vertical coodinates are displayed correct but the third axis coordinate comes somet
Hi, I am fresh new using Open Cascade Technologies, as the topic says, I am trying to display an Image in an Open Cascade viewer using Qt. I have tried using the AIS_TexturedShape and other functions, unsuccessfully. My code is below, if anyone has any hint, comment, anything to help, it would be gr
Hello, Regarding the definition of the virtual camera intrinsic parameters, I wanted to know if there is any way of setting an offset for the principal point, that is, the intersection between the optical axis and image plane ( http://ksimek.github.io/2013/08/13/intrinsic/ ). Thanks in advance!
Good day. I ported the application from Linux to osx and now I get the following text in stdout. Apparently at the moment when opencascade is working out for the first time. In this case, the program works fine, apart from this message .. What could it be? MacBook-User:tools user$ zencad TKOpenGl |
Hello, With versions prior to v7.4.0 face boundary aspects used to be black. From v7.4.0 by default it's white(or light gray) and I can't change the color. I tried to call : aisObject->Attributes()->FaceBoundaryAspect()->SetColor(Quantity_NOC_BLACK); without success, "aisObject" being of type Handle
Hello everyone, I'm experiencing this issue: I've create two different AIS_Shape (see IssueOnDetection1.png) at different Z coordinate so that the upper shape partially hides the lower one. Now, looking down to these objects from above (see IssueOnDetection.png), when the mouse hovers on the upper s
Hello, I'm trying to concurrently display many custom AIS objects but I get crash at some point in AIS_InteractiveContext::Display() at line 491 "myObjects.Bind(theIObj, aStatus);" because this method doesn't seem to be thread-safe. What's the correct way to run concurrent computation of the 3D grap
I use Graphic3d_ArrayOfPolylines to draw 10,000s lines at XY plane and it works well. But when I zoom or pan, some time those lines just disappear. Here is the code. void Renderer::AddPolyLines(Handle(Graphic3d_ArrayOfPolylines) array_of_lines) { if (array_of_lines->BoundNumber() > 0) { m_PolyLineGr
Hello, From what I understand, AIS_ViewController could be use in multithread, one running the GUI and one the rendering. But as is, it is not multithread, I mean using the class as is all methods will be executed in the same thread. If I understand correctly, AIS_ViewController::FlushViewEvents() s
Hi. After I add a model to the view. What to do if you want to remove from view again?Suppose my model is added to the view as follows, TopoDS_Shape aBox; aBox=BRepPrimAPI_MakeBox(50,70,30).Shape(); Handle(AIS_Shape) AISBox=new AIS_Shape(aBox); AISBottle->SetMaterial(AISBox,Graphic3d_NOM_GOLD,Standa
I have a TopoDS_Face on XY plane to present as a platform. What I want is, when I look from above the platform, it's solid. But when I look form below the platform, it's transparent. I try the following code, it did't works Handle(AIS_Shape) m_Platform = new AIS_Shape(aTopoDS_Shape_Platform); m_Plat
In the example below, the selection of shapes in 3d-view shows some decision problems, which shape to select, when moving the mouse. pload ALL vinit restore s1.brep s1 restore s2.brep s2 vdisplay s1 s2 vsetdispmode 1 vsetcolor s1 RED vfit There is a screenshot in the attachement showing the mouse ho
Hi,everyone! My current OCC program requires moving a local coordinate in the global coordinate space and display the local coordinate origin along with its 3 axises with different colors, just like the UCS(user coordinate system) in AutoCAD. Then all the models created are located in respect to the
Hello, I'm trying upgrade open cascade version which built into my application from V6.9.1 to V7.4.0. open cascade and my application ware successfully built. But my application is crashed when use "Handle_AIS_InteractiveContext::Select" function. -------------------[source code]--------------------
i downloaded the latest 7.1.0 beta version source ocde , and i found this version repaired a lot of problems,dan boolean operation in release mode is very fast, and i found new fecture like AIS_Manipulator, and i have displayed it. it looks like gizmo in other software eg blend,solidworks.but how i
Hello everyone, I'm a newbie to this forum and more or less to OpenCascade as well. I'm working on a university project which aims to develop a basic CAD module as a preprocessor for a simulation environment. At this point we are able to draw points and lines and we are in a phase to start implement
Hi everyone, Is there anyway to create an Image_PixMap (from a .png image file stored in the file system), rotate said pixmap, and then apply the rotated pixmap it to a AIS_TexturedShape? I'm trying to find a way to rotate a texturemap before applying it to an AIS_TexturedShape.
Hi, I'm having quite the issue for some days getting the VIS classes to work my way and would greatly appreciate some directions and/or confirmation that it could be an issue with OCCT. I'm will try to keep it simple and not post walls of source code. I'm trying to get out of VIS a list of points, t
Hello, I would like to use the new class AIS_ViewController , but I can't find any sample using it. Could someone describe me was should be done in order to use this class please. I guess it should be pretty straight forward to use Best regards, François.
I'm trying to get a light weight version of Open Cascade working in a GLFW window, however I'm having an error 'pixel format is invalid'. I've followed this suggestion to create a PixelFormatDescriptor as done here https://stackoverflow.com/questions/50014602/wglcreatecontext-fails-with-error-the-pi
I tried drawexe sample : vinit vlayerline 0 300 300 300 10 it is no problem to show the linewidth 10. But when I code in my code c++ with Viewer or V3d_view. I can not let line have linewidth. I don't know which parameter can controll the display in screen to show linewidth. If anyone know about th
I'm trying to get an example I found on this forum to work. The code was quite old so I tried to adapt it to the current version OpenCascade 7.3.0. It uses wxWidgets 3.1.0 which I want to use instead of Qt because of the licensing. The problem that I have is that the code compiles with no errors (us
hello!I want transform "VTK" to "OCC" by IVtkTools, below code is how i do. IVtkOCC_Shape::Handle occShape = IVtkTools_ShapeObject::GetOccShape(srcActor); srcActor is a vtkActor object pointer .this object is no problem as i can see a entity by set this vtkActor in a scene. But what my question is w
Hi, I'm working with Qt and QOpenGLWidget, so I would like to know if the Opencascade OpenGLDriver can be used without passing the window ID (because it cause some issues in Qt) ? thanks.
Hi, my current project uses Qt for GUI purposes and integrates OpenCASCADE. However, I am unable to dump the front buffer of my V3d_View into a pixmap (using ToPixMap) or directly store them to disk using the Dump-method. I am able to reproduce the issue when running the AndroidQt sample and trying
Hi, I'm using the V3d_View::Translate(Dx, Dy, Dz) function to move the eye in the left/right and up/down direction corresponding to the user. I noticed that passing a value for the Dz parameter does not work - as in, inputting a value does nothing to the view. Is this behavior intentional? Because t
Hi, I want to visualize a STL geometry along with other OCC shapes. Currently, I archive this by loading the STL via RWStl::ReadFile and then attaching it as a triangulation to a TopoDS_Shape using the UpdateFace method. This generally works. But my STL geometry usually contains sharp edges and sinc
Using vtk/IVtkOCC_Shape to display a box, but there are many lines(iso line?) on box, is there any way to remove these lines which on box? thanks very much
Hi, I 'am a new opencascade user. I would like to draw 3d items over the opencascade rendering like a NavCube. I do the rendering like opencascade examples (with AIS) in a QOpenGLWidget. I try something like this: void CadRenderWidget::paintGL() { draw();// call Handle_V3d_View::Redraw if(m_pNavCube
Hello All, I have a STEP file attached below - ' Prototype_IS.STP ' which has a plate with some through holes on that plate. When i open that file in CAD Assistant and set Display mode to Shaded , It shows all curves and Geometry correctly - As in attached ' Shaded.PNG' . But when i set display mode
In the description of the method AIS_InteractiveContext::ShiftSelect() it's said: " Rectangle of selection; adds new detected entities into the picked list, removes the detected entities that were already stored. " In my application this method is called from mouse movement event handler. However, b
Hi, I am using OCCT 7.1 and Qt5.6. I would like to display a Widget at a specific coordinate (2d). I use a QtWidget that a i move with 2d coordinate. The position of the widget is computed from the position of an AIS_InteractiveObject displayed in the view. So i have to convert the 3d position of th
How do you set the highlight mode type of marker (TOM) for an AIS_Point entity? I can set the display marker and size, but the interactive selection shows a 'plus' marker. aisp->SetWidth(3.0); aisp->SetMarker(Aspect_TOM_BALL);
Hello I would like to draw 3D curves(polylines) using a linear gradient pattern, is it possible with OpenCascade TKV3d toolkit ? There is an example in the attachment of what I would like to do.
Hello, I'm trying to make a XCAFPrs_AISObject item half-transparent with : Handle_AIS_InteractiveContext context = ...; Handle_XCAFPrs_AISObject obj = ...; context->SetTransparency(obj, 0.5, false); context->UpdateCurrentViewer(); but this just doesn't work, the displayed shaded shape stays opaque.
Good day, I have a quick question on something I haven't seen in the OCC samples and through a quick exploration of the API. I am looking at opencascade as a replacement for another graphics engine/modeler, but I absolutely require the ability to generate 2D drawings containing a title block, multip
Hello everyone! I'm able to map textures to the different faces of a shape with the AIS_TexturedShape class and SetTextureFileName(...) . I can texture each face with a different image or the same image in all the faces of the shape. However, I would like to correctly map one big image and project i
hi, everyone! i have two demands, as follow: 1. I want to get all Shape objects in the 3d View without select those objects。 2. as the same, I want to get all the specific use-define AISInteractiveObject in the 3d View without select those AISInteractiveObject 。 i have been researched for a long tim
I would like to use OCCT with the Unreal Engine (or possibly similar Cpp-based engines). Would anyone have any advice on how this could be accomplished given that these engines have their own scene graphs and rendering pipelines? Is there a low level in OCCT where one could hope to do a reasonably h
IVtkTools_ShapePicker Pick() return number is not 0, but GetPickPosition() always return NULL, is this a bug or something need to be set? Thanks very much Author
Hello, I'm trying to visualize heatmaps in the surface of 3D models in OpenCascade 7.3.0. Unfortunately, I've been unable to properly color a model since AIS_TexturedShape, aparently, only allows to give a texture to each face and I will have a map of the whole model. I have been also testing with M
Hello How can I move my TopoDS_Shape to global coordinates? I have shape with some coordinates and I want to add this shape to my context in new position relative to some point, for example to global (0,0,0) I tried: gp_Trsf trsf; trsf.SetTransformation(gp_Ax3(gp_Pnt(0., 0., 0.), gp_Dir())); BRepBui
Hello. I have vector of TopoDS_Shape / How can I load this shapes into AIS interactive context to display them? I tried to do next: for (auto &shape : copy) { gp_Trsf trsf; trsf.SetTranslation(gp_Vec(100., 0., 0.)); shape.Location(TopLoc_Location(trsf)); Handle_AIS_InteractiveObject obj; Handle_AIS_
Hello! I have STEP file. I use C++ and MFC samples.( I try to modify Import/Export sample). I want to save selected objects and the paste in different coordinates (after the click button PASTE) I can select some objects and then I want to copy them. How can I do it? I found how to copy TopoDS_Shape
Hi everyone, I try to get the face selected in an opencascade viewer but i don't know how to do this. When I load a step I add the shape in the context and I activate the face selection like this : m_aisContext->Activate(m_aisObject, AIS_Shape::SelectionMode(TopAbs_FACE)); This woks, only the face a
I checked the sample codes , it initialize view from MFC, IOS, QT. But no sample code for simple GLFW. The benefit from GLFW is that it is light and platform independent .