Hi Guys, I have developed a CAD application in Qt using opencascade libraries. It does all the basic works like pan, rotation, zoom, scale. I have not used OCAF to build all these. Now I want to implement undo/redo option in my application. Is it necessary to do everything using OCAF or is it possib
Hello I am currently working on importing the files of stl, step, and iges and displaying them on 3d. The 3d shape has been displayed, but I don't know what to do with the edge. If you look at the cad assistant program, I want to show the boundary in display mode like wireframe or shaded with edges.
Hi, I have started a program that reads a STEP file into OCC, and allows selection, with the AIS libraries. It can select different edges and faces. I can detect the selected faces/edges, and get a ToposDS_Shape object. How to I get the original STEP ID# of the face/edge, and other similar entities?
Hi all I am writing a program that creates geometric models, with each geometric element is defined in a class which holds the parameters and also the calling functions. Therefore there are 1D and 2D arrays to be initialised every time a class instance is created. So far I managed to create NCollect
Hello. When I try to fuse shape1 and shape2, the result shape is corrupted. Is there a way around the problem? I have confirmed that shape1 and shape2 are valid shapes in the BRepAlgoAPI_Check class. [Code] BRepAlgoAPI_Fuse fuseShape( shape1, shape2 ); fuseShape.Build(); TopoDS_Shape shape3 = fuseSh
Hello. When I try to cut shape1 by shape2, the result shape is corrupted. Result shape include some TopoDS_Shell. Is there something wrong with the input shape? [Code] BRepAlgoAPI_Cut cut( shape1, shape2 ); cut.Build(); if ( cut.IsDone() == Standard_False ) { return; } TopoDS_Shape shape3 = cut.Shap
Since I have an ap242 step file with GD&T data,I load it in my document and use DimTolTool to get all GDT presentations,then with method "GetGDTPresentations" I will get a map with all GDT TopoDS_Shape,and I can show them in my visualize window.Actually the the GD&T information is define by other so
Hi, Has anyone used GTK or glade for making GUI for cascade applications? If yes can I get some help about it? I have built the basic window and controls using GTK but don't know how to integrate a cascade viewer and functionality to it. Plesae help. N. Author
Hi Bros, I get some question when use the smart pointer "Handle" of OCCT. As we know, in C++, judge null pointer can use “if(p==nullptr)”. However, in OCCT it seems not work. I can use "IsNull()" to judge some smart pointer like "Handle(TopoDS_Shape)", cause TopoDS_Shape has function "IsNull()"; but
Hi, Bros. I get a Geom_Geometry object through the Geom_BSplineSurface::Copy () function. How can I get the Geom_BSplineSurface object from the Geom_Geometry object.
Hi. I try to access the attribute of assembly tree of XDE. I can get names of assembly or component but I can't get centroid. Here is my code. Please help me. STEPCAFControl_Reader reader; IFSelect_ReturnStatus stat = reader.ReadFile("filename"); Handle(TDocStd_Document) aDoc; Handle(XCAFApp_Applica
Operator* for 2 gp_Vec instances cannot return double value. Thus, the operator has to be overloaded. Can somebody point me where it's implemented? Or is it a dot product of two vectors? Thank you in advance.
I am trying to discretize points on edges, make a plane out of them and calculate residuals. For the moment, we use the trial version of OCC java wrappers (latest dev version) until our license gets processed. I did search forum and there are posts with recommendation to use GCPnts_UniformAbscissa.
We have a research project where we need to implement certain CAD functionalities in the browser. We plan to build a chrome web app using three.js for 3d visualization. However, we also need to perform various geometric operations (e.g. loft, intersections, booleans, etc), and we therefore need a mo
Hi, I want to convert a STEP file into an STL file and then do some analysis using the data of vertices and faces of the STL mesh thus obtained. Poly_triangulation provides that data but the only way I could find to obtain Poly_Triangulation data is by using RWStl::ReadFile(). In this case, I have t
Can anyone tell me how to hide the label in the hierarchical data template that comes back when shapes are loaded? I can collapse the text block (which shows the label) in the template but when the shapes are displayed, there is some highlighting going on, which I cannot seem to turn off. Thanks.
After many tests I have come to conclusion that IVtk_IShapeMesher::Build() must be corrupting data structure when run with multiple threads. I have run tests with OMP (#pragma omp parallel for) and std::thread. What we have is a loop in which threads are created and function is being run. The meta -
Hi, I noticed an error when I used it to do some calculations with the bounding box information of a shape. result X Y Z CAD Assistant Min: -95.7296 mm, 29.6258 mm, -26.7835 mm CAS Assistant Max: 0.384177 mm, 120.021 mm, 69.2307 mm My code Min: -95.3497 30.0011 -26.4022 My code Max: 0.00350084 119.6
In previous version of opencascade I can draw shapes with visible edges with just that; myContext->DefaultDrawer()->SetFaceBoundaryDraw(true); But after I migrated to 7.4.0 it doesnt work. and I tired already those; myContext->DefaultDrawer()->SetFaceBoundaryDraw(true); myContext->DefaultDrawer()->F
Hi. I'm currently trying to use Opencascade within a Qt Application with QML in WebAssembly , and i was wondering if it was possible to achieve this. since i can't use the OpenGl_GraphicDriver->Init() method, giving me this error in the console output of Chrome : exception thrown: TypeError: Cannot
Hey guys, I need to convert some STEP-files in OBJ or OFF files. I just found this great program "CAD Assistant" that is able to do so on this website. Since I need to convert several hundreds it would take much time to convert them manually. Is there an easy way to convert the files with the comman
I'm writing a function, that will write a STEP file from a TopoDS_Shape( pic-1 ) And I'm Getting some error while running in Qt Creator(pic-2) , Also i have Included the required header file. please help me get out of the problem.
Hello, The prebuilt Windows installer comes with a set of static libraries (e.g., TKBin.lib) in addition to the dlls. I think these might be all import libraries which are used for the purposes of implicit linking with the DLLs because Visual Studio's LINK.exe is not capable of linking with PE binar
I am currently reading these books: https://www.amazon.com/Solid-Modelling-CAD-Systems-Survive/dp/0857292587 and: https://www.amazon.com/Boundary-Representation-Modelling-Techniques-Stro... And i'm researching on how CAD software like OpenCASCADE works, i'm in the part of how extrusion algorithm wor
Hello, I am using OpenCascade V7.4.0 on 32bit windows. On the AIS_InteractiveContext class, there are routines : InitSelected () MoreSelected () NextSelected () They allow to iterate the selected objects, but I don't know how to get an unselected object. Is there the corresponding function for local
I meet a problem when making the intersection of cylinder with a cone, following is the code: // make cone TopoDS_Shape box1 = BRepPrimAPI_MakeCone(100, 0, 400); // make a cylinder with a offset from X axis gp_Ax2 ax2( gp_Pnt(-10, 0, -20), gp_Dir(0, 0, 1) ); TopoDS_Shape box2 = BRepPrimAPI_MakeCylin
Hi, I've noticed that this topic has been coming up a lot, without a conclusive solution, so: Is there a unique way to determine an outwards facing face normal? I've tried GProps, SLProps, using orientation info to invert the normals, you name it. However, some faces still get culled, some don't but
Hi Friends, I have a working project using OCCT-7.5.0 and Qt-5.15.2, I am using QQuickFramebufferObject to visualize OCCT inside Qml. There are many changes in graphic stack in Qt6, but in theory, it is still possible to use OpenGL, I have updated the dependencies and i have set GraphicsApi to OpenQ
I had compiled the occt7.5 by cmake and vs2017 in window 10. There is no problem when I compile the Occt7.5. However, when I run the program written by occt7.5 and qt in the vs2017, the vs throwed the error. The vs cannot find the locate the program input point, such as these calsses: Quantity_Color
I have found that many classes have a DumpJson function. However, I can't found any example about it. Is it used to store data and command? Or is it used to implement the undo/redo funcitonarity? If so, how to use DumJson?
Hello, When writing a STEP AP203 file, the fallback value for the organization is the computer's IP address. This function segfaults, because gethostbyname returns a null pointer. https://github.com/Open-Cascade-SAS/OCCT/blob/master/src/OSD/OSD_Host.cx... OS: Linux 5.8.16 OCCT Version: 7.4.0p1 Backt
Hello, I am relatively new to OpenCASCADE and as one of my first steps I want to create a BRep file, save it and then read it again. For this I made the attached cpp file. In my example I create a tetrahedron and save the TopoDS_Shape with BRepTools::Write as a BRep file. But when I try to read it w
I met two problems when I use Qt to visualize the OCC. First, when I run the program, the QWidget can't display OCC view immediately, which bind the view of OCC. Second, when the program is exited from the debug mode, the compiler will throw the TCl_exit error(Exception thrown at 0x00000000100BF7EC
I built OCC as static libraries, and now I want to build a static binary for portability. My code is: // STEP Read Methods #include <STEPControl_Reader.hxx> #include <TopoDS_Shape.hxx> // STL Read & Write Methods #include <StlAPI_Writer.hxx> #include <BRepMesh_IncrementalMesh.hxx> // Bounding Box #i
Hi guys, I have an issue. The codes are: Handle(IGESData_IGESEntity) igesEntity = Handle(IGESData_IGESEntity)::DownCast(aList->Value(j)); if (aReader.TransferEntity(igesEntity)) TransferEntity take "const Handle(Standard_Transient)" as input argument. But the compiler complains: no suitable user-def
Hello, Context: I have solid and all of its faces have CN continuity except two faces which have C0. I need to make those C0 faces become at least C1. So, i tried to approximate surfaces of C0 faces with GeomConvert_ApproxSurface() and then make new faces of them. However, this method works not in a
Hello, when I draw an high number of points (more than 1000) my view gets very very slow when I rotate or pan. I draw the points one by one using this code: gp_Pnt pnt(f_p[0], f_p[1], f_p[2]); TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(pnt); // Create the AIS_Shape Handle(AIS_Shape) point_shape =
My aim is to convert a IGES file to STL file and I tried running the below code and I got the following output in CMD. But the conversion did not happen and the STL file was not created. How should I use this StlAPI_Writer? I also tried BRepMesh_IncrementalMesh and tried using the RWStl.hxx to write
I am trying to convert STP to glTF and it is writing bin file but not writing json file. Here is my code const TCollection_AsciiString aFilename = toAsciiString(theFileName); const TCollection_AsciiString oFilename = toAsciiString("collar-assembly_asm"); Handle(TopTools_HSequenceOfShape) aHSequenceO
Here is my Code Snippet : #include <StepControl_Reader.hxx> #include <XSControl.hxx> int main() { STEPControl_Reader reader; return 0;} But I get : Error LNK2001 unresolved external symbol "public: virtual int __cdecl XSControl_Reader::NbRootsForTransfer(void)" (?NbRootsForTransfer@XSControl_Reader@
Hello everyone, I do not know if you have encountered this problem. When I use BRepOffsetAPI_MakeOffset of occt 7.4.0, I hope to achieve the effect of Figure 1: Select a closed wire frame (the wire) of a face on the model, call the BRepOffsetAPI_MakeOffset interface, and generate an offset line of i
Hello everyone, I do not know if you have encountered this situation? BRepOffsetAPI_MakePipeShell from a spine of bsplinecurve and a profile of circle, but strange results appeared. See Figure 1 and Figure 2 specifically. I don't know how to eliminate this problem. In addition, but if the spine is a
I am trying to integrate the use of BRepOffsetAPI_MakeOffsetShape , but it fails most of the times even in simple shapes. The attached example is a box sliced with a plane (not parallel to the coordinate planes) and I want to offset with 1mm. I tried all the combinations, but with no luck. What is w
I am trying to import the IGES file and then want to iterate through each face to get correct face normal. But I am getting wrong normals for the face.Here is the steps which I am following. 1.Read IGES using IGESControl_Reader 2.Sew the body using BRepBuilderAPI_Sewing 3.Try to repair the shape usi
Hello, I'm using OpenCascade within a .Net wrapper and I noticed that AIS_InteractiveContext MoveTo is detecting objects when the point is actually over a part of the object that is clipped by a ClipPlane. I can handle this locally by checking the world point against the Clip plane's half-space, but
Hello everyone, I want to select an edge or a face of a solid. My code is below: void setFilter() { Handle(StdSelect_ShapeTypeFilter) solidFilter = new StdSelect_ShapeTypeFilter(TopAbs_SOLID); Handle(StdSelect_FaceFilter) faceFilter = new StdSelect_FaceFilter(StdSelect_AnyFace); Handle(StdSelect_Edg
I can get (x, y, z) via gp_Pnt ConvertClickToCoordinate(int x, int y, Handle(V3D_View) aView) when using Projection_Orthographic projection type. But the result is wrong when using Projection_Perspective projection type. Anyone there has any idea to fix it?
Hi, I have an issue that I have been trying to get to work without success. I want to put a camera inside a box so I can see the inside of it, let's say the box is 1000x1000x1000 and I want to place the camera at 500x500x500, how can I do that? I use the class Graphic3d_Camera: from OCC.Display.Simp
Hello, I'm having difficulties in compiling my program. My compiler output: In file included from ../src/STEPModel.cpp:19: /opt/local/include/opencascade/STEPCAFControl_Writer.hxx:236:3: error: unknown type name 'NCollection_Vector' NCollection_Vector<Handle(StepRepr_RepresentationItem)> myGDTAnnota
Hi folks, I'm totally struggling with an apparently very simple task : create a cylindrical topological face. For testing purposes, I'm trying to build a cylindrical face from a cylinder centered on (0, 0, 0) and directed to +Z, and 4 edges delimiting the face to the 0..Pi/2 quadrant from Z = 0 to Z
My test script: $ cat test pload MODELING VISUALIZATION vertex A 0 0 0 vertex B 0 0 25 vertex C 0 0 0 vertex D 0 0 5 edge e1 A B edge e2 C D wire w1 e1 e2 revol s1 w1 -5 5 0 0 0 1 360 vdisplay s1 vfit When I run it from interactive session with "source test" it works fine. When I fur it from command
I wonder if its possible to retreive a list of all triangulated vertices without duplicates for shapes. I'm using "BRepMesh_IncrementalMesh" to mesh my shapes and can access and get the vertices per face using "BRep_Tool::Triangulation(aFace, aLoc)". Hhowever, if I want a list of all vertices (witho
Hello. I use OpenCascade V7.4.0 for windows 32bit. I am trying to get the cut part of two shapes according to the code but it crashes app. TopoDS_Shape base; BRep_Builder bb1; BRepTools::Read( base, "C:/@test/base.brep", bb1 ); TopoDS_Shape cutter; BRep_Builder bb2; BRepTools::Read( cutter, "C:/@tes
This is part of my code, and I got some wrong normal directions by use BRepLProp_SLProps, Can you give me some advice?thanks a lot for (faceExplorer.Init(aShape, TopAbs_FACE); faceExplorer.More(); faceExplorer.Next()) { TopLoc_Location loc ; TopoDS_Face aFace = TopoDS::Face(faceExplorer.Current());
Hi, Can someone please help me to understand exactly how the AIS_Dimension and Relation is used to display the dimensions of objects. I have tried by the documentation but am unsuccessful yet in displaying dimensions. Some example code will be more helpful. Please help. N. Sharjith
Hello forum, A subshape of a shape can be made hidden. Is it possible to make that subshape unselectable (transparent to the highlight and selection mechanism)? Thanks in advance Author