WO2015055087A1 - 图纸中实体的选择方法和装置 - Google Patents

图纸中实体的选择方法和装置 Download PDF

Info

Publication number
WO2015055087A1
WO2015055087A1 PCT/CN2014/088052 CN2014088052W WO2015055087A1 WO 2015055087 A1 WO2015055087 A1 WO 2015055087A1 CN 2014088052 W CN2014088052 W CN 2014088052W WO 2015055087 A1 WO2015055087 A1 WO 2015055087A1
Authority
WO
WIPO (PCT)
Prior art keywords
entity
preview
selected entity
point
module
Prior art date
Application number
PCT/CN2014/088052
Other languages
English (en)
French (fr)
Inventor
汪光胜
官松彬
李长春
梁江
陆翔
Original Assignee
苏州浩辰软件股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浩辰软件股份有限公司 filed Critical 苏州浩辰软件股份有限公司
Priority to US14/917,252 priority Critical patent/US10466877B2/en
Publication of WO2015055087A1 publication Critical patent/WO2015055087A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting

Definitions

  • the present invention relates to the field of graphics processing, and in particular to a method and apparatus for selecting entities in a drawing.
  • CAD Computer Aided Design
  • the CAD graphics entities can be processed by control commands in the CAD system.
  • the control commands can include TRIM commands (trim entity commands), offset commands (delete entity commands), chamfer commands (copy entity commands), Mirror commands ( The mirroring entity command) and the Array command (array entity command), etc.
  • the process flow of the existing control instruction includes the following steps:
  • the command function corresponding to the control command is called.
  • the user is prompted to select an entity, and the user selects the picking point according to the demand.
  • the system performs entity screening according to the predetermined range of the picking point, and the selected entity is taken as the selected entity.
  • control instruction processes the selected entity accordingly. For example: the trim command will crop the entity; the delete command will remove the entity from the drawing and so on.
  • the existing CAD graphic system selection method and device all leave the point on the screen of the mobile device by the finger, as the picking point, and then determine which entity the picking point is on, and then This entity acts as the final selection entity.
  • a selection device has many drawbacks.
  • many mobile device screens are capacitive screens. When such a screen is lifted, the point at which the screen leaves the screen is deviated from the user's desired pickup point, and the resulting entity cannot be satisfied.
  • the user's expectation; on the other hand, most mobile devices' screens are touch screens, and it is very troublesome to use fingers to select entities, because the fingers of the fingers occupy the screen area. Large, it obscures the user from observing the entities on the screen, making it difficult to view the selection entities and unable to select the ideal entity.
  • the pre-selected entity in the selection process is not used and the result of the pre-selected entity is displayed to the user, resulting in a large finger range, and cannot solve the multiple entities in the finger selection area, and cannot prompt the user to select To the entity, causing the user to misselect the entity.
  • the user can only know by processing the selected entity through the control command. Whether the selected entity meets the needs. If it is not satisfied, it proves that the choice is wrong.
  • the user has to execute the CAD back-off command to restore the entity to the state before the command processing, and re-select it, resulting in more repeated selections, which inevitably causes a lot of unnecessary work. Lead to a decline in work efficiency.
  • the main object of the present invention is to provide a method and device for selecting an entity in a drawing. To solve the above problems.
  • a method for selecting an entity in a drawing comprising: after inputting a function instruction in a CAD system, calling a preview program attached to a function instruction; selecting a drawing Picking points in the box; screening the entities within the predetermined range centered on the picking points to obtain the pre-selected entities; processing the pre-selected entities through the attached preview program to pre-display the results of the processing of the input instructions on the pre-selected entities.
  • a device for selecting an entity in a drawing comprising: a calling module for calling a corresponding function command after inputting a function instruction in a CAD system a previewing program; a selection module for selecting a picking point in the drawing; a screening module for filtering an entity within a predetermined range centering on the picking point to obtain a pre-selected entity; and a processing module for the previewing program by the hook
  • the pre-selected entity is processed to pre-display the results of the input command to the pre-selected entity.
  • the processing result can be known. Therefore, if the processing result does not satisfy the requirement, the user needs to return the graphic entity to the pre-processing state, resulting in the need to repeatedly execute the processing of the control instruction, thereby reducing the work efficiency problem and further realizing the problem.
  • the effect of the control instruction on the selected entity can be previewed, and the number of times the user repeatedly selects the graphic entity is avoided, thereby achieving the effect of improving work efficiency.
  • FIG. 1 is a schematic structural view of an apparatus for selecting an entity in a drawing according to an embodiment of the present invention
  • FIG. 2 is a flow chart of a method of selecting an entity in a drawing according to an embodiment of the present invention
  • FIG. 3 is a detailed flowchart of a method of selecting an entity in a drawing according to an embodiment of the present invention.
  • FIG. 4 is a functional diagram of a TRIM command initial interface of the embodiment shown in FIG. 3;
  • Figure 5 is a functional diagram of the operation of the TRIM command of the embodiment shown in Figure 3;
  • FIG. 6 is a schematic diagram of a trimming source entity and picking point information of a TRIM command operation of the embodiment shown in FIG. 5;
  • FIG. 7 is a structural block diagram of a computer terminal according to an embodiment of the present invention.
  • FIG. 1 Before describing further details of various embodiments of the present invention, a suitable computing architecture that can be used to implement the principles of the present invention will be described with reference to FIG.
  • various embodiments of the present invention are described with reference to the symbolic representation of acts and operations performed by one or more computers, unless otherwise indicated.
  • Such actions and operations include the manipulation of an electrical signal by a processing unit of a computer to represent data in a structured form. This manipulation transforms the data or maintains it in a location in the computer's memory system, which reconfigures or changes the operation of the computer in a manner that is understood by those skilled in the art.
  • the data structure that maintains the data is the physical location of the memory with the specific attributes defined by the format of the data.
  • the present invention is described in the above context, it is not meant to be limiting, and as understood by those skilled in the art, aspects of the actions and operations described hereinafter may also be implemented in hardware.
  • FIG. 1 is a schematic structural view of an apparatus for selecting an entity in a drawing according to an embodiment of the present invention.
  • the selection means of the entity in the drawing may include: a calling module 10, a selection module 30, a screening module 50, and a processing module 70.
  • the calling module 10 is configured to invoke a preview program that is linked to the function instruction after the function instruction is input in the CAD system.
  • a module 30 is selected for selecting pick points in the drawing. Specifically, the selection module 30 can be used to select a pick point in the CAD graphics system.
  • the screening module 50 is configured to filter an entity within a predetermined range centering on the picking point to obtain a pre-selected entity. Specifically, the screening module 50 may filter an entity in a certain area centered on the picking point as a pre-selected entity, and the area range may be adjusted according to the size of the current display screen. For example, if it is a mobile phone display screen, the predetermined size may be relatively large. The area of the computer display can be scheduled for a relatively small display area based on actual conditions.
  • the processing module 70 is configured to process the pre-selected entity by the hooked preview program to pre-display the pre-selected entity after the input instruction processing.
  • the calling module 10 in the above embodiment of the present application starts to call the preview program attached to the function instruction after inputting the function instruction in the CAD system, and implements the graphic system in the selection module 30 and the screening module 50 (for example). For example, in the CAD graphics system, the filtering process is performed based on the selected picking points to obtain the pre-selected entity, and the pre-selected entity is processed by the hooked preview program, thereby previewing the processed effect of the selected entity of the CAD function instruction.
  • the foregoing solution can implement that the user does not need to use the “control command to process the selected entity” to know whether the processing result of the selected entity meets the requirement. If it is not satisfied, the user does not need to execute the rollback command on the CAD system to restore the entity to the state before the command processing.
  • the pre-selected entity can be processed by the preview program, and the processed effect is displayed on the drawing, thus avoiding A lot of unnecessary work. Thereby solving the blind spot in the "select entity process" that cannot predict the processing result, and improving the accuracy of the user selecting the entity.
  • the mouse or the finger can be moved to reselect the picking point to obtain a new pre-selected entity, and after the existing selection error is solved, the unnecessary operation that needs to be rolled back is needed. .
  • the processing module 70 in the foregoing embodiment of the present application may include: a first acquiring module, configured to acquire entity information of the pre-selected entity and coordinate values of the picking point; and a sub-calling module, configured to invoke the preview program in the control instruction hooking Callback function, specifically, the callback function can be Preview(Entity*ent, Point pt); the transmission module is used for the callback function to pass the entity information and the coordinate value as parameters to the preview processing function.
  • the entity information can be And the pick point coordinate value is passed as a parameter to the Preview (Entity*ent, Point pt); the preview processing module is used for preview processing to preview the pre-selected entity to obtain the preview processing result; the display module is used for previewing
  • the processing result is returned to the callback function in the preview program, and the preview processing result is displayed, thereby realizing the entity information returned by the function, that is, the effect data processed by the pre-selected entity is displayed in the current drawing.
  • the preview processing result is the same as the result of processing the pre-selected entity by the control instruction of the hook preview program. Since the above embodiment implements a callback function in the preview program to call the preview processing function by providing an interface, it is possible to preview the processing effect before the control instruction processes the pre-selected entity.
  • the processing device may further include: a first determining module, configured to determine whether to select a preview processing result, specifically, determining whether the user inputs a determining selection instruction to determine the preview processing result; and returning the module If it is determined that the preview processing result is selected, the entity information of the pre-selected entity is returned to the control instruction of the hook preview program, so that the control instruction processes the pre-selected entity; and the recovery module is configured to, if it is determined not to select the preview processing result, Restoring the pre-selected entity to the preview program before processing the pre-selected entity
  • the above embodiment implements determining whether the user confirms the selection, and if so, restores the entity to the state before the function processing, and then returns the pre-selected entity information to the upper layer command. If not, the effect data displayed in the current drawing will be deleted, and the original data information of the pre-selected entity will be displayed in the drawing, and then the new pre-selected entity will be acquired, and the previewed program of the hook will be recalled. Select an entity for processing.
  • the screening module 50 may include: a second obtaining module, a first calculating module, and a matching entity module. among them,
  • the second obtaining module is configured to obtain coordinate values of all the entities in the drawing.
  • the first obtaining module provides an entity information acquiring module, which can be used to obtain data of all entities in the drawing, for example, coordinate values of the entities.
  • the first calculating module is configured to calculate a range of the area centered on the picking point according to the predetermined range value to obtain the predetermined range.
  • a matching entity module for matching the coordinate values of all the entities with the coordinate values of the pickup points, and matching the coordinate values of the points at the predetermined range of the pickup points to filter the pre-selected entities, wherein the pre-selected entities are The picking point and the set of entities having the same or identical set of coordinate values of the points of the picking point within the predetermined range.
  • the module implements matching according to coordinate data of all entities with coordinate data of an entity within a predetermined range to determine a pre-selected entity, and the predetermined range is drawn by the coordinate value of the current pick-up point and the coordinate value in the range of the region.
  • the range of the pre-selected entities may be the same as the predetermined range, or may have more overlapping portions with the predetermined range, thereby knowing that all the entities constituting the pre-selected entity
  • the coordinates of the points may all fall within a predetermined range, or may fall partially within the predetermined range.
  • some of the same entity coordinate values herein are a range value, for example, the same range on the display device may be greater than or equal to One pixel may preferably be 10 pixels, and may be equal to or more than one pixel in the same range of the PC portion, and preferably may be five pixels.
  • the apparatus may further include an enlarged area preview module, and the module may include: a third obtaining module, a second calculating module, a creating module, and an enlarged display module. among them,
  • the third obtaining module is configured to obtain a preset magnification.
  • the second calculating module is configured to calculate according to the preset magnification and the pixels of the display screen to obtain the size of the enlarged display area.
  • the module implements the function of calculating the enlarged size, and can calculate the size of the enlarged area according to the size and the magnification of the screen.
  • the size of the enlarged area can be equal to the size of the screen multiplied by a proportional coefficient t (the variable t can be The value set by the user, but the value cannot be greater than 1, to ensure that the size of the display area is always smaller than the screen size.
  • the size of the content displayed inside the enlarged area is equal to the pixel of the pickup point multiplied by the preset magnification.
  • a module is created for creating an enlarged display area at a predetermined position of the display screen. Specifically, the module provides a function of creating an enlarged area, that is, creating a display zoom according to the picking point and the screen size at a suitable position that the finger does not block. Area.
  • the enlarged display module is configured to display the pre-selected entity in the enlarged display area or display the pre-selected entity processed by the linked preview program. Specifically, the module implements the result of the preview display processing, and is used to preview the effect of the selected entity after the command is processed.
  • the above embodiment may be applied to enlarge the display when the finger's fingertip obscures the area of the selected entity, that is, provides a function of previewing the pre-selected entity in the enlarged area for generating an enlarged area at the appropriate position of the screen.
  • the magnified area magnifies the area of the finger's finger occlusion, and displays the effect of the attached preview program on the pre-selected entity. If the user does not mount the preview program, only the pre-selected entity is enlarged in the result preview module. The function works.
  • the foregoing embodiment of the present application may further include a preset module for selecting an entity front hook preview program and setting a range field value and a magnification.
  • the magnification set in the preset module is at least twice as large as the original entity in order to achieve the amplification effect.
  • the foregoing apparatus of the present application may further include: a highlighting module, configured to display the pre-selected entity according to a predetermined highlighting manner, wherein the highlighting manner comprises: setting a line display attribute of the pre-selected entity.
  • the linearity of the pre-selected entity may be changed to a dotted line
  • the line width of the pre-selected entity may be bolded
  • the color of the pre-selected entity may be changed, and the like.
  • the highlighting module can include: a reading module, configured to read entity information of the pre-selected entity;
  • the highlight processing module 70 is configured to update the entity information of the pre-selected entity according to the preset display attribute to obtain the highlighted pre-selected entity.
  • the pre-selected entity may be processed according to a predetermined highlighting manner, and the processed pre-selected entity is displayed.
  • the above embodiment of the present application implements a filtering process based on the selected picking points in a graphics system (for example, a CAD graphics system) by the selecting module 30 and the screening module 50, that is, determining the range of an entity based on the picking point, and using the highlighting module to An entity within a predetermined range is displayed to the user as a selected object, and the pre-selected entity is displayed in a special highlighting manner different from other entity parts, and the user can accurately confirm the entity selected by the user without having to make Other redundant operations, thereby solving the related art problem in the graphics system, the user can not accurately and simply acquire the entity, thereby achieving the effect of improving the accuracy of selecting the target entity in the graphics system.
  • a graphics system for example, a CAD graphics system
  • the foregoing embodiment can be applied to a complex and confusing multi-entity selection scenario in a CAD graphics system, in particular, a physical selection device on a mobile platform (eg, a smart phone, a tablet) device, for example, can be overcome on a CAD system.
  • a physical selection device on a mobile platform eg, a smart phone, a tablet
  • the finger is raised when the entity operation is selected, the point deviation is picked up, resulting in no shortage of the selected entity.
  • the selection module 30 in the above embodiment may include: a prompting module for displaying text to prompt the user to select an entity; and a picking point obtaining module for acquiring coordinate values of the user picking points on the mobile device.
  • the picking point is not a fixed point, and the user can select anywhere in the CAD graphic system on the display device. And the method of supporting the finger sliding is picked up, and the present invention will acquire the last sliding point as the picking point.
  • the apparatus may further include: a second determining module, configured to determine whether the current picking point is the same as the last picking point; and a determining module, configured to return, in the same case, to determine whether to end the acquiring of the picking point Operation, wherein, in the case where the pickup point is not finished, if the last pickup point is within the predetermined range, the last pickup point is acquired, otherwise, the pre-selected entity corresponding to the current pickup point is cancelled, and/or Cancel the display of the pre-selected entity in the enlarged display area; if not the same, execute the processing module 70 to process the pre-selected entity corresponding to the current pick-up point by the hooked preview program, specifically, the last pick-up point can be cleared Corresponding pre-selected entities to display the pre-selected entities corresponding to the current pick-up point.
  • a second determining module configured to determine whether the current picking point is the same as the last picking point
  • a determining module configured to return, in the same case, to determine whether to end the acquiring of
  • the last pre-selected entity may be acquired without ending the acquisition of the pick-up point and if the last pre-selected entity is within a predetermined range.
  • the foregoing embodiment implements, determining whether the picking point is the same as the last picking point, and if yes, invoking a determining module, the determining module is configured to determine to end the selecting operation, and returning the pre-selected entity as a final result; if not , the recovery original state module needs to be called, the original state module is used to clear the preview effect of the last pre-selected entity, and restore to the state before it, that is, if the current original program is not selected for the pre-selected entity As a result, after the user's finger leaves the pre-selected entity on the display interface, the system deletes the effect of the current preview program processing the pre-selected entity, and returns to the pre-processing state in order to highlight the pre-selected entity.
  • the determining module may include the following business function module: the determining operation module is configured to determine whether the user ends the selecting operation, and if the user ends the selecting operation, the clearing preview module is called to perform a cleaning operation, for example, canceling the effect that the pre-selected entity on the drawing is previewed. Or highlighting the effect, and clearing the preview of the result of the pre-selected entity in the magnified area; then calling the return result module to return the pre-selected entity obtained by the last screening module 50; if there is no end operation, jumping to the picking module 30 Pick the pick point.
  • the solution provided by the present application displays the pre-selected entity by highlighting, and the user can accurately confirm the entity selected by the user, and at the same time provide the hook user preview program interface, and can preview the command in the zoom-in area. Select the effect of the entity operation to improve the user's accuracy of the entity selection.
  • the present invention enlarges and displays the content of the area around the touch point of the user's finger by creating an enlarged area on the screen, thereby solving the problem that the finger's fingertip blocks the entity on the screen, the target entity cannot be selected.
  • the present invention can perform physical pre-selection while presenting the pre-selected result on the screen. It allows the user to know which entity will be selected and will be processed after the selection is completed.
  • the present invention relates to a selection device for physical selection in a CAD graphics system, particularly on a mobile platform (e.g., a smartphone, tablet) device.
  • a mobile platform e.g., a smartphone, tablet
  • the field of application of the invention is mainly in the complex and confusing multi-entity selection scenarios in the CAD system and the like.
  • FIG. 2 is a flow chart of a method of selecting an entity in a drawing according to an embodiment of the present invention
  • FIG. 3 is a detailed flowchart of a method of selecting an entity in a drawing according to an embodiment of the present invention.
  • the method includes the following steps:
  • step A after the function instruction is input in the CAD system through the calling function in FIG. 1, the preview program attached to the corresponding function instruction is called.
  • step B the picking point in the drawing can be selected by the selecting module 30 in FIG. Specifically, this step enables the selection of pick points that can be used in a CAD graphics system.
  • the screening module 50 in FIG. 1 can be used to filter the entities within the predetermined range centered on the pickup point to obtain the pre-selected entity.
  • the step is implemented to filter an entity in a certain area centered on the picking point as a pre-selected entity, and the area range may be adjusted according to the size of the current display screen. For example, if it is a mobile phone display screen, a relatively large area can be reserved, and the computer display screen can reserve a relatively small display area according to actual conditions.
  • the pre-selected entity may be processed by the linked preview program by using the highlighting module in FIG. 1 to pre-display the pre-selected entity after the input instruction processing.
  • the step provides a function of previewing the current pre-selected entity for displaying a preview pre-selected entity on the drawing, to provide the user with the effect of previewing the current control instruction to process the pre-selected entity.
  • the preview program hooked up on the function instruction is started, and the filtering process based on the selected pick point is implemented in the graphic system (for example, the CAD graphic system).
  • the pre-selected entity is processed by the hooked preview program, thereby previewing the processed effect of the selected entity of the CAD function instruction, and solving the related art processing graphics in the control instruction using the graphics system.
  • the user since the user can only know the processing result after the execution of the control instruction, if the processing result does not satisfy the requirement, the user needs to return the graphic entity to the state before the processing, resulting in the process of repeatedly executing the control instruction.
  • the problem of work efficiency is reduced, and the effect of previewing the control command on the selected entity can be realized, thereby avoiding the number of times the user repeatedly selects the graphic entity, thereby achieving the effect of improving work efficiency.
  • the foregoing solution can implement that the user does not need to use the “control command to process the selected entity” to know whether the processing of the selected entity meets the requirement. If it is not satisfied, the user does not need to execute the rollback command on the CAD system to restore the entity to the state before the command processing.
  • the pre-selected entity can be processed by the preview program, and the processed effect is displayed on the drawing, thus avoiding A lot of unnecessary work. Thereby solving the blind spot in the "select entity process" that cannot predict the processing result, and improving the accuracy of the user selecting the entity.
  • the mouse or the finger can be moved to reselect the picking point to obtain a new pre-selected entity, and after the existing selection error is solved, the unnecessary operation that needs to be rolled back is needed. .
  • Step D in the above embodiment of the present application the step of processing the pre-selected entity by the hooked preview program to display the result of the input instruction to the pre-selected entity in advance may include the following steps:
  • step D1 the user is prompted to select an entity.
  • the system may acquire the entity information of the pre-selected entity and the coordinate value of the picking point.
  • step D2 the callback function in the preview program of the control instruction hook is called.
  • the callback function can be Preview(Entity*ent, Point pt)
  • step D3 the callback function passes the entity information and the coordinate value as parameters to the preview processing function. Specifically, the entity information and the coordinates of the pick-up point can be passed as parameters to the Preview (Entity*ent, Point pt).
  • Step D4 the preview processing function performs preview processing on the pre-selected entity to obtain a preview processing result
  • step D5 the preview processing result is returned to the callback function in the preview program, and the preview processing result is displayed, thereby realizing the entity information returned by the function, that is, the effect data processed by the pre-selected entity is displayed in the current drawing.
  • the preview processing result is the same as the result of processing the pre-selected entity by the control instruction of the hook preview program.
  • the preview program processes the pre-selected entity, if there is a previous preview effect on the entity, the previous preview result is cleared first.
  • step D5 After the preview processing result is displayed in step D5, the following steps may be further included:
  • step D6 it is judged whether or not the preview processing result is selected. If it is determined that the preview processing result is selected, the process proceeds to step D7, and if it is determined that the preview processing result is not selected, the process proceeds to step D8. Specifically, it may be determined whether the user inputs a determination selection instruction to determine to select the preview processing result.
  • Step D7 the entity information of the pre-selected entity may be returned to the control instruction of the hook preview program, so that the control instruction processes the pre-selected entity.
  • the pre-selected entity is returned to the corresponding control instruction as the selected entity, and the control instruction performs corresponding processing on the selected entity.
  • Step D8 restoring the state of the pre-selected entity to the preview program before processing the pre-selected entity.
  • the background first needs to delete the preview processing result, and then save the state of the pre-selected entity before the preview program processing.
  • the above embodiment implements determining whether the user confirms the selection, and if so, restores the entity to the state before the function processing, and then returns the pre-selected entity information to the upper layer command. If not, the effect data displayed in the current drawing will be deleted, and the original data information of the pre-selected entity will be displayed in the drawing, and then the new pre-selected entity will be acquired, and the previewed program of the hook will be recalled. Select an entity for processing.
  • step B the step of screening the entity within the predetermined range with the picking point as the center to obtain the pre-selected entity may include the following steps:
  • Step B1 Obtain coordinate values of all entities in the drawing.
  • the step provides an entity information acquiring module, which can be used to obtain data of all entities in the drawing, for example, coordinate values of the entities.
  • step B2 the range of the area centered on the pickup point is calculated according to the predetermined range value to obtain the predetermined range.
  • Step B3 matching the coordinate values of all the entities with the coordinate values of the picking points, and matching the coordinate values of the points at the predetermined range of the picking points to filter the pre-selected entities, wherein the pre-selected entities are the pick-up points and
  • the set of points of the point where the pick-up point is within the predetermined range is the same or the same set of entities.
  • the step implements the matching of the coordinate values of all the entity data and the current picking point, and the domain value data matching the entity within the range of the picking point area, as the pre-selected entity, since the predetermined range may not necessarily cover all of the entity,
  • the range of the pre-selected entity may be the same as the predetermined range, or may have more overlapping parts with the predetermined range.
  • the coordinates of all the physical points constituting the pre-selected entity may all fall within a predetermined range, or may be partially Falling within the predetermined range, obviously, the partially identical entity coordinate value herein may be a range value.
  • a portion of the same range on the display device may be greater than or equal to 1 pixel, preferably 10 pixels.
  • the same range in the PC portion may be one pixel or more, and preferably five pixels.
  • a null value will be returned to the subsequent processing module.
  • the method may further include the following steps: acquiring a preset magnification; according to the preset magnification and the display The pixel is calculated to obtain the size of the enlarged display area.
  • the size of the enlarged area can be calculated according to the size and magnification of the screen; the enlarged display area is created at a predetermined position of the display, that is, according to the picking point and the screen size in the finger At a suitable location that is not occluded, a display enlargement area is created; a pre-selected entity is displayed in the enlarged display area, and/or a pre-selected entity processed in the highlighted mode is displayed.
  • the size of the enlarged area may be equal to the size of the screen multiplied by a proportional coefficient t (the variable t may be a value set by the user, but the value may not be greater than 1 to ensure that the size of the display area is always smaller than the screen size), and the enlarged area
  • the size of the content displayed internally is equal to the pixel of the pick point multiplied by the preset magnification.
  • the above embodiment may be applied to enlarge the display when the finger's fingertip obscures the area of the selected entity, that is, provides a function of previewing the pre-selected entity in the enlarged area for generating an enlarged area at the appropriate position of the screen.
  • the magnified area magnifies the area of the finger's finger occlusion, and displays the effect of the attached preview program on the pre-selected entity. If the user does not mount the preview program, only the pre-selected entity is enlarged in the result preview module. The function works.
  • the preview program can be hooked up and the range value and the magnification can be set.
  • the magnification set in the preset module is at least twice as large as the original entity in order to achieve the amplification effect.
  • Step C in the foregoing embodiment of the present application after the entity in the predetermined range is filtered by the picking point to obtain the pre-selected entity, the method may further include the following steps: displaying the pre-selected entity according to the predetermined highlighting manner, wherein The display mode includes: setting the display attribute of the pre-selected entity.
  • the specific process of this step is as follows:
  • the entity information of the pre-selected entity is read.
  • the entity information of the pre-selected entity is updated according to the preset display attribute to obtain the highlighted pre-selected entity.
  • the pre-selected entity may be processed according to a predetermined highlighting manner, and the processed pre-selected entity is displayed.
  • the above embodiment of the present application performs a filtering process based on a selected pick point in a graphics system (for example, a CAD graphics system), that is, determining a range of an entity based on a pick point, and displaying the entity within the predetermined range as a selected object to The user, and displaying the pre-selected entity with a special highlighting method different from other entity parts, the user can accurately confirm the entity selected by himself, and does not need to perform other redundant operations, thereby solving the related art in the graphic In the system, the user cannot accurately and simply acquire the problem of the entity, thereby achieving the effect of improving the accuracy of selecting the target entity in the graphics system.
  • a graphics system for example, a CAD graphics system
  • the foregoing embodiment can be applied to a complex and confusing multi-entity selection scenario in a CAD graphics system, in particular, a physical selection device on a mobile platform (eg, a smart phone, a tablet) device, for example, can be overcome on a CAD system.
  • a physical selection device on a mobile platform eg, a smart phone, a tablet
  • the finger is raised when the entity operation is selected, the point deviation is picked up, resulting in no shortage of the selected entity.
  • the invention can overcome the deficiencies of the picking point deviation after the finger is lifted when the physical operation is selected on the CAD system, resulting in no selection of the expected entity.
  • the step of selecting the picking point in the drawing by the step A in the above embodiment may include: displaying a text to prompt the user to select an entity; and acquiring a coordinate value of the user picking a point on the mobile device.
  • the picking point is not a fixed point, and the user can select anywhere in the CAD graphic system on the display device. And the method of supporting the finger sliding is picked up, and the present invention will acquire the last sliding point as the picking point.
  • the method may further include the following steps: determining whether the current picking point is the same as the last picking point, wherein, in the same In the case, returning to determine whether to end the operation of acquiring the pickup point, wherein the acquisition is not ended In the case of a point, the last picking point is acquired, otherwise, the pre-selected entity corresponding to the current picking point is cancelled, and/or the pre-selected entity is displayed in the enlarged display area; in the case of not the same, the hooking is performed.
  • the step of the preview program processing the pre-selected entity corresponding to the current pick point.
  • the last pre-selected entity may be cleared to display the current pre-selected entity.
  • the last pick-up point may be acquired without ending the acquisition of the pick-up point and if the last pick-up point is within a predetermined range.
  • the foregoing embodiment implements, determining whether the pre-selected entity is the same as the last pre-selected entity, and if so, determining to end the selection operation and returning the pre-selected entity as a final result, that is, determining to end the selection operation, and returning the pre-selected entity as The final result; if not, you need to call the restore original state module, which is used to clear the preview effect of the last pre-selected entity and restore it to its previous state, ie if you do not select the current preview program pair
  • the system deletes the effect of the current preview program processing the pre-selected entity, and restores the state before the processing, in order to preview and display the pre-selected entity.
  • the clear preview module is called to perform a cleaning operation, such as canceling the effect of the pre-selected entity on the drawing being previewed or highlighting the effect, and clearing the pre-existing area.
  • a cleaning operation such as canceling the effect of the pre-selected entity on the drawing being previewed or highlighting the effect, and clearing the pre-existing area.
  • Select the result preview of the entity then call the return result module to return the pre-selected entity from the last filter; if there is no end operation, jump to the pick point.
  • the solution provided by the present application displays the pre-selected entity by highlighting, and the user can accurately confirm the entity selected by the user, and at the same time provide the hook user preview program interface, and can preview the command in the zoom-in area. Select the effect of the entity operation to improve the user's accuracy of the entity selection.
  • FIG. 3 is a detailed flowchart of a method for selecting an entity in a drawing according to an embodiment of the present invention
  • FIG. 4 is a functional schematic diagram of an initial interface of a TRIM command as shown in FIG. 3
  • FIG. 5 is an implementation as shown in FIG. A functional diagram of the TRIM command operation of the example
  • FIG. 6 is a schematic diagram of the trimming source entity and the picking point information of the TRIM command operation of the embodiment shown in FIG. 5.
  • the TRIM command is an operation method in the CAD graphics system for trimming a solid object to be connected to the edges of other solid objects.
  • the TRIM command operates by first selecting the entity to be trimmed as the trim source and then selecting the trim edge.
  • FIG. 4 there are some complex primitive entities in the CAD graphics system of the mobile device.
  • the user has selected two linear entities in the S101 region of FIG. 4 as the trimming source of the TRIM command.
  • the trimming source is the target entity for executing the TRIM trim command in the CAD graphics system, and the entity is selected as the trimming edge.
  • the specific steps are shown in Figure 4, including the following steps:
  • Step 1) Select the entity pre-attach command preview program and set the range value and magnification.
  • Step 2) Prompt the user to select an entity for the trimming operation of the TRIM command.
  • the Trim command invokes the entity selected by the user as a pruning entity.
  • Step 3 As shown in FIG. 5, the picking point S102 is selected, and the coordinate value of the user picking point S102 on the screen and all the entity information in the drawing are acquired.
  • the picking point S102 may be a picking point pt, and the picking point S102 identifies an operating point or a selection point of the user to select an entity when the TRIM command is executed, because the S101 identifies that the TRIM is to be executed.
  • the entity required by the command therefore, S102 can be a point on the entity identified by S101.
  • Step 4) Calculate the region range of the pickup point S102, as shown in S105 of FIG.
  • the area range S105 corresponding to the pickup point S102 is determined according to the preset range value.
  • Step 5 Screening for entities within the range S105. If the S103 entity in Figure 5 is within the area, then this entity is used as the pre-selected entity. If no entity is filtered within the range S105, then a null value will be returned. Specifically, as shown in FIG. 6, the entity within the preselected range of the pickup point pt is selected as the preselected entity ent.
  • Step 6) It is determined whether the pre-selected entity is the same as the last pre-selected entity. If yes, go to step 10); if no, go to the next step 7).
  • Step 7) Clear the preview display effect of the last pre-selected entity, in order to display the preview result.
  • Step 8) Display the preview result after the preview program processes the pre-selected entity on the drawing, and highlight the pre-selected entity S103.
  • a bold line width highlighting mode is adopted here.
  • it is not limited to the bold line width shown in FIG. 5, and it is also possible to adopt a method of setting a line as a broken line, changing a color, and the like.
  • Step 9) Generate an enlarged area showing the area of the finger's finger occlusion, and display the effect of the preview program attached to the control command on the pre-selected entity.
  • the step of displaying the effect of the preview program attached to the control command on the pre-selected entity processing may specifically include the following steps:
  • the callback function Preview (Entity*ent, Point pt) of the trim command is called, and the acquired entity information ent of the pre-selected entity and the pickup point coordinate pt are passed to the preview processing function.
  • the line segment to which the pre-selected entity is to be trimmed is determined according to the pt coordinate value.
  • the preview processing function modifies the coordinate value of the endpoint pts of the trimming line segment to modify the coordinate value of the intersection PtIns of another trimming source entity associated with the preselected entity, to obtain a preview processing result.
  • the modified entity information ent is returned as a result of the callback function, that is, the preview processing result is returned.
  • the entity information returned by the function that is, the data ent of the preview processing result obtained by performing the preview program processing on the pre-selected entity, is displayed in the current drawing.
  • Step 10) It is judged whether or not the selection is ended. If yes, proceed to the next step 11); if not, clear the effect of the preview display, and then go back to step 3) to reacquire the pickup point.
  • Step 11 Return the last selected pre-selected entity to the upper TRIM command to end the selection operation.
  • a can be used on the offset command (delete entity command), prompt the user to select the entity after inputting the command, and then call the solution provided by the above embodiment of the present application to select the entity on the CAD system, and finally preview the result, highlight and / or enlarge the displayed entity to the upper offset command.
  • b. can be used on the chamfer command (copy entity command), prompt the user to select the copy entity after inputting the command, and then call the scheme provided by the above embodiment of the present application to select the entity to perform the copy operation, and finally preview the result, highlight and / or enlarge the displayed entity to the upper chamfer command.
  • Mirror command (mirror entity command)
  • the user is prompted to select the mirroring entity, and then the scheme provided by the above embodiment of the present application is invoked to select the mirroring entity, and finally the preview result, highlighting and/or zooming in.
  • the displayed entity is given to the upper Mirror command.
  • Array command array entity command
  • the user is prompted to select an entity to perform an array, and then the scheme provided by the above embodiment of the present application is invoked to select an entity, and finally the preview result, highlight and/or enlarge
  • the displayed entity gives the upper Array command.
  • the embodiment of the present invention may further provide a computer terminal, which may be any computer terminal device in the computer terminal group.
  • a computer terminal may also be replaced with a terminal device such as a mobile terminal.
  • the computer terminal may execute the program code of the following steps in the method for selecting an entity in the drawing:
  • FIG. 7 is a structural block diagram of a computer terminal according to an embodiment of the present invention.
  • the computer terminal A may include one or more (only one shown in the figure) processor 51, memory 53, and transmission device 55.
  • the memory 53 can be used to store a software program and a module, such as a method for selecting an entity in a drawing in the embodiment of the present invention and a program instruction/module corresponding to the device.
  • the processor 51 runs the software program and the module stored in the memory 53. Thereby performing various functional applications and data processing, that is, implementing the selection method of the entities in the above drawings.
  • Memory 53 may include high speed random access memory and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 53 may further include memory remotely located relative to processor 51, which may be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 55 described above is for receiving or transmitting data via a network.
  • Specific examples of the above network may include a wired network and a wireless network.
  • the transmission device 55 includes a network interface controller (NIC) that can be connected to other network devices and routers through a network cable to be interconnected. Network or LAN for communication.
  • the transmission device 55 is a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC network interface controller
  • RF Radio Frequency
  • the memory 53 is configured to store preset action conditions and information of the preset rights user, and an application.
  • the processor 51 can call the information and the application stored in the memory 53 through the transmission device to perform the following steps: after inputting the function instruction in the CAD system, calling the preview program attached to the corresponding function instruction; selecting the picking point in the drawing The entity within the predetermined range is filtered by the picking point to obtain the pre-selected entity; the pre-selected entity is processed by the attached preview program to pre-display the processed result of the input instruction on the pre-selected entity.
  • the processor 51 may further execute the following steps: acquiring entity information of the pre-selected entity and coordinate values of the picking point; calling a callback function in the preview program of the control instruction hook; the callback function is to perform the entity information and The coordinate value is passed as a parameter to the preview processing function; the preview processing function performs preview processing on the pre-selected entity to obtain the preview processing result; returns the preview processing result to the callback function in the preview program, and displays the preview processing result; wherein, the preview The result of the processing is the same as the result of the control instruction of the hook preview program processing the pre-selected entity.
  • the processor 51 may further execute the following program code: determining whether to select a preview processing result; if determining to select a preview processing result, returning the entity information of the pre-selected entity to the control instruction of the hook preview program, The control instruction is caused to process the pre-selected entity; if it is determined that the preview processing result is not selected, the state of the pre-selected entity to the preview program before processing the pre-selected entity is restored.
  • the processor 51 may further execute the following program code: acquiring coordinate values of all entities in the drawing; calculating a range of the area centered on the picking point according to the predetermined range value to obtain a predetermined range; The coordinate value matches the coordinate value of the pickup point, and matches the coordinate value of the point of the predetermined range to filter the pre-selected entity, wherein the pre-selected entity is a point within the predetermined range from the pick-up point and the pick-up point The set of entities whose coordinate values are partially the same or identical.
  • the processor 51 may further execute the following program code: obtain a preset magnification; calculate according to a preset magnification and a pixel of the display screen to obtain a size of the enlarged display area; The predetermined position creates an enlarged display area; the pre-selected entity is displayed in the enlarged display area, or the pre-selected entity processed by the attached preview program is displayed.
  • the processor 51 may further execute the following steps: reading the entity information of the pre-selected entity; and updating the entity information of the pre-selected entity according to the preset display attribute to obtain the highlighted pre-selected entity.
  • the processor 51 may further execute the following program code: determining whether the current picking point is the same as the last picking point, wherein, in the same case, returning to determine whether to end the operation of acquiring the picking point, where If the picking point is not finished, if the last picking point is within the predetermined range, the last picking point is acquired; otherwise, the preselected entity corresponding to the current picking point is cancelled; if not, the entry is hanged.
  • the step of the preview program processing the pre-selected entity corresponding to the current pick point.
  • FIG. 7 is merely illustrative, and the computer terminal can also be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palmtop computer, and a mobile Internet device (Mobile Internet Devices, MID). ), PAD and other terminal devices.
  • FIG. 7 does not limit the structure of the above electronic device.
  • computer terminal A may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 7, or have a different configuration than that shown in FIG.
  • embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be used to save the program code executed by the selection method of the entity in the drawing provided in the first embodiment.
  • the foregoing storage medium may be located in any one of the computer terminal groups in the computer network, or in any one of the mobile terminal groups.
  • the storage medium is configured to store program code for performing the following steps: after inputting the function instruction in the CAD system, calling a preview program corresponding to the function instruction; selecting the drawing Picking points; screening entities within a predetermined range centered on the picking points to obtain pre-selected entities; processing the pre-selected entities through the hooked preview program to pre-display the results of the input instructions to the pre-selected entities.
  • the storage medium is further configured to store program code for performing the following steps: acquiring entity information of the pre-selected entity and coordinate values of the pickup point; calling a callback function in the preview program of the control instruction hook; The function passes the entity information and the coordinate value as parameters to the preview processing function; the preview processing function performs preview processing on the pre-selected entity to obtain the preview processing result; returns the preview processing result to the callback function in the preview program, and displays the preview processing The result; wherein the preview processing result is the same as the result of the control instruction of the hook preview program processing the pre-selected entity.
  • the storage medium is further configured to store program code for performing the following steps: determining whether to select a preview processing result; if determining to select a preview processing result, returning entity information of the pre-selected entity to the control of the hook preview program An instruction to cause the control instruction to process the pre-selected entity; if it is determined not to select the preview processing result, restoring the state of the pre-selected entity to the preview program prior to processing the pre-selected entity.
  • the storage medium is further configured to store program code for performing the following steps: acquiring coordinate values of all entities in the drawing; calculating a range of the area centered on the picking point according to the predetermined range value to obtain a predetermined range; Matching the coordinate values of all the entities with the coordinate values of the pick-up points, and matching the coordinate values of the points of the predetermined range to filter the pre-selected entities, wherein the pre-selected entities are in the predetermined range with the pick-up point and the pick-up point The set of entities whose coordinates of the points within the part are the same or identical.
  • the storage medium is further configured to store program code for performing the following steps: obtaining a preset magnification; calculating according to a preset magnification and a pixel of the display screen to obtain a size of the enlarged display area; The predetermined position of the display screen creates an enlarged display area; the pre-selected entity is displayed in the enlarged display area, or the pre-selected entity processed by the attached preview program is displayed.
  • the storage medium is further configured to store program code for performing the following steps: reading entity information of the pre-selected entity; updating entity information of the pre-selected entity according to the preset display attribute to obtain the highlighted pre-selection entity.
  • the storage medium is further configured to store program code for performing the following steps: determining whether the current picking point is the same as the last picking point, wherein, in the same case, returning to determine whether to end the operation of acquiring the picking point, Wherein, in the case that the picking point is not finished, if the last picking point is within the predetermined range, the last picking point is acquired; otherwise, the preselected entity corresponding to the current picking point is cancelled; if not, The step of processing the pre-selected entity corresponding to the current picking point by the hooked preview program.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the present invention highlights an entity within the range of the pickup point and invokes the attached command in the enlargement area in the process of selecting the entity.
  • the principles of the invention can be implemented using other general purpose or special purpose computing or communication environments or configurations.
  • Examples of well-known computing systems, environments, and configurations suitable for use with the present invention include, but are not limited to, personal computers, servers, multiprocessor systems, microprocessor based systems, minicomputers, mainframe computers, and any such systems or devices.
  • Distributed computing environment includes, but are not limited to, personal computers, servers, multiprocessor systems, microprocessor based systems, minicomputers, mainframe computers, and any such systems or devices.
  • module may refer to a software object or routine that is executed on an update system 200 of configuration information.
  • the different components, modules, units, engines, and services described herein can be implemented as objects or processes executing on the flag bit access system 200 (eg, as separate threads).
  • the systems and methods described herein are preferably implemented in software, hardware or a combination of software and hardware is also possible and contemplated.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in a storage device by a computing device, or they may be fabricated into individual integrated circuit modules, or Multiple modules or steps are made into a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)
  • Architecture (AREA)
  • Software Systems (AREA)

Abstract

本发明公开了一种图纸中实体的选择方法和装置。其中,该方法包括:在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;选取图纸中的拾取点;以拾取点为中心筛选预定范围内的实体,以获取预选择实体;通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果。通过本发明,能够可以预览控制指令对选择实体进行处理后的效果,避免了用户重复选择图形实体的次数,进而提高了工作效率。

Description

图纸中实体的选择方法和装置 技术领域
本发明涉及图形处理领域,具体而言,涉及一种图纸中实体的选择方法和装置。
背景技术
随着信息技术的不断发展,CAD(Computer Aided Design)图形系统软件已经成为绘图人员或者设计师们不可缺少的制图工具。由于科技水平的提升,存储设备的容量扩大,设计人员经常在一张CAD图纸中绘制很多实体。这样庞大又密集的实体集合,给CAD系统操作人员在选择单个或部分实体时带来了很大的难题。实体的密集性,使得用户选中目标实体的机率降低。这样的问题还尤为突出地体现在移动设备上。因为一般移动设备的屏幕较小,手指的指肚和屏幕相比较大,手指在设备上的CAD图形系统上,选择目标实体更佳不准确,难度会更高。
一般情况下,可以通过CAD系统中的控制指令来处理CAD图形的实体,控制指令可以包括TRIM命令(修剪实体命令)、offset命令(删除实体命令)、chamfer命令(复制实体命令)、Mirror命令(镜像实体命令)和Array命令(阵列实体命令)等,现有的控制指令的处理流程过程包括以下几个步骤:
首先,在CAD平台上输入控制指令之后,该控制指令对应的命令函数被调用。
接着,提示用户去选择实体,用户按照需求选取拾取点。
然后,系统根据拾取点的预定范围进行实体筛选,将筛选出的实体作为已选定实体。
最后,控制指令对已选择的实体进行相应处理。例如:修剪命令会将实体进行裁剪;删除命令会将实体从图纸中删除掉等等。
由上分析可知,针对实体的选择技术,现有的CAD图形系统选择方法和装置,都是通过手指离开移动设备屏幕上的点,作为拾取点,再判断该拾取点在哪个实体上,然后将此实体作为最终选择实体。但是这样的选择装置弊端很多,一方面现在的移动设备屏幕很多是电容屏,这样的屏幕在手指抬起时,离开屏幕的点与用户想要的拾取点存在偏差,导致最后得到的实体不能满足用户的预想;另一方面,多数移动设备的屏幕都是触摸屏,使用手指来选择实体时很麻烦,由于手指的指肚占据屏幕区域比较 大,它遮挡了用户观察屏幕上的实体,导致查看选择实体困难和无法选择到理想的实体。
并且在现有的选择实体方法中,没有采用选择过程中预选择实体并将预选择实体的结果显示给用户,导致手指范围较大,不能解决手指选择区多个实体时,无法提示用户将要选择到实体,造成用户误选实体。
另外,由于在各种设备的CAD平台上实体选择过程中,用户无法预知到控制指令对预选择实体的最终处理效果,因此,用户只能通过控制指令对已选择的实体进行处理之后,才能知道选择的实体是否满足需要。如果不满足,那证明选择错了,用户还得执行CAD上回退命令,将实体恢复到命令处理之前的状态重新进行选择,造成重复选择次数多,这样无形之中造成很多不必要的工作,导致工作效率下降。
目前针对相关技术的在利用图形系统的控制指令处理图形实体的过程中,由于用户只能在控制指令执行之后才可以获知处理结果,因此如果处理结果不满足需求时,用户需要将图形实体返回到处理前的状态,导致需要重复执行控制指令的处理过程,降低了工作效率的问题,目前尚未提出有效的解决方案。
发明内容
针对相关技术的在利用图形系统的控制指令处理图形实体的过程中,由于用户只能在控制指令执行之后才可以获知处理结果,因此如果处理结果不满足需求时,用户需要将图形实体返回到处理前的状态,导致需要重复执行控制指令的处理过程,降低了工作效率的问题,目前尚未提出有效的解决方案,为此,本发明的主要目的在于提供一种图纸中实体的选择方法和装置,以解决上述问题。
为了实现上述目的,根据本发明的一个方面,提供了一种图纸中实体的选择方法,该方法包括:在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;选取图纸中的拾取点;以拾取点为中心筛选预定范围内的实体,以获取预选择实体;通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果。
为了实现上述目的,根据本发明的另一方面,提供了一种图纸中实体的选择装置,该装置包括:调用模块,用于在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;选取模块,用于选取图纸中的拾取点;筛选模块,用于以拾取点为中心筛选预定范围内的实体,以获取预选择实体;处理模块,用于通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果。
通过本发明,采用在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;选取图纸中的拾取点;以拾取点为中心筛选预定范围内的实体,以获取预选择实体;通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果,解决了相关技术的在利用图形系统的控制指令处理图形实体的过程中,由于用户只能在控制指令执行之后才可以获知处理结果,因此如果处理结果不满足需求时,用户需要将图形实体返回到处理前的状态,导致需要重复执行控制指令的处理过程,降低了工作效率的问题,进而实现可以预览控制指令对选择实体进行处理后的效果,避免了用户重复选择图形实体的次数,进而达到了提高工作效率的效果。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的图纸中实体的选择装置的结构示意图;
图2是根据本发明实施例的图纸中实体的选择方法的流程图;
图3是根据本发明实施例的图纸中实体的选择方法的详细流程图;
图4是如图3所示的实施例的TRIM命令初始界面的功能示意图;
图5是如图3所示的实施例的TRIM命令操作的功能示意图;
图6是如图5所示的实施例的TRIM命令操作的修剪源实体和拾取点信息的示意图;以及
图7是根据本发明实施例的一种计算机终端的结构框图。
具体实施方式
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。
在描述本发明的各实施例的进一步细节之前,将参考图1来描述可用于实现本发明的原理的一个合适的计算体系结构。在以下描述中,除非另外指明,否则将参考由一个或多个计算机执行的动作和操作的符号表示来描述本发明的各实施例。由此,可 以理解,有时被称为计算机执行的这类动作和操作包括计算机的处理单元对以结构化形式表示数据的电信号的操纵。这一操纵转换了数据或在计算机的存储器系统中的位置上维护它,这以本领域的技术人员都理解的方式重配置或改变了计算机的操作。维护数据的数据结构是具有数据的格式所定义的特定属性的存储器的物理位置。然而,尽管在上述上下文中描述本发明,但它并不意味着限制性的,如本领域的技术人员所理解的,后文所描述的动作和操作的各方面也可用硬件来实现。
转向附图,其中相同的参考标号指代相同的元素,本发明的原理被示为在一个合适的计算环境中实现。以下描述基于所述的本发明的实施例,并且不应认为是关于此处未明确描述的替换实施例而限制本发明。
本申请的原理可以使用其它通用或专用计算或通信环境或配置来操作。适用于本申请的众所周知的计算系统、环境和配置的示例包括但不限于,个人计算机、服务器,多处理器系统、基于微处理的系统、小型机、大型计算机、以及包括任一上述系统或设备的分布式计算环境。
实施例1:
在其最基本的配置中,图1是根据本发明实施例的图纸中实体的选择装置的结构示意图。如图1所示,该图纸中实体的选择装置可以包括:调用模块10、选取模块30、筛选模块50和处理模块70。
其中,调用模块10,用于在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序。
选取模块30,用于选取图纸中的拾取点。具体的,该选取模块30可以用于在CAD图形系统中选择拾取点。
筛选模块50,用于以拾取点为中心筛选预定范围内的实体,以获取预选择实体。具体的,该筛选模块50可以筛选以拾取点为中心一定区域范围内的实体作为预选择实体,区域范围可以按照当前显示屏幕的大小来进行调整,例如如果是手机显示屏则可以预定相对较大的区域,而计算机显示屏可以根据实际情况预定相对较小的显示区域。
处理模块70,用于通过挂接的所述预览程序处理所述预选择实体,以预先显示所述输入指令处理后的所述预选择实体。
本申请上述实施例中的调用模块10在CAD系统中输入功能指令之后,开始调用挂接在该功能指令上的预览程序,并在选取模块30和筛选模块50实现在图形系统(例 如CAD图形系统)中基于选取的拾取点进行筛选处理,以得到预选择实体之后,通过该挂接的预览程序来处理预选择实体,从而预览到CAD功能指令所选择实体的处理后的效果,解决了相关技术的在利用图形系统的控制指令处理图形实体的过程中,由于用户只能在控制指令执行之后才可以获知处理结果,因此如果处理结果不满足需求时,用户需要将图形实体返回到处理前的状态,导致需要重复执行控制指令的处理过程,降低了工作效率的问题,进而实现可以预览控制指令对选择实体进行处理后的效果,避免了用户重复选择图形实体的次数,进而达到了提高工作效率的效果。
具体的,上述方案可以实现用户不需要通过“控制命令对已选择实体处理”后,才能知道对选择的实体的处理结果是否满足需要。如果不满足,用户不需要执行CAD系统上的回退命令,将实体恢复到命令处理之前的状态,可以通过预览程序对预选择实体进行处理,把处理后的效果显示到图纸上,这样避免造成很多不必要的工作。从而解决“选择实体过程”中无法预知处理结果的盲点,提高用户选择实体的准确性。在选择的过程中,如果用户预览到处理的效果不满足需求,那么可以移动鼠标或者手指重新选择拾取点,来获取新的预选择实体,解决现有选择错误后,还需要回退的多余操作。
本申请上述实施例中的处理模块70可以包括:第一获取模块,用于获取预选择实体的实体信息和拾取点的坐标值;子调用模块,用于调用控制指令挂接的预览程序中的回调函数,具体的,该回调函数可以为Preview(Entity*ent,Point pt);传输模块,用于回调函数将实体信息和坐标值作为参数传入给预览处理函数,具体的,可以将实体信息和拾取点坐标值作为参数传入给Preview(Entity*ent,Point pt);预览处理模块,用于预览处理函数对预选择实体进行预览处理,以获取预览处理结果;显示模块,用于将预览处理结果返回给预览程序中的回调函数,并显示预览处理结果,从而实现将函数返回的实体信息,即对预选择实体进行处理后的效果数据,显示到当前图纸中。其中,预览处理结果与挂接预览程序的控制指令处理预选择实体的结果相同。由于上述实施例通过提供一个接口来实现预览程序中的回调函数去调用预览处理函数,从而实现了可以在控制指令处理预选则实体之前,用于先预览一下处理效果。
优选地,上述理装置还可以包括:第一判断模块,用于判断是否选择预览处理结果,具体的,可以采用判断用户是否输入确定选择指令,以确定选择所述预览处理结果;返回模块,用于如果确定选择预览处理结果,则将预选择实体的实体信息返回给挂接预览程序的控制指令,以使得控制指令来处理预选择实体;恢复模块,用于如果确定不选择预览处理结果,则恢复该预选择实体的至预览程序处理该预选择实体之前 的状态,在这个过程中,后台先需要删除预览处理结果,然后保存预览程序处理之前的预选择实体的状态。
具体的,上述实施例实现了判断用户是否确认选择,如果是,则将实体恢复到函数处理前的状态,然后将预选择实体信息返回给上层命令。如果否,则将显示在当前图纸中的效果数据删除,并将预选择实体原来的数据信息显示到图纸中,然后,再去获取新的预选择实体,重新调用挂接的预览程序对新预选择实体进行处理。
本申请的上述实施例中,筛选模块50可以包括:第二获取模块、第一计算模块和匹配实体模块。其中,
第二获取模块,用于获取图纸中所有实体的坐标值,具体的,该第一获取模块提供了一个实体信息获取模块,可以用于获取图纸中所有实体的数据,例如,实体的坐标值。
第一计算模块,用于按照预定的范围域值计算以拾取点为中心的区域范围,以获取预定范围。
匹配实体模块,用于将所有实体的坐标值与拾取点的坐标值进行匹配,并与拾取点在预定范围的点的坐标值进行匹配,以筛选得到预选择实体,其中,预选择实体是与拾取点及该拾取点在预定范围内的点的坐标值部分相同或者完全相同的实体集合。具体的,该模块实现了根据所有实体的坐标数据与预定范围内的实体的坐标数据进行匹配,以确定预选择实体,预定范围是以当前拾取点的坐标值及区域范围内的坐标值来划定,由于预定范围不一定可以涵盖实体的全部,因此,预选择实体的范围可能与预定范围相同,也可能与预定范围有较多的重合部分,由此可知,构成该预选择实体的所有实体点的坐标可以全部落在预定范围内,也可以部分落在该预定范围内,显然,此处部分相同的实体坐标值是一个范围值,例如,在显示设备上部分相同的范围可以是大于等于1个像素点,优选可以是10个像素点,在PC机部分相同的范围也可以是大于等于1个像素点,优选可以是5个像素点。
其中,如果在拾取点区域范围内没有匹配到实体,表示本次未选择到实体,那么将返回空值给后面的处理模块。
本申请的上述各个实施例中,装置还可以包括放大区预览模块,该模块可以包括:第三获取模块、第二计算模块、创建模块和放大显示模块。其中,
第三获取模块,用于获取预设的放大倍数。
第二计算模块,用于根据预设的放大倍数和显示屏的像素进行计算,以得到放大显示区域的尺寸。具体的,该模块实现了计算放大尺寸的功能,可以根据屏幕的大小和放大倍数计算出放大区域的尺寸,例如,放大区域的尺寸可以等于屏幕的尺寸乘以一个比例系数t(变量t可以是用户设定的值,但该值不能大于1,用以保证显示区域大小总小于屏幕大小),放大区域内部显示的内容大小等于拾取点所在像素乘以预设的放大倍数。
创建模块,用于在显示屏的预定位置创建放大显示区域,具体的,该模块提供了一个创建放大区的功能,即根据拾取点和屏幕大小在手指遮挡不到的合适位置上,创建显示放大区。
放大显示模块,用于在放大显示区域显示预选择实体,或显示通过挂接的所述预览程序处理后的预选择实体。具体的,该模块实现了预览放显示处理后的结果,用于预览被选实体在命令处理过后的效果。
具体的,上述实施例可以应用于放大显示当手指的指肚遮挡了选择实体的区域,即提供了一个在放大区预览预选择实体的功能,用于在屏幕的适当位置生成一个放大区域,在此放大区域中放大显示手指的指肚遮挡的区域,并显示挂接的预览程序对预选择实体处理后的效果,如果用户没有挂接预览程序,那么结果预览模块中只有放大显示预选择实体的功能起作用。
优选地,本申请上述实施例还可以包括一个预设模块,用于选择实体前挂接预览程序并设定范围域值和放大倍数。具体的,该预设模块中设置的放大倍数,为了能达到放大的效果,放大倍数至少在原实体一倍以上。
优选地,本申请上述装置中还可以包括:突出显示模块,用于按照预定的突出显示方式显示预选择实体,其中,突出显示方式包括:设置预选择实体的线条显示属性。例如,可以将预选择实体的线性变成虚线,也可以将预选择实体的线宽加粗,还可以将预选择实体的颜色改变等等方式。
该突出显示模块可以包括:读取模块,用于读取预选择实体的实体信息;
突出处理模块70,用于按照预设的显示属性更新预选择实体的实体信息,以获取突出显示的预选择实体。具体的,可以按照预定的突出显示方式处理预选择实体,并显示处理后的预选择实体。
本申请上述实施例通过选取模块30和筛选模块50实现在图形系统(例如CAD图形系统)中基于选取的拾取点进行筛选处理,即基于拾取点确定一个实体的范围,并通过突出显示模块将这个预定范围内的实体作为一个被选择的对象显示给用户,且用区别于其它实体部分的特殊的突出显示方式来显示该预选择实体,用户可以准确的确认自己选择的实体,且不需要做出其它多余的操作,从而解决了相关技术的在图形系统中,用户无法准确且简单的获取实体的问题,进而实现提高图形系统中选择目标实体的准确度的效果。
具体的,上述实施例可以应用在CAD图形系统中进行复杂错乱的多实体选择场景中,特别是在移动平台(如智能手机,平板电脑)设备上面实体的选择装置,例如可以克服在CAD系统上选择实体操作时手指抬起后,拾取点偏差,导致没有选择到预期实体的不足。
优选地,上述实施例中的选取模块30可以包括:提示模块,用于显示文字,以提示用户选择实体;拾取点获取模块,用于获取用户在移动设备上拾取点的坐标值。其中,该拾取点不是固定点,用户可在显示设备上CAD图形系统中随处选取。并且支持手指滑动的方式拾取,本发明将获取最后的滑动点作为拾取点。
本申请的上述实施例中,装置还可以包括:第二判断模块,用于判断当前拾取点与上一次拾取点是否相同;确定模块,用于在相同的情况下,返回确定是否结束获取拾取点的操作,其中,在没有结束获取拾取点的情况下,如果上一次拾取点处于所述预定范围内,获取上一次拾取点,否则,取消显示当前拾取点所对应的预选择实体,和/或取消在放大显示区域显示预选择实体;在不相同的情况下,执行处理模块70,以通过挂接的预览程序处理当前的拾取点所对应的预选择实体,具体的,可以清除上一次拾取点所对应的预选择实体,以显示当前拾取点所对应的预选择实体。
优选地,可以在没有结束获取拾取点,且如果上一次预选择实体处于预定范围内的情况下,获取所述上一次预选择实体。
具体的,上述实施例实现了,判断此次拾取点是否与上一次拾取点相同,如果是,则调用确定模块,该确定模块用于确定结束选择操作,返回预选择实体作为最终结果;如果不是,则需要调用恢复原状态模块,该恢复原状态模块,用于将上一次的预选择实体的预览效果清除,并恢复到它之前的状态,即如果不选择当前原来程序对预选择实体的处理结果,则在用户手指离开显示界面上的预选择实体之后,系统删除当前预览程序处理预选择实体的效果,回复到处理前的状态,目的是为了突出显示本次预选择实体。
其中,确定模块可以包括如下业务功能模块:判断操作模块,用于判断用户是否结束选择操作,如果用户结束选择操作,则调用清除预览模块进行清理操作,例如取消图纸上预选择实体被预览的效果或突出显示效果,以及清除放大区域中预选择实体的结果预览;然后再调用返回结果模块,用于返回最后一次筛选模块50得到的预选择实体;如果没有结束操作,则跳转到选取模块30进行拾取点的选取。
由上可知,本申请所提供的方案通过突出显示方式来显示该预选择实体,用户可以准确的确认自己选择的实体,同时提供挂接用户预览程序接口,可以在放大区中预览到命令对预选择实体操作后的效果,来提高用户对实体选择的准确性。
由于本发明通过在屏幕上创建放大区域,放大显示用户手指触屏点周围区域内容,从而解决手指的指肚遮挡屏幕上实体,无法选择目标实体的问题。
另外,本发明在选择实体过程中,就可以进行实体预选择,同时将预选择的结果表现在屏幕上。可以让用户在选择实体过程中,知道选择完成后将是哪个实体被选择及将被处理后的效果。
具体的,本发明涉及用于在CAD图形系统中实体选择,特别是在移动平台(如智能手机,平板电脑)设备上面实体的选择装置。发明的应用领域主要在CAD系统中复杂错乱的多实体选择场景等等方面。
实施例2:
图2是根据本发明实施例的图纸中实体的选择方法的流程图;图3是根据本发明实施例的图纸中实体的选择方法的详细流程图。
如图2所示,该方法包括如下步骤:
步骤A,可以通过图1中的调用函数在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序。
步骤B,可以通过图1中的选取模块30来选取图纸中的拾取点。具体的,该步骤实现了可以用于在CAD图形系统中选择拾取点。
步骤C,可以通过图1中的筛选模块50来实现以拾取点为中心筛选预定范围内的实体,以获取预选择实体。具体的,该步骤实现了可以筛选以拾取点为中心一定区域范围内的实体作为预选择实体,区域范围可以按照当前显示屏幕的大小来进行调整, 例如如果是手机显示屏则可以预定相对较大的区域,而计算机显示屏可以根据实际情况预定相对较小的显示区域。
步骤D,可以通过图1中的突出显示模块来实现通过挂接的所述预览程序处理所述预选择实体,以预先显示所述输入指令处理后的所述预选择实体。具体的,该步骤实现了提供了一个预览当前预选择实体的功能,用于在图纸上,显示预览预选择的实体,用以给用户提供预览当前控制指令处理预选择实体后的效果。
本申请上述实施例中的在CAD系统中输入功能指令之后,开始调用挂接在该功能指令上的预览程序,并在实现在图形系统(例如CAD图形系统)中基于选取的拾取点进行筛选处理,以得到预选择实体之后,通过该挂接的预览程序来处理预选择实体,从而预览到CAD功能指令所选择实体的处理后的效果,解决了相关技术的在利用图形系统的控制指令处理图形实体的过程中,由于用户只能在控制指令执行之后才可以获知处理结果,因此如果处理结果不满足需求时,用户需要将图形实体返回到处理前的状态,导致需要重复执行控制指令的处理过程,降低了工作效率的问题,进而实现可以预览控制指令对选择实体进行处理后的效果,避免了用户重复选择图形实体的次数,进而达到了提高工作效率的效果。
具体的,上述方案可以实现用户不需要通过“控制命令对已选择实体处理”后,才能知道对选择的实体的处理是否满足需要。如果不满足,用户不需要执行CAD系统上的回退命令,将实体恢复到命令处理之前的状态,可以通过预览程序对预选择实体进行处理,把处理后的效果显示到图纸上,这样避免造成很多不必要的工作。从而解决“选择实体过程”中无法预知处理结果的盲点,提高用户选择实体的准确性。在选择的过程中,如果用户预览到处理的效果不满足需求,那么可以移动鼠标或者手指重新选择拾取点,来获取新的预选择实体,解决现有选择错误后,还需要回退的多余操作。
本申请上述实施例中的步骤D,通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果的步骤可以包括如下步骤:
步骤D1,提示用户选择实体,用户确定拾取点之后,系统可以获取预选择实体的实体信息和拾取点的坐标值。
步骤D2,调用控制指令挂接的预览程序中的回调函数。,具体的,该回调函数可以为Preview(Entity*ent,Point pt)
步骤D3,回调函数将实体信息和坐标值作为参数传入给预览处理函数,具体的,可以将实体信息和拾取点坐标值作为参数传入给Preview(Entity*ent,Point pt)。
步骤D4,预览处理函数对预选择实体进行预览处理,以获取预览处理结果;
步骤D5,将预览处理结果返回给预览程序中的回调函数,并显示预览处理结果,从而实现将函数返回的实体信息,即对预选择实体进行处理后的效果数据,显示到当前图纸中。
其中,预览处理结果与挂接预览程序的控制指令处理预选择实体的结果相同。在上述过程中,在预览程序处理预选择实体之前,如果存在上一次对实体的预览效果,要先清除上一次的预览结果。
由于上述实施例通过提供一个接口来实现预览程序中的回调函数去调用预览处理函数,从而实现了可以在控制指令处理预选则实体之前,用于先预览一下处理效果。
优选地,在上述步骤D5中显示预览处理结果之后,还可以包括如下步骤:
步骤D6,判断是否选择预览处理结果,如果确定选择预览处理结果,则进入步骤D7,而如果确定不选择预览处理结果,则进入步骤D8。具体的,可以采用判断用户是否输入确定选择指令,以确定选择所述预览处理结果。
步骤D7,此时,可以将预选择实体的实体信息返回给挂接预览程序的控制指令,以使得控制指令来处理预选择实体。具体的,此时会将预选择实体作为已经选择的实体返回给对应的控制指令,控制指令对已选择的实体进行相应的处理。
步骤D8,恢复该预选择实体的至预览程序处理该预选择实体之前的状态。在这个过程中,后台先需要删除预览处理结果,然后保存预览程序处理之前的预选择实体的状态。
具体的,上述实施例实现了判断用户是否确认选择,如果是,则将实体恢复到函数处理前的状态,然后将预选择实体信息返回给上层命令。如果否,则将显示在当前图纸中的效果数据删除,并将预选择实体原来的数据信息显示到图纸中,然后,再去获取新的预选择实体,重新调用挂接的预览程序对新预选择实体进行处理。
本申请上述实施例中,步骤B,以拾取点为中心筛选预定范围内的实体,以获取预选择实体的步骤可以包括如下步骤:
步骤B1,获取图纸中所有实体的坐标值,具体的,该步骤提供了一个实体信息获取模块,可以用于获取图纸中所有实体的数据,例如,实体的坐标值。
步骤B2,按照预定的范围域值计算以拾取点为中心的区域范围,以获取预定范围。
步骤B3,将所有实体的坐标值与拾取点的坐标值进行匹配,并与拾取点在预定范围的点的坐标值进行匹配,以筛选得到预选择实体,其中,预选择实体是与拾取点及该拾取点在预定范围内的点的坐标值部分相同或者完全相同的实体集合。具体的,该步骤实现了根据所有实体数据和当前拾取点的坐标值,以及域值数据匹配在拾取点区域范围内的实体,作为预选择实体,由于预定范围不一定可以涵盖实体的全部,因此,预选择实体的范围可能与预定范围相同,也可能与预定范围有较多的重合部分,由此可知,构成该预选择实体的所有实体点的坐标可以全部落在预定范围内,也可以部分落在该预定范围内,显然,此处部分相同的实体坐标值可以是一个范围值,例如,在显示设备上部分相同的范围可以是大于等于1个像素点,优选可以是10个像素点,在PC机部分相同的范围也可以是大于等于1个像素点,优选可以是5个像素点。而且,如果在拾取点区域范围内没有匹配到实体,表示本次未选择到实体,那么将返回空值给后面处理模块。
本申请上述实施例中,在以拾取点为中心筛选预定范围内的实体,以获取预选择实体之后,还可以包括如下步骤:获取预设的放大倍数;根据预设的放大倍数和显示屏的像素进行计算,以得到放大显示区域的尺寸,具体的,可以根据屏幕的大小和放大倍数计算出放大区域的尺寸;在显示屏的预定位置创建放大显示区域,即根据拾取点和屏幕大小在手指遮挡不到的合适位置上,创建显示放大区;在放大显示区域显示预选择实体,和/或显示突出显示方式处理后的预选择实体。具体的,放大区域的尺寸可以等于屏幕的尺寸乘以一个比例系数t(变量t可以是用户设定的值,但该值不能大于1,用以保证显示区域大小总小于屏幕大小),放大区域内部显示的内容大小等于拾取点所在像素乘以预设的放大倍数。
具体的,上述实施例可以应用于放大显示当手指的指肚遮挡了选择实体的区域,即提供了一个在放大区预览预选择实体的功能,用于在屏幕的适当位置生成一个放大区域,在此放大区域中放大显示手指的指肚遮挡的区域,并显示挂接的预览程序对预选择实体处理后的效果,如果用户没有挂接预览程序,那么结果预览模块中只有放大显示预选择实体的功能起作用。
优选地,如图3所示,在选取图纸中的拾取点之前,可以挂接预览程序并设定范围域值和放大倍数。具体的,该预设模块中设置的放大倍数,为了能达到放大的效果,放大倍数至少在原实体一倍以上。
本申请上述实施例中的步骤C,在以拾取点为中心筛选预定范围内的实体,以获取预选择实体之后,还可以包括如下步骤:按照预定的突出显示方式显示预选择实体,其中,突出显示方式包括:设置预选择实体的显示属性,该步骤的具体流程如下:
首先,读取预选择实体的实体信息。
然后,按照预设的显示属性更新预选择实体的实体信息,以获取突出显示的预选择实体。具体的,可以按照预定的突出显示方式处理预选择实体,并显示处理后的预选择实体。
本申请上述实施例通过在图形系统(例如CAD图形系统)中基于选取的拾取点进行筛选处理,即基于拾取点确定一个实体的范围,将这个预定范围内的实体作为一个被选择的对象显示给用户,且用区别于其它实体部分的特殊的突出显示方式来显示该预选择实体,用户可以准确的确认自己选择的实体,且不需要做出其它多余的操作,从而解决了相关技术的在图形系统中,用户无法准确且简单的获取实体的问题,进而实现提高图形系统中选择目标实体的准确度的效果。
具体的,上述实施例可以应用在CAD图形系统中进行复杂错乱的多实体选择场景中,特别是在移动平台(如智能手机,平板电脑)设备上面实体的选择装置,例如可以克服在CAD系统上选择实体操作时手指抬起后,拾取点偏差,导致没有选择到预期实体的不足。由此可知,利用本发明可以克服在CAD系统上选择实体操作时手指抬起后,拾取点偏差,导致没有选择到预期实体的不足。进一步可以解决手指遮挡实体,导致无法预览选择实体的问题,从而提高了CAD系统上选择实体的准确度,且在选取实体过程中就能预览到命令对选择实体处理的结果。
优选地,上述实施例中的步骤A选取图纸中的拾取点的步骤可以包括:显示文字,以提示用户选择实体;获取用户在移动设备上拾取点的坐标值。其中,该拾取点不是固定点,用户可在显示设备上CAD图形系统中随处选取。并且支持手指滑动的方式拾取,本发明将获取最后的滑动点作为拾取点。
本申请上述实施例中,在以拾取点为中心筛选预定范围内的实体,以获取预选择实体之后,还可以包括如下步骤:判断当前拾取点与上一次拾取点是否相同,其中,在相同的情况下,返回确定是否结束获取拾取点的操作,其中,在没有结束获取拾取 点的情况下,获取上一次拾取点,否则,取消显示当前拾取点所对应的预选择实体,和/或取消在放大显示区域显示预选择实体;在不相同的情况下,执行通过挂接的预览程序处理当前的拾取点所对应的预选择实体的步骤,具体的,可以清除上一次预选择实体,以显示当前预选择实体。优选地,可以在没有结束获取拾取点,且如果上一次拾取点处于预定范围内的情况下,获取所述上一次拾取点。
上述实施例实现了,判断此次预选择实体是否与上一次预选择实体相同,如果是,则确定结束选择操作并返回预选择实体作为最终结果,即确定结束选择操作,并返回预选择实体作为最终结果;如果不是,则需要调用恢复原状态模块,该恢复原状态模块,用于将上一次的预选择实体的预览效果清除,并恢复到它之前的状态,即如果不选择当前预览程序对预选择实体的处理结果,则在用户手指离开显示界面上的预选择实体之后,系统删除当前预览程序处理预选择实体的效果,恢复到处理前的状态,目的是为了预览显示本次预选择实体。
优选地,还需要于判断用户是否结束选择操作,如果用户结束选择操作,则调用清除预览模块进行清理操作,例如取消图纸上预选择实体被预览的效果或突出显示效果,以及清除放大区域中预选择实体的结果预览;然后再调用返回结果模块,用于返回最后一次筛选得到的预选择实体;如果没有结束操作,则跳转到进行拾取点的选取。
由上可知,本申请所提供的方案通过突出显示方式来显示该预选择实体,用户可以准确的确认自己选择的实体,同时提供挂接用户预览程序接口,可以在放大区中预览到命令对预选择实体操作后的效果,来提高用户对实体选择的准确性。
本申请上述图纸中实体的选择方法和装置的实施例,可以实现在CAD图形系统的应用环境中,如图3所示,下面就基于CAD图形系统中TRIM命令为例,结合TRIM命令调用本详细描述本发明的一个实施例流程,并对每个步骤加以详细介绍。
图3是根据本发明实施例的图纸中实体的选择方法的详细流程图;图4是如图3所示的实施例的TRIM命令初始界面的功能示意图;图5是如图3所示的实施例的TRIM命令操作的功能示意图;图6是如图5所示的实施例的TRIM命令操作的修剪源实体和拾取点信息的示意图。
如图3所示,其中TRIM命令为CAD图形系统中,用于修剪实体对象以与其他实体对象的边相接的操作方法。TRIM命令操作方式是先选择要修剪的实体作为修剪源,然后再选择修剪边。
如图4所示,在移动设备的CAD图形系统中存在一些复杂的图元实体。用户已经选择了图4中S101区域内的两条直线实体,作为TRIM命令的修剪源,修剪源是用于在CAD图形系统中执行TRIM修剪命令所操作的目标实体,选择实体作为修剪边。具体步骤如图4所示,包括如下步骤:
步骤1)选择实体前挂接命令预览程序并设定范围域值和放大倍数。
步骤2)提示用户选择实体,用于TRIM命令的修剪操作。具体的,Trim命令调用用户选择的实体作为修剪实体。
步骤3)如图5所示,选取拾取点S102,并获取用户在屏幕上拾取点S102的坐标值和图纸中所有实体信息。
具体的,如图6所示,该拾取点S102可以是拾取点pt,该拾取点S102标识的是执行TRIM命令时用户去选择实体的操作点或选择点,由于S101标识的是即将被执行TRIM命令所需要的实体,因此,S102可以是S101标识的实体上的一个点。
步骤4)计算拾取点S102区域范围,如图5中S105所示。根据预设的范围域值来确定拾取点S102对应的区域范围S105。
步骤5)筛选范围S105内的实体。如图5中的S103实体在区域范围内,那么将此实体作为本次预选择实体。如果范围S105内没有筛选到实体,那么将返回空值。具体的,如图6所示,筛选拾取点pt预选范围内的实体作为预选择实体ent。
步骤6)判断本次预选择实体是否与上一次预选择实体相同。如果是,则进入步骤10);如果否,则进入下一步骤7)。
步骤7)清除上一次预选择实体的预览显示效果,为了显示本次预览结果。
步骤8)在图纸上显示预览程序处理该预选择实体后的预览结果,并突出显示预选择实体S103,如图5所示,这里采用加粗线宽的突出显示方式。但不限于图5所示的加粗线宽,还可以采用将线条设为虚线,变换颜色等方式。
步骤9)生成一个放大区显示手指的指肚遮挡的区域,并显示控制指令所挂接的预览程序对此预选择实体处理后的效果。其中,显示控制指令所挂接的预览程序对此预选择实体处理后的效果的步骤具体可以包括如下步骤:
首先,调用trim命令的回调函数Preview(Entity*ent,Point pt),将获取的预选择实体的实体信息ent和拾取点坐标pt传入给预览处理函数。
然后,在trim命令挂接的函数Preview内部,根据pt坐标值判断该预选择实体将要被修剪掉的线段。
接着,如图6所示,该预览处理函数将需要修剪线段的端点pts的坐标值修改与此预选择实体相关的另一个修剪源实体的交点PtIns的坐标值,得到预览处理结果。
此时,将修改后的实体信息ent作为回调函数的结果返回,即将预览处理结果返回。
最后,将函数返回的实体信息,即对预选择实体进行预览程序处理后得到的预览处理结果的数据ent,显示到当前图纸中。
根据放大倍数和屏幕像素计算出,用于放大显示区域的大小尺寸,在屏幕的适当位置显示此放大区,并在放大区中显示保存的实体。如果用户在步骤1)中挂接了命令预览程序,那么调用程序对此实体进行处理,然后获取处理结果在放大区中显示,如上图中S104所示。
步骤10)判断是否结束选择。如果是,则进入下一步骤11);如果否,则清除预览显示的效果,再转回到步骤3)重新获取拾取点。
步骤11)返回最后一次筛选出的预选择实体给上层TRIM命令,结束本次选择操作。
此处需要明了的是,本申请的图纸中实体的选择方法和装置的实施例可以应用于CAD图纸中TRIM命令的操作,还可以应用在CAD图纸中的其他操作,例如:
a、可以用在offset命令(删除实体命令)上,在输入命令后提示用户选择实体,然后调用本申请上述实施例所提供的方案在CAD系统上进行选择实体,最后将预览结果、突出显示和/或放大显示的实体给上层offset命令。
b.可以用在chamfer命令(复制实体命令)上,在输入命令后提示用户选择复制实体,然后调用本申请上述实施例所提供的方案来选择实体进行复制操作,最后将预览结果、突出显示和/或放大显示的实体给上层chamfer命令。
c.可以用在Mirror命令(镜像实体命令)上,执行命令后提示用户选择镜像实体,然后调用本申请上述实施例所提供的方案来选择镜像实体,最后将预览结果、突出显示和/或放大显示的实体给上层Mirror命令。
d.可以用在Array命令(阵列实体命令)上,执行命令后提示用户选择实体进行阵列,然后调用本申请上述实施例所提供的方案来选择实体,最后将预览结果、突出显示和/或放大显示的实体给上层Array命令。
实施例3:
此处需要说明的是,本发明的实施例还可以提供一种计算机终端,该计算机终端可以是计算机终端群中的任意一个计算机终端设备。可选地,在本实施例中,上述计算机终端也可以替换为移动终端等终端设备。
在本实施例中,上述计算机终端可以执行图纸中实体的选择方法中以下步骤的程序代码:
S1,在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序。
S3,选取图纸中的拾取点。
S5,以拾取点为中心筛选预定范围内的实体,以获取预选择实体。
S7,通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果。
可选地,图7是根据本发明实施例的一种计算机终端的结构框图。如图7所示,该计算机终端A可以包括:一个或多个(图中仅示出一个)处理器51、存储器53、以及传输装置55。
其中,存储器53可用于存储软件程序以及模块,如本发明实施例中的图纸中实体的选择方法和装置对应的程序指令/模块,处理器51通过运行存储在存储器53内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的图纸中实体的选择方法。存储器53可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器53可进一步包括相对于处理器51远程设置的存储器,这些远程存储器可以通过网络连接至终端A。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
上述的传输装置55用于经由一个网络接收或者发送数据。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置55包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联 网或局域网进行通讯。在一个实例中,传输装置55为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
其中,具体地,存储器53用于存储预设动作条件和预设权限用户的信息、以及应用程序。
处理器51可以通过传输装置调用存储器53存储的信息及应用程序,以执行下述步骤:在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;选取图纸中的拾取点;以拾取点为中心筛选预定范围内的实体,以获取预选择实体;通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果。
可选的,上述处理器51还可以执行如下步骤的程序代码:获取预选择实体的实体信息和拾取点的坐标值;调用控制指令挂接的预览程序中的回调函数;回调函数将实体信息和坐标值作为参数传入给预览处理函数;预览处理函数对预选择实体进行预览处理,以获取预览处理结果;将预览处理结果返回给预览程序中的回调函数,并显示预览处理结果;其中,预览处理结果与挂接预览程序的控制指令处理预选择实体的结果相同。
可选的,上述处理器51还可以执行如下步骤的程序代码:判断是否选择预览处理结果;如果确定选择预览处理结果,则将预选择实体的实体信息返回给挂接预览程序的控制指令,以使得控制指令来处理预选择实体;如果确定不选择预览处理结果,则恢复预选择实体的至预览程序处理预选择实体之前的状态。
可选的,上述处理器51还可以执行如下步骤的程序代码:获取图纸中所有实体的坐标值;按照预定的范围域值计算以拾取点为中心的区域范围,以获取预定范围;将所有实体的坐标值与拾取点的坐标值进行匹配,并与预定范围的点的坐标值进行匹配,以筛选得到预选择实体,其中,预选择实体是与拾取点及该拾取点在预定范围内的点的坐标值部分相同或者完全相同的实体集合。
可选的,上述处理器51还可以执行如下步骤的程序代码:获取预设的放大倍数;根据预设的放大倍数和显示屏的像素进行计算,以得到放大显示区域的尺寸;在显示屏的预定位置创建放大显示区域;在放大显示区域显示预选择实体,或显示通过挂接的预览程序处理后的预选择实体。
可选的,上述处理器51还可以执行如下步骤的程序代码:读取预选择实体的实体信息;按照预设的显示属性更新预选择实体的实体信息,以获取突出显示的预选择实体。
可选的,上述处理器51还可以执行如下步骤的程序代码:判断当前拾取点与上一次拾取点是否相同,其中,在相同的情况下,返回确定是否结束获取拾取点的操作,其中,在没有结束获取拾取点的情况下,如果上一次拾取点处于预定范围内,则获取上一次拾取点,否则,取消显示当前拾取点所对应的预选择实体;在不相同的情况下,进入通过挂接的预览程序处理当前拾取点所对应的预选择实体的步骤。
本领域普通技术人员可以理解,图7所示的结构仅为示意,计算机终端也可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图7其并不对上述电子装置的结构造成限定。例如,计算机终端A还可包括比图7中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图10所示不同的配置。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
实施例4:
此处还需要说明的是,本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以用于保存上述实施例一所提供的图纸中实体的选择方法所执行的程序代码。
可选地,在本实施例中,上述存储介质可以位于计算机网络中计算机终端群中的任意一个计算机终端中,或者位于移动终端群中的任意一个移动终端中。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;选取图纸中的拾取点;以拾取点为中心筛选预定范围内的实体,以获取预选择实体;通过挂接的预览程序处理预选择实体,以预先显示输入指令对预选择实体处理后的结果。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:获取预选择实体的实体信息和拾取点的坐标值;调用控制指令挂接的预览程序中的回调函数;回调 函数将实体信息和坐标值作为参数传入给预览处理函数;预览处理函数对预选择实体进行预览处理,以获取预览处理结果;将预览处理结果返回给预览程序中的回调函数,并显示预览处理结果;其中,预览处理结果与挂接预览程序的控制指令处理预选择实体的结果相同。
可选的,存储介质还被设置为存储用于执行以下步骤的程序代码:判断是否选择预览处理结果;如果确定选择预览处理结果,则将预选择实体的实体信息返回给挂接预览程序的控制指令,以使得控制指令来处理预选择实体;如果确定不选择预览处理结果,则恢复预选择实体的至预览程序处理预选择实体之前的状态。
可选的,存储介质还被设置为存储用于执行以下步骤的程序代码:获取图纸中所有实体的坐标值;按照预定的范围域值计算以拾取点为中心的区域范围,以获取预定范围;将所有实体的坐标值与拾取点的坐标值进行匹配,并与预定范围的点的坐标值进行匹配,以筛选得到预选择实体,其中,预选择实体是与拾取点及该拾取点在预定范围内的点的坐标值部分相同或者完全相同的实体集合。
可选的,存储介质还被设置为存储用于执行以下步骤的程序代码:获取预设的放大倍数;根据预设的放大倍数和显示屏的像素进行计算,以得到放大显示区域的尺寸;在显示屏的预定位置创建放大显示区域;在放大显示区域显示预选择实体,或显示通过挂接的预览程序处理后的预选择实体。
可选的,存储介质还被设置为存储用于执行以下步骤的程序代码:读取预选择实体的实体信息;按照预设的显示属性更新预选择实体的实体信息,以获取突出显示的预选择实体。
可选的,存储介质还被设置为存储用于执行以下步骤的程序代码:判断当前拾取点与上一次拾取点是否相同,其中,在相同的情况下,返回确定是否结束获取拾取点的操作,其中,在没有结束获取拾取点的情况下,如果上一次拾取点处于预定范围内,则获取上一次拾取点,否则,取消显示当前拾取点所对应的预选择实体;在不相同的情况下,进入通过挂接的预览程序处理当前拾取点所对应的预选择实体的步骤。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,本实施例中的具体示例可以参考上述实施例1和实施例2中所描述的示例,本实施例在此不再赘述。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
从以上描述中,可以看出,本发明上述的实施例中实现了如下技术效果:本发明通过在选择实体过程中,突显拾取点所在范围内的实体,以及在放大区域中调用挂接的命令预览程序,对实体处理预览效果,提高用户对实体选择的准确性。解决用户多次选择和选择不准确的问题。
需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本发明的原理可以使用其它通用或专用计算或通信环境或配置来操作。适用于本发明的众所周知的计算系统、环境和配置的示例包括但不限于,个人计算机、服务器,多处理器系统、基于微处理的系统、小型机、大型计算机、以及包括任一上述系统或设备的分布式计算环境。
如本发明所使用的,术语“模块”、“组件”或“单元”可以指在配置信息的更新系统200上执行的软件对象或例程。此处所描述的不同组件、模块、单元、引擎和服务可被实现为在标志位的访问系统200上执行(例如,作为单独的线程)的对象或进程。尽管此处所描述的系统和方法较佳地以软件来实现,但是硬件或软件和硬件的组合的实现也是可能并被构想的。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (14)

  1. 一种图纸中实体的选择方法,其特征在于,包括:
    在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;
    选取图纸中的拾取点;
    以所述拾取点为中心筛选预定范围内的实体,以获取预选择实体;
    通过挂接的所述预览程序处理所述预选择实体,以预先显示所述输入指令对所述预选择实体处理后的结果。
  2. 根据权利要求1所述的方法,其特征在于,通过挂接的所述预览程序处理所述预选择实体,以预先显示所述输入指令对所述预选择实体处理后的结果的步骤包括:
    获取所述预选择实体的实体信息和所述拾取点的坐标值;
    调用所述控制指令挂接的所述预览程序中的回调函数;
    所述回调函数将所述实体信息和所述坐标值作为参数传入给预览处理函数;
    所述预览处理函数对所述预选择实体进行预览处理,以获取预览处理结果;
    将所述预览处理结果返回给所述预览程序中的回调函数,并显示所述预览处理结果;
    其中,所述预览处理结果与挂接所述预览程序的控制指令处理所述预选择实体的结果相同。
  3. 根据权利要求2所述的方法,其特征在于,在显示所述预览处理结果之后,所述方法还包括:
    判断是否选择所述预览处理结果;
    如果确定选择所述预览处理结果,则将所述预选择实体的实体信息返回给挂接所述预览程序的控制指令,以使得所述控制指令来处理所述预选择实体;
    如果确定不选择所述预览处理结果,则恢复所述预选择实体的至所述预览程序处理所述预选择实体之前的状态。
  4. 根据权利要求1至3中任意一项所述的方法,其特征在于,以所述拾取点为中心筛选预定范围内的实体,以获取预选择实体的步骤包括:
    获取所述图纸中所有实体的坐标值;
    按照预定的范围域值计算以所述拾取点为中心的区域范围,以获取所述预定范围;
    将所述所有实体的坐标值与所述拾取点的坐标值进行匹配,并与所述预定范围的点的坐标值进行匹配,以筛选得到所述预选择实体,其中,所述预选择实体是与所述拾取点及该拾取点在预定范围内的点的坐标值部分相同或者完全相同的实体集合。
  5. 根据权利要求1至3中任意一项所述的方法,其特征在于,在通过挂接的所述预览程序处理所述预选择实体之后,所述方法还包括:
    获取预设的放大倍数;
    根据所述预设的放大倍数和显示屏的像素进行计算,以得到放大显示区域的尺寸;
    在所述显示屏的预定位置创建所述放大显示区域;
    在所述放大显示区域显示所述预选择实体,或显示通过挂接的所述预览程序处理后的预选择实体。
  6. 根据权利要求5所述的方法,其特征在于,在以所述拾取点为中心筛选预定范围内的实体,以获取预选择实体之后,所述方法还包括:按照预定的突出显示方式显示所述预选择实体,其中,所述突出显示方式包括:设置所述预选择实体的显示属性,该步骤包括:
    读取预选择实体的实体信息;
    按照预设的显示属性更新所述预选择实体的实体信息,以获取突出显示的所述预选择实体。
  7. 根据权利要求6所述的方法,其特征在于,在按照预定的突出显示方式显示所述预选择实体之前,所述方法还包括:
    判断当前拾取点与上一次拾取点是否相同,其中,
    在相同的情况下,返回确定是否结束获取所述拾取点的操作,其中,在没有结束获取所述拾取点的情况下,如果上一次拾取点处于所述预定范围内,则获取所述上一次拾取点,否则,取消显示所述当前拾取点所对应的预选择实体;
    在不相同的情况下,进入通过挂接的所述预览程序处理所述当前拾取点所对应的预选择实体的步骤。
  8. 一种图纸中实体的选择装置,其特征在于,包括:
    调用模块,用于在CAD系统中输入功能指令之后,调用对应该功能指令所挂接的预览程序;
    选取模块,用于选取图纸中的拾取点;
    筛选模块,用于以所述拾取点为中心筛选预定范围内的实体,以获取预选择实体;
    处理模块,用于通过挂接的所述预览程序处理所述预选择实体,以预先显示所述输入指令对所述预选择实体处理后的结果。
  9. 根据权利要求8所述的装置,其特征在于,所述处理模块包括:
    第一获取模块,用于获取所述预选择实体的实体信息和所述拾取点的坐标值;
    子调用模块,用于调用所述控制指令挂接的所述预览程序中的回调函数;
    传输模块,用于所述回调函数将所述实体信息和所述坐标值作为参数传入给预览处理函数;
    预览处理模块,用于所述预览处理函数对所述预选择实体进行预览处理,以获取预览处理结果;
    显示模块,用于将所述预览处理结果返回给所述预览程序中的回调函数,并显示所述预览处理结果;
    其中,所述预览处理结果与挂接所述预览程序的控制指令处理所述预选择实体的结果相同。
  10. 根据权利要求9所述的装置,其特征在于,所述处理装置还包括:
    第一判断模块,用于判断是否选择所述预览处理结果;
    返回模块,用于如果确定选择所述预览处理结果,则将所述预选择实体的实体信息返回给挂接所述预览程序的控制指令,以使得所述控制指令来处理所述预选择实体;
    恢复模块,用于如果确定不选择所述预览处理结果,则恢复所述预选择实体的至所述预览程序处理所述预选择实体之前的状态。
  11. 根据权利要求8至10中任意一项所述的装置,其特征在于,所述筛选模块包括:
    第二获取模块,用于获取所述图纸中所有实体的坐标值;
    第一计算模块,用于按照预定的范围域值计算以所述拾取点为中心的区域范围,以获取所述预定范围;
    匹配实体模块,用于将所述所有实体的坐标值与所述拾取点的坐标值进行匹配,并与所述预定范围的点的坐标值进行匹配,以筛选得到所述预选择实体,其中,所述预选择实体是与所述拾取点及该拾取点在预定范围内的点的坐标值部分相同或者完全相同的实体集合。
  12. 根据权利要求8至10中任意一项所述的装置,其特征在于,所述装置还包括:
    第三获取模块,用于获取预设的放大倍数;
    第二计算模块,用于根据所述预设的放大倍数和显示屏的像素进行计算,以得到放大显示区域的尺寸;
    创建模块,用于在所述显示屏的预定位置创建所述放大显示区域;
    放大显示模块,用于在所述放大显示区域显示所述预选择实体,或显示通过挂接的所述预览程序处理后的预选择实体。
  13. 根据权利要求12所述的装置,其特征在于,所述装置还包括:突出显示模块,用于按照预定的突出显示方式显示所述预选择实体,其中,所述突出显示方式包括:设置所述预选择实体的线条显示属性,所述突出显示模块包括:
    读取模块,用于读取预选择实体的实体信息;
    突出处理模块,用于按照预设的显示属性更新所述预选择实体的实体信息,以获取突出显示的所述预选择实体。
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括:
    第二判断模块,用于判断当前拾取点与上一次拾取点是否相同;
    确定模块,用于在相同的情况下,返回确定是否结束获取所述拾取点的操作,其中,在没有结束获取所述拾取点的情况下,如果上一次拾取点处于所述预定范围内,则获取所述上一次拾取点,否则,取消获取所述当前拾取点;在不相同的情况下,执行所述处理模块,以通过挂接的所述预览程序处理所述当前拾取点所对应的预选择实体。
PCT/CN2014/088052 2013-10-18 2014-09-30 图纸中实体的选择方法和装置 WO2015055087A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US14/917,252 US10466877B2 (en) 2013-10-18 2014-09-30 Method and device for selecting entity in drawing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310495518.2A CN103530021B (zh) 2013-10-18 2013-10-18 图纸中实体的选择方法和装置
CN201310495518.2 2013-10-18

Publications (1)

Publication Number Publication Date
WO2015055087A1 true WO2015055087A1 (zh) 2015-04-23

Family

ID=49932081

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088052 WO2015055087A1 (zh) 2013-10-18 2014-09-30 图纸中实体的选择方法和装置

Country Status (3)

Country Link
US (1) US10466877B2 (zh)
CN (1) CN103530021B (zh)
WO (1) WO2015055087A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530021B (zh) 2013-10-18 2017-03-01 苏州浩辰软件股份有限公司 图纸中实体的选择方法和装置
CN105045604A (zh) * 2015-08-25 2015-11-11 广州视睿电子科技有限公司 绘制图形的方法和系统
CN105159560A (zh) * 2015-09-02 2015-12-16 上海斐讯数据通信技术有限公司 电路设计软件中元器件对齐方法及系统
CN107153495B (zh) * 2017-05-10 2020-06-26 华为技术有限公司 一种建立网元间业务链路的方法和装置
CN110232260B (zh) * 2018-07-16 2021-11-02 苏州浩辰软件股份有限公司 Cad系统引用的分级操作系统、方法、计算机可读存储介质及计算机终端
CN109285206A (zh) * 2018-09-19 2019-01-29 广州盖特软件有限公司 一种线条感应拾取的方法及装置
CN109918746A (zh) * 2019-02-19 2019-06-21 西门子电站自动化有限公司 基于计算机辅助设计图纸文件生成物料清单的方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001042995A2 (en) * 1999-12-13 2001-06-14 Amada Company, Limited Sketcher
CN101561830A (zh) * 2008-04-18 2009-10-21 北京数码大方科技有限公司 用于cad的尺寸标注方法和装置
CN102799720A (zh) * 2012-07-03 2012-11-28 武汉天喻软件有限责任公司 一种cad图形和图像混合编辑系统
CN103530021A (zh) * 2013-10-18 2014-01-22 苏州浩辰软件股份有限公司 图纸中实体的选择方法和装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5835090A (en) * 1996-10-16 1998-11-10 Etma, Inc. Desktop manager for graphical user interface based system with enhanced desktop
US6075531A (en) * 1997-12-15 2000-06-13 International Business Machines Corporation Computer system and method of manipulating multiple graphical user interface components on a computer display with a proximity pointer
US7280990B2 (en) * 2001-08-07 2007-10-09 Ugs Corp. Method and system for designing and modeling a product in a knowledge based engineering environment
US9766953B2 (en) * 2004-12-16 2017-09-19 Openspan, Inc. System and method for non-programmatically constructing software solutions
US7644363B2 (en) * 2006-04-10 2010-01-05 Autodesk, Inc. “For-each” label components in CAD drawings
JP2008170939A (ja) * 2006-12-12 2008-07-24 National Institute Of Information & Communication Technology 電子機器、情報処理装置、画像改変方法及び情報処理方法
US20100011009A1 (en) * 2008-07-08 2010-01-14 Caterpillar Inc. System and method for monitoring document conformance
US8297811B2 (en) * 2008-07-28 2012-10-30 Koito Manufacturing Co., Ltd. Aircraft lamp
US8612923B2 (en) * 2009-02-06 2013-12-17 Cadence Design Systems, Inc. Methods, systems, and computer-program products for item selection and positioning suitable for high-altitude and context sensitive editing of electrical circuits
EP2333682B1 (en) * 2009-11-06 2020-05-20 Dassault Systèmes Method and system for designing an assembly of objects in a system of computer-aided design
CN103123718B (zh) * 2011-11-21 2016-06-22 腾讯科技(深圳)有限公司 一种图像处理方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001042995A2 (en) * 1999-12-13 2001-06-14 Amada Company, Limited Sketcher
CN101561830A (zh) * 2008-04-18 2009-10-21 北京数码大方科技有限公司 用于cad的尺寸标注方法和装置
CN102799720A (zh) * 2012-07-03 2012-11-28 武汉天喻软件有限责任公司 一种cad图形和图像混合编辑系统
CN103530021A (zh) * 2013-10-18 2014-01-22 苏州浩辰软件股份有限公司 图纸中实体的选择方法和装置

Also Published As

Publication number Publication date
US10466877B2 (en) 2019-11-05
CN103530021A (zh) 2014-01-22
CN103530021B (zh) 2017-03-01
US20160224215A1 (en) 2016-08-04

Similar Documents

Publication Publication Date Title
WO2015055087A1 (zh) 图纸中实体的选择方法和装置
EP2990924B1 (en) Gesture-based on-chart data filtering
CA2795183C (en) Temporary formatting and charting of selected data
KR20160003683A (ko) 시각화된 데이터를 상호작용에 기초하여 자동으로 조작하는 기법
US20140232723A1 (en) Moving visualizations between displays and contexts
US11354350B2 (en) Method, apparatus and system for browsing images on a user interface displaying a map
JP3369734B2 (ja) 3次元計算機支援設計装置及び方法
JP7262296B2 (ja) 3次元cad装置、及び3次元cadプログラム
JP6287498B2 (ja) 電子ホワイトボード装置、電子ホワイトボードの入力支援方法、及びプログラム
KR101769129B1 (ko) 온라인 환경에서 구현되는 대시보드 내 차트간 인터랙션 방법
CN113312125B (zh) 多窗口调整方法、系统、可读存储介质和电子设备
CN104516860A (zh) 选择被显示文档内的文本的方法和系统
CN114706508A (zh) Web端的画布放大、缩小偏移控制方法及画布重绘方法
CN115239846A (zh) 一种切割文件的可视化修改方法、装置及相关组件
JP3953738B2 (ja) 図形編集装置、および図形編集装置として機能させるためのプログラムを格納した記録媒体
CN111124393A (zh) 一种算法逻辑的编辑方法、平台、电子设备及存储介质
CN113268189B (zh) 图集管理方法、装置、存储介质以及计算机设备
JP5720749B2 (ja) 表示プログラム、表示方法、およびコンピュータ
CN116860222B (zh) 一种算法流程编辑方法及相关装置
JP2019174543A (ja) データ表示装置およびデータ表示方法
JP2012133459A (ja) 画像評価装置、及び方法、並びにプログラム、そのプログラムを記録したコンピュータ読み取り可能な記録媒体
US11908493B2 (en) Single clip segmentation of media
WO2016151677A1 (ja) 解析支援装置及び解析支援方法並びに解析のメッシュ支援プログラム
JP2006215949A (ja) 解析用モデル作成支援システム
JP2006344245A (ja) プログラム記録媒体及びデータ処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14854417

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14917252

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14854417

Country of ref document: EP

Kind code of ref document: A1