[Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

[Plugin] 2dBoolean ver1.3.1 beta UPDATE 20 dec 2013

Postby jolran » Thu Aug 25, 2011 1:24 pm

Greetings.

This is a spinoff from Hatchfaces, as can be seen here:

http://forums.sketchucation.com/viewtopic.php?f=323%26amp;t=38637

Will work with groups and components. Nested Groups and Components are not supported yet.
Can be a bit unpredictable with tiny geometry.

Big thank you to TIG, you can read in the link how he helped me with Hatchfaces and
this plugin.

Note: Running this tool having Driving dimension installed may crash su7(not tested on su8).
(not tested in ver 1.3.1 )



Overview2.jpg


Ver 1.3.1..... 20 dec 2013

Jol_2dBoolean.ver1.3.1.rbz





NEW: TRIM. Remove geometry on face. ( Inverse standard mode )

NEW: EXTRUDE. Pushpull or Translate faces based on materials, through Dialog.

NEW: MANUAL. Introduction manual to get you started. Located below.

Faster algoritms for removing intersected geometry and holes, etc..



Plugin is now located in the Plugins-menu.
2
Last edited by jolran on Sun Dec 22, 2013 10:44 am, edited 23 times in total.
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 1:25 pm

Manual

Since ver 1.3.1
0
Last edited by jolran on Fri Dec 20, 2013 6:31 pm, edited 8 times in total.
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby pilou » Thu Aug 25, 2011 1:28 pm

it's work for any version (6,7,8) ?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 1:32 pm

be more specific? There is a problem already? :D
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Thu Aug 25, 2011 1:36 pm

Pilou is a Luddite and still often uses v6 - he's asking it the tool will work with that too... :lol:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 1:37 pm

Ohh I see. SPLAT in ver 7.

This can take a while. So If you have version 7. DONT use it yet.

Im using the go speed thing in commit operation=true. Did use a recursive addition. will see..
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 1:38 pm

Pilou is a Luddite and still often uses v6 - he's asking it the tool will work with that too.


:D

Ver 6 is a bit old..
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Thu Aug 25, 2011 1:39 pm

Use this to avoid a crash
begin
model.start_operation("2dboolean", true)
rescue
model.start_operation("2dboolean")
end

Then it should work in v6/7/8...
BUT your 'version trap' should also work ???
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 1:43 pm

No it crashes ver 7. I will try your trap.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 1:49 pm

Your version did not work either :? It not related to that problem, muted the other items so the was only one start operation, still crashes...

This can be difficult problem to spot. Typical :(
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Thu Aug 25, 2011 1:56 pm

I have just tested it in a v7 SKP with your code intact... and it worked fine!
As it ought...
Duh!
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 2:17 pm

I get big instant splats all the time?? Strange that it works for you.

Anyway, I will test it more later on ver7. Don't have ruby code editor installed there, so testing is a bit painful. Won't make much difference anyway since it splats all the time :D

Edited: Well done some tests now. It's very timeconsuming to start up sketchup from a crash every time..

So. It crashes on a more than 1 place. Where I erase the groups gp3, and gp. NOT the components(comps) wich was a little surprising. Also it crashes when making group to component at the end. Really? :? I haven't been doing this for long, so I can only feel sorry for you scripting guys when you only had to work with SU7. It feels very unstable compared to su8.
That's not an excuse for me to make it work for ver 7, though. IF it can be done..
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Thu Aug 25, 2011 5:23 pm

So you have SketchyPhysics installed in v7?
If so try disabling it... and retest... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Thu Aug 25, 2011 8:07 pm

Hah! Well spotted TIG!! :enlight:

It did not exactly have SketchyPhysic installed. BUT i temporarily moved all plugins in a different folder and then it worked!
So it was in the same category of problem you where thinking at.

Now, I guess I will move the plugins back one after the other to see which plugins is producing the hassle.

I think I learned my lesson here... Should have tested it in ver 7 before releasing.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Thu Aug 25, 2011 10:09 pm

Do the testing 'by halves' it's quicker as you exponentially zoom in... 'one by one' takes longer...
You must have a script loading that's messing with the group base class methods ???
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby EarthMover » Fri Aug 26, 2011 1:48 am

Very nice Jolran. I'll test it out and give a report back.

Thank you! :thumb:
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 8:31 am

You must have a script loading that's messing with the group base class methods ???


Haven't got a clue yet. I guess the only way is to test where 2dboolean will crash?
Doing it 'by halves' as you say.

I'll test it out and give a report back.


Please do, Earthmover!

A part from this tool's bugs and issues, it would be nice to hear reported info about how big file sizes and performances are in a "real life" projects. When using edges instead of materials in Layout and so on.
0
Last edited by jolran on Fri Aug 26, 2011 9:48 am, edited 1 time in total.
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 9:22 am

Well. I have found the 1 plugin that cause the crashes. Unfortunately I can't remember where it belongs to.

It's scrambled so there is no additional info. Anyway ldd.rbs is the name of the file.
I'll update it in the starting info.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Fri Aug 26, 2011 10:09 am

The 'ldd*' greps to Ledas's 'Driving Dimensions', which probably does mess with several base classes, perhaps ill-advisedly - the earlier .rb versions I've seen certainly did! ...
As far as I can see your tool is not doing anything at all 'awkward' then I suggest that you PM the DD author about this issue...
I loaded the latest DD with the .rbs files into v7 and it breaks your tool AND my EEbyRails etc and my olde Mirror tool - which also use some group copy code too... So there could be potentially many issues uncovered here :roll:
I'll PM Dmitry Ushakov...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 11:35 am

Well there you go. Driving Dimension it was. If I remember correctly I uninstalled DD because of some crashes, this file must have been left behind. I will update this in the starting page.

I'll PM Dmitry Ushakov...


Yes please. That would be good. I'm sure he would want to know, since it's not breaking only the 2dboolean script.

Thank you.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 11:41 am

BTW(If you would read this). Is it working for you, Pilou?
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby pilou » Fri Aug 26, 2011 12:08 pm

I obtain that with the V6, but I don't very well understood what must be inside the rectangle ? :oops:
An image, a texture, a color...? (here it's a texture)
Result is on the right
luddites.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: 2dBoolean ver1 beta

Postby TIG » Fri Aug 26, 2011 12:21 pm

In your example the 'face' is the blank top of the box, the 'group' is the face with the grouped 'image' material.
Select both then run the tool
The result is that the grouped 'image' is trimmed to fit on the select face
If the grouped 'image' were smaller and arrayed like tiles then the whole lot would would be trimmed...like this
Capture.PNG
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 1:56 pm

Ok. I should have made a better tutorial about this. Sorry :oops: .

Tig has illustrated the whole purpose of the tool.

It might not be clear WHY use this tool when you visually can get the same result from a material IN Sketchup. BUT when used with Layout to simulate vector color and edges, for printing you will get much more precision in quality.
And edges can be used with styles. So some pretty nice sketchy effects can be made.

This tool wasent originaly designed to use whole faces to texture and color things, it's an intersect tool for edgepatterns.
From that perspective, modeling all those edge-patterns each time can be very tedious, so hence this tool..

The main difference compared to Sketchups internal intersect tool is that the face materials are kept, by turning them into a cutting component.

I'm experiencing a little inconsistency in the intersections(you can call it a bug), so I will have a look at that.
Faces with holes dont get erased at times.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby pilou » Fri Aug 26, 2011 2:20 pm

:mrgreen:
So I have made the exact inverse :D
Now all works like a charm in the V6! :thumb:
Bravo! :fro:
Except you have created a group (the initial group floating in the space with texture in my case now empty but always present! )
that you must kill after the process!
You can only kill it with the Outliner! :shock:

luddites_bis.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 4:10 pm

Nice Pilou. From judging at your pictures, that is the desired behavior of the plugin.

What do you mean exactly? There is a group I have forgoten to delete? :shock: Or maybe that you cannot select the component, except then in the outliner? The second alternativ was corrected by defn.invalidate_bounds.
But maybe that method doesent work on SU6. Do you have this problem on all su versions?

If you doubleclick the component in the outliner (to enter the group) and then exit again, the boundingbox will be reset.
But that is just a workaround if this method doesent work on older su versions.

Thanks for the feedback Pilou :thumb:
Please test in on holes and such.. It should work on all standard axis(Su views), but sometimes it fails on "in between" angles. I'm working on a solution to resque if the calculation fails.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Fri Aug 26, 2011 4:31 pm

If you have an 'empty' group [or definition] that's been made or just emptied within a start/commit block, then it should be auto-deleted at the 'commit' [this is also a way to remove just one definition from the model - empty its entities...] :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 5:57 pm

I did not know that. Good info. Garbage collection? Well in this case all the groups and defs are made within the block, so all good? Of course the group or definition would have to empty..
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

Re: 2dBoolean ver1 beta

Postby TIG » Fri Aug 26, 2011 6:29 pm

Of course if you have references to the groups etc then a simple group.erase! or inside a start/commit block the group.entities.erase_entities(group.entities.to_a) will both remove that one group [or instance OR definition when entities go!]... or groups[0]/parent.entities.erase_entities(groups) [where 'groups' is an array of all temporary groups]... will all work !
0
TIG
User avatar
TIG 
Global Moderator
 

Re: 2dBoolean ver1 beta

Postby jolran » Fri Aug 26, 2011 7:47 pm

Cool. So you can erase the group by erasing it's entities while inside a start/commit block? That could be useful, thanks.
0
User avatar
jolran 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: ArqJMS, Google Bot, Matania1, uhuhlopez and 6 guests

Visit our sponsors: