Component:Sweeping
From DocR21
Sweeping (component SWP) is a modeling technique that fits a surface through a single wire profile, a path, and a rail and builds the required topological structure for the resulting body. Sweeping can be used to create closed, solid bodies as well as open, solid bodies (sheet bodies). The input profile is given in the form of wire body or edge and the sweeping operation handles all necessary topological operations to make multiple face bodies.
The sweep surface is a two-parameter parametric function S(u,v): the profile provides the u parameter of the surface and the path defines the v parameter. It is represented in ACIS as a procedural surface that is at least G1. If the path consists of multiple curves joined non-tangentially, then mitering is invoked.
ACIS Sweeping supplies a collection of functional variations outlined in Functional Variations of Sweeping.
| Operation | Description | |
|---|---|---|
| Sweep Along a Path | Sweeps a profile along a path | |
| Sweeping With a Distance | Sweeps a planar profile along the plane normal given a specific distance | |
| Sweep Along a Vector | Sweeps a profile along a linear path parallel to the supplied vector. | |
| Sweep Around an Axis | Sweeps a profile around an axis creating a surface of revolution | |
| Sweep with a Fixed Axis | Sweeps a profile along a path keeping it aligned with a given axis. |
Sweep Options
- Main article: Sweeping with Options
The main Sweeping APIs take options to control their behavior. The options are passed in via the class: sweep_options.
Rails, Vector Fields, and Hedgehogs
- Main article: Rails, Vector Fields, and Hedgehogs
Rails are unit length vector fields which are perpendicular to the path. They serve to align the profile correctly to the path as it is swept.
Sweep Annotations
- Main article: Sweep Annotations
Sweep Annotations allow features, created during sweeping, to be named.
Sweeping API Parameters
- Main article: Sweeping API Parameters
This article provides an overview of the Sweeping API parameters and how the returned BODY depends on the profile type.
Profile Location
- Main article: Profile Location
Locating the profile at the beginning of the sweep path is not always practical and is not a requirement when using sweeping. The profile's location is determined by the planar profile or linear profile.
Self-intersecting Checks in Sweeping
- Main article: Self-intersecting Checks in Sweeping
Potential self-intersecting sweeps can be caused by paths that bring the profile cross-sections to intersecting positions or non-planar profiles.
Error Codes
Upon failure of an Sweeping API, error codes will be returned that explain the failure and suggest possible actions for correction.
The function api_sweep_with_options and the associated Scheme extension sweep:law encompass the sweeping functionality. The api_sweep_with_options function is used to simplify sweeping in C++. Various options to control sweeping may be specified through the sweep_options class and the associated Scheme extension sweep:options. The function api_sweep_with_options has four overloaded instances as described above in the Sweeping Operations.
outcome api_sweep_with_options(profile, path, sweep_options, output_body) outcome api_sweep_with_options(profile, distance, sweep_options, output_body) outcome api_sweep_with_options(profile, vector, sweep_options, output_body) outcome api_sweep_with_options(profile, position, axis, sweep_options, output_body)
The first argument to the api_sweep_with_options function is a profile in the form of a pointer to an entity. For example, an edge, a wire body, a face, or a planar sheet body with nonadjacent faces, which may or may not belong to a body, could form the sweeping profile.
The next argument is a path. The path may take the form of an EDGE or WIRE body pointer. The path may be specified as a distance if the profile is a planar face or a planar sheet body with non-adjacent faces. A vector or an axis to sweep around (in the form of a position and a vector) may also be provided as the path. However, defining vector or axis as paths requires the use of the default rail law (without twist).
All other inputs are passed to the API through an instance of the sweep_options class. The sweep options are explained in detail in Sweeping with Options.
The returned body depends on the profile type:
- Face belonging to a body - When the profile is a face that belongs to a body, the owning body is altered, and the new body points to NULL.
- Face not belonging to a body - When the profile is a face not belonging to a body, a new body is created and returned. The original face remains separate and available for further independent manipulation or deletion.
- Wire body - When the profile is a wire body, the owning body is altered and the new body points to NULL. The altered body can be a solid or a sheet body depending on whether or not the option to make a solid has been set, and whether or not the wire body is closed. It is not necessary or desirable to cover the wires. The default is to make a solid if the wire body is closed.
- Edge not belonging to a body - When the profile is an edge or set of independent edges, a new body is created. The original edge may become part of the new body or be deleted. If the edge is closed, by default it makes a solid body; otherwise it makes a sheet body. It is not necessary or desired that the edges be covered.
Profile Location
Locating the profile at the beginning of the sweep path is not always practical and is not a requirement when using sweeping. The profile's location is determined in the following manner:
- Planar profile - The profile is located at the nearest intersection point on the path, within the profile plane.
- Linear profile - The profile is always located at the beginning of the path.
The plane of the profile must intersect the path in the intended location. If the plane of the profile does not intersect the path at all, the relationship is ambiguous and sweeping may not complete, or may create unintended results. If the plane of the profile intersects the path at an unintended location, this location is used in determining the relationship of profile and the path.
These rules work well when the profile is perpendicular to the path. However, if the given profile is not perpendicular to the path, the path location may not be unique.
For non-planar profiles, the position of the path may be ambiguous and the sweeping code is not recommended. Customers need to be careful when selecting a non-planar profile.
Applications should move the profile to the beginning of the path and use the AS_IS argument for the portion sweep_options.
Versioning and Journaling
Journaling and Versioning are available for Sweeping through the standard ACIS options.
