The associated FRED file, exampleCollectionTrimmedSurfaces.frd, is located in the <install dir> \Resources\Samples\Tutorials & Examples\ directory.
Its intent is to illustrate some of the basic logic underlying trimming operations. In FRED, the rendered area of a surface is determined by first establishing the outermost boundaries of a surface with the Trimming Volume Outer Boundary specification. Within this volume, FRED allows any number of trimming operations to further modify the surface boundaries.
For example, the intersection of two separate surfaces can be made into a trimming boundary. Further, groups of surfaces, logically connected using the AND (&), OR (|), and NOT (!) operators can be used to create auto-limiting elements. Another option for trimming includes the use of a special curve of the type Aperture Curve Collection. This example will illustrate the use of the various logical operators to trim a simple plane with one or more cylinders.
The following image shows how the logical trimming operations can be used to create complex surface geometry. Three cylinders (C1, C2 and C3) are used to trim a plane surface.
The operations illustrated above, from left to right are: 1. keep outside 2. keep inside = NOT(!) outside 3. multiple trim surfaces, but no trim 4. AND all: C1 & C2 & C3 5. AND NOT all: !C1 & !C2 & !C3 6. OR all: C1 | C2 | C3 7. OR NOT all: !C1 | !C2 | !C3
The advanced surface trimming specifications are accessed from the "Surface Trimming Specification" section on the Aperture tab of a surface dialog.
The following controls relate to the Aperture tab of a surface dialog.
The default trimming operation is to keep the positive side of the trimming surface: •The positive side of a trimming surface is oriented in the same direction as its local positive Z-axis. •The positive side of a cylinder or a cone is the entire region outside the cylinder or the cone. •The trimming surface specifications are only evaluated inside the Trimming Volume Outer Boundary, or bounding box, of the parent surface. •The trimming surface controls are always determined in the local coordinate system of the trimming surface. •The Trimming Volume Outer Boundary of the trimming surface is ignored unless the # designation is used before the name.
Operator sequence: the following examples show valid ordering for trimming surface operators. Note that spaces are ignored unless they are contained in the surface name between quotes •# ”surface name” g # always is the last operator preceding a surface name •!# ”surface name” •“surface 1 name” & “surface 2 name” •“surface 1 name” &! “surface 2 name” > NOT always follows AND •“surface 1 name” |! “surface 2 name” > NOT always follows OR •“surface 1 name” &! # “surface 2 name” •(!“surface 1 name” & “surface 2 name”) | “surface 3 name” > operations inside parentheses are evaluated first
In this example a number of Custom Elements, each showing a different trim example, are contained in a single Sub-Assembly. The custom elements all contain the parent surface: a 3 x 3 mm square plane, one or more trimming cylinders (for trimming only) oriented perpendicular to the plane, and one or more curves (circles) which are only used to highlight the ends of the cylinders. As a general note, the trimming surfaces are selected using the Entity Picker dialog which lists all available trimming surfaces and Collection Curves. Clicking on a surface or collection curve will add it to the Operation List View.
NOTE: Only the blue (shaded) regions in the figures below will intersect rays.
Custom Element 1 – ‘keep outside’ Recall from the Application Notes that the positive side of a cylinder is the entire region outside the tube. To cut a hole in a surface with a cylinder, use the following specification.
Custom Element 2 – ‘keep inside = NOT (!) outside’ To keep the region inside the cylinder, prefix the trimming surface name with a NOT operator, which is shown as an exclamation point ‘!’. Because the default operation is to keep the outside of the cylinder, a NOT operator specifies to keep the inside of the cylinder.
Custom Element 3 – ‘no trim’ The following figure shows the untrimmed plane.
Custom Element 4 – ‘AND (&)’ More than one trimming surface can be used in the specification. Inserting the AND (&) operator between two expressions tells FRED to keep the region that is allowed by both together. In other words, FRED keeps the intersection or overlap of the allowed areas. In this example, all three cylinders have been AND’ed together.
Custom Element 5 – ‘AND NOT (&!)’ To reverse the operation from that shown in Custom Element 4, prefix each surface name with the NOT operator. This instruction tells FRED to keep only the segment in the center since it is the only area that is common to all three cylinders.
Custom Element 6 – ‘OR ( | )’ The OR operation in FRED looks for the union of available area. It does not require that all or even any regions overlap. Replacing the AND operator with the OR (|) operator used in Custom Element 4 has the opposite effect of that shown above. That is, the only region not included by the specification is the center section because it is the only place not allowed by any one of the trimming cylinders.
Custom Element 7 – ‘OR NOT ( |! )’ The final example prefixes each of the cylinder surfaces with the NOT (!) operator. This tells FRED to keep the area inside of each cylinder, regardless of whether or not it overlaps the others.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||