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

[Blog] Adding colors and names to your application

Roman Lygin's picture
Forums: 

If you have to exchange data with other applications via IGES or STEP (or perhaps other formats, if you are a commercial client of the Open CASCADE company), you might want to ...

Read more at http://opencascade.blogspot.com/2008/12/adding-colors-and-names-to-your.html

Roman Lygin's picture

Part 2
http://opencascade.blogspot.com/2008/12/adding-colors-and-names-to-your_02.html

Dmitry's picture

nice sample,
and what about to create a Simple Shape with one ColorAttribute and show it. I can not show the colorized Shape color when use the class XCAFPrs_AISObject. I thought, It doest it itself.

Roman Lygin's picture

Hi Dmitry,
Part 3 will demonstrate visualization. Stay tuned. ;-)

Dmitry's picture

Nice ;)
only one Question, If you say it's not possibly i can go home
(but please don'tsay it):
Have I really to use XCAFApp_Application ?
1. I have read a Stepfiel in myTDocStd_Document.
2. I created the myXCAFPrs_AISObjects from TDF_Labels (part of myTDocStd_Document).
3. I shown the colorized Shapes (XCAFPrs_AISObjects) witouht any problem with help of command:
myAIS_InteractiveContext->Display(myXCAFPrs_AISObjects)
4. I add a new TDF_Label with new Shape to the myTDocStd_Document.
5. I dont see any color !!!!
6. I take a original Shape from myXCAFPrs_AISObjects and transfered es. I dont see any color !!!!

Ok,
I will go home anyway

Roman Lygin's picture

Part 3 (final)
http://opencascade.blogspot.com/2008/12/adding-colors-and-names-to-your_03.html

Please rate this article using the voting buttons under its text. Thanks.

Dmitry's picture

Thank#s for the article.
I have seen a way to shown the colors.
But I have not seen connection between XCAFPrs_AISObject and TPrsStd_AISViewer.. TPrsStd_AISPresentation.
I able able to show XCAFPrs_AISObject in V3d_View with colors without TPrsStd_AISPresentation...
aXCAFPrs_AISObject = new XCAFPrs_AISObject(aTDF_Label);
aV3d_View->Display(aXCAFPrs_AISObject);
What the different ???

Roman Lygin's picture

TPrsStd_AISPresentation is a convenience class that helps manage transactions (undo/redo) and persistence, managing basic elements of AIS_InteractiveObject such as material, width, etc. It operates with a driver (TPrsStd_Driver descendant) which can construct an AIS_InteractiveObject descendant.
I believe they can be easily omitted if you manage your interactive contexts on your own.

---
opencascade.blogspot.com - blog on Open CASCADE