[SOLVED] Booleans operations available to free SU?
-
Hi!
Is for ex: group1.subtract(group2),available to free version users of Sketchup?
It says version 8+ in the API, but I got unsecure it will work for everyone when I was adding it to my code.
Intersect_with is faster, but it's not trivial to heal the intersections afterwards..
Thanks.
-
hi jolan,
if you write a test, I'm sure someone will run it... no need to be a 'coder' themselves... john
-
Hi John. Thanks for replying.
Thought I would get a quick yes or no on this one.
I'm using the solid subtract method for some tests in "Hatchfaces" development.
So it's kinda burried in the code.. Kinda difficult to post a test snippet for that purpose from my code just yet.
Maybe later when or if it's a more definitive solution. -
I checked the Release Notes webpages for both the app and the API, and it's not clear.
-
I was thinking a copy/paste 'visual' test like this may be useful
# Test booleans on Free #Create the box ent = Sketchup.active_model.entities face = ent.add_face [0,0,0], [1,0,0], [1,1,0], [0,1,0] face.reverse! face.material = Sketchup;;Color.new("Coral") face.pushpull 1 Sketchup.active_model.materials.add "Purple" group1 = ent.add_group face.all_connected #Create the 2nd box ent = Sketchup.active_model.entities face = ent.add_face [0.5,0,0.5], [1.5,0,0.5], [1.5,1,0.5], [0.5,1,0.5] face.reverse! face.material = Sketchup;;Color.new("GreenYellow") face.pushpull 1 Sketchup.active_model.materials.add "Blue" group2 = ent.add_group face.all_connected #test .subtract entities = Sketchup.active_model.entities instance1 = entities[0] instance2 = entities[1] result = instance1.subtract(instance2) =begin #test .union entities = Sketchup.active_model.entities instance1 = entities[0] instance2 = entities[1] result = instance1.union(instance2) #test .trim entities = Sketchup.active_model.entities instance1 = entities[0] instance2 = entities[1] result = instance1.trim(instance2) #test .split entities = Sketchup.active_model.entities instance1 = entities[0] instance2 = entities[1] result = instance1.split(instance2) =end
union, trim and split can be swapped to test them as well.
john -
in answer to your original question,
I just installed free on this laptop and copy/pasted my code...
Error: #<ArgumentError: (eval):25:in
subtract': 'subtract' is a Pro only feature.>
(eval):25
(eval):25`
john -
It's dead easy to post a test script and a snippet.
Make a SKP [v8] with two cubes that are separate groups that partially overlap.
Select the two groups.
Copy/Paste into the Ruby Console a short one-liner for v8-Free to test...
Something like:
s=Sketchup.active_model.selection;s[0].subtract(s[1])
Does one get subtracted from the other in v8-Free?
I suspect NOT.
BUT it does in v8-Pro. -
@driven said:
in answer to your original question,
I just installed free on this laptop and copy/pasted my code...
Error: #<ArgumentError: (eval):25:in
subtract': 'subtract' is a Pro only feature.>
(eval):25
(eval):25`
johnMakes sense.. otherwise we'd be able to write Pro feature custom tools for Free. which defeats the purpose of a Pro version.
-
Was gonna post a snippet this morning but you guys did the work for me
So I see John, you got an error "is a Pro only feature."
That pretty much sums it up. Like Tig also suspected.Dan said.
@unknownuser said:
Makes sense.. otherwise we'd be able to write Pro feature custom tools for Free
Yeah, thats why I posted the question. Being a PRO user I momentarily took this method for granted when I did not receive an error message in my code.
Thanks everyone involved for clearing this up.
Maybe Google should put PRO label for methods like this after the 8+ in the API.
Advertisement