繁体   English   中英

从墙的边缘,开口的侧面到墙的另一边缘创建尺寸

[英]Create Dimensions from edge of wall, to sides of openings, to other edge of wall

一年的大部分时间里,我一直在努力解决这个问题。 就像标题所说,我希望从墙壁的一侧到开口的两侧(门的开口)的尺寸,然后在墙壁的另一端(垂直和水平)终止。 我也希望了解所有隔离墙中的家庭,但是我已经能够使用ScottWilson的voodo魔术助手类来完成此任务。 在这里找到: http : //thebuildingcoder.typepad.com/blog/2016/04/stable-reference-string-magic-voodoo.html

foreach (ElementId ele in selSet) {
            FamilyInstance fi = doc.GetElement(ele) as FamilyInstance;
            Reference reference = ScottWilsonVoodooMagic.GetSpecialFamilyReference(fi,ScottWilsonVoodooMagic.SpecialReferenceType.CenterLR,doc);
            refs.Append(reference);
            pts[i] = ( fi.Location as LocationPoint ).Point;
            i++;
        }

        XYZ offset = new XYZ(0,0,4);
        Line line = Line.CreateBound( pts[0]+offset, pts[selSet.Count - 1]+offset );


        using( Transaction t = new Transaction( doc ) )
        {
            t.Start( "dimension embeds" );
            Dimension dim = doc.Create.NewDimension(doc.ActiveView, line, refs );
            t.Commit();
        }

问题在于确定对壁面的适当稳定参考。 我能够找到墙上的所有面孔,但这使我可以分类100多个面孔。

如果有人可以帮助我,将不胜感激!

旁注:最接近的是通过面板投射光线轨迹,然后使用参考相交方法确定参考。 但是我真的很难实现: http : //thebuildingcoder.typepad.com/blog/2015/12/retrieving-wall-openings-and-sorting-points.html

这两篇文章应该足以解决您的所有问题:

基本上,您需要获取要附加尺寸标注的面或边的参考。 这些参考可以通过几种方式获得。 两种常见且简单的方法是:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM