Author Topic: subtract large number of holes  (Read 213 times)

bdeck

  • Hero Member
  • *****
  • Posts: 807
subtract large number of holes
« on: August 02, 2017, 09:41:48 AM »
Heres a drawing having two solids (according to infobox), a platesolid and a holesolid.
The hole solid was made by grouping the 2d holes, executing make plane, extrude, and solid define
Could not find any simple way to subtract holesolid from platesolid.

Then i made a copy of plate solid -0.5" from original in z direction. Performed solid add on newplatesolid and holesolid.
That "sort of" worked. got about 75% of holes to subtract. The rest disappeared.

Anyone got a simple way to perform this common task without subtracting one hole at a time?

EDIT: BTW, the infobox identifies the entities as solids, but edit/selection filter and help/drawing info both say the drawing has only grids and planes. Dunno why solid add sort of worked.
« Last Edit: August 02, 2017, 09:51:49 AM by bdeck »

bdeck

  • Hero Member
  • *****
  • Posts: 807
Re: subtract large number of holes
« Reply #1 on: August 02, 2017, 10:15:15 AM »
Found the problem.
Did the same procedure again, but without grouping anything at any time.

1  Selected all 2d hole patterns and executed make plane. Result = discrete planes.
2  Selected all hole planes and executed extrude. Result = discrete extrusions.
3  Selected all hole extrusions and executed solid define. Result = single solid.
4  Subtracted it from platesolid. Worked perfectly ( but took some time ).

Rob S

  • Hero Member
  • *****
  • Posts: 4315
    • Construction Estimating Program for General Contractors
Re: subtract large number of holes
« Reply #2 on: August 02, 2017, 12:55:22 PM »
I started working on this, and I was able to get a subtraction, but it only penetrated to top surface.

Then I had to go buy some food, so I never finished the job......

Definitely something weird here, why would grouping the objects affect the outcome?
User since Pro-design

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4145
Re: subtract large number of holes
« Reply #3 on: August 02, 2017, 01:47:32 PM »
Even that may not work every time. Remember, for about 12 or 13 versions now, when you make a hole in a plane, the result is still a single plane (used to split the plane into two pieces). With a lot of holes, that can lead to a lot of points around the plane's perimeter, and you might find yourself approaching the 5,000 point limit.

Possibly converting the platesolid to a solid surface before subtraction may help.

Also, you asked about drawing info (and selection filter) only showing grids and planes, no solids. A solid is not an entity type, it's essentially a special kind of group. Just as every object with the same group id is in the same group, every object with the same solid id is in the same solid.

*addendum* After creating the top plane for the platesolid and re-defining the platesolid to include the new plane, I converted the platesolid to a solidsurface entity. Then the subtraction seemed ok.
« Last Edit: August 02, 2017, 01:57:23 PM by DrollTroll »
25 years with DesignCAD

Dr PR

  • Hero Member
  • *****
  • Posts: 5417
Re: subtract large number of holes
« Reply #4 on: August 02, 2017, 07:21:41 PM »
I have seen similar problems many times.

I create separate solids for each hole - usually just cylinders.

Then I select all of the hole solids and use Solid Define to make one solid of them all.

Then I select this combination solid from the "plate" and it works unless the 5000 point limit is reached. Unfortunately, it often is exceeded.

Phil
DesignCAD user since 1987

Rob S

  • Hero Member
  • *****
  • Posts: 4315
    • Construction Estimating Program for General Contractors
Re: subtract large number of holes
« Reply #5 on: August 02, 2017, 07:48:54 PM »
I see the drawing in question has 14,000 or so pints, and thus the resulting solid with holes would end up having about that many!!!

That may explain why it wasn't working.

Solution - draw cylinders with fewer facets
User since Pro-design

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4145
Re: subtract large number of holes
« Reply #6 on: August 04, 2017, 02:38:07 PM »
No matter how well we arm ourselves with methodical caution, stuff happens :)
25 years with DesignCAD

Rob S

  • Hero Member
  • *****
  • Posts: 4315
    • Construction Estimating Program for General Contractors
Re: subtract large number of holes
« Reply #7 on: August 04, 2017, 09:01:21 PM »
That explains why a lot of us are here at all.   :)

Skill and planning has little to do with it.
User since Pro-design

Dr PR

  • Hero Member
  • *****
  • Posts: 5417
Re: subtract large number of holes
« Reply #8 on: August 04, 2017, 10:16:19 PM »
For what it is worth, in the past when I ran up against the point limitation when trying to put a large array of regularly spaced holes in a plate I resorted to creating a lot of parallel plates where the edges of each plate passed through the centers of a line of holes.

Basically, here is how I do it:

1. Create the array of hole solids that you want to subtract. These can be any shape - not just cylinders.

2. Split the plate up into a bunch of parallel narrow plates with edges passing through the centers of a row of the desired holes - so one row of hole solids fits along one side of a narrow plate and another row fits on the other side.

3. Make each row of hole solids a single solid array with "Solid Define."

4. Duplicate each row of hole solids as necessary and subtract half holes from each side of the narrow plate. This limits the number of points on each narrow plate.

5. Repeat for all narrow plates.

6. Select all of the narrow plates and define them to be a single solid array with "Solid Define."

7. If you are picky about how the large holy plate looks in Wireframe view you can erase all of the edges between holes with "Edit/Hidden Edge By Section."

Phil
DesignCAD user since 1987

bdeck

  • Hero Member
  • *****
  • Posts: 807
Re: subtract large number of holes
« Reply #9 on: August 05, 2017, 01:18:18 PM »
Skill and planning has little to do with it.

In the attached drawing, example solids A and D were created by extruding a plane entity; but B and C were not.

Example C demonstrates how a "solid" might have been created to comprise only a single plane entity, if one is, perhaps, DUI. (drawing under the influence of ...)

And Example B shows how to create a "solid" having no plane entities at all.

A) 1) draw rectangle in 2d mode
    2) switch to 3d mode
    3) make plane
    4) extrude
   
   Solid Result = back plane, gridheader,  back gridline, front gridline, front plane

B) 1) draw rectangle in 2d mode
    2) switch to 3d mode
    3) extrude
    4) solid define

   Solid Result = back line, gridheader,  back gridline, front gridline

C) 1) draw rectangle in 2d mode
    2) switch to 3d mode
    3) extrude
    4) make plane   
    5) solid define

   Solid Result =  grid header,  back gridline, front gridline, back plane,

D) 1) draw rectangle using plane command in 3D mode.
    2) extrude

   Solid Result = back plane, gridheader,  back gridline, front gridline, front plane
       
« Last Edit: August 05, 2017, 01:58:43 PM by bdeck »

bdeck

  • Hero Member
  • *****
  • Posts: 807
Re: subtract large number of holes
« Reply #10 on: August 05, 2017, 01:55:37 PM »
Interestingly, the vestiginal line in Example B above (included in the solid unless deselected after the extrusion) can be converted to a plane by simply executing the makeplane command on the entire solid entity. So that's another way a "solid"  can be made having only a single plane.

For anyone interested, Ive attached a version of the APW macro modified to also display solid index.
« Last Edit: August 05, 2017, 02:36:49 PM by bdeck »