Detecting Presence of Another Group next to a Selected Point(s)

I’m currently working on the auto-corner configuration for the upcoming wall plugin. The idea with this feature is that the plugin or tool will detect the presence of another wall(s) if its start and end corners are placed within a certain distance of these other walls. Once I’ve detected their presence I will drill down into the attribute library of the other wall panel groups, grab their length etc… and also determine the angle between these walls and new wall that I am creating. Based on that information I can then determine if the new wall should have end, outside corners, inside corners, tee corners etc…

Maybe it is just too early in the morning but I’m having troubling trying to come up with a way to efficiently detect another wall. My initial thought is to try and use the bounding box method or something along those lines.

I figured it might not hurt to put this question out there so that I don’t get too far down the wrong path.

Perhaps use Model#raytest to probe in the direction of the edges of the wall?

1 Like

Depending on the direction of the other wall (the one I am trying to detect) the raytest method might entirely miss this other wall.

So far the bounding box method(s) look the most feasible.

My idea is to create a new bounding box by assigning the start point of the new wall and some arbitrary additional points to this new bounding box, forming a square around the start point of the new wall. Then check to see if this contains any of the existing walls.

Glad to hear you are working on a WALL plugin. I have long contended that the absence of any kind of wall element (ie: a face with constant thickness) is the single most important missing feature of SketchUp. Try selling a CAD system to an architect where you can’t DESIGN a floor plan (by which I mean iteratively edit and adjust an arrangement of walls and openings).
I believe it is very doable as a plugin and completed substantial work to that end myself. However, I stopped work when I realized I needed to be able to load what SketchUp calls a “local collection” of components representing different kinds of wall openings. That’s not supported in the Ruby API. I decided that loading such components into the list of all current components would result in an unworkable interface. All workarounds I explored just didn’t cut it.

1 Like

The thread is here if you are interested in following the development:

I strongly agree, the SketchUp environment is intuitive and cool but seriously lacking in a lot of ways for a professional designer. Plugins need to fill that gap. I am attempting to create a product in a few weeks that can rival the big hitters like Revit and Chief Architect, I know I probably won’t even come close but I’ll give it my best shot.

So I see what you are doing and it has more to do with construction detailing. I’m talking about preliminary design of an overall floor plan as an arrangement of only these 3 objects: rooms, walls, openings. What you would see on any condo brochure. For 90 of all buildings, the first step is siting (see my 2DXY SiteSurvey extension) and the second a basic floor planning before anything 3D.

1 Like

Yes, it will be able to provide a full 3D model but you will also be able to operate it in 2D mode just for layout purposes as you suggest.

(For reference) the discussion thread for this is … Open a Local collection of component definitions in ruby

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.