本文整理汇总了C#中Wall.GetAnalyticalModel方法的典型用法代码示例。如果您正苦于以下问题:C# Wall.GetAnalyticalModel方法的具体用法?C# Wall.GetAnalyticalModel怎么用?C# Wall.GetAnalyticalModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wall
的用法示例。
在下文中一共展示了Wall.GetAnalyticalModel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetWallGeom
/// <summary>
/// get necessary data when create AreaReinforcement on a straight wall
/// </summary>
/// <param name="wall">wall on which to create AreaReinforcemen</param>
/// <param name="refer">reference of the vertical straight face on the wall</param>
/// <param name="curves">curves compose the vertical face of the wall</param>
/// <returns>is successful</returns>
public bool GetWallGeom(Wall wall, ref Reference refer, ref CurveArray curves)
{
FaceArray faces = GeomUtil.GetFaces(wall);
LocationCurve locCurve = wall.Location as LocationCurve;
//unless API has bug, locCurve can't be null
if (null == locCurve)
{
return false;
}
//check the location is line
Line locLine = locCurve.Curve as Line;
if (null == locLine)
{
return false;
}
//get the face reference
foreach (Face face in faces)
{
if (GeomUtil.IsParallel(face, locLine))
{
refer = face.Reference;
break;
}
}
//can't find proper reference
if (null == refer)
{
return false;
}
//check the analytical model profile is rectangular
AnalyticalModel model = wall.GetAnalyticalModel() ;
if (null == model)
{
return false;
}
IList<Curve> curveList = model.GetCurves(AnalyticalCurveType.ActiveCurves);
curves = m_currentDoc.Application.Create.NewCurveArray();
foreach (Curve curve in curveList)
{
curves.Append(curve);
}
if (!GeomUtil.IsRectangular(curves))
{
return false;
}
return true;
}
示例2: Stream
private void Stream( ArrayList data, Wall wall )
{
data.Add( new Snoop.Data.ClassSeparator( typeof( Wall ) ) );
data.Add( new Snoop.Data.Double( "Width", wall.Width ) );
data.Add( new Snoop.Data.Object( "Wall type", wall.WallType ) );
data.Add( new Snoop.Data.Bool( "Flipped", wall.Flipped ) );
/// uncomment this to see the length of the wall
//data.Add(new Snoop.Data.Double("Length", wall.get_Parameter( Autodesk.Revit.Parameters.BuiltInParameter.CURVE_ELEM_LENGTH).AsDouble()));
// TBD: Curtain Wall throws an exception when the Orientation property is accessed
// Exception of type 'System.Exception' is thrown.
//if (wall.WallType.Kind != WallType.WallKind.Curtain)
try
{
data.Add( new Snoop.Data.Xyz( "Orientation", wall.Orientation ) );
}
catch( Exception ex )
{
data.Add( new Snoop.Data.Exception( "Orientation", ex ) );
}
data.Add( new Snoop.Data.Object( "Curtain grid", wall.CurtainGrid ) );
data.Add( new Snoop.Data.String( "Structural usage", wall.StructuralUsage.ToString() ) );
// TBD: Crash-Assert if called on Non-Bearing wall (seems a little harsh)
//if (wall.StructuralUsage != WallUsage.NonBearing)
data.Add( new Snoop.Data.Object( "Anaylytical model", wall.GetAnalyticalModel() ) );
}