Local Operation Functions   

<<< Operations on Bodies, Curves, Surfaces, etc. Chapters Miscellaneous Useful Functions >>>

Contents

[back to top]


7.1 Introduction

Functions which are grouped as local operations operate only on that part of the body represented by the given face set.

 

Object

Function

face(s)

tweak, ntweak, twefac, create_sheet, remove_faces, create_solid, delete_faces, taper

tweak function

tweak is a local operation that can be used to change the existing surface of a face to a given surface. The topology would be unaltered. tweak takes as an argument a list of of faces and a corresponding list of surfaces.

 

> (define b1 p_block)
> (define b2 p_cylinder)
> (b1 x 10;y 10;z 10;create)
> (b2 radius 1; height 10; point ´(0 5 5); 
   direction ´(0 1 0); create)
> (b1 unite ´b2)     -- unite small cylinder onto side of block
> (graphics sketch ´b1; silhouette; autowindow; redraw)

> (face help tweak)   -- for information on how to tweak a face
> (define f1 face)
> (f1 pick)           -- pick block top face using the cursor

> (define s1 p_planar)
> (s1 point ´(0 0 50); direction ´(0 0 1); create)
                -- s1 is plane at Z = 50 parallel to XY plane
> (f1 tweak ´s1) -- this will raise the face up to the surface
        s1, and now body b1 has the dimensions x 1O, y 10, z 50

ntweak function

ntweak is similar to tweak , but changes the existing surface of a face to a given surface but is reversed. The topology must be unaltered.

twefac function

twefac is a local operation that can be used to modify the surface of a face by a given transformation. It can also apply a transformation or a list of transformations to either a list of faces or a list of lists of faces. In all cases the topology must be unaltered.

 

> (define  b1 p_block)
> (b1 x 10;y 10;z 10;create)
> (face help twefac)           -- for information on twefac
> (define f1 face)
> (f1 pick_from b1)            -- pick the faces from the block

> (define t1 p_translation)
> (t1 direction ´(1 -1 1); distance 30; create)
> (graphics clear)
> (graphics sketch ´b1; autowindow; redraw)

> (f1 twefac ´t1)              -- translate all the faces
> (graphics sketch ´b1; autowindow; redraw)

> (f1 twefac ´t1)              -- translate all the faces again
> (graphics sketch ´b1; autowindow; redraw)

create_sheet function

This face function copies the geometry and topology of the face and uses them to make a new sheet body create_sheet_temp . It only works for single items, not sets.

 

> ( define f0 face)
> (f0 pick)
> (f0 create_sheet)

remove_faces, create_solid and delete_faces functions

This sub group of face functions create new offspring bodies from a set of faces.

The new child bodies created are given names of the form create_solid_c1 , create_solid_c2 (etc)/ remove_faces_c1 , remove_faces_c2 (etc) depending on which function created/removed them, and the number of child bodies created/removed.

In the case of remove_faces , where the parent is modified, the resulting parent body is returned as remove_faces_p1 . remove_faces is the only function which can take up to two optional arguments.

 

> (define f2 face)
> (f2 pick2)              -- pick two faces of cylindrical boss
                             from a body previously drawn
> (f2 create_solid ´growp) -- create new body with copied faces
                              using growp to mend wound.
> (define f2 face)
> (f2 pick2)              -- pick two faces of cylindrical boss
                             from a body previously drawn
> (f2 remove_faces ´grow)  
      -- remove faces and  mend parent with grow and create new 
         body with copied faces, using default cap for mend
> (define f2 face)
> (f2 pick2)              -- pick two faces of cylindrical boss
                             from a body previously drawn
> (f2 remove_faces ´growp ´grow)
  -- remove faces and mend parent with grow using parent
     surfaces to mend wound, create offspring with copied faces
> (define f2 face)
> (f2 pick2)              -- pick two faces of cylindrical boss
                             from a body previously drawn
> (f2 delete_faces ´cap)  -- delete these faces from b1 and
                             cap the ´wound´

taper function

taper drafts a set of faces, which can be any combination of planar, cylindrical and conical surfaces. It has taper properties of point, direction and angle, which define the taper plane and angle (see the description of TAPFAS for details of the effects of this operation and the meaning of the properties involved).

The following tapers a previously defined set of faces by 2 degrees about a taper plane, defined by the point and direction parameters:

 

> ( f1 point ´(0 0 10); direction ´(0 0 1); angle 2; taper )

 

[back to top]

<<< Operations on Bodies, Curves, Surfaces, etc. Chapters Miscellaneous Useful Functions >>>