Dear Members,
I am stuck. How can I generate an surface out of lines (curves) if both surfaces share one line?
Thanks a lot!
Dear Members,
I am stuck. How can I generate an surface out of lines (curves) if both surfaces share one line?
Thanks a lot!
Try using after PolyCurve.ByJoinedCurves the node Surface.ByPatch
Thank you for your prompt reply. Iâve already tried your approach - with the same result
How are you getting your elements? What are they?
At the moment just a model line out of revit. In the future I want to analyze a DWG/DXF Layer for surfaces and areas. (With the CAD.CurvesFromCADLayers node)
Maybe the next challenge is to group or order the curves by itâs geometry, not by âcreation orderâ
Perhaps try a mesh.
Sure, you are absolutely right. But at more than 100 or 1000 Elements it will be a lot of work that is not automated. That is not the goal.
in which way? It would give me just points, or am I missing something?
Hi @Kiwi
Could you share rvt file here? Use dropbox/google drive if youâre unable to attach rvt here.
sounds to me like you want to analyze topology. I think there are some packages that do this very well⌠but DynamoUnfold has some classes to do it.
@Kiwi Try this for kiwi.dyn (28.7 KB)
@Kiwi The Design Script below should do the needful. Though it might need fine tuning.
If you prefer nodes, you could use this as a reference to do so.
//Coordinate values need to be rounded in this case
sp = Point.ByCoordinates(Math.Round(lns.StartPoint.X,3),
Math.Round(lns.StartPoint.Y,3),Math.Round(lns.StartPoint.Z,3));
ep = Point.ByCoordinates(Math.Round(lns.EndPoint.X,3),
Math.Round(lns.EndPoint.Y,3),Math.Round(lns.EndPoint.Z,3));
//All Vertices (Start and End Points of Lines)
a = Point.PruneDuplicates(List.Flatten([sp,ep],-1));
//Index of Start and End Points in list of Vertices
b = List.Transpose([List.IndexOf(a,sp),List.IndexOf(a,ep)]);
c = List.Flatten(List.Permutations(b,3)<1>,-1);
//Obtain indices of connected vertices
d = List.GetItemAtIndex(c<2>,(0..5)<1>);
e1 = d[0]==d[5] && d[1]==d[2] && d[3]==d[4];
e2 = d[1]==d[5] && d[0]==d[2] && d[3]==d[4];
f = List.UniqueItems(List.FilterByBoolMask(c,e1 || e2)["in"]<1>);
g = List.UniqueItems(List.Sort(f));
h = List.GetItemAtIndex(a,g);
//Surfaces
srf = Surface.ByPerimeterPoints(h);
Thanks Michael, Kulkul & Vikram for your time and great ideas. This is really helpful and - yes, for sure - it needs some fine tuning.
@Michael_Kirschner2 Didnât have invest time yet to get into that right now. But i will go ahead with that topic later. Iâm a ânoobâ in coding with i.e. Python. This will be my next big step.
@Kulkul This procedure needs to interact with the List and much more. I want to build a âone clickâ analyzing tool for GIS floors.
@Vikram_Subbaiah Your script works pretty well with triangular surfaces with only 3 points. But i cant get to work it with for example circles/hexa/ or even triangles with 4 lines instead of 3.?! - I guess it needs some modification for every case and at the end bring alls Surfaces together in one list?
Some modifications in rvt: