Refinement and Computation Method for Line/Body Topological Relationships

: Three-dimensional topological relationships serve as a theoretical foundation for quality control, update processing, and spatial analysis of three-dimensional spatial data in real-world three-dimensional GIS. The existing 3D topological relationship models are all basic relationship models that cannot distinguish the refined topological relationship between the line and the body with multiple intersections. In this study, we develop a 3D refined topological relationship description framework that draws from the two-dimensional refined topological relationship model, defines the unit intersection between the line and the body based on manifold topology, and proposes a method for describing the unit intersections between the line and the body considering Euler numbers and adjacency types. In total, 23 basic types between the line and the body are deduced. An example is provided to illustrate the distinguished refined topological relationship between the line and the body with multiple intersections. Subsequently, an algorithm for determining the basic type of line/body is developed. Finally, a line/body refined topological relationship computation prototype system is developed using the Nef polyhedron model, C++ language, and an open-source geometric algorithm library, and the effectiveness of our method is verified using actual building and pedestrian data.


Introduction
Three-dimensional (3D) geographic information has become important in our everyday life [1].A three-dimensional realistic geospatial scene is an important new infrastructure in our daily life, and its construction includes the establishment of the ground, underground, indoor, and outdoor geospatial framework of the three-dimensional structure and spatiotemporal relationships, etc. Three-dimensional topological relationships, as the most important and fundamental spatial relationships in a 3D GIS, serve as the theoretical foundation for quality control, updating processing, and spatial analysis of three-dimensional spatial data in realistic 3D construction and 3D GIS [2][3][4][5].
As topological relations are the most important spatial relations [6,7], many researchers have proposed several topological relationship models to distinguish the relations between two-dimensional objects, e.g., the 4-intersection (4I) model [8], 9-intersection (9I) model [9], the region connection calculus (RCC) model [10], the Voronoi-based 9-intersection (V9I) model [11], the Voronoi-based spatial algebraic model [12], and the Euler-number-based whole-object intersection and differences (E-WID) model [13].Clementini et al. proposed the dimension-extended 9-intersection model (DE+9IM) [14].Among the above models, 4I and 9I are widely applied in the GIS society, e.g., OGC lists the 9I model as a reference model for 2D topological relationships.Proposed by Egenhofer and Franzosa in 1991, 4I model is based on the point set topology theory [8], which decomposes spatial objects into interiors and boundaries where ∂A, A • , ∂B, and B • " respectively, represent the boundary and interior of A and the boundary and interior of B. The 4I model uses a 2 × 2 matrix to represent the topological relationships between objects, but its discriminatory ability is limited and, theoretically, capable of distinguishing only 16 types of topological relationships.Clementini et al. further proposed a dimension-extension-based 4I model, which, however, also has limited discriminatory ability [15].To overcome the limited discriminatory ability of the 4I model, Egenhofer and Herring introduced the exterior of spatial objects into the calculation of topological relationships where A − and B − , respectively, represent the exterior A and B. The 9I model uses a 3 × 3 matrix to represent the topological relationships between objects, theoretically capable of distinguishing 2 9 = 512 types of topological relationships.However, in practice, it can only distinguish 8 types of region/region, 19 types of line/region, 33 types of line/line, 3 types of point/region, 3 types of point/line, and 2 types of point/point topological relationships.
Due to the widespread influence of the 9I model in two-dimensional space and its relatively simple model structure compared with models created in the same period, it has been extended to three-dimensional space by multiple scholars.This extension has led to the development of methods for describing topological relationships between three-dimensional vector spatial entities, providing initial descriptions of basic topological relationship types between points, lines, regions, and bodies.For example, Zlatanova summarized the topological relationships between three-dimensional spatial entities that can be distinguished using the 9I model [5].Belussi et al. proposed a 3D vector model consisting of basic vector types, predicates, and operations to implement and test the 9I relationships between three-dimensional vector data [2].Clementini and Cohn extended RCC*-9 to adopt simplified 3D features and achieved 3D RCC*-9 relations [16].However, the aforementioned three-dimensional topological relationship models are basic relationship models that can only distinguish a very limited number of basic topological relationship types.They cannot yet distinguish the refinement types of topological relationships between 3D entities that contain multiple intersections.
In the context of the refinement of topological relationships involving multiple intersections, Egenhofer and Franzosa established the BBIS (boundary-boundary intersection set) model to describe refined relationships between regions [17].Li et al. introduced a hierarchical model for line/line relationships [18].Deng et al. introduced a multi-level relationship model for region/region relationships based on topological invariants [19].Chen Jun et al. proposed the topological chain model to describe refined relationships between lines, which they applied in conflict detection for rivers and contour lines [20].Zhou et al. developed the WWIS (whole-whole intersection set) model based on the intersection set operation results of spatial objects as a whole.They provided a comprehensive and distinct description of refined relationships between regions, lines, and lines/regions by using node degrees and Euler numbers [13,21].
In addition to the refined relationships mentioned above, Egenhofer et al. developed a model of conceptual neighborhoods' topological line-region relationships [6].Kurata et al. proposed the 9+-intersection model for directed line segments and regions [22].Tang et al. distinguished 152 kinds of topological relationships for simple fuzzy regions [23].Wu et al. proposed a model and computational method for describing relationships between lines and regions [24].Formica et al. proposed the directed polyline-polygon model [25].Zhou et al. proposed the 25I model by decomposing spatial objects into vertex, edge, face, interior, and exterior [26].Shen et al. introduced a topological relationship model that distinguishes between directed lines and directed regions [27] and the 27-intersection model in two-dimensional space [28].Based on the 9I model, Leng et al. proposed the generalized 9-intersection model for regions with multiple holes [29].Zhang et al. proposed a three-dimensional electronic navigation charts (3D ENC) feature spatial relation model (3DSRM) based on point-set topology theory, which combines 3D topological relations, distance relations, and directional relations [30].
In summary, the refined topological relationships between lines and bodies are still an open issue to date.Therefore, we propose a model to represent the refined topological relationships between lines and bodies using dimension information, Euler numbers, the number of intersections between the line and the body's boundary, predicates, and topological sequences in this study.As Zhou et al.'s WWIS + BBIS refined models, based on the intersection components of the spatial objects as a whole, along with their E-WID coarse model, have formed a complete framework for describing and computing two-dimensional topological relationships using manifold without theoretical deficiency, this framework has the potential to be extended to the 3D space.This study adopts the intersection component concept of this framework and, by defining the 3D line/body intersection component (unit intersection), develops a method to describe 3D line/body unit intersections and derive their types.It establishes an expression model for the refined relationships of 3D lines/bodies.Furthermore, it proposes a calculation algorithm for line/body topological relationships and implements the automatic calculation of line/body refined topological relationships by using an open-source geometric algorithm library.

Method for Refinement of Topological Relationships between Line and Body
As mentioned above, the existing 3D topological relationship model cannot distinguish the refinement relations between 3D objects with multiple intersections.However, in real application scenarios, there are many cases with multiple intersections, and different types of intersections often require different processing methods.In this section, we provide an application scenario first and then define the 3D object using the manifold and model the framework for refinement of topological relationships between the line and the body.

Application Scenario for Topological Relationships between the Line and the Body with Multiple Intersections
In the 3D real world, there are many real scenes where a line and a body have multiple intersections, e.g., an electric-power line, a water pipeline, a gas pipeline and a building.Furthermore, with the rapid development of indoor positioning technologies today, integrated indoor-outdoor navigation services have become a hot research topic in the GIS field.Constructing high-quality integrated indoor-outdoor pedestrian networks is a primary task for integrated indoor-outdoor navigation [31].While in the indoor-outdoor navigation system, there may be several intersections between a pedestrian pathway and a building (Figure 1). Figure 1 illustrates the integrations between indoor and outdoor pedestrian pathways and buildings.Currently, people generally utilize multi-source (including crowdsourced) data to generate integrated indoor-outdoor pedestrian pathways.However, due to the influence of data quality from multiple sources and indoor positioning accuracy, the generated integrated indoor-outdoor pedestrian pathway data often suffer from various quality issues.Figure 1 presents an example from the open-source dataset depicting the relationship between integrated indoor-outdoor pedestrian pathways and buildings in Hong Kong.In this dataset, buildings are represented as three-dimensional bodies while pedestrian pathways are abstracted as 3D lines.The core attributes of pedestrian pathways include features such as "Indoor" and "Outdoor".Figure 1a illustrates a two-dimensional projection of a building and a pedestrian pathway dataset.In this projection, p1 to p5 represent five nodes of the pedestrian pathway, while e1 to e4 represent the four segments formed by these five nodes.It is evident from Figure 1a that p1 and p5 are located outside the building, while p2, p3, and p4 are situated on the surface of the building.Additionally, e1 and e4 are positioned outside the building, while e2 and e3 are within.However, the attribute of this pedestrian pathway is labeled as "Indoor".Clearly, there are multiple intersections between the 3D building and the pedestrian pathway, with some of these intersections involving conflicts between topological and semantic attributes.During data quality inspection and processing, it is necessary to address each intersection separately based on its specific characteristics.For example, if p1 and p2 belong to the same point within the tolerance range, e1 can be deleted; otherwise, the attributes of e1 will be changed to "Outdoor".Similarly, if p4 and p5 are within the same point tolerance range, e4 can be removed; otherwise, its attribute should be changed to "Outdoor".Existing 3D basic topological relationship models for lines/bodies have not yet expressed the refinement of each intersection, making it challenging to support applications such as 3D conflict detection and processing involving multiple intersections.
According to the 2D WWIS refined topological relationship model proposed by Zhou et al., the detailed topological relationships between 3D entities with multiple intersections can be described by Equation ( 1): where m represents the number of unit intersections resulting from the whole-whole intersection set operation between spatial entities A and B. Ni, di, and ti (1 ≤ i ≤ m) denote the topological sequence number, dimension, and topological type of each unit intersection, respectively.This framework is applied in this study to differentiate the refined topological relationships between 3D lines and bodies.From Equation (1), it can be observed that the core issue in refined topological relationships between lines and bodies lies in defining and distinguishing the unit intersections of lines and bodies.Therefore, we first define the 3D body and line continuing to use manifold topology theory and then define unit intersections on this basis.

Definition of 3D Objects and Line/Body Unit Intersections with Manifold Topology
Given that manifold topology better aligns with the cognitive habits of individuals in the GIS field regarding spatial objects, Zhou et al. have adopted it to define two-dimensional objects and differentiate two-dimensional topological relationships.Due to the complexity of the geometric shapes and topological properties of three-dimensional spatial objects, the following sections initially utilize manifold topology to define 3D simple points, lines, bodies, and their interiors and boundaries [32,33] (see Figure 2).Definition 1: A simple point is a zero-dimensional manifold with only an interior and no boundary (Figure 2a).Definition 2: A simple body is a three-dimensional manifold with a connected interior and a connected boundary, and is homeomorphic to a solid cube (Figure 2b).Definition 3: A simple line is a one-dimensional manifold with a connected interior and two distinct boundary points (Figure 2c).
It should be noted that three-dimensional manifolds (bodies) can have tunnels or voids.Such three-dimensional manifolds with voids or tunnels are referred to as complex manifolds.For simplicity, we do not discuss complex manifolds in this article.Therefore, the lines and bodies studied here are topologically equivalent to connected, orientable, compact one-dimensional and three-dimensional manifolds.Thus, the unit intersections of lines/bodies can be defined as follows: Definition 4: Let A and B be the 3D body and line objects, respectively, and I be the largest connected subset of A∩B.Let P = {P 1 , P 2 , . .., P m } be a subset of I where P ∈ I.If P j (0 ≤ j ≤ m) is a zero-dimensional manifold (point), then Pj is a unit intersection (point) of A∩B.Let L = {l 1 , l 2 , . . . l n } where L ∈ I.If l i (0 ≤ i ≤ n) is a one-dimensional manifold (line) and the interior of l i equals the largest connected subset of ∂A∩l i or A • ∩l i , then l i is a unit intersection (line) of A∩B.Moreover, As shown in Figure 3, the intersection of body A and line B has four connected subsets, namely, the polyline (ab) (cdefg) and isolated points h and i.Among them, h and i are isolated points, and two unit intersections (points) of A∩B are marked as 6 and 7.According to the definition of unit intersections, the polyline (cdefg) needs to be subdivided into four unit intersections: cd, de, ef, and fg.Therefore, the four connected subsets of the intersection between body A and line B include seven unit intersections, namely, intersection lines ab, cd, de, ef, and fg, and intersection points h and i.The intersection lines can be preliminarily classified into three types: 1  ⃝ the interior of ab and endpoint a are inside body A, while endpoint b is on the boundary of A; 2  ⃝ the endpoints and interior of cd and ef are all on the boundary of A; 3  ⃝ the interior of de and fg is inside body A, and both endpoints are on the boundary of A. The connectivity of intersection points i and h is also different.The situation of line/body intersection points is relatively simple, as they can only intersect on the surface of the body, as shown in the two cases in Figure 3.However, the situation of line/body intersection lines can be much more complex.Obviously, in natural language, people often communicate whether the line and its endpoints are on the boundary of the body.It is relatively easy to identify whether the endpoint is on the boundary, but whether the line as a whole is on the boundary or inside the body cannot be determined solely by the endpoints.For example, the two endpoints of the intersecting lines cd, de, ef, and fg are all on the boundary of body A, but the intersecting lines ef and cd are on the boundary of body A, while de and fg are inside body A. It is noted that f E (A/ef ) = 1, f E (A/cd) = 1, f E (A/de) = 0, and f E (A/fg) = 0. Therefore, the Euler number can better distinguish these two cases.
Upon closer analysis of ed, fg, ef, and cd, it is evident that their connectivity status still differs, and this difference remains important in three-dimensional data conflict detection and processing.For instance, assuming line B represents a pedestrian walkway and A represents a building structure, although ef and cd are both on the boundary of A, the two segments of the pedestrian walkway connected by ef, namely, ed and fg, are both inside A, suggesting that ef is likely an indoor pedestrian walkway (such as an elevator or staircase) within the building.On the other hand, one end of the pedestrian walkway connected by cd is inside A, while the other end is outside A, indicating that cd is likely an outdoor pedestrian walkway.From Figure 3, it can be observed that each intersection line consists of two endpoints, and each endpoint may have different connectivity states.There may be no connecting line segment at the endpoint (denoted as null), as seen in endpoint a of intersection line 1 in Figure 3.The connecting line segment may be outside the body an object (denoted as out), as seen in endpoint b of intersection line 1 and endpoint c of intersection line 2 in Figure 3.The connecting line segment may lie on the boundary of the body object (denoted as on), as seen in both endpoints, e and d, of intersection line 3 in Figure 3.The connecting line segment may be inside the body object (denoted as in), as seen in both endpoints, e and f, of intersection line 4 in Figure 3. Therefore, this study distinguishes the types of line/body unit intersections based on the dimension of the unit intersection (f D ), the number of intersections between the endpoints of the intersection line and the body surface (f S ), the Euler number of the difference of the body with the unit intersection (f E ), and the connectivity state predicate of the endpoints of the unit intersection (f R ) (Equation ( 2)).
According to Equation (2), the basic types of line/body unit intersections can be derived based on the values of f D , f S , f E , f R .

Derivation of Basic Intersection Types
Clearly, in Equation ( 2), the values of the dimension of line/body intersection f D include only two cases: {0, 1}.The cases where the endpoints of the intersecting lines are on the surface of the body, denoted by f S , encompass three possible values: 0 indicates that neither of the endpoints of the intersecting line lies on the boundary of the body; 1 indicates that one endpoint of the intersecting line lies on the boundary of the body; and 2 indicates that both endpoints of the intersecting line lie on the boundary of the body.Assuming that the body is A and the intersection line is l i , the values of f E (A/l i ) include three cases: {0, 1, 2}; the predicate f R represents the connection types of the two endpoints of unit intersection, each containing four cases, {null, out, on, in}, totaling 16 cases.Therefore, there is a total of 2 × 3 × 3 × 16 = 288 possible types of line/body basic intersections.Below, the method of exclusion is used to eliminate meaningless cases.When f D = 1, f S = 2, and f E = 0, it means that the intersection line, except for its two endpoints, lies entirely inside the body.Each of the two endpoints can take one of four possible values: {null, out, on, in}.This results in a total of 16 meaningful combinations.There are 10 cases, excluding symmetric cases, as shown in Figure 4n-w.Therefore, there are a total of 2 intersection points and 21 intersection lines, resulting in 23 basic types between the line and the body (as illustrated in Figure 4).
The following section discusses the method for calculating the refined topological relationships between the line and body.

Refinement Relationship Computation
From Figure 4, it can be observed that among the 2 intersection points and 21 intersection lines between lines and bodies, the types of intersection points are entirely determined by the adjacency conditions "null, out" and "out, out".Among the 21 intersection lines, the adjacency conditions of their endpoints are expressed by "null, out, on, in", which play a crucial role in determining the basic types of intersection lines.Therefore, the following discussion focuses on the method of determining the adjacency relationships of intersection line endpoints.First, it is necessary to define the symbols and functions used in the computation of refinement relationships.
The Let Dim(i) denote the dimension of i, with possible values of 0 and 1: End(i) represents taking one endpoint of i; Cl(i) represents taking the closure of i; Adj(End(i)) denotes taking a point on the next line segment of B connected to the endpoint of i, specifically taking a point on the intersection of the surface of a small ball with radius ε centered at the endpoint of i and the next line segment of B. The method for determining the adjacency relationship of basic intersections is illustrated in Figure 5.As shown in Figure 5, the process for determining adjacency conditions in line/body refinement relationships is as follows: (1) Intersect the line object B with the boundary and interior of the body object A separately to obtain F and V and let I = F∪V.(2) Since, mathematically, the interior intersections in V of the line/body do not include points on the boundary of the body object A, some isolated points in the line/body boundary intersections F are not unit intersections of the line/body but rather boundary points at the closure of some intersection lines v i inside the line/body (i.e., endpoints of intersection lines that traverse the boundary of the body object in GIS).Therefore, we first need to extract these points from F, determining whether the closure of the elements v i in V intersects with these isolated points in F. If there is no intersection, the point is a unit intersection; otherwise, the point, along with its adjacent intersection line v i in the interior of the line/body, forms an intersection line of the line/body (with the point being an endpoint of the intersection line).Since this part constitutes derived points and is not a unit intersection of the line/body, it is marked for "discard" processing.(3) For the intersection points in F, their adjacency conditions still need to be determined.
The method is as follows: if the unit intersection point is on the boundary (endpoint) of the line object, then its adjacency predicate is "null, out" (as shown in Figure 4a); otherwise, its adjacency type is "out, out" (as shown in Figure 4b).( 4) For the unit intersection of lines, first extract the endpoints (End(i)).If this point is also a boundary point of the line object, then its adjacency predicate is "null" (as shown in Figure 4c-j,n-q); otherwise, take its adjacent point near this intersection endpoint by a distance ε (slightly larger than the tolerance) (Adj(End(i))) and determine the relationship between this adjacent point and the body object.If this adjacent point is outside the body object, then the adjacency predicate is "out" (as shown in Figure 4g,k, etc.).If this adjacent point is inside the body object, then the adjacency predicate is "in" (as shown in Figure 4m,u, etc.); otherwise, the adjacency predicate is "on" (as shown in Figure 4q,t,w, etc.).This process allows us to determine the adjacency type of all endpoints of the intersection lines one by one.
To determine the basic type of each intersection, we also need to determine the values of f E and f S in Equation (2).f S represents the number of intersections between the endpoints of the intersection lines and the surface of the body.In the method for determining the unit intersection adjacency relationship in Figure 5, we have already determined the relationship between each intersection endpoint and the boundary of the body object A, indirectly determining the value of f S .Next, we focus on discussing the method for determining f E .In theory, the Euler number of a three-dimensional manifold with a boundary can be calculated according to Equation (3): Thus, we can determine the basic type of each intersection line between the line and the body.Then, by sorting the unit intersections in the order from the starting point to the endpoint of the line object, we can obtain the expression of the refinement relationship between the involved line and the body.

Experimental Validation
To validate the effectiveness of the proposed model and algorithm in this study, we developed a prototype system for computing the refined topological relationships between simple lines and bodies by using the Nef polyhedron model [35][36][37], C++ language, QT framework, and the Computational Geometry Algorithms Library (CGAL).We conducted experiments by using real pedestrian walkway lines (including "Indoor" and "Outdoor" attributes) and building body data from Hong Kong for validation [38], which include 925 building bodies and 4409 pedestrian walkway lines (see Figure 6).For body data, open data include the three-dimensional coordinates of the building's base, the height of the building, and various attribute data such as the type of building, name, construction date, and area.For line data, the most important attribute information includes the threedimensional coordinates and position ("Indoor" or "Outdoor") of the line data.This also encompasses attributes such as name and length.The computation results are depicted in Figure 6, where blue represents buildings, green represents pedestrian pathways, pink denotes unit intersections, and purple indicates selected unit intersections.In Figure 6b, the column labeled "NefA" represents the involved buildings, "NefB" represents the pedestrian lines, "Order" indicates the sequence of basic intersections, and "Type" denotes the value of basic intersection types shown in Figure 4.For example, rows number "945" and "946" have the same NefA (A260999) and NefB (B12107), but different order "1" and "2", which indicates that there are two intersections between A260999 and B12107, and the type of value "1, 2, 0, in, out" corresponds to Figure 4s (same as "1, 2, 0, out, in").In total, there are 1519 unit intersections between pedestrian pathways and buildings, encompassing 20 types.After calculation, there are 227 lines that have 1 of the 23 basic types, but the attribute is labeled as "outdoor", which means that the topological relationship type of these 227 lines of data conflicts with the attribute data.Detailed information is provided in Table 1.

Conclusions and Discussion
The existing 3D topological relationship models are all basic relationship models that cannot distinguish the refined topological relationship between the line and the body with multiple intersections.Building upon the WWIS 2D topological refinement model, we have developed a 3D refinement of the topology description model for lines and bodies.This model defines the concept of line/body unit intersections and proposes a method for distinguishing between them based on dimension, Euler numbers, and predicates for connecting intersection endpoints.On this basis, we have derived 2 types of intersection points and 21 types of intersection lines between lines and bodies, illustrating the description method for the refinement of topology relationships involving multiple intersections.Furthermore, we have developed algorithms for determining the types of adjacency endpoints for intersection points and intersection lines, as well as for calculating the Euler numbers and the number of intersection points between endpoints of intersection lines and the surface of bodies.In summary, the main contributions of this paper are listed as follows: (1) Based on manifold topology theory, a 3D line and body are defined, followed by the definition of unit intersections between the line and the body.(2) Based on the unit intersections, basic intersection types between the line and the body are deduced and distinguished using the dimensions of unit intersections, Euler numbers, the number of intersections between unit intersections and body boundaries, and predicates.Finally, 23 basic types of line/body are distinguished, and through these 23 basic types and the topological sequence of basic types, all refinement relations are represented.(3) This paper describes the computation method of basic types and validates the effectiveness of the model using real three-dimensional data.
Finally, we have implemented the computation of 3D line/body refined topological relationships using the Nef polyhedron model for representation, C++ programming language, and CGAL open-source library.We have validated the effectiveness of our approach and demonstrated its feasibility for applications such as conflict detection between building structures and pedestrian pathways using real-world building and pedestrian pathway data from Hong Kong.
Since this paper only focuses on the refinement of topological relationships between simple lines and bodies, the body objects cannot have channels or voids.Future research will focus on other spatial entities, such as the refinement of topological relationships between lines/regions, regions/bodies, and bodies/bodies, as well as the refinement of relationships between complex spatial entities.In addition, the application of research outcomes in practical production is closely associated with specific application scenarios.Given the potential variation in conflict detection rules across different application scenarios, devising corresponding conflict detection rules based on the specific application will also be the focus of our future work.

Figure 1 .
Figure 1.Example of multiple intersections between a 3D building and pedestrian pathway: (a) example of multiple intersections between the line and the body (2D); (b) example of multiple intersections between the line and the body (3D).

Figure 2 .
Figure 2. Diagram of the interior and boundary of n (0 ≤ n ≤ 3)-dimensional manifolds, with the yellow portions representing their neighborhood: (a) neighborhood of point interior and point boundary; (b) neighborhood of body boundary and body interior; (c) neighborhood of line boundary and line interior.

Figure 3 .
Figure 3. Example of multiple unit intersections.

( 1 )( 4 )
f D = 0, indicating that the line/body intersection occurs at a point, which includes only the two cases shown in Figure 4a,b.(2) f D = 1, f S = 0, meaning both endpoints of the intersection line are inside the body.In this case, f E = 2, and it only includes the situation depicted in Figure 4c.(3) f D = 1, f S = 1, indicating that one endpoint of the intersection line is inside the body, while the other is on the body's boundary.Therefore, f E = 1.According to the definition of the unit intersection, the endpoint inside the body is an endpoint of the line object without subsequent connecting line segments, resulting in a f R value of "null".Hence, it includes only the four cases shown in Figure 4d-g.When f D = 1 and f S = 2, f E can take two values: {0, 1}.When f D = 1, f S = 2, and f E = 1, it means that the intersection line (including its interior and both endpoints) lies entirely on the surface of the body.According to the definition of the unit intersection, it is not possible for f R to be "on".Excluding symmetrical cases, only the six cases shown in Figure 4h-m are included.

Figure 4 .
Figure 4. Three-dimensional line/body basic types and their formal representation.
participating body object is denoted as A, and the line object is denoted as B. The boundary of A is represented as ∂A, the interior of A is represented as A o , ∂B represents the boundary of B, and B o represents the interior of B. Let F = ∂A∩B = {f i , 0 ≤ i ≤ m} where F represents the set of intersections between the boundary of A and B. Each f i includes two main categories: intersection points and intersection lines.Let V = A • ∩B = {v j | 0 ≤ j ≤ n} where V represents the set of intersections between the interior of A and B. Each v j only includes intersection lines.I = F∪V = {i k |0 ≤ k ≤ m + n} where I represents the union of F and V, containing all subsets of F and V.

Figure 5 .
Figure 5. Process and approach for determining basic types of adjacency relationships.

where b 0
can represent the number of connected components of the body object, b 1 represents the number of channels in the body object, and b 2 represents the number of voids in the body object[34].The value of the Euler number f E in this study can be simplified based on the positions of the two endpoints of the intersection lines-for example, for intersection lines in F where b 0 = 1, b 1 = 0, andb 2 = 0, f E = b 0 − b 1 + b 2 = 1.For unit intersections in V, if both endpoints are on the surface of the body (as in Figure4n-q, etc.), b 0 = 1, b 1 = 1, b 2 = 0, then f E = b 0 − b 1 + b 2 = 0.If both endpoints are inside the body (as in Figure 4c), b 0 = 1, b 1 = 0, b 2 = 1, then f E = b 0 − b 1 + b 2 = 2; otherwise, if one endpoint is inside the body and the other is on the surface of the body (as shown in Figure 4f,g, etc.), b

Figure 6 .
Figure 6.Three-dimensional representation of the experimental area, with blue representing bodies, green representing lines and pink representing unit intersections: (a) experimental data; (b) experimental results; (c) zoomed-in view of the region illustrated in Figure 1.

Table 1 .
Types and quantities of unit intersections.