For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Step File

par's picture
Forums: 

Hi,
I iterated thru all the entities of step file using EntityIterator.
Fields of this standard_transient value returned by entity iterator
which is undefined are returned as NULL. How can I get these entities.
Its enough for me even if I get the label associated with that entity
in actual step file.

Thanks

Par.

Paolo Mosna's picture

I don't know if this can help you, but it seems to me that the STEP interface provided by OC is not so powerful in order to completely process a STEP file. What i'm doing is using the NIST SCL 3.2 class library in order to process the STEP content and then if I need some geometric data (TopoDS_Shape) I use the OC library and the STEP instane file ID of the geometric feature I want load (catched using the SCL NIST library).

par's picture

Dear ,

Thanks for quick reply.

Thanks for the trick you use. I have NIST SCL 3.1 for unix. But I work on windows so can u please tell me where shall i get NIST SCL3.2 (which u r using) source or built libraries for windows?

Best Regards
Par

Valery Ovchinnikov's picture

Hello, Par.
I found link. May be it will help you:
http://www.bauv.unibw-muenchen.de/STEPforWindows/

par's picture

Hi Valery,

The site which you mentioned is accessible but not even single file is getting download. Is there any mirror link to this site?

Best Regards
Par

par's picture

Dear Paolo Mosna ,

Thanks for quick reply.

Thanks for the trick you use. I have NIST SCL 3.1 for unix. But I work on windows so can u please tell me where shall i get NIST SCL3.2 (which u r using) source or built libraries for windows?

Best Regards
Par

Paolo Mosna's picture

Hi, I downloaded the SCL 3.2 library from the following link:
http://ats.nist.gov/scl/#download
I compiled that under Linux, I have never tried to compile that under windows. Actually I had to change something in order to compile under Linux.
I think it sould not be difficult to compile that library under windows NT.

Beside I found that OC offers a support similar to the one offerred by SCL library. Using the method GiveList(XXX) where XXX can be something like step-type(CARTESIAN_POINT) you will retrieve a sequence of all the CARTESIAN_POINTs instances inside the STEP file, You can do the same with other types of instances replacing the CARTESIAN_POINT with the name of the entyties that you want retrieve.

Paolo.

par's picture

Hey Paulo and Valery,

I managed to find the correct link. Its http://www.bauv.unibw-muenchen.de/~bauv1/download/WStep/

Thanks for ur suggestions.

Best Regards
Par

Paolo Mosna's picture

Hi, after a deep research inside the source code of OCC I found that thay have a mapping of all the STEP entities for AP 203 and AP 214. That's is good and I think easier than using SCL 3.2 developed at NIST (Which gave me some problems). At the same time the Handle() policy for memeory managment of OC is very useful dealing with these STEP classes. Moreover you don't have to use many libraries in order to perform the same task!

Bye,
Paolo.

par's picture

Dear Paolo,

You are absolutely correct about AP203. OCC has taken care of 203 very well. But the problem is with additional entities called as FORM FEATURE Entities,present in AP214/AP224 (viz, Chamfer, Boss,Round Hole..etc). These entities are read by OCC as UndefinedEntities, which means that they dont provide support for form features.

Your comments are welcomed.

Best Rgds
Par

Paolo Mosna's picture

Thanks, I didn't know this.

Paolo.

par's picture

Hi,

Does this SCL3.2 which u use handle complex entities? I have realised that the SCL3.1 for windows which i used doesnot handle such entities. So pls tell me even if u get the same problem?

Best Rgds
Shylesh

Paolo Mosna's picture

Hi,
I sent to you this morning an e-mail but i received an unknown user error message. Here is the e-mail body:

---

Yes, it does.

I think it is not very easy to work with such complex entities using SCL,
but here is an example (if I still have the files...):

For those entity the library provides a class called STEPcomplex and a method IsComplex() - that returns a boolean value - inside the class Application_instance - the base class for all the STEP entity classes. If the entity is a complex entity it can be converted into a STEPcomplex reference end the method EntityPart(char *) can be used to transform the instance in a reference to one of the entities that compose the complex one. Follow the code:

SdaiShape_representation_relationship_ptr pSrr = pCdsr->representation_relation_();
if(!(pSrr->IsComplex())){
LoggerManager::TRACE_INFO("main","The Shape_representation_relationship
entity in not composed with Representation_relationship_with_transformation.", DEBUG_3);
continue;
}

SdaiRRWT* pRrwt = (SdaiRRWT*) ((STEPcomplex*)pSrr)->EntityPart
("Representation_relationship_with_transformation");
if(pRrwt == NULL){
LoggerManager::TRACE_INFO("main",
"Unable to retrieve the composed entity Representation_relationship_with_transformation.", DEBUG_3);
continue;
}

Where the pCdsr is a pointer to SdaiContex_dependent_shape_representation class.

Moreover I found a document: "Design of C++ Software Library for Implementing EXPRESS:
The NIST STEP Class Library", written by David A. Sauder and K.C. Morris, which session
5.2 (at page 11) describes how the "Complex Entities" are supported by this SCL library.
I think, but I'm not sure, that I have downloaded the document from the NIST SCL web site:
http://ats.nist.gov/scl/#download.

Sorry if I didn't see your question in the OpenCASCADE mailing list.

Hope this help.
Paolo.

PS: If you want I can send you the document by e-mail.

PS2: Actually I'm moving all the STEP stuff under OpenCASCADE.

par's picture

Hi Paolo,

I got ur mail and in reply mail i have asked you abt some help on Complex Entities. Basically I should be able to SAVE these CEs in STEP file, which I cant do currently because i dont know how to handle them.

Thanks
Par