Research on Interactive Routing of Cable in Virtual Environment

On the basis of analyzing the defects of existing design methods of cable wiring, the feasibility of interactive cabling design in virtual environment is pointed out. Based on the discrete control point, the geometric shape modeling method and the topological structure matrix modeling method based on the wire unit are presented. Adopt the method of real-time interactive cable modeling and wiring, explains the wiring process and control point positioning technology, and through the stratified multistage collision interference detection technology improve the authenticity of the wiring process and results. After the wiring design is completed, the statistical summary of the model information is compiled to generate various inventory reports to guide the actual production.


Introduction
Cable has a large proportion in complex mechanical and electrical products.It is widely used in aerospace.The importance of cable is not only reflected in its proportion in products, but also in the impact of product design cost and assembly quality; unreasonable cable wiring will lead to a substantial increase in the cost of product design, and will directly affect the reliability of products.At present, in the process of complex product development, usually after the rigid structure design is completed, physical test equipment is used to determine the cable laying path length and the binding and fixing scheme in the physical prototype, there are three shortcomings in the design method of the cable wiring based on simulation test: ① It is a serial design method, after the establishment of the physical prototype, the wiring design can be carried out, affecting the product design cycle.②It is a manual design method with low design efficiency and large labor intensity; ③ The amount of extraction of physical simulation and preservation of the design information, bring about very low accuracy of results.
The virtual reality technology provides a feasible technical approach for the optimization of wire cable by its good human-computer interaction interface and highly realistic visual environment.Cable wiring design of the virtual environment, refers to in the virtual reality environment with virtual prototype as the space constraints, according to the electrical system connection diagram, in a virtual environment to determine the routing path and topology of cable.The result of the wiring design is the direction of the cable in the three-dimensional space and the exact length of each section of the cable.The form of the design is the three-dimensional design model and the corresponding list of reports in the virtual environment (such as the list of raw materials).In the virtual environment of cable wiring design has three advantages.① belongs to parallel design method of cable wiring design and product design of parallel structure, shorten the product development cycle; ②belongs to the design method of man-machine cooperation, people-oriented, people is the leading cable wiring design, supplemented by a computer, and provides decision support for the environment the digital designer; ③ the design results, the data is accurate, and easy to save and transfer.
At present, the research of cable modeling and wiring in virtual environment mainly focuses on two aspects,one is the cable modeling based on physical properties under the virtual environment, the goal of this research is to simulate the axial deformation process of circular section cable under the action of external force, such as based on the inverse kinematics model of the cable length, cable mass model based on spring model; The second is the wiring cable which under the virtual environment, including artificial intelligence and human-computer interaction and automatic reasoning method .[1][2][3][4][5] The above research results have higher theoretical level, but it is difficult to get the actual application in the project, there have three reasons.① The cable model based on physical attributes has higher requirements on computer hardware.The defects of modeling theory itself often lead to instability of model dynamic behavior.② The artificial intelligence rationalistic method as a cable wiring the typical spatial planning problem, but because of unknown parameters, the feasible space is complex, it is difficult to determine the exact mathematical model of cable.③ the current research results, the human-computer interaction method, only for the topology of a simple cable (such as single cable), rarely consider the complex parts (such as cable consists of a plurality of wires the wire harness) modeling method of topology, and in practice there are a lot of topological structure of extremely complex cable.
The research adopts man-machine interactive cable layout design method and focuses on two aspects: ① Cable modeling method of virtual environment, create a unified general cable model, virtual environment by setting different parameters can be in the cable model in virtual environment, and this model can from two aspects of geometric shape and topology truly reflect the complex cable in engineering practice; ② The fast interactive wiring design technology of the cable in virtual environment includes man-machine interaction technology, precise positioning technology and realtime collision interferometer technology in the process of cable fast wiring design.

Modeling method of cable in virtual environment
Under the environment of virtual cable wiring design is the first work of cable model is set up, in general, the cable model should include management property, electrical function, geometric shape, topology structure and so on four aspects of the information.The management attribute and electrical function belong to the description type information.This article is not discussed in detail, and the modeling method of the geometry and topology of cable is discussed.

Variable length modeling method of cable geometry based on discrete control points
The cable is a flexible body typical of the process, the core process of virtual environment is to adjust the design of the overall and local spatial position.So the geometric model of cable should support flexible cable shape characteristics, and has good maneuverability, combined with the characteristics of development tools, the variable length modeling cable geometry method.
Variable length cable geometry modeling method of the so-called, refers to the representation of the flexible cable is composed of a series of discrete section center point (usually circular section) is connected to the spatial continuous line segments.The center points as the control points of spatial position of the cable,and the control points of the operation to achieve the cable the model of spatial position transformation.
The control points can be divided into position control points and interpolation control, connection geometry adjacent control points of the control points are connected, defined as follows: ① Point 2MAE 2018 position control: Control cable space position and attitude.The position control of a fixed and free two states, in the free state, according to actual needs, to dynamically change the position, and in the fixed state, it can't change its position.The interpolation control point: in order to control a bit more smoothly so as to improve the performance of the cable geometry model of cable the virtual degree introduced.The control points of connection: cable connecting adjacent control points (including position control points and interpolation control point) has a certain section characteristics of columnar swept volume.
In the wiring design process, when the control point of a cable model is manipulated, the position and pose of the adjacent control points do not change.It is only the control point that changes the position and length of the connector.Therefore, the length of the cable model is variable in the wiring design process.In engineering practice, the actual length of the cable is difficult to predict before completing the wiring design.Fig. 1 is a schematic diagram of a method for modeling cable length changes in a virtual environment.The left is the initial model of cable, including 5 control points and 4 control point connectors.The right is the result of the operation of the initial model in the wiring design process.

Matrix modeling method for complex cable topology based on traverse element
In the engineering practice, the cable parts are usual divided into four kinds: single cable, multi-core cable, flat cable and wire harness, and the wire is the basic unit of the cable.According to the different organization and arrangement of the wires in the four kinds of cables, the cable can be divided into two kinds according to the convenience of the data expression.One is a single wire, and the other is a wire harness.Harness includes trunk harness and branch harness.Flat cables and multicore cables are exceptions in the wiring harness, where flat cables are the main wire harness without a wire harness, and the wires in the main harness are flattened.Multicore cable is a wire harness for all branch wires that contain only one wire.
For the convenience of subsequent description, the concepts of wire elements, wires and harnesses are defined as follows: ① Wire element: A section of wire connected by a number of control points and control point connections.It is the basic unit of wire and the basic element of a wire harness; ② Wire: Wire consists of a plurality of unit from end to end; ③ Wiring harness: the main wire harness and the branch wiring harness are bundled together by a number of wire units belonging to different wires.The main wire harness includes a wire unit of all parts of the wire harness and wire harness from the trunk, branch wire harness or separated from other branches of a wire harness.Therefore, it contains only part of the wire harness element.For any one wire harness parts are available from three different perspectives to split data on the wire harness, respectively from the perspective of perspective and wire unit perspective, obtained are the parts list of wire harness harness wire, wire list contains the element matrix.
WIRE HARNESS Parts = {Wire harnessj}(j=1,2…n) (1) = {Wirei}(i=1,2…m) = {Wire elementij}(i=1,2…m, j=1,2…n) Where n is the number of wire harness included in the cable parts, j is the serial number of the harness.M the number of wires contained in the cable parts, and I is the serial number of the wire; For the wire element, the I is the serial number of the wire to which the wire unit belongs, and j is the serial number of the wiring harness to which it belongs.
If the wiring J does not contain a wire element that belongs to the wire I, The element wire element ij in the wire element matrix is null, that is, the wire element ij does not exist.The relation between the harness and the element matrix of the wire is shown in equation (2); The relation between the wire and the element matrix of the wire is shown in equation ( 3) 2 Fast interactive routing technology for cable in virtual environment

Real time creation of cable model in virtual environment
Generally speaking, the entity model in virtual environment mainly comes from two aspects.First, through standard neutral files (such as WRL or 3DS), the models built in other systems (such as 3DMAX) are imported into the virtual environment; Two is modeling through modeling engine in virtual environment.Cable is a flexible variable body, obviously second methods should be adopted, that is, modeling engine through modeling engine in virtual environment.In order to realize the wiring design in virtual environment, the cable modeling can be divided into two ways, one is the pre modeling, the original model firstly according to the input parameters of the designer create the cable, and then based on the original model of the operation to achieve the cable wiring design.The other is the real-time creation model, that is, the creation of the cable model and the wiring designed process synchronization, in the modeling at the same time, complete the cabling design of the cable.This paper focuses on the real-time modeling process of cable in virtual environment Real time modeling of virtual environment and refers to the specific process under the control by the way of human-computer interaction in the constrained space model by fitting a rigid structure, real-time dynamic process of determining the topology and geometry of the cable.A specific process control refers to the order in which the process of modeling is to be followed.such as: Build backbone cable-> Create a path point on the backbone cable-> Add branch cable Creates a path point on the branch cable.The so-called real-time dynamic determination of the topology and geometry of the cable, means that each control point in the cable is defined in real time.As a result, the geometry of the cable, which is connected by the control point, varies dynamically as the control point changes (including changes in number and position).In .theprocess of modeling, the topological structure of the cable is also constantly changing (such as the increase and decrease of branch cables).Therefore, there are two key technologies for real-time modeling of cable in virtual environment.One is the control of modeling process, and two is the control point location.
In a virtual environment, polygon (usually triangular) patches are the basic unit of geometric shape of a model, and are often the smallest geometric elements that can be selected by human-computer interaction devices.The cables are usual laid on the surface of rigid structural parts, So the process of determining the initial position of the control points is the process of defining the position relationship between the control points and the triangular patches of the surface of the structural model.In general, the designer selects the patches on the structure model through human-computer interaction devices (such as mouse).The location of control points is defined by defining the position relation ( fit and offset a certain distance) between control points and patches.
In a virtual environment, we can select a single slice, but it is difficult to select one point of the patch exactly, and we can only get the coordinates of the vertices of the patch.When the face film is small, the coordinate of any vertex can be taken as the approximate coordinate of the selected point for subsequent calculation.When the face is larger, the approximate method will lead to greater errors.In order to reduce the positioning error and ensure that the determined points are on the plane, approximate calculations of the selected point coordinates are carried out using a method as shown in Figure 2. ABC is a triangular patch on the surface of a structure in a virtual environment.D is the midpoint of the line segment , and E is the midpoint of the line segment .Formulas (4) and formulae (5) are formulas for calculating the coordinates of D points and E points respectively.Formulas (6), ( 7) and ( 8) are expressions of E, X, Y and Z coordinates respectively.
When defining the relation between the control point and the selected patch surface, the formula for calculating the position of the control point is formula (9).Where is the normal unit vector of the patch, and R is the radius of the control point, and represents the coordinates of points calculated according to formula (5); When the position between the control point and the selected patch is defined as offset distance D, the formula for calculating the position of the control point P is given as formula (10).Where is the normal unit vector of the patch, and R is the radius of the control point, and represents the coordinates of the points calculated according to the formula (5);

Multi slice real-time collision interference detection technology for cable in virtual environment
The cable is a flexible body, the wiring design process, model structure changing, and the system also need to deal with the events of the virtual environment to redraw the control point position calculation and refresh model, interpolation smoothing, and cable laying to tend to be formed by a rigid structure of the complex and narrow in the space.Therefore, in the virtual environment for cable wiring design, the collision interference detection algorithm speed and accuracy of higher requirements.
According to the above characteristics, a real-time collision detection algorithm for multi layer collision detection in virtual environment is proposed.Segmentation means that the cable model is divided into model segments consisting of several control points and control point connectors.When the interference is detected, the computation is reduced by segmentation of the model.In the case of single control point routing, we can first determine whether the model segment of the control point is in collision with the environment object.Returning if collision occurs, if no collision occurs, then the interference of other cable segments is checked The so-called "multi-level" means that in the process of conducting interference checks, the object and scope of interference checking should be refined and reduced from coarse to fine, so as to reduce the amount of calculation and improve the detection efficiency.
① Model pretreatment: Firstly, the cable model is divided into several model segments.The socalled models, refers to the number of control points and control points of a cable connector, and a plurality of geometry control points and control points of the model section contains the connecting body corresponding to a geometry.
② Model global bounding box detection, In the process of the model being manipulated, the interference between the model bounding box and the surrounding box of other objects in the environment is detected.If the interference does not occur, the model is adjusted according to the control intention of the designer.Enter step 3 if intervention occurs.
③ Model global bounding box detection: Turn on the cable model contains all models for interference checking bounding box level, if all the models are not interfere with objects in the environment, in accordance with the designer's intentions to model pose adjustment.If one of the model segments I and the other objects in the environment interfere with the interference of the box layer, we interrupt the step 3.In addition, the marking of the parts that interfere with the bounding box of the model segment is recorded and entered step 4 at the same time.
④ Rough detection of model segment surface level: Check all the patches contained in the model segment i, and the interference between the bounding box J of the part and the bounding box of the model segment, which is obtained in step 3.The model segment patches that do not interfere with the object J are filtered from the array of patches.Checking the interference between the patches in the object J and the bounding box of the i segment of the model segment, the patches in the object J are not filtered with the interference of the bounding box I of the model segment.If the patch array of the model segment I is empty with the part J patch array, the pose adjustment of the model is carried out according to the designer's manipulation intention.If not empty, go to step 5 ⑤ Model segment patch level accurate detection: All the facets in the patch array of the model segment I obtained in step 4 are intersected with all the facets in the component j patch array.If all the patches do not intersect, then adjust the pose of the model according to the designer's control intention.If there is a pair of intersecting patches, the designer's control intent can not be executed and the model returns to the previous frame.
The example shows that the algorithm of segmented multi layer interference detection has the characteristics of fast speed and high precision.It can meet the requirements of cable layout design in the virtual environment, and ensure the authenticity of the wiring design process.

PROTOTYPE SYSTEM
A virtual assembly system is developed by using WorldToolKit9.0 toolkit and VC++ 6.0.Cable wiring as a module of the system, the main functions have been achieved at present.Such as: ① Cable modeling; ②Interactive routing design; ③ Interference check;④ information management.Cable wiring is an important part in the development of aerospace products, and has a crucial impact on the reliability and development cycle of the entire product.Virtual reality technology provides a new technical route for cable routing in 3D visualization environment.The main results of this paper are as follows: ① A variable length cable modeling technique based on discrete control points is proposed, and the simplified expression of cable geometric appearance in virtual environment is realized.② A matrix modeling method for complex cable topology based on wire element is proposed.The unified expression of topological structure of complex cable parts is realized and it lays the foundation for the automatic statistics of the cable model information (such as wire length and wire root number).③ In this paper, we propose a multi segment interference detection technique for wired routing in virtual environments, which improves the routing process and the authenticity of routing results.

Figure1
Figure1(a)Typical structure of wire harness (b) Relation between wire harnessand wire element Figure 1(a) is a concise sketch of a typical structure of a cable component, ① of which is a trunk harness, and ② and ③ are branch wires drawn from ①, and ④ and ⑤ are branch harnesses derived from ③; The cable described in Figure 1 (b) is the same as in Figure 1 (a), and ① is bound by 10 wire elements belonging to 10 wires, ② are bundled by 3 wire units, and ③ are bound by 7 lead units; The ⑥ and ⑦ are 2 wire units belonging to the same wire, and the two wire elements are respectively bundled in the main wire harness ① and the branch wiring harness ②.