Best Grasshopper plugin to analyse floor plans - analysis

I'm trying to figure out the best way to analyse a grasshopper/rhino floor plan. I am trying to create a room map to determine how many doors it takes to reach an exit in a residential building. The inputs are the room curves, names and doors.
I have tried to use space syntax or SYNTACTIC, but some of the components are missing. Alot of the plugins I have been looking at are good at creating floor plans but not analysing them.
Your help would be greaty appreciated :)

You could create some sort of spine that goes through the rooms that passes only through doors, and do some path finding across the topology counting how many "hops" you need to reach the exit.
So one way to get the topology is to create a data structure (a tuple, keyValuePair) that holds the curve (room) and a point (the door), now loop each room to each other and see if the point/door of each of the rooms is closer than some threshold, if it is, store the relationship as a graph (in the abstract sense you don't really need to make lines out of it, but if you plan to use other plugins for path-finding, this can be useful), then run some path-finding (Dijkstra's, A*, etc...) to find the shortest distance.
As for SYNTACTIC: If copying the GHA after unblocking from the installation path to the special components folder (or pointing the folder from _GrasshopperDeveloperSettings) doesn't work, tick the Memory load *.GHA assemblies using COFF byte arrays option of the _GrasshopperDeveloperSettings.
*Note that SYNTACTIC won't give you any automatic topology.
If you need some pseudo-code just write a comment and I'd be happy to help.

Related

replicating trees between ACID RDB using CRDT

I'm interested in replicating "hierachies" of data say similar to addresses.
Area
District
Sector
Unit
but you may have different pieces of data associated to each layer, so you may know the area of Sectors, but not of units, and you may know the population of a unit, basically its not a homogenious tree.
I know little about replication of data except brushing Brewers theorem/CAP, and some naive intuition about what eventual consistency is.
I'm looking for SIMPLE mechanisms to replicate this data from an ACID RDB, into other ACID RDBs, systemically the system needs to eventually converge, and obviously each RDB will enforce its own local consistent view, but any 2 nodes may not match at any given time (except 'eventually').
The simplest way to approach this is to simple store all the data in a single message from some designated leader and distribute it...like an overnight dump and load process, but thats too big.
So the next simplest thing (I thought) was if something inside an area changes, I can export the complete set of data inside an area, and load it into the nodes, thats still quite a coarse algorithm.
The next step was if, say an 'object' at any level changed, was to send all the data in the path to that 'object', i.e. if something in a sector is amended, you would send the data associated to the sector, its parent the district, and its parent the sector (with some sort of version stamp and lets say last update wins)....what i wanted to do was to ensure that any replication 'update' was guaranteed to succeed (so it needs the whole path, which potentially would be created if it didn't exist).
then i stumbled on CRDTs and thought....ah...I'm reinventing the wheel here, and the algorithms are allegedly easy in principle, but tricky to get correct in practice
are there standards accepted patterns to do this sort of thing?
In my use case the hierarchies are quite shallow, and there is only a single designated leader (at this time), I'm quite attracted to state based CRDTs because then I can ignore ordering.
Simplicity is the key requirement.
Actually it appears I've reinvented (in a very crude naive way) the SHELF algorithm.
I'll write some code and see if I can get it to work, and try to understand whats going on.

Generating road mesh from a graph

Background:
I got a unidirectional planner graph, each node in the graph contains its location and to which nodes it's connected to(up to 4 nodes each one in a separated variable).
Each connection between nodes is an edge, a road segment and each node is a junction\dead end.
The road should follow a 2D polar grid layout and will be edited in runtime.
This will be used as a road-building tool for city building game.
I'm using UE4 C++ and I'm pretty new to procedural generation.
The issue:
I'm looking for some guidance on how to generate the topology.
1. What algorithms\method\technic\math I should use or know about?
2. If I should use the extrude method then how do I include the junctions?
3. Where should I have overlapping verts? (other then places where I need to cut for UVs)
4. How do I incorporate sidewalk to the road segments and the junctions
Research:
The best way that I found is basically the extrude method which seems too primitive and will be problematic with intersections since it requires to lookup verts locations which seems extremely inefficient.
More details about the graph:
https://gamedev.stackexchange.com/questions/179214/generate-road-mesh-from-a-graph
(I'm posting here because game dev seems to be pretty dead sadly)

Change in two 3D models

I'm trying to think of the best way to conduct some sort of analysis between two 3D models of the same object.
The first scan is of the original item and the second scan is after it has been put under some load x.
An example would be trying to find the difference between two types of metal.
I would like to be able to scan the initial metal cylinder, apply a measured load, scan it again, and then finally apply some sort of algorithm to compare the difference.
Is it possible to do this efficiently (maybe using Mablab) over say 50 - 100 items for an object around 5inch^3?
I am assuming I will need to work out some sort of utility function as the total mass should be the same?
Would machine learning be beneficial in this case?
Any suggestions or direction would be amazing.
Thank you :)
EDIT: The scan files are coming through as '.stl'

Algorithm to map out a closed maze and remember how it looks for future use

I'm working on a project where I'll have an agent in a random maze, and this maze does not have an exit. The goal would be for the agent to explore the maze and 'remember' how it looks. After some time I'll spawn an item at a random location and the agent will be notified only if it has mapped out that given area. The agent will use the map it has generated to determine the shortest path to the item.
I know of maze algorithms like A*, but these algorithms require a start and end position for the traversal to stop. These algorithms don't 'remember' how the maze looks they just determine the shortest path between two points. Since the maze is closed there is no end position. My initial idea was to have the agent travel randomly and fill in a 2D array of how the map looks, this just seems inefficient to me. Any ideas would be great.
So you will have two steps, exploration and traversing.
Suppose you have explored the maze completely, then when the item appears, you can just use A* with goal being the item.
To explore the map and store it, you can create a data structure appropriate for the map. For example, if the connecting paths don't matter and only the conjunctions do, then just create a Node class where each node has a list of connected nodes. Finally, you can start a breadth-first search or depth-first search to explore the whole map, while storing the info in the aforementioned data structure.
Depending on the actual map, either exploration algorithms might be more effective. I'd start with depth-first though, since that sounds similar to our human approach to mazes - always turn in the same direction at an intersection! (Good that dfs takes care of circular paths!)

Entity resolution for venues and other geo locations

Say I want to build a check-in aggregator that counts visits across platforms, so that I can know for a given place how many people have checked in there on Foursquare, Gowalla, BrightKite, etc. Is there a good library or set of tools I can use out of the box to associate the venue entries in each service with a unique place identifier of my own?
I basically want a function that can map from a pair of (placename, address, lat/long) tuples to [0,1) confidence that they refer to the same real-world location.
Someone must have done this already, but my google-fu is weak.
Yes, you can submit the two addresses using geocoder.net (assuming you're a .Net developer, you didn't say). It provides a common interface for address verification and geocoding, so you can be reasonably sure that one address equals another.
If you can't get them to standardize and match, you can compare their distances and assume they are the same place if they are below a certain threshold away from each other.
I'm pessimist that there is such a tool already accessible.
A good solution to match pairs based on the entity resolution literature would be to
get the placenames, define and use a good distance function on them (eg. edit distance),
get the address, standardize (eg. with the mentioned geocoder.net tools), and also define distance between them,
get the coordinates and get a distance (this is easy: there are lots of libraries and tools for geographic distance calculations, and that seems to be a good metric),
turn the distances to probabilities ("what is the probability of such a distance, if we suppose these are the same places")(not straightforward),
and combine the probabilities (not straightforward also).
Then maybe a closure-like algorithm (close the set according to merging pairs above a given probability treshold) also can help to find all the matchings (for example when different names accumulate for a given venue).
It wouldn't be a bad tool or service however.

Resources