【问题标题】:REVIT API: Split a roof or floor in a 3D-wayREVIT API:以 3D 方式拆分屋顶或地板
【发布时间】:2016-11-29 21:48:03
【问题描述】:

我被要求将地板或屋顶分成几部分。我可以像Parts, Assemblies, PartUtils and DivideParts 中描述的那样以二维方式这样做。

这很好用。您基于一个面创建一个曲线列表,然后 DivideParts 将对象分成几个部分。

      foreach( Face face in faceArray )
  {
    // find the center of the face
    BoundingBoxUV bbox = face.GetBoundingBox();
    // Some other code
  }
// Create the curves that will be used for the part division.
IList<Curve> curveList = new List<Curve>();
Curve curve1 = app.Create.NewLine( pointCenter, pointRight, true );
curveList.Add( curve1 );
Curve curve2 = app.Create.NewLine( pointRight, pointCorner, true );
curveList.Add( curve2 );
Curve curve3 = app.Create.NewLine( pointCorner, pointTop, true );
curveList.Add( curve3 );
Curve curve4 = app.Create.NewLine( pointTop, pointCenter, true );
curveList.Add( curve4 );

// intersectingReferenceIds will be empty for this example.
ICollection<ElementId> intersectingReferenceIds = new List<ElementId>();

// Divide the part
Transaction dividePartTransaction = new Transaction( doc, "Divide Part" );
dividePartTransaction.Start();
PartMaker maker = PartUtils.DivideParts( doc, elementIdsToDivide, intersectingReferenceIds, curveList, sketchPlane.Id );
dividePartTransaction.Commit();

我还希望能够以 3D 方式拆分对象。所以不仅在 X 和 Y 方向上,而且在 Z 方向上。

由于此方法基于 Face 和 BoundingBoxUV(二维),我看不出最好的方法是什么。

为了明确我想要完成的任务,我附上了一张屋顶的图片,分为几部分 bij Revit。我也想拆分红线所示的屋顶。

Roof divided in Parts

【问题讨论】:

    标签: c# api autodesk revit


    【解决方案1】:

    经过反复试验,我将屋顶分成多个单独的部分(10 厘米厚),然后将每个部分分别分成较小的部分(1m x 1,20m)。所以它必须是一个两阶段的过程。似乎不可能在 1 阶段做同样的事情。

    Roof split in parts of 10 cm thick

    Each part split in parts of 1m by 1,2 m

    【讨论】:

      猜你喜欢
      • 2018-04-04
      • 2018-12-17
      • 1970-01-01
      • 2013-02-02
      • 2017-01-14
      • 2012-10-27
      • 2019-08-06
      • 2014-01-31
      • 2015-12-19
      相关资源
      最近更新 更多