ConstructionAxisInput.setByTwoSnapPoints Method

Parent Object: ConstructionAxisInput
Defined in namespace "adsk::fusion" and the header file is <Fusion/Construction/ConstructionAxisInput.h>

Description

This input method is for creating a construction axis that passes through the two snap points.

A snap point captures the same information that the user supplies in the UI when they hover over an entity and pick a snap location: the host entity, an optional reference entity, the picked 3D point in world space, and a ConstructionSnapPointTypes value that classifies the selection. This input method exposes snap-point selections (such as edge midpoints, arc centers, face centers and tangent points on curved faces) that previously were only available through the UI.

This will fail if the two snap points are coincident.

This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Syntax

"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

returnValue = constructionAxisInput_var.setByTwoSnapPoints(snapPointOne, snapPointTwo)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByTwoSnapPoints(snapPointOne, snapPointTwo);
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

returnValue = constructionAxisInput_var.setByTwoSnapPoints(snapPointOne, snapPointTwo);

Return Value

Type Description
boolean Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name Type Description
snapPointOne ConstructionSnapPoint The first ConstructionSnapPoint the axis passes through. Use ConstructionSnapPoint.create to build it.
snapPointTwo ConstructionSnapPoint The second ConstructionSnapPoint the axis passes through. Use ConstructionSnapPoint.create to build it.

Version

Introduced in version September 2026