Hello, I updated to the latest master branch, and am trying to save STEP files as GLTF, which would would include the edges (as was implemented here ). The way I'm doing this is by opening the document, meshing with BRepMesh_IncrementalMesh , then saving with RWGltf_CafWriter::Perform . I tried open
I imported a simple STEP (KUKA Robot) using OCCT7.9.0, but it takes at least ten minutes each time, and sometimes the memory exceeds ten gigabytes. According to research, OCCT can fix the iteration problem caused by shape, but I use DE_ShapeFixParameters fixParams = DESTEP_Parameters::GetDefaultShap
Hello Everyone: I am encountering a problem when reading geometric tolerances from STEP AP242 files that were exported from Siemens NX or NIST (stepmod) using OCCT 7.9. Environment: OCCT version: 7.9 (also tested with 7.8.0, same behavior) Input files: STEP AP242 files containing GD&T (Geometric Dim
I am loading xml files to be displayed in the screen. The xml defines shapes and colors, so for creating the object, I am using a TopoDS_Compound and an AIS_ColoredShape so each part of the shape can be displayed in a different color. Also, I'm trying to use OCAF for displaying a complex structure a
Hello everyone, When using OCCT to read a STEP242 file exported from NX, how can I obtain information about the dimension arrow types, annotation positions, etc.? I used the following code to read the file but only managed to extract the dimension type and value. XCAFDimTolObjects_DimensionObject do
I am using OCAF and have written a class that inherits from TDF_Attribute. I want to make it persistent (save it to an XML file). I have also written a class that inherits from XmlMDF_ADriver. I am using XmlXCAFDrivers::DefineFormat(mApplication) to register the format, but it doesn't work. How can
Hello everyone,I am working on exporting STEP files based on OCCT. After using STEPCAFControl_Writer to export PMI data, the exported file only contains semantic PMI but no presentation PMI. Why is this happening? Could it be due to incorrect parameter settings, missing code for exporting presentati
this is code in .\samples\OCCTOverview\code\OcafSamples.cxx in the repository // Get the TPrsStd_AISPresentation of the new box TNaming_NamedShape Handle(TPrsStd_AISPresentation) anAisPresentation = TPrsStd_AISPresentation::Set(aLabel, TNaming_NamedShape::GetID()); // Display it anAisPresentation->D
I have two solids that were processed with BRepAlgoAPI_MakeConnected. After the operation, some of their faces should be topologically identical—i.e., they should compare as IsEqual (or at least IsSame). However, when I serialize each solid separately using BRepTools::Write and then deserialize them
AI and some googling told me that the color space in a XmlXCAF file is sRGB. But it seems not align with what I observed. I used CadQuery-OCP to create a simple box and saved it to a XmlXCAF file with a name and a color assigned to the box. box = BRepPrimAPI_MakeBox(10, 10, 10).Shape() theColor = Qu
Hi everyone, I’m new to the OCCT community, so this is probably a dumb question, but I’m running into a puzzling issue. We have a C++ script that generates an XML/XCAF document from a STEP file. When we read back this XML in C++, everything works fine — the document has 1 free shape as expected. How
Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplication(); Handle(TDocStd_Document) anXCAFDoc; anApp->NewDocument("MDTV-XCAF", anXCAFDoc); RWObj_CafReader aReader; aReader.SetDocument(anXCAFDoc); Message_ProgressRange pr; aReader.Perform(filename.c_str(), pr); i have this part of cod
Hello, When I imported the vrml model, I obtain a mirror of the model. And you can see that the letters are in the opposite direction. I don't know how to solve this problem. Do you have any good suggestions? Here's my code to import vrml file: Handle(TDocStd_Application) m_app; Handle(TDocStd_Docum
I’m working with a VRML model and ran into an import issue using Open Cascade 7.7. My VRML file contains data like this: ``` MaterialBinding { value PER_FACE_INDEXED } Material { ambientColor [ 0.752941 0.752941 0.752941 ] diffuseColor [ 0.752941 0.752941 0.752941 ] emissiveColor [ 0.158118 0.158118
Hello, I'm trying to export multiple elements (points, curves, surfaces) with a single product in the file, but I'm having trouble to achieve it. This type of hierarchy is possible since I have a sample file, saved by 3DExperience, that has this specific structure. I can read the target file and re-
I’m using OpenCascade.js in a Node.js project to read a single-part STEP file and extract its bounding box, faces, and vertices. The issue I’m facing is that the STEP file reading — particularly the TransferRoots() call — is taking a very long time. Here is my code const fileStats = fs.statSync(step
I had very large a STEP file(64MB) to be loaded to a TopoDS shape and the loading took more than 6 hours. Anything I can do to improve it? The code I used: Archived image: external image
chrono pload ALL NewDocument d XCAF ReadIges d "e:/old file/e/test/false_circle2.igs" DFBrowse d XShow d vsetdispmode 1 vfit When using the above script to load IGES, the small facets in the box become circular surfaces (missing the small facet part), and loading in CAD Assistant is not a problem, C
Hi everyone, I am encountering a read access violation error in the STEPCAFControl_Reader class, specifically within the ReadStream() method. My application reads a large number of STEP files (up to 50,000) using multiple concurrent threads. Each thread uses STEPCAFControl_Reader to read files via t
I managed to use the DE_Wrapper-Sample (https://github.com/dpasukhi/DE_Wrapper-Sample) in Windows perfectly, but in Linux I get an error with library loading. As far as I understood, the tool expects OpenCASCADE libraries to be named like TKDESTEP.so, TKDEIGES.so, etc., but on Linux they're installe
Hola~ Not sure if this is the right place, but I am reading a STEP file and an XCAF document. I then use the XCAFPrs_DocumentExplorer and convert the node names from OCCT structures to std::string: for( XCAFPrs_DocumentExplorer i(anXdeDoc, XCAFPrs_DocumentExplorerFlags_None); i.More(); i.Next()) { c
I have been trying to build an Assimp mesh from a STEP file using the XCAF framework. Despite trying various methods to retrieve the colours, I am unable to obtain all the colours. What is the possible way to make sure that all faces are getting the colours correctly? I have attached the source code
Hello, I'm currently looking for a way to add some data to my STEP export, that could fall under the "Metadata" category of info as displayed by CAD Assistant. I've tried some descriptive entities from AP 203 at first like PROPERTY_DEFINITION or GENERAL_PROPERTY , as a way to describe a bit more the
Hello, I was trying to reuse the same step file reader to read a second file. Surely the simplest would be to create individual readers but I'm curious if it is possible to reuse the same reader. This code throws at the second .TransferRoots(): // Read part1 and part2 STEP files STEPControl_Reader r
Hey, I'm making an application where you can import a STEP file, make modifications by removing labels and shapes and then save it back to a STEP file again. At the moment of saving I'm doing all the required modifications to the document using OCAF. The problem with that is that the original docume
Hello, I have an application that creates step files with productnames: std::ostringstream outputStream; STEPControl_Writer writer; Interface_Static::SetCVal("write.step.product.name", productName.c_str()); IFSelect_ReturnStatus transferStatus = writer.Transfer(shape, STEPControl_AsIs); if (transfer
Good day, The attached step file contains a face made from a truncated Cone surface. It was originally part of a much larger and complex model. We are developing a software using OpenCascade 7.8.0, and when loading the model, we find that this face has a null triangulation. Our code loads the file u
I wrote a demo according to WriteObj function. But it exits at RWObj_CafWriter.Perform() No errors are indicated. #include <TDocStd_Document.hxx> #include <TDocStd_Application.hxx> #include <DDocStd.hxx> #include <STEPCAFControl_Reader.hxx> #include <TColStd_IndexedDataMapOfStringString.hxx> #includ
Hello, I have a rather simple task of reading STEP file and sending it to another application (console application, cmake). The code was written using existing examples and works fine. With Windows there are no errors, all memory is released and VS profiler and ASAN shows no leaks. But when i build
When I export a STEP file with PMI data there is still something missing. The NIST step viewer and Autodesk Inventor don't seem to recognize the PMI data. If I load the exported STEP with my own code and try to find the relevant labels and attributes everything seems to be there. The only thing I th
I am trying to leverage the argument of the method Standard_Boolean Transfer (const Handle(TDocStd_Document)& doc, const Message_ProgressRange& theProgress = Message_ProgressRange()); to show a simple console-based progress output. I am not able to get any understandable documentation of the correct
Hello, I'm trying to load a step file, print its structure and show each componet / solids name and depth in the structure tree, along with the RGB value of any solids. https://unlimited3d.wordpress.com/2022/09/09/colored-step-model-in-occt-... Using this turorial which explaines things well. This t
I have the following code two create a shape and adding a dimension measurement to it: Standard_CString fname("somefile.step"); // create shape TopoDS_Shape box1 = BRepPrimAPI_MakeBox(100.0, 100.0, 50.0).Shape(); // Base box TopoDS_Shape box2 = BRepPrimAPI_MakeBox(gp_Pnt(100.0, 50.0, 0.0), 50.0, 100
I'm new to OpenCascade. I have a vtkPolyData generated by drawing over an STL surface, where only the inner region of the drawn area is preserved (the outer portion is removed). Now, using this vtkPolyData as input, I want to create a thickened, solid (non-hollow) 3D object using OpenCascade. The re
Hey, everybody! I am new to OCCT and just starting out. I am writing a node to import step file into Houdini. And there are some problems when working with XCAF Houdini doesn't want to accept the code where XCAFApp_Application::GetApplication() is initialized - it just won't load my dll. So it was d
Hi, everybody. Another misunderstanding of how it all works ( I'm using STEPCAFControl_Reader, and I want to use a specific XDE Label or TopoDS_Shape to find the associated StepGeom_Axis2Placement3d from a STEP file. I don't understand how to do it, if it is possible at all. If you look in the step
When importing the attached STEP file using the following code, I encountered this error message. Neither FreeCAD nor CAD Assistant could import it correctly. However, strangely, some other CAD software (unrelated to OCC) managed to import it without issues. What could be the reason for this, and ho
Hi everyone, I'm working on converting STEP files to multiple GLB files using OCCT. One of my STEP files is extremely large (around 9GB), and my current machine isn't powerful enough to load the entire file at once. Is there any way to load only parts of the STEP file, such as specific sub assemblie
Hi. When making a sphere and coloring it, and then performing transformations (such as translation), the color will be lost. I have written a complete and executable minimal example program to reproduce this problem: #include <TDocStd_Document.hxx> #include <STEPCAFControl_Writer.hxx> #include <Inte
ok, apologies up front: I'm still figuring out OCCT and I'm probably being stupid... I'm trying to import and display an OBJ file, but failing at the first hurdle: Q1. ----- Do I use: 1. XDE 2. RWObj::ReadFile() 3. RWObj_Reader class? (using 7.8, aiming for latest-and-greatest support) Q2. ----- I'v
I am trying to use OCCT's function mechanism to achieve real-time updates for parametric modeling. To start, I wrote a simple demo, but during the output testing of the demo, I found that regardless of whether I modified the attributes of an Attribute in a Label, the output information always showed
Hi. How can I set an optimized memory manager in the Visual Studio environment? What I tried is adding "MMGT_OPT=1" in the preprocessor definition. But it does not make any difference in terms of performance when importing a super big STEP file (over 1GB). Should I add something inside the codes? Th
Hello. I've got an issue importing a STeP model that I unfortunately cannot share. OC keeps consuming more and more memory until it's killed (aroung 40GB or so). I tried debugging it and I see the problem arises in the function CreateSolids (ShapeFix_Solid.cxx, line 248 in version 7.8.1). The code i
I get the Datum Objects using the following code: ... cout << "***** Datum List *****" << endl; TDF_LabelSequence datSeq; dimTolTool->GetDatumLabels(datSeq); for (Standard_Integer idx = datSeq.Lower(); idx < datSeq.Upper(); idx++) { TDF_Label lab = datSeq.Value(idx); Handle(XCAFDoc_Datum) dat; if (l
Hello Everyone: When I read the step file, What I got just like picture 1; What CAD Assistant got just like picture 2; there are two differences between the shapes I get and those obtained by the CAD Assistant: 1. There's an extra piece in the shape. Just like picture 3; 2. A solid reads and becomes
When using RWGltf_Writer , I am able to export glb files that contain one mesh entity per BREP face in my CAD models; however, it seems there is no support for encoding discretized BREP edges in the glb export, nor support for encoding vertices from the CAD models, despite the capability by the file
Hi everyone, I'm converting STEP files to GLB using OpenCascade. However, I’m encountering a segmentation fault during conversion with certain STEP files. However, if I open the problematic STEP file in CAD Assistant and then re-export it, the resulting file converts without any issues. I ran gdb an
I have two qustions here I have set the UV for the shape, but it didnt work in the final glb file Is there any way to set textureMap for gltf, like what I do in Compute() by Graphic3d_Texture2Dplane. such as set texture Rotaion export gltf #include <AIS_TexturedShape.hxx> #include <RWGltf_CafWriter.
Hi all, I guess its a common question and ive seen some posts on the topic, but i am wondering whats better to use for the specific purpose of building a CAD/CAM application. Basically we will have some CAD tools so the user can: cover holes, repair breps, remove features (chamfers, holes...) and cr
I successfully integrated OCCT 7.9 to Unreal Engine 5 . My goal is implementing runtime STEP and IGES importer . But it can't be done in a short time (collision, materials, hierarchy). So, if I can convert STEP to GLB, it will solve our problems in short term beacuse UE5 has very powerfull GLB runti
Hello Community, I am trying to get a precise Oriented Bounding Box of a model I imported. The model i am working with has a rectangular base. The problem i am facing is that the OBB seems to be slightly rotated, making it a little larger than it should be and the Directions off by a few degrees in
Hello everyone, I use the STEPCAFControl_Reader class to read the step file, I can read the size and tolerance information, but I can't read the roughness information, please have any way to read the roughness information and comment information
I'm using the current master branch (d419776). After the fixes with Jemalloc and missing headers I am now able to build correctly. Running my application now mostly works, except for it crashing when it exits. I'm getting an assertion error on the Standard_Type destructor: Standard_Type::~Standard_T
After sucessfull reading a IGES file, my application crashes on cleaning up. Environment: Visual Studio 2022 Version 17.9.2 OCCT via vcpkg Windows 11 compiled with cpplatest Usage, IGESControl_Reader myIgesReader; myIgesReader.ReadFile ("c:\\temp\\filge.igs"); Crash in Standard_Type.cxx Standard_Typ
How do I disable the output generated by STEPCAFControl_Writer.Write(<filepath>)? The output I am referring to looks like... ******************************************************************* ****** Statistics on Transfer (Write) ****** **************************************************************
I want to write edges in to step file to so that when the file is read, they are read as edges and not compound shapes. This shows up in the hierarchy. Attached (desired.png) the desired hierarchy - Currently, I am writing it like this - BRep_Builder builder; TopoDS_Compound compound; builder.MakeCo
Hi, I'm highly interested in Parasolid Import Component. I filled the form under "Contact Sales" here: https://www.opencascade.com/components/parasolid-import-component/ and few weeks have passed without any reply. Should I assume that this is no longer available?