1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-26 11:05:31 +03:00
occt/tests/bugs/caf/bug26290_newattribute_2
szy f47afe531d 0026290: It is neccessary to separate visualization part from TKCAF
- Package TPrsStd is moved into new toolkit TKVCAF. This is the only toolkit in OCAF that depends on visualization libraries.

- All persistent data stored in TPrsStd_AISPresentation attribute are moved to new attribute TDataXtd_Presentation, which is maintained automatically on the same label as TPrsStd_AISPresentation.
All parameters used by TPrsStd_AISPresentation are stored in corresponding TDataXtd_Presentation attribute.

- TPrsStd_AISPresentation is not stored in file any more; when OCAF document is loaded from a file, these attributes are created at all labels where TDataXtd_Presentation attribute is located, by TPrsStd_AISViewer::New().

- File src/StdResources/MigrationSheet.txt necessary for reading files written by previous versions of OCCT (lost in one of previous integrations) is restored and updated as necessary to handle this change (defines replacement of TPrsStd_AISPresentation by TDataXtd_Presentation). Environment variable CSF_MIGRATION_TYPES should be defined, pointing to this file.

- Packages BinMPrsStd and XmlMPrsStd are removed; their drivers are moved into BinMDataXtd and XmlMDataXtd respectively.

- Version numbers of BinOCAF and XmlOCAF formats are increased, new files cannot be read by previous versions of OCCT

- New tests added

- Adding new TKVCAF toolkit in sample projects

- Restore IsDisplayed(false) in TPrsStd_AISPresentation::Erase()
2015-12-10 15:55:00 +03:00

73 lines
1.3 KiB
Plaintext

# OCAF VISUALIZATION
# Presentation attributes
#
# Testing attribute: TPrsStd_AISPresentation & TDataXtd_Presentation
#
# Testing command: standard set of commands
#
# The test checks joint work of these attributes, opens kept before file 'bug26290_new_1.cbf', modifies it,
# checks Undo/Redo work and keeps it in 'bug26290_new_2.cbf'
pload FULL
# prepare document
box b 100 200 300
NewDocument D BinOcaf
UndoLimit D 100
NewCommand D
set Lab1 [Label D 0:1:1]
SetShape D $Lab1 b
AISInitViewer D
vsetdispmode 1
AISSet D $Lab1 NS
AISDisplay D $Lab1
vfit
NewCommand D
Undo D 1
Redo D 1
AISColor D $Lab1 11
NewCommand D
SaveAs D $imagedir/bug26290_new_1.cbf
Close D
# test
Open $imagedir/bug26290_new_1.cbf D
UndoLimit D 100
NewCommand D
## DFBrowse D
AISInitViewer D
vsetdispmode 1
vfit
NewCommand D
set Lab2 [Label D 0:1:2]
pcylinder cy 50 190
ttranslate cy 200 0 0
SetShape D $Lab2 cy
AISSet D $Lab2 NS
AISDisplay D $Lab2
NewCommand D
vfit
AISTransparency D $Lab2 0.7
NewCommand D
Undo D 1
Redo D 1
SaveAs D $imagedir/bug26290_new_2.cbf
AISErase D $Lab2
set Lab1 [Label D 0:1:1]
AISErase D $Lab1
NewCommand D
Close D
Open $imagedir/bug26290_new_2.cbf D
## DFBrowse D
AISInitViewer D
vsetdispmode 1
vfit
AISColor D $Lab2 44
AISErase D $Lab2
AISErase D $Lab1
AISUnset D $Lab2
Close D