[cgma-dev] r4653 - cgm/branches/merge-cubit12/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Fri Mar 25 14:40:47 CDT 2011
Author: janehu
Date: 2011-03-25 14:40:47 -0500 (Fri, 25 Mar 2011)
New Revision: 4653
Added:
cgm/branches/merge-cubit12/geom/OCC/OCCHistory.cpp
cgm/branches/merge-cubit12/geom/OCC/OCCHistory.hpp
cgm/branches/merge-cubit12/geom/OCC/occ_attrib_history.cpp
cgm/branches/merge-cubit12/geom/OCC/occ_attrib_history.hpp
Log:
Added file prototypes for history tracking.
Added: cgm/branches/merge-cubit12/geom/OCC/OCCHistory.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCHistory.cpp (rev 0)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCHistory.cpp 2011-03-25 19:40:47 UTC (rev 4653)
@@ -0,0 +1,580 @@
+
+#include "OCCHistory.hpp"
+#include "OCCQueryEngine.hpp"
+#include "CubitMessage.hpp"
+#include "RefEntity.hpp"
+#include "occ_attrib_history.hpp"
+#include "CGMHistory.hpp"
+#include "GeometryQueryTool.hpp"
+
+/*Here's a brief description of how the history is created in the
+ * OCC port:
+ * 1. Create an OCCHistory object.
+ *
+ * 2. TopologyBridges are given to the port for modification. From
+ * the TopologyBridges, get all associated parent and child TopologyBridges.
+ * From each TopologyBridge, get a) the corresponding RefEntity
+ * and b) the corresponding TopoDS_Shape(s).
+ *
+ * 3. On every OCC TopoDS_Shape, attach an attrib_history attribute.
+ * The attrib_history basically holds a unique 'tracking' integer.
+ *
+ * 4. Populate the refentity_tracking_id_map in the OCCHistory object, with
+ * pairs, where each pair consists of a RefEntity pointer and it's associated
+ * tracking id, in #3.
+ *
+ * 5. OCC performs the operation(s), making callbacks into the
+ * occ_attrib_history's overloaded functions. It does the following:
+ * -For split_owner callbacks, where A is split into A and B,
+ * put a history attrib on B and add A's tracking integer to B.
+ * -For merge_owner callbacks, where A and B are merged into A,
+ * add B's tracking id to A. Now A will have 2 tracking ids
+ * associated with it.
+ * -In the copying callback macros, if B has been copied from A, give B
+ * the tracking id that was in A.
+ * -For the other callbacks, replace_owner, lop_change_owner, and
+ * replace_owner_geometry, add an OCCEvent to the OCCHistory object's
+ * event list.
+ *
+ * 6. Once the operation has ended and TopologyBridges have been created
+ * from the new TopoDS_Shape's (populate_topology_bridges has been called), for
+ * each TopologyBridge, create a pair consisting of
+ * a set of tracking ids and a TopologyBridge pointer.
+ *
+ * 7. Find pairs in #6 that have any tracking id in common in their sets.
+ * If you find multiple pairs who's sets in size, you have a subdivision-absorption
+ * event (n->m). If you only find a single pair that has a set with
More information about the cgma-dev
mailing list