Geometric Parametrization Andr´e Proen¸ca Var˜ao Nogueira Disserta¸ca˜o para obtenc¸˜ao do Grau de Mestre em Engenharia Inform´atica e de Computadores Ju´ri Presidente: Prof. Joaquim Armando Pires Jorge (IST/UTL) Orientador: Prof. Anto´nio Paulo Teles de Menezes Correia Leita˜o (IST/UTL) Vogal: Prof. Maria Luisa de Oliveira Gama Caldas (FA/UTL) Novembro 2009 Abstract While Computer Aided Design (CAD) is part of the daily routine of architects and engineers, its full potential has not been reached yet. In particular, it is very difficult for more complex designs to be completed using purely manual techniques. Through programming, CAD users could achieve design correctness, automation of tedious tasks, and a much higher degree of experimentation in their designs. Given that manually modifying a CAD model is a very cumbersome and time-consuming task, automat- ing those modifications would bring great increases in productivity. Even so, users are not embracing programming as an integral part of CAD software usage, and end up introducing errors and inconsisten- cies in their drawings. In this work we start by giving a brief overview of what is available in the CAD markettoday,andwhywebelieveitisnotenough. Wethendiscussthecreationofaconstraintsdefinition language and constraints satisfaction system for CAD software, aimed at the general CAD users. Stairs areusedasoneexampleofwhatcanbeautomatedwithsuchasystem,andtheimplementationofastair creation system is presented. After analyzing the system we have created we show that it satisfies our initial goals and that constraints systems are not only feasible but desirable. By producing only correct results and enabling a much higher degree of experimentation and code reuse architects and engineers are free to perform more important tasks and human error decreases. i ii Resumo Embora o Desenho Assistido por Computador (CAD) seja parte integrante da rotina de arquitectos e engenheirososeupotencialaindan˜aofoicompletamenteexplorado. Emparticular´ebastantetrabalhoso completar desenhos mais complexos utilizando t´ecnicas puramente manuais. Usando a programa¸c˜ao os utilizadores de CAD poderiam garantir a correcc¸˜ao dos seus desenhos, automatizar tarefas repetitivas, e fazer muito mais experimentac¸˜ao nos modelos que criam. Dado que modificar manualmente um modelo emCAD´eumatarefamorosa, aautoma¸c˜aodessasmodificac¸˜oestrariagrandesganhosdeprodutividade. Ainda assim os utilizadores n˜ao est˜ao a aceitar a programac¸˜ao como sendo parte integrante do uso de programas CAD, acabando por introduzir erros e inconsistˆencias nos seus desenhos. Neste trabalho come¸camos por analisar os sistemas dispon´ıveis no mercado de CAD actual e mostrar porque achamos que n˜ao s˜ao suficientes. Discutimos depois a cria¸c˜ao de um sistema de defini¸c˜ao e resoluc¸˜ao de restri¸c˜oes parasoftwareCADdestinadoaosutilizadoresdessesoftware. Asescadass˜aoutilizadascomoumexemplo de algo cuja criac¸˜ao pode ser automatizada, e´e apresentada em detalhe a implementac¸˜ao de um sistema que as cria com base num conjunto de restri¸c˜oes. Ap´os analisarmos o sistema que criamos mostramos que satisfaz os nossos objectivos e que um sistema de restri¸c˜oes n˜ao s´o ´e exequ´ıvel como desej´avel. Ao produzirapenasresultadoscorrectoseaopermitirummuitomaiorgraudeexperimenta¸c˜aoereutiliza¸c˜ao de c´odigo os arquitectos e engenheiros ficam livres para efectuar outras tarefas mais importantes ao mesmo tempo que o erro humano ´e diminu´ıdo. iii iv Keywords Palavras Chave Keywords Computer-Aided Design Constraints system Inequation system Stairs Palavras Chave Desenho Assistido por Computador Sistema de restric¸˜oes Sistema de inequa¸c˜oes Escadas v vi Contents 1 Introduction 1 2 Related work 5 2.1 Commercial software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.1 Autodesk AutoCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.2 Autodesk Revit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1.3 Bentley Generative Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.4 ArchiCAD and ArchiStair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.5 ICAD and CATIA KnowledgeWare . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.6 Genworks General-Purpose Declarative Language . . . . . . . . . . . . . . . . . . . 11 2.2 Research work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.1 Integrating Constraints with a Drawing CAD Application . . . . . . . . . . . . . . 12 2.2.2 Customizing Mass Housing: A Discursive Grammar for Siza’s Malagueira Houses . 13 2.2.3 Design Exploration through Bidirectional Modeling of Constraints . . . . . . . . . 14 2.2.4 Object Modeling and Proper Abstractions - The Case of Stair Design . . . . . . . 15 2.2.5 A constructive approach to calculate parameter ranges for systems of geometric constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3 Our proposal 19 3.1 The scope of our work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 The chosen methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.3 Our hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4 Stairs as a practical example 23 4.1 Defining a stair mathematically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.1.1 Straight flights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.1.2 High stairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.1.3 Spiral stairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.2 The implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.2.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.2.2 Finding a solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.2.3 Creation of the actual stair . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.3 Flexibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.4 The underlying software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.4.1 Mathematical software package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.4.2 3D software package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.5 Performance issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 vii 5 Work validation 39 6 Future work 43 7 Conclusion 45 viii
Description: