The RoomSurveyor plugin was recently updated to version 0.7.0.1 and added to the list of supported plugins on ShapeDiver platform. You can download the newest version from Food4Rhino as usual or alternatively install it without leaving Rhino7 using the new PackageManager command.
What is new?
This version is mostly focused on fixing some issues with existing components and improving their functionality. Despite this, there are some breaking changes to the IsPointLeft and the ArePointsLeft components APIs.
The new version of the IsPointLeft component has 4 inputs (3 points and 1 plane) and 4 outputs (1 integer and 3 points). The plane is the XY plane by default, so the component may be used as previously. The 3 added outputs return the input points projected to the provided plane. Similar changes were made to ArePointsLeft component.
RoomSurveyor + ShapeDiver
The core focus of this plugin is to provide a low-key survey workflow that can be run on the web. Supporting RoomSurveyor on ShapeDiver is a logical step to provide the plugin functionality to wider group of users that do not want to venture on setting up their own servers running RhinoCompute. With ShapeDiver, designers may build parametric models that are boundary dependent (e.g. partition walls, suspended ceilings, floors, windows, kitchen furniture, etc…) using no code. Yet, there are some important limitations that this solution currently has:
- ShapeDiver doesn’t yet allow to draw on the webpage canvas. This forces the end-user to draw the room morphology by other means and provide it as a file input.
- The second step of the survey workflow is to measure the room sides and provide them in the correct order to the algorithm. Since it is not possible to know à-priori how many sides the user polygon will have, we must use an open text field for the user to provide the room side lengths. This has some important risks compared with other solutions such as HTML Forms for instance.
- The third step has similar limitations as the previous point, the diagonals must be collected on an open text input.
With that out of the way, a simple algorithm is as follows:
I use the ShapeDiver Geometry File Import component, the geometry is pretty simple so setting it to dxf will do. To enter the Side and Diagonal measurements I use a ShapeDiver TextInput with the standard length limit. Don’t forget to edit the description of the component so it displays relevant information for your users (e.g.: Diagonals comma separated values). We can input the polygon geometry directly to the P input the RoomSurvey component, but we have to do some string processing before we provide measurement values to their respective inputs. First, we need to split the text using the separator of our choice (comma in this case), then we simply make sure that there are no empty spaces around our values. For the diagonals some extra steps are required to deal with the possibility that no diagonal as been provided yet. We cast (convert implicitly) the value from string to number first because empty strings are not null, and then use the null value check to see if our user has not provided any diagonal yet and direct the flow according to the boolean value we get from the null check component.
This gets RoomSurvey algorithm working, but we still need to make the life of the user simple by showing meaningful instructions and displaying the correct geometry. The minimal set of instructions is labeling the corners and providing information on which diagonals to measure or if there is some problem with the measured diagonals. For the geometry, we should at least paint the polygon to display it in 2D. In the image bellow, I’m creating walls and a floor so the user can provide the height of the space and view it in 3D. In the inputs, there are controls for color of the polygon fill, color of the border or wall, color of the text instructions, text scale factor, wall thickness, space height, and boolean to select if the space is viewed in 2D or 3D.
The Space Plan polygon input should be feed with the provided morphology while the polygon is not triangulated. To ensure this I’m using the Pick’n’Choose component controlled by the T output of the RoomSurvey component. This ensures the user is always looking at meaningful information relevant to the survey workflow stage. We use the same T output to control the display of the diagonals measuring instructions. In the image bellow you find three simple algorithms:
- To display a dimension line highlighting the correct diagonal to measure
- To display a text instruction bellow the morphology [User Requests].
- To number the corners of the polygon [Numbering Corners]
The Room Morphology input is connected to the R output of the Pick’n’Choose discussed earlier. Within the Numbering Corners algorithm I’m using two RoomSurveyor components, InternalAngles and OrientPoly. The reason OrientPoly is being used here is to ensure the user provided morphology is counter-clockwise oriented. This is also done internally by the RoomSurvey component. Worthy of note here is that I’m scaling the text as a proportion of the polygon size and user provided factor. The output [Text Size] is then used by both of the algorithms above it. User Requests collects its input of the same name from the out output of the RoomSurvey component.
The last part is to send the geometry to the ShapeDiver viewer. The image bellow is self-explanatory, I just collect all the relevant geometric outputs and use the boolean input available to the user to control if the geometry is displayed in 2D or 3D. As this is a very simple example, no particular effort is done to control the mesh that is generated.
You can play with this configurator on the ShapeDiver platform here.