Interactive arc-shaped wall updating method and device and electronic equipment
By drawing the splicing points between curved wall objects and straight wall objects in architectural design software and updating the target parameters in response to user interaction, the problems of flexibility and editing efficiency in curved wall design are solved. This enables flexible movement and shape adjustment of curved walls, thereby improving design efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING CHENGSHI WANGLIN INFORMATION TECH CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-07-24
AI Technical Summary
Existing architectural design software lacks flexible support and intuitive interactive editing capabilities for curved walls when drawing walls, which limits the creativity and work efficiency of architects.
An interactive method and apparatus for updating curved walls are provided. By drawing the splicing points between the target wall object and the straight wall objects at the starting and ending points, the target parameter variables, including the starting point, ending point, arc center point, and radius, are updated in response to user interaction operations, thereby realizing real-time updating of curved wall information.
It enhances the flexibility and accuracy of curved wall operation in architectural design software, provides more powerful tools, and real-time interaction and editing functions greatly improve design efficiency.
Smart Images

Figure CN119691858B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of interior design technology, and in particular to an interactive curved wall update method, device and electronic device. Background Technology
[0002] In fields such as computer-aided design and building information modeling, drawing wall structures is a common task. Existing architectural design software typically limits wall drawing to straight lines, lacking flexible support for curved walls. Even when curved walls are supported, intuitive interactive editing capabilities are lacking, limiting architects' creativity and efficiency, and impacting the final design. Therefore, curved wall design has become an unresolved issue in building design. Summary of the Invention
[0003] In view of the above problems, embodiments of this application provide an interactive curved wall updating method, apparatus and electronic device that overcomes or at least partially solves the above problems.
[0004] In a first aspect, embodiments of this application provide an interactive curved wall update method, including:
[0005] The target wall object is drawn based on the splicing points corresponding to the splicing of the target wall object with the straight wall objects on the starting and ending sides. The target wall object is an arc wall object.
[0006] In response to an interactive operation on the target wall object, update the target parameter variables associated with the target wall object. The interactive operation is a wall movement operation or a wall shape change operation. The target parameter variables include at least the following parameters: start point, end point, arc center point, circle center, and radius.
[0007] Based on the updated target parameter variables, the arc wall information of the target wall object is updated to determine the new arc wall object after movement or the new arc wall object with a changed shape.
[0008] Secondly, embodiments of this application provide an interactive curved wall renewal device, comprising:
[0009] The drawing module is used to draw the target wall object based on the splicing points corresponding to the splicing of the target wall object with the straight wall objects on the starting side and the ending side. The target wall object is an arc wall object.
[0010] The first update module is used to update the target parameter variables associated with the target wall object in response to an interactive operation on the target wall object. The interactive operation is a wall movement operation or a wall shape change operation. The target parameter variables include at least the following parameters: start point, end point, arc center point, circle center, and radius.
[0011] The second update module is used to update the arc wall information of the target wall object according to the updated target parameter variables, so as to determine the new arc wall object after movement or the new arc wall object that has undergone a shape change.
[0012] Thirdly, embodiments of this application provide an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the interactive curved wall updating method described in the first aspect above.
[0013] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the interactive curved wall update method described in the first aspect above.
[0014] The technical solution of this application embodiment, upon receiving an interactive operation on a target wall object, updates the target parameter variables associated with the target wall object in response to the interactive operation of moving the wall or changing the wall shape. Based on the updated target parameter variables, the arc wall information of the target wall object is updated to determine the new arc wall object after movement or the new arc wall object with a changed shape. The arc wall can be moved or its shape adjusted based on an event interaction mechanism, allowing users to intuitively move and adjust the arc wall. This improves the operational flexibility and accuracy of arc walls in architectural design software, provides users with a more powerful tool, and the real-time interaction and editing functions greatly improve design efficiency. Attached Figure Description
[0015] Figure 1 This diagram illustrates the interactive curved wall update method provided in this application embodiment.
[0016] Figure 2 This is a schematic diagram showing the splicing of one side of a target wall object with multiple straight wall objects provided in the embodiments of this application;
[0017] Figure 3 This is a schematic diagram illustrating the adsorption between an arc-shaped wall object and a straight wall object provided in an embodiment of this application.
[0018] Figure 4 A schematic diagram showing the calculation arc center point provided in the embodiments of this application;
[0019] Figure 5 This is a schematic diagram illustrating the determination of a new arc center point according to an embodiment of this application;
[0020] Figure 6 A schematic diagram illustrating the change in the arcuate direction from the starting point to the ending point of the arcuate wall object provided in the embodiments of this application;
[0021] Figure 7 This diagram illustrates the left-right classification of walls based on vectors, as provided in an embodiment of this application.
[0022] Figure 8 This is a schematic diagram illustrating the determination of the splicing point between an arc-shaped wall object and a straight wall object according to an embodiment of this application.
[0023] Figure 9 This is a schematic diagram illustrating the interactive curved wall renewal device provided in an embodiment of this application;
[0024] Figure 10 This is a schematic diagram of the electronic device structure provided in the embodiments of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Multiple embodiments in this application may include two or more.
[0027] In the various embodiments of this application, it should be understood that the sequence number of each process described below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0028] This application provides an interactive curved wall update method, such as... Figure 1 As shown, the method includes:
[0029] Step 101: Draw the target wall object based on the splicing points corresponding to the splicing of the target wall object with the straight wall objects on the starting and ending sides. The target wall object is an arc wall object.
[0030] This application embodiment describes a scenario where an arc-shaped wall object (target wall object) is joined with adjacent wall objects (straight wall objects) on the starting and ending sides. The arc-shaped wall object is an arc-shaped wall structure, and the straight wall object is a straight wall structure. In this scenario, the target wall object is drawn based on the joining points corresponding to the joining of the target wall object with the straight wall objects on the starting and ending sides. Since the target wall object is joined with the straight wall objects on the starting and ending sides, the joining points need to be determined before drawing the target wall object, and then the joining shape on the starting and ending sides is ensured based on the joining points.
[0031] On either the starting or ending side, the target wall object is joined with one or more straight wall objects. If there are no adjacent walls on either the starting or ending side, the wall is joined on only one side. For example, ... Figure 2 As shown, on the starting or ending side of the target wall object, the target wall object is spliced with multiple straight wall objects. On the other side, there are no adjacent wall objects to splice with, and the target wall object is spliced with straight wall objects on one side.
[0032] For an arc wall object, the key parameters are as follows: the start point of the arc wall, the end point of the arc wall, the center of the circle containing the arc wall, the radius of the circle containing the arc wall, the thickness of the arc wall, the direction of the arc (whether the start point points to the end point clockwise or counterclockwise, where counterclockwise is true when counterclockwise is true and false when counterclockwise is false), the center point of the arc (topCenter), and the arc height (the distance between the midpoint of the chord between the start and end points and the center point of the arc, represented by arcHeight).
[0033] Step 102: In response to the interactive operation on the target wall object, update the target parameter variables associated with the target wall object. The interactive operation is a wall movement operation or a wall shape change operation. The target parameter variables include at least the following parameters: start point, end point, arc center point, circle center, and radius.
[0034] After the target wall object is drawn, when an interactive operation is received targeting the target wall object, the target parameter variables associated with the target wall object are updated in response to the interactive operation.
[0035] The target parameter variables associated with the target wall object store at least the target wall object's start point, end point, arc center point, circle center, and radius. The content stored in the target parameter variables is used to determine the arc wall structure and location. When an interactive operation is received on the target wall object, the target parameter variables are updated to update the detailed parameters of the target wall object based on the interactive operation.
[0036] Interactive operations on the target wall object can be wall movement operations or wall shape change operations. Based on the wall movement operation, the position of the target wall object can be updated while maintaining its shape. Based on the wall shape change operation, the curved wall object can be adjusted to the required shape.
[0037] Step 103: Update the arc wall information of the target wall object according to the updated target parameter variables to determine the new arc wall object after movement or the new arc wall object with a changed shape.
[0038] After updating the target parameter variables associated with the target wall object based on interactive operations, the curved wall information of the target wall object is updated according to the updated target parameter variables to change the position of the target wall object or adjust the wall shape of the target wall object. Then, the movement or shape change of the curved wall can be realized based on the event interaction mechanism, so that users can intuitively move and adjust the curved wall, improving the operational flexibility and accuracy of curved walls in architectural design software, providing users with more powerful tools, and improving design efficiency.
[0039] During the process of adjusting the target wall object based on interactive operations, an arc-shaped auxiliary contour matching the curved wall object is generated. The arc-shaped auxiliary contour is updated in real time based on the adjustment of the target wall object to reflect the adjustment process. That is, during the process of adjusting the position or shape of the target wall object, the target parameter variables are updated in real time, and the arc-shaped auxiliary contour is updated in conjunction with the update of the target parameter variables. By introducing the arc-shaped auxiliary contour, the visualization of interactive operations is enhanced.
[0040] Specifically, when interactive operations on the target wall object cease, such as when movement or shape adjustment of the target wall object stops, the latest curved auxiliary contour is matched with the latest curved wall information. The latest curved wall information is determined based on the currently updated target parameter variables. By updating the curved wall information of the target wall object based on the updated target parameter variables, the new curved wall object after movement or the new curved wall object with a changed shape can be identified.
[0041] It should be noted that the shape and position of the new arc wall object can be determined based on the updated arc wall information. When redrawing the new arc wall object, it is also necessary to consider the splicing situation between the new arc wall object and the adjacent wall. That is, the new arc wall object is redrawn based on the updated arc wall information and the splicing point with the adjacent wall.
[0042] The above-described implementation scheme of this application, upon receiving an interactive operation on the target wall object, updates the target parameter variables associated with the target wall object in response to the interactive operation of moving the wall or changing the wall shape. Based on the updated target parameter variables, the curved wall information of the target wall object is updated to determine the new curved wall object after movement or the new curved wall object with a changed shape. The curved wall can be moved or its shape adjusted based on the event interaction mechanism, allowing users to intuitively move and adjust the curved wall. This improves the operational flexibility and accuracy of curved walls in architectural design software, provides users with a more powerful tool, and the real-time interaction and editing functions greatly improve design efficiency.
[0043] The following section first describes the case where the interaction is a wall movement operation. Optionally, when updating the target parameter variable associated with the target wall object in response to an interaction operation on the target wall object, the following steps are included:
[0044] In response to a wall movement operation targeting the wall object, record the corresponding movement offset during the wall movement process;
[0045] Update the starting and ending positions of the target wall object based on the movement offset;
[0046] After stopping the movement of the target wall object, determine the target start position and the target end position;
[0047] Update the target parameter variables based on the target start position and target end position.
[0048] In response to the mousedown event of the target wall object, the target wall object is selected, and an intermediate variable dragVariables is created to record the information corresponding to the target wall object when it has not moved. dragVariables = {ox, oy, unv, length}, where ox is the x-coordinate corresponding to the initial mouse press, oy is the y-coordinate corresponding to the initial mouse press, unv is the unit vector from the start point to the end point, and length is the straight-line distance between the start point and the end point.
[0049] In response to the `mousemove` event of the target wall object, adjust the target wall object's position on the canvas, record the mouse coordinates {x, y} during the wall's movement, and determine and record the offsets `ofx` in the x-direction and `ofy` in the y-direction based on the intermediate variables `ox` and `oy`. During the wall's movement, update the start and end positions of the target wall object based on the offsets `ofx` in the x-direction and `ofy` in the y-direction. The start and end positions of the moving curved wall object are denoted as `cStart` and `cEnd`.
[0050] After stopping the movement of the target wall object, determine the target start position and target end position corresponding to the curved wall object. During the wall movement, a snapping event may occur. Based on the snapping function, either the target start position or the target end position can be determined. After determining the target start position or the target end position, another position is determined based on the relationship between the start and end points. If no snapping occurs during the movement, the target start position is determined based on the initial start position and the final offset, and the target end position is determined based on the initial end position and the final offset.
[0051] Specifically, for cases where adsorption events occur, the following scheme is adopted when determining the target start and end points:
[0052] During the movement of the target wall object, when a first target endpoint is identified whose distance from the first endpoint of the target wall object meets the snapping threshold, the first endpoint is snapped to the first target endpoint and the movement of the target wall object stops. The first endpoint is the start or end point of the target wall object. The coordinates of the first endpoint are updated according to the coordinates of the first target endpoint. The coordinates of the second endpoint of the target wall object are updated according to the updated coordinates of the first endpoint, the unit vector and straight-line distance between the start and end points when no movement occurs. The second endpoint is another endpoint that is different from the first endpoint. Based on the updated coordinates of the first endpoint and the second endpoint, the target start point position and the target end point position are determined.
[0053] During the movement of the target wall object, a first target endpoint is identified in the canvas whose distance from the start or end point meets the snapping threshold. The snapping threshold can be customized, for example, 10. When an endpoint whose distance from the start or end point is less than or equal to the snapping threshold is identified, that endpoint is determined as the first target endpoint. After identifying the first target endpoint, the first endpoint (the start or end point whose distance from the first target endpoint meets the snapping threshold) is snapped to the first target endpoint, and the movement of the target wall object stops. The coordinates of the first endpoint are updated. At this point, the first endpoint and the first target endpoint coincide, and the coordinates of the first endpoint are the coordinates of the first target endpoint. For example, during the movement of the target wall object, if the distance between cStart and an endpoint in the canvas is found to be equal to the snapping threshold, the start point of the target wall object is snapped to that endpoint, and the coordinates of cStart are updated based on the coordinates of that endpoint. It should be noted that during the snapping process, the shape of the curved wall object remains unchanged, and because the movement operation is performed on the entire target wall object, the start and end points will move synchronously. Figure 3 As shown, during the process of the curved wall object moving on the canvas based on the drag operation, a certain endpoint of the curved wall object generates an snap event with other endpoints on the canvas, causing the entire curved wall object to be connected to the straight wall object based on the snap.
[0054] After determining the updated coordinates of the first endpoint, the updated coordinates of the second endpoint are calculated based on the updated coordinates of the first endpoint, the unit vector between the start and end points when no movement occurred, and the straight-line distance. Specifically, the direction is determined based on the unit vector. Using the updated first endpoint as a reference, the straight-line distance between the start and end points is intercepted along the determined direction to determine the updated coordinates of the second endpoint. This allows the position of the other endpoint to be determined based on the first endpoint, the unit vector, and the distance between the start and end points. For example, if the first endpoint is the start point, after the first endpoint is attracted and its coordinates are updated, the first direction is determined based on the direction of the unit vector (start point to end point). Using the first endpoint as a reference, the corresponding straight-line distance is intercepted along the determined first direction to determine the updated coordinates of the second endpoint after the wall has moved. If the first endpoint is the end point, the first direction is determined based on the opposite direction of the unit vector.
[0055] After determining the updated coordinates of the first and second endpoints, the target start point and target end point are determined based on the updated coordinates of the first and second endpoints.
[0056] After determining the target start and end positions, the target parameter variables are updated based on these positions. Since the target parameter variables store the start, end, arc center point, circle center, and radius of the target wall object, the start and end points stored in the target parameter variables can be updated based on the target start and end positions. Since the shape of the arc wall object remains unchanged, the radius and arc height remain unchanged. Based on the updated start, updated end, radius, and arc height, the updated arc center point and circle center are determined (involving conventional mathematical operations, which will not be elaborated further here) to achieve the update of the target parameter variables.
[0057] After updating the target parameter variables, update the curved auxiliary contour based on the target parameter variables to determine the final curved auxiliary contour. In response to the mouseup event of the target wall object, update the curved wall information, redraw the curved wall, hide the curved auxiliary contour, and end the selection state of the target wall object.
[0058] In the above implementation scheme, the position of the curved wall object is adjusted according to the interactive operation of moving the wall, so as to realize the movement of the curved wall object based on the event interaction mechanism, which improves the flexibility and accuracy of the movement of the curved wall object in the architectural design software, and also improves the design efficiency of the curved wall object.
[0059] The following section continues with the scenario where the interactive operation is a wall shape change operation. Optionally, the wall shape change operation includes endpoint position change operations and arc center point change operations; when updating the target parameter variables associated with the target wall object in response to an interactive operation on the target wall object, it includes:
[0060] In response to the endpoint position change operation of the target wall object, the coordinates of the first endpoint after the position change are recorded. Based on the coordinates of the first endpoint, the initial coordinates of the second endpoint, and the arc height of the target wall object, the target parameter variables are updated. The first endpoint is the start point or end point, and the second endpoint is another endpoint that is different from the first endpoint.
[0061] or
[0062] In response to an operation that changes the arc center point of the target wall object, determine the updated arc center point, and update the target parameter variables based on the updated arc center point, start point, and end point.
[0063] In this embodiment, the wall shape change operation for the target wall object can be an endpoint position change operation or an arc center point change operation. That is, changing the position of one endpoint of the target wall object can trigger a change in the wall shape of the target wall object, and changing the arc center point of the target wall object can trigger a change in the wall shape of the target wall object. It should be noted that changing the position of both endpoints of the target wall object may also cause a change in the wall shape of the target wall object, but this process cannot be achieved by a single mouse operation. The scenario corresponding to this embodiment is: changing the position of one endpoint of the target wall object while keeping the arc height unchanged, thereby changing the wall shape of the target wall object.
[0064] If the position of the first endpoint (start or end point) of the target wall object changes, record the coordinates of the first endpoint after the change. If the first endpoint changes position, the second endpoint remains stationary, and the arc height remains constant. After obtaining the coordinates of the first endpoint after the change, update the target parameter variables based on the coordinates of the first endpoint, the initial coordinates of the second endpoint, and the arc height of the target wall object.
[0065] When the arc center point of the target wall object changes, the two endpoints (start and end points) of the target wall object remain unchanged. After the arc center point changes and the updated arc center point is determined, the target parameter variables are updated based on the updated arc center point, start point, and end point.
[0066] Specifically, when the position of the first endpoint of the target wall object changes, in response to the endpoint position change operation of the target wall object, when recording the coordinates corresponding to the first endpoint after the position change, the following is included:
[0067] In response to a dragging operation that changes the position of the first endpoint, identify whether there is a second target endpoint whose distance from the first endpoint meets the adsorption threshold during the dragging process;
[0068] In response to the existence of a second target endpoint, the first endpoint is snapped to the second target endpoint and dragging is stopped. The coordinates of the first endpoint are updated and recorded according to the coordinates of the second target endpoint.
[0069] In response to the absence of a second target endpoint, determine and record the coordinates of the first endpoint after dragging stops.
[0070] The mousemove event changes the position of the first endpoint (e.g., the starting point). The mousemove event is a drag event that moves the first endpoint. During dragging, it checks if a second target endpoint exists on the canvas whose distance from the first endpoint meets the snapping threshold. If a second target endpoint is detected, the first endpoint is snapped directly to it. At this point, the first and second target endpoints coincide, and the coordinates of the first endpoint are updated to match the coordinates of the second target endpoint. The updated coordinates of the first endpoint are then recorded. The snapping event involved here applies to the first endpoint; the second endpoint of the target wall object remains in its initial state. In this case, the second endpoint remains in its position while the first endpoint changes position, resulting in a change in the arc height of the curved wall object. That is, in this implementation, only a single endpoint changes position, and the arc height of the curved wall object remains unchanged.
[0071] If a second target endpoint whose distance from the first endpoint meets the snapping threshold is not detected during the dragging process, the coordinates of the first endpoint after the mouse stops dragging are determined and recorded. Similarly, since only the first endpoint changes position while the second endpoint remains in its initial state, the shape of the arc wall object will change. In this implementation, the arc height of the arc wall object remains unchanged even when only a single endpoint changes position.
[0072] That is, in cases where the position of the first endpoint changes, other endpoints adjacent to the first endpoint are identified in the canvas. If other endpoints are identified, the first endpoint is snapped to update its coordinates without affecting the second endpoint. If no other endpoints are identified, the coordinates of the first endpoint are updated based on the movement offset after the drag ends.
[0073] After updating the coordinates of the first endpoint, the target parameter variables are updated based on the coordinates of the first endpoint, the initial coordinates of the second endpoint, and the arc height of the target wall object. This includes the following steps:
[0074] The coordinates of the center point are determined based on the coordinates of the first endpoint and the initial coordinates of the second endpoint.
[0075] The updated arc center point is determined based on the center point coordinates, the initial coordinates of the second endpoint, the arc height corresponding to the target wall object, and the current pointing information from the start point to the end point.
[0076] The first complete circle information is determined based on the updated arc center point, the coordinates of the first endpoint, and the initial coordinates of the second endpoint. The target parameter variables are then updated based on the first complete circle information.
[0077] After updating the coordinates of the first endpoint based on the mousemove event for the first endpoint (e.g., the starting point), record the coordinates pStart of the first endpoint at this time. Calculate the center point coordinates lineCenter (chord center point coordinates) based on pStart and the initial coordinates end of the second endpoint (e.g., the ending point). Then, calculate the current topCenter (arc center point) based on lineCenter (center point coordinates), end (initial coordinates of the second endpoint), arcHeight (arc height), and counterclockwise (used to indicate whether the direction from the starting point to the ending point is clockwise or counterclockwise).
[0078] In this process, given pStart and end, the counterclockwise algorithm determines which side of the chord corresponding to pStart and end the topCenter falls on, and calculates the specific position of the topCenter based on lineCenter, end, and arcHeight. For example... Figure 4 As shown, since pStart and end are known, the coordinates (lineCenter x, lineCenter y) corresponding to lineCenter can be determined based on pStart and end. The sum of ∠a and ∠c equals 90 degrees, and the sum of ∠b and ∠c also equals 90 degrees. Therefore, ∠a and ∠b are equal. ∠a = ∠b = Math.atan2(end y - lineCenter y, end x - lineCenter x). Figure 4 In the coordinate system shown, the positive X-axis points to the right and the positive Y-axis points downward. Given ∠a and ∠b, the position of the arc center point is determined based on the coordinates of lineCenter, arcHeight, and ∠a and ∠b. Specifically:
[0079] topCenter x=lineCenter x+arcHeight*sin(∠b);
[0080] topCenter y=lineCenter y-arcHeight*cos(∠b).
[0081] After determining the position of the arc center point, the information of the first complete circle is calculated based on the three points topCenter, pStart, and end. Then, the target parameter variables are updated based on the information of the first complete circle. Since topCenter, pStart, and end are all points on the circle, knowing three points on the circle determines a circle, which is a conventional operation (e.g., it can be solved according to the equation of the circle), and will not be elaborated on further here.
[0082] Since the target parameter variable stores the start point, end point, arc center point, circle center, and radius of the target wall object, after determining the information of the first complete circle, the circle center and radius in the target parameter variable are updated based on the determined circle center and radius. The start point and arc center point in the target parameter variable are updated based on pStart (the first endpoint is the start point) and the redefined topCenter. The end point in the target parameter variable remains unchanged.
[0083] After updating the target parameter variables, the arc auxiliary contour is updated based on the information in the target parameter variables (such as the updated coordinates of the first endpoint, the updated center of the circle, the initial coordinates of the second endpoint, and the updated radius) and counterclockwise (used to indicate whether the direction from the starting point to the ending point is clockwise or counterclockwise) to determine the final arc auxiliary contour. The arc wall information is updated in response to the mouseup event, the arc wall is redrawn, and the arc auxiliary contour is hidden.
[0084] In the above implementation scheme for adjusting the shape of the arc wall based on the change of endpoint position, the updated coordinates of the first endpoint are determined in response to the drag operation of the first endpoint, the whole circle information is determined based on mathematical calculation using known information, thereby updating the target parameter variable, and adjusting the shape of the arc wall object using the updated target parameter variable, so as to realize the shape change of the arc wall object based on the event interaction mechanism, which improves the flexibility and accuracy of the shape adjustment of the arc wall object in the architectural design software, and improves the design efficiency of the arc wall object.
[0085] Specifically, when the arc center point of the target wall object changes, in response to the arc center point change operation of the target wall object, when determining the updated arc center point and updating the target parameter variables based on the updated arc center point, start point, and end point, the following steps are taken:
[0086] In response to a drag operation on the center point of the arc of the target wall object, determine the projection point of the cursor on the vertical midline between the start and end points during the drag process;
[0087] The second complete circle information is determined based on the target projection point, start point, and end point corresponding to the end of the drag. The target parameter variables are updated based on the second complete circle information, and the target projection point is the updated arc center point.
[0088] The arc center point is changed based on the `mousemove` event, which is the drag event for moving the arc center point. During the dragging process, the start and end points remain stationary. To ensure that the distance from the arc center point to the start and end points is the same, the cursor position needs to be projected onto the vertical midline between the start and end points. During the dragging process, the projection point of the cursor on the vertical midline between the start and end points is determined in real time. After the dragging ends, the target projection point is determined, and this determined target projection point is the updated arc center point. Figure 5 As shown, in the drag event of dragging the center point of the arc, the starting point and the ending point of the arc wall object remain stationary. During the dragging process, the projection point of the cursor on the vertical midline of the starting point and the ending point is determined. Then, the target projection point is determined at the end of the drag. The determined target projection point is the new center point of the arc.
[0089] After determining the target projection point, the second complete circle information is determined based on the target projection point, the start point, and the end point. The process of determining the second complete circle information is similar to that of determining the first complete circle information. After determining the second complete circle information, the target parameter variables are updated according to the second complete circle information.
[0090] Since the target parameter variable stores the start point, end point, arc center point, circle center, and radius of the target wall object, after determining the second complete circle information, the corresponding parameters in the target parameter variable are updated based on the determined circle center, radius, and arc center point. The start point and end point in the target parameter variable remain unchanged. It should be noted that after determining the updated arc center point, it is also necessary to update `counterclockwise` to determine whether the arc direction from the current start point to the end point is clockwise or counterclockwise. For example, ... Figure 6 As shown, in the initial state, the arc direction from the start point to the end point of the arc wall object is clockwise. As the center point of the arc is dragged, the arc direction from the start point to the end point of the arc wall object changes to counterclockwise. At this time, it is necessary to update counterclockwise in time.
[0091] After updating the target parameter variables, update the arc auxiliary contour based on the information in the target parameter variables to determine the final arc auxiliary contour. In response to the mouseup event, update the arc wall information, redraw the arc wall, and hide the arc auxiliary contour.
[0092] In the above implementation scheme for adjusting the shape of the arc wall based on the arc center point, in response to the drag operation of the arc center point, the projection point of the cursor on the vertical midline between the start and end points is determined. Based on the last projection point, the updated arc center point is determined. Then, based on the updated arc center point, the start and end points, the whole circle information is determined, thereby updating the target parameter variables. The shape of the arc wall object is adjusted using the updated target parameter variables to realize the shape change of the arc wall object based on the event interaction mechanism. This improves the flexibility and accuracy of the shape adjustment of the arc wall object in the architectural design software and increases the design efficiency of the arc wall object.
[0093] In an optional embodiment of this application, the method further includes:
[0094] In the straight wall object corresponding to the starting side of the target wall object, determine the first contour line and the second contour line that match the left and right wall edges of the starting side of the target wall object. Based on the intersection of the first contour line, the second contour line and the left and right wall edges of the starting side of the target wall object, determine the first outer contour splicing point sppt and the first inner contour splicing point spb associated with the starting point.
[0095] In the straight wall object corresponding to the endpoint side of the target wall object, determine the third and fourth contour lines that match the left and right wall edges of the endpoint side of the target wall object. Based on the intersection of the third and fourth contour lines with the left and right wall edges of the endpoint side of the target wall object, determine the second outer contour splicing point ept and the second inner contour splicing point epp associated with the endpoint.
[0096] On the starting side of the target wall object, straight wall objects are classified into left and right walls, determining a first array to store the left wall and a second array to store the right wall. Since the target wall object is an arc wall object, two tangent vectors need to be determined at the starting point for the arc wall object. Then, a first target vector is determined from these two tangent vectors. The first target vector is the vector with the smaller angle between the two tangent vectors and the first reference vector (the vector determined by the starting point and the center point of the arc of the arc wall object). After determining the first target vector, the straight wall objects on the starting side are classified into left and right walls using the first target vector. The straight wall objects and arc wall objects on the starting side share a common point. When using the first target vector for left and right wall classification, it is determined whether the other endpoint of the straight wall object (e.g., endpoint B) is to the left or right of the line indicated by the first target vector to achieve wall classification. For example, as shown... Figure 7 As shown, a first target vector is determined at the starting point of the curved wall object, and the endpoint B of the straight wall object is identified as being to the left or right of the line indicated by the first target vector, in order to determine whether the straight wall object belongs to the left wall or the right wall.
[0097] After classifying the left and right walls at the starting point, the system searches for a first contour line matching the left edge of the target wall object in the first array storing the left walls, and a second contour line matching the right edge of the target wall object in the second array storing the right walls. The first contour line is the one closest to the left edge of the target wall object, and the second contour line is the one closest to the right edge of the target wall object. Then, based on the intersections of the first and second contour lines with the left and right edges of the target wall object at the starting point, the system determines the first outer contour splicing point sppt and the first inner contour splicing point spb associated with the starting point.
[0098] The contour points of the curved wall object are: startTop, startBottom, endTop, endBottom, where top represents the outer contour of the curved wall and bottom represents the inner contour. It should be noted that if the first array is empty, it indicates that there is no adjacent wall object on the left side of the starting point. In this case, the straight wall object with the largest angle to the target wall object can be selected from at least one adjacent wall object on the right side and added to the first array. If the second array is empty, similar logic is applied. When distinguishing left and right on the starting point, the contour located to the left of the line indicated by the first target vector is defined as the left contour, and the wall whose endpoint is located to the left of the line indicated by the first target vector is defined as the left wall. The contour located to the right of the line indicated by the first target vector is defined as the right contour, and the wall whose endpoint is located to the right of the line indicated by the first target vector is defined as the right wall.
[0099] For example, such as Figure 8 As shown, if the right contour (right wall edge) of the curved wall is the outer contour (the radius of the outer contour is the radius of the curved wall trajectory plus half the wall thickness), find the intersection point of the circle containing the right contour and the straight line containing the second contour line. The intersection point is defined as spt. If the number of intersection points is 0, then spt is the startTop corresponding to the right contour. If the number of intersection points is 1, then spt is that intersection point. If the number of intersection points is 2, determine the intersection point closest to the starting point among the two intersection points, and spt is that intersection point. For the case where the distance between the two intersection points and the starting point is the same, determine the corresponding intersection point vector for the two intersection points (based on the starting point and the intersection point), calculate the angle between the intersection point vector and the first target vector, and determine the intersection point corresponding to the intersection point vector with the smaller angle as spt.
[0100] Then, find the intersection point of the circle containing the left contour (inner contour) of the curved wall and the straight line containing the first contour line. The intersection point is defined as spb. If the number of intersection points is 0, then spb is the startBottom corresponding to the left contour. If the number of intersection points is 1, then spb is that intersection point. If the number of intersection points is 2, the processing method is the same as that for the outer contour.
[0101] The above describes the situation on the starting side. On the ending side, the same processing logic as on the starting side is used to classify straight wall objects into left and right walls, determining the third array for storing left walls and the fourth array for storing right walls. For curved wall objects, two tangent vectors are determined at the ending point. Then, a second target vector is determined from these two tangent vectors. The second target vector is the vector with the smaller angle between the two tangent vectors and the second reference vector (the vector determined by the center point of the arc of the ending point and the curved wall object). Then, the second target vector is used to classify the straight wall objects on the ending side into left and right walls, determining whether the other endpoint of the straight wall object is to the left or right of the line indicated by the second target vector, thus achieving wall classification. After completing the left and right wall classification on the ending side, the third contour line matching the left wall edge of the target wall object on the ending side is searched in the third array storing left walls, and the fourth contour line matching the right wall edge of the target wall object is searched in the fourth array storing right walls. Then, based on the intersections of the third and fourth contour lines with the left and right wall edges of the target wall object's endpoint, the second outer contour splicing point ept and the second inner contour splicing point epp associated with the endpoint are determined. Correspondingly, if the third or fourth array is empty, the processing method is similar to that for the first or second array being empty; at the endpoint, when distinguishing between left and right, the contour located to the left of the line indicated by the second target vector is determined as the left contour, and the wall whose endpoint is located to the left of the line indicated by the second target vector is determined as the left wall; the contour located to the right of the line indicated by the second target vector is determined as the right contour, and the wall whose endpoint is located to the right of the line indicated by the first target vector is determined as the right wall.
[0102] For example, such as Figure 8 As shown, on the endpoint side, the right contour (right wall edge) of the arc wall is the inner contour. The intersection of the circle containing the right contour and the straight line containing the fourth contour line determines ePB. The left contour (left wall edge) of the arc wall is the outer contour. The intersection of the circle containing the left contour and the straight line containing the third contour line determines ept. The process of processing different points based on different numbers of intersections will not be repeated here. Specifically, in... Figure 8 In the case where epb and spb have 0 intersection points, and spt and ept have 2 intersection points.
[0103] After determining the splicing points corresponding to the joints between the target wall object and the straight wall objects on the starting and ending sides, the target wall object is drawn based on these splicing points, including the following steps:
[0104] The first starting point angle and the first ending point angle are determined based on the first outer contour splicing point splicing point splicing point spt and the second outer contour splicing point ept. Based on the first starting point angle and the first ending point angle, multiple discrete points of the outer contour arranged clockwise are determined on the outer contour.
[0105] The second starting point angle and the second ending point angle are determined based on the first inner contour splicing point spb and the second inner contour splicing point ebb. Based on the second starting point angle and the second ending point angle, multiple discrete points of the inner contour arranged clockwise are determined on the inner contour.
[0106] Place the starting point, multiple outer contour discrete points, the ending point, and multiple inner contour discrete points as key points in the target array, and draw the target wall object based on the key points in the target array.
[0107] In determining such Figure 8 After defining the first outer contour splicing point spt and the second outer contour splicing point ept, the first starting angle startTopAngle and the first ending angle endTopAngle are calculated using the Math.atan2 function based on the information of the circle's center. Taking the first starting angle startTopAngle as an example, startTopAngle = Math.atan2(spt.y - center.y, spt.x - center.x). After obtaining the first starting angle and the first ending angle, multiple discrete points of the outer contour arranged clockwise are calculated based on these angles.
[0108] At this stage, it is first necessary to determine whether the outer contour is clockwise or counterclockwise. If it is clockwise, the calculation is performed directly. If it is counterclockwise, the start and end points of the outer contour need to be replaced. After the replacement, startTopAngle and endTopAngle are determined. If endTopAngle is less than startTopAngle, 2π is added to endTopAngle.
[0109] When determining discrete points on the outer contour through calculation, the angle range of the corresponding arc of the outer contour is determined as endTopAngle minus startTopAngle. This angle range is divided into n equal parts, and the angle t corresponding to each part is t = startTopAngle + i(endTopAngle - startTopAngle) / n, where i takes a value greater than or equal to 0 and less than or equal to n. For angle t, taking the positive half-axis of the XY axis as an example, the corresponding coordinates on the arc are (center x + R*cos t, center y + R*sint). Based on the above calculation, multiple discrete points on the outer contour arranged clockwise can be determined.
[0110] In determining such Figure 8After defining the first inner contour splicing point spb and the second inner contour splicing point ebb, the second starting angle startBottomAngle and the second ending angle endBottomAngle are calculated using the Math.atan2 function, based on the information of the circle's center. After obtaining the second starting angle and the second ending angle, multiple discrete points of the inner contour arranged clockwise are calculated based on these angles. For a detailed explanation of the outer contour, please refer to the description; it will not be repeated here.
[0111] After determining multiple discrete points on the outer contour and multiple discrete points on the inner contour, identify whether the curved wall object is clockwise or counterclockwise (whether the direction from the starting point to the ending point of the curved wall object is clockwise or counterclockwise). If it is clockwise, first put the starting point into the target array, then put the multiple outer contour discrete points into the target array in ascending order, then put the ending point into the target array, and finally put the multiple inner contour discrete points into the target array in descending order. Draw the points in the target array sequentially, ensuring that the beginning and end are connected. If it is counterclockwise, first put the ending point into the target array, then put the multiple outer contour discrete points into the target array in ascending order, then put the starting point into the target array, and finally put the multiple inner contour discrete points into the target array in descending order. Draw the points in the target array sequentially, ensuring that the beginning and end are connected.
[0112] The above describes the implementation process of splicing and drawing curved wall objects with straight wall objects. Existing technologies have the following problems when handling the splicing of curved and straight walls: 1. The splice is not smooth enough, affecting the overall aesthetics and practicality; 2. Complex splicing situations cannot be accurately handled; 3. It is difficult to achieve a filling effect in drawing environments such as Canvas, resulting in poor visual presentation; 4. It lacks flexibility and is difficult to adapt to different wall thicknesses and splicing angles. The above solution, through precise calculation of tangent vectors, determination of wall position relationships, handling of special cases, and conversion of continuous arcs into discrete point sets, achieves smooth splicing and filling effects in drawing environments such as Canvas. This improves the visual effect, accurately handles complex multi-wall splicing situations, achieves smooth splicing of curved and straight walls, improves the applicability, aesthetics, and practicality of the design, and has good flexibility, adapting to different wall thicknesses and splicing angles.
[0113] This application also provides an interactive curved wall renewal device, such as... Figure 9 As shown, it includes:
[0114] The drawing module 901 is used to draw the target wall object based on the splicing points corresponding to the splicing of the target wall object with the straight wall objects on the starting side and the ending side. The target wall object is an arc wall object.
[0115] The first update module 902 is used to update the target parameter variables associated with the target wall object in response to an interactive operation on the target wall object. The interactive operation is a wall movement operation or a wall shape change operation. The target parameter variables include at least the following parameters: start point, end point, arc center point, circle center, and radius.
[0116] The second update module 903 is used to update the arc wall information of the target wall object according to the updated target parameter variables, so as to determine the new arc wall object after movement or the new arc wall object with a change in shape.
[0117] Optionally, the first update module includes:
[0118] The recording submodule is used to record the corresponding movement offset during the wall movement process in response to the wall movement operation for the target wall object.
[0119] The first update submodule is used to update the position of the start and end points of the target wall object based on the movement offset.
[0120] The first determining submodule is used to determine the target start position and the target end position after stopping the movement of the target wall object;
[0121] The second update submodule is used to update the target parameter variables based on the target start position and the target end position.
[0122] Optionally, the first determining submodule includes:
[0123] The first processing unit is configured to, during the movement of the target wall object, when it identifies a first target endpoint whose distance from a first endpoint of the target wall object meets an adsorption threshold, adsorb the first endpoint to the first target endpoint and stop moving the target wall object, wherein the first endpoint is the start point or end point of the target wall object;
[0124] The first update unit is used to update the coordinates of the first endpoint based on the coordinates of the first target endpoint;
[0125] The second update unit is used to update the coordinates of the second endpoint of the target wall object based on the updated coordinates of the first endpoint, the unit vector and straight-line distance between the starting point and the ending point when no movement has occurred, wherein the second endpoint is another endpoint that is different from the first endpoint;
[0126] The first determining unit is used to determine the target starting point position and the target ending point position based on the updated coordinates of the first endpoint and the second endpoint.
[0127] Optionally, the wall shape change operation includes an endpoint position change operation and an arc center point change operation; the first update module includes:
[0128] The record update submodule is used to respond to the endpoint position change operation of the target wall object, record the coordinates of the first endpoint after the position change, and update the target parameter variable according to the coordinates of the first endpoint, the initial coordinates of the second endpoint and the arc height of the target wall object, wherein the first endpoint is the start point or end point, and the second endpoint is another endpoint that is different from the first endpoint.
[0129] or
[0130] The determination update submodule is used to respond to the arc center point change operation for the target wall object, determine the updated arc center point, and update the target parameter variable based on the updated arc center point, the start point, and the end point.
[0131] Optionally, the record update submodule includes:
[0132] The identification unit is used to identify, in response to a dragging operation that changes the position of the first endpoint, whether there is a second target endpoint whose distance from the first endpoint meets the adsorption threshold during the dragging process;
[0133] The second processing unit is configured to, in response to the existence of the second target endpoint, attach the first endpoint to the second target endpoint and stop dragging, update the coordinates corresponding to the first endpoint according to the coordinates of the second target endpoint and record them;
[0134] A recording unit is defined to determine and record the coordinates of the first endpoint after dragging stops, in response to the absence of the second target endpoint.
[0135] Optionally, the record update submodule includes:
[0136] The second determining unit is used to determine the coordinates of the center point based on the coordinates corresponding to the first endpoint and the initial coordinates of the second endpoint;
[0137] The third determining unit is used to determine the updated arc center point based on the center point coordinates, the initial coordinates of the second endpoint, the arc height corresponding to the target wall object, and the current pointing information from the starting point to the ending point.
[0138] The first determination and update unit is used to determine the first complete circle information based on the updated arc center point, the coordinates corresponding to the first endpoint, and the initial coordinates of the second endpoint, and to update the target parameter variable based on the first complete circle information.
[0139] Optionally, the determination update submodule includes:
[0140] The fourth determining unit is used to determine the projection point of the cursor on the vertical midline between the starting point and the ending point during the dragging process in response to the dragging operation of the arc center point of the target wall object.
[0141] The second determination and update unit is used to determine the second complete circle information based on the target projection point corresponding to the end of the drag, the starting point, and the ending point, and update the target parameter variable based on the second complete circle information, wherein the target projection point is the updated arc center point.
[0142] Optionally, the device further includes:
[0143] The first determining module is used to determine, in the straight wall object corresponding to the starting side of the target wall object, a first contour and a second contour that match the left and right wall edges of the starting side of the target wall object, and to determine the first outer contour splicing point sppt and the first inner contour splicing point spb associated with the starting point based on the intersection of the first contour, the second contour and the left and right wall edges of the starting side of the target wall object.
[0144] The second determining module is used to determine, in the straight wall object corresponding to the endpoint side of the target wall object, a third contour and a fourth contour that match the left and right wall edges of the endpoint side of the target wall object, and to determine the second outer contour splicing point ept and the second inner contour splicing point epp associated with the endpoint based on the intersection of the third contour, the fourth contour and the left and right wall edges of the endpoint side of the target wall object.
[0145] Optionally, the drawing module includes:
[0146] The second determining submodule is used to determine the first starting point angle and the first ending point angle based on the first outer contour splicing point ...
[0147] The third determining submodule is used to determine the second starting point angle and the second ending point angle based on the first inner contour splicing point spb and the second inner contour splicing point ebb, and to determine a plurality of inner contour discrete points arranged clockwise on the inner contour based on the second starting point angle and the second ending point angle.
[0148] The drawing submodule is used to place the starting point, the plurality of outer contour discrete points, the ending point, and the plurality of inner contour discrete points as key points in the target array, and draw the target wall object based on the key points in the target array.
[0149] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0150] This application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described interactive curved wall update method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0151] For example, Figure 10 A schematic diagram of the physical structure of an electronic device is shown. (For example...) Figure 10 As shown, the electronic device may include a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040. The processor 1010, communications interface 1020, and memory 1030 communicate with each other via the communication bus 1040. The processor 1010 can call logical instructions from the memory 1030. The processor 1010 is used to execute various processes of the interactive curved wall updating method of this application embodiment, which will not be described in detail here.
[0152] Furthermore, the logical instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0153] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described interactive curved wall update method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0154] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0156] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A method for interactively updating curved walls, characterized in that, include: The target wall object is drawn based on the splicing points corresponding to the splicing of the target wall object with the straight wall objects on the starting side and the ending side. The target wall object is an arc wall object. On the starting side or the ending side, the target wall object is spliced with one or more straight wall objects. In response to an interactive operation on the target wall object, the target parameter variables associated with the target wall object are updated, and the arc-shaped auxiliary contour is updated in conjunction with the update of the target parameter variables. The interactive operation is a wall movement operation or a wall shape change operation. The target parameter variables include at least the following parameters: start point, end point, arc center point, circle center, and radius. The arc-shaped auxiliary contour is used to visually present the adjustment process of the target wall object. Based on the updated target parameter variables, the arc wall information of the target wall object is updated to determine the new arc wall object after movement or the new arc wall object with a changed shape. After the interactive operation is stopped, the new arc wall object is redrawn based on the updated arc wall information and the splicing points with the adjacent walls. The method further includes: On the starting side of the target wall object, determine two tangent vectors of the curved wall object at the starting point. Select a first target vector from the two tangent vectors. The first target vector is the vector with the smaller angle between the two tangent vectors and the first reference vector. The first reference vector is the vector determined by the starting point and the center point of the arc of the curved wall object. Based on the first target vector, classify the straight wall objects on the starting side into left and right walls, and determine a first array for storing left walls and a second array for storing right walls. In the first array, find a first contour line that matches the left wall edge of the target wall object, and in the second array, find a second contour line that matches the right wall edge of the target wall object. Based on the intersection of the first contour line, the second contour line and the left and right wall edges on the starting side of the target wall object, determine the first outer contour splicing point sppt and the first inner contour splicing point spb associated with the starting point. On the endpoint side of the target wall object, determine two tangent vectors of the curved wall object at the endpoint. Select a second target vector from the two tangent vectors. The second target vector is the vector with the smaller angle between the two tangent vectors and the second reference vector. The second reference vector is the vector determined by the endpoint and the center point of the arc of the curved wall object. Based on the second target vector, classify the straight wall objects on the endpoint side into left and right walls, and determine a third array for storing left walls and a fourth array for storing right walls. In the third array, find a third contour line that matches the left wall edge of the endpoint side of the target wall object, and in the fourth array, find a fourth contour line that matches the right wall edge of the target wall object. Based on the intersection of the third contour line, the fourth contour line and the left and right wall edges of the endpoint side of the target wall object, determine the second outer contour splicing point ept and the second inner contour splicing point epp associated with the endpoint.
2. The method according to claim 1, characterized in that, The step of updating the target parameter variable associated with the target wall object in response to an interactive operation on the target wall object includes: In response to a wall movement operation targeting the target wall object, the corresponding movement offset during the wall movement is recorded; The starting and ending positions of the target wall object are updated based on the movement offset; After stopping the movement of the target wall object, determine the target start position and the target end position; The target parameter variables are updated based on the target start position and the target end position.
3. The method according to claim 2, characterized in that, After stopping the movement of the target wall object, determining the target start position and the target end position includes: During the movement of the target wall object, when a first target endpoint is identified whose distance from the first endpoint of the target wall object meets the adsorption threshold, the first endpoint is adsorbed to the first target endpoint and the movement of the target wall object is stopped. The first endpoint is the start point or end point of the target wall object. Update the coordinates of the first endpoint based on the coordinates of the first target endpoint; Based on the updated coordinates of the first endpoint, the unit vector and straight-line distance between the starting point and the ending point when no movement has occurred, update the coordinates of the second endpoint of the target wall object, where the second endpoint is another endpoint that is distinct from the first endpoint; Based on the updated coordinates of the first endpoint and the second endpoint, the target starting point position and the target ending point position are determined.
4. The method according to claim 1, characterized in that, The wall shape change operation includes endpoint position change operation and arc center point change operation; The step of updating the target parameter variable associated with the target wall object in response to an interactive operation on the target wall object includes: In response to the endpoint position change operation of the target wall object, the coordinates of the first endpoint after the position change are recorded, and the target parameter variable is updated according to the coordinates of the first endpoint, the initial coordinates of the second endpoint and the arc height of the target wall object. The first endpoint is the start point or end point, and the second endpoint is another endpoint that is different from the first endpoint. or In response to the arc center point change operation for the target wall object, the updated arc center point is determined, and the target parameter variable is updated based on the updated arc center point, the start point, and the end point.
5. The method according to claim 4, characterized in that, The step of recording the coordinates of the first endpoint after the position change in response to the endpoint position change operation of the target wall object includes: In response to a dragging operation that changes the position of the first endpoint, identify whether there is a second target endpoint whose distance from the first endpoint meets the adsorption threshold during the dragging process; In response to the existence of the second target endpoint, the first endpoint is snapped to the second target endpoint and dragging is stopped. The coordinates of the first endpoint are updated according to the coordinates of the second target endpoint and recorded. In response to the absence of the second target endpoint, determine and record the coordinates of the first endpoint after stopping dragging.
6. The method according to claim 5, characterized in that, The step of updating the target parameter variable based on the coordinates of the first endpoint, the initial coordinates of the second endpoint, and the arc height of the target wall object includes: The coordinates of the center point are determined based on the coordinates of the first endpoint and the initial coordinates of the second endpoint. The updated arc center point is determined based on the center point coordinates, the initial coordinates of the second endpoint, the arc height corresponding to the target wall object, and the current pointing information from the starting point to the ending point. The first complete circle information is determined based on the updated arc center point, the coordinates corresponding to the first endpoint, and the initial coordinates of the second endpoint, and the target parameter variable is updated based on the first complete circle information.
7. The method according to claim 4, characterized in that, The step of responding to an arc center point change operation for the target wall object, determining the updated arc center point, and updating the target parameter variables based on the updated arc center point, the start point, and the end point includes: In response to a drag operation on the arc center point of the target wall object, determine the projection point of the cursor on the vertical midline between the starting point and the ending point during the dragging process; The second complete circle information is determined based on the target projection point corresponding to the end of the drag, the starting point, and the ending point. The target parameter variable is updated based on the second complete circle information, and the target projection point is the updated arc center point.
8. The method according to claim 1, characterized in that, The step of drawing the target wall object based on the splicing points corresponding to the splicing of the target wall object with the straight wall objects on the starting and ending sides includes: The first starting point angle and the first ending point angle are determined based on the first outer contour splicing point splicing point spt and the second outer contour splicing point ept. Based on the first starting point angle and the first ending point angle, multiple discrete points of the outer contour are determined in a clockwise direction on the outer contour. The second starting point angle and the second ending point angle are determined based on the first inner contour splicing point spb and the second inner contour splicing point ebb. Based on the second starting point angle and the second ending point angle, multiple discrete points of the inner contour arranged clockwise are determined on the inner contour. The starting point, the plurality of outer contour discrete points, the ending point, and the plurality of inner contour discrete points are placed as key points in the target array, and the target wall object is drawn based on the key points in the target array.
9. An interactive curved wall renewal device, characterized in that, include: The drawing module is used to draw the target wall object based on the splicing points corresponding to the splicing points between the target wall object and the straight wall objects on the starting side and the ending side. The target wall object is an arc wall object. On the starting side or the ending side, the target wall object is spliced with one or more straight wall objects. The first update module is used to update the target parameter variables associated with the target wall object in response to the interactive operation on the target wall object, and to update the arc auxiliary contour based on the update of the target parameter variables. The interactive operation is a wall movement operation or a wall shape change operation. The target parameter variables include at least the following parameters: start point, end point, arc center point, circle center, and radius. The arc auxiliary contour is used to visually present the adjustment process of the target wall object. The second update module is used to update the arc wall information of the target wall object according to the updated target parameter variables, so as to determine the new arc wall object after movement or the new arc wall object with a change in shape; wherein, after stopping the interaction operation, the new arc wall object is redrawn according to the updated arc wall information and the splicing point with the adjacent wall. The first determining module is used to determine two tangent vectors of the arc wall object at the starting point on the starting side of the target wall object; select a first target vector from the two tangent vectors, where the first target vector is the vector with the smaller angle between it and a first reference vector, and the first reference vector is the vector determined by the starting point and the center point of the arc of the arc wall object; classify the straight wall objects on the starting side as left and right walls based on the first target vector, and determine a first array for storing left walls and a second array for storing right walls; search for a first contour line matching the left wall edge of the target wall object in the first array, and search for a second contour line matching the right wall edge of the target wall object in the second array; and determine the first outer contour splicing point sppt and the first inner contour splicing point spb associated with the starting point based on the intersection of the first contour line, the second contour line and the left and right wall edges on the starting side of the target wall object. The second determining module is used to determine two tangent vectors of the curved wall object at the endpoint on the endpoint side of the target wall object; select a second target vector from the two tangent vectors, where the second target vector is the vector with the smaller angle between it and the second reference vector, and the second reference vector is the vector determined by the endpoint and the center point of the arc of the curved wall object; classify the straight wall objects on the endpoint side into left and right walls based on the second target vector, and determine a third array for storing left walls and a fourth array for storing right walls; search for a third contour line matching the left wall edge on the endpoint side of the target wall object in the third array, and search for a fourth contour line matching the right wall edge on the endpoint side of the target wall object in the fourth array; and determine the second outer contour splicing point ept and the second inner contour splicing point epp associated with the endpoint based on the intersection of the third contour line, the fourth contour line and the left and right wall edges on the endpoint side of the target wall object.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the interactive curved wall update method as described in any one of claims 1 to 8.