ΑΝΑΚΑΤΑΣΚΕΥΗ ΜΟΝΤΕΛΩΝ CAD ΜΕ ΧΑΡΑΚΤΗΡΙΣΤΙΚΑ ΒΑΣΙΣΜΕΝΗ ΣΤΗ ΜΟΡΦΟΛΟΓΙΑ ΤΟΥ ΝΕΦΟΥΣ ΣΗΜΕΙΩΝ Η ΔΙΔΑΚΤΟΡΙΚΗ ΔΙΑΤΡΙΒΗ. Υποβάλλεται στην

Σχετικά έγγραφα
α & β spatial orbitals in

One and two particle density matrices for single determinant HF wavefunctions. (1) = φ 2. )β(1) ( ) ) + β(1)β * β. (1)ρ RHF

ΠΤΥΧΙΑΚΗ/ ΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ

8.1 The Nature of Heteroskedasticity 8.2 Using the Least Squares Estimator 8.3 The Generalized Least Squares Estimator 8.

Multi-dimensional Central Limit Theorem

Multi-dimensional Central Limit Theorem

Πανεπιστήµιο Κρήτης - Τµήµα Επιστήµης Υπολογιστών. ΗΥ-570: Στατιστική Επεξεργασία Σήµατος. ιδάσκων : Α. Μουχτάρης. εύτερη Σειρά Ασκήσεων.

Neutralino contributions to Dark Matter, LHC and future Linear Collider searches

ΗΥ537: Έλεγχος Πόρων και Επίδοση σε Ευρυζωνικά Δίκτυα,

Proposal of Terminal Self Location Estimation Method to Consider Wireless Sensor Network Environment

Μηχανική Μάθηση Hypothesis Testing

Variance of Trait in an Inbred Population. Variance of Trait in an Inbred Population

Generalized Fibonacci-Like Polynomial and its. Determinantal Identities

LECTURE 4 : ARMA PROCESSES

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

The Simply Typed Lambda Calculus

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

ΓΕΩΜΕΣΡΙΚΗ ΣΕΚΜΗΡΙΩΗ ΣΟΤ ΙΕΡΟΤ ΝΑΟΤ ΣΟΤ ΣΙΜΙΟΤ ΣΑΤΡΟΤ ΣΟ ΠΕΛΕΝΔΡΙ ΣΗ ΚΤΠΡΟΤ ΜΕ ΕΦΑΡΜΟΓΗ ΑΤΣΟΜΑΣΟΠΟΙΗΜΕΝΟΤ ΤΣΗΜΑΣΟ ΨΗΦΙΑΚΗ ΦΩΣΟΓΡΑΜΜΕΣΡΙΑ

Symplecticity of the Störmer-Verlet algorithm for coupling between the shallow water equations and horizontal vehicle motion

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

ΜΕΛΕΤΗ ΤΗΣ ΜΑΚΡΟΧΡΟΝΙΑΣ ΠΑΡΑΜΟΡΦΩΣΗΣ ΤΟΥ ΦΡΑΓΜΑΤΟΣ ΚΡΕΜΑΣΤΩΝ ΜΕ ΒΑΣΗ ΑΝΑΛΥΣΗ ΓΕΩΔΑΙΤΙΚΩΝ ΔΕΔΟΜΕΝΩΝ ΚΑΙ ΜΕΤΑΒΟΛΩΝ ΣΤΑΘΜΗΣ ΤΑΜΙΕΥΤΗΡΑ

C.S. 430 Assignment 6, Sample Solutions

Instruction Execution Times

On a four-dimensional hyperbolic manifold with finite volume

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ

8.324 Relativistic Quantum Field Theory II

A Class of Orthohomological Triangles

1 Complete Set of Grassmann States

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

EE512: Error Control Coding

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

6.3 Forecasting ARMA processes

Section 8.3 Trigonometric Equations

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Notes on the Open Economy

Noriyasu MASUMOTO, Waseda University, Okubo, Shinjuku, Tokyo , Japan Hiroshi YAMAKAWA, Waseda University

Approximation of distance between locations on earth given by latitude and longitude

The challenges of non-stable predicates

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

ΑΠΟΓΡΑΦΙΚΟ ΔΕΛΤΙΟ ΔΙΔΑΚΤΟΡΙΚΗΣ ΔΙΑΤΡΙΒΗΣ ΤΙΤΛΟΣ Συμπληρώστε τον πρωτότυπο τίτλο της Διδακτορικής διατριβής ΑΡ. ΣΕΛΙΔΩΝ ΕΙΚΟΝΟΓΡΑΦΗΜΕΝΗ

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Démographie spatiale/spatial Demography

Other Test Constructions: Likelihood Ratio & Bayes Tests

Test Data Management in Practice

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Assalamu `alaikum wr. wb.

ΕΘΝΙΚΟ ΚΑΙ ΚΑΠΟΔΙΣΤΡΙΑΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΘΗΝΩΝ ΣΧΟΛΗ ΘΕΤΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΚΑΙ ΤΗΛΕΠΙΚΟΙΝΩΝΙΩΝ

Derivation for Input of Factor Graph Representation

Vol. 34 ( 2014 ) No. 4. J. of Math. (PRC) : A : (2014) Frank-Wolfe [7],. Frank-Wolfe, ( ).

4.6 Autoregressive Moving Average Model ARMA(1,1)

Finite Field Problems: Solutions

Parametrized Surfaces

IF(Ingerchange Format) [7] IF C-STAR(Consortium for speech translation advanced research ) [8] IF 2 IF

Concrete Mathematics Exercises from 30 September 2016

Capacitors - Capacitance, Charge and Potential Difference

ST5224: Advanced Statistical Theory II

5.4 The Poisson Distribution.

Code Breaker. TEACHER s NOTES

Math 6 SL Probability Distributions Practice Test Mark Scheme

Section 9.2 Polar Equations and Graphs

Lecture 2. Soundness and completeness of propositional logic

8. ΕΠΕΞΕΡΓΑΣΊΑ ΣΗΜΆΤΩΝ. ICA: συναρτήσεις κόστους & εφαρμογές

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ & ΠΛΗΡΟΦΟΡΙΚΗΣ. του Γεράσιμου Τουλιάτου ΑΜ: 697

Lecture Notes for Chapter 8

Right Rear Door. Let's now finish the door hinge saga with the right rear door

Example Sheet 3 Solutions

Statistical Inference I Locally most powerful tests

derivation of the Laplacian from rectangular to spherical coordinates

[1] P Q. Fig. 3.1

2 Composition. Invertible Mappings

Πανεπιστήμιο Πειραιώς Τμήμα Πληροφορικής Πρόγραμμα Μεταπτυχιακών Σπουδών «Πληροφορική»

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΤΜΗΜΑ ΗΛΕΚΤΡΟΛΟΓΩΝ ΜΗΧΑΝΙΚΩΝ ΚΑΙ ΤΕΧΝΟΛΟΓΙΑΣ ΥΠΟΛΟΓΙΣΤΩΝ ΤΟΜΕΑΣ ΣΥΣΤΗΜΑΤΩΝ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ ΕΡΓΑΣΤΗΡΙΟ ΥΨΗΛΩΝ ΤΑΣΕΩΝ

Section 7.6 Double and Half Angle Formulas

Phasor Diagram of an RC Circuit V R

Every set of first-order formulas is equivalent to an independent set

Math221: HW# 1 solutions

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΓΕΩΤΕΧΝΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΚΑΙ ΔΙΑΧΕΙΡΙΣΗΣ ΠΕΡΙΒΑΛΛΟΝΤΟΣ. Πτυχιακή εργασία

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Fractional Colorings and Zykov Products of graphs

ΕΘΝΙΚΗ ΣΧΟΛΗ ΔΗΜΟΣΙΑΣ ΔΙΟΙΚΗΣΗΣ ΙΓ' ΕΚΠΑΙΔΕΥΤΙΚΗ ΣΕΙΡΑ

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΤΜΗΜΑ ΗΛΕΚΤΡΟΛΟΓΩΝ ΜΗΧΑΝΙΚΩΝ ΚΑΙ ΤΕΧΝΟΛΟΓΙΑΣ ΥΠΟΛΟΓΙΣΤΩΝ ΤΟΜΕΑΣ ΣΥΣΤΗΜΑΤΩΝ ΗΛΕΚΤΡΙΚΗΣ ΕΝΕΡΓΕΙΑΣ

Επιβλέπουσα Καθηγήτρια: ΣΟΦΙΑ ΑΡΑΒΟΥ ΠΑΠΑΔΑΤΟΥ

Homework 3 Solutions

ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ ΣΧΟΛΗ ΗΛΕΚΤΡΟΛΟΓΩΝ ΜΗΧΑΝΙΚΩΝ ΚΑΙ ΜΗΧΑΝΙΚΩΝ ΥΠΟΛΟΓΙΣΤΩΝ

the total number of electrons passing through the lamp.

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΣΧΟΛΗ ΜΗΧΑΝΙΚΗΣ ΚΑΙ ΤΕΧΝΟΛΟΓΙΑΣ. Πτυχιακή εργασία

ΑΠΟΓΡΑΦΙΚΟ ΔΕΛΤΙΟ ΜΕΤΑΠΤΥΧΙΑΚΗΣ ΕΡΓΑΣΙΑΣ ΤΙΤΛΟΣ

35 90% %

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Τ.Ε.Ι. ΔΥΤΙΚΗΣ ΜΑΚΕΔΟΝΙΑΣ ΠΑΡΑΡΤΗΜΑ ΚΑΣΤΟΡΙΑΣ ΤΜΗΜΑ ΔΗΜΟΣΙΩΝ ΣΧΕΣΕΩΝ & ΕΠΙΚΟΙΝΩΝΙΑΣ

Αξιολόγηση των Φασματικού Διαχωρισμού στην Διάκριση Διαφορετικών Τύπων Εδάφους ΔΙΠΛΩΜΑΤΙΚΗ ΕΡΓΑΣΙΑ. Σπίγγος Γεώργιος

5 Haar, R. Haar,. Antonads 994, Dogaru & Carn Kerkyacharan & Pcard 996. : Haar. Haar, y r x f rt xβ r + ε r x β r + mr k β r k ψ kx + ε r x, r,.. x [,

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Transcript:

ΑΝΑΚΑΤΑΣΚΕΥΗ ΜΟΝΤΕΛΩΝ CAD ΜΕ ΧΑΡΑΚΤΗΡΙΣΤΙΚΑ ΒΑΣΙΣΜΕΝΗ ΣΤΗ ΜΟΡΦΟΛΟΓΙΑ ΤΟΥ ΝΕΦΟΥΣ ΣΗΜΕΙΩΝ Η ΔΙΔΑΚΤΟΡΙΚΗ ΔΙΑΤΡΙΒΗ Υποβάλλεται στην ορισθείσα από την Γενική Συνέλευση Ειδικής Σύνθεσης του Τμήματος Πληροφορικής Εξεταστική Επιτροπή από την Βασιλική Σταμάτη ως μέρος των Υποχρεώσεων για τη λήψη του ΔΙΔΑΚΤΟΡΙΚΟΥ ΔΙΠΛΩΜΑΤΟΣ Οκτώβριος 2008

Τριμελής Συμβουλευτική Επιτροπή Ιωάννης Φούντος, Επίκουρος Καθηγητής, Τμήμα Πληροφορικής του Πανεπιστημίου Ιωαννίνων (Επιβλέπων) Νικόλαος Σαπίδης, Καθηγητής, Τμήμα Μηχανικών Σχεδίασης Προϊόντων και Συστημάτων του Πανεπιστημίου Αιγαίου Θεοχάρης Θεοχάρης, Αναπληρωτής Καθηγητής, Τμήμα Πληροφορικής και Τηλεπικοινωνιών του ΕΚΠΑ Επταμελής Εξεταστική Επιτροπή Ιωάννης Φούντος, Επίκουρος Καθηγητής, Τμήμα Πληροφορικής του Πανεπιστημίου Ιωαννίνων (Επιβλέπων) Νικόλαος Σαπίδης, Καθηγητής, Τμήμα Μηχανικών Σχεδίασης Προϊόντων και Συστημάτων του Πανεπιστημίου Αιγαίου Θεοχάρης Θεοχάρης, Αναπληρωτής Καθηγητής, Τμήμα Πληροφορικής και Τηλεπικοινωνιών του ΕΚΠ Φίλιππος Αζαριάδης, Επίκουρος Καθηγητής, Τμήμα Μηχανικών Σχεδίασης Προϊόντων και Συστημάτων του Πανεπιστημίου Αιγαίου Βασίλειος Δημακόπουλος, Επίκουρος Καθηγητής, Τμήμα Πληροφορικής του Πανεπιστημίου Ιωαννίνων Ισαάκ Λαγαρής, Καθηγητής, Τμήμα Πληροφορικής του Πανεπιστημίου Ιωαννίνων Πάνος Τραχανιάς, Καθηγητής, Τμήμα Επιστήμης Υπολογιστών του Πανεπιστημίου Κρήτης

DEDICATION To my husband, Thanas To my parents, Costa and Eugena, and my sster, Tona

v ACKNOWLEDGMENTS I would lke to express my sncere thanks and grattude to my advsor Ioanns Fudos, who has guded me through my research wth helpful suggestons, good advce, encouragement and patence. Collaboratng wth hm has been a pleasant and memorable experence. I would also lke to thank the members of my commttee Prof. Theohar and Prof. Sapd for ther suggestons and nsght. Also, many thanks to Prof. Trahana, Prof. Azarad, Prof. Dmakopoulo and Prof. Lagar for ther suggestons and remarks. I would also lke to thank all my frends and colleagues who over the course of ths research have provded me wth helpful feedback. I would also lke to thank my husband, Thanas, and my famly for always beng so supportve and for belevng n me. I could not have done ths wthout them.

v TABLE OF CONTENTS DEDICATION ACKNOWLEDGMENTS TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES ΕΚΤΕΝΗΣ ΠΕΡΙΛΗΨΗ ΣΤΑ ΕΛΛΗΝΙΚΑ ABSTRACT Pg v v v v x x CHAPTER 1. Introducton 1 1.1. Overvew 1 1.2. Prelmnares 4 1.2.1. Scannng technques 4 1.2.2. Trangulaton methods 5 1.2.3. Pont cloud preprocessng 6 CHAPTER 2. Overvew Reverse engneerng and CAD 7 2.1. Introducton Reverse Engneerng and ts applcatons 7 2.2. CAD model representaton schemes used n reverse engneerng 9 2.3. Usng hgh-level model representaton schemes for reverse engneerng 13 CHAPTER 3. Feature detecton and extracton 16 3.1. Introducton 16 3.2. Related Work 16 3.3. Dervng Pont Concavty Intensty 18 3.4. Pont cloud segmentaton through regon growng 26 CHAPTER 4.Contour Reconstructon 33 4.1. Introducton 33 4.2. Related Work 33 4.3. Curve approxmaton usng cubc ratonal Bezer curves 36 4.4. Examples of curve fttng usng ratonal Bezer curves 43 4.4.1. Example A 43 4.4.2. Example B 45 4.5. Evaluaton of our method 46

v CHAPTER 5. Feature Reconstructon 48 5.1. Features n reverse engneerng 48 5.2. Sold modelng technques 49 5.3. Generatng a feature assembly plan 52 5.3.1. Sweepng 53 5.3.2. Sknnng 54 5.3.3. Coverng 56 5.3.4. Assemblng the features 56 5.4. Parameter defnton and edtablty 60 5.4.1. Parameter defnton 60 5.4.2. Edtablty 61 5.5. Persstent namng 62 CHAPTER 6.Examples 64 6.1. Feature detecton and extracton examples 64 6.2. Contour Reconstructon 66 6.3. Feature Reconstructon 68 CHAPTER 7. Extensons of our approach 70 7.1. Custom desgn and redesgn functonalty 70 7.1.1. Constrant defnton 71 7.1.2. Geometrc Constrant Solvng 72 7.2. Specal applcatons 77 7.2.1. Perced Byzantne Jewellery 77 7.2.2. An approach to desgnng perced jewellery usng feature elements 78 7.2.3. Reverse engneerng pont clouds of tradtonal perced jewellery 88 CHAPTER 8. Conclusons 90 REFERENCES 92 PUBLISHED WORK 101 SHORT CV 103

v LIST OF TABLES Table Pg Table 4.1 Results of Curve Approxmaton 45 Table 4.2 Results of Curve Approxmaton 46 Table 5.1 Reconstructng feature regons wth sweepng / sknnng 55 Table 6.1 The results of contour reconstructon 68

v LIST OF FIGURES Fgure Pg. Fgure 1.1 Our Feature-based Reverse Engneerng framework 3 Fgure 3.1: Pont cloud of a screwdrver wth 27k ponts [23] 18 Fgure 3.2: A pont cloud of a screwdrver pont cloud and ts convex hull 19 Fgure 3.3: The screwdrver pont cloud concavty ntensty map [23] 19 Fgure 3.4: The Stanford bunny concavty ntensty map [77] 20 Fgure 3.5: Concavty ntensty map of ponts representng a dnosaur [23] 20 Fgure 3.6: The vrtual sphere S(p,r) 22 Fgure 3.7 Fndng the closest edge to pont p 24 Fgure 3.8: An example of the local dstance search algorthm 24 Fgure 3.9: Pont p and ts frst level neghbors q 1,q 2,q 3,q 4. The remanng nodes are second levels neghbors of p 29 Fgure 3.10 Feature regons detected by regon growng 30 Fgure 4.1 Vrtual sphere contanng border ponts. The green damond corresponds to the center of mass, whereas the red damond s the border pont closes to t. 37 Fgure 4.2 A sequence of ponts to be approxmated 37 Fgure 4.3 Inner control pont coordnates expressed n reference to the end control ponts 40 Fgure 4.4 (top) Ponts used for approxmaton (red) and correspondng ponts computed on curve (black), (bottom) Cubc ratonal Bezer curve approxmatng the sequence ponts (red) and the correspondng control ponts (turquose). 42 Fgure 4.5 (a) Regon detected by regon growng, (b) the border of the regon to be approxmated, (c) a thnned-out border 44 Fgure 4.6 (a) The thnned out border regon (b) the curve segments to be approxmated (#1-green, #2=blue, #3=red), (c) the fnal approxmatng curve 44 Fgure 4.7. (a) The regon created by regon growng (b) the border of the regon, (c) the sample of ponts used for approxmaton, (d) the fnal curve approxmaton of the border. 45 Fgure 4.8 A sequence of ponts approxmated by a curve C, under the constrants of Eq.4.14 47 Fgure 5.1 (left) A pont cloud of a duck (rght) a mesh representaton of the duck 49 Fgure 5.2 An example of translatonal sweepng 50 Fgure 5.3 Example of sknnng between two parallel crcular curves to create truncated cone 51 Fgure 5.4 (left) Coverng a boundary wth a face, (rght) addng a pont to a sold by coverng. 51 Fgure 5.5 An example of blendng 52 Fgure 5.6 Feature regon correspondng to a screwdrver shaft 54 Fgure 5.7 A feature representng the bottom of the screwdrver handle 55

Fgure 5.8 Top part of screwdrver handle and ts correspondng boundary box 56 Fgure 5.9 Feature Connectvty graph of screwdrver 57 Fgure 5.10 Decomposton of the screwdrver model nto ts feature elements 57 Fgure 5.11 Decomposton of the grp body of the handle 58 Fgure 5.12 The feature connectvty graph after decomposton of node #3 59 Fgure 5.13 Feature decomposton tree of the screwdrver after further decomposton of the handle grp body 59 Fgure 5.14 An example of the persstent namng problem [60]. 63 Fgure 6.1 (top left) A pont cloud of a monkey, (top rght) the pont concavty ntensty map, (bottom) the features detected by regon growng. 65 Fgure 6.2 (top left) The pont cloud of a duck, (top rght) the concavty ntensty map for the correspondng pont cloud, (bottom) the regons detected by regon growng. 66 Fgure 6.3 Curve approxmaton performed on the frst curve segment 67 Fgure 6.4 Curve approxmaton performed on the second curve segment 67 Fgure 6.5 (left) The pont cloud to be approxmated (rght) the reconstructed contour 68 Fgure 6.6 The top surface of the screwdrver 69 Fgure 6.7 (left) The feature pont cloud and ts ftted surface and (rght) the surface obtaned by coverng 69 Fgure 7.1 Usng a chsel to create carvngs around a hole. 77 Fgure 7.2 (left) A perced voxel, (rght) a perced plate dsplayng the letter k created by combnng perced voxels 79 Fgure 7.3 A complex sold plaque representng desgns,.e. letters or words, s szed and modfed approprately to construct custom-desgned jewellery (.e. rng). 81 Fgure 7.4 (left) An earrng featurng the letter D, (rght) a necklace featurng a sold desgn and a perced desgn 82 Fgure 7.5 The letter B n ts (left) scaled and (rght) orgnal form 83 Fgure 7.6 Dfferent scaled versons of the letter C 84 Fgure 7.7 Datum postons are marked n the scaled desgn matrx and O s the center of the coordnate system created by the datum axes 85 Fgure 7.8 An example of (top) scalng a curve endng n a horzontal lne and (bottom) scalng a curve 86 x

x ΕΚΤΕΝΗΣ ΠΕΡΙΛΗΨΗ ΣΤΑ ΕΛΛΗΝΙΚΑ Βασιλική Σταμάτη του Κωνσταντίνου και της Ευγενίας. PhD, Τμήμα Πληροφορικής, Πανεπιστήμιο Ιωαννίνων, Οκτώβριος 2008. Τίτλος Διατριβής: Ανακατασκευή μοντέλων CAD με χαρακτηριστικά βασισμένη στη μορφολογία του νέφους σημείων Επιβλέποντας: Ιωάννης Φούντος. Η ανάστροφη μηχανική (reverse engneerng) είναι μια διαδικασία μέσω της οποίας ανακατασκευάζουμε ένα γεωμετρικό μοντέλο με βάση τον υπολογιστή (CAD) από μετρήσεις που λαμβάνονται από την επιφάνεια ενός αντικειμένου, μέσω τεχνικών σάρωσης, και έχουν τη μορφή ενός νέφους σημείων. Αυτή η διαδικασία χρησιμοποιείται ευρέως σε διάφορες εφαρμογές, όπως στη παραγωγή, βιομηχανική σχεδίαση και στη σχεδίαση και αναπαραγωγή κοσμημάτων. Μπορούν να χρησιμοποιηθούν διάφορες μορφές αναπαράστασης για τα ανακατασκευασμένα μοντέλα, όπως πολυγωνικά μοντέλα, μοντέλα CSG και μοντέλα υποδιαίρεσης χώρου σε στοιχειώδη στερεά στοιχεία (voxel). Παραδοσιακά στις περισσότερες εφαρμογές χρησιμοποιούνται μοντέλα αναπαράστασης ορίων (boundary representatons). Ωστόσο η σύγχρονη τάση, ειδικά στις εφαρμογές ανακατασκευής και αναπαραγωγής αντικειμένων ελεύθερης σχεδίασης, είναι η χρήση αναπαράστασης βασισμένη σε χαρακτηριστικά και περιορισμούς. Αυτό συμβαίνει διότι αυτό το μοντέλο αναπαράστασης είναι ευέλικτο και ακριβές, επιτρέπει την τροποποίηση ή/και επανασχεδιασμό του αρχικού αντικειμένου και μπορεί να εκφράσει την σχεδιαστική πρόθεση του χρήστη-σχεδιαστή. Στην εργασία αυτή παρουσιάζεται ένα σχήμα για την ανακατασκευή αντικειμένου από νέφος σημείων με σκοπό την απόκτηση μιας παραμετρικής και επεξεργάσιμης αναπαράστασης CAD με βάση χαρακτηριστικά και περιορισμούς (feature-based and constrant-based) που να μπορεί να τροποποιηθεί και αναπαραχθεί. Σκοπός μας είναι να εντοπίζονται και να εξάγονται χαρακτηριστικά του αντικειμένου από το νέφος σημείων ώστε να είναι δυνατή η τροποποίηση ή ο επανασχεδιασμός του αρχικού

x αντικειμένου, σύμφωνα με τις προτιμήσεις του χρήστη-σχεδιαστή. Επίσης, δίδεται η δυνατότητα στον χρήστη να μπορεί να εισάγει και να χρησιμοποιεί τα χαρακτηριστικά στη σχεδίαση άλλου αντικειμένου. Πιο συγκεκριμένα, στην εργασία αυτή παρουσιάζεται μια μέθοδος για τον εντοπισμό και την εξαγωγή χαρακτηριστικών από ένα νέφος σημείων. Το νέφος σημείων πρέπει να χωριστεί σε υποσύνολα τέτοια ώστε κάθε υποσύνολο να μπορεί να αντιστοιχηθεί σε κάποιο χαρακτηριστικό (feature) του αρχικού αντικειμένου. Ορίζουμε ένα χαρακτηριστικό μέγεθος για κάθε σημείο που ονομάζουμε «pont concavty ntensty», το οποίο περιγράφει την ένταση κοιλότητας που εμφανίζει το αντικείμενο στο συγκεκριμένο σημείο και ορίζεται ως η μικρότερη απόσταση του σημείου από την κοντινότερη έδρα του convex hull. Αυτό το μέγεθος ουσιαστικά εντοπίζει τα χαρακτηριστικά του νέφους που βρίσκονται ανάμεσα ή που σχηματίζονται από κοιλότητες. Αναπτύξαμε έναν γρήγορο και αποδοτικό αλγόριθμο για τον υπολογισμό αυτού του χαρακτηριστικού. Επίσης αναπτύχθηκε ένας αλγόριθμος για regon growng που υλοποιεί το διαχωρισμό του νέφους σημείων σε υποσύνολα που αντιστοιχούν σε χαρακτηριστικά με βάση τις τιμές του pont concavty ntensty κάθε σημείου και την μεταβολή του κάθετου διανύσματος της τοπικής επιφάνειας που σχηματίζουν γειτονικά σημεία. Αυτή η μεθοδολογία οδηγεί στην εξαγωγή υποσυνόλων σημείων που αντιστοιχούν σε ανεξάρτητα χαρακτηριστικά και σε υποσύνολα σημείων που αποτελούν τα όρια των χαρακτηριστικών αυτών. Κατόπιν αναπτύχθηκε ένας ικανοποιητικός, γρήγορος αλγόριθμος για την προσέγγιση των ορίων από έναν αριθμό από κυβικές ρητές καμπύλες Bezer, που προσεγγίζει τα όρια των χαρακτηριστικών με ομαλές καμπύλες που ικανοποιούν τις συνθήκες της γεωμετρικής συνέχειας G 1. Στη συνέχεια προσαρμόζονται επιφάνειες σε κάθε υποσύνολο σημείων που αντιστοιχεί σε χαρακτηριστικό, παίρνοντας τομές του υποσυνόλου και προσεγγίζοντας τα σημεία που βρίσκονται πάνω ή πολύ κοντά στην τομή με τον αλγόριθμο μας για προσέγγιση καμπυλών με κυβικές ρητές Bezer καμπύλες. Χρησιμοποιούμε τις καμπύλες που λαμβάνουμε με αυτό τον τρόπο ως οδηγούς για να «καλύψουμε» τις καμπύλες και τα σημεία με επιφάνειες. Τελικά λαμβάνουμε αυτόνομα χαρακτηριστικά σε 3Δ μορφή, στα οποία θέτουμε περιορισμούς που αφορούν, για παράδειγμα, το μέγεθος ή τον τρόπο σύνδεσης με άλλα χαρακτηριστικά. Επιπρόσθετα χρησιμοποιούμε συμμετρίες για να ανιχνεύσουμε την σκοπιμότητα χρήσης άλλων τρόπων 3Δ ανακατασκευής όπως

x sweep, blendng κα. Τέλος παρουσιάζουμε δύο εφαρμογές της μεθόδου μας στην ανακατασκευή κοσμημάτων και στο ταίριασμα χαρακτηριστικών σε 3Δ μοντέλα.

x ABSTRACT Stamat Vaslk, PhD, Computer Scence Department, Unversty of Ioannna, Greece. October 2008. Reconstructng feature-based CAD models based on pont cloud morphology Thess Supervsor: Ioanns Fudos. Reverse engneerng, the process of obtanng a geometrc CAD model from measurements obtaned by scannng an exstng physcal model, s wdely used n numerous applcatons, such as manufacturng, ndustral desgn and jewellery desgn. In ths work we propose a framework for reverse engneerng objects of mechancal or freeform desgn to obtan fully edtable feature-based CAD model that can be reproduced or modfed before producton. We focus on the process of detectng features on a pont cloud and we present effcent methods for analyzng the morphology of the surface defned by the pont cloud. We compute a pont wse characterstc called pont concavty ntensty and we use ths quantty along wth the varatons n the surface normal to detect regons correspondng to object features. The boundares of the regons representng features are extracted and approxmated by a collecton of pecewse cubc ratonal Bezer curves that best ft the detected border pont cloud and are G 1 contnuous. We present a fast and effcent lnear curve approxmaton approach to ft feature boundares wth such curves that can be used along wth the representatve feature regon ponts for feature reconstructon. Feature reconstructon s mplemented wth sold modelng technques (sweepng, sknnng, coverng etc.) and parameters are defned to provde edtablty of the features. We present examples and dscuss extensons to our suggested framework.

1 CHAPTER 1. INTRODUCTION 1.1 Overvew 1.2 Prelmnares 1.1. Overvew Reverse engneerng s a general concept that can refer to varous felds, such as software management and product development [46]. In computer-aded desgn (CAD), reverse engneerng ams to analyze a real object to determne ts characterstcs and mechansms, wth further focus on reconstructon and manufacturablty. The data concernng the physcal object can be obtaned by varous methods. A common method s usng a 3D laser scanner or photogrammetry methods to obtan a pont cloud correspondng to ponts on the surface of the scanned object. In the context of computer-aded desgn, reverse engneerng s the process of obtanng a geometrc CAD model from measurements acqured by scannng an exstng physcal model [89]. Reverse engneerng s vtal for varous ndustres because the computer models acqured help mprove the qualty and effcency of desgns and also speed up the manufacturng and analyss process. Reverse engneerng technques are tradtonally used for the reengneerng of machned parts. They are wdely used n mechancal part engneerng and manufacturng for re-engneerng or replcatng exstng parts for whch no CAD models exst. Also, there are cases where the orgnal CAD model no longer corresponds to the physcal part that was manufactured because of subsequent undocumented modfcatons made after the ntal desgn stage. In objects of mechancal desgn, the geometrc relatonshps of the component parts are well-

2 defned and many characterstcs of the object can be used n the reconstructon process. Propertes of the object such as symmetres, parallelsm and perpendcularty, can be used as attrbutes and constrants to ad the reconstructon process. Mechancal parts that are re-engneered must be accurate, robust and well-defned because they are usually combned and ft together wth other components n larger objects. Reverse engneerng objects of freeform desgn s a more dffcult task. Ths can be attrbuted to the fact that desgn ntent and semantcs cannot be strctly defned by geometrc rules and constrants, as n mechancal part desgn. Freeform desgns are often met n ndustral desgn, such as automoble exteror parts desgn. Stylsts and artsts very often create physcal models of ther concepts by usng clay, plaster or wood. These real-scale models are then used n re-engneerng applcatons to create CAD models for manufacturng the objects on an ndustral scale. An nterestng applcaton of reverse engneerng objects of freeform desgn s that of jewellery reconstructon. Jewellery desgn falls under the category of conceptual and decoratve desgn. We can dstngush two categores of jewellery: free form jewellery and jewellery that conforms to certan patterns and constrants e.g. repeated patterns or specfc gem cuts. Reverse engneerng jewellery requres that the CAD models created are accurate and robust. These models should be parameterzable to support custom jewellery desgn. Furthermore, the user-desgners should have the capablty to modfy the re-engneered CAD model accordng to ther preferences, to create novel desgns. The am of ths work s to ntroduce a framework for reverse engneerng objects of mechancal or freeform desgn to obtan fully edtable feature-based 3D CAD models that can be reproduced or modfed before producton. More specfcally, our approach ams to partton a 3D pont cloud nto components correspondng to the features, so as to create an edtable and parameterzed CAD model descrbed by ts varous connected features. Ths type of model provdes the user-desgner wth the capablty of edtng, redesgnng and reproducng the orgnal object, dependng on hs preferences and needs, by edtng the features of the model [41].

3 The framework of our approach s summarzed n Fgure 1.1. We begn from a 3D pont cloud whch we have preprocessed to remove duplcate ponts and an STL (stereolthography) fle of the pont cloud. An STL fle s a fle descrbng the model as a trangular mesh. Ths fle format provdes the vertces of each trangle of the mesh and ts correspondng normal vector. We perform segmentaton of the pont cloud nto subsets by detectng features usng a pont-wse characterstc called pont concavty ntensty and a local surface normal vector. We apply a regon growng method based on varatons of pont concavty ntensty and the surface normal to dvde the pont cloud nto feature regons and regons correspondng to ther boundares. The boundary regons are approxmated wth cubc ratonal Bezer curves through a fast and effcent lnear curve approxmaton method that we have developed. The resultng contours are used n combnaton wth the feature regons to reconstruct each feature usng sold modelng operatons. The resultng features are then combned to construct the fnal 3D CAD model. 3D Pont Pont Cloud Contour - Feature 3D CAD Cloud Segmentaton Surface Defnton Model Fgure 1.1 Our Feature-based Reverse Engneerng framework The feature-based reverse engneerng approach presented n ths thess can be appled to pont clouds of objects of mechancal or freeform desgn. Ths thess makes the followng techncal contrbutons: Presents a segmentaton method that parttons a pont cloud nto subsets that wll be refned to correspond to features of the object beng re-engneered, Introduces the concept of pont concavty ntensty, whch s used for feature detecton along wth normal varance, Presents an effcent method for computng the concavty ntensty of the pont cloud.

4 Introduces a fast lnear curve approxmaton method for fttng cubc ratonal Bezer curves to 3D ponts correspondng to the borders of features Descrbes a methodology for reconstructng the features of the object nto an edtable 3D CAD model. Valdates our approach usng a real-world applcaton (reconstructon of perced jewellery). Ths thess conssts of eght chapters. The rest of ths chapter provdes some prelmnares on scannng technques and trangulaton methods. In Chapter 2 an overvew on reverse engneerng approaches s offered. Work on reverse engneerng s revewed by focusng on the applcaton scope and the type of CAD model representaton used. In Chapter 3 we present our approach to detectng and extractng features from a 3D pont cloud based on pont concavty ntensty and surface normal varaton. A fast and effcent curve approxmaton method for fttng cubc ratonal Bezer curves to 3D ponts s presented n Chapter 4. Chapter 5 focuses on reconstructng the features from the feature regons usng the contours constructed by the method provded n Chapter 4 and we dscuss the edtablty of our features. In Chapter 6 we present examples of our framework whereas n Chapter 7 we examne extensons of our suggested framework and applcaton to whch our framework may be appled. Chapter 8 provdes conclusons. 1.2. Prelmnares Reverse engneerng typcally conssts of four phases: data acquston and preprocessng, data segmentaton, surface fttng and CAD model constructon. In the context of our work we focus on pont cloud segmentaton and CAD model creaton. Therefore we wll brefly present basc data acquston technques and trangulaton methods used for the ntal processng the scanned data. 1.2.1. Scannng technques The frst step n reverse engneerng s the acquston of the data. [89] provdes an analytcal survey of data acquston technques. Data can be acqured from the

5 surface of an object meant for re-engneerng ether ndrectly, wth non-contact methods, or drectly, usng contact methods. Non-contact methods use lght, sound or magnetc felds to obtan surface data nformaton. On the other hand, tactle (contact) methods use mechancal probes located on the end of a mechancal arm to actually touch the surface of the scanned object. Coordnate measurng machnes (CMM) are the more popular tactle method because they can be programmed to follow specfc scannng paths and the data they produce are very accurate and practcally nose-free. Optcal methods are the most frequently used non-contact method. There are varous approaches to usng lght sources for acqurng poston data on an object s surface. A fast and common method s trangulaton, where the locatons and angles between lght sources and photo senstve devces are used to determne postons on the surface of the scanned object. A lght source,.e. laser, s projected onto the object s surface at a pre-specfed angle and a photo senstve devce determnes the angle of reflecton off the surface. Trangulaton s then used to determne the poston data. Rangng methods are also frequently used, where the dstance measurements are made by sensng tme-of-flght of lght beams. These scannng technques produce raw data. By raw data we mean an unstructured collecton of geometrc prmtves such as a pont cloud or a range mage. The densty of the data sets produced by the varous methods depends on the samplng rate used to acqure nformaton from the object s surface. Also, very often the pont clouds obtaned contan nosy data due to physcal characterstcs of the object, such as topology and texture, or lmtatons and regulatons of the acquston method used (.e. accuracy lmtatons, calbraton). However, processng methods have been suggested that can handle and overcome ths problem. 1.2.2. Trangulaton methods The ntal data representaton of a scanned object s the 3D pont cloud. From ths form, models usng other representaton schemes can be constructed, dependng on the applcaton s am and the ntended use of the models. A standard data representaton model that can be generated and useful for applcatons s the

6 trangulated mesh. The trangulaton of the pont cloud provdes basc connectvty and neghborhood nformaton for each pont of the raw data set and s usually used as an ntermedate representaton, before surface fttng and reconstructon s performed. Many algorthms have been suggested for trangulatng 3D pont clouds [11]. [20] presents an ncremental approach to buldng a trangulaton by addng ponts based on specfc crtera. [43] present an algorthm based on the dea of determnng the zero set of an estmated sgn dstance functon. Work such as [5] deal wth the problem of pont cloud trangulaton from a computatonal geometry pont of vew, basng ther approaches on varatons of the Delaunay trangulaton. In [45] a surfacebased algorthm s suggested where for each pont of the cloud, nearest neghbors and ther orentatons (n the estmated local tangent plane) are determned and ths nformaton s used n a growng process where a trangular mesh s constructed ncrementally startng from a seed trangle by addng ponts based on the neghbor nformaton. 1.2.3. Pont cloud preprocessng Pont cloud preprocessng s often needed n the reverse engneerng process to remove nose from the acqured data [89]. [37] perform flterng on the pont cloud before usng a curvature-based approach for data segmentaton. Often smoothng technques are appled to smooth out nose from the pont cloud. Algorthms have also been developed for mesh smoothng and denosng [79]. These methods look to preserve the features of the object whle removng nose from the mesh. A classcal approach s to use some form of Laplacan smoothng [91]. Preprocessng s also used to detect symmetres that are helpful later on n the reconstructon phase. Such work s presented n [61]. The authors fnd approxmate symmetres n a pont cloud, snce most of the tme the data acqured by scannng contans errors that prevent the detecton of exact symmetres.

7 CHAPTER 2. OVERVIEW REVERSE ENGINEERING AND CAD 2.1 Introducton Reverse engneerng and ts applcatons 2.2 CAD model representaton schemes used n reverse engneerng 2.3 Usng hgh-level model representatons for reverse engneerng 2.1. Introducton Reverse Engneerng and ts applcatons Reverse engneerng s the process of obtanng a geometrc CAD model from measurements obtaned by scannng an exstng physcal model. The reverse engneerng process conssts, n general, of four man phases: data capture and preprocessng, segmentaton, surface fttng, and the CAD model creaton [89], [46],[14]. The frst phase concerns the object data collected by some knd of scannng method and any type of preprocessng that may be carred out (e.g. nose removal). The segmentaton and surface fttng stages refer to the decomposton of the orgnal data set nto smaller sets so as to ft surfaces to the ponts, thus leadng to the last phase of the process whch concerns the CAD model creaton. Reverse engneerng methods are used n varous applcatons. They are wdely used n mechancal part engneerng and manufacturng for re-engneerng or replcatng exstng parts for whch no CAD models exst. Also, there are cases where the orgnal CAD model no longer corresponds to the physcal part that was manufactured because of subsequent undocumented modfcatons made after the ntal desgn stage. Works such as [84], [85] have concentrated on creatng hgh accuracy models of manufactured mechancal parts. A characterstc of the objects re-engneered s that they are usually parts of larger objects and therefore have to ft and connect exactly

8 wth other parts, lke peces n a puzzle. For ths reason, the models created through the reverse engneerng process must be very accurate and well defned. Reverse engneerng s appled n ndustral desgn, such as automoble exteror parts desgn. Stylsts and artsts very often create physcal models of ther concepts by usng clay, plaster or wood. These real-scale models are then used to create CAD models for manufacturng the objects on an ndustral scale. Also the CAD models provde the artsts and stylsts wth the ablty to re-evaluate ther desgns, especally when they can easly re-desgn or modfy them as needed. Reverse engneerng encourages conceptual desgn because the desgner creates an ntal prototype, scans t and manpulates t as desred. Reverse engneerng s needed for aesthetc desgn because desgnng wth CAD systems s qute challengng snce many freeform surfaces are nvolved. In addton, reverse engneerng s used for the generaton of custom fts to human surfaces and for matng parts. Examples of such applcatons are custom helmets, space suts and prosthetc parts. An example of such an applcaton s descrbed n [6], where generc models of mannequn torsos are ft to 3D pont clouds of human torsos for garment modelng applcatons. Reverse engneerng technques are often appled to medcne and anmaton. An example of a medcal applcaton s the creaton of bone peces to be used n orthopaedc surgery for the substtuton of a shattered bone. The bone supplement s re-engneered to exactly ft wth the neghborng bones of a specfc patent. In anmaton, a prototype of a character s drafted, scanned, recreated from the 3D pont cloud and fnally used n an anmated sequence. Re-engneerng objects of freeform desgn s essental for supportng custom desgn n a CAD model reconstructon system. It provdes user-desgners wth the capablty to modfy re-engneered CAD models accordng to ther preferences and to ncorporate n novel desgns. For nstance, n the case of jewellery re-engneerng, the userdesgner mght lke to be able to modfy the dmensons of a rng to produce one of larger sze, or be able to choose certan parts of the object to use them to create other

9 peces of jewellery, e.g. a matchng set of earrngs. To ths end, one needs to explot the features of the orgnal model and the relatonshps and constrants that hold among them. 2.2. CAD model representaton schemes used n reverse engneerng Reverse engneerng results n the creaton of CAD models of physcal objects. The more nformaton a CAD model contans and provdes the better, especally n cases of applcatons that demand accuracy and robustness. An approprate CAD model should be able to capture desgn ntent. A means to acheve ths s by parameterzng dmensons and tolerances and defnng constrants. Besdes, a usable model need not necessarly result from exact nterpolaton of the 3D pont cloud, but usually results from sutable approxmatons, snce the pont cloud most often contans nosy data. Raw pont data collected by 3D scannng technques are usually rendered by buldng an nterpolatng robust polygonal mesh. Ths approach s accurate and fast but provdes no means for large scale subsequent modfcatons. Only local nteractve or non-nteractve tools are provded that are usually targeted to correctng small mperfectons and elmnatng nose effects. CAD applcatons requre robust and edtable CAD models to support processes such as reproducton, desgn modfcaton and redesgn. The type of representaton scheme used for the model reconstructon n reverse engneerng s heavly lnked to the ntended applcaton. Some of the most often encountered CAD representaton models are: pont clouds, meshes, boundary representatons (B-reps), constructve sold geometry (CSG) models, volume models and feature-based and constrant-based models. We wll brefly refer to each model representaton from a reverse engneerng pont of vew. A pont cloud s a collecton of 3D ponts that are acqured durng the scannng phase of the reverse engneerng process, and t s the ntally obtaned representaton of the object. The pont cloud descrbes the object wthout provdng any nformaton about the connectvty of the ponts, the geometry of the object or the desgn ntent.

10 Therefore ths type of representaton model s napproprate for applcatons where edtablty s requred. Such representatons are also usually costly n reference to system resources, especally n the case of large pont clouds. Meshes (e.g. polygons or trangles) lead to models that conform to the orgnal physcal object. However, meshes that perfectly nterpolate the 3D pont cloud va trangulaton or smlar methods do not capture desgn semantcs, such as desgn ntent, functonalty and behavour. Therefore, ths type of model representaton s not approprate for objects wth specfc conceptual desgn and functonalty, such as mechancal and ndustral parts. Hgher level polyhedral representatons are not approprate for descrbng complex and detaled objects. In ths case, a large number of polygons s needed to suffcently approxmate the ntal object and ths s costly both tme-wse and space-wse. Also, arbtrary shape manpulaton s not effcent when the object s represented wth polygonal meshes. The creaton of accurate models s extremely dffcult, especally when the object s small, complex and curvaceous, such as jewellery. Ths type of representaton s sutable for renderng, not for nteractve modfcatons and therefore very often other representaton schemes are converted to polyhedral representaton for ths purpose. However there are reverse engneerng approaches based on meshes. For nstance n [88] the authors present an approach for manpulatng trangular meshes to segment the mesh nto feature regons and ther connectng border sets. [11] presents an approach for usng alpha shapes and smplfed meshes for object reconstructon. Boundary representaton models (Brep) descrbe the edges and facets of the boundary of the object. It s the representaton that naturally follows the pont cloud phase durng reverse engneerng. Many algorthms have been developed for creatng a boundary representaton model from a 3D pont cloud [10]. A Brep model may be constructed usng NURBS (Non-Unform Ratonal B-splnes) or other surface patches. Ths type of representaton s useful n applcatons where freeform surfaces are part of the repertore of prmtves [94]. Brep s useful for representng any type of object, such as mechancal parts and objects of aesthetc desgn. Surfaces can be descrbed usng approprate parametrc representatons. However, surface patches and plan Brep models do not capture desgn aspects of the object that refer to

11 functonalty and part relatonshps. Therefore, the nformaton provded through ths type of model s lmted and does not provde tools for modfyng parts of the model that affect the whole desgn (usually edtng of local features s feasble by nteractvely placng control ponts). However, Brep models are fundamental representatons whch can be used n combnaton wth other elements (e.g. features, constrants) to acheve more flexble and useful models. For nstance [53] creates a surface representaton from a pont cloud. The surfaces are grouped nto feature objects and then the model s modfed based on constrants derved from regulartes that exst n the Brep model, to acheve a more deal representaton of the orgnal object. Constructve Sold Geometry (CSG) models are created by performng Boolean operatons on sold prmtves e.g. spheres, cones, cylnders and cubes. From ths defnton we can perceve that CSG models can only represent objects that can be created from sold prmtves, therefore ths occludes the representaton of free-form surfaces and objects. In general, the CSG model representaton can be used n mechancal part engneerng and manufacturng applcatons or n other applcatons where the desgn hstory of the objects can be recorded as a sequence of Boolean operatons on geometrc prmtves. More abstract desgns cannot be represented by ths type of model. Convertng CSG models to render-able ones s extremely dffcult and therefore CSG s commonly used n conjuncton to Brep. In ths case a Brep model s always mantaned and every modfcaton s transformed to an ncremental Brep edtng operaton. Another scheme that can be used n reverse engneerng s the voxel-based approach. The object beng reverse engneered does not necessarly pass through the 3D pont cloud phase, but can be ntally represented drectly as a volume model made up of voxels. These models can be created usng.e. haptc shape modelng technques such as n [97]. Ths approach to reverse engneerng s useful for avodng the 3D pont cloud data phase, whch s cumbersome because of the need to remove nose, and for creatng robust models. However, t s an approach feasble only n the case where we are allowed to come nto contact wth the object beng scanned and our probe s approprate for the level of complexty of the object. Voxel-based representatons are

12 useful n representng sold objects, because they provde nformaton about the volume propertes of the object. However, much lke CSG models, they are not approprate for object models that are to be modfed or manufactured because they are not flexble. Edtng specfc parts of the model cannot be carred out unless the model s transformed nto a surface model frst. Also, relatonshps between parts of the object are not defned, nor s t clear how each part s connected to others. In our context, voxel-based models are useful f they are combned wth feature and constrant propertes. The voxel-based representaton can also be used as an ntermedate representaton durng surface reconstructon such as n [92]. A model representaton that s growng more and more popular s the feature-based and constrant-based model. The model s descrbed by ts features and the relatonshps between them [71]. Constrants are appled to the features to create more accurate and robust models but also for beautfcaton. Ths type of model representaton s known to be approprate for manufacturng of mechancal parts, where there are well defned relatonshps among the dfferent elements of the model. Also, feature-based models are well suted to ndustral desgn and manufacturng snce the model can be easly modfed. Ths s due to the knowledge provded by the model concernng tolerances, constrants, relatonshps and connectvty among the features. Therefore, feature-based methods are often characterzed as knowledgebased [31]. Ther man objectve s to explot any knowledge and nformaton that s connected to desgn ntent, functonalty and constructon process of the object beng re-engneered. We wll examne these types of models more thoroughly n the followng secton. An object can also be represented by ts skeleton. By skeleton we mean the closure of all ponts that have more than one closest pont on the shape boundary (for example the medal axs transform). Ths representaton provdes the topology and shapes that exst n the object and also reflects the symmetres of an object. Dependng on the type of applcaton the skeleton s used for, t may be a 2D or 3D representaton. For nstance, n 3D the medal axs transform produces a medal surface. The exact computaton of the 3D skeleton s a computatonally ntensve problem that returns a skeleton as complex as the object tself. Therefore we usually seek for an

13 approxmaton. A skeleton representaton scheme s used n varous CAD applcatons for object recognton and retreval [22], anmaton [13] and other sold modelng operatons([72, 78]). It s wdely used n feature-based modelng, where t can be employed to descrbe the shape of features, n feature detecton and extracton applcatons and shape deformaton, for nstance refer to [58] and [99]. 2.3. Usng hgh-level model representaton schemes for reverse engneerng Applcatons that call for an acceptable aesthetc result as well as the capturng of the desgn ntent,.e. ndustral and automoble desgn, make the use of constrants mandatory for a satsfactory aesthetc result. These types of applcatons are well met usng hgher- level representaton schemes (.e. constrant-based and feature based models) that ncorporate knowledge and constrants nto the model to make t more flexble and edtable. Also complex applcatons, such as rapd prototypng, model redesgn and reproducton call for edtable 3D CAD models that are smooth, robust, and accurate. A characterstc of the objects re-engneered s that they are usually parts of larger objects and therefore have to ft and connect exactly wth other parts, lke peces n a puzzle. For edtable models that can be used n redesgn and custom desgn, feature-based approaches n combnaton wth constrants s preferred so that local and global modfcatons can be made on the model. Also f the model s represented as a unon of features that are defned by parameters then these feature objects can be used n other models. A smple representaton of an object usng surface patches makes t very dffcult to perform global or even local modfcatons on the object wthout compromsng the robustness of the model. Hgher level representatons such as feature-based models allow modfcatons to be propagated throughout the model wthout affectng ts robustness and accuracy. We wll brefly revew the projects that have focused on usng ths type of model representaton for reverse engneerng. Research such as [84, 85] have concentrated on creatng hgh accuracy models of manufactured mechancal parts. The REFAB project [26, 85] uses a feature-based and constrant-based method to reverse engneer mechancal parts. REFAB s a human

14 nteractve system where the 3D pont cloud s presented to the user, and the user selects from a lst a feature that exsts n the cloud, specfes wth the mouse the approxmate locaton of the feature n the pont cloud, and the system then fts the specfed feature to the actual pont cloud data usng a least square means method teratvely. The authors gve emphass on the fttng of pockets, where the user draws a profle of the pocket on the pont cloud and the system then fts the profle to the data and the profle s then extruded to create the pocket. Ths feature-fttng process s made more accurate by usng constrants that are detected by the system, verfed by the user and then exploted to acheve a better fttng of the features accordng to the data. The system supports constrants such as parallelsm, concentrcty, perpendcularty and symmetry. The constrants defned and used n REFAB seek to reduce the degrees of freedom assocated wth the object as much as possble, so as to acheve hgh precson models n less tme. A feature-based reverse engneerng method was also used by Au et. al [6] for reverse engneerng a mannequn for garment desgn. Generc models of mannequn torsos are ft to 3D pnt clouds of human torsos for garment modelng applcatons. The basc concept n ths method s to create a generc mannequn model of a human torso, whch s approprately algned wth the 3D pont cloud of the desred human torso model, and the generc model s ft to the pont cloud by matchng up characterstc ponts of the models e.g. peaks. Ths method creates parameterzed models by explotng the features of the object and by usng them to constran the fttng process. It s an automated approach to reverse engneerng human torsos that creates parameterzed models wth good accuracy. Work such as [52, 53] concentrate on how constrants can be detected and effcently appled n the reverse engneerng procedure to create more accurate and aesthetc models. The authors analyze the type of symmetres and shape regulartes that can be observed and detected n a brep model and how they can be grouped nto constrants that can be appled on the model. [9] focus on constraned fttng and how constrant systems can be more effcently solved and appled to acheve a better model.

15 [88] presents a reverse engneerng framework where a mesh s segmented based on technques derved from morse theory. The mesh created from the pont cloud s dvded nto separator sets whch are combned wth feature skeleton to detect prmary regons of the object whch are fnally ftted wth surface patches. In a nutshell, research on extractng and explotng features from pont clouds of objects of both mechancal and freeform desgn for the purposes of redesgn, reproducton and custom desgn s stll ongong and a topc of current nterest. In ths context, we present an approach that detects and defnes features and combnes them wth sold modelng technques to acheve robustness and edtablty.

16 CHAPTER 3. FEATURE DETECTION AND EXTRACTION 3.1 Introducton 3.2 Related Work 3.3 Dervng Pont Concavty Intensty 3.4 Pont cloud segmentaton through regon growng 3.1. Introducton In ths chapter we present a method for detectng and extractng features from pont clouds for the purpose of re-engneerng. The objects that can be re-engneered by the proposed approach can be ether of mechancal or freeform desgn. Re-engneerng objects of freeform desgn s relatvely more dffcult and complex than reconstructng mechancal parts. Mechancal parts usually have specfc geometrc characterstcs, such as symmetres and swept profles that are farly easy to detect and parameterze. On the other hand, n the case of freeform objects, there are often features that are dffcult to extract. In the case of restrcted mechancal parts, features lbrares can be defned and used for detectng features n the pont cloud, whereas for freeform objects ths s not feasble. 3.2. Related Work The frst ssue we face n creatng robust feature-based CAD models from 3D pont clouds s that of segmentng the pont cloud nto ndvdual subsets that correspond to features. Much work has been done on segmentng a pont cloud nto feature-lke

17 subsets for surface reconstructon. The usual approach s to explot the changes n the surface curvature and to follow a regon growng approach. In [88] a method for detectng and extractng feature regons n a pont cloud s presented based on herarchcal morse complex segmentaton and feature skeleton. Prmary regons and separator sets (blendng regons between prmary regons) are detected and surfaces are ft to these regons. Another approach to segmentng a pont cloud s presented n [27] where the authors detect closed sharp feature lnes as borders of surfaces patches by applyng a regon growng method wth normal estmaton to produce clusters of ponts that, when represented as a graph, can reduce the problem sze by representng the pont cloud. However ths approach s lmted to objects wth sharp features, and therefore t s not applcable to objects of freeform desgn. [45] focuses on a curvature based approach to feature lne extracton from meshes of pont clouds of mechancal parts. On a dfferent level, n the REFAB project [26], a user-computer nteracton approach s followed for data segmentaton. Specfcally, the end-user specfes modelng characterstcs n the pont cloud, such as profle curve and ponts for pocket constructon, and the system fts the feature nto the pont cloud. We propose a method that acheves a feature-based segmentaton of the pont cloud by usng the concavty ntensty of the pont cloud to decompose t nto subsets (components) that correspond to features of the physcal object. Wth the term concavty ntensty we refer to the smallest dstance of a pont of the cloud from the convex hull of the cloud. The sets of ponts are then ftted wth curves and surfaces, and feature attrbutes and constrants for each component are derved. The CAD model s then bult on these components by defnng and applyng constrants concernng the features and ther connectvty. In the followng we wll present our pont cloud decomposton method, whch combnes pont cloud concavty ntenstes wth regon growng.

18 3.3. Dervng Pont Concavty Intensty Throughout the followng we assume that our pont cloud has been pre-processed to remove duplcate ponts (Fgure 3.1). The frst step n performng feature-based reverse engneerng s to dvde the pont cloud nto ndvdual components, such that each component corresponds to one or more features. Fgure 3.1: Pont cloud of a screwdrver wth 27k ponts [23] The work presented n ths secton employs a characterstc ntroduced n [57, 58]. The authors present a shape decomposton and skeletonzaton method for polyhedrons that s based on approxmate convex decomposton. The convex hull of a polyhedron s computed and the concavty of the vertces of the polyhedron s calculated and used as a crteron for the decomposton of the object [56]. The concavty of a vertex s defned as the dstance from the vertex to the convex hull surface of the component/polyhedron. The polyhedron s splt nto components at locatons where the concavty of the vertces s hgh. An teratve method s then used to smultaneously fnd the most effcent shape decomposton and the skeleton of each decomposed component. We apply the prncple of vertex concavty n conjuncton wth normal varaton to decompose pont clouds nto components that represent features. We compute the 3D convex hull of the pont cloud usng the Quckhull algorthm [7] (Fgure 3.3). We then calculate the concavty ntensty of each pont of the pont cloud.

19 Fgure 3.2: A pont cloud of a screwdrver pont cloud and ts convex hull We defne the concavty ntensty I(p) of a pont p as follows. Let p t be the track of the pont on the convex hull on some face f of the convex hull. Then I(p) s the smallest dstance pp t such that the lne segment pp t does not cross the cloud pont. Fgure 3.3: The screwdrver pont cloud concavty ntensty map [23]

20 Fgure 3.4: The Stanford bunny concavty ntensty map [77] Fgure 3.5: Concavty ntensty map of ponts representng a dnosaur [23] Fgure 3.3, Fgure 3.4 and Fgure 3.5 dsplay the concavty ntenstes of ponts belongng to dfferent pont clouds, a screwdrver, a dnosaur [23] and the Stanford bunny [77]. In the concavty ntensty map the values are rendered usng greyscale, where black corresponds to ponts belongng to the convex hull, whereas whte corresponds to ponts that are farthest away from the convex hull. We can observe that edges (rapd varatons n concavty ntensty), saddle ponts and extrema can be used to partton the pont cloud nto components that can later be refned as the features of the object.

21 A brute force approach to computng concavty ntensty of each pont of the pont cloud s to calculate the dstance of each pont from each facet belongng to the convex hull of the pont cloud. Then we check for ntersecton wth the trangulated pont cloud and select the smallest dstance derved by a projecton that does not ntersect the cloud pont. Ths however results n general n a tme complexty of O(n 2 ), where n s the number of ponts n the pont cloud. Ths s prohbtve for large complex pont clouds wth convex hulls that consst of many facets. Therefore, we have developed an algorthm for computng the ntensty of each pont wthout havng to examne all the polyhedra of the convex hull. More specfcally, t s evdent there are convex hull facets for whch t s meanngless to examne ther dstance from the pont cloud pont, smply because topologcally, n reference to the pont, they are located much farther away than other facets. For nstance, suppose we would lke to measure the dstance of a pont close to the tp of the screwdrver from the convex hull. Thus, the facets belongng to the convex hull that are located far away from the pont under consderaton cannot contrbute to the smallest dstance from the convex hull. The target facet wll be located somehow close to the pont. The search algorthm starts by calculatng dstances from facets contanng a specfc vertex v belongng to the convex hull. The vertex s chosen based on ts dstance from the pont p n one of the three coordnate drectons x, y and z. Let S(p, r) be a vrtual sphere wth radus r and center p and apply the search algorthm for each convex hull vertex that s located nsde ths sphere (Fgure 3.6). The radus r s calculated by determnng the smallest dfference (p x -v x 0) between coordnates along one of the drecton axes, e.g. along the x axs, and multplyng t by constant accuracy parameter k, whch defnes the fnal sze of the vrtual sphere. A larger szed sphere corresponds to more convex hull vertces for whch the algorthm wll be appled. r = k( p x vx) (Eq. 3.1)

22 The radus r s estmated after a short pre-processng step appled to the convex hull vertces. We sort the vertces ndvdually for each coordnate drecton x, y and z (O(nlogn) pre-processng tme) and locate the closest axs-wse neghbours n logarthmc tme ( O(logn) usng bnary search ). To enforce the non-crossng requrement we apply an addtonal constrant for choosng vertces of the convex hull. Specfcally, for each of the ponts located nsde the vrtual sphere wth radus r, we only apply the algorthm for vertces belongng to facets that are located on the correct sde of the convex hull, n reference to pont p. The correct sde of the convex hull s determned wth the help of the normal vector of the local surface at p, whch s calculated from the adjacent facets to p (note that we have performed a trangulaton of the pont cloud usng Tght Cocone n O(nlogn) expected tme [28]. From the trangulated model T of pont cloud we determne the neghbourng ponts of each pont p and the normal vector n of each trangle adjacent to p. By computng the vector sum of all the normal vectors of the neghbourng trangles, we obtan an estmaton of normal vector of the local surface at p. Ths s then used to decde whch ponts of the convex hull are on the approprate sde of the surface. Fgure 3.6: The vrtual sphere S(p,r) The search algorthm s a recursve procedure that performs a local search around the vertex v to locate the convex hull facet for whch the dstance from p s mnmzed. For ths facet the algorthm s repeated untl no facets wth smaller dstances are detected.

23 The algorthm takes as nput the pont cloud S, a trangulaton T of the pont cloud and the convex hull H. For each pont p of the pont cloud, we frst determne f t belongs to the convex hull. In ths case, the concavty ntensty of the pont s zero (I(p)=0). If the pont does not belong to the convex hull then we must fnd the facet f of the convex hull for whch the dstance between pont p and the track p of p on the plane f s mnmum (d mn (p,p )). Ths mnmum dstance s determned by applyng a recursve local dstance search whch begns at a convex hull vertex v and, after determnng the dstances of pont p from each convex hull facet f that has v as a vertex, searches the remanng vertces of the facet wth the smallest dstance. Ths process s repeated every tme a facet s found for whch the mnmum dstance(s) s(are) smaller than the prevous detected. Fgure 3.8 dsplays an example of the local search algorthm. By applyng the startng pont selecton crtera, we determne that a possble startng pont of the convex hull for the algorthm s pont #2. The mnmum detecton process begns by calculatng the dstance of pont p from each adjacent facet to pont #2. From the calculated dstances we conclude that the smallest dstance s located for facet (2, 4, 15). The algorthm then contnues by repeatng the above process for vertces #4 and #15, for whch the smallest dstance s returned for facet (4, 15, 16). The next repetton of the algorthm returns that none of the remanng facets formed by #16 correspond to dstances smaller than that returned by facet (4, 5, 16). Therefore the algorthm termnates and returns the ntensty of pont p whch s I(p)=0.000014. Ths approach to computng the concavty ntensty of a pont s guaranteed to compute the correct dstance snce t s performed on the convex hull. The shortest dstance cannot correspond to a projected pont outsde the convex hull; the shortest dstance always corresponds to a projecton that s located nsde a polygonal facet of the convex hull. Ths s demonstrated usng an example n 2D space. Suppose a pont p of the pont cloud s projected on edge f and let p be the closest pont on the lne defned by f. Then, pp' s the correspondng dstance (Fgure 3.7). If p s outsde the lne segment f then pp should ntersect a neghbour edge f at pont q. But then pp s larger then pq whch contradcts our ntal assumpton. Thus f s not the closest

24 edge to p and we contnue by takng the projecton of p on f fndng k whch n ths case s the closest pont of the polygon to pont p. f p' q p k f Fgure 3.7 Fndng the closest edge to pont p The pont concavty ntensty calculaton s summarzed n Algorthm 3.1 and Algorthm 3.2. Fgure 3.8: An example of the local dstance search algorthm

25 Algorthm 3.1: Local Dstance Search Algorthm Local_dstance_search (s, p, d pre ) Input: Startng pont s, cloud pont p, prevous smallest dstance d pre Output: Mnmum Dstance d mn 1. For every facet f (s,s 1,s 2 ) of s 2. fnd projecton pont p of p on the plane of facet f 3. f d(p, p ) < d pre 4. d pre = d(p, p ), v 1 =s 1, v 2 =s 2 5. end 6. f d pre < d mn then d mn =d pre 7. d 1 =local dstance search(v 1, p, d pre ) 8. d 2 =local dstance search(v 2, p, d pre ) 9. f d 1 < d mn d mn =d 1 10. f d 2 < d mn d mn =d 2 11. return d mn

26 Algorthm 3.2 Pont Concavty Intensty Computaton Pont_concavty ntensty ( ) Input: Pont cloud S, trangulated mesh T of S Output: Concavty ntenstes I for every pont p S 1. For every pont p S 2. f p convex hull 3. return I(p )=0 4. else 5. fnd the startng vertces v of the convex hull that are located nsde a vrtual sphere wth radus r 6. for every vertex v j 7. ntalze d mn and d pre 8. d j =local_dstance_search(v j,p,d pre ) 9. end 10. return I(p )=mn(d j ) 11. end 12. end Algorthm 3.1 has been expermentally observed to run n constant tme (worst case beng O(n)) whereas Algorthm 3.2 runs n O(nlogn) tme, where n s the cardnalty of the pont cloud.. The trangulaton of the pont cloud s obtaned n O(nlogn) tme, usng TghtCocone, the sortng pre-processng takes tme O(nlogn) and searchng for closest vertces of the convex hull s performed usng bnary search n O(logn) tme. Thus the overall expected tme complexty s O(nlogn). 3.4. Pont cloud segmentaton through regon growng The pont concavty ntensty values calculated n the prevous secton are used to segment the pont cloud nto feature components. A feature component s bounded by areas where abrupt changes n the drecton of the normal and/or rapd concavty ntensty varatons are observed. After calculatng the concavty ntenstes of all the

27 ponts that form the pont cloud, we apply a regon growng method to dvde the pont cloud nto ts components. Our regon growng method s based on two crtera: ) the normal vectors of neghbourng ponts belongng to the same regon should form an angle smaller than a threshold t and ) the approxmate gradents of the concavty ntensty functon n drectons x, y and z for neghborng ponts of the same regon should mantan the same sgn value, meanng that there are no zero crossngs observed between them. From the trangulaton of the pont cloud we can derve a normal vector for every trangle belongng to the mesh. For every pont of the pont cloud we compute a mean normal vector by takng nto account the normal vectors of all the trangles that have the pont as a vertex. Ths mean normal vector represents n general the drecton of the normal of the local surface area created by these facets at the specfc pont locaton. By computng the angle between the normals of two ponts we can obtan nformaton about the object s shape at that locaton. For nstance, f the normal vectors of two neghborng ponts form a sharp angle, then t s most probable that a sharp feature s located at that poston n the orgnal object. If the angle formed by the vectors s small, then the surface area s smooth, mplyng that the ponts belong to the same shape feature. Therefore, the frst regon growng crtera can be summarzed n the followng equaton: α( norm, norm p ) t (Eq. 3.2) where α s the angle formed by the normal vectors belongng to ponts and p, and t s a threshold value used to determne f the ponts belong to the same regon or not. The threshold t s an adaptve factor that can be used to defne the number of regons that the method wll detect. Specfcally, f the threshold s small, then the crtera takes on a more strct nature that leads to the detecton of more regons, than f a larger threshold s used. A small threshold detects any anomales and shape changes that

28 may exst n the object, whereas a large threshold detects more ntense changes n the shape of the object, thus leadng to fewer regons. Before applyng the regon growng method to our pont cloud we perform a preprocessng step to calculate the varatons n concavty ntensty values (approxmate gradents) for all the ponts n the pont cloud for coordnate drectons x, y and z. The varatons n concavty ntensty values are determned by examnng the concavty ntenstes of neghborng ponts. We wll refer to neghbors drectly connected to a pont p of the pont cloud as ts frst-level neghbors, whereas wth the term second-level we wll refer to the neghbors of p s neghbors (ponts r - Fgure 3.9). We calculate an approxmate gradent of the ntensty for each pont p n coordnate drectons x, y and z usng the followng equatons: di x n I p I x p x = 0 y p di y = 0 n n = n I I (Eq. 3.3) = (Eq. 3.4) p y di z n I z p n I = p = 0 z (Eq. 3.5) where I k s the concavty ntensty of pont k(x k,y k,z k ) and n s the number of k s neghbors. However, snce the neghbors of a pont may be so close that the coordnate dfference n a drecton s practcally zero,.e. x p -x 0, we calculate the approxmate gradents n respect to the second level neghbors of pont p. Thus the above equatons are appled for the second level neghbors, meanng that I k s the concavty ntensty of a second level neghbor k of p and n s the number of second level neghbors of p. The approxmate gradents reveal how the ntensty functon of a pont changes n every drecton n reference to ts neghborng ponts.

29 r 8 r 9 q 1 r 2 r 7 q 3 p r 3 r 6 q 4 q 2 r 4 r 5 Fgure 3.9: Pont p and ts frst level neghbors q 1,q 2,q 3,q 4. The remanng nodes are second levels neghbors of p After computng the gradents we apply our regon growng method. As seed ponts of the method we choose ponts where the concavty ntensty values are constant or almost constant. Regon growng s carred out by addng ponts to a regon f the two crtera are met. If a pont does not satsfy the crtera, then t s most lkely that t belongs to a border area around the growng regon. More specfcally, the regon growng method begns by examnng every frst-level neghbor of the seed. For each such neghbor q, we calculate the angle formed by the normal vector of the seed and the normal vector of the neghbor q, usng the dot product. If the angle s smaller than a threshold t then we assume that the drecton of the normal n the local area s mantaned, thus the neghbor s added to the regon. If the angle s larger than the threshold, we must take nto account the concavty ntensty gradents of the seed and the neghbor to determne f the pont belongs to the same regon, or f t belongs to a saddlepont or extrema. To ascertan the behavour of the concavty ntensty functon n the area, we multply the gradents of the concavty ntensty functon of the seed and ts neghborng pont n each coordnate drecton. If dis x diq x >0, dis y diq y >0, dis z diq z >0 ths means that there s no change n the drecton of the ntensty functon n these coordnate drectons. Thus the neghbor belongs to the regon and therefore t s added. If dis x diq x <0, dis y diq y <0, and dis z diq z <0 then the sgn of the gradent of the seed s dfferent than the sgn of the neghbor s gradent n the specfc coordnate drecton,

30 mplyng that there s a zero crossng between the two. A zero crossng reveals the exstence of a saddlepont or an extremum. If nether of the regon growng crtera s met for pont q, then we take nto consderaton the second level neghbors of q to ensure that q s a saddlepont or extrema. More specfcally, the frst level neghbors of the neghbor q are examned n reference to the seed. The mean normal vector of the frst level neghbors of q s computed and the angle between ths normal and the seed normal s calculated. If the two vectors form an angle smaller than a more relaxed threshold t and the approxmate gradents of the frst level neghbors of q s consstent wth the behavour of the regon, then the neghbor s added to the regon. In the opposte case, the pont most possbly s a saddlepont or extremum. Fgure 3.10 Feature regons detected by regon growng In Fgure 3.10 the result of the regon growng algorthm when appled to the screwdrver pont cloud s shown. The regon growng method has been mplemented under the Mcrosoft Vsual C++ programmng envronment usng ACIS R18 sold modelng lbrares by Spatal and HOOPS 16.20 for the GUI.

31 A short post-processng step on the feature regons may be performed manually after regon growng. Specfcally, we can merge two regons together to form a sngle regon or we can splt a regon nto two smaller regons. Ths s done manually by specfyng nteractvely ponts whch can form a border between the two new regons. Also we can create user-defned hardwred pont-wse boundary contours to lmt the behavour of the regon growng method, when recalculatng the regons on a porton of the pont cloud. Also border correcton can be performed manually, n cases where a feature s border s not contnuous, by defnng connectng ponts that belong to the border. The crtera used by the regon growng method to determne f a pont belongs to a regon or not can be synopszed as follows: A pont p belongs to a regon r, whose seed s pont p, f: 1) the angle formed by the normal vectors of neghborng ponts p and p s smaller than a threshold t α ( norm p, norm p ) t 2) the gradents of the concavty ntensty functon n drectons x, y and z for p and p mantan the same sgn value, meanng that there s no zero crossngs observed between the two di p x di px > 0, di p y di py > 0, di p z di pz > 0, The regon growng method s summarzed n Algorthm 3.3.

32 Algorthm 3.3 Regon Growng Method Regon_growng (s, r) Input: Seed s Output: Regon r 1. For each neghbor of s 2. If angle a(norm,norm s ) < t threshold then 3. add to regon r 4. else 5. f di sx di x >0 and di sy di y >0 and di sz di z >0 then 6. add to regon r 7. else 8. for every neghbor of 9. f angle b(norm,norm s ) < t and di sx di x >0, di sy di y >0, and di sz di z >0 then 10. add to regon r 11. else belongs to a border regon/saddlepont 12. end 13. end 14. end 15. end 16. end

33 CHAPTER 4. CONTOUR RECONSTRUCTION 4.1 Introducton 4.2 Related Work 4.3 Curve Approxmaton usng cubc ratonal Bezer Curves 4.4 Examples of curve fttng usng ratonal Bezer curves 4.5 Evaluaton of our method 4.1. Introducton In the prevous chapter we presented an approach for dscoverng features on a pont cloud by detectng local varatons n the morphology of the pont cloud. Ths approach results n a number of regons that represent object features and regons representng the boundares of the features. The boundares of the features are approxmated by a collecton of pecewse cubc ratonal Bezer curves that best ft the detected border pont cloud and are G 1 contnuous. In general, we present a fast curve approxmaton method that approxmates raw data wth cubc ratonal Bezer curves. Our approach combnes lnear least squares approxmaton wth contnuty constrants to ensure G 1 contnuty between neghborng curves. We use the weghts of the curve to adjust ts shape and parametrc structure so as to construct curves that pass as closely as possble between the data sets and jon smoothly. 4.2. Related Work The problem of constructng curves that approxmate pont cloud data has been approached usng dfferent type and degrees of curves dependng on the nature of the applcaton. The most straghtforward approach to curve fttng s to fx some curve

34 parameters such as knots and weghts (for Bsplnes), and then use a least squares fttng approach to compute the control ponts of the curve [65]. [93] provdes a thorough survey on curve fttng. [98] presents a method for fttng ratonal Bsplne curves to pont data for reverse engneerng applcatons. The authors suggest a lnear least squares optmzaton process where the control ponts and the weghts of a ratonal Bsplne curve of degree n are teratvely refned untl convergence s acheved. In [83] the authors focus on constructng curves and surfaces from pont clouds obtaned by 3D scannng technques. The ntal pont cloud s trangulated and a method s ntroduced for selectng approprate ponts from the data set based on the trangulaton. Then a curve refnement process s performed whch fts the Bsplne curve to the ponts under lnear constrants related to the endponts and tangent vectors. [66] proposes a method based on squared dstance mnmzaton, whch starts wth an ntal Bsplne curve that s teratvely ftted to the target curve. In [93] the authors suggest a method for computng a planar Bsplne curve to ft an unorganzed, possbly nosy, pont cloud usng an teratve squared dstance mnmzaton process based on [66] whch converges from an ntal curve to the desred target shape usng a squared dstance error objectve quantty. [54] suggests a modfed movng least squares method for thnnng out a pont cloud and approxmatng t wth a smooth curve. In [30] the authors present an approxmaton method whch constructs smooth curves from nosy unordered data. [87] dscusses the pros and cons of constraned and unconstraned fttng n reverse engneerng applcatons. As noted by the authors, unconstraned fttng results n root-mean-square dstance mnmzaton of the ponts, however farness of the curve s not taken nto consderaton, whch s mportant n re-engneerng applcatons. Also, wth nosy pont cloud data, unconstraned curve fttng may lead to unwanted results. The authors provde a general curve fttng approach whch, dependng on what type of constrants are ntegrated nto the process, acheves dfferent fttng results. Constrants to trm the search space of the curve fttng process are reported n [33], where the authors use constrants to ensure that the curves le on smooth manfolds.

35 Whle the method proposed n [98] produces curves for the purpose of reconstructng objects of freeform desgn, ts drawback s that convergence s somewhat slow, makng t costly to use for re-engneerng objects consstng of many complex features. The curve fttng methods proposed n [66] and [93] are very accurate and stable, however ther performance depends on the ntal curve specfed nteractvely by the user. [54] constructs a bsplne curve to approxmate a thnned out pont cloud, wthout provdng an upper bound for the approxmaton error. In [83], even though constrants are mposed on the curve fttng process, the curves obtaned are not suffcent for representng complex shapes often encountered n freeform objects. The work n [30] s based on the assumpton that no connectvty nformaton s avalable, however, n our case, the pont cloud has been pre-processed and therefore we have acqured topologcal nformaton regardng the pont cloud. Software tools have been developed that can be used for curve reconstructon n reverse engneerng applcatons. An example of such software s SISL [73], a NURBS software lbrary that provdes functonalty for buldng applcatons handlng freeform geometry. SISL uses a global optmzaton approach to curve fttng that returns very good results. We have mplemented a global optmzaton for our applcaton problem and observed that s usually convergng qute slowly, and dependng on the ntal condton we may encounter accuracy ssues and convergence to local mnma. Our applcaton problem deals wth a multtude of features resultng from processng the 3D pont cloud. The boundary regons of the features should be approxmated by pecewse curves for purposes of reverse engneerng and therefore requre a effectve and effcent method. The work n ths chapter focuses on re-engneerng pont clouds to construct featurebased CAD models that can be used manly n redesgnng and reproducton. We look to reconstruct not only mechancal parts but also objects of freeform desgn. For CAD data representng objects of freeform desgn an approach that yelds reasonable results s the use of pecewse ratonal curves of low degree, because the weght factors allow the shape of the curve to be better adjusted to the pont data by determnng the effect the correspondng control pont has on the curve.

36 4.3. Curve approxmaton usng cubc ratonal Bezer curves The regon growng method mentoned n the prevous chapter provdes sets of ponts correspondng to borders of feature regons. Suppose we have a regon border consstng of n 3D ponts. We would lke to fnd the curve that best approxmates ths data set to represent the general morphology of the border. We requre that the method used for fttng s of low computatonal complexty and of low degree. Approaches n the lterature dd not meet these requrements ether because of slow convergence, or usage of curves of hgher degree or no consderaton of the farness of the curve. Our approach s smlar to the work n [98]. In ths work the authors present an optmzaton process through whch ratonal b-splne curves are ft to pont data. We adopt ths approach to ft cubc ratonal Bezer curves to sets of ponts correspondng to feature boundares and extend t to ensure that the curves created conform to the condtons requred for G 1 contnuty. We use an equvalent nstance of the general NURB, namely pecewse ratonal cubc Bezer curves because the constrants we apply decrease the degrees of freedom of our problem and our requrements are well met wth ths low degree smpler representaton resultng n fast convergng optmzaton algorthm. Usng pecewse ratonal Bezer curves we bascally follow an optmzaton approach whch can nherently rule out nosy data wthout affectng the shape of the boundary as a whole. Ratonal curves are flexble curves that can approxmate complex geometry more accurately than pure polynomals. In general they are not preferred for reverse engneerng applcatons n the sense that ther nonlnear multvarate format s not computatonally practcal. However they are not as expensve and tme consumng when used to obtan a lnear format. Before applyng our curve approxmaton method, we perform a small pre-processng on the border regon. We thn out the border regon by representng neghborng ponts wth one representatve pont. More specfcally we defne a vrtual sphere V, detect all the border regons ponts located nsde V (suppose n s the number of ponts nsde V) and calculate ther center of mass, as shown n eq 4.1.

37 c x n = x = 0, n c y n = y = 0, n c x n = = 0 n z (Eq. 4.1) We then fnd the border regon pont nsde the sphere that s closest to the computed center of mass. Ths pont s used as a representatve for the group of ponts nsde V. The vrtual sphere s shfted to a new poston (Fgure 4.1(b)) and the process s repeated untl we have obtaned a thnner verson of the pont cloud. The sze of the sphere determnes the densty of the thnned out cloud; the smaller the sphere, the denser the acqured pont cloud. Ths method of thnnng also provdes us wth an ordered sequence of ponts. Fgure 4.1 Vrtual sphere contanng border ponts. The green damond corresponds to the center of mass, whereas the red damond s the border pont closes to t. The sequence of ponts representng the feature border s dvded nto subsets of ponts and curve approxmaton s carred out on each curve segment. Fgure 4.2 A sequence of ponts to be approxmated

38 Curve approxmaton s carred out wth a least squares optmzaton procedure. Suppose Q={Q 1,Q 2, Q m } (Fgure 4.2) s a set of ordered border ponts and C s an approxmatng ratonal Bezer curve gven by the equaton: C( u ) = n j= 1 n j= 1 w P B ( u ) j j j w B ( u ) j j (Eq. 4.2) where n=4 for a cubc ratonal Bezer curve, u s the parameter value assocated wth border pont Q, P j are the control ponts, w j s the weght of each control pont and B j s the correspondng Bernsten polynomal. Assumng that all ponts of Q should be approxmated by the curve, we would lke to mnmze the error: e = Q C(u ), =1..m. (Eq. 4.3) We need to assgn parameter values u to each pont Q. We use chordal parameterzaton [44] n whch we express the parameter value of each pont Q n reference to ts poston n the pont sequence: u j= 2 = m j= 2 ΔQ ΔQ j j (Eq. 4.4) The least squares problem s then to mnmze the error: E = m = 1 2 e E = m = 1 ( Q C( u )) 2 (Eq. 4.5) (Eq. 4.6)

39 We consder the product w j P j as one varable and partally dfferentate (Eq. 4.6 by factor w k P k, k=1..4. Ths leads to equatons (for k=1..4): 0 ) ( = w k P k E 0 ) ( )) ( ) ( 2( 1 4 1 4 1 = = = = m j k j j j j j j u B u B w Q u P B w from whch we obtan the followng lnear system of equatons: [ ] [ ][ ] [ ] [ ][ ] w B Q B wp B B x T x T = [ ] [ ][ ] [ ] [ ][ ] w B Q B wp B B y T y T = [ ] [ ][ ] [ ] [ ][ ] w B Q B wp B B z T z T = where (.e. for coordnate x): = ) ( ) ( ) ( ) ( ) ( ) ( 4 1 1 4 1 3 1 2 1 1 m u m B u B u B u B u B u B B K K M M = 4 3 2 1 4 3 2 1 x x x x x P w P w P w P w wp = ) ( ) ( ) ( ) ( ) ( ) ( ) ( 4 1 2 1 2 1 4 1 1 3 1 1 2 1 1 1 1 m m m m x u B Q u B Q u B Q u Q B u Q B u Q B u Q B B Q K K M M M M Wthout affectng the shape of the curve or the parametrzaton we can assume that one of the weghts s 1. Therefore we assume that weght w 2 =1. We could elmnate one more weght by reparametrzng u, but we need reparametrzaton to be a parameter n the optmzaton process. Also to ensure G 1 contnuty between Bezer curves we make sure the startng pont of one curve concdes wth the end pont of the prevous curve and that the nner control ponts are located accordngly on the tangents of the end ponts. (Eq. 4.8) (Eq. 4.7)

40 Fgure 4.3 Inner control pont coordnates expressed n reference to the end control ponts The unt vectors of the tangents at the end control ponts are estmated by expressng each tangent of each pont as a lnear combnaton of ts 4 closest neghbors [68]. Vectors wpx, wpy, wpz are modfed by expressng the coordnates of nner control ponts P 2 and P 3 n relaton to the end ponts. In eqn. 4.9 we now have: w1( x1+ 0) w ( x + n k) T B B B QxB w w3( x4 + rt x ) w ( x + 0) [ ] 2 1 x T = [ ][ ] 4 4 (Eq. 4.9) Snce we assume that w 2 =1, the system s transformed so that ts fnal form s (e.g. for drecton x): wx 1 1 nk T T T B B B QxB w B B A wrt 3 x wx [ ] x = [ ][ ] [ ][ ] 4 4, x [ ] A x 0 x1 = w3x 0 4 (Eq. 4.10) These systems of lnear equatons (for drectons x, y and z) can be used to derve values for varables w 1, k, t, and w 4 (all weghts n vector [w] are ntalzed to 1),

41 therefore essentally determnng the nner control ponts coordnates and approxmate values for two of the three weghts. To acheve better curve approxmaton, we proceed to a second step usng the control ponts calculated above to compute more approprate weght values. However, for each system soluton we obtan a dfferent set of varable values. Therefore the followng weght optmzaton procedure s carred out once for every soluton set and we accordngly keep the soluton that best mnmzes the least squares error. Specfcally, we express eq. 4.5 as follows: = + + = m z y x e e e e 1 2 2 2 ) ( We partally dfferentate by weghts w k (k=1,3,4) and obtan a system of equatons from whch we can substtute the control ponts and the weghts found n the prevous step and optmze the weght vector. Specfcally, for E/ w k =0, k=1,3,4, the equatons obtaned are of the form: = = = = = = = = + + = + + m j j z j z j j y j y j j x j x k m j j j z z j j j y y j j j x x k u B P w Q u B P w Q u B P w Q u B u B w Q Q u B w Q Q u B w Q Q u B 1 4 1 4 1 4 1 1 4 1 4 1 4 1 ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( Eventually we end up wth the lnear system: [ ] [ ] [ ][ ] [ ] [ ] ( )[ ] [ ] [ ][ ] [ ] [ ][ ] [ ] [ ][ ] [ ] [ ] ( ) [ ] [ ] ( ) [ ] [ ] ( ) ( ) z T z y T y x T x z T z y T y x T x z T z y T y x T x C Q B C B Q C B Q w P B Q B w P B B Q w P B B Q w Q B Q B B Q B Q B Q B Q + + + + + = + + 1) ( where (e.g. for x coordnate): = ) ( ) ( ) ( ) ( 4 1 1 4 1 1 1 1 m m m m x u B Q u B Q u Q B u Q B B Q L M O M L [ ] = ) ( ) ( 2 2 2 2 m x x x u B P u B P B Q Cx M. (Eq. 4.11) (Eq. 4.12) (Eq. 4.13)

42 Ths procedure s carred out teratvely untl the error functon s mnmzed. An example of the result of ths method s shown n Fgure 4.4. Ths method reaches the best soluton after 10 teratons. The red ponts correspond to ponts of the curve segment whereas the black ponts are the respectve ponts calculated on the ratonal Bezer curve. Fgure 4.4 (top) Ponts used for approxmaton (red) and correspondng ponts computed on curve (black), (bottom) Cubc ratonal Bezer curve approxmatng the sequence ponts (red) and the correspondng control ponts (turquose). Generally ths s a fast curve approxmaton approach that produces smooth contnuous curves that nterpolate or pass close by the data ponts. A good approxmaton s reached wthn a few teratons. In some cases, the mnmal error s reached after the frst teraton, f the pont cloud data s not nosy and the tangent estmatons are good. The accuracy of the approxmatng curve bascally depends on

43 how well the tangents are estmated at the end ponts, snce we restrct the nner control ponts to be located on them. The weghts are used not only to determne the shape of the curve but also to adjust the parameterzaton of the curve. Chordal parameterzaton works well, assumng that the ponts are gven as a sequence n 3D space. 4.4. Examples of curve fttng usng ratonal Bezer curves In ths secton we wll present examples of our curve fttng method whch was mplemented usng Maple 11. The data sets used n the examples are areas correspondng to feature boundares returned by our regon growng algorthm. For each pont n the border pont cloud we have computed n a prevous phase (feature detecton phase) ts correspondng surface normal vector estmate. The boundary pont set s dvded nto subsets (curve segments) based on the progressve change n the tangent vector. The pont cloud s dvded nto as many sets needed, so that the angle formed by the tangent vectors of the start and end pont of each secton s below a threshold. 4.4.1. Example A Fgure 4.5 shows one of the regon borders detected by our regon growng method. Ths border contans 450 3D ponts. We perform thnnng on the border regon and we estmate the tangent vector at the each pont usng the nearest neghbors. Then we dvde the thnner verson of the border nto segments by comparng the startng tangent vector of the segment wth the sequence of ponts, untl the angle formed by the vectors s larger than a threshold angle value. In the followng example, the border regon s dvded nto 3 segments. If a smaller threshold s used, then more curve segments wll be obtaned.

44 (a) (b) (c) Fgure 4.5 (a) Regon detected by regon growng, (b) the border of the regon to be approxmated, (c) a thnned-out border We apply the curve fttng algorthm to each curve segment. The fnal curve approxmatng the pont cloud s shown n Fg. 4.6. The frst set of ponts used for approxmaton conssts of m=40 ponts, wth the dstance between the end ponts correspondng to 0.0279 and the average error s gven by E/m=0.164 10-6. For the second approxmatng curve, the set of ponts used conssts of m=36 ponts wth end ponts dstanced at 0.024 and average error s 0.708 10-6 after one teraton. The fnal segment conssts of m=34, the dstance between the end ponts s 0.0229 and, after one teraton, average error s 0.825 10-6. The results of the curve approxmaton are summarzed n table 4.1. Fgure 4.6 (a) The thnned out border regon (b) the curve segments to be approxmated (#1-green, #2=blue, #3=red), (c) the fnal approxmatng curve

45 Curve segment # of ponts Dstance between # of Average error E/m end ponts teratons #1 40 0.0279 0.164 10-6 4 #2 34 0.0229 0.825 10-6 1 #3 26 0.024 0.708 10-6 1 Table 4.1 Results of Curve Approxmaton 4.4.2. Example B Fg. 4.7 shows another regon detected wth the regon growng algorthm when appled to the screwdrver pont cloud. The border of ths regon conssts of 498 ponts whch s dvded nto three segments as show n fgure 4.7(c). After thnnng, the tangents at each end pont are estmated and the curve approxmaton method s appled to each segment. The resultng curves are shown n fg. 4(d). The frst segment conssts of m=33 ponts, wth the Eucldean dstance between the end ponts correspondng approxmately to 0.02. After 10 teratons the least squares error functon s mnmzed and the rato average error E/m s 0.64 10-6. The second segment conssts of m=19 ponts, the dstance between the end ponts s 0.014 and the average error s 0.14 10-6 after 11 teratons (the sum of squared errors s 0.27 10-6 ). Fnally, the thrd segment conssts of m=27 ponts, the dstance between the end ponts s 0.017 and after 30 teratons the average error s 0.46 10-6. These results are summarzed n Table 4.2. Fgure 4.7. (a) The regon created by regon growng (b) the border of the regon, (c) the sample of ponts used for approxmaton, (d) the fnal curve approxmaton of the border.

46 Curve segment # of ponts Dstance between # of Average error E/m end ponts teratons #1 (green) 33 0.02 0.64 10-6 10 #2 (red) 19 0.014 0.14 10-6 11 #3 (blue) 27 0.017 0.46 10-6 30 Table 4.2 Results of Curve Approxmaton 4.5. Evaluaton of our method To evaluate the result of our approxmaton method we performed an optmzaton to compute the absolute optmal curve usng the IpOpt software [47]. We perform optmzaton treatng u, =1..n, the weghts and the control ponts as unknowns and we mnmze the objectve functon of eqn. 4.5 under the followng constrants: ( Q C( u )) C ( u ) = 0 Eq. 4.14 where 0 t 1 and =1..n. After performng varous experments we observed that our approach provdes satsfactory results n sgnfcantly less tme. In one case, for example, the sum of the squared errors after convergence was 1.279 10-6 after approxmately 1000 teratons as opposed to 2.4 10-6 after 12 teratons as provded by our approach. In general, from repeated experments, we have determned that the average error of the curve computed by our approach s about 0.5-2.5 tmes larger than the average error of the optmal curve. Also the average error computed by our method s larger than the actual error for the curve derved by our approach. Therefore we can conclude that the curve constructed by our method s a satsfactory approxmaton.

47 Fgure 4.8 A sequence of ponts approxmated by a curve C, under the constrants of Eq.4.14 In general, we have developed a fast curve fttng method whch derves cubc ratonal Bezer curves conformng to G 1 contnuty constrants. By mposng contnuty constrants nto the least squares optmzaton process we ensure that the computed control ponts respect the estmated tangents at the end ponts. We also adjust and control ponts and weghts untl the error of the least squares s mnmzed. The weghts are used not only to affect the shape of the curve but also to adjust the parametrzaton of the curve. As compared to other curve approxmaton methods whch perform curvature-based farness our method s effectve and effcent wth satsfactory accuracy. Ths s mportant gven that the applcaton n whch ths method s employed calls for the reconstructon of the borders of all features, whch n the case of freeform objects, may be a few hundreds and qute complex.

48 CHAPTER 5. FEATURE RECONSTRUCTION 5.1 Features n reverse engneerng 5.2 Sold modelng technques 5.3 Generatng a feature assembly plan 5.4. Parameter defnton and edtablty 5.5 Persstent namng In ths chapter we consder how feature components that consst of feature regons and boundary curves can be used to reconstruct the complete CAD model of an object. We apply sold modelng technques to combne and obtan the entre 3D model representaton. Furthermore we ntroduce parameters and constrants on these features to allow edtng and capture desgn ntent. 5.1. Features n reverse engneerng Feature, n computer-aded desgn, s a new term that s used to descrbe an entre class of concepts. In general, features are generc shapes or characterstcs whch can be assocated wth certan attrbutes and knowledge [71]. These attrbutes can descrbe the morphology of the object,.e. through parameters defnng ts sze, shape and orentaton, and ts behavor n a CAD model,.e. connectvty ssues and constrants. The use of features n a model provdes the user-desgner wth the ablty to edt and redesgn the model [41]. A user-desgner can even defne hs own feature components to use n the desgn process [40]. Gven ths, varous applcatons apply the concept of features n a way compatble to the scope and am of the respectve applcaton.

49 In reverse engneerng applcatons, and specfcally, n reconstructng mechancal parts, features are shapes tradtonally used n engneerng desgns such as slots, holes, and bosses [85]. In reverse engneerng objects of more freeform desgn, the term feature s often used n the sense of feature lnes [27], meanng edges/boundares of an object that can be detected by changes n the surface curvature of the object [25],[39]. [88] use an ntermedate data structure called a feature skeleton whch s a network of curves bascally representng the boundares of regon sets. In Brep models features can also be surfaces that can be grouped together based on certan characterstcs or propertes. In ths sense, we consder as a feature a group of ponts that has a morphologcal meanng, from a desgn pont of vew. For example, n a pont cloud of a duck, a pont set correspondng to the head can be consdered a feature. In a screwdrver, the ponts correspondng to the handle may be consdered a feature. But features can be even more specfc. For example, the duck s head can be dvded nto more features.e. beak and the rest of the head (Fgure 5.1). Fgure 5.1 (left) A pont cloud of a duck (rght) a mesh representaton of the duck 5.2. Sold modelng technques Features, as used from our perspectve, can be reconstructed from ther regons ether by surface fttng or sold modelng functons. Surface fttng would provde us wth a reconstructed surface model that would conform to the ntal object from both a morphologcal and aesthetc pont of vew, however ts edtng capabltes would be lmted. Therefore we choose to apply sold modelng technques to our feature

50 regons so that the reconstructed features are more easly edted and modfed. The modelng technques we focus on are sweepng, sknnng, coverng and blendng. Sweepng s a modelng functon n whch a closed planar doman s translated (translatonal sweepng) along a trajectory curve (fgure 5.2) or rotated (rotatonal sweepng or swngng) around an axs to form a sold. If an open doman s swept accordngly then a surface model s formed. [55]. Work on reverse engneerng pont clouds usng sweepng technques has been done by [49]. The author performs slcng on a pont cloud usng the boundng box as a gude and reconstructs a boundary curve conformng to the ponts retreved from slcng. The boundary curve s swept accordngly to reconstruct and obtan the CAD model. Fgure 5.2 An example of translatonal sweepng Sknnng s a modelng functon where a closed volume or sold s formed by creatng a skn surface over prespecfed cross-sectonal planar surfaces (fgure 5.3) whereas coverng s a functon that covers (that s, fts a surface onto) closed boundary curves n sold or wreframe objects (fgure 5.4).

51 Fgure 5.3 Example of sknnng between two parallel crcular curves to create truncated cone Fgure 5.4 (left) Coverng a boundary wth a face, (rght) addng a pont to a sold by coverng. Blendng s a functon used to modfy a model so that a sharp edge or vertex s replaced by a smooth surface whose normal vectors are contnuous wth those of the surfaces that orgnally meet at the edge or vertex. Ths functon s used manly for aesthetc reasons, to make the model look smoother.

52 Fgure 5.5 An example of blendng Coverng, sknnng and blendng are technques where surfaces are ftted accordngly to boundary curves or other prmtves. The type of modelng functon used durng the reconstructon process depends on the types of curves and symmetres detected n our feature regons, as s descrbed n the followng secton. 5.3. Generatng a feature assembly plan We consder how features can be reconstructed from the subsets of ponts produced by our pont cloud segmentaton approach usng sold modelng technques to capture the desgn ntent and semantcs of the model. Our man focus s to reconstruct each feature as a sold entty, preservng the shape morphology and semantcs, wthout necessarly nterpolatng the pont cloud exactly. We apply symmetry detecton methods to determne what modelng technque s more approprate n each case. Intally we calculate the orented boundng box (OBB) that s algned accordngly wth the feature regon pont cloud [38]. Ths s carred out by usng prncpal component analyss (PCA) [29] [49] to fnd the axes of the orented boundng box. The dmensons of the OBB axes are determned by projectng the pont cloud onto each axs and usng the extreme values as the axs dmenson values. The PCA provdes the most sgnfcant axes of the pont cloud and bascally expresses the way the pont cloud s dstrbuted by lookng at the covarance of the ponts. To compute the PCA, frst we fnd the average poston M(m x,m y,m z ) (center of mass) of all the ponts of the feature regon and then we compute the covarance matrx of the pont

53 cloud. The covarance matrx for every pont P of the feature regon s expressed by eq. 5.1 and s a symmetrc 3 3 matrx. The egenvectors of the covarance matrx gve the drectons along whch the pont cloud s most and lest spread out. C = 1 n n = 1 ( P M )( P M ) T (Eq. 5.1) By ths method we derve the prncpal axs of the feature pont cloud and the OBB. The next step s to determne for each feature regon whch sold modelng technque s more approprate for reconstructon. Ths depends heavly on the dstrbuton and the geometry of the pont cloud. 5.3.1. Sweepng If the pont cloud s dstrbuted dstnctly along one of the prncpal axes formng.e. a long feature, such as the screwdrver shaft, then reconstructon s ntated by slcng the feature pont cloud. A slcng plane s moved along the man prncpal axs of the OBB and cross sectons of the pont cloud are obtaned. Ponts of the pont cloud not on but close to the plane are projected onto t. The ponts derved from slcng are used n our contour reconstructon method (as a 2D curve approxmaton problem) for curve fttng. The slcng plane S s moved along the man prncpal axs, used as the slcng path, untl the length of the boundng box s traversed. Sequental crosssectons of the feature pont cloud derved by ths method are compared to determne f any smlartes or symmetres exst and n what form. Reconstructed cross-secton curves wth that can be consdered dentcal mply the applcaton of sweepng for reconstructon. For example, cross-sectons of the upper half of the screwdrver shaft result n round crcular curves that, when compared, match. Ths mples that reconstructon at that part of the feature should be carred out wth translatonal sweepng. Before carryng out reconstructon, we examne all sequental cross-sectons to defne the lmts of the sweepng functon. Sweepng s performed on the trajectory up to the pont where the other end of the OBB s reached or the cross-secton contour changes. In the example

54 of the screwdrver shaft, ths occurs up to the pont where the tp of the shaft starts to form. Ths type of sweepng, along a lnear trajectory path, s also referred to as extrudng. Fgure 5.6 Feature regon correspondng to a screwdrver shaft 5.3.2. Sknnng In the case where two cross-secton curves are dfferent, n sze or shape, reconstructon s performed through sknnng technques. In the prevous example of the shaft reconstructon, from the pont where the sweep functon ends, up to the tp of the shaft, where we reach a feature boundary curve, sequental cross-sectons cannot be matched, thus leadng to the applcaton of sknnng technques to create surface patches between the two cross-secton curves. In general, f a network of dfferent cross-secton curves s provded, then sknnng s performed usng the ntermedate curves as gudes for the sknnng operaton. In some cases features can be reconstructed n more than one ways. Let us consder for example the bottom surface of the screwdrver that s connected wth screwdrver shaft (fgure 5.7). Ths feature has 2 border curves, the outer and the nner boundary. Ths feature can easly be reconstructed usng sknnng between the two boundary curves. However t can also be reconstructed usng rotatonal sweepng. By creatng the OBB of the feature regon we also obtan the prncpal axes. The axs that passes through the hole can be used as an axs of rotaton for sweepng. The profle curve for sweepng s obtaned by slcng the pont cloud wth a plane that orgnates from the

55 rotaton axs and s parallel to one of the faces of the boundng box. The ponts on and very near to the slcng plane are used for the profle curve reconstructon, whch s then swept around the axs accordngly. Fgure 5.7 A feature representng the bottom of the screwdrver handle Reconstructng features usng sweepng and sknnng s summarzed n Table 5.1 Feature Reconstructon wth sweepng and sknnng 1. Compute the PCA of the feature regon 2. Fnd OBB based on prncpal axes 3. Create slcng plane S parallel to OBB and perpendcular to selected PA 4. Untl path T (length of OBB axs) s traversed 4.1. Move S on T 4.2.Fnd all ponts P of feature regon located on or close to S 4.3 Apply curve approxmaton on S to construct curve c 5. Detect smlartes/characterstcs of curves 6 Apply approprate modelng functon for feature reconstructon 6.1 If cross sectons are dentcal perform translatonal sweepng 6.2 If cross secton dffer perform sknnng Table 5.1 Reconstructng feature regons wth sweepng / sknnng

56 5.3.3. Coverng Some feature regons can easly be reconstructed usng coverng technques. Ths holds for pont cloud regons that are farly flat, spread out and/or freeform. Suppose we have the feature regon shown n Fgure 5.8 and ts correspondng boundary box. Fgure 5.8 Top part of screwdrver handle and ts correspondng boundary box The specfc feature pont cloud s very thn and spread out, smlar to an overturned plate. Usng the feature s boundary curve and a sample of ponts located on the top of the feature (on and very close to the upper face of the OBB) we create a surface that nterpolates the ponts provdng a smooth result. In general, coverng technques can be appled to cover ponts or other gude contours. 5.3.4. Assemblng the features A pont cloud s reconstructed based on a feature assembly plan. A feature assembly plan provdes a logcal structure for determnng the feature parts to be reconstructed and how they are connected. The feature assembly plan of a pont cloud can be derved based on a decomposton of an object nto ts features. We consder the screwdrver pont cloud as our example case. We construct a feature connectvty graph G(v,e) where v are the nodes of the graph and e are the edges. Every node of the graph corresponds to a feature n the pont cloud, whereas an edge between two nodes means that the two features are connected. An ntal, f not fnal, estmaton of the feature connectvty graph s provded by our regon growng feature detecton and extracton algorthm.

57 5 1 4 1 6 1 1 2 1 2 3 8 10 1 7 1 9 1 8 1 Fgure 5.9 Feature Connectvty graph of screwdrver A feature decomposton tree (Fgure 5.10) of the screwdrver s derved from the feature connectvty graph. The screwdrver s features can be decomposed nto the followng parts: screwdrver handle Shaft (1) Base surface (2) Grp body Top surface (11) Slots (# = 6) (4 9) Connectng surfaces (3) Fgure 5.10 Decomposton of the screwdrver model nto ts feature elements The connectvty graph s augmented wth data structures for each feature node contanng nformaton relevant to ther correspondng features, such as number of

58 ponts, average normal vector, average ntensty value. The edges of the graph also have correspondng data structures descrbng nformaton such as the number of ponts n the border, the connected features etc. The second number (n red) n every node descrbes the degree of the node. From the graph n Fgure 5.9 we determne that all the nodes except for node 3 have a low degree of 1 or 2. Node 3 however has a degree of 8. Also nodes 1, 10 and 4-9 have one boundary contour each, whereas node 2 has two boundary contours and node 3 has eght boundary contours. Node 3 has two boundary connectons wth nodes 2 and 10 and 6 dstnct border regons around the slots (one for each slot). If a node n the connectvty graph s of hgh degree or has a large number of boundary contours, such as node 3 n Fgure 5.9, then further decomposton s performed on the feature correspondng to the node. For example, the grp body of the screwdrver can be decomposed nto smaller regons of a reduced degree wth less boundary contours (Fgure 5.11). Ths results n more feasble sold modelng steps for the reconstructon of the pont cloud. slots (#4-9) connectng surfaces (#10-15) base of grp (#3) Fgure 5.11 Decomposton of the grp body of the handle Specfcally, the grp body s dvded nto the base of the grp, the sx slots and sx ntermedate connectng surfaces whch surround the slots. The correspondng feature connectvty graph s as follows:

59 4 2 2 2 2 2 2 5 6 7 8 9 1 1 2 7 2 3 16 6 10 11 12 13 14 6 6 6 6 6 15 6 Fgure 5.12 The feature connectvty graph after decomposton of node #3 Each feature entty n ths graph contans one or two at the most contnuous border contours. Specfcally, the nodes 1, 4-9, 10-15 and 16 have one boundary contour each, whereas nodes 2 and 3 have 2 boundary contours. Also the hghest degree of a node s seven, n contrast to the prevous graph where the hghest degree was eght. Therefore, the hghest degree of the nodes and the number of boundary contours per node has been reduced. screwdrver handle Shaft (1) Base surface (2) Grp body Top surface (11) Bottom half of grp (3) top half of grp Slots (# = 6) (4 9) Connectng surfaces (#10-15) Fgure 5.13 Feature decomposton tree of the screwdrver after further decomposton of the handle grp body

60 5.4. Parameter defnton and edtablty The major advantage of feature based modelng s that by defnng parameters on the features, the user-desgner can more easly and effcently modfy the specfc feature wthout necessarly affectng the rest of the sold model. Whle a feature s a physcal entty that makes up the physcal part, an attrbute (property) s a characterstc or a qualty of a feature [71]. The parameters (attrbutes) defned on a feature may refer to a number of thngs. Some attrbutes may refer to the geometry or topology of the feature shape, ts dmensons, locaton, orentaton and constructon method. Attrbutes may even descrbe propertes such as materal or texture of the feature. Usually parameter defnton s accompaned by the defnton of constrants to whch the model must conform. We look to defne parameters and constrants on our features that determne the man functonalty and behavour of the features n the model,.e. dmenson lmtatons, basc connectvty, to provde basc edtng capabltes. 5.4.1. Parameter defnton The parameters and constrants we defne on our reconstructed features refer to the: Poston and algnment n the pont cloud Neghbour connectvty Constructon method Poston and algnment The poston of all the features n a pont cloud A can prmarly be defned n reference to the center of mass of the whole pont cloud cm(a). The OBB of a pont cloud A s calculated, provdng the prncpal axes and the center of mass cm(a). For each feature f n the pont cloud that s reconstructed we defne: - the dstance of the center of mass of f from cm(a), d(cm(f ),cm(a)) - the algnment of the feature n reference to A. We compute the angle formed by the normal vectors of the planes passng through the mddle of the boundng boxes that contan the prncpal axes. - the sze of the feature can be defned by the sze of the OBB

61 Neghbour connectvty For each feature we defne parameters that refer to the neghbors of the feature and ther pont of connectvty. Specfcally for each feature and ts neghbor f j we defne - the dstance d(cm(f ), cm(f j )) - the boundary curve of f that connects wth neghbor f j Constructon Method Each sold modelng technque requres ts own set of parameters that defne how the functon s performed. Specfcally we defne: - Translatonal sweepng: profle curve and the trajectory curve. - Rotatonal sweepng: profle curve and the axs of rotaton. - Sknnng: network of cross-secton curves used for sknnng - Coverng: boundary curve and any gude prmtves used (.e. ponts, other curves) 5.4.2. Edtablty By defnng parameters on our features, we provde the capablty of edtng the feature. Changng a parameter of a feature means that the model has to be reevaluated and reconstructed to conform to the new parameter values. Dependng on the parameter that s changed, the new feature model may be slghtly or completely dfferent from ts prevous state. For example, f one of the ntermedate curves used n sknnng a feature s made larger, then the resultng model wll be dfferent from ts prevous nstant. However, f the gude curve s changed dramatcally,.e. the shape of the curve changes, then the edted model wll be very dfferent. Edtng functons are closely lnked to constrant defnton. Most often, parameter values should be constraned wth upper and/or lower bounds, so as to make sure that the model s desgn ntent and functonalty s not compromsed. Suppose we change the length parameter value of the screwdrver shaft. If ths parameter s left unconstraned, then a value may be provded that makes the shaft too long to be of any practcal use. Therefore, n cases lke ths, the parameter values must be bounded.

62 Inter-feature constrants are defned to prevent nconsstent neghborng components. For example, the shaft of the screwdrver connects wth the bottom surface of the handle. If the dameter of the shaft s modfed (scaled up or down), then the boundary hole of the handle bottom has to be modfed approprately, so that the model s accurate. Also, nter-feature constrants such as parallelsm and perpendcularty ad the reconstructon process by settng standards that may overcome nose problems or anomales that may exst n the pont cloud. Intra-feature constrants are used to defne and change the morphology of the feature. Constrants are defned on parameters such as the length between cross sectons (.e. for sknnng), the dmenson of the feature, the trajectory path used for sknnng and sweepng and any other propertes that contrbute to the resultng constructed model. Also constrants can be appled to the ponts used to reconstruct contours to allow more dffcult modfcatons, such as skewng. 5.5. Persstent namng When edtng parametrc feature based models there are some ssues that can emerge that concern the robustness and correctness of the modelng process and ts result. An nterestng problem that can arse durng parametrc modelng s that of persstent namng. Persstent namng concerns the characterzaton of geometrc and topologcal enttes of a parametrc model so that they can be dentfed at any tme of the redesgn process. The enttes of a parametrc model may be modfed and re-evaluated at any tme n the desgn process. It s mportant that every modfcaton or re-evaluaton s performed on the correct nstant of an entty. So persstent namng refers to namng the enttes n such a way that reevaluaton of the model leads to correct and consstent results. An nsghtful state of the art survey s provded by [60], whch presents varous approaches to the persstent namng problem. An example of the persstent namng problem s provded n fgure 5.12. Specfcally, an ntal model s constructed by sweepng. A horzontal slot s created on F1 resultng n two feature regon f2 and f3. A roundng functon s appled to edge e of feature f3. When reevaluatng the model, a horzontal slot s created n such a way that edge e bascally

63 now corresponds to edges e1 and e2. Therefore, n some way, edge e has to be mapped to edges e1 and e2 so that roundng can be performed on both edges. Fgure 5.14 An example of the persstent namng problem [60]. Work on ths problem has been done by [19, 41], who provde a scheme for storng feature nformaton regardng topology and geometry (E-rep) and matchng the nformaton effcently to deal wth the namng ssue. A mappng technque usng topologcal ds for topologcal enttes n a parametrc model s suggested by [50]. [1] presents a namng scheme to dentfy enttes used n parametrc modelng by apprehendng desgn ntent. In [67] persstent namng s examned n reference to boundary representaton deformaton n solds.

64 CHAPTER 6. EXAMPLES 6.1 Feature Detecton and Extracton 6.2 Contour Reconstructon 6.3 Feature Reconstructon In ths chapter we wll present a few examples from the mplementaton of our dfferent approaches. 6.1. Feature detecton and extracton examples In ths secton we wll present examples of applyng our feature detecton and extracton algorthm on dfferent pont clouds [2, 12, 23, 77]. The algorthms for pont concavty ntensty computaton and regon growng have been mplemented and tested under the Mcrosoft Vsual C++ programmng envronment usng ACIS R18 sold modelng lbrares by Spatal. The GUI of the applcaton has been mplemented usng HOOPS 16.20. - Example A We apply our feature detecton and extracton algorthm on a pont cloud of a monkey contanng 2807 ponts. Regon growng detects approxmately 12 regons: Head body 2 regons for each ear (nner and outer areas) Brow area (2-3 regons) Eyes Nose Mouth-chn area

65 Mouth Fgure 6.1 (top left) A pont cloud of a monkey, (top rght) the pont concavty ntensty map, (bottom) the features detected by regon growng. - Example B Our algorthm s performed on a pont cloud of a duck consstng of 965 ponts. Sx regons are detected: Head Upper part of the beak, Lower part of the beak, Body, Surface under the body and

66 a crcular regon on the model s bottom surface Fgure 6.2 (top left) The pont cloud of a duck, (top rght) the concavty ntensty map for the correspondng pont cloud, (bottom) the regons detected by regon growng. 6.2. Contour Reconstructon The contour reconstructon approach s mplemented and tested usng Maple 11. Ths method has been tested n 2D and 3D. -Example A Suppose we have a cross-secton from the screwdrver shaft derved by slcng the regon wth a plane. We reconstruct curves that best ft the ponts on the plane. For the

67 means of ths example, we choose a small angle for cuttng the pont cloud nto curve segments and retreve four curve segments. We perform approxmaton on each curve segment and retreve the results summarzed n table 6.1. Fgure 6.3 Curve approxmaton performed on the frst curve segment Fgure 6.4 Curve approxmaton performed on the second curve segment

68 Curve segment # of ponts Dstance between # of Average error E/m end ponts teratons #1 7 0.0029348555 8.573 10-9 1 #2 7 0.002959652851 2.336 10-9 1 #3 6 0.002539316640 8.618 10-10 1 #4 6 0.003147043215 1.1816 10-8 1 Table 6.1 The results of contour reconstructon Fgure 6.5 (left) The pont cloud to be approxmated (rght) the reconstructed contour From ths table of results we observe that curve approxmaton works extremely well when the scanned data s not nosy. Approxmaton on all curve segments s reached n only one teraton and the average error s very small. The fnal reconstructed curve s shown n Fgure 6.5. The reconstructed contour s smooth and approxmates almost all of the sample ponts. 6.3. Feature Reconstructon Feature reconstructon s mplemented and tested under the Mcrosoft Vsual C++ programmng envronment usng ACIS R18 sold modelng lbrares by Spatal. The GUI of the applcaton has been mplemented usng HOOPS 16.20.

69 - Example The feature regon correspondng to the top of the screwdrver s farly flat and spread out. Reconstructon of ths feature s best carred out wth coverng, snce t s smple to ft a surface to ths feature. We frst reconstruct the boundary curve of the feature regon. Usng ths curve, we also slce the top of pont cloud wth a plane parallel to the boundary of the feature to obtan some ponts on the tp of the regon. Fgure 6.6 The top surface of the screwdrver We perform coverng usng the ponts at the top as gudes for the ftted surface. The resultng feature s shown s Fgure 6.4. Fgure 6.7 (left) The feature pont cloud and ts ftted surface and (rght) the surface obtaned by coverng

70 CHAPTER 7. EXTENSIONS OF OUR APPROACH 7.1 Custom Desgn and redesgn functonalty 7.2 Specal Applcatons In ths work we have presented a reverse engneerng scheme that detects and extracts features from a pont cloud, reconstructs the boundares of each feature regon by fttng the borders wth smooth pecewse ratonal curves and reconstructs the features usng sold modelng functons to obtan parameterzed, edtable models. In ths chapter we examne how ths framework can be extended or adapted so that t can be appled to more advanced or specalzed applcatons. 7.1. Custom desgn and redesgn functonalty As descrbed n a prevous chapter, by usng features and defnng ther parameters we obtan edtable CAD models. We can acheve even hgher levels of edtablty and flexblty f we combne the basc parameter and constrant defnton wth more local and global constrants. Local or global constrants are mposed on a model to enforce complex geometrc structures and advanced functonalty. Such constrants may be part of a feature or span a number of dfferent features. By applyng a system of constrants on a model and ts features we can support custom desgn on a hgher level, provdng the capablty to extract ndvdual features from a model or a set of features and use them n the desgn process of a dfferent model or for the redesgnng of the current model.

71 7.1.1. Constrant defnton The constrants that we defne on our features refer to dstance, ncdence, angle, parallelsm, and perpendcularty. The prmtves we defne these constrants on are ponts, lnes and planes. We use p to represent a pont wth coordnates (x,y,z ) and l to represent a lne. We use Pl to refer to a plane defned by ts normal vector n and a pont on the plane. A plane can also be defned by the equaton: ax + by + cz + d = 0 - Angle constrants The angle a formed between two lnes s calculated based on the dot product of the unt vectors t and t j of the lnes: cos a = t t cos a = t t + t t + t j If the angle formed s 0 degrees, then the two lnes are parallel, whereas f the angle s 90 degrees, then they are perpendcular. x x j y y j z t z j In the case of the angle between two planes, we use the dot product of the normal vectors of the correspondng planes. cos a = n n cos a = n n + n n + n j If the dot product s 1 then the planes are parallel, whereas f t s 0, then the planes are perpendcular. Any other value provdes the angle formed by the two planes. To determne the relatonshp between two features n the CAD model, we use the normal vectors of the planes that pass through the centers of the features correspondng boundng boxes and contan the two prncpal axes. x x j y y j z n z j To determne the angle formed by a lne and a plane, we use the unt vector of the lne and the normal vector of the plane cos a = t n cos a = t n + t n + t j x x j y y j z n z j - Dstance constrants The dstance between two ponts p (x,y,z ) and p j (x,y,z ) s determned by: d 2 = 2 2 ( x x j ) + ( y y j ) + ( z z j ) 2

72 The dstance between two lnes s useful when they are parallel. Ther dstance can be evaluated by pckng a pont p j on one of the lnes and calculatng the dstance from the other lne so that the dot product of the dstance vector and the lne s 0. d j l = 0 Ths approach can be used also for pont lne dstance evaluaton. The dstance between two planes can be computed when two planes are parallel. A pont p(x j,y j,z j ) on one of the planes (.e. the orgn of the plane) can be used to determne the dstance from the other. d( p, Pl ) = ax j + by a 2 j + b + cz 2 j + c + d 2 Ths formula can be used n general for pont-plane dstance computaton. The dstance between a lne and a plane can be determned by pckng a pont p j on the lne such that ts dstance from the plane Pl s d. Incdence constrants are used to place prmtves on prmtves and are appled by settng the dstance of the one prmtve to the other as 0. These constrants are appled on ponts, planes derved from the boundng boxes of features, as well as edges (lnes) belongng to these planes or from paths. They are used to defne the relatonshp between features of the cloud. For example, f two features are parallel then the planes passng through ther correspondng boundng boxes wll be parallel. Another example s two planes located at an angle, however edges belongng to the planes are parallel. 7.1.2. Geometrc Constrant Solvng We assume that the system of constrants that were defned can be solved usng an exstng constrant problem solvng method. A number of approaches have been

73 suggested for solvng constrant systems and we wll brefly refer to the method characterstcs [34]. Numercal Constrant Solvers In numercal constrant solvers, the constrants are translated nto a system of algebrac equatons and are solved usng teratve methods. To handle the exponental number of solutons and the large number of parameters, teratve methods requre sharp ntal guesses. Also, most teratve methods have dffcultes handlng overconstraned or underconstraned nstances. The advantage of these methods s that they have the potental to solve large nonlnear system that may not be solvable usng any of the other methods. All exstng solvers more or less swtch to teratve methods when the gven confguraton s not solvable by the natve method. Ths fact emphaszes the need for further research n the area of numercal constrant solvng. Sketchpad [81] was the frst system to use the method of relaxaton as an alternatve to propagaton. Relaxaton s a slow but qute general method. The Newton-Raphson method has been used n varous systems [63, 70], and t proved to be faster than relaxaton but t has the problem that t may not converge or t may converge to an unwanted soluton after a chaotc behavor. For that reason, Juno [63] uses as ntal state the sketch nteractvely drafted by the user. However, Newton-Raphson s so senstve to the ntal guess [8], that the sketch drafted must almost satsfy all constrants pror to constrant solvng. A sophstcated use of the Newton-Raphson method was developed n [59], where an mproved way for fndng the nverse Jacoban matrx s presented. Furthermore, the dea of dvdng the matrx of constrants nto submatrces as presented n the same work has the potental of provdng the user wth useful nformaton regardng the constrant structure of the sketch. Though ths nformaton s usually quanttatve and nonspecfc, t may help the user n basc modfcatons. To check whether a constrant problem s wellconstraned, Chyz [21] proposes a preprocessng phase where the graph of constrants s analyzed to check whether a necessary condton s satsfed. The method s however qute expensve n tme and t cannot detect all the cases of sngularty. An alternatve method to Newton-Raphson for geometrc constrant solvng s homotopy or contnuaton [4], that s argued n [51] to be more satsfactory n typcal stuatons

74 where Newton-Raphson fals. Homotopy, s global, exhaustve and thus slow when compared to the local and fast Newton's method [62], however t may be more approprate for CAD/CAM systems when constructve methods fal, snce t may return all solutons f desgned carefully. Constructve Constrant Solvers Ths class of constrant solvers s based on the fact that most confguratons n an engneerng drawng are solvable by ruler, compass and protractor or usng other less classcal repertores of constructon steps. In these methods the constrants are satsfed n a constructve fashon, whch makes the constrant solvng process natural for the user and sutable for nteractve debuggng. There are two man approaches n ths drecton: Rule-constructve solvers and graph-constructve solvers. Rule-constructve solvers use rewrte rules for the dscovery and executon of the constructon steps. In ths approach, complex constrants can be easly handled, and extensons to the scope of the method are straghtforward to ncorporate [17]. Although t s a good approach for prototypng and expermentaton, the extensve computatons nvolved n the exhaustve searchng and matchng make t napproprate for real world applcatons. A method that guarantees termnaton, ruler and compass completeness and unqueness usng the Knuth-Bendx crtcal par algorthm s presented n ([15], [74]). Ths method can be proved to confrm theorems that are provable under a gven system of axoms [16]. A system based on ths method was mplemented n Prolog. Aldefeld n [3] uses a forward channg nference mechansm, where the noton of drecton of lnes s mposed by ntroducng addtonal rules, and thus restrctng the soluton space. A smlar method s presented n [82], where handlng of overconstraned and underconstraned problems s gven specal consderaton. Sunde n [80] uses a rule-constructve method but adopts dfferent rules for representng drected and nondrected dstances, gvng flexblty for dealng wth the soluton selecton problem. In [96], the problem of nonunque solutons s handled by mposng a topologcal order on three geometrc objects. An elaborate descrpton of a complete set of rules for 2D geometrc constrant solvng can be found n [90]. In ther

75 work, the scope of the partcular set of rules s characterzed. [48] presents an extenson of the set of rules of [90], and provdes a correctness proof based on the technques of [35]. The graph-constructve approach has two phases. Durng the frst phase the graph of constrants s analyzed and a sequence of constructon steps s derved. Durng the second phase these constructon steps are followed to place the geometrc elements. These approaches are fast and more methodcal. In addton, conclusons characterzng the scope of the method can be easly derved. A major drawback s that as the repertore of constrants ncreases the graph-analyss algorthm needs to be modfed. Ftzgerald [32] follows the method of dmensoned trees ntroduced by Requcha [69]. Ths method allows only horzontal and vertcal dstances and t s useful for smple engneerng drawngs. Todd n [86] frst generalzed the dmenson trees of Requcha. Owen n [64] presents an extenson of ths prncple that ncludes crcularly dmensoned sketches. DCM [24] s a system that uses some extenson of Owen's method. [36] presents an elaboratve graph-constructve method, wth fast analyss and constructon algorthms, and extensons for handlng classes of nonsolvable, underconstraned and consstently overconstraned confguraton Propagaton Methods Propagaton methods follow the approach met n tradtonal constrant solvng systems. In ths approach, the constrants are frst translated nto a system of equatons nvolvng varables and constants. The equatons are then represented by an undrected graph whch has as nodes the equatons, the varables and the constants, and whose edges represent whether a varable or a constant appears n an equaton. Subsequently, we try to drect the graph so as to satsfy all the equatons startng from the constants. To accomplsh ths, varous propagaton technques have been used but none of them guarantees to derve a soluton and at the same tme have a reasonable worst case runnng tme. A revew of these methods s provded n [74]. In a sense, the constructve constrant solvers can be thought of as a sub case of the propagaton method (fxed geometrc elements for constants and varable geometrc elements for

76 varables). However, constructve constrant solvers utlze doman specfc nformaton to derve more powerful and effcent algorthms. Symbolc Constrant Solvers In symbolc solvers, the constrants are transformed to a system of algebrac equatons whch s solved usng methods from algebrac manpulaton, such as Grobner bass calculaton [18] or Wu's method[95]. Although, these methods are nterestng from a theoretcal vewpont, ther practcal sgnfcance s lmted, snce ther tme and space complexty s typcally exponental or even hyperexponental. Herarchcal and hybrd approaches A major result n analyss of constrant graphs by [42] n whch an effcent method for detectng dense constrant subgraphs s descrbed has enabled the soluton of large systems of geometrc constrants n 2, 3 or more dmensons. By usng ths result we can buld effcent algorthm for solvng arbtrary systems of geometrc constrants. We frst fnd a set of mnmal dsjont dense constrant subgraphs. Each subgraph s then reduced n a supernode of hgh dmenson and the method s appled recursvely to the resultng graph. In ths way we buld a herarchy of constrant graphs that s treated bottom up or top down based on the applcaton. Interfeature 3D constrants result n systems of 3D constrants. Such systems are very hard to solve wth graph constructve methods snce there s not even a necessary and suffcent condton for well-constranedness n 3D. By usng the decomposton suggested by ths approach we may breakdown the large geometrc constrant system n a multtude of small systems wth few varables. Such systems are usually easy to solve usng global optmzaton wth topologcal constrants to narrow down the root selecton process. In our system we have used a varaton of the algorthm descrbed n [41] n conjuncton wth varous optmzaton technques for solvng effcently the dense subsystems detected. We have also employed the ACIS constrant management tools.

77 7.2. Specal applcatons The framework suggested n ths work can be extended and appled to applcatons wth a more specfc focus. An example of such an applcaton s the re-engneerng of jewellery, and more specfcally, the reconstructon of tradtonal perced Byzantne jewellery [75, 76]. 7.2.1. Perced Byzantne Jewellery Perced Byzantne jewellery are jewellery of a partcular craftsmanshp. The technque used to create them s a very sophstcated form of craftsmanshp, as are the desgns featured on them, and ths technque has faded over the years. They are gold jewels wth perced desgns that were made along the coastlnes of the eastern Medterranean Sea durng the perod 3rd 7th century A.D. Ther orgnalty s due to the partcular processng technque that s used for ther creaton resultng n a specal aesthetc effect. Perced jewellery was created from thn sheets of gold. The desgns were engraved on these sheets of gold wth a thn sharp tool. After the outlnng of the desgns, holes followng ther shape were created and these were decorated wth trangular carvngs, usng an ron chsel. Fgure 7.1 Usng a chsel to create carvngs around a hole. The percng technque was appled to varous types of jewellery, such as necklaces, earrngs, rngs and bracelets. Ths technque was also used to create perced crowns, pns used for holdng tuncs, belts and brooches. Jewellery such as earrngs and pendants on the necklaces were usually shaped as rectangles, crcles, hexagons, half moons (lunes) and teardrops. Many peces of jewellery were decorated wth sparselyplaced sold beads, or wth a beadlke sequence wrapped around the pece of jewellery.

78 The desgns used n Byzantne jewellery were specfc. Usually, they were representatons of nature or of human lfe. Frequently used nature nspred themes were dfferent forms of brds, peacocks n partcular, anmals, especally dolphns, and plants, such as clovers and vne leaves. Many peces of jewellery represented scenes combnng nature and human. Byzantne jewellery had often representatons of letters or relgous symbols such as the cross. The letters used belonged ether to the Greek or Latn alphabet and gave a personal touch to the jewellery. Perced Byzantne jewellery s nterestng for many reasons. There s a lmted number of such jewellery preserved untl today. The technque used to create them s a very sophstcated form of craftsmanshp, as are the desgns featured on them, and ths technque has faded over the years. Furthermore, ther esthetc effect s unque. There are other technques that result n jewellery wth engraved desgns, but they dffer n the way that they are processed and the fnal aesthetc result. An example of such a technque s bradng plan or decoratve wre to create the lace-lke effect of perced jewellery. The dfference of the processng technque can be observed n the detals of the desgns and the back sde of the jewellery. When the jewellery s perced, the traces of the tool used for the percng are apparent, and the back sde of the jewellery s an ensemble of holes n a sold surroundng 7.2.2. An approach to desgnng perced jewellery usng feature elements In [75, 76] ByzantneCAD, a feature-based CAD system sutable for the desgn of perced Byzantne jewellery s presented. The system s automated and parametrc meanng that the user-desgner sets some parameter values and ByzantneCAD creates the jewellery model that corresponds to the specfed values. Ths provdes the desgner wth the ablty to rapdly create custom-desgned jewellery, based on the preferences of the customers, such as ncludng ther ntals on a rng. ByzantneCAD ntroduces a feature-based and voxel-based approach to desgnng jewellery, through the defnton of elementary structural elements (features) wth specfc attrbutes and propertes that are used as buldng blocks to construct complex perced desgns.

79 ByzantneCAD uses voxel-based feature elements as buldng blocks for creatng perced jewellery. Each feature has characterstcs that make t dffer from other features, for example, a through hole, a pocket, a component formng an angle etc. By changng the parameters of the feature we can modfy t to obtan an approprate pece accordng to the jewellery that s beng reconstructed. Each feature has a set of constrants that refer to ts morphology, dmensons and behavor, n reference to tself and to other features. The feature elements are confgured and combned usng Boolean operatons so as to create the CAD model (Fgure 7.2). (a) Fgure 7.2 (left) A perced voxel, (rght) a perced plate dsplayng the letter k created by combnng perced voxels In ByzantneCAD a feature lbrary of carved, perced feature elements s defned n accordance to the craftsmanshp used n tradtonal Byzantne jewellery. The desgn of perced jewellery s made up of cylndrcal holes that have carvngs around them. Each hole wth the correspondng carvngs around t s consdered for the purposes of reconstructon as a structural element (feature). Each feature s a sold made of a rectangular parallelepped wth a cylndrcal hole and the correspondng carvngs around the hole (Fgure 7.2). Accordng to the aesthetc rules that characterze tradtonal perced jewellery, all feature elements have the same sze but dffer n the poston of the hole and the carvngs around t. The hole can be located ether n the

80 center of the parallelepped or n the center of any of the four quarters. Note that, n terms of computer aded desgn and manufacturng, the cylndrcal hole can be postoned anywhere n the rectangular parallelepped; the above restrcton follows from careful nterpretaton of the tradtonal artstc patterns used. Attrbutes of these feature elements are characterstcs such as the number of carvngs around the cylndrcal hole, the poston of the hole n the parallelepped, the drectons of the carvngs and more. A large number of dfferent features can be created by a hole and varous carvngs and, snce not all of these feasble feature elements are vald for use n creatng perced desgns, restrctons concernng the carvng drectons are defned based on aesthetc and artstc rules. A set of valdty rules for features s defned, determnng the number of carvngs and ther drectons dependng on the poston of the hole n the voxel. For example, f the through hole s postoned n the center of the rectangular parallelepped then, each carvng starts from the hole and a carvng cannot be drected towards the hole. In the lbrary of desgns that has been developed for ByzantneCAD a subset of the set of features that satsfy the valdty rules s used. Some characterstcs of the feature elements that belong to the subset used n ByzantneCAD are a) the feature elements wth holes located n the center have at most 5 carvngs, and b) the feature elements wth the hole n one of the quadrants do not have more than 3 carvngs. Each perced desgn s a combnaton of features. Therefore, every desgn can be descrbed usng a layout descrpton fle, a fle where the nformaton needed to construct a specfc perced desgn s stored. Each desgn can be thought of as a twodmensonal matrx (Fgure 7.2) whose entres correspond to feature elements. The layout descrpton fle determnes the feature element that must be placed n each poston of the matrx. The layout descrpton fles of the letters of the Greek and Latn alphabet have been embedded n ByzantneCAD, along wth some characterstc desgns found n tradtonal Byzantne jewellery. It s possble for addtonal desgns to be used by the system, as long as ther layout descrpton fles are provded. The end-user can use an ordnary text edtor to construct such desgns by manually recordng the sequence of

81 features that form the desgn. In addton, the system provdes a user-nterface where the end-user can manually select vald feature elements and combne them to create new desgns. After a new desgn s created, the user needs to store the sequence as a smple text fle (the layout descrpton fle) and then ths fle can be mported to the ByzantneCAD lbrary to enhance the repertore of avalable perced desgns. A perced desgn s created by readng ts correspondng layout descrpton fle. Each tme the name of a feature s read, t s created, transformed (f necessary) and then translated to the proper locaton. The horzontal and vertcal translatons of the element are calculated usng the equatons: x = h l y = v k where x, y are the horzontal and vertcal translatons respectvely, h s the number of structural elements already placed horzontally n the current row, v s the number of structural elements already placed vertcally n the current column and l, k are the heght and length of the feature. The perced desgn on a pece of jewellery can be a sequence of ndvdual desgns. For nstance, the desgn may be a sequence of letters formng a word. In ths case, the process of creatng the plate representng the word s the same as for a sngle desgn. The layout descrpton fles of each ndvdual desgn are read n parallel and the plate s created row-wse (Fgure 7.3). Frst the frst lne of the frst letter s created, then the frst lne of the second letter s created and unoned wth the frst letter s frst lne and so on. Fgure 7.3 A complex sold plaque representng desgns,.e. letters or words, s szed and modfed approprately to construct custom-desgned jewellery (.e. rng).

82 Each tme a feature element s placed, t s unoned wth the prevous ones. Eventually, a perced plate representng the desgn s created. ByzantneCAD s capable of desgnng rngs, bracelets, necklaces and earrngs. The end-user of ByzantneCAD defnes the parameter values for the type of jewellery he would lke to create. These parameter refer to type (rng, necklace), sze, jewellery desgn, decoraton (beaded border) etc. Earrngs and necklaces are created n a number of dfferent shapes, and are decorated wth a beaded border (Fgure 7.4(a) ). Also, snce n tradtonal Byzantne jewellery there were peces n whch sold nonperced desgns were placed n a perced envronment, ByzantneCAD has the capablty of embeddng sold desgns n perced surroundngs (Fgure 7.4(b)). Fgure 7.4 (left) An earrng featurng the letter D, (rght) a necklace featurng a sold desgn and a perced desgn An algorthm for scalng perced patterns and desgns s provded to enlarge perced fgures wthout alterng the sze of the feature elements used to construct them. Havng ths capablty we may nclude, for nstance, dfferent font szes n the same desgn. A perced desgn s thought of as a 2-dmensonal matrx whose every entry contans a feature element. Respectvely, the scaled verson of a desgn s a larger 2- dmensonal matrx of features. The dea behnd the scalng method s to gradually scan the desgn row by row usng a sldng 2x2 wndow of feature elements, scale ndvdually the 2x2 wndows of the desgn and then ntegrate smoothly the scaled overlappng parts to create the scaled verson of the desgn. The combnatons of the features form dfferent desgns that can be categorzed accordngly.

83 Fgure 7.5 The letter B n ts (left) scaled and (rght) orgnal form The scalng that can be acheved s dscrete, because of the need to preserve symmetres that may exst n the orgnal desgn. For nstance, letter B (Fgure 7.5) s symmetrc by a horzontal axs that goes through the mddle of the desgn. A desgn s scaled by means of new rows and columns added to t. If we add only one new row to letter B, the letter becomes asymmetrc, because f the row s added to the upper half or the lower half of the desgn, then the letter s shape s altered unntutvely. Also f t s added n the mddle, the desgn becomes unproportonally thcker at the mddle and therefore ts orgnal shape s modfed. These restrctons are best expressed by the followng rules for scalng upwards: avod addng one row, or one column, and the number of rows and the number of columns must be nteger As a consequence of the frst rule we choose to perform dscrete scalng at a fxed factor. We choose a scale factor of 1.33 because t always results n addng two or more rows or columns. Therefore, from now on, we wll refer to levels of scalng and not to a scalng factor. Level 1 corresponds to scalng the desgn by a factor of 1.33, Level 2 corresponds to a scale factor of 1.66 and so on. A perced desgn s represented by a 2-dmensonal matrx whose entres correspond to feature elements. For nstance let us consder the Level 1 scalng of a letter of font sze 6 c. When scaled to Level 1 a desgn s transformed from a 6 c matrx to an 8 k matrx (8 s the closest nteger to 6 * 1.33= 7.98), where c and k are the number of columns of each matrx. The number of columns n the scaled desgn depends on the orgnal number and s calculated n the same manner.

84 Fgure 7.6 Dfferent scaled versons of the letter C We observe that whle scalng a desgn, as the desgn gets larger, there s a need for thckenng the engraved shape, so as to preserve ts orgnal form. In Fgure 7.6 we see an orgnal desgn of the C (rghtmost desgn), whch s scaled to two dfferent levels (Level 1: 8 rows and Level 2: 10 rows). There are two dfferent versons of Level 2 scalng. The crossed out verson of letter C s not vald, because there s a dstnct dfference n the font style, compared to the orgnal desgn. Therefore, the nteror shape n Level 2 has to be thckened. We defne as thckness factor T the rato: T = Number of rows n scaled desgn Number of rows n orgnal desgn In the ntal perced desgn, the sold area that forms the shape that s created by two feature elements corresponds to approxmately 90% of the whole area covered by the feature elements. Therefore the thckness factor s used n combnaton wth ths ntal thckness to determne the thckness that the scaled desgn must have. The thckness H of the scaled desgn s determned by the product of the ntal thckness H 0 = 0.9 and the thckness factor. The quantum of the thckness ncrease s 0.5. Thus the dscrete thckness H d s expressed by the followng equatons: H= H 0 T H d = round(2h)/2

85 For example, f the ntal desgn conssts of 6 rows and the second level scaled desgn conssts of 10 rows, then the product of the thckness factor (10/6) and the ntal thckness (0.9) s 1.5 whch s the thckness the scaled desgn must have. If H d = 1, the thckness of the curves nsde the desgn s not altered. If H d = 1.5 the thckness s ncreased by 50%, f H d = 2 the shape thckness s doubled (100% ncrease) and so on. The orgnal desgn s scanned usng a 2 2 wndow that starts scannng the desgn row-wse from the upper left corner. The desgn s scanned from left to rght, and from top to bottom. At each step the wndow s shfted to the rght by one poston, and when an entre row has been scanned, the wndow s ntalzed at the begnnng of the next row. Before scannng and scalng, datum postons are marked n the scaled desgn matrx. We consder the structural elements postoned at North, South, East, West, South- East, South-West, North-West and North-East as our datum ponts. These reference ponts are used for ensurng that symmetres are preserved and that the varous proportons of the shapes wthn the desgn are mantaned. Fgure 7.7 depcts the eght structural elements used as reference ponts. When the number of rows of the scaled desgn s even reference ponts E and W are duplcated. Respectvely, when the number of columns of the scaled desgn s even reference ponts N and S are duplcated. Fgure 7.7 Datum postons are marked n the scaled desgn matrx and O s the center of the coordnate system created by the datum axes

86 The scalng algorthm can be descrbed wth the followng steps: Step1: Every tme a wndow scan s performed, a combnaton of 4 feature elements s returned. Step 2: Ths combnaton s scaled ndvdually and placed approprately n the scaled desgn matrx. The scalng of the 2 2 block of features s determned by the followng prncples: The relatve poston of the block n the orgnal desgn should be mantaned n the scaled desgn. The datum ponts should be respected. If the block contans part of a curve of a shape the correspondng curve should be scaled approprately. The sze of the scaled combnaton s normally 3x3 for Level 1 scalng. However, accordng to the above prncples the sze of the scaled wndow may be reduced to 3x2 or 2x3 (one column or one row truncated), or 2x2 (one row and one column truncated). For the other levels of scalng, the sze of the scaled combnaton s determned proportonally (Fgure 7.8). Fgure 7.8 An example of (top) scalng a curve endng n a horzontal lne and (bottom) scalng a curve