
This functionality is provided as a preview
of intended future API capabilities. You are encouraged to use it and report any problems or suggestions using the
Fusion API and Scripts forum.
Because this is a preview of future functionality, there is the possibility that it will change, which will possibly
break any existing programs that use this functionality. Because of that, you should never deliver any programs that use
any preview capabilities. For a distributed program, you should wait until it has moved from preview to released state.
Provides access to the information that defines a centered constraint in an assembly constraint set.
A centered constraint is defined by two geometry inputs, one for each constrained occurrence. At least one input must be an AssemblyConstraintCenteredPlaneDefinition object that specifies two planar entities whose midplane is used. The other input can also be an AssemblyConstraintCenteredPlaneDefinition, or it can be a single entity: a planar BRepFace, ConstructionPlane, BRepEdge, BRepVertex, SketchProfile, SketchPoint, or any SketchCurve object except for a spline. If both inputs are AssemblyConstraintCenteredPlaneDefinition objects, the midplanes of both pairs are aligned. If one input is an AssemblyConstraintCenteredPlaneDefinition and the other is a single entity, the resulting constraint depends on the type of geometry supplied. For example, a BRepVertex or SketchPoint constrains the point to lie on the midplane; a linear BRepEdge or SketchLine positions the line on the midplane while still allowing rotation about the line; and a planar BRepFace, ConstructionPlane, or SketchProfile constrains the plane relative to the midplane.
| 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(). |
| setBiasPoints |
Optionally defines bias points that influence the initial positioning of the occurrences when a constraint is created. These points are equivalent to the pick points when selecting the geometry for a constraint. The two pick points are aligned when the constraint is created. Otherwise, arbitrary pick points are used. The bias points are only used for the initial placement and do not affect the constraint after it has been created. |
| setSecondaryBiasPoints |
Optionally defines secondary bias points that influence the initial positioning of the occurrences when a centered constraint is created. Secondary points apply only when the corresponding occurrence geometry is an AssemblyConstraintCenteredPlaneDefinition (two-plane input). Pass null for unused secondary slots. The bias points are only used for the initial placement and do not affect the constraint after it has been created. |
| Name | Description |
| componentOneGeometry | Gets and sets the geometry input for the first occurrence. This can be an AssemblyConstraintCenteredPlaneDefinition object, or a single planar BRepFace, ConstructionPlane, BRepEdge, BRepVertex, SketchProfile, SketchPoint, or any SketchCurve object except for a spline. The constraint behavior depends on the geometry type. When querying an existing constraint, this property returns the same type of object that was used to define the constraint. If the isTemporary property is false, you need to position the timeline marker immediately before the parent assembly constraint set before setting this property. This can be accomplished using the following code: parentSet.timelineObject.rollTo(True). |
| componentTwoGeometry | Gets and sets the geometry input for the second occurrence. This can be an AssemblyConstraintCenteredPlaneDefinition object, or a single planar BRepFace, ConstructionPlane, BRepEdge, BRepVertex, SketchProfile, SketchPoint, or any SketchCurve object except for a spline. The constraint behavior depends on the geometry type. When querying an existing constraint, this property returns the same type of object that was used to define the constraint. If the isTemporary property is false, you need to position the timeline marker immediately before the parent assembly constraint set before setting this property. This can be accomplished using the following code: parentSet.timelineObject.rollTo(True). |
| constraintType | Returns the type of this assembly constraint definition. |
| isFlipped | Gets and sets if the directions of the entities are aligned or opposed. The natural direction is for them to be opposed, and flipping them will align them. If the isTemporary property is false, you need to position the timeline marker immediately before the parent assembly constraint set before setting this property. This can be accomplished using the following code: parentSet.timelineObject.rollTo(True). |
| isTemporary | Specifies if this definition is associated with an AssemblyConstraintSetInput object and is being used to define a new assembly constraint set. It is true when the definition is part of an input object and the assembly constraint has not yet been created. It is false when the definition is associated with an existing AssemblyConstraint object. |
| isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference. |
| name | Gets and sets the name of the constraint as displayed in the Edit Constraints dialog and in the browser. If the isTemporary property is false, you need to position the timeline marker immediately before the parent assembly constraint set before setting this property. This can be accomplished using the following code: parentSet.timelineObject.rollTo(True). |
| 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(): |