Collaborative CAD Synchronization Based on a Symmetric and Consistent Modeling Procedure

One basic issue with collaborative computer aided design (Co-CAD) is how to maintain valid and consistent modeling results across all design sites. Moreover, modeling history is important in parametric CAD modeling. Therefore, different from a typical co-editing approach, this paper proposes a novel method for Co-CAD synchronization, in which all Co-CAD sites maintain symmetric and consistent operating procedures. Consequently, the consistency of both modeling results and history can be achieved. In order to generate a valid, unique, and symmetric queue among collaborative sites, a set of correlated mechanisms is presented in this paper. Firstly, the causal relationship of operations is maintained. Secondly, the operation queue is reconstructed for partial concurrency operation, and the concurrent operation can be retrieved. Thirdly, a symmetric, concurrent operation control strategy is proposed to determine the order of operations and resolve possible conflicts. Compared with existing Co-CAD consistency methods, the proposed method is convenient and flexible in supporting collaborative design. The experiment performed based on the collaborative modeling procedure demonstrates the correctness and applicability of this work.


Introduction
Given the rapid development of economic globalization, collaborative design, collaborative product development, and cloud manufacturing have become unavoidable strategic means of competition [1][2][3].In this way, product design work is done by different enterprises or departments in different locations.Computer-supported cooperative work (CSCW) is a common task for a collaborative work group in a computer-supported network environment and originated in the 1980s [4].The technology and advantages of CSCW create more competitiveness in industrial manufacturing.Specifically, in collaborative design the computer aided design (CAD) technology has been combined with CSCW and the concept of collaborative CAD (Co-CAD) emerges [5][6][7][8][9].
Typical studies of Co-CAD systems of replicated architecture assume that the execution orders are different among the cooperative sites and then try to maintain a consistent result after the operations are received and executed on different sites with divergent orders [10][11][12].This assumption comes from co-editing systems of replicated architecture, in which a lot of tricky algorithms are proposed to address the challenge of how to achieve consistent results in a non-consistent (dis-ordered) operations sequence.This challenge makes sense in co-editing systems where both the text data structure and text operations semantics are simple.
Symmetry 2017, 9, 59 2 of 20 However, in Co-CAD systems, the data structure and operations semantics are much more complicated than in co-editing systems.The disordered operations sequence will result in many complex problems, such as collaborative name matching or feature conflict [13][14][15][16][17][18].Therefore, the Co-CAD system is more complicated than a co-editing system and so it is difficult to achieve consistent results with a non-consistent 3D modeling operation sequence [19].
Furthermore, even if consistent (geometric) results are achieved with divergent modeling histories, a new problem comes into being.Modern CAD systems are history-based and the modeling history represents the design intent [20,21].Divergent modeling histories with the same geometric result are not valid for a given design intent.Unfortunately, this problem is generally neglected by almost all previous studies of Co-CAD.
This paper proposed a novel synchronization method for Co-CAD to avoid the above problems.By this method, operations are first organized according to their causal relationship.Then the concurrent operations are retrieved.A symmetric concurrency control mechanism is proposed to form a unique operation sequence.While preserving the design intent of all sites as much as possible, an operation that would cause conflict is determined and withdrawn during the procedure.Then a symmetric and consistent modeling operation procedure is generated in all sites to achieve a unique and valid modeling result.Meanwhile, the modeling history in each site remains consistent.The rest of the paper is organized as follows: in Section 2, some related work of collaborative design is reviewed.In Section 3, some related concepts and definitions are presented and then the overall methodology of the paper is proposed.In Section 4, the technical details of the proposed symmetric synchronization model for Co-CAD are introduced.In Section 5, a collaborative design process is presented as a case study to demonstrate the method of this paper and Section 6 gives the conclusions of this paper.

Related Work
In an ideal collaborative design environment, co-designers from different design sites could accomplish the design task in a sharing workspace.The Co-CAD system should offer tools and technical support for mutual awareness, collaboration, and interaction in the collaborative design environment [22][23][24].
Early Co-CAD architecture is centralized.All modeling operations must be transmitted to the server execution, which hinders a quick local response.Compared with the Co-CAD system with centralized architecture, the one based on replicated architecture is better for the effective local response [25].At present, research into Co-CAD mainly focuses on replicated concurrency control methods.
A typical type of Co-CAD solution is authority-based methods.The basic idea is that each site acquires the operation privilege by a certain rule so all the operations can be executed sequentially.Dietrich [26] designed a strict concurrency control system that uses the "floor control" mechanism.Only when a site has a token can it execute the corresponding modeling operation, while other sites cannot execute modeling operations on the shared model but only by observing the basic state of the model.Stork et al. [27,28] used an optimistic object locking mechanism and common rules and protocols to achieve concurrency control, thereby achieving consistency of results.Li developed a cooperative design system based on neutral modeling commands that adopts a feature granularity locking mechanism to realize concurrency control and maintain consistency [29,30].This method reduces the granularity of the lock mechanism to the feature level.The Replicated Collaborative CAD System (RCCS) system used a local locking mechanism to achieve concurrency control [15].Yang used a fine granular locking mechanism for a replicated collaboration system [31].The analysis shows that, with the authority-based mechanism, only one user is allowed to edit the sharing model at a time, which does not meet the demands of free multi-user concurrent design well.
An important and successful application of CSCW is a collaborative editing system for text documents.In the co-editing system, operation transformation (OT) is an effective idea that attempts to adjust the editing parameters of disordered editing operations for a consistent editing result among Symmetry 2017, 9, 59 3 of 20 co-editing sites.Based on this thought, a lot of OT algorithms are proposed [32][33][34][35][36][37][38][39][40].Inspired by co-editing, OT algorithms are used in 3D collaborative design.Liu proposed a 3D semantic-based OT method to support less constrained multi-user interaction and achieve consistency in Co-CAD systems [41].However, adopting OT for 3D models requires complicated model geometry computation and involves complex topological naming issues.
In Co-CAD, concurrent operation may cause operation conflicts or divergent modeling results by operation interactions.Therefore, many studies focus on conflict detection and solutions [42][43][44][45][46]. Yu [47] proposed a collaborative design framework using the X3D operation models for conflict detection and resolution.Cheng [19] extended commutative replicated data type (CRDT) capability to meta operation conflict resolution from 1D to 3D applications.Cai [48] developed a homogeneous CAD online integrated system.The relationships between collaborative CAD modeling operations are divided into commutative and non-commutative.Concurrency control and result consistency maintenance are realized.
Due to the current mainstream CAD system having adopted the historical parametric feature modeling technology, modeling history information is useful and important for Co-CAD, such as for reverse engineering design analysis or as important modeling knowledge sharing [49].The existing Co-CAD solutions lack the consideration of modeling history consistency.Divergent modeling history in each collaborative site would recede the significance of modeling history.Moreover, traditional Co-CAD consistency methods have the disadvantages of inflexible interaction or problems with geometric computation and collaborative naming.These shortcomings impede the widespread adoption and acceptance of Co-CAD.Therefore, this paper aims at not only a convenient and valid solution for the consistent modeling result in Co-CAD, but also the maintenance of modeling history consistency.

Overall Methodology and Related Concepts
The most basic goal of Co-CAD is to get consistent results through collaborative design operations from all collaborative sites, which is similar to co-editing.In Co-CAD, the co-operation objects are shaped 3D models, different from characters in co-editing.Hence, it is not possible to apply collaboration consistency maintenance methods directly.Before proposing the Co-CAD synchronization methodology, some related definitions and concepts in Co-CAD process are presented.

Related Definitions in Co-CAD Modeling
According to Lamport's "happened-before" theoretical basis [50], this paper presents the following set of definitions used in collaborative CAD processes, including features, state vectors, modeling operations, result models, causality, concurrency, and partial concurrency.
Definition 1. Features.The generalized conception of features is a geometrical entity that is meaningful to design or manufacturing activities.The narrow concept of features is the basic modeling operations provided by mainstream commercial CAD systems to reflect specific engineering semantics, such as convex, shell, fillet, and so on.

Dependency between Features
CAD systems are complex constraint systems and the mainstream CAD systems take modeling features as operating granularity.Therefore, in order to judge the relationship between modeling operations, this paper analyzes the constraint relationship between features.It is known that the constraint relationship between the features is dependency.While dealing with concurrent operations, it is necessary to judge whether there is a dependent relationship between the features of the remote operation and the features of the local operation.Then, the concurrent processing can be executed.
Figure 3 shows the feature-based modeling procedure of the cover of a gear pump, which includes 10 modeling steps.The dependent relationship of features can be mapped onto a directed graph, called a feature-dependent graph.When multiple sites execute modeling tasks collaboratively, each site maintains a collaborative feature-dependent graph (CoFDG).According to the feature dependencies in the model of Figure 3, the feature-dependent graph is shown in Figure 4.A featuredependent graph has three important characteristics: partial order, transitive, and acyclic.

Dependency between Features
CAD systems are complex constraint systems and the mainstream CAD systems take modeling features as operating granularity.Therefore, in order to judge the relationship between modeling operations, this paper analyzes the constraint relationship between features.It is known that the constraint relationship between the features is dependency.While dealing with concurrent operations, it is necessary to judge whether there is a dependent relationship between the features of the remote operation and the features of the local operation.Then, the concurrent processing can be executed.
Figure 3 shows the feature-based modeling procedure of the cover of a gear pump, which includes 10 modeling steps.The dependent relationship of features can be mapped onto a directed graph, called a feature-dependent graph.When multiple sites execute modeling tasks collaboratively, each site maintains a collaborative feature-dependent graph (CoFDG).According to the feature dependencies in the model of Figure 3, the feature-dependent graph is shown in Figure 4.A feature-dependent graph has three important characteristics: partial order, transitive, and acyclic.

Dependency between Features
CAD systems are complex constraint systems and the mainstream CAD systems take modeling features as operating granularity.Therefore, in order to judge the relationship between modeling operations, this paper analyzes the constraint relationship between features.It is known that the constraint relationship between the features is dependency.While dealing with concurrent operations, it is necessary to judge whether there is a dependent relationship between the features of the remote operation and the features of the local operation.Then, the concurrent processing can be executed.
Figure 3 shows the feature-based modeling procedure of the cover of a gear pump, which includes 10 modeling steps.The dependent relationship of features can be mapped onto a directed graph, called a feature-dependent graph.When multiple sites execute modeling tasks collaboratively, each site maintains a collaborative feature-dependent graph (CoFDG).According to the feature dependencies in the model of Figure 3, the feature-dependent graph is shown in Figure 4.A featuredependent graph has three important characteristics: partial order, transitive, and acyclic.(1) Partial order Partial order means the arbitrary dependency between two features are unidirectional, rather than mutual.There are two features, feature1 and feature2, in the model.If feature1 depends on feature2, feature2 does not depend on feature1, that is: feature1 < feature2 => feature2 ≮ feature1.
(3) Acyclic Acyclic means that there is no cyclic dependency among the features of the model.Set three arbitrary features in the model: feature1, feature2, and feature3; if feature1 depends on feature2 and feature2 depends on feature3, then feature3 certainly does not depend on feature1.
In CAD systems, dependencies among features are established according to the feature modeling procedure.Only newly created features depend on existing features in the model, but an existing feature depends on a newly created feature or a feature not created yet.

Operation Queue
When a local modeling operation is executed on a collaborative site, the local site generates the corresponding modeling operation command and then sends it to other collaborative sites.According to Definition 3, the modeling operation command is <S, SV, Feature(O), T(O)>; these commands will be saved to the two queues.


Collaborative Feature Operational List (CoFOL) Each collaborative site holds a CoFOL for storing the executed operations.The executed modeling operation commands are stored in the CoFOL in accordance with their execution sequence.


Collaborative Waiting Operational List (CoWOL) Each collaborative site holds a CoWOL for storing operations waiting for execution.Those modeling operating commands that do not meet the execution conditions (e.g., non-causal) are placed in an execution queue, CoWOL.When the execution condition is satisfied, the operation command is removed from the CoWOL and executed.(1) Partial order Partial order means the arbitrary dependency between two features are unidirectional, rather than mutual.There are two features, feature 1 and feature 2 , in the model.If feature 1 depends on feature 2 , feature 2 does not depend on feature 1 , that is: feature 1 < feature 2 => feature 2 < feature 1 .
(2) Transitivity Transitivity means the transmission of feature dependency is unidirectional.Set three arbitrary features in the model: feature 1 , feature 2 , and feature 3 ; if feature 1 depends on feature 2 and feature 2 depends on feature 3 , then feature 1 depends on feature 3 , that is: feature 1 < feature 2 &&feature 2 < feature 3 => feature 1 < feature 3 .Among them, feature 1 is directly dependent on feature 2 and feature 1 is indirectly dependent on feature 3 .
(3) Acyclic Acyclic means that there is no cyclic dependency among the features of the model.Set three arbitrary features in the model: feature 1 , feature 2 , and feature 3 ; if feature 1 depends on feature 2 and feature 2 depends on feature 3 , then feature 3 certainly does not depend on feature 1 .
In CAD systems, dependencies among features are established according to the feature modeling procedure.Only newly created features depend on existing features in the model, but an existing feature depends on a newly created feature or a feature not created yet.

Operation Queue
When a local modeling operation is executed on a collaborative site, the local site generates the corresponding modeling operation command and then sends it to other collaborative sites.According to Definition 3, the modeling operation command is <S, SV, Feature(O), T(O)>; these commands will be saved to the two queues.

•
Collaborative Feature Operational List (CoFOL) Each collaborative site holds a CoFOL for storing the executed operations.The executed modeling operation commands are stored in the CoFOL in accordance with their execution sequence.

•
Collaborative Waiting Operational List (CoWOL) Symmetry 2017, 9, 59 7 of 20 Each collaborative site holds a CoWOL for storing operations waiting for execution.Those modeling operating commands that do not meet the execution conditions (e.g., non-causal) are placed in an execution queue, CoWOL.When the execution condition is satisfied, the operation command is removed from the CoWOL and executed.

Overall Methodology
In text-based co-editing, as long as the co-editing result is consistent, the order of operations of each site is irrelevant and insignificant.In Co-CAD, the order of operations for each site has greater significance for the following reasons: (1) Modeling features have a dependent relationship.Therefore, operations executed on features with dependency should follow the dependent relationship to keep a valid modeling procedure.As shown in Figure 5, the extruded cut feature depends on the initial boss feature.So, in the modeling procedure, the extruded cut must be executed after the creation of the boss feature.
Otherwise, the cut operation is meaningless and non-executable.
(2) Modeling operations may interact with each other.A different order of operations could lead to various modeling results.As shown in Figure 5, the different order of operations for the extruded cut and extruded boss create a dissimilar results model.Hence, a reasonable and unique modeling order should be determined in each site to produce consistent modeling results.(3) Moreover, during collaborative design, modeling operations from different sites may cause operational conflicts.As shown in Figure 6, operation O 1 creates a rib feature in the slot of the initial model.O 2 modifies the width of the initial model.Suppose O 1 and O 2 are from collaborative sites.Both operations are executable at their own sites but would trigger operational conflict because the rib does not intersect with the model after O 2 .In this situation, some operations are selected to be executed while others have to be revoked; all sites should conform to the same operation selection in their modeling procedure to maintain the consistency of the collaborative design results.In the case of Figure 6, either O 1 or O 2 has to be abandoned, and the other one is chosen to be executed.(4) The design history of a model is important information in Co-CAD, such as for the aspects of model reuse, modeling knowledge, intent sharing and so on.Therefore, it is important to maintain a consistent modeling history in each site of Co-CAD.

Overall Methodology
In text-based co-editing, as long as the co-editing result is consistent, the order of operations of each site is irrelevant and insignificant.In Co-CAD, the order of operations for each site has greater significance for the following reasons: (1) Modeling features have a dependent relationship.Therefore, operations executed on features with dependency should follow the dependent relationship to keep a valid modeling procedure.As shown in Figure 5, the extruded cut feature depends on the initial boss feature.So, in the modeling procedure, the extruded cut must be executed after the creation of the boss feature.Otherwise, the cut operation is meaningless and non-executable.
(2) Modeling operations may interact with each other.A different order of operations could lead to various modeling results.As shown in Figure 5, the different order of operations for the extruded cut and extruded boss create a dissimilar results model.Hence, a reasonable and unique modeling order should be determined in each site to produce consistent modeling results.
(3) Moreover, during collaborative design, modeling operations from different sites may cause operational conflicts.As shown in Figure 6, operation O1 creates a rib feature in the slot of the initial model.O2 modifies the width of the initial model.Suppose O1 and O2 are from collaborative sites.Both operations are executable at their own sites but would trigger operational conflict because the rib does not intersect with the model after O2.In this situation, some operations are selected to be executed while others have to be revoked; all sites should conform to the same operation selection in their modeling procedure to maintain the consistency of the collaborative design results.In the case of Figure 6, either O1 or O2 has to be abandoned, and the other one is chosen to be executed.(4) The design history of a model is important information in Co-CAD, such as for the aspects of model reuse, modeling knowledge, intent sharing and so on.Therefore, it is important to maintain a consistent modeling history in each site of Co-CAD.With the consideration of the pivotal role of the order of operations in Co-CAD, this paper proposed a Co-CAD synchronization model based on symmetric and consistent order of operations, as shown in Figure 7.The model maintains the causality of operations from local and remote sites.A concurrency control strategy is proposed to determine the unique order of operations within a concurrency relationship.Operations that would cause conflicts are abandoned for the validity of modeling.

Extruded Boss
Based on the consolidated causality order and concurrency processing, with the help of undo and redo operations, a symmetric and valid modeling procedure can be formed in all sites of Co-CAD.Consequently, with the same order of operations, unique modeling results could be obtained at each site.As a result, a valid model is obtained by collaborative design operations and each site of the Co-CAD maintains a consistent modeling history.With the consideration of the pivotal role of the order of operations in Co-CAD, this paper proposed a Co-CAD synchronization model based on symmetric and consistent order of operations, as shown in Figure 7.The model maintains the causality of operations from local and remote sites.A concurrency control strategy is proposed to determine the unique order of operations within a concurrency relationship.Operations that would cause conflicts are abandoned for the validity of modeling.

Symmetric
Based on the consolidated causality order and concurrency processing, with the help of undo and redo operations, a symmetric and valid modeling procedure can be formed in all sites of Co-CAD.Consequently, with the same order of operations, unique modeling results could be obtained at each site.As a result, a valid model is obtained by collaborative design operations and each site of the Co-CAD maintains a consistent modeling history.With the consideration of the pivotal role of the order of operations in Co-CAD, this paper proposed a Co-CAD synchronization model based on symmetric and consistent order of operations, as shown in Figure 7.The model maintains the causality of operations from local and remote sites.A concurrency control strategy is proposed to determine the unique order of operations within a concurrency relationship.Operations that would cause conflicts are abandoned for the validity of modeling.
Based on the consolidated causality order and concurrency processing, with the help of undo and redo operations, a symmetric and valid modeling procedure can be formed in all sites of Co-CAD.Consequently, with the same order of operations, unique modeling results could be obtained at each site.As a result, a valid model is obtained by collaborative design operations and each site of the Co-CAD maintains a consistent modeling history.

Causality Maintenance
According to Definition 5, there is a causality relationship between any two operations sent by one site.Suppose a local site S i sends out a series of operations O 1 , O 2 , . . ., O n .When O n reaches remote site S j , if the current state vector on site S j and the state vector of operating O n satisfy: SV On [i] = SV j [i] + 1 and SV On [k] < SV j [k], k ∈ {1, 2, . . ., K}, k = i, the operations sequence of S j satisfies the causality of O n .Namely, operations sequence O 1 , O 2 , . . ., O n−1 from S i have been fully executed on site S j .These conditions ensure that all operations prior to O n have been fully executed on S j .

Partial Concurrency Processing and Concurrent Operation Retrieving
Operations of collaborative text editing have a strict linear structure (depending on the location relationships among operations).The collaborative CAD modeling operations do not depend on the location relationship.Each site executes operations disorderly, without considering the impact of partial concurrency relationships on the collaborative modeling process.However, a partial concurrency relationship is one of the important reasons for inconsistent modeling history.The key to dealing with partial concurrency is to find the concurrent operation set of remote sites.
Scanning the CoFOL of the site (starting from the queue header), the location of modeling operations that are concurrent with remote operations can be retrieved based on the SV, denoted as n 1 .At this point, first execute an undo operation for all the modeling operations after n 1 in CoFOL.Concurrency control is then executed based on concurrent relationships between operation CoFOL[n 1 ] and operation O. Finally, execute a redo operation for all the undone modeling operations in CoFOL.The executed operations may cause the redo operation unable to be excuted.In this situation, the redo operation needs to be canceled.

Symmetric Concurrency Relationship Control Strategy
According to Definition 6, concurrent operations are executed on the same model state.On some occasions, concurrent operations reflect the concurrent collaboration of co-designers.On the other hand, diverse design intents from different sites may cause modeling conflicts.Hence, a concurrency control strategy is needed in collaborative design to maintain concurrent design intentions and avoid operational conflicts.Moreover, to maintain the consistency of the modeling history, the sequence of concurrent operations should be determined.
Set O a and O b are sent by site S i and site S j , respectively, and O a O b .When O a arrives at S j , O a has been executed in site S i .Similarly, when O b arrives at S i , O b has been executed in site S j .Set S i is the local site and if in S i , O a is executed before O b , denoted as O a O b , then result model is denoted as Result(O a O b ).Both O a and O b belong to {creation, modification, deletion}.Therefore, based on the operation type of O a and O b , there are nine situations for a concurrent operation pair, as shown in Figure 8.In Figure 8, the vertically listed capital letters "C,M,D" represent creation, modification, and deletion respectively, which are the three possible types of the local operation O a .Likewise, the horizontal "C,M,D" means the three possible types of the remote operation O b .Each grid table at the intersections of vertical and horizontal "C,M,D" represents one concurrent operation situation.For example, the grid table at the intersection of vertically listed C and horizontally listed M indicates that, in this situation, O a is a creation operation and O b is a modification operation.
After the classification of concurrent operations by type, the concurrent result should be further judged.For each concurrent operation pair, three factors are considered as the judging conditions of the concurrency control strategy: (1) Whether the operations are executed on the same modeling feature, denoted as "F" in the grids in Figure 8; (2) Whether the topological entities referenced by the remote operation exist, denoted as "T" in the grids in Figure 8; (3) Whether the features that are executed have a dependent relationship, denoted as "D" in the grids in Figure 8.
Symmetry 2017, 9, 59 10 of 20 (3) Whether the features that are executed have a dependent relationship, denoted as "D" in the grids in Figure 8.The grids in Figure 8 show the judging situations of concurrent operation pairs.The mark "√" in the grid table means the condition is satisfied while "×" means it is not.The three conditions should be judged according to a certain order-first F, then T, and finally D-as shown in Figure 8.In some cases, if not all factors need to be considered, then "/" is marked in the grid.For example, when Oa creates a new feature and Ob modifies an existing feature, they are surely not executed on the same feature.So Condition (1) is not necessary in this situation.
If the concurrent operations may cause conflict, the operation with higher priority is executed while the one with lower priority should be canceled to avoid conflicts.When concurrent operations can co-exist, to maintain a consistent modeling history, the operation with higher priority is executed before the one with lower priority.The operational priority can be determined by various factors.This paper uses site priority and dependency priority to determine the operational priority of concurrent operations.The operation from the site with higher priority or at the higher level of the collaborative feature-dependent graph has higher operational priority.When an operation is canceled or the order of operations is changed for consistency, the undo and redo mechanisms are needed.
The concurrency control solution of each judging result is shown in the last row of grid tables, denoted as S. The numbers 1, 2, 3, 4, and 5 indicate five different solutions.To illustrate the solutions, set Si has a higher site priority and Oa has higher dependency priority.The five solutions are: (1) Both operations are executed; rank the order of operations according to site priority.In Si, there is OaOb.In Sj, first execute an undo operation to Ob, then execute Oa, finally redo Ob.The final order of operations is OaOb and the result is Result(OaOb).
(2) Execute the operation from the site with higher priority.In Si, Ob is undone.In Sj, Ob is undone and Oa is executed.The final order of operations is Oa and the result is Result(Oa).
(3) Execute the operation with higher dependency priority.In Si, Ob is undone.In Sj, Ob is undone and Oa is executed.The final order of operations is Oa and the result is Result(Oa).
(4) Both operations are executed and ranked according to dependency priority.In Si, there is OaOb.In Sj, first execute an undo operation to Ob, then execute Oa, finally redo Ob.When we redo Ob, The grids in Figure 8 show the judging situations of concurrent operation pairs.The mark " √ " in the grid table means the condition is satisfied while "×" means it is not.The three conditions should be judged according to a certain order-first F, then T, and finally D-as shown in Figure 8.In some cases, if not all factors need to be considered, then "/" is marked in the grid.For example, when O a creates a new feature and O b modifies an existing feature, they are surely not executed on the same feature.So Condition (1) is not necessary in this situation.
If the concurrent operations may cause conflict, the operation with higher priority is executed while the one with lower priority should be canceled to avoid conflicts.When concurrent operations can co-exist, to maintain a consistent modeling history, the operation with higher priority is executed before the one with lower priority.The operational priority can be determined by various factors.This paper uses site priority and dependency priority to determine the operational priority of concurrent operations.The operation from the site with higher priority or at the higher level of the collaborative feature-dependent graph has higher operational priority.When an operation is canceled or the order of operations is changed for consistency, the undo and redo mechanisms are needed.
The concurrency control solution of each judging result is shown in the last row of grid tables, denoted as S. The numbers 1, 2, 3, 4, and 5 indicate five different solutions.To illustrate the solutions, set S i has a higher site priority and O a has higher dependency priority.The five solutions are: With the proposed synchronization model, collaborative operations that may cause conflict will be discarded.So the resulting model will be a valid one.
In the CoFOL of each site, the operations follow the causality based on modeling state vectors.To those concurrent operations with the same state vectors, the proposed concurrent control strategy gives the operation selection or order solutions for every concurrent situation.
The causality of operations is the same at different sites.Moreover, the operation selection or order of concurrent operations is unique according to the proposed concurrent control strategy.Combining these two aspects, the CoFOL of each Co-CAD site is identical, which means the modeling procedure is consistent and symmetric among different sites.With symmetric modeling for the order of operations, consistency is achieved in Co-CAD.

Operation Execution of Local and Remote Site
The proposed symmetric synchronization for Co-CAD includes local site execution and remote site execution.Local operation is executed immediately for high response and the state vector should be updated (SV i [i++]).Meanwhile, the operation is sent to other remote sites.
Figure 9 shows the remote site execution procedure.To maintain the causal relationship for all sites, if the operations before the remote operation (causal operations) have not been fully integrated into CoFOL, add this operation to CoWOL until the causality relationship is fully satisfied.When the causality of the received remote operation is fully satisfied, if the remote operation is partially concurrent, partial concurrency processing is required.If the remote operation is concurrent, it is necessary to retrieve the operation that has been executed and is concurrent to the remote operation in current site, then use the concurrency control strategy for processing.
Symmetry 2017, 9, 59 11 of 20 it may be not executable because of Oa.In this situation, Ob needs to be abandoned.So, the final order of operations is OaOb or Oa and the result is Result(OaOb) or Result(Oa).
(5) Both operations are executed and ranked in reversed order of site priority.In Si, first execute an undo operation to Oa, then execute Ob, finally redo Oa.In Si, there is ObOa.When we redo Oa, it may be not executable because of Ob.In this situation, Ob needs to be abandoned, then we can redo Oa.So, the final order of operations is ObOa or Oa and the result is Result(ObOa) or Result(Oa).
With the proposed synchronization model, collaborative operations that may cause conflict will be discarded.So the resulting model will be a valid one.
In the CoFOL of each site, the operations follow the causality based on modeling state vectors.To those concurrent operations with the same state vectors, the proposed concurrent control strategy gives the operation selection or order solutions for every concurrent situation.
The causality of operations is the same at different sites.Moreover, the operation selection or order of concurrent operations is unique according to the proposed concurrent control strategy.Combining these two aspects, the CoFOL of each Co-CAD site is identical, which means the modeling procedure is consistent and symmetric among different sites.With symmetric modeling for the order of operations, consistency is achieved in Co-CAD.

Operation Execution of Local and Remote Site
The proposed symmetric synchronization for Co-CAD includes local site execution and remote site execution.Local operation is executed immediately for high response and the state vector should be updated (SVi[i++]).Meanwhile, the operation is sent to other remote sites.
Figure 9 shows the remote site execution procedure.To maintain the causal relationship for all sites, if the operations before the remote operation (causal operations) have not been fully integrated into CoFOL, add this operation to CoWOL until the causality relationship is fully satisfied.When the causality of the received remote operation is fully satisfied, if the remote operation is partially concurrent, partial concurrency processing is required.If the remote operation is concurrent, it is necessary to retrieve the operation that has been executed and is concurrent to the remote operation in current site, then use the concurrency control strategy for processing.

Case Study
A case study of collaborative design application is shown to verify the maintenance of consistency.In this case study, set site S 0 and site S 1 are two collaborative sites to design a gear pump base.Because the case study contains many operations, the whole collaboration process is shown in Figures 10-13.In these figures, the collaborative design procedures of the two sites are on the left side and the dashed boxes on the right side show the modeling history.The capital letters "C", "M," or "D" under each operation indicate the operation type, as in Figure 8. SolidWorks is chosen as the CAD systems.Set Priority(S 0 ) > Priority(S 1 ) and both sites store a shared model.

Case Study
A case study of collaborative design application is shown to verify the maintenance of consistency.In this case study, set site S0 and site S1 are two collaborative sites to design a gear pump base.Because the case study contains many operations, the whole collaboration process is shown in Figures 10-13.In these figures, the collaborative design procedures of the two sites are on the left side and the dashed boxes on the right side show the modeling history.The capital letters "C", "M," or "D" under each operation indicate the operation type, as in Figure 8. SolidWorks is chosen as the CAD systems.Set Priority(S0) > Priority(S1) and both sites store a shared model.In Figure 10, O0,1 from S0 creates an extruded boss (Feature(O0,1)).O0,2 created an extruded cut (Feature(O0,2)) on Feature(O0,1).In S1, O1,1 create an extruded boss (Feature(O1,1)) and an extruded cut (Feature(O1,2)) on the arrived Feature(O0,1).

General Discussion
In our work, the local operations are executed immediately and directly sent to other sites.So the burden of network transmission and response time of each site is effectively reduced.In a Thus, in S 0 and S 1 , a consistent result model is generated collaboratively by symmetric operations and the modeling history is consistent in both sites.

General Discussion
In our work, the local operations are executed immediately and directly sent to other sites.So the burden of network transmission and response time of each site is effectively reduced.In a centralized architecture, every site is required to send operations to a centralized server and the server broadcasts operations to all sites.
The authority-based methods (such as lock mechanisms and floor mechanisms) can also maintain consistent order of operations by giving editing authority to one user at a time.The proposed method supports multi-user editing of the shared CAD model simultaneously.
The proposed method uses a symmetric operation procedure for modeling consistency.All the operations are based on the granularity of modeling features.The method is more convenient than the OT-based replicated Co-CAD method, which requires complex geometry computation and collaborative naming methods.
More specific discussions are given in the following sub-sections.

Architecture and Strategy
This paper maintains a consistent modeling order of operations to achieve consistent result.The difference between this paper and the most closely related reference [13] is that our method is based on peer-to-peer replicated architecture, in which we have to face new technical challenges.The detailed differences are analyzed and compared as follows.
Firstly, [13] adopts a replicated architecture with a centralized server used to coordinate the collaborative CAD operations and sends the global order of operations to all design sites.Therefore, the modeling history of each site is automatically consistent.By contrast, our paper is based on peer-to-peer replicated architecture, in which there is no centralized server.Hence, our work emphasizes how to maintain consistent modeling history in collaborative design and researches on the convenient approach that can achieve Co-CAD consistency for every Co-CAD site.Then, a set of operation ordering rules is proposed to keep operations in a consistent and valid order in all sites.Consequently, with consistent operational order maintained in every site, the consistency of both history and results is achieved.
Secondly, [13] uses the time that operations come to the server as the fundamental judgement criterion.The coordination of operations from design sites is achieved by the matching and updating of the Operation Sequence Number (OSN) on the service and received operational sequence number (ROSN) on the client.Our paper introduces some proper technique issues for the peer-to-peer replicated architecture.The state vector is used in Co-CAD to indicate modeling status.Based on the state vector, three operational relationships, causality, concurrency, and partial concurrency, are determined.Operation sequence is re-organized based on the operational relationship in each site.The order of operations must conform to causality at first.In partial concurrency processing, the concurrent operation of a received remote operation can be found in the operational sequence.To the concurrent operations, we proposed the symmetric concurrency relationship control strategy to determine the order of operations.The site priority and operation dependency are both used as judgment criteria.

Conflict Resolution
The conflict resolution mechanism is an important part of Co-CAD systems.Operational conflicts can be classified as different types based on different taxonomies.For example, according to [13], operational conflict can be classified into two types, "a semantic conflict is caused by valid operations which violate the design intent of a model, leading to redundant work; a syntactic conflict happens between operations that cause one or more operations to become invalid" [13] (p. 2).This manuscript keeps the above roadmap and presents a novel approach to ensure consistent and valid modeling results in Co-CAD.
For semantic conflict, it is difficult for a Co-CAD system to determine whether the design intent is correct or not.The fundamental function of the system is to maintain consistent results for all of sites/users.The "consistent results" can be "correct" or "not correct" from the view of design intent.After a number of human-human interaction [7,19] processes, the sites/users can reach a compromised result.Because the mutual perception (collaborative awareness) is an important issue to support human-human interaction processes, we try to preserve the operations as much as possible.Then, when semantic conflict occurs, the designers can observe it.Therefore, the semantic conflict will finally be resolved by the designers themselves.
Potential syntactic conflicts are detected during the process of operation ordering in this paper.Three judging conditions (the existence of a referenced topological entity, the operational object, and the dependent relationship) are presented to determine whether there will be a conflict taking place when executing concurrent remote operations.Syntactic conflict means that collaborative operations are mutually exclusive.In other words, one or more operations cannot be executed.So at least one of the conflicted operations has to be discarded in order to maintain the feature validity.Therefore, the next key issue is how to determine which one to abandon.Our method uses site priority and dependency priority as the determination criteria.The above judging conditions and determination criteria are based on the essential execution conditions of feature operation and reasonable Co-CAD design scene.

Conclusions
This paper proposed a novel synchronization mechanism for Co-CAD with the consideration of modeling history.Relationships of collaborative operations are analyzed first.Modeling state vector and operation queue are used for causality relationship maintenance, partial concurrency processing, and retrieving concurrent operation.A symmetric concurrency relationship control strategy is proposed to determine the concurrent operation sequence.For every possible situation of concurrent operations, a corresponding solution is given based on the proposed judging conditions and operational priority.The strategy sorts the execution order of concurrent operations, and determines operations that may cause conflicts.
After processing collaborative operations by the proposed method, a symmetric and consistent modeling procedure is generated in each Co-CAD site.Thereby, the consistency of both modeling results and procedures is achieved.The design intents of all sites are preserved, except for those that will lead to operational conflict.The proposed mechanism is effective, convenient, and practical.
As to future research directions, firstly it is necessary to accelerate and optimize the proposed method with paralleling computing [52][53][54][55][56] and intelligent computing [57][58][59][60] because the frequent use of undo and redo operations will increase computational costs.Secondly, the security problem in collaboration design [61][62][63] will be researched in the future.Thirdly, discarding features for conflict resolution is not perfect for mutual perception in Co-CAD, so research can be improved to preserve design intents from all collaborative sites as much as possible.Fourthly, we also want to extend our method to a hybrid synchronous CAD environment [8].Finally, we also want to extend the symmetryand consistency-related methods to other areas of science and technology [64][65][66][67][68][69][70][71].

Definition 3 .Definition 4 .Definition 5 .
Modeling operations.Collaborative CAD modeling operations O can be defined as <S, SV, Feature(O), T(O)>.S is the site that generates the modeling operation O. SV is the state vector of modeling operation O when being executed on site S. Feature(O) is the feature of modeling operation O on site S. T(O) is the type of modeling operations, including creation, modification, and deletion, denoted as T(O) ∈ {CREATION, MODIFICATION, DELETION}.Result model.Geometric result of a feature model after executing one or more modeling operations.Design history is stored in the feature model, and expressed as operation sequence.Each operation sequence corresponds to a final geometric result, and the final geometric result is represented by the boundary model.Causality relationship.Suppose there is an arbitrary pair of modeling operations O a and O b sent by site S i and S j and there are three conditions: (1) S i and S j are the same site, and O a is generated before O b ; (2) S i and S j are different sites, and O a is generated before O b in site S i ; (3) there is an operation O x , O a →O x and O x →O b .If and only if O a and O b satisfy any one condition above, there is a causal relationship between O a and O b (denoted as O a →O b ).

Figure 5 .
Figure 5.Effect of inconsistent modeling order.

( 1 )
Both operations are executed; rank the order of operations according to site priority.In S i , there is O a O b .In S j , first execute an undo operation to O b , then execute O a , finally redo O b .The final order of operations is O a O b and the result is Result(O a O b ).(2) Execute the operation from the site with higher priority.In S i , O b is undone.In S j , O b is undone and O a is executed.The final order of operations is O a and the result is Result(O a ).(3) Execute the operation with higher dependency priority.In S i , O b is undone.In S j , O b is undone and O a is executed.The final order of operations is O a and the result is Result(O a ).(4) Both operations are executed and ranked according to dependency priority.In S i , there is O a O b .In S j , first execute an undo operation to O b , then execute O a , finally redo O b .When we redo O b , it may be not executable because of O a .In this situation, O b needs to be abandoned.So, the final order of operations is O a O b or O a and the result is Result(O a O b ) or Result(O a ).(5) Both operations are executed and ranked in reversed order of site priority.In Si, first execute an undo operation to O a , then execute O b , finally redo O a .In Si, there is O b O a .When we redo O a , it may be not executable because of O b .In this situation, O b needs to be abandoned, then we can redo O a .So, the final order of operations is O b O a or O a and the result is Result(O b O a ) or Result(O a ).

Figure 9 .
Figure 9. Execution procedure of remote site algorithm.

Figure 9 .
Figure 9. Execution procedure of remote site algorithm.