Make components of STEP object selectable

Forums: 

Hello,

I'm new with OCC and pythonOCC. I need to load a step file, which is working. It contains an assembly of three components. I want to make these components selectable. Unfortunately following the examples (with SimpleGUI), I can only select the whole component (or surfaces). How can I access the components in python code and make them clickable? A minimum example would be really helpful.

To give some more context, this is the main functionality I want to implement at whole:

- load one (or more) step files,
- display them and some information about the model,
- make components of an assembly clickable,
- move/rotate components according to simulation data given in a CSV file.

I really hope someone can help me. Thank you.

Kind regards,
Andreas Pfeil

 

Forum supervisor's picture

Dear Andreas,

We have sent to you the personal message - please, check your mailbox.

The functionality described by you can be naturally implemented basing on existing OCCT 3D viewer solutions for required target platforms (including mobile devices) either as a standalone application or as web application in browsers without plugins with using WebGL :

Best Regards,

FSR

Andreas Pfeil's picture

Thank you for your offer. I'll pass it on to my supervisor.

Andreas Pfeil's picture

Thank you for your reply. It really helped a lot to dive into the framework. Sorry I didn't reply for a while. The prototype script I built kind of works, but not with components, only with the whole objects. It seems like internal it's rotating, but on the display it's static. Is it possible that you have a look at it? I guess it's something quiet simple, but I don't see the problem. In the rotate function, I have a commented line that makes the whole object rotate when not commented. I tried simple 214 and 203 STEP example files. I uploaded one just in case.