SweepFeatureInput Object

Derived from: Base Object
Defined in namespace "adsk::fusion" and the header file is <Fusion/Features/SweepFeatureInput.h>

Description

This class defines the methods and properties that pertain to the definition of a sweep feature.

Methods

Name Description
classType Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name Description
creationOccurrence In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the sweep is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the sweep) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
distanceOne Gets and sets the distance for the first side. The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end. The value is default to 1.0.
distanceTwo Gets and sets the distance for the second side. The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end. The value defaults to 0 in the case where the path is closed, otherwise it defaults to 1.0. It is ignored if the path is only on one side of the profile or if the sweep definition includes a guide rail. It's always the distance against the normal of the profile if available.
extent Gets and sets the sweep extent type. It defaults to PerpendicularToPathExtentType. This property is ignored when a guide rail has not been specified.
guideRail Gets and sets the guide rail to create the sweep. This can be set to null to remove the guide rail definition and have a single path sweep feature.
guideSurfaces Gets and sets the guide surfaces to create the sweep. This can be set to an empty array to remove the guide surfaces and have a single path sweep feature. By default connected faces that are tangent to any of the guide faces are set as guide faces. Use the isChainSelection property to disable the use of tangent faces.
isChainSelection Get and sets whether faces that are tangentially connected to the guide surfaces are also made guide surfaces.
isDirectionFlipped Gets and sets if the direction of the sweep is flipped. This property only applies to sweep features that include a guide rail and whose path runs on both sides of the profile.
isSolid Specifies if the sweep should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. This is initialized to true so a solid will be created if it's not changed.
isValid Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType This property is supported by all objects in the API and returns a string that contains the full name (namespace::objecttype) describing the type of the object.

It's often useful to use this in combination with the classType method to see if an object is a certain type. For example: if obj.objectType == adsk.core.Point3D.classType():
operation Gets and sets the type of operation performed by the sweep.
orientation Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType. This property is ignored when a guide rail has been specified.
participantBodies Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate.

This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.
path Gets and sets the path to create the sweep.
profile Gets and sets the profiles or planar faces used to define the shape of the sweep. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.
profileScaling Gets and sets the sweep profile scaling option. It defaults to SweepProfileScaleOption. This property is only used when a guide rail has been specified.
taperAngle Gets and sets the taper angle of the sweep. This property is initialized with a taper angle of zero. A negative angle will taper the sweep inward while a positive value will taper the sweep outward.

This property is ignored if a guide rail or surface has been specified. This property is valid for both parametric and non-parametric extrusions.
targetBaseFeature When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
twistAngle Gets and sets the twist angle of the sweep. This property is initialized with a twist angle of zero.

This property is ignored when a guide rail or surface has been specified. This property is valid for both parametric and non-parametric extrusions.

Accessed From

SweepFeatures.createInput

Samples

Name Description
Sweep Feature API Sample Demonstrates creating a new sweep feature.
Sweep with guide rail Feature API Sample Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2014