DiscussionsIssue archiveData Exchange and Application Framework

Forum archive

Data Exchange and Application Framework

Technical discussions preserved from the public OCCT community forum.

Topics
496
Replies
1,661
Files
533

Discussions

Page 9 of 9

Showing 16 discussions, ordered by the latest archived activity.

import IGES file exception

I try to import an IGES file using open cascade and get an exception The code: ​ IGESControl_Reader reader; IFSelect_ReturnStatus stat = reader.ReadFile("filePath"); Standard_Boolean ok = reader.TransferRoots(); TopoDS_Shape shape = reader.OneShape();​ I get stat = IFSelect_RetDone in the reader.Rea

1 reply1 file

StlAPI.write() returns StlAPI_MeshIsEmpty

We are upgrading an older version of OCC and are having problems exporting STL files. In the older code, when writing an STL file, a mesh was automatically created. In the current release, however, the StlAPI_MeshIsEmpty error code is returned. I've traced the problem to the following OCC code chang

1 reply

Estimate OCAF file size before saving

Hello. I have asked already the same question on the user forum, but unfortunately, nobody react on it. The question relates to OCC 6.8.0 Does somebody know, if there is a way to estimate the possible size of OCAF file having TDocStd_Document object without saving it? Any suggestions and tricks are

1 reply

Read/Write TopoDS_Shape to/from memory buffer

I'm looking for some guidance on the correct way to write/read a TopoDS_Shape to/from a memory buffer. Something like BRepTools::Write/Read, but using a binary format instead of ASCII as well as being able to target a specific version. The information I found for OCAF persistence mentions a binary f

1 reply

Parasolid import scale?

Is there any control similar to xstep.cascade.unit for the Parasolid reader (XtControl_Reader)? The bodies I am getting are scaled up by 1000 and currently need to be transformed.

1 reply

Trouble with extracting product names from STEP files

Hello everyone, I'm trying to extract product names from STEP files, but, I always fail. I tried with following steps: Read STEP file using STEPCAFControl_Reader reader, set its name mode to true (STEPCAFControl_Reader::SetNameMode(true)) and called transfering STEPCAFControl_Reader::Transfer(Handle

1 reply

Product Name gets appended with index number

Hi, I am trying to write a STEP file using 'STEPControl_Writer'. I am adding product names using the following command (c#) My code looks like this, /////////////////////////////////////////////////////////////////////////////////////////////////////////////// foreach (KeyValuePair<string, TopoDS_Sh

1 reply

Name and Color display using XDE

Hi All, I have an issue while using XDE. I am able to read and display .STEP assembly but not able to read component names and colors. I have tried the following code:- { Handle(TopTools_HSequenceOfShape) aHSequenceOfShape= new TopTools_HSequenceOfShape(); aHSequenceOfShape->Clear(); //Create Docume

1 reply1 file

Import STEP, export Mesh, wrong placement of items

Hi all, I finally managed to load a STEP file (with colors and labels) and export it as a VRML file using this code below. It works fine with most of the models I tested it, but there are a few models that seem to be composed of various parts that don't work. What happens is, that all parts seem to

4 replies3 files

Reading IGES curved surfaces as BREPs

I'm trying to use OCCT to read IGES files so I can translate them into our proprietary data format, which is BREP-based. I originally used IGESControl_Reader.TransferRoots() and .OneShape() to create an entity tree, which I parsed recursively. That works great for flat-sided objects, but it fails mi

1 reply

Unable to read STEP file with stepocafcontrol

Hi All, I am able to read and display a complete assembly (STEP) using stepcontrol. but when I try to read same assembly (STEP) with names of components, colors etc. using stepcafcontrol, I am unable to do so. Any Clues ? Thanks in Advance Shamher

1 reply

Converting TopoDS_Shape to internal format

I'm new to OCCT. I'm trying to use it to read an IGES file and convert it into the internal data structures of the software package that we write. I think I've figured out the code to read the IGES file into a TopoDS_Shape object. I can use Shapetype() to see which TopAbs_XXXX type this shape really

2 replies

Tip: How to improve performance when STEPControl_Writer::Transfer is called often

When STEPControl_Writer::Transfer () is called multiple times in order to export a list of shapes to a common STEP file, the performance might be bad because the third parameter "compgraph" of the Transfer function is true by default. It means after every translation of a shape the graph is rebuilt.

3 replies

triangulation problems with some igs file

Hi all, I'am a beginner, please help me.. my objectif is to import a .igs file and triangulate it, so i try to use three functions: 1- ImportIges(string filename); 2- FacesFromCompounds (const TopoDS_Shape &Shape, std::vector &topoFaceVector); 3- Triangulation_Occ();// in the function,i do three for

2 replies

DXF, SAT file format

Read/Write DXF and SAT files ... As an old Cas.Cade customer my code use objects like : // specific SAT //#include //#include // specific DXF //#include //#include //#include Where have gone these objects in 3.0 ???

2 replies