Boolean Subtraction or ???

Boolean Subtraction or ???

Postby medeek » Mon Apr 03, 2017 12:04 am

I am working on the foundation plugin, in particular slabs and slab on grade foundations. I am creating a tool that allows the user to generate a polygon shaped slab, see below:



Currently the rebar or mesh is created so that it extends to the full extent of the bounding box of the slab. I would like to use the boolean subtraction that is built into SketchUp to trim the reinforcement so that it is properly contained within the slab however this feature is only available in the Pro version.

The intersect_with method is probably the next best thing but it seems like it will be quite a bit more complicated to subtract out the rebar that is external to the slab, especially where the rebar is cut in multiple locations.

I am exploring any and all options.
0
Nathaniel P. Wilkerson PE
Medeek Engineering Inc
design.medeek.com
User avatar
medeek 
PluginStore Author
PluginStore Author
 

Re: Boolean Subtraction or ???

Postby baz » Mon Apr 03, 2017 12:38 am

You might want to check out 2DBoolean by Joel G. Just the thing for this operation.
0
I am not an early bird or a night owl, I am some form of permanently exhausted pidgeon.
User avatar
baz 
 

Re: Boolean Subtraction or ???

Postby JQL » Mon Apr 03, 2017 11:11 am

Edge tool 2 split faces tool can also give you some clues.
0
User avatar
JQL 
Premium Member
Premium Member
 

Re: Boolean Subtraction or ???

Postby jolran » Tue Apr 04, 2017 9:41 am

You might want to check out 2DBoolean by Joel G. Just the thing for this operation.


I thought so to at a first glance. But then I looked closer at the Picture and it does look like the metal-net is inside the volume meaning a 3D boolean is needed. 2D-boolean plugin only have algorithms for working with planar (face) intersections.

I don't think you have any other alternatives then winding up your own intersection formula using Groups and sorting out geometry if you are not going to use PRO version boolean.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: Boolean Subtraction or ???

Postby Garry K » Tue Apr 04, 2017 10:53 pm

One option is to detect whether the user has Pro or Make. If Make - then skip the rebar. If Pro then use the available boolean functions.
0

Garry K 
Premium Member
Premium Member
 

Re: Boolean Subtraction or ???

Postby sdmitch » Wed Apr 05, 2017 1:35 am

medeek wrote:Currently the rebar or mesh is created so that it extends to the full extent of the bounding box of the slab. I would like to use the boolean subtraction that is built into SketchUp to trim the reinforcement so that it is properly contained within the slab.


What should the distance be from the end of the rebar to edge of the slab?
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: Boolean Subtraction or ???

Postby pcmoor » Wed Apr 05, 2017 8:26 am

sdmitch wrote:What should the distance be from the end of the rebar to edge of the slab?



50mm or 2 inch
0

pcmoor 
 

Re: Boolean Subtraction or ???

Postby Garry K » Wed Apr 05, 2017 7:38 pm

I have sent you a PM with a code snippet.
select the face of the slab and run the code and you will have construction points offset by 50 mm.

Adjust the code to fit your needs.
0

Garry K 
Premium Member
Premium Member
 

Re: Boolean Subtraction or ???

Postby sdmitch » Thu Apr 06, 2017 12:55 am

Not that difficult.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: Boolean Subtraction or ???

Postby medeek » Tue Apr 11, 2017 6:44 am

@Sdmitch: I'm testing your Subtract tool you sent me a while back and it almost works! However when the subtraction breaks the solid group into more than one physical solid then the process seems to break down slightly.

In a nutshell I need to be able to do this sort of thing:



Where I am subtracting the odd shaped polygonic solid from the cylinder.

This last week has been challenging working on the polygon tool for the foundation plugin, I've made some real progress, thanks in a large degree to the continual help and encouragement from Sdmitch, Garry K, TIG and Facer. I'll readily admit my actual SketchUp programming skills are very weak whereas my ideas are very big, it sometimes amazes me I've gotten as far as I have with these two plugins. The fact that I am able to lean on others for some help on occasion has made all the difference.
0
Nathaniel P. Wilkerson PE
Medeek Engineering Inc
design.medeek.com
User avatar
medeek 
PluginStore Author
PluginStore Author
 

Re: Boolean Subtraction or ???

Postby sdmitch » Tue Apr 11, 2017 3:21 pm

medeek wrote:@Sdmitch: I'm testing your Subtract tool you sent me a while back and it almost works! However when the subtraction breaks the solid group into more than one physical solid then the process seems to break down slightly.


Yes, I see where it would since it the opposite of what you are trying to accomplish with the slab and rebars. I will PM you the interactive tool version of the plugin I demonstrated in my previous post.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: Boolean Subtraction or ???

Postby medeek » Thu Apr 13, 2017 1:00 am

I'm still digging through the code you sent me. It may take a week but I will attempt to figure out how this actually works. Its amazing how much you are able to compress into such a small body of code.
0
Nathaniel P. Wilkerson PE
Medeek Engineering Inc
design.medeek.com
User avatar
medeek 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: Bing [Bot], buidinhhuy1993, DadoRi and 4 guests

Visit our sponsors: