Hi, I am using OCAF and I am creating documents with attributes of our own types and our own presentation drivers. Some of these presentations are very costly to compute. Therefore the user may decide to hide them when storing the document. It is expected that during retrieval the presentations of h
Hello, I'm having some issues loading a STEP file with OC 7.3.0. My program crashes when calling TransferRoot(). In debug mode, I get a "Fail : Exeption is raised" message, and the program aborts with no crash, but nothing gets loaded. In release mode, however, the STEP file does load on the first t
hi, every one, I Ihave some questions to ask you guys! I use OCAF to read Igs File, some problem occured when i get the name of TDF_Label. if aLabel is not Assembly,the name can Get correctly, if aLabel is subLabel, the name get is display like "=>[0:1:1:5]", so I am confused, hope someone can help
Can anyone point me into the right direction how to read the measurement units and the accuracy specified in a STEP file that is specified within the STEP that is generated with a CAD package like Creo? #644=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-2),#638,'closure', #638=(LENGTH_UNIT()NAMED
HI. I'm using OCC 6.2 .net wrapper. My goal is to load a STEP file and split it into several STEP with model structure. The problem is that i don't know how to get the original part names: The model structure is ok but all names changed in : "Open CASCADE STEP translator 6.2 8 xxxx" . Here is the su
Greetings, I'm currently reading an stl file with: RWStl::ReadAscii(OSD_Path(stlfilepath.c_str())); In my Stl file, each facet is described by three poitns and a normal: facet normal 0.000000e+00 -0.000000e+00 -1.000000e+00 outer loop vertex 3.838308e-02 4.185656e-04 -9.486067e-02 vertex 3.838923e-0
Hello, I'm trying to load the (geometric) validation properties associated to a STEP model (as1-oc-214.stp form cax-if.org) with STEPCAFControl_Reader. I made sure to call SetPropsMode(true) on the reader object, but at the end no validation properties were loaded. After some debugging it appears th
hi, all! I try to get the color of shapes by OCAF, but it seems the function GetColor in XCAFDoc_ColorTool can not work? In addition, is there any other way to get the related color of a shape? The following code: --------------------------------------------------- Standard_CString strFileName = T2A
Suppose I have a solid which is stored as an attribute to a label, directly below to the root in an OCAF hierarchy. I would like to assign attributes to the solid's faces and edges. I do not think I can store the sub-shapes in a proper tree hierarchy, as in solid --> shell --> face --> wire --> edge
What is the process to read a point cloud in opencascade. I found out I could use the AIS_pointcloud class to process point clouds but I dont see any method that could help me read a file in it.
I have put together a minimal example of exporting a single shape to a step file and it works fine. However, when I try to export an assembly, the resulting step file is empty. See attached example. I'm using OCCT 7.2. Any idea of what I'm missing? int main() { Handle(XCAFApp_Application) hApp = XCA
I have been trying to process STL files but I cannot find any STLMesh folder in openCascade 7.2.0. I wanted to use the StlMesh_Mesh.hxx. I want to know where have they moved the functions in the hxx file to?
Hello all, I am new to this forum and am trying to learn the STEP File format. I hope someone here can help. I am trying to understand the B_SPLINE_CURVE_WITH_KNOTS STEP Entity of the form ".POLYLINE_FORM.". I am building my own parser with Java and am not sure about the image the input STEP File is
Hi all, I am converting files from IGES/STEP to STL. With 6.6.0 all works well. With 7.2.0 I have added the BRepMesh_IncrementalMesh() method to triangulate the shapes before writing them. const Standard_Real aLinearDeflection = 0.1; if (BRepTools::Triangulation(aShape, aLinearDeflection) == false)
Hi, I am using the 7.2 version for my application ported from release 6.6.0. I have problem with export of vrml and stl file. The code is the same as the ImportExport sample, but when I try to export an vrml file i get an empty file(only header) and with export of stl the app crashes. Have any one t
I am new to openCascade and I m trying to convert a point cloud into a .STEP file format. I have realized that a point cloud cannot be converted directly into a STEP file. So I am trying to convert a point cloud into an STL file first and then proceed on to converting the STL into STEP. Could you pl
I am trying to convert a given input STEP file into an STL file format. I am using the following code to do the conversion process: // STEP Read Methods #include "STEPControl_Reader.hxx" #include <TopoDS_Shape.hxx> // STL Read & Write Methods #include <StlAPI_Writer.hxx> int step2stl(char *in, char
Hi, I would like to convert STEP file to SAT data, for that I read STEP and store shape into SAT. But for some step file the SAT is not readable by external applications like Autocad. See the following files.
Good Morning, I am still experiencing problem with fsd files written by the following code: Handle(StdStorage_Data) data = new StdStorage_Data(); .....adding a few roots to data ... NCollection_Handle<Storage_BaseDriver> fileDriver(new FSD_File()); fileDriver->Open(TCollection_ExtendedString(fileNam
When adding a shape to the XCAFDoc_ShapeTool using NewShape, the newly created label has a Tag of 0. How can I have a generated tag for this label? Or is there another way to identify this label, so I can retrieve it later? (say the shapes name are populating a tree view, normally I need to store so
Hi, I'm trying to save a document with some data in it and it fails. Handle(XCAFApp_Application) anApp = wxGetApp().GetOCCApp(); Handle(TDocStd_Document) aDoc; anApp->GetDocument(1,aDoc); TCollection_ExtendedString theStatusMessage; aDoc->ChangeStorageFormat(TCollection_ExtendedString("XmlXCAF")); P
Hi all, I wanted to know if OpenCascade supports saving a compsolid object to a file. I made a compsolid from two solids which are the result of slicing a tetrahedron with a plane using BOPAlgo_MakerVolume (I understand that the result is a compound, but I extracted the solids from it), and tried to
Hi, I have a label (associated with a shape) which I give a name. I'd like to attach more than one integer to the label, each having a specific purpose of course, and I'd like to have a name associated with the integer so I can retrieve it by name later. This is how I put a name for the label: TData
I found example to create document and add shapes structure to it: Handle(XCAFApp_Application) anApp = wxGetApp().GetOCCApp(); Handle(TDocStd_Document) aDoc; anApp->NewDocument ("XmlXCAF", aDoc); Handle (XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(aDoc->Main()); TDF_Label aLabel
In our project, would like to export a list of named points so that they are readable by "standard CAD software". In particular, we have a list of points like "Point Kevin" : (1, 2, 3) "Point John" : (3, 4, 5) ... that we want to export to a STEP file. See below for the code we have come up with so
With OCC 6.9.1 I was using the function "void MwOCAF::setMissingNames(TDF_Label root))" (code shown in the last part of this message) to assign names (taken from shape types) to OCAF labels without a yet assigned name attribute. But this function does not work any more with OCC 7.2. The problem occu
The condition at line 10 of the annexed c++ code: 10: if(nameAtt->ID().IsSame(TDataStd_Name::GetID())) evaluates to true if the code is built with OCC 6.9.1 while it evaluates to false if the code is built with OCC 7.2.0 The second result is wrong and because of that the following function (which is
Hello everyone, I have a query regarding handling undos and redos for custom defined attributes. I have defined my own attributes classes that inherit from TDF_Attribute class. My question is does the OCAF framework offers a possibility to handle undos and redos if the data contained in my custom de
I'm trying to export geometry & basic metadata from our software package to STEP. I know I need to use XDE in order to pass assemblies, colors, and layers. I'm quite familiar with converting data between different file formats, but I'm not at all familiar with XDE. I've been reading the user guide f
Hello, Which is the best way to deal with assemblies? I would need to import an assembly from a STEP file and then be able to choose which part or parts I want to work with. As an example, imagine that I want to show an assembly sequence. First, I would like to display only the main element of the a
I tried to load structured model from STEP file and get names of its parts using STEPCAFControl_Reader. But I have a problem. Real structure of the model has root, root's children and some root's children have their own children. When I use assembly->GetFreeShapes(freeShapes); and decompose model in
Hello, I have started to to upgrade my "EmCAD" code to OCC 7.2.0. Having the need to read legacy files written with old Storage_ShapeSchema format I have followed the related instructions on the official documentation and here is a code snippet from my file "InputOutput.cpp": Handle(StdStorage_Data)
Hi All, I am using OCCT with Qt on Linux. I am trying read STEP file, but unable to do so. I have tried STEPControl_Reader Reader; Reader.ReadFile(;valve.stp;); Reader.TransferRoots(); TopoDS_Shape shape = Reader.OneShape(); and Standard_Integer main() { STEPControl_Reader reader; Reader.ReadFile(;v
Hi everybody. My goal is to make a valid DIN4003 step export of a milling tool. The tool exists of one compound which holds 2 solid for CUT and NOCUT layers. I implemented this via the TopoDS_Shape classes. Both TopoDS_Shape and the step output works fine. But to make it DIN4003 compliant i need to
I am converting STEP files to STL using, among other helper functions, the BRepMesh_IncrementalMesh function from OCC. I've performed the conversion from STEP to STL using version 6.8.0 and version 6.9.1. For shapes like cube and tetrahedron, the conversion generates the same number of STL triangles
Hello, I got great help from this forum before. Thank you! We are using Open CASCADE to read step files. I followed the samples from OCCT and was able to read in good STEP files. However, I also need to deal with the case that the user is providing corrupted STEP files. Right now, it just crashes at
Hi, I am using OCCT 7.1.0. Based on the release notes of 6.8.0 unicode file path should be supported, however, I cannot get it work. STEPControl_Reader aReader; //teststr std::string which is converted from std::basic_string<char16_t> using UTF-8 encoding. IFSelect_ReturnStatus status = aReader.Read
Hello, I'm working with a large project that is using Occ 6.9.0. I need to write out triangular meshes as STEP files. The meshes are just collections of vertices and vertex indices as would be used in an OpenGL render buffer. I've tried the following, incomplete, code which gets a wireframe STEP fil
I've read the forum posts about extracting entity names from STEP files, and the code posted works. I've got a slightly different problem. When I find an entity that describes a STEP file, I need to know the name of the product that contains it. Is there a way, given an entity, to find the product t
Hi everyone! I use the Creo Parametric software for saved 3D model in STEP file. 3D model have some annotation( dimension and geometry dimension ) and this information saved in STEP file. I try to find any syntax for exploration annotation and find all annotation in STEP file. Can anybody help me? T
Hello everyone, I have been struggling with a very basic task for quite a while. I would like to import a STEP file such as the one from here https://github.com/stepcode/stepcode/blob/master/data/ap214e3/as1-oc-214.stp , triangulate each of its parts and save it in a separate STL file. Minimal (not
Hi Forum, I actually try to import mesh data out of a step file. The task is to convert the step geometry to an internal format which can be used for some visualization. Beside the tesselation I need a possibility to read the density information of the step file. I the code which is attached to this
I'm relatively new to both OCCT and the STEP file format. We're investigating whether or not OCCT's STEP support is sufficient for our needs. I've managed to write code in C++ to read & write simple shape geometry to/from a STEP file. However, I can't find any way to deal with all the other metadata
Hi, I facing issue in writing step file with unit system. I use mm, m, cm it is working property, if i use FOOT then the step file is writing in default unit MM. I using the following syntax to write the unit Interface_Static::SetCVal("write.step.unit", "FOOT");
Today I was surprised to find the following comment within TDF_AttributeIterator.hxx: // DO NOT USE THIS CLASS WITHOUT AUTHORIZATION! // // This class provides a way to iterates on the // up-to-date (current) valid attributes of a label. // // Even a Forgotten attribute may be found if this // optio
Hi, I have been using OCAF for quite a long time with own specific attributes that I have created by subclassing TDF_Attribute. For these attributes I have created attribute drivers by subclassing BinMDF_ADriver. But what about changes in the data model? Attributes of some newer document versions ma
Hello everyone, is it possible to specify what will be written on the first line of an STL file? When I run TopoDS_Shape shape; // (Get the shape from an assembly...) BRepMesh_IncrementalMesh BMesh(shape, 0.1, Standard_True); STLwriter.Write(shape,filename); the first line of the STL file says " sol
Please if anyone could guide how to import step file in openCascade and display with exact colors defined in step file. Its urgent. Thanks in advance :)
I have a situation in which I go through the following steps: Create a Box using BRepPrimAPI_MakeBox Add the Box and all the Faces to the Data Framework using TNaming_Builder::Generated() Select Edge 3 on the Box using TNaming_Selector::Select with the Box as the Context Shape Fillet Edge 3 on the B
hi , as described in the title of the topic , i am looking for a way to save an Axis system ( Trihedron ) in my OCAF binary i tried to find an ATTRIBUTE for storing that but noway , my last try was like this : Handle(XCAFDoc_Datum) AttribDatum = XCAFDoc_Datum::Set(Label); Handle(XCAFDimTolObjects_Da
I'm fairly new to CAD/OCCT, working on an importer using XSControl_Reader. For some igs/stp files, I get a report that there is a number of "unknown entities" when reading the file. The documentation is clear that unknown entities do not constitute an error or erroneous entities. So I'm wondering wh
Hi, I would like to store an OCAF document into a path containing a German special character. My code looks like that: _____ TCollection_ExtendedString pathString (path.c_str(), Standard_True); PCDM_StoreStatus status = application->SaveAs(persistableDocument.getOcafDocument(), pathString, statusMes
I am trying to compile the following as a small example of using the TNaming library. However, although my code compiles, the linker bugs out complaining about a bunch of Undefined References. Could there be something wrong in how I compiled opencascade? Or could it be that the TNaming module was de
hi, i'm new to Opencascade and i need some basic help =) i need to create a TDF_Label for my Axis created this way : gp_Pnt centerPoint(x0, y0, z0); gp_Dir normalDirection(0.0, 0.0, 1.0); gp_Dir xDirection(1.0, 0.0, 0.0); gp_Ax2 axis(centerPoint, normalDirection, xDirection); Handle(AIS_Trihedron) a
Hi, I want to load 2 STL files, perform a boolean action and save the result. At the moment, when writing the resulting file with stlAPI::Write, I always got an 'empty' file. Thus, I just try to load and save an input file and I do have the same empty file on output. StlAPI::Read(shapes[i], fileName
Hi, I am using ShapeSchema and Storage_Data for storing named Geom_Curve and TopoDS_Shape objects in FSD_BinaryFile files. When I build the attached classes with OCCT 7.0.0, ShapeSchema.hxx is not found anymore. The upgrade guide ( http://dev.opencascade.org/doc/overview/html/occt_dev_guides__upgrad