Jump to content
Developer Wiki and Function Reference Links Read more... ×
Mathias Lange

Space dimensions

Recommended Posts

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

Bildschirmfoto 2018-12-06 um 11.46.06.png

Edited by Mathias Lange

Share this post


Link to post

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:

118743750_Bildschirmfoto2018-12-06um23_14_50.thumb.png.7a8e62f22066ce0125afc41b252a5b9c.png

 

 

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 by DomC
  • Like 1

Share this post


Link to post

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
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.

 

1681940301_Bildschirmfoto2018-12-10um22_34_16.thumb.png.92920921942d7123aec9787c8d319701.png

 

 

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

2111586035_Bildschirmfoto2018-12-10um22_56_32.thumb.png.de37408f7aecd01c3d217692003e77ca.png

 

 

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 by DomC

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×