Mathias Lange 1 Posted December 6, 2018 (edited) Hey Community, is it possible or is there a script, that show me automaticly the smallest dimension of a space in a table. So in the example, that is in the table - 1,35m - because of the escape route wide. The answer can be in german. Best regards Mathias Lange Edited December 6, 2018 by Mathias Lange Share this post Link to post

DomC 180 Posted December 6, 2018 (edited) For sure, this is possible. But not an easy chase. It looks really interesting to solve that kind of task. Regardless the question if this would be a time-saving script. I see a lot of spaces in my life and most of them are much more simpler than that and a space contour like this maybe exists for less than 5% of the spaces. OK, in a big project with 3500 spaces, there could be still 150 spaces like this (corridors etc.) with critical minimum space. But what I know, just the initial question for every time consuming Project. OK, the possible procedere for this: 1. Find an algorithm, to check the distances. If the spaces could have every form and angles, the solution would result in a much higher complexity. 2. If the spaces are at 90° angles, it could be a simple strategy like draw a (two in both directions but just use the one, which do not hit a space bound line) perpendicular line on every edge and check where it collide with another boundary line. It would fail with freeform (or inaccurate) spaces but is relatively simple: If the strategy matches, you will have further hurdles. 3. How to extract polygon from space 4. How to check intersection of perpendicular lines 5. How to check which direction line has to be checked 6. how to mark at least the smallest passage (I think in the middle of the line from which the edge line was generated the smallest distance) Interesting. A Script which detects smallest passage in a space. But if you will transport bigger objects and check if they stuck somewhere this is maybe not exact enough because you have to turn things around the edges (We know that from apartment relocation :-) Edited December 6, 2018 by DomC 1 Share this post Link to post

Mathias Lange 1 Posted December 7, 2018 Thanks DomC for your answer. I need it only for orthogonal spaces. We plan in 98% orthogonal spaces. The 2% nonorthogonal rooms, i would check manually. 😆 So do you have a script like this or an Idea for the script? Best regards and thanx alot. Mathias Lange VWX | BIM | CADmin Share this post Link to post

DomC 180 Posted December 10, 2018 (edited) Quote So do you have a script like this or an Idea for the script? The Idea was yours. Some good Scripts resulted of Ideas of real-existing exercises. I did not had that idea, because it is costly and the benefit may be low. I could give you an plan for the methode: 1. Make Polygon Clockwise (because you minimize number of solutions) 2. Define Vectors on every Polygon Edge which are perpendicular (let's call them measure lines) 3. Intersect measure lines with every line of the bounding polygon. Filter shortest intersection lines for every line 4. Draw perpendicular line from vertexes on every edge of the polygon and filter shortest lines 5. Filter measure lines of concave parts of the space polygon for getting out polygon out of space and refer to correct coordinates, just get object path node (which do not exists yet) use entity matrix on it (to refer to correct coordinates and angle) Maybe there was a pan-ready solution with shapely, numpy or other python packages. You will feel free, if you accomplish that by yourself ... 🙂 I did some work for that question. But I have to pause that until next year. Main issue (I would have to start new with perpendicular on edge method but I consumed my time for this with the perpendicular on vertex method). Which would do the job but is not the best solution. As you can see, this Script Version produces some measure lines, which we don't want do have (the concave parts). Also Diagolan Distances are not measured. Also perpendicular distances on edges are not measured (which is not necessary, if spaces are orthogonal) This Method will fail for non-orthogonal spaces. Which bother me now. The perpendicular on edge methode would be much bether. Also the concave parts for non-orthogonal shapes could be very tricky. For orthogonal parts i think it can be done for just delete parts, which have a continuation line with same direction (At least it looks like this). Maybe this all can be solved with the perpendicular measure on edge method (which looks now like a propper solution but maybe could be the wrong direction) Screenshot, where you can see, why this do not work on non-orthogonal spaces I hope, you unterstand what I did in the script and are able to continue your work on this. Some of the biggest puzzle already solved. The rest is routine peace of work 🙂 I used some custom nodes for that: 1. Rotate point (an existing custom node which is the same like rotate line, but I do not like to draw lines bevor all Points are calculated). I prefer the math way 2. Line Intersection Dir nearest. It calculates of a line1 the nearest collision with the lines input in input line2. The Standard intersection do not check direction so i desided to modify standard node. also the minimum line distance was hard to sort out. 3. Sort nested list (an existing one. Hard so sort several objects and values all by one type without that) smallest distance beta 0.8.0.vwx Edited December 10, 2018 by DomC Share this post Link to post

STERNontwerp 9 Posted December 12, 2018 This might help, although it has not been done with the original poly. It gives the inner corners, the only corners that need to be checked. (If a node would exist that enabled a change of the start vertex of a poly, marionette-live would be a lot easier.) Ernst van der Vecht smallest distance beta 0.8.0 _EV.vwx 1 2 Share this post Link to post

DomC 180 Posted December 12, 2018 Incredible clever to use an offset poly to detect inner corners! This can kill seven with one strike. Smallest distances would result on a combination of perpendicular lines from corners on edges on the right side of a cw polygon. And distances between inner corners which do not cross outer poly offset (still excited about that creative offset poly method). @STERNontwerp Great contribution Share this post Link to post

DomC 180 Posted December 27, 2018 @STERNontwerp In your example you add 1 to last poly point (29) and check poly for index vertex 30. This returns 0 on my machine. Did I miss something? 1. Measure strategies We need two measure strategies. Perpendicular from every vertex point on every edge and from every point to every point 2. Filter strategies (We need several filter strategies) a. Filter results which measure outside the poly. Can be done with the "Nortwerp" Method. Check for intersection with this parallel poly. b. Filter results which measure end, hits a vertex point. c. Filter results, which are infinite or 0 I made an example which uses "vertex-point-perpenticular-on-edges" method. which solves orthogonal spaces. The point diagonal measures I did not implemented here yet. But now, what makes a break now. The issue, if I want to check several spaces. with a script like this. I think some list absorber nodes, will not be able to handle more than one poly input. The easiest and fastest solution maybe would be, to just make one node for this. To be truth I can't see another solution at the moment for this task. By the way, it would not be dumb, to have one node for this. 3. Visualisation: One of the next questions will be, how to visualize the result. There could be: a. Shortest distance, shortext x distances b. Distances less than x c. Colors d. .... The strategy I think is OK. The actual (attached) Version will solve ONE orthogonal, non rectangular space. With checking the points, the rectangular bound will solve automatically, also edge distances will be combined. I used colors. Red are short distances, green are long distances. Colors seems not the right way to mark small passages, but I tried out. smallest distance beta 0.8.3.vwx Share this post Link to post

STERNontwerp 9 Posted January 9 @DomC: I have changed the network, so that the last +1 vertex = vertex 0. As it is, the inner corners come in pairs. With a non-orthogonal shape they don't, so this network only works fully in a orthogonal shape. (But even when not working fully, it eliminates some of the vertices in non-ortho shapes, see below.) smallest distance beta 0.8.0 _EV2.vwx Share this post Link to post

DomC 180 Posted January 16 (edited) I worked on a node the last weeks over holiday season. The Node calculates all perpendicular distances from vertexes to edges and all distances from edges to edges. It filters some distances and returns the wanted number of small distances. 70% of the work was to separate the polygons (handling of the sequences), 20% was to synchronize and handle calculated values (1.987456879136870 identical with 1.987456879136869 or not)digits of the values of different measure lines. I hope it can help to solve the real task. https://forum.vectorworks.net/index.php?/files/file/193-polygon-survey/ The next step would be to evaluate a kind of "walking" line. So separate important and non important distances. Also it maybe would be an other good approach to "move" a circle or a square trough the polygon to evaluate distances. Hole also not implemented yet in my node. Edited January 16 by DomC 1 Share this post Link to post