Updating to Version 19

The v19 release uses the latest AP242e2 EXPRESS definitions, which will require a few changes. We renamed functions in the stix library to make everything easier to find, but have #defines for the old names so you can update at your leisure. Finally, we simplified the meshing API and merged it into the stix library, which will require some code and compile/link changes to applications that were using the mesher.

v19 EXPRESS Changes

The STEP AIM EXPRESS library now cover the AP242e2 and AP238e2 models published in 2020, which introduce many new definitions. In particular, AP242 has nine hundred new definitions beyond what AP214 and AP203e2 could handle. You may want to update your application to take advantage of these.

In addition to new entities, AP242e2 revised some entity attributes and select types. These changes are transparent in data files, but some programming adjustments may be needed.

One such change was made to representation_relationship, which is found in most geometry. The rep_1 and rep_2 fields now refer to a select type rather than directly to a representation. The following functions will simplify adjusting your code:

stix_asm_get_reprel_1(rel)  --> replaces rel->rep_1()
stix_asm_get_reprel_2(rel)  --> replaces rel->rep_2()

stix_asm_put_reprel_1(rel,rep)  --> replaces rel->rep_1(rep)
stix_asm_put_reprel_2(rel,rep)  --> replaces rel->rep_2(rep)

v19 Name Changes

The stix library functions simplify working with STEP data, but many names lacked structure, making them difficult to find. We revised the function and class names so that they are grouped topically, along a three level naming pattern. All of the STEP extensions begin with "stix", followed by a short topic area, like "asm", "product", "rep", or "tol". Finally, the action, like "make", or other distinguishing aspect.

The headers have #defines for all of the original names, so you do not need to change existing code. To see what needs to change, just disable the old names by defining STIX_NO_DEPRECATED_NAMES on the compile line or in your code.

#define STIX_NO_DEPRECATED_NAMES

The original and new names are listed below:

Deprecated Name				Current Name
stix_get_ap_context()			stix_apcontext_find()
stix_make_ap_context()			stix_apcontext_make()
stix_merge_ap_contexts() 		stix_apcontext_merge()

stix_find_root_products()		stix_asm_find_root_products()
stix_find_root_shapes()			stix_asm_find_root_shapes()
stix_find_shapes_wo_product()		stix_asm_find_shapes_wo_product()
stix_get_related_pdef()			stix_asm_get_related_pdef()
stix_get_relating_pdef()		stix_asm_get_relating_pdef()
stix_get_reprel_1()			stix_asm_get_reprel_1()
stix_get_reprel_2()			stix_asm_get_reprel_2()
stix_put_related_pdef()			stix_asm_put_related_pdef()
stix_put_relating_pdef()		stix_asm_put_relating_pdef()
stix_put_reprel_1()			stix_asm_put_reprel_1()
stix_put_reprel_2()			stix_asm_put_reprel_2()
stix_tag_asms()				stix_asm_tag()

stix_get_cone_angle()			stix_cone_get_angle()

stix_get_edge_end()			stix_edge_get_end()
stix_get_edge_start()			stix_edge_get_start()

stix_get_angle_value()			stix_measure_get_angle()
stix_get_count_value()			stix_measure_get_count()
stix_get_descriptive_value()		stix_measure_get_descriptive()
stix_get_feedrate_value()		stix_measure_get_feedrate()
stix_get_length_value()			stix_measure_get_length()
stix_get_measure_current_value()	stix_measure_get_current()
stix_get_measure_lower_limit_value()	stix_measure_get_lower_limit()
stix_get_measure_precision_value()	stix_measure_get_precision()
stix_get_measure_std_uncertainty()	stix_measure_get_std_uncertainty()
stix_get_measure_upper_limit_value()	stix_measure_get_upper_limit()
stix_get_measure_value()		stix_measure_get_value()
stix_get_pressure_value()		stix_measure_get_pressure()
stix_get_ratio_value()			stix_measure_get_ratio()
stix_get_spinrate_value()		stix_measure_get_spinrate()
stix_get_time_value()			stix_measure_get_time()
stix_make_angle_measure()		stix_measure_make_angle()
stix_make_angle_measure_item()		stix_measure_make_angle_item()
stix_make_length_measure()		stix_measure_make_length()
stix_make_length_measure_item()		stix_measure_make_length_item()
stix_make_measure()			stix_measure_make()
stix_make_measure_item()		stix_measure_make_item()
stix_make_measure_value()		stix_measure_make_value()
stix_make_qualified_measure_item()	stix_measure_make_qualified_item()
stix_make_ratio_measure()		stix_measure_make_ratio()
stix_make_ratio_measure_item()		stix_measure_make_ratio_item()
stix_make_time_measure()		stix_measure_make_time()
stix_make_time_measure_item()		stix_measure_make_time_item()
stix_put_measure_lower_limit_value()	stix_measure_put_lower_limit()
stix_put_measure_precision_value()	stix_measure_put_precision()
stix_put_measure_std_uncertainty()	stix_measure_put_std_uncertainty()
stix_put_measure_upper_limit_value()	stix_measure_put_upper_limit()

stix_get_polyline_point()		stix_polyline_get_point()
stix_get_polyline_size()		stix_polyline_get_size()

stixmesh_make_pdef_context()		stix_pdef_make_context()
stixmesh_create_ap242_product_definition_for_shape_rep() stix_pdef_make_for_shape()

stix_merge_product_contexts()		stix_product_merge_contexts()
stixmesh_make_product_context()		stix_product_make_context
stixmesh_create_ap242_product_definition_for_shape_rep() stix_product_make_for_shape()

stix_get_property_owner()		stix_property_get_owner()
stix_get_property_owner_as_pdef()	stix_property_get_owner_as_pdef()
stix_get_shape_property()		stix_property_get_shape()
stix_has_properties()			stix_property_has()
stix_tag_props()			stix_property_tag()

stix_get_context_angle_unit()		stix_rep_angle_unit()
stix_get_context_length_unit()		stix_rep_length_unit()
stix_get_context_solid_angle_unit()	stix_rep_solid_angle_unit()
stix_get_context_uncertainty()		stix_rep_uncertainty_item()
stix_get_context_uncertainty_value()	stix_rep_uncertainty()
stix_get_context_unit()			stix_rep_find_unit()
stix_make_geometry_context()		stix_rep_make_context()
stix_merge_rep_contexts()		stix_rep_merge_contexts()

stix_find_nested_repitems()		stix_rep_find_nested_items()
stix_get_angle_item()			stix_rep_find_angle_item()
stix_get_count_item()			stix_rep_find_count_item()
stix_get_descriptive_item()		stix_rep_find_descriptive_item()
stix_get_feedrate_item()		stix_rep_find_feedrate_item()
stix_get_length_item()			stix_rep_find_length_item()
stix_get_measure_item()			stix_rep_find_measure_item()
stix_get_pressure_item() 		stix_rep_find_pressure_item()
stix_get_ratio_item()			stix_rep_find_ratio_item()
stix_get_rep_item()			stix_rep_find_item()
stix_get_spinrate_item()		stix_rep_find_spinrate_item()
stix_get_time_item()			stix_rep_find_time_item()
stix_translate_geometry_units()		stix_rep_translate_geometry_units()

stix_get_styled_rep()			stix_style_get_rep()
stix_get_styled_repitem()		stix_style_get_repitem()
stix_put_styled_rep()			stix_style_put_rep()
stix_put_styled_repitem()		stix_style_put_repitem()

stixmesh_create_tessellated_solid	stix_tess_make_solid
stixmesh_create_tessellated_shape_rep	stix_tess_make_shape_rep

stix_make_tolerance()			stix_tol_make()
stix_make_datum()			stix_tol_make_datum()
stix_make_datum_system()		stix_tol_make_datum_system()
(all other tolerance functions already follow this pattern)

stix_trim_get_point()			stix_get_trimming_point()

stix_get_const_unit()			stix_unit_get_const()
stix_get_measure_type()			stix_unit_get_measure_type()
stix_get_unit_fullname()		stix_unit_get_fullname()
stix_get_unit_name()			stix_unit_get_name()
stix_get_unit_type()			stix_unit_get_type()
stix_make_named_unit()			stix_unit_make_named()
stix_make_unit()			stix_unit_make()
stix_merge_units()			stix_unit_merge()
stix_put_const_unit()			stix_unit_put_const()
stix_tag_units()			stix_unit_tag()

stix_make_direction()			stix_vec_make_direction()
stix_make_cartesian_point()		stix_vec_make_point()
stix_get_direction_ijk()		stix_vec_put_as_direction()
stix_get_point_xyz() 			stix_vec_put_as_unit()

stix_make_ap3d()			stix_xform_make_ap3d()
stix_make_cto3d()			stix_xform_make_cto3d()

v19 Meshing Changes

The STEP meshing API has been simplified and merged into the stix library. This will require some changes to code that uses meshes, as described below. Remove the stixmesh library and include directory from project settings. The setup instructions have the current project settings.

The stix_mesh_make() and stix_mesh_make_all() functions create meshes, using backround threads for speed, and automatically cache the results with the source STEP object. The StixMeshStpAsyncMaker, StixMeshStp and StixMeshStpBuilder classes were retired.

The RoseMeshFacetSet has been renamed RoseMesh and a subtype called StixMesh is used, with extra functions to return the STEP source objects for faces and edges.

// OLD CODE
StixMeshStpAsyncMaker mesher;
loop over all renderable things {
   if (!StixMeshStpBuilder::canMake(rep, it))
       mesher-> startMesh(rep, it);
}
StixMeshStp * mesh;
while ((mesh = mesher.getResult(1))) {
    // connect results back to source data
}


// NEW CODE
stix_mesh_make_all(design);  // does all in parallel

loop over all renderable things {
   // call stix_mesh_find to get mesh if one exists
}

Specific before and after details are listed in the table below. The mesh documentation has a complete example of the new functions. The STEP assembly functions now also make it easy to find the shape representations and fully resolved final placement for each item in an assembly.

Old Definition New Definition Notes
#include <stixmesh.h> #include <stix.h>
RoseMeshFacetSet RoseMesh This is the core class of the meshing API.
rose_mesh_bounds() RoseMesh::applyMeshBounds() or
RoseMesh::applyFacetBounds()
One function, clear box before calling.
rose_mesh_update_bounds() Same as above
rose_mesh_get_color() RoseMesh::getFaceColor() or
RoseMeshFace::getColor()
Integrated value into face.
rose_mesh_set_color() RoseMesh::setFaceColor() or
RoseMeshFace::setColor()
Integrated value into face.
StixMeshStp StixMesh Now a subtype of RoseMesh.
StixMeshStp::getFace() StixMesh::getStpFace()
StixMeshStp::getFaceInfo(stp_representation_item *) StixMesh::getFaceInfoFromStp()
StixMeshStp::getFacetSet() none, use object directly StixMeshStp was was a stand-alone object with a reference to mesh data, now StixMesh is a mesh that can be used directly.
StixMeshStp::getNormal() StixMesh::getNormal() Now fills double[3]. Old double* return deprecated as _getNormal()
StixMeshStp::getVertex() StixMesh::getVertex() Now fills double[3]. Old double* return deprecated as _getVertex()
StixMeshStpAsyncMaker stix_mesh_make(),
stix_mesh_make_all()
Associates mesh with STEP object, stixmesh_cache no longer needed.
StixMeshStpBuilder StixMesh Mesh has lock()/unlock() functions, separate builder not needed.
StixMeshStpBuilder::getCompleteStpMesh() this (now a StixMesh) No need for separate builder class.
StixMeshStpBuilder::getNormalUnsync() RoseMesh::getNormal() Call lock/unlock for thread-safety
StixMeshStpBuilder::getVertexUnsync() RoseMesh::getVertex() Call lock/unlock for thread-safety
StixMeshStpBuilder::setTolerance() getOptions()->getToleranceAbsolute() A default will be calculated if not set
StixMeshStpFace RoseMeshFaceInfo
StixMeshOptions RoseMeshOptions
stixmesh_cache_* functions stix_mesh_find Cache functions not needed, mesh associated with STEP object by "make".
stixmesh_create() stix_mesh_make()
stixmesh_get_stp_face() StixMesh::getStpFace()
stixmesh_get_stp_faceinfo() RoseMesh::getFaceInfo()
stixmesh_has_shell() stix_mesh_can_make()