All Frameworks Class Hierarchy This Framework Indexes
| outcome api_pattern_create_linear( | pattern*& | pat, | |
| const SPAvector& | x_vec, | ||
| int | num_x, | ||
| const SPAvector& | y_vec | = *(SPAvector*)NULL_REF, | |
| int | num_y | = 1, | |
| const SPAvector& | z_vec | = *(SPAvector*)NULL_REF, | |
| int | num_z | = 1, | |
| logical | y_staggered | = FALSE, | |
| logical | z_staggered | = FALSE, | |
| logical | fit_distance | = FALSE, | |
| AcisOptions* | ao | = NULL) |
// Create a pattern
pattern* pat = NULL;
SPAvector x_vec(2, 0, 0);
int num_x = 4;
SPAvector y_vec(0, 2, 0);
int num_y = 3;
SPAvector z_vec(1, 1, 2);
int num_z = 3;
check_outcome(result = api_pattern_create_linear(pat, x_vec, num_x,
y_vec, num_y, z_vec, num_z));
// Create a prism
double height = 1.0;
double maj_rad = 1.0;
double min_rad = 0.5;
int num_sides = 3;
BODY* prism = NULL;
check_outcome(result = api_make_prism(height, maj_rad,
min_rad, num_sides, prism));
// Apply the pattern to the prism
check_outcome(result = api_pattern_apply_to_entity(prism, pat));
// Clean up
check_outcome(result = api_pattern_destroy(pat));
Effect: Changes model
Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.