HOOPS/ACIS Bridge and ACIS Assemblies


The HOOPS/ACIS Bridge, which provides connections between the ACIS modeler and HOOPS/3dGS, can function in both the part modeling and assembly modeling domains. (Refer to the HOOPS/ACIS Reference Guide for more information about the HOOPS/ACIS Bridge.) The following topics are supplemental material specific to assemblies. If you rely on the hoops_acis_entity_converter class for part rendering, then you do not need to do anything additional in order to enable assembly rendering. On the other hand, if you have chosen to write your own IEntityConverter-derived class, then you need to implement three assembly-related methods, as discussed next.

Topics include:

Connecting ACIS to HOOPS/3dGS

The interface IEntityConverter , of which hoops_acis_entity_converter is an implementation, contains one method ConvertEntityAsm, that is intended to handle the conversion of ENTITYs associated with assembly models to HOOPS segments. This includes ENTITYs of type ASM_ASSEMBLY as well as other top-level ENTITYs associated with a model and referenced within an assembly, for example. It may, therefore, be used in both part modeling and assembly modeling contexts, unlike the method ConvertEntity, which is restricted to the part modeling domain.

The conversion will typically consist of the generation of two segment trees. One of these ("Model Geometry") will consist of B-Rep data associated with a top-level ENTITY, along with its properties, such as colors. The other ("Model Components") will contain the transform data associated with each component of the assembly, together with properties that are overridden at the component level. Construction of the latter tree will include the referencing of the former by means of HOOPS Include Segments. Two additional methods of IEntityConverter, ConvertModelGeometry and ConvertModelComponents are used to build these two trees and connect them in this way. The former is given a simple default implementation, calling ConvertEntityAsm on each top-level ENTITY within the specified model; the latter does nothing by default. Implementations of all three of these methods within the hoop_acis_entity_converter class may serve as examples if you intend to derive your own converter

Synchronizing ACIS and HOOPS/3dGS

The HOOPS/ACIS Bridge routine HA_Render_Model is used to initially render an assembly model. It does so using whatever IEntityConverter-derived class is registered. Updates to the segment trees are handled by the functions HA_ReRender_Model_Geometry, HA_ReRender_Model_Entity, HA_ReRender_Model_Components, and HA_ReRender_Component.

HOOPS Segment Structure Generated

In part modeling mode, the Bridge uses a single segment pattern as representing the root segment for building the part's HOOPS representation. In assembly modeling mode, this root hosts the components contained in the assembly (that is, the "Model Component" tree mentioned above). Because there is also the need for a second tree ("Model Geometry") in this mode, however, ACIS makes use of a second patter. Both patterns are given default values by the HOOPS/ACIS Bridge, and can be overridden using HA_Set_Rendering_Options, where they are referred to as "segment pattern" and "geom pattern", respectively.

Mapping of ACIS Assembly Models to HOOPS Segments

The HOOPS/ACIS Bridge maps geometry in assembly mode in the same way that it does in part mode. In addition, the HOOPS/ACIS Bridge maintains mappings to the geometry of assembly models, which may be queried using calls to the routines HA_Compute_Model_Pointer and HA_Compute_Model_Keys, and to component handles associated with models, which may be queried using calls to the routines HA_Compute_Component_Pointer, and HA_Compute_Component_Keys.

Assembly Modeling Notifications

In part modeling mode, the HA_EntityCallback class provides callback support that listens for messages involving ENTITYs. In assembly modeling mode, this functionality is handled in a different way. You are expected to associate an asm_model_entity_mgr-derived class object with your models, and methods of this class (for example, entities_changed_vf and submodel_changed_vf) are used to respond to notifications. (As an example, refer to the acis_ha_part_entity_mgr class defined in the Bridge.) Six event types are handled in this way, enumerated as follows:

The implementation of your entity manager and its notification methods should respond to these events by calling the appropriate rendering function(s) (for example, HA_ReRender_Model_Geometry as a reponse to ASM_BREP_GEOM_CHANGE.)

Using the hoops_acis_entity_converter Class

When the HOOPS/ACIS Bridge is initialized, a hoops_acis_entity_converter object is automatically registered as the active entity converter. If you choose not to override the converter with one of your own, very little needs to be done:


Related topics:

Converting ACIS Assembly Models into Customer Assemblies

[Top]