Hello Casey,
I see your post interensting and suitable task for API script. Please find attached JavaScript file. It generates helix stairs for you. First create base/master stair and convent it to component. Script paterns fist component. Than create center pillar, other geometry.
It paterrns around default vertical (green) axis. See artical http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/files/WritingDebugging.htm describing how to define API script - nothing diffucult.
Paste source code and run. Enter number of stars, level distance, angle between start. Advantage: All occureneces refer to base stair, so any change made on base stair is propageted to all/each stair
When generate, save it as file STAIRS and insert it to you design like HOUSE file. Hope you will find it usefull.
Regards
Jan Priban, Autodesk
//Author-JP
//Description-tocite schody
function run(context) {
"use strict";
if (adsk.debug === true) {
/*jslint debug: true*/
debugger;
/*jslint debug: false*/
}
var ui;
try {
var app = adsk.core.Application.get();
ui = app.userInterface;
var product = app.activeProduct;
var design = adsk.fusion.Design(product);
if (!design) {
ui.messageBox('No active Fusion design', 'No Design');
return;
}
// Get the root component of the active design.
var rootComp = design.rootComponent;
var occs = rootComp.allOccurrences;
// Gather information about each unique component
var count = occs.count;
//ui.messageBox(count.toString(), 'pocet');
//jmena vsech component
var i;
//for (i = 0;i < count;++i) {
// var comp = occs.item(i).component;
//ui.messageBox(comp.name, 'jmeno');
//}
//var comp = occs.item(0).component;
//var jmeno = comp.name
//ui.messageBox(jmeno,'jmeno');
// Prompt the user for a string and validate it's valid.
var StairsCount = '20'; // The initial default value.
// Get a string from the user.
var objIsCancelled = [];
StairsCount = ui.inputBox('Enter Stairs Count', objIsCancelled, 'Stairs Count', StairsCount);
// Exit the program if the dialog was cancelled.
if (objIsCancelled.value) {
adsk.terminate();
return;
}
// Prompt the user for a string and validate it's valid.
var StairsAngle = '20'; // The initial default value.
// Get a string from the user.
var objIsCancelled = [];
StairsAngle = ui.inputBox('Enter Stairs Angle [deg]', objIsCancelled, 'Stairs Angle', StairsAngle);
// Exit the program if the dialog was cancelled.
if (objIsCancelled.value) {
adsk.terminate();
return;
}
// Prompt the user for a string and validate it's valid.
var StairsLevelDistance = '100'; // The initial default value.
// Get a string from the user.
var objIsCancelled = [];
StairsLevelDistance = ui.inputBox('Enter vertical distance between 2 stars [mm]', objIsCancelled, 'Stairs Level Distance', StairsLevelDistance);
StairsLevelDistance = StairsLevelDistance / 10;
// Exit the program if the dialog was cancelled.
if (objIsCancelled.value) {
adsk.terminate();
return;
}
// Use the value for something.
//ui.messageBox('User entered ' + StairsCount );
// Create a new occurrences.
var trans = adsk.core.Matrix3D.create();
var pi = 3.1415927;
for (i = 1; i < StairsCount; i++) {
trans.setToRotation(3.1415/180*StairsAngle*i,adsk.core.Vector3D.create(0,1,0),adsk.core.Point3D.create(0,0,0));
trans.setCell(1, 3, StairsLevelDistance*i);
var newOcc = rootComp.occurrences.addExistingComponent(occs.item(0).component, trans);
}
}
catch (e) {
if (ui) {
ui.messageBox('Failed : ' + (e.description ? e.description : e));
}
}
adsk.terminate();
}
