distance to 2d area
distance to 2d area receives any 3D field into its left input port and it receives triangulated polygons (from triangulate_polygon, or other sources) into its right input port. Its function is similar to buffer distance or distance to shape. It adds a data component to the input 3D field and using plume_shell, you can cut structures inside or outside of the input polygons. Only the x and y coordinates of the polygons are used because distance to 2d area cuts a projected slice that is z invariant. distance to 2d area recalculates when either input field is changed or the "Accept" button is pressed.
Module Input Ports
- Input Field [Field] Accepts a data field.
- Input Area [Field] Accepts a field with the area to include/exclude
Module Output Ports
- Output Field [Field] Outputs the field with area data to allow subsetting
The first thing to know, is that distance to 2d area does not cut.
It provides data with which you can then subset using other modules like plume or intersection.
Without the subsetting modules AFTER distance to 2d area, you would see no affect of having distance to 2d area in your application other than it adds a new nodal data component called distance to 2d area (or whatever you've renamed your module to be).
distance to 2d area needs a SURFACE as its input. It does not care where that surface comes from and it certainly does not need to be from a DWG file. The surface can be complex, meaning that it can have holes in it, or it can be separate disjoint pieces of surface(s).
If you're starting with lines, it is required that the lines form a closed polyline. It is not enough that the lines appear to be a closed path, they must be truly closed, with each successive segment precisely connected to the last and next. CAD files are often poorly drawn and are not closed (though they can be well drawn and properly closed also).
Our draw_lines module can certainly be used to create a Closed polyline, but you must make sure to turn on the "Closed" toggle for each line segment to ensure it is closed.
Once you have one or more closed polylines, you will need to pass those through triangulate_polylines modules to create a TIN surface from the closed polylines. You should confirm (by connecting it to the viewer) that you are getting the correct surface before proceeding to distance to 2d area. If triangulate_polylines will not run, your lines are not closed.
Once you have your surface(s) and you pass that to the right input port of distance to 2d area, the output of distance to 2d area is data with which you can subset your original model. The data is zero (0.0) at the boundaries of your surface: is less than zero (negative) inside the surface; and is greater than zero (positive) outside of the surface. To get everything inside, you need to choose "Below Level" in the subsetting modules rather than the Default "Above Level".