Syntax FACTORY_DEF SharedObjectFactory [FACTORY_NAME ] [INPUT (DEFINITION|DEFINITION_FRONT|DEFINITION_BACK|REFERENCER) FEATURE_TYPE [ ]* []*]* [MODE (ADD|REMOVE|EXTRACT)] [SHARED_OBJECT_TYPE (APPEARANCE|GEOMETRY_DEFINITION)] [ADDITIONAL_NECESSARY_DEFINITION_TAGS tag1 | tag2 | ...] //correct? [GROUP_BY []+]* [UNIQUE_DEFINITIONS [(YES|NO)]] [RECURSIVE [(YES|NO)]] [OUTPUT (SUCCESSFUL|INVALID_GEOMETRY|INVALID_DEFINITION|EXTRA_DEFINITION) FEATURE_TYPE [ ]* []*]* Overview To be documented. Clauses The SharedObjectFactory supports the following clauses. MODE ADD - create a shared object of type SHARED_OBJECT_TYPE using properties from the definition feature, add it to the library and set the REFERENCER features to reference the new shared object. REMOVE - remove reference from REFERENCER feature. EXTRACT - extract DEFINITION associated with shared object referenced by REFERENCER feature. SHARED_OBJECT_TYPE Type of shared object we are interested in and which definition tags will be processed. ADDITIONAL_NECESSARY_DEFINITION_TAGS Additional definition tags that we are interested in processing. An example when this is needed is when we are extracting an appearance. there will be no DEFINITION_* input tags but we still need to process either or both front and back faces. GROUP_BY Which attributes to group referenceres/definitions by. UNIQUE_DEFINITIONS Whether to output only unique definitons in extract mode. RECURSIVE Whether we want to remove or extract recursively (it might or might not apply depending on the SHARED_OBJECT_TYPE). Input Tags The SharedObjectFactory supports the following input tags. DEFINITION, DEFINITION_FRONT, DEFINITION_BACK Feature that contains information about the shared object which will be created. When multiple definitions are required on a dynamic basis, they are given different tags. As in the instance when we need definitions for either or both the front and the back faces of a surface. REFERENCER Feature which references or will reference a shared object. Output Tags The SharedObjectFactory supports the following output tags. SUCCESSFUL Features going out here depend on MODE. INVALID_GEOMETRY Input features with invalid geometry. INVALID_DEFINITION Invalid DEFINITION features (missing attributes, wrong attribute values, etc.) EXTRA_DEFINITION Extra definition features. Only 1 definition per tag per group is allowed. TO BE RESOLVED Overview section needs to be documented.