FormIt Plugin API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
FormIt.Tools API

Description

Functions

json FormIt.Tools.ClearTools ()
 ClearTools() function.
 
json FormIt.Tools.UseImplicitTools (bUseImplicitTools)
 Selects implicit tool mode.
 
json FormIt.Tools.UsingImplicitTools ()
 Returns implicit tool mode
 
json FormIt.Tools.GetActiveToolType ()
 GetActiveToolType() function.
 
json FormIt.Tools.GetActiveToolSubType ()
 GetActiveToolSubType() function.
 
json FormIt.Tools.IsInContinuousAction ()
 IsInContinuousAction() function.
 
json FormIt.Tools.StartTool (toolType, args)
 
json FormIt.Tools.BlendFacesOrEdges (val)
 BlendFacesOrEdges() function.
 
json FormIt.Tools.FlattenGroups ()
 FlattenGroups() function.
 
json FormIt.Tools.OffsetBody (val)
 OffsetBody() function.
 
json FormIt.Tools.Paintbrush (materialID, backside)
 Added this so we can call the paintbrush tool through the JS API rather than module.ccall() in Web
 
json FormIt.Tools.ShellBodyOrFaces (val)
 ShellBodyOrFaces() function.
 
json FormIt.Tools.ClearAllInferences ()
 ClearAllInferences() function.
 
json FormIt.Tools.GetToolsOptionCount ()
 The following commands are to support Tool Options menu in web.
 
json FormIt.Tools.ApplyToolOptionValues ()
 Apply the Tool Options menu items values to the active tool.
 
json FormIt.Tools.GetToolsOptionValueAndType (index)
 Get the value and type of Tool Options menu item in the active tool.
 
json FormIt.Tools.GetToolsOptionComboBoxItems (index)
 Get the combo box items of Tool Options menu type in the active tool.
 
json FormIt.Tools.GetToolsOptionTitle (index)
 Get the title of Tool Options in the active tool.
 
json FormIt.Tools.SetToolsOptionValue (index, value)
 Set the value of Tool Options in the active tool.
 
json FormIt.Tools.SelectArrayTool (numCopies, copyDivide, groupBeforeCopy, radial)
 SelectArrayTool() function.
 
json FormIt.Tools.GetSecondaryTool ()
 GetSecondaryTool() function.
 

Function Documentation

◆ ApplyToolOptionValues()

json FormIt.Tools.ApplyToolOptionValues ( )

Apply the Tool Options menu items values to the active tool.

This command only works during a tool operation. And returns the number of options in the tool. The tool options menu is invoked by a <TAB> during the operation of the tool.

Parameters: In: Out:

Returns
JSON_UNDEFINED, i.e. {}

◆ BlendFacesOrEdges()

json FormIt.Tools.BlendFacesOrEdges ( val  )

BlendFacesOrEdges() function.

Parameters
[in]valdouble
Returns
JSON_UNDEFINED, i.e. {}

◆ ClearAllInferences()

json FormIt.Tools.ClearAllInferences ( )

ClearAllInferences() function.

Returns
JSON_UNDEFINED, i.e. {}

◆ ClearTools()

json FormIt.Tools.ClearTools ( )

ClearTools() function.

Returns
JSON_UNDEFINED, i.e. {}

◆ FlattenGroups()

json FormIt.Tools.FlattenGroups ( )

FlattenGroups() function.

Returns
JSON_UNDEFINED, i.e. {}

◆ GetActiveToolSubType()

json FormIt.Tools.GetActiveToolSubType ( )

GetActiveToolSubType() function.

Returns
{...}

◆ GetActiveToolType()

json FormIt.Tools.GetActiveToolType ( )

GetActiveToolType() function.

Returns
{...}

◆ GetSecondaryTool()

json FormIt.Tools.GetSecondaryTool ( )

GetSecondaryTool() function.

Returns
{...}

◆ GetToolsOptionComboBoxItems()

json FormIt.Tools.GetToolsOptionComboBoxItems ( index  )

Get the combo box items of Tool Options menu type in the active tool.

This command only worked during a tool operation. The tool options menu is invoked by a <TAB> during the operation of the tool.

Parameters: In: Index of the tool option item in the options menu. Out: array of combo box string names

Parameters
[in]indexint
Returns
JSON_UNDEFINED, i.e. {}

◆ GetToolsOptionCount()

json FormIt.Tools.GetToolsOptionCount ( )

The following commands are to support Tool Options menu in web.

The Tool Options menus are invoked during a tool when you press tab. These commands can only be tested during a tool operation in the script editor such as when placing a block, vertex, or other tools are active. Here is an example of a block test.

Start to place a block var count = FormIt.Tools.GetToolsOptionCount(); console.log(count); "3" var value = FormIt.Tools.GetToolsOptionValueAndType(0); console.log(value); "12","double" var title = FormIt.Tools.GetToolsOptionTitle(0); console.log(title); "Width: " var err = FormIt.Tools.SetToolsOptionValue(0, "Jim"); console.log(err); "Invalid number format" err = FormIt.Tools.SetToolsOptionValue(0, "20.0"); console.log(err); "" var menu = FormIt.Tools.GetToolsOptionComboBoxItems(0); console.log(menu); {}

Get the number of Tool Options menu items of the active tool. This command only works during a tool operation. And returns the number of options in the tool. The tool options menu is invoked by a <TAB> during the operation of the tool.

Parameters: In: Out: number of tool options

Returns
toolOptions.size()

◆ GetToolsOptionTitle()

json FormIt.Tools.GetToolsOptionTitle ( index  )

Get the title of Tool Options in the active tool.

This command only worked during a tool operation. The tool options menu is invoked by a <TAB> during the operation of the tool.

Parameters: In: Index of the tool option item in the options menu. Out:

Parameters
[in]indexint
Returns
JSON_UNDEFINED, i.e. {}

◆ GetToolsOptionValueAndType()

json FormIt.Tools.GetToolsOptionValueAndType ( index  )

Get the value and type of Tool Options menu item in the active tool.

This command only worked during a tool operation. And returns the number of options in the tool. The tool options menu is invoked by a <TAB> during the operation of the tool.

Parameters: In: Index of the tool option item in the tool options menu Out: Value , Type ("int", "double", "combobox", "checkbox")

Parameters
[in]indexint
Returns
JSON_UNDEFINED, i.e. {}

◆ IsInContinuousAction()

json FormIt.Tools.IsInContinuousAction ( )

IsInContinuousAction() function.

Returns
{...}

◆ OffsetBody()

json FormIt.Tools.OffsetBody ( val  )

OffsetBody() function.

Parameters
[in]valdouble
Returns
JSON_UNDEFINED, i.e. {}

◆ Paintbrush()

json FormIt.Tools.Paintbrush ( materialID  ,
backside   
)

Added this so we can call the paintbrush tool through the JS API rather than module.ccall() in Web

Parameters
[in]materialIDint
[in]backsidebool
Returns
JSON_UNDEFINED, i.e. {}

◆ SelectArrayTool()

json FormIt.Tools.SelectArrayTool ( numCopies  ,
copyDivide  ,
groupBeforeCopy  ,
radial   
)

SelectArrayTool() function.

Parameters
[in]numCopiesint
[in]copyDividebool
[in]groupBeforeCopybool
[in]radial(OPTIONAL, default = false) bool
Returns
JSON_UNDEFINED, i.e. {}

◆ SetToolsOptionValue()

json FormIt.Tools.SetToolsOptionValue ( index  ,
value   
)

Set the value of Tool Options in the active tool.

This command only worked during a tool operation. The tool options menu is invoked by a <TAB> during the operation of the tool.

Parameters: In: Index of the tool option item in the options menu. String value to set. Out: error message

Parameters
[in]indexint
[in]valueString
Returns
errorString

◆ ShellBodyOrFaces()

json FormIt.Tools.ShellBodyOrFaces ( val  )

ShellBodyOrFaces() function.

Parameters
[in]valdouble
Returns
JSON_UNDEFINED, i.e. {}

◆ StartTool()

json FormIt.Tools.StartTool ( toolType  ,
args   
)

◆ UseImplicitTools()

json FormIt.Tools.UseImplicitTools ( bUseImplicitTools  )

Selects implicit tool mode.

Parameters: In: (bool) bUseImplicitTools Out: JSON_UNDEFINED

Parameters
[in]bUseImplicitToolsbool
Returns
JSON_UNDEFINED, i.e. {}

◆ UsingImplicitTools()

json FormIt.Tools.UsingImplicitTools ( )

Returns implicit tool mode

Returns
{...}