Boolean Slice tool

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Boolean Slice tool

Post by clintonman »

cutCube.jpg
A tool based on the boolean cut function in truespace. It creates a plane centered on a mesh and applies a boolean cut to simulate cutting all the way through the mesh. It doesn't cut it into 2 solid pieces, but adds geometry to the surface of the mesh.

Slice tool near the top of the page:

http://www.clintons3d.com/plugins/trues ... index.html" onclick="window.open(this.href);return false;
Clinton Reese

http://clintons3d.com
Peter
Senior Chief Petty Officer
Posts: 170
Joined: 18 Apr 2010, 15:18
Type the number ten into the box: 0
Location: Texas

Re: Boolean Slice tool

Post by Peter »

I tried this and it just deletes the geometry of the cube I tried, then it leaves an empty object with the new name. (I flattened the cube to a mesh beforehand.)
Right clicking on the object will then cause a crash.

Looks cool, though.
a day without orange juice is like... a day without orange juice
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Boolean Slice tool

Post by trueBlue »

This seems to work for me after I add a Forward slash before Preferences.
Capture.PNG
If you are wanting the Flatten object to run silently, I had to add an if statement to your script.

Code: Select all

function Execute(params)
{
Node.Value("/Preferences/Dialog settings","Flatten objects") = 0;
if (Node.Value("/Preferences/Dialog settings","Flatten objects") = 0)
{
MeshModifiers.FlattenNodes('')
Node.Value("/Preferences/Dialog settings","Flatten objects") = -1
}

}
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Boolean Slice tool

Post by clintonman »

trueBlue wrote:This seems to work for me after I add a Forward slash before Preferences.
Capture.PNG
If you are wanting the Flatten object to run silently, I had to add an if statement to your script.

Code: Select all

function Execute(params)
{
Node.Value("/Preferences/Dialog settings","Flatten objects") = 0;
if (Node.Value("/Preferences/Dialog settings","Flatten objects") = 0)
{
MeshModifiers.FlattenNodes('')
Node.Value("/Preferences/Dialog settings","Flatten objects") = -1
}

}
That makes sense. I think the checkbox is in a weird state by default because it works for me after unchecking it. I'll add the change to the script.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Boolean Slice tool

Post by clintonman »

Peter wrote:I tried this and it just deletes the geometry of the cube I tried, then it leaves an empty object with the new name. (I flattened the cube to a mesh beforehand.)
Right clicking on the object will then cause a crash.

Looks cool, though.
That's strange. I'll see if I can recreate the problem.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Boolean Slice tool

Post by clintonman »

OK, I posted an update.

The disappearing problem was something I forgot to do in the code and only showed when model side was involved.

The dialog setting was a synchronization problem. It would not set and reset reliably from inside the same script as the flatten command, so I moved it to the very start of the process and set it back when the tool is exited. The exiting step still does not stop the message, I think it's because I have one script directly linked to another and the exit script runs too quickly resetting the dialog before the final flatten command.
Clinton Reese

http://clintons3d.com
Peter
Senior Chief Petty Officer
Posts: 170
Joined: 18 Apr 2010, 15:18
Type the number ten into the box: 0
Location: Texas

Re: Boolean Slice tool

Post by Peter »

Still having probelm:

Workspace Side

Create cube.
Right click to turn it into a mesh.
Right click to get out of edit mode.
Click Boolean Slice Button
Left Click, then see "warning construction history will be removed..." dialog.
Click Yes.
Right Click to exit Boolean Slice mode.
See warning dialog like before.
Click yes.
Cube disappears.

Hope this helps.
a day without orange juice is like... a day without orange juice
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Boolean Slice tool

Post by clintonman »

Peter wrote:Still having probelm:

Workspace Side

Create cube.
Right click to turn it into a mesh.
Right click to get out of edit mode.
Click Boolean Slice Button
Left Click, then see "warning construction history will be removed..." dialog.
Click Yes.
Right Click to exit Boolean Slice mode.
See warning dialog like before.
Click yes.
Cube disappears.

Hope this helps.
Well, you got me stumped. :? I downloaded the latest from the website to be sure I uploaded the right one, installed it, followed the steps and it works for me. Hopefully, someone else will have an idea.
Clinton Reese

http://clintons3d.com
Peter
Senior Chief Petty Officer
Posts: 170
Joined: 18 Apr 2010, 15:18
Type the number ten into the box: 0
Location: Texas

Re: Boolean Slice tool

Post by Peter »

Well,

I just can't get this to work right.

I'll just move on.

Thanks anyway.
a day without orange juice is like... a day without orange juice
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Boolean Slice tool

Post by trueBlue »

I have seen what Peter has reported but cannot be certain when it happens. Object is unselected in the middle of the operation or not exiting the tool correctly, other wise it seems to work for me. Running silently is not working for me. Disabling the commands in your Widget and Unchecking "Flatten objects" works better for me. I think that those messages has a bug or error. If you select No you will get another message about converting to an Editble Mesh.
Post Reply