# Extruded solid bisecter plugin (by volume)

Is there a plugin that divides a solid (extruded solid), into two parts of equal volume, with a plane that intersects the centroid? (since it is easier to assume that the object is of uniform density, and is therefore also the center of mass/gravity)

Searching for ācentroidā in both SketchUcation Plugin Store and Extension Warehouse results in almost half a dozen hits.

BUT ā¦ they all refer to finding the centroid of faces, not of solid components or groups.

Look at

this finds a 3d objectās Center of Gravity.
If you pre-split it into two separate solid, you can then determine each of their CofGs.
You can also combine CofGs for various pre-tagged objects - e.g. if they have different densities, and produce their combined CofGā¦

What is it youād like to do exactly ??

1 Like

I want to divide a solid, formed by extruding an irregular polygon, into two parts of equal volume.
Another condition to be met is that the division must intersect the centroid of the solidās face.

Questions:
1 If it is just an extrusion and of uniform density, isnāt the CofG just at the midpoint of the extrusion length, at the centroid of the face of the extrusion, and the dividing plane normal to the extrusion direction?

2 If this isnāt what you want, the direction of the plane may be indeterminate - it will need some other constraint in addion to āpassing through the CofGā. What kind of constraint would make sense?

Something like this?

2 Likes

YES! Thatās what Iām looking for. Is there an option on where I can set a point where the bisection intersects?

So options to use the centroid or a picked point?

Yes. May I know what the plugin is? Iād appreciate it if you post the link.

Patience. Heās writing the plugin for you. I expect youāll get a link when it is finished.

Thanks Dave. Patience indeed. At the moment the results with the picked point has been very erratic for some reason as yet unknown.

XyeiCroft Iām still waiting for you to post a sample solid so I can test on something other than by imagination.

4 Likes

swallasilhouette.skp (448.6 KB)

Sorry for the late reply. Hereās the sample solid.
And also, if applicable, can it also place the division in such a way that it intersects at the center of mass? (for non-extruded objects that do not rely on a centroid)

Thanks for the sample. Testing on your sample failed miserably. Have no clue as to why at the moment but safe to say it will be sometime, if ever. for me to figure this one out.

Attention all plugin creators. What would cause the execution of a .intersect_with to āshatterā a solid group?
Adding the edges resulting from the .intersect_with to the group causes the top and bottom face to be divided into numerous triangles as shown in the attached GIF.

1 Like

Some of the arcs in the form have tiny segmentation - approaching the 1/1000" tolerance limit ?

Try scaling it up x100 or so and repeating the processā¦

You can always scale back down laterā¦

Tried scaling up 1000X results the same.

Has to be something weird about the solid but what?

x10000 ! ?

Yes I tried that also, same results.

Xyeicroft, can I have another sample? Looks like this first one is not ever going to fly.

Edit: 7/12/2017
After further testing, arcs seem to be the root of the problem but exploding them isnāt always enough.

I created my own solid using arcs to define the boundary and I had the same āshatteringā of the face when .intersect_with was executed. Exploding the arcs solved the problem for my solid but doing the same to the sample solid made no differenceā¦

sorry for the very late reply. been having many projects lately.

sample.skp (644.7 KB)

Hereās another sample.

and also, I think I the problem with my first solid is that the edges are not perfectly coplanar and Sketchup may merely be estimating it to be. I tried to flatten the model into a plane (I donāt know if it really did) and extruded it into a solid again. This time, all the arcs are exploded.

swallasilhouette.skp (458.7 KB)

Careful about the file since it has the same name as the first sample. (just in case you might mix it up)

Thanks, same name not a problem. So far no problem with sample2. and sample1 definitely better also.

Just need to workout some issues with the plugin. Hopefully I will have some good news in a day or two.