DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Make a chamfer (bevel) to a cylinder

Started by jym_ing, June 28, 2015, 12:00:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

#15
Heck, I for one wouldn't call it a bug - it's a very attractive bug if it is lol.

I'd call it a "regen pen".   

SManMTB

Yeah ok, what I meant was it is somewhat of an undocumented trick that nobody can find out about by reading a manual.  ;)
It's not like someone would think "hmm.... there are holes in this model, maybe I can create a random solid not related to the drawing out of the way of any other structures and do a Boolean operation on it to fix the issue"
:P

Good to know in any case.  :)

samdavo

#17
Exactly.   Just because you carry out the repair manually, don't expect it to be in the manual (2 cents)

PS
I will add a keyword reference (for my own reference and anyone else's who wants to use this "library lookup system").
Feel free to add your own keyword references on any other topics.
The reason I do this is that it can be difficult to remember where these posts are.  For instance, this "Fake Boolean subtraction" or "regen pen" has little to do with the thread's topic, chamfer on cylinder etc.
   
 
Examples of using a trick one could call the "Fake Boolean subtraction"  or (easier) "regen pen".
It can be used to tidy up the elements of a solid, especially if they unexpectedly turn triangular (after a Boolean op) , and you want them to be four-sided again.   In effect the diagonal lines are removed.  BUT it isn't 100% guaranteed that this will fix them.
ALSO it can be used to remove unnecessary wireframe lines eg radiating lines at the planar ends of a cylinder.
ALSO it can be used to repair a grid that has holes.   

sd=KWfakebooleansubtraction
sd=KWregenpen
replies #8 and #11 above


To search for ALL keywords, search for "=KW" in the root directory. - Also they should ideally be recorded in an index here:-
http://forum.designcad.com/index.php?topic=6100.msg44683#msg44683

SManMTB


prl

This technique became available with version 16.  I originally used it to rebuild tessellated AutoCAD AISC solids imported into DesignCAD thereby reducing the  DC planes count. Also used to repair screwed up DesignCAD solids as described and now to rebuild those "Surface Solids" when they go bad.


samdavo

From another thread
Quote from: Dr PR on July 03, 2015, 08:53:50 PM
Sam,
I do not think anything can repair a grid with holes in it - at least not a grid that has been defined to be a solid and then had another solid subtracted from it with Solid Subtract. When this is done the grid is fragmented into individual planar facets and, like Humpty Dumpty, nothing can put it back together again because it is no longer a regular array of equal sized facets..
Phil
Phil
In general you are no doubt correct - However reply #11 here shows what I mean, - that it works on this occasion at least - but I concede it doesn't always work out that neatly. 

Dr PR

Sam,

You are making a fundamental mistake here. A "grid" is a specific type of DesignCAD object. Grids ALWAYS have four sided facets - they are regular XY arrays of four-sided facets. However, internally the program may use two triangles to make up a four-sided facet and hide the hypotenuses.

Your "sail" appears to have some triangular facets (not the triangles that divide four-sided facets into two triangular parts). I suspect it really wasn't a grid to start with.

The repair you got from the Solid Subtract operation appears to have eliminated the triangles, but I suspect it really just hid the hypotenuses (the shaded image doesn't show the hypotenuses). But if you explode the solid (Solid Explode) you will probably find that you don't have a grid but just a bunch of planes that were lumped together as a solid.

1. Look at the attached pictures. In step 1 I created a true grid using three curves and the Surface Patch function.

Notice that there are no triangular facets - all have four sides, even the highly distorted facet at the center of the left side.

2. I then used the "Edit/Selection Edit/Convert/Explode" function to break the grid into individual planar facets.

3. Then I deleted one of the facets. I drew in the green and blue triangles to fill in the gap. Then I selected all the pieces and defined them to be a solid with Solid Define. This DOES NOT make it a grid! Then I drew the gray cube.

4. In step 4 the "Options/Options/General" option "Use surface representation for solid operations" was enabled. When I subtracted the cube from the solid collection of planes the result was a "solid surface." This cannot be exploded further into the individual planar components with "Edit/Selection Edit/Convert/Explode." It IS NOT a grid.

5. In step 5 I duplicated the objects in 3, disabled the "Use surface representation ..." option and performed the Solid Subtract. The resulting object in step 5 is still a solid, but NOT A GRID.

6. In step 6 I used Solid Explode to fragment it and then moved all the resulting planes to show that it was not a grid. If it had been a true grid the Solid Explode would just have removed the solid grouping, but the grid would have remained a single object. As you see, it wasn't.

So, I do not think the Solid Subtract trick will ever reassemble Humpty's parts back together again into a true grid.

Phil
DesignCAD user since 1987

prl

The dummy solid subtract trick will repair a DesignCAD solid into a solid consisting of DesignCAD planes.  Nothing that I know of will force DesignCAD to rebuild a solid to include DC grids.  Once a DesignCAD grid/plane solid is converted to a "planes only" solid, that is it.  Only YOU, the user, can manually attempt to recreate a grid entity.

Dr PR

prl,

I have done that several times, using the original fragmented grid as a template to draw new curves for grids and then creating a patchwork of new rectangular grids around holes, etc. After the new grids are in place all of the old facets are erased except those not covered by the new grids (say around an oval hole). These remaining facets are grouped and then the entire collection of grids and grouped facets are defined to be a solid so they will render smoothly as a single surface.

The large flat surfaces of the flukes in the attached picture of an anchor were made this way. The holes through the flukes broke up the original surface into hundreds of planes. The final surface is made up of four grids and a bunch of triangular and trapezoidal planes around the rounded edges of the holes. The resulting file with the grids is smaller than the file with hundreds of individual planes.

This was before solid surfaces. If I had been using solid surfaces I wouldn't have needed to go to all that trouble. The subtract operation that perforated the surface would have generated a solid surface that is more or less what I eventually ended up with. I did some preliminary tests with solid surfaces a while back and the files using solid surfaces were smaller than files with grids. I don't know if this is a hard fast rule or just a coincidence with the objects I was drawing at the time.

Phil
DesignCAD user since 1987

samdavo

#24
Phil
ok - Firstly I believe I was quick to add that it doesn't always work as a repair.
Maybe the reason they worked this time is because my 4-sided elements (or even 5 -sided near the boundary) were part of a sphere, then that means they are planar. (?) - even if some came off as triangles when they were deleted (?)

No biggie either way.

PS - There is a 5 sided element there (green) circled - and indeed, when I check, I find it is a single plane.  Hence the internal lines disappear with the fake subtraction, it is no different to the internal radiating lines of the cylinder (back there) also disappearing - hence some logic there.  cheers


Dr PR

SAm,

I agree that it works to "repair" solids. All I was saying is that there is a difference between solids and grids. Solids are a collection of objects lumped together as a single object. Anything can be defined to be a solid - it is just another type of grouping.

Grids are something entirely different. They are created by a formula - so many planes across by so many planes wide - except they are not made up of individual planes. They are a single entity in themselves with multiple facets. Because they are a single entity they shade as a smooth surface.

If you define a grid to be a solid and then cut/pierce it with the Solid Subtract function the grid is shattered into a bunch of individual planes. There is no way to convert individual planes to a grid. The resulting bunch of pieces will no longer shade smoothly.

Grid facets look like rectangles or trapezoids but internally DesignCAD treats these four-sided facets as two triangles. Sometimes the facets actually appear as two triangles. This seems to be related to the way the program calculates shading colors/intensity.

If two joining surfaces are in the same plane, or if their planes are at only a slight angle (less than 5 degrees or so) they will shade as a smooth continuous surface. But if they are at a larger angle they will shade as different surfaces. Within a grid, if the grid is sharply curved the program shades each triangular half of a facet differently to create a smooth surface appearance.

I figured that you created your "sail" by cutting away parts of a solid - a sphere it seems. The sphere solid has a single grid surface originally. But when you use Solid Subtract to cut away part of it the result will not have a grid surface. The grid is fragmented, and the resulting solid is just a bunch of individual trapezoidal or triangular planes. Because it is a solid it still shades as a smooth surface. But if you explode the solid it will no longer shade as a smooth surface, and you can move each facet independently of the others.

Phil
DesignCAD user since 1987

samdavo

#26
Phil
I add this post just to add an effect which I have never found before.
(But as an aside, I don't understand why you would want a grid when you can have a solid.   To me a grid is a stepping stone - and/or optional ... moving on)

Anyway - I move on to something I just checked out / discovered.
(PS I should add that this drawing originated as an import from Sketchup, via a DWG file)

The drawing shows a solid exploded (twice if necessary) to planes (green , layer 4).

When you click a plane and delete it, a triangular hole appears in the green surface (despite the fact it is half of a rectangle).
You can use P (draw plane) to add a new (red, layer 2) triangle at these holes.
You can see one rectangle where I deleted BOTH triangles = hence a red rectangle.

Then I made the stack of green-and-red triangles into a solid ( Solid Define, Ctrl+D),
and then Solid subtracted a dummy box from the sail. 

OK, now for what I find interesting.
Most of the red Lay2 triangles change to green Lay4 - (albeit part of the final solid).
The only ones that don't are the two triangles that make up the rectangle - and these remain as red Layer 2 - still as part of the final solid together with the green elements ( 2 cents) 
 

Dr PR

Sam,

Sometimes you have to create a grid as part of the process of making a complex solid. For example, boat hulls, airplane fuselages, and other things with sharp surface transitions have to be made up of multiple surface grids. See the attached image. Each different color is a separate grid.

****

Your example does illustrate a "feature" of the surface cleanup that happens with Solid Subtract. Many of your two-triangle facets were combined into a single four-sided plane. Sometimes this happens and sometimes it doesn't. I suspect it is a case of the angle between the planes of the pair of triangles. If it is very small the triangles are combined into a single four sided plane, and if the angle between them exceeds some threshold the triangles are not combined - but that it a guess.

Look at reply #21 step 6 in the "grid fragmentation" images. After the Solid Subtract operation some of the facets were four-sided with the color of the gray cube and some were triangles with the original grid red color. And the two that I drew in remained blue and green.

Again, I am guessing, but I suspect it was the curvature of each facet that determined whether it was broken into two triangles or not. I have no clue why some facets became gray and others red - it is possibly related to the bug that causes parts of solids to be scattered to multiple layers after Solid Subtract operations.

Phil
DesignCAD user since 1987

Dr PR

#28
Here is another trick that you can use with grids - but I haven't found it to be very useful.

First of all, you can put a kink in a curve (C) by placing two points at the same position. Either side of the double points will be drawn as a smooth curve, but you will get a sharp angle at the double point. Look at the black curves in the "knuckle 1.jpg" image below.

If you use these kinky curves as template lines for the Surface Connect function you should get - in theory - what ship builders refer to as a "knuckle" in the surface. This is a sharp crease in an otherwise smoothly curved surface.

However, DesignCAD just can't put the kink in the right place, as you can see in the two pictures. Even if you give each curve the same number of points, select a multiple of the number of segments between points as the "No. of planes per line," and  select "Use original points," the knuckle gets lost in the translation.

To get a good knuckle in a hull surface you have to use two grids, one above the knuckle and another below it.

Phil
DesignCAD user since 1987

samdavo

Phil
Good stuff, thanks
(Yes I had noticed some of your planes were rectangles and some triangles).
cheers