CN105335998A - Double-queue spread-based multiresolution middle axle generation method - Google Patents

Double-queue spread-based multiresolution middle axle generation method Download PDF

Info

Publication number
CN105335998A
CN105335998A CN201510713402.0A CN201510713402A CN105335998A CN 105335998 A CN105335998 A CN 105335998A CN 201510713402 A CN201510713402 A CN 201510713402A CN 105335998 A CN105335998 A CN 105335998A
Authority
CN
China
Prior art keywords
voxel
current
boundary
queue
distance
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201510713402.0A
Other languages
Chinese (zh)
Inventor
张奇
刘玉生
胡笑奇
林云峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Auspicious Development In Science And Technology Of Literary Composition Co Ltd
Original Assignee
Zhejiang Auspicious Development In Science And Technology Of Literary Composition Co Ltd
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 Zhejiang Auspicious Development In Science And Technology Of Literary Composition Co Ltd filed Critical Zhejiang Auspicious Development In Science And Technology Of Literary Composition Co Ltd
Priority to CN201510713402.0A priority Critical patent/CN105335998A/en
Publication of CN105335998A publication Critical patent/CN105335998A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

The invention discloses a double-queue spread-based multiresolution middle axle generation method. The method comprises the following steps that: 1) voxelization is performed on on a three-dimensional model; 2) initializing a current queue and a reserved queue; 3) traversing voxels of the current queue, a nearest boundary voxel and inner peripheral voxels of the current voxels are taken out, the distances from the inner peripheral voxels to the nearest boundary voxel are updated in sequence; 4) when the reserved queue is nonempty after traversing, the reserved queue and the current queue are exchanged mutually, a current distance is set as the sum of an original current distance and the length of voxel edges, and the step 2) is repeated until the reserved queue is empty; and fifthly, the quality of a middle axle is calculated, if the quality of the middle axle does not satisfy requirements, the method shifts to step 1), the middle axle is refined. The double-queue spread-based multiresolution middle axle generation method of the invention has the advantages of high generating speed, high computing efficiency and low occupation of resources.

Description

A kind of many resolutions axis generation method spread based on deque
Technical field
The present invention relates to field of three-dimension modeling, be specifically related to a kind of many resolutions axis generation method of three-dimensional model.
Background technology
The axis of two dimensional model refers to its incenter set, and the axis of three-dimensional model then refers to the set of its inscribed sphere centre of sphere.At many engineering fields, the outstanding attribute of axis makes it have great significance, such as finite element analysis, shape analysis, robot path plan, solid modelling and mess generation.
Had many medial Axis Generation Algorithm at present, traditional axis generation method can be divided into three classes generally: thin method, tracing and Wei Nuotufa.The method of thinning model is become an approximate model that can easily calculate, and then " reduced " constantly inwards by model until the process that reduces from different directions " is run into " and calculates its axis, the degree of accuracy of calculating is controlled by the approximation accuracy of model; Tracing is a kind of method of recurrence, and it is based on local continuity, generates axis by following the tracks of special axial point; Wei Nuotufa, based on the corresponding relation between Wei Nuotu and De Lao interior triangular, obtains approximately through calculating in Wei Nuotu.But the speed of above-mentioned axis generation method is all very slow, is not all suitable for the complex model with various surface, for the complex model with various surface, goes back the gratifying method of neither one so far and efficiently can generate its axis rapidly.
Summary of the invention
The technical problem to be solved in the present invention is to provide that a kind of formation speed is fast, counting yield is high, assess the cost the low many resolutions axis generation method spread based on deque.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is: a kind of many resolutions axis generation method spread based on deque, is characterized in that implementation step is as follows:
1) setting model rank is 0;
2) three-dimensional model is carried out voxel and turn to voxel of object, boundary voxel and outside voxel;
3) for each block, initialization current queue and preparation queue, put into current queue by boundary voxel, and in initialization three-dimensional model, the distance to nearest boundary voxel of each boundary voxel is zero, the distance to nearest boundary voxel of each voxel of object is infinity;
4) voxel of current queue is traveled through, take out the nearest boundary voxel of current voxel and be connected with current voxel face, limit connects, the surrounding inner voxel that point connects, upgrade the distance of each surrounding inner voxel to described nearest boundary voxel successively, if this renewal distance is greater than or equal to current distance and voxel length of side sum and is less than current distance and twice voxel length of side sum, then current voxel is moved into preparation queue, whether each surrounding inner voxel then judging current voxel is axis voxel: if two of Current ambient voxel of object nearest boundary voxel belong to two different surfaces and this two surfaces are not connect with concave edge, or the nearest boundary voxel of the surrounding inner voxel that the nearest boundary voxel of Current ambient voxel of object is connected with at least one face does not belong to same and these two faces are not be connected with concave edge, or the nearest boundary voxel of Current ambient voxel of object and the nearest boundary voxel of the surrounding inner voxel that at least one face connects belong to two different concave edges, or two of Current ambient voxel of object nearest boundary voxel belong to same and the normal of this current surrounding inner voxel through two nearest boundary voxel, or two of Current ambient voxel of object nearest boundary voxel belong to same concave edge and the line of this voxel and these two nearest boundary voxel and this concave edge tangent, then this current voxel is axis voxel,
5) after current queue traversal, if preparation queue not empty, then will prepare queue and current queue is exchanged, and current distance will be set to former current distance and voxel length of side sum, then repeated execution of steps 4) until reserve force is classified as sky;
6) calculate axis, calculate axis quality simultaneously, if axis quality is undesirable, improves model hierarchy and go to step 2), otherwise merge original axis and newly-generated axis, obtain result axis;
When upgrading each surrounding inner voxel in described step 4) to the distance of nearest boundary voxel, if when surrounding inner voxel is less than former distance to the new distance of the nearest boundary voxel for current voxel, then the distance of this surrounding inner voxel to nearest boundary voxel is upgraded, otherwise keep this surrounding inner voxel constant to the distance of nearest boundary voxel;
In described step 6), axis quality refers to the boundary surface of complete voxelization and the ratio value of all boundary surfaces, and the boundary surface of voxelization completely here refers to the boundary surface of the axis voxel do not shared with other boundary surfaces containing at least one.The raising of model class makes voxel size be that the voxel of prior level 1/2nd is introduced into;
In described step 1), the detailed step of voxelization comprises: the bounding box obtaining three-dimensional model, is divided into some square voxels do not judged, square voxel is all initialized as outside voxel by this bounding box; In outside voxel, the boundary voxel belonging to each face of three-dimensional model is obtained by rays method; Travel through outside voxel, under obtaining, voxel, left voxel, rear voxel are all that the outside voxel of boundary voxel is as first voxel of object; Other voxel of objects are found by the method for BFS (Breadth First Search) according to first voxel of object.
The present invention has following advantage:
1, the present invention refers to an approximate representation three-dimensional entity model being changed into some square set of voxels by voxelization, and utilizes current queue and preparation queue two queues, the distance of these voxels to border is carried out spreading renewal.And by these range informations, can judge which is axis voxel by the voxel spread, thus generate axis set of voxels to have that formation speed is fast, counting yield is high, assess the cost low advantage.
2, the present invention is further for result axis, can improve axis quality by the mode improving model class.In improving in model class, only refinement is carried out to the part of model, the Time & Space Complexity of algorithm is reduced all greatly, improve the efficiency that axis calculates.
Accompanying drawing explanation
Fig. 1 is the implementing procedure schematic diagram of the embodiment of the present invention.
Fig. 2 is the structural representation of three-dimensional model voxelization in the embodiment of the present invention.
Fig. 3 be connected with current voxel face in the embodiment of the present invention, limit connects, put the surrounding inner voxel schematic diagram that connects.
Fig. 4 is the schematic diagram of the voxel of different stage in the present invention.
Fig. 5 is the schematic diagram of the voxelization process of different stage in the present invention.
Fig. 6 is axis voxel determination schematic diagram when two nearest voxels are positioned on same surface in the embodiment of the present invention.
Fig. 7 is axis voxel determination schematic diagram when two nearest voxels are positioned on same concave edge in the embodiment of the present invention.
Embodiment
As shown in Figure 1, the multi-voxel proton axis generation method implementation step spread based on deque of the embodiment of the present invention is as follows:
1) setting model rank is 0
2) three-dimensional model is carried out voxel and turn to voxel of object, boundary voxel and outside voxel;
3) for each block, initialization current queue and preparation queue, put into current queue by boundary voxel, and in initialization three-dimensional model, the distance to nearest boundary voxel of each boundary voxel is zero, the distance to nearest boundary voxel of each voxel of object is infinity;
4) voxel of current queue is traveled through, take out the nearest boundary voxel of current voxel and be connected with current voxel face, limit connects, the surrounding inner voxel that point connects, upgrade the distance of each surrounding inner voxel to described nearest boundary voxel successively, if this renewal distance is greater than or equal to current distance and voxel length of side sum and is less than current distance and twice voxel length of side sum, then current voxel is moved into preparation queue, whether each surrounding inner voxel then judging current voxel is axis voxel: if two of Current ambient voxel of object nearest boundary voxel belong to two different surfaces and this two surfaces are not connect with concave edge, or the nearest boundary voxel of the surrounding inner voxel that the nearest boundary voxel of Current ambient voxel of object is connected with at least one face does not belong to same and these two faces are not be connected with concave edge, or the nearest boundary voxel of Current ambient voxel of object and the nearest boundary voxel of the surrounding inner voxel that at least one face connects belong to two different concave edges, or two of Current ambient voxel of object nearest boundary voxel belong to same and the normal of this current surrounding inner voxel through two nearest boundary voxel, or two of Current ambient voxel of object nearest boundary voxel belong to same concave edge and the line of this voxel and these two nearest boundary voxel and this concave edge tangent, then this current voxel is axis voxel,
5) after current queue traversal, if preparation queue not empty, then will prepare queue and current queue is exchanged, and current distance will be set to former current distance and voxel length of side sum, then repeated execution of steps 4) until reserve force is classified as sky;
6) calculate axis, calculate axis quality simultaneously, if axis quality is undesirable, improves model hierarchy and go to step 2), otherwise merge original axis and newly-generated axis, obtain result axis.
When upgrading each surrounding inner voxel in described step 4) to the distance of nearest boundary voxel, if when surrounding inner voxel is less than former distance to the new distance of the nearest boundary voxel for current voxel, then the distance of this surrounding inner voxel to nearest boundary voxel is upgraded, otherwise keep this surrounding inner voxel constant to the distance of nearest boundary voxel.
In described step 6), axis quality refers to the boundary surface of complete voxelization and the ratio value of all boundary surfaces, and the boundary surface of voxelization completely here refers to the boundary surface of the axis voxel do not shared with other boundary surfaces containing at least one.The raising of model class makes voxel size be that the voxel of prior level 1/2nd is introduced into, as shown in Figure 4.
Described step 2) in the detailed step of voxelization comprise: when model class is 0, as shown in Fig. 2 and Fig. 4 b, obtain the bounding box of three-dimensional model, this bounding box is divided into some square voxels do not judged, square voxel is all initialized as outside voxel; In outside voxel, the boundary voxel belonging to each face of three-dimensional model is obtained by rays method; Travel through outside voxel, under obtaining, voxel, left voxel, rear voxel are all that the outside voxel of boundary voxel is as first voxel of object; Other voxel of objects are found by the method for BFS (Breadth First Search) according to first voxel of object.
In the present embodiment, the information that each square voxel of body comprises is as shown in the table:
content implication
position mark illustrate this voxel be on model boundary, model is inner or model is outside, is likely the boundary voxel disappeared in Boolean calculation.Be initialized as the outside at model.
nearest boundary voxel it is boundary voxel the shortest to this voxel distance in all boundary voxel.Be initialized as sky.
minimum distance distance between nearest boundary voxel and this voxel.Be initialized as infinity.
axis voxel if a voxel is the nearest boundary voxel of an axis voxel, so the axis voxel of this nearest boundary voxel is exactly this axis voxel
xYZ mark this voxel point other order on coordinate system X/Y/Z axle
voxel marks whether mark a voxel is axis voxel
When obtaining boundary voxel by rays method in outside voxel, the nearest boundary voxel of boundary voxel is itself, and therefore its distance to nearest boundary voxel is 0.
When model class is greater than 0, as Fig. 5 c, shown in 5d, for the boundary surface of not voxelization completely, the voxel of current level is used to carry out voxelization.
In the present embodiment, the detailed step obtaining axis set of voxels comprises:
(1) voxel in current queue is taken out.Upgrade its all connection after boolean operation, limit connects, point connects voxel of object to the distance (Fig. 3) on border.If the distance to border of surrounding inner voxel meets current distance scope, then put into preparation queue.If two of this voxel nearest boundary voxel belong to different surfaces, and these two surfaces are not connect with concave edge, then this voxel is axis voxel.Repeat this step until current queue is for empty.The method that its middle distance upgrades is: calculate the distance between the nearest boundary voxel of this voxel and this voxel adjacent voxels.If old minimum distance is greater than this distance, then minimum distance is updated to this distance, remembers that this nearest boundary voxel is the nearest boundary voxel of that adjacent voxels.
(2) if preparation queue not empty, then prepare queue and become new current queue, old empty current queue becomes new preparation queue.Current distance equals old current distance and adds the voxel length of side.
(3) travel through all once at the voxel of current queue, if there is a voxel, the nearest boundary voxel of its voxel that at least one limit of nearest boundary voxel and it is connected or face connects does not belong to same, and these two faces are not be connected with concave edge, and so this voxel is axis voxel.
(4) travel through all once at the voxel of current queue, if there is a voxel as shown in Figure 6, two nearest boundary voxel belongs to same, and the normal of this voxel is through its two nearest boundary voxel, and so this voxel is axis voxel.
(5) travel through all once at the voxel of current queue, if there is a voxel as shown in Figure 7, two nearest boundary voxel belongs to concave edge, and the line of this voxel and these two nearest boundary voxel and concave edge tangent, so this voxel is axis voxel.
(6) merge original axis and newly-generated axis, obtain the set of result axis.
The foregoing is only the preferred embodiment of the present invention, protection scope of the present invention is not limited in above-mentioned embodiment, and every technical scheme belonging to the principle of the invention all belongs to protection scope of the present invention.For a person skilled in the art, some improvements and modifications of carrying out under the prerequisite not departing from principle of the present invention, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (1)

1. the many resolutions axis generation method spread based on deque, is characterized in that implementation step is as follows:
1) setting model rank is 0;
2) three-dimensional model is carried out voxel and turn to voxel of object, boundary voxel and outside voxel;
3) for each block, initialization current queue and preparation queue, put into current queue by boundary voxel, and in initialization three-dimensional model, the distance to nearest boundary voxel of each boundary voxel is zero, the distance to nearest boundary voxel of each voxel of object is infinity;
4) voxel of current queue is traveled through, take out the nearest boundary voxel of current voxel and be connected with current voxel face, limit connects, the surrounding inner voxel that point connects, upgrade the distance of each surrounding inner voxel to described nearest boundary voxel successively, if this renewal distance is greater than or equal to current distance and voxel length of side sum and is less than current distance and twice voxel length of side sum, then current voxel is moved into preparation queue, whether each surrounding inner voxel then judging current voxel is axis voxel: if two of Current ambient voxel of object nearest boundary voxel belong to two different surfaces and this two surfaces are not connect with concave edge, or the nearest boundary voxel of the surrounding inner voxel that the nearest boundary voxel of Current ambient voxel of object is connected with at least one face does not belong to same and these two faces are not be connected with concave edge, or the nearest boundary voxel of Current ambient voxel of object and the nearest boundary voxel of the surrounding inner voxel that at least one face connects belong to two different concave edges, or two of Current ambient voxel of object nearest boundary voxel belong to same and the normal of this current surrounding inner voxel through two nearest boundary voxel, or two of Current ambient voxel of object nearest boundary voxel belong to same concave edge and the line of this voxel and these two nearest boundary voxel and this concave edge tangent, then this current voxel is axis voxel,
5) after current queue traversal, if preparation queue not empty, then will prepare queue and current queue is exchanged, and current distance will be set to former current distance and voxel length of side sum, then repeated execution of steps 4) until reserve force is classified as sky;
6) calculate axis, calculate axis quality simultaneously, if axis quality is undesirable, improves model hierarchy and go to step 2), otherwise merge original axis and newly-generated axis, obtain result axis;
When upgrading each surrounding inner voxel in described step 4) to the distance of nearest boundary voxel, if when surrounding inner voxel is less than former distance to the new distance of the nearest boundary voxel for current voxel, then the distance of this surrounding inner voxel to nearest boundary voxel is upgraded, otherwise keep this surrounding inner voxel constant to the distance of nearest boundary voxel;
In described step 6), axis quality refers to the boundary surface of complete voxelization and the ratio value of all boundary surfaces, and the boundary surface of voxelization completely here refers to the boundary surface of the axis voxel do not shared with other boundary surfaces containing at least one; The raising of model class makes voxel size be that the voxel of prior level 1/2nd is introduced into;
In described step 1), the detailed step of voxelization comprises: the bounding box obtaining three-dimensional model, is divided into some square voxels do not judged, square voxel is all initialized as outside voxel by this bounding box; In outside voxel, the boundary voxel belonging to each face of three-dimensional model is obtained by rays method; Travel through outside voxel, under obtaining, voxel, left voxel, rear voxel are all that the outside voxel of boundary voxel is as first voxel of object; Other voxel of objects are found by the method for BFS (Breadth First Search) according to first voxel of object.
CN201510713402.0A 2015-10-28 2015-10-28 Double-queue spread-based multiresolution middle axle generation method Pending CN105335998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510713402.0A CN105335998A (en) 2015-10-28 2015-10-28 Double-queue spread-based multiresolution middle axle generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510713402.0A CN105335998A (en) 2015-10-28 2015-10-28 Double-queue spread-based multiresolution middle axle generation method

Publications (1)

Publication Number Publication Date
CN105335998A true CN105335998A (en) 2016-02-17

Family

ID=55286500

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510713402.0A Pending CN105335998A (en) 2015-10-28 2015-10-28 Double-queue spread-based multiresolution middle axle generation method

Country Status (1)

Country Link
CN (1) CN105335998A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826122A (en) * 2019-10-12 2020-02-21 中广核工程有限公司 Voxel method and system for nuclear power three-dimensional layout design model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275646A (en) * 2004-03-24 2005-10-06 Fujitsu Ltd Three-dimensional plotting model generation method, three-dimensional model plotting method, and program therefor
CN102222360A (en) * 2011-06-17 2011-10-19 浙江大学 Two-queue spread-based constructional method for generating middle axle
CN103279981A (en) * 2013-05-10 2013-09-04 丽水市瑞智科技开发有限公司 Incremental high-efficiency method for generating middle axle

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275646A (en) * 2004-03-24 2005-10-06 Fujitsu Ltd Three-dimensional plotting model generation method, three-dimensional model plotting method, and program therefor
CN102222360A (en) * 2011-06-17 2011-10-19 浙江大学 Two-queue spread-based constructional method for generating middle axle
CN103279981A (en) * 2013-05-10 2013-09-04 丽水市瑞智科技开发有限公司 Incremental high-efficiency method for generating middle axle

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱厚盛 等: "实体模型的多分辨率中轴生成", 《计算机辅助设计与图形学学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110826122A (en) * 2019-10-12 2020-02-21 中广核工程有限公司 Voxel method and system for nuclear power three-dimensional layout design model
CN110826122B (en) * 2019-10-12 2023-02-28 中广核工程有限公司 Voxel method and system for nuclear power three-dimensional layout design model

Similar Documents

Publication Publication Date Title
CN108198145B (en) Method and device for point cloud data restoration
CN110411464B (en) Three-dimensional point cloud map generation method, device, equipment and storage medium
CN107767457A (en) A kind of STL digital-to-analogue generation methods quickly rebuild based on a cloud
CN107972034B (en) Complex workpiece trajectory planning simulation system based on ROS platform
EP4116935A2 (en) High-definition map creation method and device, and electronic device
CN107622530B (en) Efficient and robust triangulation network cutting method
CN103135446B (en) Motion trail authentication device of multiaxis numerical control machine tool
CN112161622B (en) Robot footprint planning method and device, readable storage medium and robot
US10991154B1 (en) Method for generating model of sculpture of face with high meticulous, computing device, and non-transitory storage medium
CN111581776B (en) Iso-geometric analysis method based on geometric reconstruction model
JPH0350679A (en) Method for calculating minkowski's sum of general polyhedron
KR20210063841A (en) Method of clustering 3d point cloud data and apparatuses operating the same
Joy et al. Frame-sliced voxel representation: An accurate and memory-efficient modeling method for workpiece geometry in machining simulation
JP7312866B2 (en) Radar point cloud data processing method, apparatus, electronic device, storage medium, and program
CN104156997A (en) Quick volume data skeleton extraction method based on rendering
CN110826122B (en) Voxel method and system for nuclear power three-dimensional layout design model
CN1776694A (en) Commodity vehicle parameter modelling method for full-loaded transport simulating system
Miclea et al. New sub-pixel interpolation functions for accurate real-time stereo-matching algorithms
CN103810313A (en) Method for converting STL (Standard Template Library) model to space division model
Wang et al. Distortion-free intelligent sampling of sparse surfaces via locally refined T-spline metamodelling
Faion et al. Recursive Bayesian pose and shape estimation of 3D objects using transformed plane curves
CN105335998A (en) Double-queue spread-based multiresolution middle axle generation method
CN104392030A (en) Curved surface machining method based on STL (Standard Template Library) three-dimensional model
CN102222360A (en) Two-queue spread-based constructional method for generating middle axle
CN116310753A (en) Vectorized skeleton extraction method and system for outdoor scene point cloud data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160217

RJ01 Rejection of invention patent application after publication