Suppose that you have already created an
ENTITY object named
ent and a
pattern object named
pat. Generating the pattern can be as simple as calling
api_set_entity_pattern:
|
|
outcome result = api_set_entity_pattern(ent, pat);
|
|
On the other hand, if you want to apply the pattern to a bump that is a part of
ent, it is first necessary to pick out an entity that can be used to identify the bump. For example, if
ent is a sheet body with holes in it, and you want to apply the pattern to a hole, pick out the
LOOP object defining the hole first:
|
|
ENTITY_LIST loop_list;
|
outcome result = api_get_loops(ent, loop_list);
|
LOOP* hole_loop = (LOOP*)loop_list[1];
|
|
and then apply the pattern to this object:
|
|
result = api_set_entity_pattern(hole_loop, pat);
|