//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
namespace Revit.SDK.Samples.StairsAutomation.CS
{
///
/// The base interface for a single stairs run.
///
public interface IStairsRunComponent
{
///
/// Causes the run to be created.
///
/// The stairs must be properly set in the stairs edit mode, with an open transaction.
/// The document.
/// The stairs id.
/// The new stairs run.
StairsRun CreateStairsRun(Document document, ElementId stairsId);
///
/// The bottom elevation of the run.
///
double RunElevation
{
get;
}
///
/// The top elevation of the run.
///
/// Thrown if the stairs run has not been created, and this cannot be calculated without it.
double TopElevation
{
get;
}
///
/// The width of the run.
///
double Width
{
get;
set;
}
///
/// Gets the path of the stairs run.
///
/// This is not guaranteed to succeed if the run has not been created.
/// The stairs path.
/// Thrown if the stairs run has not been created, and this cannot be calculated without it.
IList GetStairsPath();
///
/// Gets the first tread line for the run.
///
/// This is not guaranteed to succeed if the run has not been created.
/// The first curve.
/// Thrown if the stairs run has not been created, and this cannot be calculated without it.
Curve GetFirstCurve();
///
/// Gets the last tread line for the run.
///
/// This is not guaranteed to succeed if the run has not been created.
/// The last curve.
/// Thrown if the stairs run has not been created, and this cannot be calculated without it.
Curve GetLastCurve();
///
/// Gets the endpoint of the run for purposes of locating the next run.
///
/// If the run "start point" is the lower left corner of the two dimensional projection of the run, this is the "upper right".
/// This is not guaranteed to succeed if the run has not been created.
/// The endpoint.
/// Thrown if the stairs run has not been created, and this cannot be calculated without it.
XYZ GetRunEndpoint();
}
}