University of Bologna - Department of Mathematics Piazza di Porta S.Donato, 5 - 40127 - Bologna XCSurf: the 3D modeller User’s Guide - Version 4.0 G. Casciola Department of Mathematics University of Bologna Bologna 2006 Abstract This report describes the XCSurf package. This is a program for modelling free form 3D curves, tensor product surfaces and hierarchical tensor product surfaces, which is only based on NURBS (Non Uniform Rational B-Splines) and trimmed NURBS mathematics primitives. G. Casciola Department of Mathematics, University of Bologna, P.zza di Porta S.Donato 5, Bologna, Italy. E-mail: [email protected] xcsurf User’s Guide . . . Contents Contents i 1 What is XCSurf? 1.1 How to work with XCSurf . . . . . . . . . . . . . . . . . . . . 1.2 What to do with XCSurf . . . . . . . . . . . . . . . . . . . . . 2 Load Curves and Surfaces 2.1 Open button . . . . . . . 2.1.1 db File format . . 2.1.2 obj File format . . 2.1.3 dbe File format . . 2.1.4 cp File format . . 2.1.5 ip File format . . . 2.1.6 hie File format . . 2.2 Import button . . . . . . 2.3 New Cur button . . . . . 2.4 New Sur button . . . . . . 2.4.1 Usual button . . . 2.4.2 Revolution button 2.4.3 Skinning button . 2.4.4 By Mouse button . 2.4.5 Swinging button . 2.4.6 Extruding button . 2.4.7 Tubular button . . 2.4.8 Inbetween button . 2.4.9 Interpol. button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 3 5 5 6 6 6 6 6 8 8 8 9 9 9 10 10 11 11 12 12 12 3 Save Curves and Surfaces 13 3.1 Save button . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Export button . . . . . . . . . . . . . . . . . . . . . . . . . . 14 ii Contents 4 Params button 4.1 no. of steps textbox . . . . . . . 4.2 export uv texture checkbox . . . 4.3 keep cop checkbox . . . . . . . . 4.4 on line help checkbox . . . . . . . 4.5 display axes 1 checkbox . . . . . 4.6 display axes 2 checkbox . . . . . 4.7 3D Interactive Mode checkboxes 4.8 Render Prefs button . . . . . . . 4.9 Conf Win and Save Conf buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 15 15 16 16 16 16 16 16 17 5 Other buttons 5.1 Delete button . . . . . . 5.2 Copy button . . . . . . 5.3 Show button . . . . . . 5.4 Hide button . . . . . . . 5.5 Hide Oth. button . . . . 5.6 Show All button . . . . 5.7 Info button . . . . . . . 5.8 Grid U and V textboxes 5.9 Action buttons . . . . . 5.9.1 Edit button . . . 5.9.2 Rebuild button . 5.9.3 Detach button . 5.10 Trim button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 19 19 19 19 19 20 20 21 21 21 21 22 22 6 Modelling buttons 6.1 Numeric button . . . . . . . . . . . . . . . 6.2 Interactive button . . . . . . . . . . . . . 6.3 Hier. struct button . . . . . . . . . . . . . 6.3.1 Add and Remove Overlay buttons 6.3.2 View buttons . . . . . . . . . . . . 6.3.3 Other buttons . . . . . . . . . . . 6.3.4 Other simple information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 23 25 25 26 26 26 26 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 View cursors and buttons 29 7.1 Persp, Front, Side, Up and Default buttons . . . . . . . . . . 29 7.2 Render, Control Net and Both checkpoints . . . . . . . . . . 29 7.3 CP & Obj button . . . . . . . . . . . . . . . . . . . . . . . . . 29 8 Data file formats 31 8.1 3D NURBS curve . . . . . . . . . . . . . . . . . . . . . . . . . 31 8.2 List of curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 8.3 3D NURBS surface . . . . . . . . . . . . . . . . . . . . . . . . 32 LIST OF FIGURES 8.4 8.5 8.6 8.7 8.8 8.9 8.10 3D trimmed NURBS surface . . . . . . . List of surfaces . . . . . . . . . . . . . . 3D control points . . . . . . . . . . . . . 3D points . . . . . . . . . . . . . . . . . Hierarchical surface . . . . . . . . . . . . IGES entity no.126 and no.128 (NURBS OBJ WaveFront standard mesh format . iii . . . . . . . . . . . . 33 . . . . . . . . . . . . 34 . . . . . . . . . . . . 34 . . . . . . . . . . . . 35 . . . . . . . . . . . . 35 curves and surfaces) 35 . . . . . . . . . . . . 36 List of Figures 37 Bibliography 39 xcsurf User’s Guide . . . Chapter 1 What is XCSurf? XCSurf is the 3D modeller of the xcmodel system [XCMODEL00]. This program is self-contained and executable from the xcmodel console window. It is distributed with the archive xcsurfdev.tar.gz (development version) and xcsurfusr.tar.gz (executable version). Downloading and installation instructions are in [XCMODEL00]. XCSurf is a system based on NURBS and trimmed NURBS mathematics primitives for modelling 3D curves and tensor product surfaces (for an introduction see [PITI95]). This interactive graphics system was principally designed to provide a development environment for the experimentation of methods, algorithms and techniques in the sector of modelling free form curves and surfaces. XCSurf is very different from other commercial system. It only deals with the geometric modelling aspect, leaving solid object construction, using trimming surfaces and boundary representation, to xcbool system [XCBOOL00]. XCSurf also provides a learning environment for the fundamental aspects of NURBS curves and surfaces and, more generally, for modelling techniques. The code is written in ANSI C language and can be executed on various types of workstation or PC running a Unix operating system with Xwindow. In order to make the system portable, it was decided to use a Graphic User Interface made with xtools library [XTOOLS00], provided with this package. 1.1 How to work with XCSurf When XCSurf starts, it opens seven windows (see figure 1.1): • Curve/Surface: in which the curves and surfaces loaded into the system can be viewed. • Control Net: in which the surface control nets are viewed. 2 How to work with XCSurf • Up, Side, Front, Persp: the four fundamental views. • Main Menu: in which four control areas (Object Box on the left, Camera Control on the right, General Control up and Active Object Control down) and the button to quit the program are viewed. The user can vary the position and sizes of the Curve/Surface and Control Net windows, within the limits defined by the program, for a suitable visualization of the windows in the screen. As in any interactive graphics Figure 1.1: XCSurf environment system, XCSurf uses the keyboard and the mouse. In the text we use the expression ”click on something with the LMB” (Left Mouse Button) or ”the CMB” (Centre Mouse Button) or ”the RMB” (Right Mouse Button), when the user places the mouse pointer on something on the screen and presses and releases (to click) a mouse button. In order to begin, the user has to click on a Main Menu button with the LMB; it is then clear which buttons are active. In fact, XCSurf uses a black label on an enabled button and a white one on a disactivated button. The same convention is used for all the XCSurf menus. The XCSurf menu windows always contain the Cancel/Close button or both the Cancel and the Ok buttons. When only the Cancel button is What is XCSurf? 3 available (usually in windows only containing buttons) pressing on it closes the related menu window. If both buttons are available (usually in windows containing checkboxes, checkpoints, textboxes, etc.) the Ok button activates the set parameters, while the Cancel button does not able them and closes these windows. Note that there is an online help that can be activated in the Params menu window, and that guides the user, step by step, in his/her actions. 1.2 What to do with XCSurf XCSurf serves to model and examine common and free form 3D NURBS curves and surfaces (also named objects). In XCSurf a curve is considered a degenerated surface, that is, the two dimensional parametric domain [0, 1] × [0, 1] degenerates into a one dimensional domain [0, 1] × [0, 0] ≡ [0, 1]. Everything that XCSurf allows you to do to a surface will therefore also be possible for a curve. In the following sections we refer to a surface even when we mean a degenerated surface or, for the above consideration, a curve. Any special case will be underlined. After starting, the first and only thing the program allows you to do is to load an object (a single surface, a list of surfaces or a hierarchical surface) Loading an object in the system means creating a new object (New Cur and New Sur Buttons) or opening an object file (Open or Import Buttons) previously created and saved, and storing it in the system memory. All the stored surfaces are iconised in the Object TextBox in the Main Menu and viewable in the Curve/Surface window (see figure 1.1). When an object has been loaded, all the buttons in the Main Menu window, are enabled, so it is possible to save it in a file (Save or Export Buttons), delete one or all the surfaces from the system memory (Delete Button), make a copy of an object (Copy Button), or set a large number of parameters (Params Button) to manage the system and viewing mode (Camera Control on the right). With the Numeric or Interactive buttons, which will later be described in detail, it is possible to model, examine and do a lot of things on a single surface or a list of surfaces selected from those already loaded. These are the environments in which we can numerically or interactively model the surface shape. In the same environment it is also possible to position a surface with respect to the others, so that they describe the boundary of an object. This is not a solid modelling tool, but only an opportunity to position some surfaces appropriately in the 3D space (see figure 1.1). With the Hier. struct button, which will later be described in detail, it is possible to model, examine and do a lot of things on a single hierarchical or 4 What to do with XCSurf non-hierarchical surface from those already loaded. xcsurf User’s Guide . . . Chapter 2 Load Curves and Surfaces This section explains the user can load a surface or list of surfaces into the system memory. Remember that XCSurf manages a curve like a degenerated surface. 2.1 Open button It opens the window shown in fig. 2.1. These checkpoints allow the user Figure 2.1: Open menu window to choose to load 2D or 3D curves and surfaces. If a 2D curve is chosen, it will appear in the 3D space on a plane parallel to one of the three planes of co-ordinates (XY, XZ or YZ). In order to choose this plane, select the checkpoint corresponding to one of the planes of co-ordinates (constant in 6 Open button Z for XY, constant in Y for XZ or constant in X for YZ) and the value of the constant by giving it in the textbox. 2.1.1 db File format The system opens the file request allowing the user to select a .db extension file, contained in the xcmodel/curves2d, in the xcmodel/curves3d directory or the xcmodel/surfaces, depending on the selected checkpoint. The xcmodel/curves2d directory contains the 2D curves previously modelled and saved using xccurv (see [XCCURV00]). The xcmodel/curves3d directory contains the 3D curves previously modelled and saved using XCSurf. The xcmodel/surfaces directory contains the surfaces previously modelled and saved using XCSurf. 2.1.2 obj File format The system opens the file request allowing the user to select an .obj extension file, contained in the xcmodel/curves3d or in the xcmodel/surfaces directory and containing a list of the file names of the 3D curves or surfaces previously saved with XCSurf. 2.1.3 dbe File format This opens the file request allowing the user to select a file with a .dbe extension contained in the xcmodel/surfaces directory and containing a trimmed surface previously saved with XCSurf. 2.1.4 cp File format This button allows the user to create a new surface by loading a file of control points. A file request opens, allowing the user to select a file with a .cp extension contained in the xcmodel/surfaces directory and containing the control net. The window in fig.2.2 then opens, in which the user can specify the remaining parameters in order to define the surface completely (see By mouse button section too). 2.1.5 ip File format This option allows the user to create a new surface by interpolating a 3D point mesh stored in a file. This opens the file request allowing the user the select a file with a .ip extension contained in the xcmodel/surfaces directory. This then opens a menu window from which to choose a method of interpolation; see fig.2.3. This XCSurf release provides the following interpolation methods. Load Curves and Surfaces 7 Figure 2.2: New surface parameter window Figure 2.3: Interpolation methods window • Bicubic interpolation (degree (3, 3) a not a knot interval partition and a free choice of type of parametrization); 8 New Cur button • Bicubic interpolation with derivatives at the end points (degree (3, 3) and a free choice of type of parametrization); • Bicubic and periodic interpolation (degree (3, 3) and a free choice of type of parametrization); • Local rational bicubic C 1 interpolation (degree (3, 3) and a free choice of type of parametrization and local/global weights); • Local rational bicubic C 2 interpolation (degree (3, 3) and a free choice of type of parametrization and local/global weights); • Lagrange interpolation (free choice of degrees and type of parametrization). 2.1.6 hie File format The system opens the file request allowing the user to select an .hie extension file, contained in the xcmodel/surfaces directory and containing a hierarchical surface previously saved with XCSurf. 2.2 Import button This button allows the user to load a file in IGES standard format (see Data file format section) containing a set of NURBS 2D or 3D curves and surfaces, (IGES entity no.126 and no.128i only). 2.3 New Cur button This button allows the user to create a new 2D or 3D curve (depending on the selected checkpoint) by specifying the control points interactively in the Control Net window by mouse. For 2D curve, this is simply done with the LMB to add and the RMB to stop. If the curve to be inserted is 3D, the control points must be inserted in two steps: • first give the projection of the control points on the XY plane in the correct order, by clicking with the LMB; • then give the Z co-ordinates for the control points in the correct order, by clicking with the LMB. These two steps are guided by XCSurf. Once the control points have been inserted, the New Curve menu window opens (see fig.2.4), in which the following parameters must be defined: the curve degree, the knot partition choice between automatic (the internal knots are equally spaced, while the external ones are set to coincide with the Load Curves and Surfaces 9 Figure 2.4: New Curve parameter window end interval points) and manual (the internal knots are explicitly marked by the user in a textbox window, while the external ones are set to coincide with the end interval points). The user must choose whether the curve will be open or closed (in the latter case XCSurf manages the given control points in order to define a closed and periodic curve). When all the parameters have been set, the user presses the Ok button which closes the curve creation and loading procedure. By clicking on the Cancel button it is possible to cancel the curve creation and loading. 2.4 New Sur button This button allows the user to load a surface or a list of surfaces into the system memory. It opens the window shown in fig.2.5 2.4.1 Usual button This opens the menu window shown in fig.2.6 in which the user can select a surface type. 2.4.2 Revolution button This option allows the user to create a revolve surface starting from a profile curve. Only the curve icons are shown in the Revolution window and the user has to choose one by clicking on it with the LMB and confirm with the OK button. 10 New Sur button Figure 2.5: Load Surface menu window Figure 2.6: Usual surfaces menu window 2.4.3 Skinning button This option allows the user to create a surface by skinning, that is, by curve interpolation. Only the curve icons are shown in the Skinning window (see fig.2.7 and the user has to choose the curves in the order in which he/she wishes them to appear; click on them with the LMB and transfer it with the arrow button; the other buttons allow the user to modify the own choices. 2.4.4 By Mouse button This option allows the user to load a new surface by giving the control net interactively with the mouse and then defining the remaining parameters. The control points should be inserted in two stages: • specify the projection of the control points on the XY plane; the net Load Curves and Surfaces 11 Figure 2.7: Usual surfaces menu window will be inserted by giving the control points of the first line by clicking with the LMB (RMB to close the row), then the remaining control points for rows with the LMB (RMB to close the net); • specify the Z co-ordinates of the control points by clicking with the LMB. These two steps are guided by XCSurf. Once the control net has been defined, the window in fig.2.2 will open, in which it is possible to set the surface degrees in u and v, the knot partitions in u and in v that can be manually assigned by the user (manual) or automatically by XCSurf (automatic); in the latter case, the internal knots are equally spaced while the external ones coincide with the end interval points. It is important to choose whether the surface should be closed in u, v or in both directions. In these cases XCSurf manages the given control net in order to make a closed and periodic surface. 2.4.5 Swinging button This option allows the user to create a swinging surface starting from a profile and a trajectory curve. It is possible to set an arbitrary scale factor for the XY dimension of the surface. Only the curve icons are shown in the Swinging window and the user has to select from these the profile curve and the trajectory by clicking on them with the LMB after have flagged the relative checkpoint. 2.4.6 Extruding button This option allows the user to create a surface by extruding, that is, by curve linear interpolation. Only the curve icons are shown in the Extruding 12 New Sur button window that is very similar to the skinning window (see fig.2.7 and the user has to choose the curves in the order in which he/she wishes them to appear; click on them with the LMB and transfer it with the arrow button; the other buttons allow the user to modify the own choices. 2.4.7 Tubular button This option allows the user to create a tubular surface starting from a profile and a trajectory curve. Only the curve icons are shown in the Tubular window and the user has to select from these the profile curve and the trajectory by clicking on them with the LMB after have flagged the relative checkpoint. 2.4.8 Inbetween button This option allows the user to create a set of curves or surfaces starting from two given curves or surfaces. All the curves and surfaces icons are shown in the Inbetween window and the user has to select from these the starting and ending objects (curves or surfaces). The user has to set the number of curves or surfaces he wants to be generate by inbetweening. 2.4.9 Interpol. button This option allows the user to create a new surface by interpolating the control-net of a surface previously loaded in the system memory (a 3D CP mesh). For the interpolation methods available see section 2.1.5 titled ip file format. xcsurf User’s Guide . . . Chapter 3 Save Curves and Surfaces This section explains the user can save a surface or list of surfaces in one o more files. Remember that XCSurf manages a curve like a degenerated surface. 3.1 Save button This button opens a window (see fig. 3.1) allowing the user to choose whether to save a surface, a list of surfaces, a 3D curve, a list of 3D curves, a surface control net or a hierarchical surface on file. The curves or surfaces must be selected from the Choose surfaces window using the arrow button. Open the file request allowing the user to specify the name to be used to save selected entity. In the case of a list, if the individual surfaces do not already have an associated file name, one explicit name is requested for each one; finally, the file request opens allowing the list to be named. Figure 3.1: Save menu window 14 3.2 Export button Export button This button allows the user to save a set of curves and surfaces, selected from the modelled curves and surfaces, in a file in IGES standard format (see Data file format section). The same button allows the user to save a NURBS tessellated surface or a list of these in OBJ WaveFront standard mesh format. The tessellation or number of grid lines for each surface can be defined using the textboxes grid U and V (see section 5.10). xcsurf User’s Guide . . . Chapter 4 Params button This button allows the user to set some XCSurf parameters regarding interactivity and viewing (see fig.4.1) that are explained as follows. Figure 4.1: Parameters window 4.1 no. of steps textbox The value specified in this textbox defines the number of steps in which the camera completes a 180 degree rotation to view the surfaces. The associated parameter, ”revolution step” shows the step value in radiants. 4.2 export uv texture checkbox This checkbox ables/unables the system to compute and save the texture u-v coordinates of a tessellated surface when the user requires to export a 16 Render Prefs button surface as a mesh in OBJ WaveFront file format (see Export button). 4.3 keep cop checkbox This checkbox ables/unables the system to manage automatically the COP distance from the scene when a surface has been modified or keep the COP distance. 4.4 on line help checkbox This checkbox ables/unables the online help of XCSurf. For every operation, this help guides the user on how to carry out the operation correctly. 4.5 display axes 1 checkbox This checkbox ables/unables the Cartesian coordinates axes in the left button corner of the Curve/Surface window. 4.6 display axes 2 checkbox This checkbox ables/unables the Cartesian coordinates axes in the scene of the Curve/Surface window. 4.7 3D Interactive Mode checkboxes These checkboxes able/unable an interactive mode (see Interactive button) to choice between: • virtual plane: • scene cube: • grid 2D: 4.8 Render Prefs button These checkpoints allow the user to choose the viewing method for our surfaces in the Curve/Surface window. XCSurf provides four methods: • wire frame • depth cueing • hidden line Params button 17 • shading (in this mode it is possible to choose three shading model: Gouraud, Flat and Phong shading and play with a simple illumination model to better represent the surfaces). which vary in rendering quality and viewing speed. 4.9 Conf Win and Save Conf buttons These buttons allow the user to modify the position of all XCSurf windows and the dimensions of the Curves/Srfaces and Control Net windows. It is possible to save this configuration in the .xcsurfrc file. The system will use this file to configure the windows for subsequent work sessions. Click on the Conf Win button with the mouse; now you can modify the positions and dimensions of XCSurf windows as usual with your Window Manager; when you have finished, click on the RMB. If you don’t click on the Save Conf button, but on Cancel, your configuration will only be set for your actual work session. xcsurf User’s Guide . . . Chapter 5 Other buttons 5.1 Delete button This button allows the user to delete the selected surface in the Object TextBox from XCSurf’s memory. 5.2 Copy button This button allows the user to make a copy of a surface; click with the LMB on the surface to copy in the Object TextBox , then click on the Copy button. 5.3 Show button This button allows the user to show the selected curve or surface in the Object TextBox. 5.4 Hide button This button allows the user to hide the selected curve or surface in the Object TextBox. 5.5 Hide Oth. button This button allows the user to hide all the curves and surfaces in the Object TextBox except the selected object. 20 Info button 5.6 Show All button This button allows the user to show all the curves and surfaces in the Object TextBox. 5.7 Info button Pressing the Information button in menu illustrated in fig.1.1, will be shown the menu of fig.5.1 in which the user can obtain general information about the surface/s (Gen Inf button) and, guided by the system, can explore the connections between the knots and CPs on the enabled surface (Knot-CP button) or the connections between the knots and CPs in a hypothetical knot insertion operation (Knot-Ins button). In any case, the Figure 5.1: Information menu window parametric domain of the surface with the knot partition is shown in the Curve/Surface window, next to a matrix of symbols representing the matrix of the CPs; information about the degrees, number of knots and number of CPs are shown too. • Gen Inf button; gives information about the center and radius of the smallest sphere containing the surfaces, about the center and radius of the smallest sphere containing the active surface , about the COP and about the three segments considered and shown as axes. • Knot-CP button; provides two functions: 1. click with the LMB on a CP shown in the Control Net window. The position of the selected control point will be viewed in the Curve/Surface window in the matrix and rectangle of the parametric domain affected by the CP. 2. click with the LMB on a matrix row (click under the first row element) or on a matrix column (click to the right of the first element in the column) in the Curve/Surface window. The related row of CPs will be viewed in the Control Net window Other buttons 21 as well as the rectangle of the parametric domain affected by these CPs. • Knot-Ins button; allows for two functions: 1. click with the LMB on the u or v axes where you want to insert a new knot. The related rows and columns of the matrices of the CPs which would be modified by the knot-insertion operation in that position will be viewed. 2. click with the LMB on the CP matrix exactly between two rows (click between the first two row items) or between two columns (click between the first two column items). Rows and columns of the CPs which could be involved in a knot-insertion operation will be viewed in the Control Net window. 5.8 Grid U and V textboxes These textboxes allow the user to set the dimensions in U and V of rendering grid for the active surface. The tessellation algorithm uses these parameters as upper-bounds to optimize the surface discretization including the knots values. In fact, after the user setting, these texboxes are autimatically update by the system with the computed values. 5.9 Action buttons The term action means to apply a function to an object. An action must be thought as to a function which takes in input one or more objects, giving origin to a new object turned out. The point of strength of the actions is that, after being created, they can be reused. This allows to execute again the algorithm associated to a determinate action simply changing a few parameters or modifying one of the objects rising, giving rise to an immediate updating of the object turned out. 5.9.1 Edit button This button allows the user to edit some parameteres of a previously action and to rebuild the object by an automatic recomputing. 5.9.2 Rebuild button This button allows the user to restart the process of computing an object by an already created action starting by the source objects. 22 5.9.3 Trim button Detach button This button allows the user to detach an object, that is to create a copy not editable of that object, or rather to which do not be associated any more an action. 5.10 Trim button This button allows the user to cut out a patch from the surface. The parametric domain of the surface with the knot grid and, at the top, information about the degrees, number of knots and CPs are shown in the Curve/Surface window. The user is guided in selecting a rectangle within the parametric domain with vertices, which are knots in the partition. By doing this, the user defines the surface, trimming away the rectangular regions selected; the cut-out part of the surface is memorised as a separated non-trimmed region of the surface and is iconised in the first free position. It should be noted that this operation can result in a trimmed surface made up of disconnected patches, as well as being used to trim a previously trimmed surface. xcsurf User’s Guide . . . Chapter 6 Modelling buttons This options allow the user to enter the modelling and analysis mode of one or more surfaces. The Control Net window shows the control nets of all the curves and surfaces in the system memory, each presented in a different colour; the net of the selected curve/surface will be drawn in white. In this release XCSurf provides two ambients to edit curves and surfaces and more precisely a Numeric mode and an Interactive mode and the capability to model hierarchically a surface by Hier. Struct. ambient. 6.1 Numeric button This button allows the user to change the shape of the active surface, or to move it into the 3D space. The window of fig. 6.1 opens; this contains two parts: geometric transformation and modify surface parameters. • geometric transformations modify the whole surface (all CP) or only part of it (selecting some CPs with the mouse). They consists in: – translation. The relative checkpoints show: ∗ coefficients; the values selected in the textboxes dX, dY and dZ are taken as the co-ordinates of the translation vector. ∗ cp to cp; defines the translation vector as the difference between two CPs on the surface, localized by mouse. ∗ cp 2 to 2; enables the translation of individual CPs on the surface. To do this, select the CP to be moved and another CP as a point to which the previous CP will be translated (it is useful in order to make several CPs coincide). ∗ symmetry; affects all the CPs and translates them in such a way that the surface remains symmetrical with respect to a given point chosen with mouse among the CPs. 24 Numeric button Figure 6.1: Modify Surface menu window ∗ push/pull; the translation vector is automatically computed to be orthogonal to the viewplane. The value selected in the textbox on the right is taken as the translation vector length. – scaling. The relative checkpoints indicate: ∗ barycenter; the barycenter of the surface is taken as the scaling center. ∗ coordinates; through the textbox on the right it is possible to provide a scaling center. The textboxes Sx, Sy and Sz enable the scaling factors to be given. ∗ by mouse; it is possible to give a CP as the scaling center using the mouse. – rotation. The rotation is around an axis of a given angle in degrees. The axis is defined by two 3D points P1 and P2 whose coordinates are given in the textboxes. By setting the ”barycenter” checkbox, P1 will be the surface barycenter. • to modify the surface parameters we have (fig.6.1): – CP button; enables a CP to be selected with the mouse, then by opening an appropriate window, allows the user to modify the CP coordinates and weight. – Degree button; enables the degree in u and in v of the surface and therefore the knot partition to be changed. Modelling buttons 25 Figure 6.2: Hierarchical structure window – Ins U and Ins V buttons; enable a knot insertion of a numerically specified knot to be made in u or in v through a textbox. – Ins by mouse; enables a knot insertion to be made interactively on the knot map in the Curve/Surface window. – Refinement; carries out a repeated knot insertion in both u and v directions at the mid-point of each knot interval. • Undo and Redo buttons; respectively allow the user to return to the surface situation previous to the latest modification and to repeat the latest modification eliminated with Undo. 6.2 Interactive button This button allows the user to change the shape of the active surface, or to move it into the 3D space interactively; with this button is also possible to use the FFD plugin to perform a surface modelling by deformation. For the interactive capabilities and FFD methods avalaible see [FFD05]. 6.3 Hier. struct button This button allows the user to perform a hierarchical modelling session by hierachical NURBS surfaces plugin. It opens a window, that we call window of the hierarchy; (see fig. 6.2). Only 26 Hier. struct button the selected surface will initially be shown; the hierarchical modelling in fact foresees that a surface is modelled at a time. Selecting an overlay from the TextBox of the objects and pressing the corresponding button is necessary to execute an operation. 6.3.1 Add and Remove Overlay buttons • Add Overlay: it creates a new overlay inside the parametric domain of the active object. The new overlay is inserted in the TextBox with an indentation proportional at his depth level. • Remove Overlay: it removes the active overlay and then all the overlay children. 6.3.2 View buttons Show button: this button allows the user to show the selected curve or surface in the Object TextBox. Hide button: this button allows the user to hide the selected curve or surface in the Object TextBox. Hide Oth. button: this button allows the user to hide all the curves and surfaces in the Object TextBox except the selected object. Show All button: this button allows the user to show all the curves and surfaces in the Object TextBox. Show level button: this button allows the user to show all the overlays at the same level of that selected. Hide Lower button: this button allows the user to hide the overlays lower to that selected. Hide Upper button: this button allows the user to hide the overlays upper to that selected. 6.3.3 Other buttons All the other buttons in the window, are the themselves ones which appear in the Main Menu window. These buttons were supplemented in this section to have a complete control of the work tools. The buttons Numeric and Interactive are fundamental for the modifications on the active overlay. Their working is identical to the used one in non hierarchical mode, executed up with the difference which the operations come of the overlay rather than on common objects. 6.3.4 Other simple information Some information concerning the overlay selected, as name and depth level, is available in the superior part of the window. Modelling buttons 27 The user can change the name of any overlay, simply clicking on the relative textbox line. Under this information other three textboxes which show the continuity level and the degree of the selected surface in the directions u and v are present. The textbox for the continuity can be edited clicking there above and inserting a new value included between zero and the maximum degree minus one. Considering that an overlay just created is set up so as to guarantee the maximum continuity, that is equal to degree minus one. This way only few control point will initially be modifiable; Decreasing the continuity level is necessary to be able to modify more against point. To go out of the environment of hierarchical modelling press the Close button. xcsurf User’s Guide . . . Chapter 7 View cursors and buttons This section allows the user to view the selected surface from various points of view. The user can set the COP (Camera parameters) by mouse and keyboard; more precisely using the four plus four arrow buttons in the top right-hand corner he/her can set the camera position and direction respectively; the texboxes under these arrow buttons allow the user to set the same parameters by keyboard; the Near and Far buttons allow the user to zoom in and zoom out. This section enables the user to obtain the best view of the part of the surface which is to be modified. The user can choose to view only a part of the surface or, even to restrict the view to a rectangle in the knot grid. This can be done by giving the indices of the external points of the required rectangle (see View Restr. button in the Params menu window). 7.1 Persp, Front, Side, Up and Default buttons These buttons allow the user to view the surface from 3 basic viewpoints and to return to the original perspective at any time. 7.2 Render, Control Net and Both checkpoints These checkpoints allow the user to view singularly the surfaces, the CPs or both from various point of view. 7.3 CP & Obj button This button simply draws the surface in the Control Net window, showing the grid of CPs and the surface together, so that it is possible to observe the relationship between the CPs and the surface they define. This view is temporary and every other operation in the Control Net window only returns to the control net. xcsurf User’s Guide . . . Chapter 8 Data file formats In this section the syntax of each file format used by XCSurf is given and explained. The data files created by XCSurf are stored in xcmodel/surfaces and xcmodel/curves3d directories as default, while the data files used are loaded by the above-mentioned and xcmodel/curves2d directories as default. The # character in the following introduces a comment on the data in the file. 8.1 3D NURBS curve The following example file is xcmodel/curves3d/curve08.db. The files with a .db extension contained in the curves3d directory, identify 3D NURBS curves or degenerated surfaces (compare with a file surface). The format is self-explanatory. FILENAME : curve08.db #curve file name DEGREE_U_V #introduces the curve degree 2 0 #curve degree N.C.P._U_V #introduces the CPs number 45 1 #number of CPs KNOTS_U_V #introduces the knot number 48 0 #number of knots COORD.C.P.(X,Y,Z,W) #introduces the CPs coord. and weights -4.000000e-01 4.000000e+00 -1.050000e+01 1.000000e+00 -4.000000e-01 4.100000e+00 -1.000000e+01 1.000000e+00 .... -4.000000e-01 4.000000e+00 -1.050000e+01 1.000000e+00 -4.000000e-01 4.000000e+00 -1.050000e+01 1.000000e+00 KNOTS_U #introduces the knot vector in not decreasing order 0.000000e+00 0.000000e+00 32 3D NURBS surface .... 1.000000e+00 1.000000e+00 KNOTS_V 8.2 List of curves The following example file is xcmodel/curves3d/profiles.obj. The files with an .obj extension contained in the curves3d directory, identify lists of 3D NURBS curves. The format is self-explanatory. FILENAME:profiles.obj 8 curve1.db curve2.db .... curve7.db curve8.db 8.3 #file name #number of curve file names #curve file name 3D NURBS surface The following example file is xcmodel/surfaces/sphere.db. The files with a .db extension contained in the surfaces directory, identify 3D NURBS surfaces. The format is self-explanatory. FILENAME:sphere.db #surface file name DEGREE_U_V #introduces the surface degrees 2 2 #surface degrees N.C.P._U_V #introduces the control net dimensions 5 9 #control net dimensions N.KNOTS_U_V #introduces the knot partition dimensions 8 12 #knot partition dimensions COORD.C.P.(X,Y,Z,W) #the 3D CPs coord. and weights by row 0.00000E+00 0.00000E+00 1.00000E+00 1.00000E+00 0.00000E+00 0.00000E+00 1.00000E+00 7.07107E-01 .... 0.00000E+00 0.00000E+00-1.00000E+00 7.07107E-01 0.00000E+00 0.00000E+00-1.00000E+00 1.00000E+00 KNOTS_U #the U knot vector in not decreasing order 0.00000E+00 0.00000E+00 .... 1.00000E+00 33 Data file formats 1.00000E+00 KNOTS_V 0.00000E+00 0.00000E+00 .... 1.00000E+00 1.00000E+00 8.4 #the V knot vector in not decreasing order 3D trimmed NURBS surface The following example file is xcmodel/surfaces/sphere.dbe. The files with a .dbe extension contained in the surfaces directory, identify 3D trimmed NURBS surfaces. This format consists in the same information already given for a 3D NURBS surface, plus appended information on the 2D trimming curves on the parametric surface domain. The format is selfexplanatory. FILENAME:sphere.dbe DEGREE_U_V 2 2 N.C.P._U_V 5 9 N.KNOTS_U_V 8 12 COORD.C.P.(X,Y,Z,W) 0.00000E+00 0.00000E+00 1.00000E+00 0.00000E+00 0.00000E+00 1.00000E+00 .... 0.00000E+00 0.00000E+00-1.00000E+00 0.00000E+00 0.00000E+00-1.00000E+00 KNOTS_U 0.00000E+00 0.00000E+00 .... 1.00000E+00 1.00000E+00 KNOTS_V 0.00000E+00 0.00000E+00 .... 1.00000E+00 1.00000E+00 1 #this is a flag; it signals that 0 # normal versus; 0 for computed #same as a .db file 1.00000E+00 7.07107E-01 7.07107E-01 1.00000E+00 other information follows versus, 1 opposite versus 34 3D points 0 8 0 5 0.634467 ..... 0.634467 0 5 0.384467 ..... 0.384467 ..... 8.5 0.496372 # flag not used (see .tree format) # number of trimming curves # flag not used (see .tree format) # number of points for first trimming curve #(v,u) coord. in the param. surface domain 0.496372 # flag not used (see .tree format) # number of points for second trimming curve 0.496372 #(v,u) coord. in the param. surface domain 0.496372 #etc. List of surfaces The following example file is xcmodel/surfaces/skittles.obj. The files with an .obj extension contained in the surfaces directory, identify lists containing 3D NURBS or trimmed NURBS surface names. The format is self-explanatory. FILENAME:skittles.obj 10 skittle01.dbe skittle02.db .... skittle09.dbe skittle10.db 8.6 #file list name #number of surface file names #trimmed surface name #surface name 3D control points The following example file is xcmodel/surfaces/sphere.cp. The files with a .cp extension contained in the surfaces directory, identify control point nets. The format is self-explanatory. FILENAME:sphere.cp #control net file name N.C.P._U_V #introduces the control net dimensions 5 9 #control net dimensions COORD.C.P.(X,Y,Z,W) #the 3D CPs coord. and weights by row 0.00000E+00 0.00000E+00 1.00000E+00 1.00000E+00 0.00000E+00 0.00000E+00 1.00000E+00 7.07107E-01 .... 0.00000E+00 0.00000E+00-1.00000E+00 7.07107E-01 0.00000E+00 0.00000E+00-1.00000E+00 1.00000E+00 35 Data file formats 8.7 3D points The following example file is xcmodel/surfaces/random.ip. The files with an .ip extension contained in the surfaces directory, identify point arrays. The format is self-explanatory. FILENAME:random.ip #point array file name N.P._U_V #introduces the array dimensions 5 7 #array dimensions COORD.P.(X,Y,Z) #introduces the 3D point coord. by row 0.00000E+00 1.00000E+00 1.00000E+00 0.00000E+00 1.00000E+00 7.07107E-01 .... 0.00000E+00-1.00000E+00 7.07107E-01 0.00000E+00-1.00000E+00 1.00000E+00 8.8 Hierarchical surface The following example file is xcmodel/surfaces/***.hie. 8.9 IGES entity no.126 and no.128 (NURBS curves and surfaces) IGES is the first standard exchange format developed to address the concepts of communicating product data among dissimilar CAD systems. XCSurf, being based exclusively on NURBS, implements the entity no.126 and no.128 only. The foolowing example file is xcmodel/surfaces/sfera.igs. S 1H,,1H;,,45H/home/casciola/xcmodel_3.0/surfaces/sfera.igs, G 38HXCMODEL ver.3.0 Universita’ di Bologna, G 22Hformato IGES Nov. 2001,32,38,6,308,15,,1.000000E+00,2,2HMM,1, G 1.000000E-02,13H030224.133554,1.000000E-02,0.000000E+00,,,10,0, G 13H030224.133554; G 128 1 0 1 0 0 0 000000000D 128 0 1 52 0 0D 128,8,4,2,2,1,0,0,0,0,0.000000E+00,0.000000E+00,0.000000E+00, 1P 2.500000E-01,2.500000E-01,5.000000E-01,5.000000E-01, 1P 7.500000E-01,7.500000E-01,1.000000E+00,1.000000E+00, 1P ... 0.000000E+00,-1.000000E+00,0.000000E+00,0.000000E+00, 1P -1.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00, 1P 1.000000E+00; 1P T 1G 5D 2P 52 T 1 1 2 3 4 5 1 2 1 2 3 50 51 52 1 36 8.10 OBJ WaveFront standard mesh format OBJ WaveFront standard mesh format This section describes the ASCII format for OBJ WaveFront files format for only polygonal objects. Polygonal geometry uses vertices, edges and faces to define objects. In our implementation these files have the extension .mbj and allows to save vertices, faces and optionally texture coordinates. # XCModel OBJ File: # www.dm.unibo.it/~casciola/html/xcmodel.html v 0.500000 0.500000 -0.500000 v 0.000000 0.000000 -0.500000 ... v 0.000000 0.000000 0.500000 v 0.000000 0.000000 0.500000 f 1 2 2 4 f 4 2 2 6 ... f 16 13 14 16 f 16 14 11 16 xcsurf User’s Guide . . . List of Figures 1.1 XCSurf environment . . . . . . . . . . . . . . . . . . . . . . . 2.1 2.2 2.3 2.4 2.5 2.6 2.7 Open menu window . . . . . . New surface parameter window Interpolation methods window New Curve parameter window . Load Surface menu window . . Usual surfaces menu window . Usual surfaces menu window . . . . . . . . 5 7 7 9 10 10 11 3.1 Save menu window . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1 Parameters window . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1 Information menu window . . . . . . . . . . . . . . . . . . . . 20 6.1 6.2 Modify Surface menu window . . . . . . . . . . . . . . . . . . Hierarchical structure window . . . . . . . . . . . . . . . . . . 24 25 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 xcsurf User’s Guide . . . Bibliography [DEB78] C.deBoor, A practical guide to splines, Springer Verlag (1978). [PITI95] L.Piegl, W.Tiller, The NURBS book, Springer Verlag (1995). [XCMODEL00] G.Casciola, xcmodel: a system to model and render NURBS curves and surfaces, User’s Guide - Version 1.0, Progetto MURST: ”Analisi Numerica: Metodi e Software Matematico”, Ferrara (2000), http://www.dm.unibo.it/∼casciola/html/xcmodel.html [XCCURV00] G.Casciola, xccurv: the 2D modeller, User’s Guide - Version 1.0, (2000) http://www.dm.unibo.it/∼casciola/html/xcmodel.html [XCSURF05] G.Casciola, xcsurf: the 3D modeller, User’s Guide - Version 3.0, (2005) http://www.dm.unibo.it/∼casciola/html/xcmodel.html [XCBOOL00] G.Casciola, xcbool: the object composer, User’s Guide - Version 1.0, (2000) http://www.dm.unibo.it/∼casciola/html/xcmodel.html [TRIM99] G.Casciola, trim library, Programming Guide - Version 1.0, (1999) http://www.dm.unibo.it/∼casciola/html/xcmodel.html [XTOOLS00] S.Bonetti, G.Casciola, xtools library, Programming Guide Version 2.0, (2000) http://www.dm.unibo.it/∼casciola/html/xcmodel.html [FFD05] G.Casciola, E.Trevisan, Free Form Deformation: xcsurf (Version 3.0) plugin, (2005) http://www.dm.unibo.it/∼casciola/html/xcmodel.html
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
advertisement