Overview
When updating to any new version, remove all object files and completely recompile your projects. Even where API calls have not changed, there may be internal changes that shift things in memory. The incremental changes going to each version from the previous one are described below.
Updating to Version 20
The STEP and IFC schemas have been updated to the latest definitions. STEP applications should not require any modification. Library changes were primarily internal, to improve meshing performance and add better defaults for extension functions.
The latest IFC has retired many of the "standard case" subtypes, which may require some modifications. In addition, the IFC mesher now computes boolean removals and voids relations. Since voids relations are attached to the product structure rather than shape representation, some applications may require adjustment so that the mesher sees the voids relations. The IFC extension library also has new assembly functions for working with the spatial structure. You may want to update your application to take advantage of these.
See updating STEP applications and updating IFC applications for specific details.
Updating to Version 19
We restructured the libraries to simplify the meshing API, share code for handling advanced trimmed surfaces across STEP and IFC, and improve parallel meshing. Some class and function names have moved. We have specific instructions for updating STEP applications and updating IFC applications.
You may want to update your application to take advantage of the hundreds of new definitions in AP242 and IFC4x3. To accommodate these many new definitions, we reduced the number of symbols in the generated classes. This should not affect your code but the ABI has changed, so you must completely recompile your code with the new header files.
Since STEP objects are created on the heap with pnew, compiler-generated copy and copy assignment functions for stack-based objects should never be used by applications and in fact, did not correctly preserve data. They have been eliminated. The RoseObject::copy() method remains the way to copy objects.
The pnewIn macro takes either a RoseDesign or a RoseDesignSection. Previously this was implemented by two separate "operator new" definitions. We reworked the pnewIn macro to use one "operator new" for both arguments. This change should be transparent.
Updating to Version 18
The core library APIs have not changed in this release. EXPRESS schemas have been updated for STEP AP242e2 and IFC 4x1, which introduced new definitions and modified some existing ones.
The EXPRESS C++ classes no longer have a custom constructor that takes all inherited and local attributes as arguments. This was impractical to use for most classes, and difficult to understand beyond a few attributes. Now that AP242 contains over 2000 classes, the extra ctor also began to approach linker limits on some platforms. If you happened to use any of these, replace with the default constuctor and individual "put" functions as needed to set attributes.
For example, with the STEP person definition, the custom constructor required values for all six attributes, in a particular order. This should be changed to the default ctor and then set only those fields that need it. This is clearer, more maintainable, and the fields can be set in any order.
stp_person * p = pnew stp_person ("id", "last", "first", NULL, NULL, NULL); stp_person * p = pnew stp_person; p->id("id"); p->first_name("first"); p->last_name("last"); // default values are fine for middle_names, prefix_ and suffix_titles
For STEP applications, the biggest change is to the rep_1 and rep_2 attributes of representation_relationship. The type of these fields was changed from representation to a select type by AP242e2. The STEP Extension Library has a few new functions to hide this difference from your code:
stp_representation *stix_get_reprel_1stix_asm_get_reprel_1( stp_representation_relationship * rel ); Voidstix_put_reprel_1stix_asm_put_reprel_1( stp_representation_relationship * rel, stp_representation * rep ); /* Also stix_asm_get_reprel_2, stix_asm_put_reprel_2 */
The IFC4x1 schema adds about 25 new entities for infrastructure alignment, but does not appear to change any attributes from IFC4.
Updating to Version 17
We simplified STEP programming by moving to one EXPRESS class
library, called stp_aim, which
covers all common STEP APs. This eliminated many overlapping
variations like the stpcad
, stpman
, and
individual AP libraries.
In your project files, replace include directives and link library
for any retired class library with stp_aim
. This further
simplifies the names of the STEP or digital thread support libraries
as shown below:
/Istpcad ==> /Istp_aim stpcad.lib ==> stp_aim.lib stpcad_stix.lib ==> stix.lib stpcad_stixmesh.lib ==>stixmesh.libnow stix.lib /Istpman ==> /Istp_aim stpman.lib ==> stp_aim.lib stpman_arm.lib ==> stp_arm.lib stpman_stix.lib ==> stix.lib stpman_stixmesh.lib ==>stixmesh.libnow stix.lib stpman_stixsim.lib ==> stixsim.lib stixctl.lib ==> stixctl.lib (no change) /Iap2**lib ==> /Istp_aim ap2**lib.lib ==> stp_aim.lib
If you were using the stpman
library, it brought in
P28 XML support automatically. You must explicitly initialize that
now:
#include <rose_p28.h> // STEP-NC needs XML support rose_p28_init(); rose_p28_put_namespace_fn (stplib_p28_schema_namespace);
The EXPRESS classes no longer have a custom constructor that takes all attributes as arguments. Use the regular attribute functions to set values after creating it with the default ctor.
The new ROSE Math Library contains many functions previously in the
STEP Extension library (stixlib
). You may need to
change some symbols when
updating code that used the earlier definitions.
Many designs can now have the same name in memory. Previously, designs were kept in a dictionary, which required unique names. Now they are simply held in a list, and RoseInterface::findDesign() looks at the full path rather than just the base name when checking whether a design is already in memory.
The findDesign() and findDesignInMemory() functions now take a full path with directory. So do the RoseDesign name() and path() functions. The name() function can take partial information. It will only change the directory if one is given. It will change the file extension given and will add a default one if neither the string nor the design have one. Use path() to set the complete file path explicitly, without any additional behavior.
Many complex instance class combination (A_and_B_and_C) have been eliminated for the STEP Geometric Tolerances. This is because we have revamped the best-fit matching from EXPRESS to C++ classes to now choose a complex instance combination for a subset of types if the full combination is not available. In addition, we have added a rich tolerance API that you should use instead of the raw C++ classes.
The return values for many string access functions on RoseDesign and other classes have been made const, which may ripple through code that calls it.
- RoseAttribute::name()
- RoseDesign::fileDirectory()
- RoseDesign::fileExtension()
- RoseDesign::format()
- RoseDesign::name()
- RoseDesign::path()
- RoseDomain::name()
- RoseDomain::short_name()
- RoseObject::className()
- RoseObject::entity_comment()
- RoseP21EntityNameFn
- RoseP21SchemaNameFn
- RoseP28NamespaceFn
- RoseType::name()
- RoseType::schema_name()
- rose_get_schema_property
- rose_getenv_* functions
- rose_iso_timestamp()
- rose_iso_timestamp_from_time()
- sdai_isotime()
We reduced the size of applications by 5% and increased performance by making some functions non-virtual and removing ones that were never widely used or can be handled better in a different way. The retired or moved functions are:
- RoseObject::isEqual() (was just ptr1 == ptr2)
- RoseObject::getAttribute(void*) (replaced by slotAttribute non-virtual)
- RoseObject::putData
- RoseObject::getData,
- ROSE.workspaceDesignNames() Loop over the list of designs to find names. There may now be nulls or duplicates.
- ROSE.useShortNames() is now use_short_names on RoseP21Writer with all of the other STEP file preferences.
- All RoseServer functions that used the RoseHandle structure.
- rose_basename() retired, use rose_path_base()
- rose_dirname() retired, use rose_path_dir()
- rose_expand_path() retired, use rose_path_join()
- rose_extname() retired, use rose_path_ext()
Updating to Version 16
The Set(), List(), Bag(), and Array() macros are now ROSE_SET_OF(), ROSE_LIST_OF(), ROSE_BAG_OF(), and ROSE_ARRAY_OF(). The originals had name conflicts on some systems. Either switch to the new macros or just use the expanded symbol, like ListOfstp_cartesian_point.
The NULL_INDEX and NOTFOUND preprocessor defines now have a prefix: ROSE_NULL_INDEX and ROSE_NOTFOUND.
The RoseObject marking API has been reworked to nest traversals or use several concurrent marks. The old beginTraversal / endTraversal, visit() and wasVisited() functions still exist, but should be migrated to the new "rose_mark" set of functions.
Error reporting has changed. If you previously subclassed the error reporter object, change to using a hook function instead. We also have many more options for capturing summary information and statistics.
The RoseSeverity code was replaced with RoseStatus. ROSE_SEV_NULL is now ROSE_OK. The ROSE_SEV_WARNING, ERROR, and FATAL, codes are now ROSE_STATUS_WARNING, etc. A new ROSE_STATUS_MINOR severity is available for style issues. ROSE_SEV_MESSAGE has been retired. Trace messages are not problems so use ROSE_OK as their severity.
We changed RoseErrorCode return types to RoseStatus in functions that used it to indicate errors. The RoseErrorCode was not useful beyond checking a non-zero problem value, and did not give the severity of the problem. The ROSE_OK define has changed from a zero error code to a zero status, so only the function prototypes should change. The following file handling hooks will need to be updated.
- RoseP21AddSchemaFn / RoseP21Parser::add_schema_fn
- RoseP21SetSchemasFn / RoseP21Parser::set_schema_fn
- RoseP21ReadStatusFn / RoseP21Parser::status_fn
- RoseP21RenumberFn / RoseP21Writer::renumber_fn
- RoseP21WriteCommentFn / RoseP21Writer::comment_fn
- RoseP21WriteStatusFn / RoseP21Writer::status_fn
We eliminated several internal classes and related functions as part of a general simplification of the read/write interface. It is unlikely that your code was using any of the following functions, but they have been retired.
- class IODotRose
- class IOSTEP
- class RoseRepositories
- IORoot::registerAsExtensionHandler()
- IORoot::registerAsReader()
- IORoot::registerAsWriter()
- RoseDesign::isFileLocked()
- RoseDesign::isMemoryLocked()
- RoseDesign::lockFile()
- RoseDesign::lockMemory()
- RoseDesign::unlockFile()
- RoseDesign::unlockMemory()
- RoseInterface::findRepository()
- RoseInterface::known_repositories()
- RoseInterface::known_repositories_dictionary()
- RoseInterface::repository()
- RoseInterface::repositoryName()
- RoseServer::dfltReader()
- RoseServer::dfltWriter()
- RoseServer::findReader()
- RoseServer::findWriter()
- RoseServer::registerReader()
- RoseServer::registerWriter()
- rose_read_part21_file()
- rose_write_part21_file()
Updating to Version 15
All strings in the ROSE Library are now UTF-8 encoded and no additional international character functions are needed. The stepi18n.h header and following functions have been retired:
rose_contains_encoded_wchar() // retired rose_cvt_p21_to_wchar() // retired rose_cvt_wchar_to_p21() // retired rose_enable_wchar() // retired rose_get_wchar() // retired
During the move to UTF-8, the string functions listed below were given rose prefixes. The RoseStringObject rw_str() and ro_str() functions were also deprecated in favor of new as_char() and as_const() functions.
strcmp_as_lowercase -> rose_strcmp_as_lower strcmp_as_uppercase -> rose_strcmp_as_upper strcmp_insensitive -> rose_strcasecmp strncmp_insensitive -> rose_strncasecmp hash_insensitive -> rose_hash_insensitive strcenter -> rose_strcenter strtoupper -> rose_strtoupper strtolower -> rose_strtolower
As part of the improvements to Part 21 file reading, we now use a new stream object instead of a FILE*, so applications that use a RoseP21Lex::comment_fn custom comment hook must change from stdio calls to the get()/unget() functions on the stream() object associated with the lexer. The following member functions have also changed:
RoseP21Parser::readDesign() changed FILE* to RoseInputStream* RoseP21Lex::process() changed FILE* to RoseInputStream* RoseP21Lex::file() removed RoseP21Lex::stream() added, returns RoseInputStream*
The naming convention used for IFC Java libraries was changed to preserve the CamelCase symbols as in the original EXPRESS. The difference in symbols is shown below.
// new names, preserving CamelCase IfcBuilding bldg = pop.newIfcBuilding(); bldg.setGlobalId (makeGuid()); bldg.setOwnerHistory (makeOwnerHistory(pop)); // old names, forcing to lower Ifcbuilding bldg = pop.newIfcbuilding(); bldg.setGlobalid (makeGuid()); bldg.setOwnerhistory (makeOwnerHistory(pop));
Updating to Version 14
Version 13 was an internal testing release and was not widely distributed.
We retired the declare() and implement() macros for declaring aggregate classes. Use the ROSE_DECLARE_AGG() and ROSE_IMPLEMENT_AGG() macros instead:
declare(npList,DefInfo); // Change this implement(npList,DefInfo); ROSE_DECLARE_AGG(npList,DefInfo); // To this ROSE_IMPLEMENT_AGG(npList,DefInfo);
The capitalization of some functions in EXPRESS classes may have changed. When a symbol was used in many places, like the "Owner" attribute in multiple IFC entities, or where an attribute shared the same name as a type, the capitalization of the first one was used for all further code generation. The compiler and class generator now tracks each defining use, so the capitalization should match the EXPRESS in the C++ classes.
The RoseInterface functions listed below were deprecated in v12 and have been retired. Any applications that are still using them must be updated to use the equivalent functions on RoseDesign.
RoseInterface::addName() RoseInterface::addSchema() RoseInterface::designName() RoseInterface::display() RoseInterface::findDomain() RoseInterface::findObject() RoseInterface::findObjects() RoseInterface::format() RoseInterface::nameTable() RoseInterface::pnewInstance() RoseInterface::removeDesign() RoseInterface::removeName() RoseInterface::rootObject() RoseInterface::saveDesign() RoseInterface::saveDesignAs() RoseInterface::setDesignName() RoseInterface::setFormat() RoseInterface::setRootObject() RoseInterface::useSchema()
Updating to Version 12
The ROSE API changed for the EXPRESS "binary" type, It should not affect user code because none of the STEP Application Protocols have ever used this type.
Version 11 only had an IFC 2x2 library named ifclib. Newer releases contain an IFC library that covers IFC4, IFC2x3, and IFC2x2.
Updating to Version 11
If you are using either the RoseP21Parser::add_schema_fn or the RoseP21Writer::schema_name_fn hook functions, you will need to change the declarations of your functions to accommodate the new arguments. Your code will not compile if you use the old prototypes, so you will know immediately if this affects you.
If you are including RoseP21Lex.h, RoseP21Parser.h or RoseP21Writer.h , you no longer need to do so. These are now brought in automatically by rose.h .
Updating to Version 10
Runtime support files for ST-Developer applications are now in the redistributable ST-Runtime package. Items from the system_db directory are now in ST-Runtime or the lib subdirectory. See Packaging Applications for Distribution for more information.
The shortnames files (*.nam) now use the same syntax as the AP documents (longname first, then shortname). If you have any of your own *.nam files, you should update them to the new syntax. Shortname files for all of the STEP APs are already present in ST-Runtime.
From Earlier Versions
If you are using any compiled schemas files that are not already present in the ST-Runtime package, you must regenerate them with the EXPRESS compiler.
In Version 7 and earlier, the C++ classes for aggregates were generated in separate files, but now they are kept with their base type. You may need to update your makefiles or VC projects for the new set of source files.