I'm trying to remove a label with a shape from the OCAF document. The structure without any modifications is the Archived image: external image Then I'm going to remove PLATE by calling RemoveComponent on label 0:1:1:1:1. Then the structure looks like this and you can see that PLATE has moved up: Ar
Hi, I'm trying to write a STEP file and add a datum to a face. I use the following code: Handle(XCAFDoc_DimTolTool) dimTolTool = XCAFDoc_DocumentTool::DimTolTool(doc->Main()); Handle(XCAFDoc_ShapeTool) shapeTool = XCAFDoc_DocumentTool::ShapeTool(doc->Main()); TDF_Label datumLabel = dimTolTool->AddDa
Hello, I am currently working with the 7.8.2 dev C++ version and Visual Studio 2022 to extract meaningful data from STEP files and convert it into other formats. As shown in the image below, some STEP files contain a line(s) with an MEASURE_REPRESENTATION_ITEM command. I intend to extract data defin
Good morning, I'm encountering an issue with the STEPControl_Reader in my program: The program starts by creating a concurrent queue. The queue items consists of file paths. After the queue has been created, i create 16 worker threads that consume the queue items. The work each thread does, consists
Hello, I ues the sample given in the "New feature - STEP Import | User Defined Attributes", code as: Handle(TDocStd_Document) aDoc = new TDocStd_Document("MDTV-XCAF"); Standard_CString filename = "E:\WorkSpace\metadataFile.stp"; STEPCAFControl_Reader reader; reader.ReadFile(filename); if(reader.Tran
Hi All, I'm using OCCT 7.8.1 to import and tesselate STEP files. Overall everything works great, but there are a couple of files where parts of the file can't be triangulated. See the attached test.zip file for an example step file. I'm using BRepMesh_IncrementalMesh mesh (shape, 0.01, Standard_Fals
Hi, new here. I've been trying to do some format conversions based on what CAD Assistant can do. I've done some tests using the CSharp sample but I can't do the OBJ conversion as it doesn't appear in the enumeration (BREP, STEP, IGES, VRML, STL, IMAGE). Do I need to update the OCCTProxy or is the OB
Reading colours from a STEP file with GetColour returns incorrect RGB values. I use the GetColour method to read the RGB values of surfaces. However, these are not determined correctly. Here is the code and the step. Do I still have to convert the values returned by open Cascade? The following colou
I am trying to import STEP file and trying to classify 'CUT' and 'NOCUT' bodies. I have attached the step model. The issue I am facing is with reliably being able to identify those bodies. In different STEP files, different STEP entities are named as 'CUT' and 'NOCUT'. E.g. 'PRODUCT', 'NEXT_ASSEMBLY
I am trying to read a step file by colouring some faces and saving the coloured file. However, I have noticed that very often the colours are handled with PRESENTATION_STYLE_BY_CONTEXT generating compatibility problems with some software (e.g. FreeCAD, Fusion - using CAD Assistant works). Trying to
Hi there, I'm trying to import some STEP and IGES files using OCCT 7.8.0. I know the module has been redesigned. So, in my pro file (I'm using qmake) which LIBS need to be included? I'm using the official binary. I don't have TKDESTEP, TKDEOBJ, TKDEIGES, TKDEGLTF, TKDEVRML, TKDEPLY, TKDESTL in my li
Hello, I've been reading the documentation and many example from the forums, and I can not understand why the following code is failing: Handle(TDocStd_Document) new_document = new TDocStd_Document("step-caf-reader"); Handle(XCAFDoc_ShapeTool) shape_tool = XCAFDoc_DocumentTool::ShapeTool(new_documen
I'm trying to read in multiple STEP files (two in this case) and add them to an assembly shape. This function reads the file: void OccView::readModel(QString filename, TopoDS_Compound &shape) { TopoDS_Shape result; QFileInfo file(filename); if (file.suffix() == QString("step") || file.suffix() == QS
Hello, I tried getting feedback from another question I posted here, but I think it was with a wrong approach, and therefore I'm asking it in a different way: For an application that I'm developing, I need to get the coordinates of all three vertices of each triangulated face of a shape. The steps t
Good day, I am attempting to load STEP files using the STEPCAFControl_Reader class. I have a file ("KopieOrig.STEP" in the attached zip file), which has been exported from SolidWorks 2013 using the AP214 format, containing two solids. Each solid has some faces which are colored. When parsing the fil
Hi! I've been digging through an AP242 file and haven't been able to extract a certain descriptive representation item. The step file is attached, I'm looking for entity 22256: #22256=DESCRIPTIVE_REPRESENTATION_ITEM('','NOTES... I've tried traversing with the XCAFDoc_NotesTool, _ViewTool, _LayerTool
I want to use CopyWithLink and Copy in XCAF documents, but I found that they are not working. Is this a bug? Perhaps this API cannot be used in XCAF? Here is my test code,in DRAWEXE pload ALL pyclinder pin 1 10 NewDocument D XCAF XAddShape D pin NewDocument Dcopy XCAF CopyWithLink D 0:1 Dcopy0:1 Cop
I got a assembly .step file and i want save a part of them. My code: void GetAssemblyShapes(const TDF_Label& label, std::vector& vecAssemblyShapes,Handle(XCAFDoc_ShapeTool) aShapeTool){ if (XCAFDoc_ShapeTool::IsAssembly(label)) { for (const TDF_Label& child : shapeComponents(label,aShapeTool)) GetAs
I am using OCCT version 7.6.1, and after reading the STEP file, the displayed model is incorrect; it changes from a set of line segments to a polyline. I have tried setting read_precision_mode and read_precision_val, but it still doesn't work. How should I configure it to display correctly?
Hello! I am currently working on a project that requires my team and I to insert some metadata into the "extras" section of the GLTF. We were able to find a way to do this by altering the RWGltfCafWriter.cxx file but we know that's not a scalable solution. Our solution utilized the RWGltf_GltfOStrea
Hello everybody, I'm currently facing a critical issue with a simple step file in ap 242 file format, created in SolidWorks. The program crashes without any helpful error description when I try to mesh it with BRepMesh_IncrementalMesh. This problem persists with other software built on top of occt,
I am working on importing a STEP file and then exporting it back but changing their appearance using color and material. I am able to export color information for Compounds and Solids but when I try to do it for Faces it doesn't export. I have verified that the face label created has the color infor
Hi, in the example below shapes are written to STEP file and a name for the shape is set (written off the top of my head): // read shape from BREP BRep_Builder b; TopoDS_Shape aShape; BRepTools::Read(aShape, "C:/temp/shape.brep", b); // write shape to STEP STEPCAFControl_Writer aWriter; Handle(TDocS
Hello OCC Team, I have observed a significantly slower speed when using the ReadFile and Transfer functions of STEPCAFControl_Reader to read STEP files in webassembly compared to Windows. This is my code: STEPCAFControl_Reader aStepReader; aStepReader.SetColorMode(true); aStepReader.SetNameMode(true
Subject: Issue with Reading IGES File Generated by ProE Hi everyone, I'm encountering an issue with reading an IGES file that seems to have been generated by ProE. When I import the file, it appears that surfaces are also being imported as shapes, which is not what I expect. To verify this behavior,
Dear all, I'm trying to read a Step file and retrieve the correct location and colour of each of the parts. I found a snippet of code ( https://github.com/tpaviot/pythonocc-core/blob/master/src/Extend/DataExchange.py ) and implemented in my code. I'm attaching my code in text format, as the forum do
I exported a model to the step file. I use aColorTool->SetColor(aLabel,surfcolor,XCAFDoc_ColorSurf); Save solid and face color information. Then I import this step file that I use aColorTool->GetColor(aLabel,XCAFDoc_ColorSurf,surfcolor); Read solid and face color information. The weird thing is, I c
Hi I used RWObj_CafReader to read an Obj file and obtained a TopoShape. Since I want to scale the shape, I used BRepBuilderAPI_Transform. BRepBuilderAPI_Transform(aTopoShape, scalingTransform, true, true); However, executing this causes the program to crash. Do I need any additional settings? or is
Hi Usually, I read STP files using STEPCAFControl_Reader , and most of the files work without any issues. However, when I try to read the STP file from the link, the program gets stuck at the STEPCAFControl_Reader::Perform . Could the development team help investigate the issue? The STP file can be
I want to import a STEP-file using OpenCascade. The file comes from a CAD program, in which a hierarchy of components is represented, e.g., I have a root component, underneath several other components, and under those several sub-components, and so forth. With the following code, I am able to get al
Hello! I created the following function that can rotate a model and save it to step. def rotate_model(file_dir, file_name, axis): # set reader reader = STEPControl_Reader() reader.ReadFile(file_dir+file_name) reader.TransferRoots() shape = reader.OneShape() treader = reader.WS().TransferReader() top
Dear OCC Community, I hope this message finds you well. I am currently working on a project where I need to read IGES files using the Open Cascade (OCC) library. I have encountered an issue regarding the retrieval of block names from these files. Problem Description: While using OCC to read IGES fil
I have a step file with many parts in it. These parts have names, as shown in Figure 1, stored in the advanced_brep_shape_representation. But I don't know how to get the names. I used the CAD Assistant to read this file, and the result is shown in Figure 2. The CAD Assistant also couldn't read its n
I have read the STEP file and transferred it into a document. While iterating through the labels and their child labels, I used the following API to determine whether a label is an assembly or a part. XCAFDoc_ShapeTool::IsAssembly(label) However, some part labels are being treated as assemblies. Upo
Hey Everyone, We are currently testing the collision detection (COL-DET) component of Open Cascade. However, we're facing performance issues when processing large and complex .stp files; the results are taking too long to generate. Despite the collision detection component being a paid feature with
Imported the step model and display in the viewer using following code Handle(TDocStd_Document) anXdeDoc = reader->doc; Handle(AIS_InteractiveContext) theCtx = m_pAISContext; Handle(V3d_View) theView = m_pV3dView; for (XCAFPrs_DocumentExplorer aDocExp(anXdeDoc,XCAFPrs_DocumentExplorerFlags_None);aDo
I want to load an OBJ model with an MTL material, so I included the necessary headers: #include <RWObj_Material.hxx> #include <RWObj_MtlReader.hxx> But when I declare the variable: NCollection_DataMap<TCollection_AsciiString, RWObj_Material> aMaterials; RWObj_MtlReader aMtlReader(aMaterials); The co
Hi. I used "STEPCAFControl_Reader" to read a step file, but it doesn't read anything. Basic Infomation: Version: 7.8.1 Debug Information: ReadColor: true, ReadName: true, "STEPCAFControl_Reader::ReadFile" return "Ok" "STEPCAFControl_Reader::Transfer" return "true",but it output message "Microsoft C+
Hi everyone, I am reading step file using STEPCAFControl_Reader . I am able to extract all information when the file is transfered to TDocStd_Document . I am following this step STEPCAFControl_Reader reader; reader.ReadFile(FileName); reader.Transfer(TDocStd_Document doc); After the transfer, I can
I attempted to read a STEP file using STEPCAFControl_Reader, but the program crashes when I call the Transfer. My current code is as follows: Handle(XCAFApp_Application) hApp = XCAFApp_Application::GetApplication(); Handle(TDocStd_Document) hDoc; hApp->NewDocument(TCollection_ExtendedString("MDTV-CA
I have installed OpenCASCADE with Draco support and can now read compressed GLB and compressed GLTF files with BIN files. However, I am unable to read compressed GLTF files without BIN (embedded GLTF) files using the following code: RWGltf_CafReader reader; reader.Perform(gltfFile, msg); I am encoun
Hi, When I imported step files, cracks are always raised between surfaces as attached picture shows. (But, when I import the same file using other packages, such as FreeCAD, it is OK.) So, what is the reason? And what should I do?
I am using the Open CASCADE 7.7.0 version on Linux machine. I am trying to read a GLB file using the RWGltf_CafReader class, add some extra data into the model then again export the new glb model using the RWGltfCafWriter. But looks like reader is not reading the GLB model properly. I am not getting
Hello! I have been working on a Step -> GLB converter for our specific use-case. When traversing the labels, is there a unique identifier imported from the Step file that is accessible? Even tree location would be useful if it was guaranteed that each tree location was unique (no duplicates for repe
I am able export gltf with Draco compression. But I don't know about reading Draco compressed gltf file. Does open cascade support import of Draco compressed file ?
Hi,team. I`ve tried to get gd&t informations through the code below: STEPCAFControl_Reader cafReader; cafReader.SetNameMode(true); cafReader.SetGDTMode(true); IFSelect_ReturnStatus status = cafReader.ReadFile(srcPath); if (1 != status) return false; Handle(TDocStd_Document) doc = new TDocStd_Documen
Hi everyone, this is my first post. I try to scale a step object and save to another step file when i transform the shape it works but I lose the color. i try to copy the color of each face from the original to a scaled one but I receive this error: Exception caught: A null Label has no attribute. I
hi: while I imported a STEP file by OCC,compare to the text content in STEP file,there are many id of entity just like "#11=","#5="ect,the id show the topology relationship with the other entity. my question is,if can get these id information by Opencascade?is there any way to got it and as same as
Hello, We have a STEP file that has a number of SHELL_BASED_SURFACE_MODELs that each have a single face defined by extruded surfaces. When we import the file, these surface models each produce a TopoDS_Solid that is defined by a single TopoDS_Face face with no edges. Would the shape healing module r
The second surface of the attached file is a cone with two loops: #27=FACE_BOUND('',#96,.T.); ... #67=FACE_OUTER_BOUND('',#95,.T.); ... #376=ADVANCED_FACE('',(#67,#27),#356,.T.); Only one is imported, resulting in a semi infinite cone.
Hi, I'm trying to export camera animations in GLTF format. I have created a new node for camera and added all the animation information. However, when I view them in Don McCurdy's viewer, the animations aren't playing correctly. After investigating, I found out that while the interpolation data is f
I can now obtain Components through STEPCAFControl-Reader, but I cannot obtain SimpleSample included in TopAbs-COMPOUND. The hierarchical structure I want is shown in 1. png. My current code is as follows: void ProcessMesh(const Handle(XCAFDoc_ShapeTool)& ShapeTool, const Handle(XCAFDoc_ColorTool)&
Hello, hope you're doing well. Using OCC 7.8.0 to read a STEP file and performing reader.TransferRoots() is taking so long (around 27 minutes) for rounded profiles. For a tube of 6in diameter and 26ft length that has a linear pattern of 78EA 1in holes, and a circular pattern of 8 instances of the li
Hello Forum, Let's say I have a STEP file containing B-Spline BREP definitions of several solid objects. Which output file formats should I choose to get: (1) Each face of each solid written out separately as a mesh of connected triangles (2) The entire solid written out as one closed, water-tight m
I have written the Step to GLB conversion application. I have a step file with Tessellated data. The file is getting exported as GLB but the UV data is missing in it. UV data is not getting generated for tessellated geometry types. For ManifoldSolid_Brep its working. I have attached the sample file.
Hello everybody, Currently i have a simple method which creates a boxed shape and adds it to the XCAF Document. The vector parameter sets the location of the shape. This seems to work nicely. Creating the Shape bool CreateModel(Vector^ vector) { // Create Geometry BRepPrimAPI_MakeBox make(2, 2, 2);
Hi OCC community, I'm trying to import an intentionally misaligned STEP model, it is a simple angled profile (5in x 5in x 12ft) that has multiple translations and rotations from the world origin. How can I "reset" its position to align it to the global origin and axes before any subsequent operation
When I use IGESCAFControl_Reader or IGESControl_Reader to load a larger model and display it through AIS_InteractiveContext (or convert it to glb model), the circle of the original model will become a quadrilateral, the curve will become a straight line, I would like to ask if there is a solution to