int "ANGLE_LIMIT: ",AngleLimitB # 0-180 input sliderSHARP_MESH_FACES = MESH.Faces.GetConnectedFaces(0,math.radians(180-AngleLimitB),False)print "Size of sharp mesh face array: ",len(SHARP_MESH_FACES)print SHARP_MESH_FACES
Results in this sort of thing for a large mesh:
There are: 13394 faces.ANGLE_LIMIT: 160.0Size of sharp mesh face array: 46Array[int]((0, 1, 2, 3, 5, 553, 554, 4, 7162, 7163, 549, 556, 7159, 550, 7158, 7165, 551, 552, 7167, 558, 7160, 7161, 557, 7026, 417, 7166, 560, 7016, 407, 559, 7169, 408, 7017, 7168, 7014, 7164, 405, 555, 8, 406, 7020, 7, 411, 7015, 6, 110))
What is that array?! It's not always even length, so it's not pairs. The command page says about GetConnectedFaces: "Find all connected face indices where adjacent face normals meet the criteria of angleRadians and greaterThanAngle." The first parameter is the face to start on, so I used 0 to start at the beginning. As I move the angle limit slider it does grab more and more hits.
Why doesn't rhinocommon.chm actually tell what commands really output and how to use them in Python? UGH.…
on component list item, this index is always changing from 0 to 3 , while for the first entry must be 3, I set a definition but do not know if this is the best solution. Let me know
regards Massimiliano…
ectural project, the efficiency of design communication and the control of information-flow are as important as the creativity of ideas. In response to the concurrent digital evolution emerging in the architectural industry world-wide, the Faculty of Architecture at The University of Hong Kong will host a two week intensive summer program named Digital Practice.Led by professors from The University of Hong Kong, as well as invited practitioners with expertise in practice of cutting edge digital techniques, the program offers participants opportunities to experience applications of computational tools during different stages of an architectural project, i.e. concept design, form finding and optimization, delivery, management and communication of design information under the team-based working environment. By learning advanced computational techniques through case studies in the context of Hong Kong, participants are expected to go beyond the conventional perception of technology, considering users and tools as a feedback-based entity instead of a dichotomy. The program, which is taught in English, includes a series of evening lectures related delivered by teaching staff and invited local architects.對於高品質的建築專案,創意之外,專案過程中高效的設計資訊管理和交流成為項目設計深化和實施必不可少的環節。今天,數字化技術不但改變了建築師的繪圖工具,影響了設計的過程,而且提供了工程建造和管理實施的更有效、更高效的手段。針對建築的數位化演進,香港大學建築學院將於2011年暑假期間,在香港大學建築學院舉辦“數位化實踐”國際研習班。在香港大學建築學院教授及有著相關豐富經驗的外聘實踐建築師的指導下,學員將有機會體驗在專案的不同階段(如概念設計、設計形式的生成、優化,設計資訊的管理和交流),如何有效地應用各種運算智慧化技術(從設計的數位化生成和建築資訊類比到物理模型),提升設計實施的品質,增加設計團隊對於方案的控制。我們將挑戰對於“技術”的傳統認知,即相對於使用者它不僅是工具,更是與使用者互動的媒介,二者形成一個有機的合體。研習班期間會安排系列講座,展現數位化技術在實踐工程中的廣泛應用。…
d the Pts from 1 to the List 2 of reduced Points.
4. Sort the List VS the curve (or use some smart way to properly "insert" Pts from 1 to Pts from 2).
public List<Point3d> SortPointsAlongCurve(List<Point3d> points_list, Curve sorting_curve) { points_list.Sort((point1, point2) => { double point1_t = 0; double point2_t = 0; sorting_curve.ClosestPoint(point1, out point1_t); sorting_curve.ClosestPoint(point2, out point2_t); return point2_t.CompareTo(point1_t); }); return points_list; }
or
public List<Point3d> SortPointsAlongCurve2(List<Point3d> pList, Curve curve) { List<Point3d> pSorted = new List<Point3d>(); List<Point3d> pClosest = new List<Point3d>(); for(int i = 0; i < pList.Count;i++){ double t; curve.ClosestPoint(pList[i], out t); pClosest.Add(curve.PointAt(t)); } Point3d pPrev = pClosest[0]; Rhino.Collections.Point3dList points = new Rhino.Collections.Point3dList(pClosest.Skip(1).ToList()); for(int i = 1; i < pClosest.Count;i++){ pSorted.Add(pPrev); int ind = points.ClosestIndex(pPrev); Point3d pNext = points[ind]; points.RemoveAt(ind); pPrev = pNext; if(i == pClosest.Count - 1) pSorted.Add(pPrev); } return pSorted; }
5. Do some Polyline or Nurbs .…