摘要 |
PROBLEM TO BE SOLVED: To provide a three-dimensional shape processing device and a polyline formation program capable of obtaining a polyline properly expressing the shape of a curved line when the number of division of the curved line is limited. SOLUTION: An allowable error allowed in approximation of the curved line by a polyline is designated (S1), the curved line is divided at the midpoint in a parameter space of the curved line and the division point is used as a node (S2), and a distance between a segment connecting the end point of the curved line and the node together and the curved line is calculated (S3). If the distance is not above the allowable error (S4; Yes), it is determined that the approximation offers proper expression, and the process proceeds to a step S5. If the distance is higher than the allowable error (S4; No), the both end points of the divided segment used as new end points of the curved line, and processes from the step S2 are repeated. In addition, it is determined whether the number of nodes exceeds the high limit of the division number or not (S5), if excess is determined (S5; Yes), the processes are repeatedly subtracted one by one (S6) according to the predetermined rule so that the number of the nodes becomes the high limit. |