Hello! I have an AIS_Animation animation and I try to implement Next or Previuos buttons user interface actions of a toolpath simulation. The animation works perfect, but at some time I like to paused it and move the tool in the next position of the toolpath depending on the current paused position.
Hello everyone, I used the following code to implement anti-aliasing, but it didn't work on Linux. Looking forward to your suggestions! mView->ChangeRenderingParams().IsAntialiasingEnabled = true; mView->ChangeRenderingParams().NbMsaaSamples = 4;
Hi how can I put text on occ screen? i am using sample qt-occ widget and I tried using QPainter (in paintEvent) to draw text. At first its fine, it draws the text but any change on screen (any dialog opened or any shape drawn) erases the text and I couldn't find a way to draw it back. Thanks for rep
Hello, The color of AIS_Triangulation seems to be combined with color of model's default material, how can I cancel this color of material to display the vertex color correctly? Looking forward to your answer.
Hi everyone, When I used V3d_View::SetBackgroundImage() under the Linux system, the background was displayed as full black (as shown in the figure). Then I added FreeImage.so file, but still could not work. How can I solve this problem? Thanks
Hi all, I am working on a project using OpenCASCADE, and I need to save the current view point (camera position) and later load it again. How can I do that in OpenCASCADE? I have tried searching for solutions, but so far, I have not found anything that addresses this specific issue. Any help would b
Hello all, how to redisplay a AIS_PointCloud after removing some points? Thank you :) Handle(SelectMgr_EntityOwner) object = objects.at(i); Handle(AIS_PointCloudOwner) pointCloudOwner = Handle(AIS_PointCloudOwner)::DownCast(object); Handle(TColStd_HPackedMapOfInteger) points = pointCloudOwner->Selec
I create a new class, which derived from AIS_InteractiveObject. Then put entities into serveral groups(Graphic3d_Group) in the class. How to hide entites in one of groups?
Hey everyone I'm trying to visualize a .3DS file with ASSIMP library. I've subclassed AIS_InteractiveObject and made my own class, AIS_Mesh . Like in the tutorial . I have parsed the ASSIMP scene to a mesh, this in the ::compute method with Graphic3d_ArrayOfTriangles for the triangles and Graphic3d_
hi, may I ask for help? I have c++ example project from Udemy.com. When I draw line, I want to add event OnClick, and display MessageBox with start and end point. How to do it? Thank you very much. // Display 2d Curves for (int i = Curves2d.Lower(); i <= Curves2d.Upper(); i++) { Handle(Geom2d_Curve)
Hello! Just as it is possible to add a series of vertex / edges using AddVertex / AddEdges, it is also possible to delete / remove this kind of them from a Graphic3d_ArrayOfPrimitives array? Thank you!
I try to read step file with opencascade, there are several ways to display the bodies in step file, but when I use TPrsStd_AISPresentation, the location of bodies will go wrong some times. AND when I use method prs->GetAIS()->SetLocalTransformation(loc) to change the location of the AIS Object of T
Hello! I got different result using SetVertexColor on an Graphic3d_ArrayOfPrimitives elements, as you can see from the pictures attached. myPArray->SetVertexColor(index, 0, 0, 1); // ok! myPArray->SetVertexColor(index, Quantity_NOC_BLUE); // the array elements are displayed in other color than blue!
Hello all, since ever (7.5,7.6,7.7) I can use raytracing and global illumination. Now, when I switch to RT or GI the application crashes. When I try to debug - no error shows up. I ran an old setup of my app which is running on multiple other machines to see if I made a programming error and it cras
Hello forum, I would like to hide a solid within an AIS_ColoredShape build with a TopoDS_CompSolid. After the solid subshape has made hidden, I would like to make it unselectable. As explained in this old post: https://dev.opencascade.org/content/display-how-hide-face-within-aiscolo... , and in the
hi, dear Open Cascade developers, I am learning OC, and try to understand some lines of code like this: void COCCViewerDoc::DisplaySketch() { if (bIs2d) { // Display 2d Curves for (int i = Curves2d.Lower(); i <= Curves2d.Upper(); i++) { Handle(Geom2d_Curve) L = Curves2d.Value(i); GetView()->DisplayC
hi, Today I try with simple example of Open Cascade 7.5 application I don't have one file: Severity Code Description Project File Line Suppression State Error C1083 Cannot open include file: 'Graphic3d_WNT.hxx': No such file or directory WindowsProject1 C:\Users\pdusp\source\repos\WindowsProject1\Wi
Hello forum, please see the attached document. I loaded into a viewer two cubes, two AIS_ColoredShape (Fig. 1) I created a composite solid, one single AIS_ColoredShape (the previous are removed from the display) (Fig. 2) I hid one of the cubes of the composite solid, acting on the AIS_ColoredDrawer
I am having a very hard time visualizing a octtree/voxel/geomtric column type geometry. Is there another CAD kernel besides OpenCASCADE that would work better? Basically, a forbiddingly vast amount of time and RAM is going in creating each voxel and gluing it with other voxel.
Hello everyone, I have two project and one of them is written with c#, for this project I use OCCTProxy. Other project is written with c++ and I have a problem with AIS_Trihedron. For c# project for width of each axis on Trihedron I use these code parts below: gnomon_->Attributes()->DatumAspect()->L
Hello everyone, I create a trihedron with code below but could not set line width of axes. Anybody knows how to set line width of axes? v3d_view_->TriedronDisplay(Aspect_TOTP_LEFT_LOWER, Quantity_NOC_BLACK, margin_rate_); Normally AIS_Trihedron has a attribute which is DatumAspect() and we can set w
I have two project which are written in c# and c++ with qt. In c# project I use OCCTProxy and animation works like a charm. But when I use same code for a sample project I mean c++ project (add link for that), does not work at all. I definitely don't understand what is the difference between them. I
I try set ais_shape color but remain orgin edge color, i use code below , it works ais_shape = new AIS_Shape(shape); ais_shape->SetTransparency(transparency); ais_shape->SetColor(color); const Handle(Prs3d_Drawer) contextDrawer = ais_shape->Attributes(); contextDrawer->SetFaceBoundaryAspect(new Prs3
Hello, I displaying an arrow in a Graphic3d_ArrayOfTriangles. Handle(Graphic3d_Structure) arrow3DStructure = new Graphic3d_Structure(myViewer()->StructureManager()); Handle(Graphic3d_Group) group = arrow3DStructure->NewGroup(); group->SetGroupPrimitivesAspect(arrowAspects()); group->AddPrimitiveArra
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
Hello everyone, I use the code below to import a STL file and to show that on view. But actually there is a difference between reel stl file and imported stl file. Generally same but looks different and imported like bad quality. So is there an opinion to get better my visualization? TCollection_Asc
Hello forum, I displayed a mesh, and activated the selection of elements. If I select some elements they are shown as in the attached picture, that is using a grey shrinked wireframe. I would like to shown the selected elements with a solid color, or in another way. How to change the default behavio
Hi everyone, I'm looking for a minimal example on how to use OCCT (7.4) for offscreen rendering onto Qt5 QML. I plan to be able to render through the Qt/QML QOpenGLFramebufferObject , which seems to be the way to go to implement such feature. The idea beeing to be able to put as many of these items
I am using occ vtk VIS services as so: IVtkOCC_Shape::Handle aShapeImpl = m_geometryShapes[anIt.Value()]; IVtk_ShapeIdList anIdSubList = m_picker->GetPickedSubShapesIds(anIt.Value(), false); vtkSmartPointer<IVtkTools_ShapeDataSource> aDataSource = vtkSmartPointer<IVtkTools_ShapeDataSource>::New(); a
Hi Forum, I established a docker, the system version show as follows: Linux version 3.10.0-1160.45.1.el7.x86_64 ( [email removed] ) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ), SMP Wed Oct 13 17:20:51 UTC 2021 CentOS Linux release 8.4.2105. The Graphicscard infomation show as follows: 00:
Now camera zoom performs like that: I track mouse pointer coordinates and camera zooms towards these coordinates const Graphic3d_Vec2d aNewPos2d = myView->Window()->ConvertPointToBacking(Graphic3d_Vec2d(theEvent->x, theEvent->y)); const Aspect_ScrollDelta aScroll(Graphic3d_Vec2i(aNewPos2d + Graphic3
I want to get the position of the center of the coordinate axis relative to the screen ( in pixels ) in order to always zoom my camera not to the center of the screen, but to the center of the coordinate axis, where my displayed model is located. Aspect_ScrollDelta takes zoom point coordinates based
Hi guys, I want to place OCC subview at some position inside the main view, but no matter how I input the V3d_View::SetWindow arguments (theCorner, theOffset, theMargins), my subview always stays at the Left-Bottom of the main view, it looks like only theSize is able to control. Do you know an alter
Hi guys, I'm trying to experience with OCC Visualization inside QtQuick, the build-in example renders OCC graphics entire window (WNT_Window), other projects using Occ/QtQuick I found do the same. Do you know how to render OCC within a area of the QtQuick application window? (ex. inside an QML Item,
I'd like to modify the Step file in the loading part. I want to change SetMaterial. bool ImportStep(const TCollection_AsciiString& theFileName) { STEPControl_Reader aReader; IFSelect_ReturnStatus aStatus = aReader.ReadFile(theFileName.ToCString()); if (aStatus == IFSelect_RetDone) { bool isFailsonly
I hope AIS_Trihedron is not deleted. I hope the AIS_Trihedron is fixed. The current code is as follows. Handle(Geom_Axis2Placement) axis = new Geom_Axis2Placement(gp::Origin(), gp::DZ(), gp::DX()); Handle(AIS_Trihedron) aisTrihedron = new AIS_Trihedron(axis); aisTrihedron->SetDatumDisplayMode(Prs3d_
Hello all, when I render CornellBox in Cad Rays the GPU load goes up to 100%. when I do the same scene in OCCT the load goes to max 25%. Is there a setting I miss to use the full potential of my GPU? Thanks!
Hello! I have a problem with camera movement inside a viewport. I want to check if the model is outside of camera view and if it is I want place the model back to camera view. Would greatly appreciate your help!
Ciao in the two attached pictures you can see what is happening when I hover the mouse on the mesh of a cube, when the mesh is a first order one, and when the mesh is second order. In particular here the mesh is all tets (4 and 10 nodes for 1st and 2nd order) If the mesh is first order the right tri
Hello all, I am really struggling with the lights. Not all properties are working in all RenderModes For example: setDirection or SetConcentration with V3d_SpotLight works with Rasterization but not with Raytracing or Globalraytracing. SetIntensity with V3d_SpotLight works with Raytracing or Globalr
Hello! I have a problem with model movement inside a viewport. Now I can move the model outside of the viewport boundaries, but I want to set a padding to the viewport for preventing the model from going to nowhere. I want always see the model inside the viewport and block moving it out of the windo
Hello All, Only when I use V3d_DirectionalLight as light source I get realistic shadows with blurring out edges. V3d_SpotLight and V3d_PositionalLight always produce sharp edges. Am I doing something wrong? Thanks, Duesentrieb
Hello, I would like to change the thickness of the lines in the wireframe view of an AIS_Shape, for example to have thicker lines. How to do that? Thanks in advance Author
Ok, everybody, please ask. When I was in version 7.4, the uneven scaling of topds_shape by gp_GTrsf was all right, but when I upgraded to version 7.6, the same operation prompted an error.
Hello, the call: anOwner->HilightWithColor(occContext->MainPrsMgr(), aDrawer, ...); in which - anOwner is a StdSelect_BRepOwner, - aDrawer is a Prs3d_Drawer - occContext my interactive context is able to highlight a subshape of a shape, in which anOwner is the owner of the subshape. In order to remo
Hello, I'um using the AIS_ViewController::PickPoint routine to identify a shape under the mouse and get it's world coordinates. The functions throws a lot of errors: *** ERROR: ASSERT in file '.../SelectMgr/SelectMgr_Frustum.lxx': Error! Failed to project box (aMaxB >= aMinB) The detection of sensit
Hi experts, I am trying to replace the WinForm host in WPF sample by WPF HwndHost, but V3d_Viewer doesn't display in the expected WPF control. I referenced this article to use HwndHost and my test project is attached. To run the test project, follow the steps below: Open the solution in VS2022. Modi
With Graphic3d_ArrayOfPrimitives I visualize measurement data coming from a 3D photogrammetry system. Some sections of the data can be invisible (in the measurement data invisible parts are coded as NAN). To handle these invisible sections, I want make the vertex from the last visible point to the n
HI :) I am developing in .net. Trihedron continues to move. I want to fix it. I'd like to change the location of Trihedron. I want to change the location of the ViewCube. code //ViewCube Handle(AIS_ViewCube) aisViewCube = new AIS_ViewCube; aisViewCube->SetBoxColor(Quantity_NOC_GRAY75); //aisViewCube
I have a custom implementation of a AIS_InteractiveObject where GL_ARRAY_BUFFER are managed directly because they're originating from an external library and copying them into Graphic3d_ArrayOfPrimitives would double the used resources (they're send through a callback and are directly uploaded to th
Hello everyone, I want a trihedron which should not be zoomed in or out, I mean, trihedron should be same size when zoom in or out. Actually I managed that with "SetTransformPersistence" but doesn't work exactly as I want. For example I give a point as (300,0,0) and will create a trihedron on this p
The trihedrom is located wrong place. Handle(AIS_Trihedron) MyCreateTrihedron(gp_Ax2 thePos) { Handle(Geom_Axis2Placement) axis = new Geom_Axis2Placement(thePos); Handle(AIS_Trihedron) anAisTrihedron = new AIS_Trihedron(axis); Handle(Graphic3d_TransformPers) trsf = new Graphic3d_TransformPers(Graphi
Hi When occt 7.6 is used with Qt viewer windows has misalignment with windows. Or the mouse pointer and marker locations are different. It does not happen with Qt 5.15.2 Attached is the screen of the sample occt viewer. (Location of mouse pointer is different from market on screen). I also compiled
Hi gentlemen, I have a display in 3D view with ViewCube. I do not understand why my ViewCube react to light activation/desactivation even with its ShadingModel is set to UNLIT. I tried to - redisplay it after light change - modify its Aspect and material but I did not find any solution I am certainl