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.

grid editing

Started by Dr PR, December 21, 2008, 10:20:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dr PR

DesignCAD does not have a way to edit grids after they are formed. In particular, there is no "official" way to make holes in grids. There is a workaround by defining the grid to be a solid and then use the solid boolean functions, but it is not perfect. Here is an example to illustrate the problems:

1. I created a cyan colored grid with "Draw/Surface Connect" on layer 10. All other layers were disabled. The grid had 48 x 8 (384) quadrilaterals.
2. Then I defined the grid to be a solid ("Solids/Solid Define").
3. Next a red solid was created on the same layer.

grid 1.jpg illustrates the solids.

4. Then I subtracted ("Solid/Solid Subtract") the red solid from the cyan grid/solid.

The resulting surface had the desired hole in it. Every quadrilateral in the grid except one was split into two triangles, even those far from the hole. These (383) were all on layer 10. The grid/solid on layer 10 was cyan. One quadrilateral appeared on layer 0. It was black. It had not been split into two triangles.

grid 2.jpg shows the results.

The resulting solid was split between two layers, and if both were not enabled and unlocked I could not select the solid. When the solid was exploded ("Solids/Solid Explode") the result was hundreds of individual polygons - they were no longer a grid. This made the file much larger and caused longer redraw times.

****

I realize that editing grids was not intended, therefore the results can be unpredictable. However, the method shown above is the only way to create holes in complex curved surfaces. The same type of thing (or worse) happens if the grid is part of a complete 3D solid. The entire grid is exploded into individual facets, many are converted into two triangles, and often bits and pieces get lost leaving random holes in the surface. It leaves a lot to be desired.

For future versions, when a hole is created in a grid:

A. Split the grid into multiple grids to isolate the quadrilaterals around the area where the hole will be created.
B. Edit individual facets around the hole to create the hole. Then recombine all of the facets around the hole into an "irregular grid."

This would produce a perforated surface that was still mostly composed of grids. File size would not increase as much as it does now and redraws would be faster.

grid 3.jpg shows a hand edited version of the desired result. The four resulting normal grids are shown in blue, red, green and cyan. The "irregular grid" around the hole is shown in black.

grid 4.jpg shows the use of such a perforated grid - this is the fluke of a Navy standard anchor.
DesignCAD user since 1987

Bob P

Since the elements of a grid are generally non-planar, there must be a "strange" method of creating a grid that allows quadrilaterals that aren't true planes.  Personally, I would rather have the grid initially created with truly planar triangles so that manipulating elements or groups of elements are acted on consistently.

Dr PR

BobP,

Philosophically I agree with you completely. Triangles make more sense that quadrilaterals because three points always lie in a common plane and four do not.

Having said that, I think the grids used by DesignCAD are a stroke of genius. The fellow who initially wrote this code wasn't a mindless lemming just following the AutoCrud stampede. I am amazed that it works at all, and more amazed that how well it generates a curved surface!

The reason that I throw the theoretical geometry out the door (not easy for a scientist and geometry nut) is simple, and if you had ever worked with 250 Mbyte files with thousands of grids in them you would understand also. One quadrilateral draws with 2/3 the points and lines as two triangles. So from a simple point of view DesignCAD's odd quadrilateral grids draw 50% faster that a similar grid made of triangles. However, there is more to it than meets the eye - DesignCAD renders a grid MUCH faster than an equal number of quadrilaterals. MUCH MUCH faster!

Draw a very large complex grid. Now duplicate it enough times that it takes 10-15 seconds to render with Gouraud shading. Now select all the grids and explode them. Start Gouraud rendering again. Go get a cup of coffee. Read a good book. It will be a while before it finishes rendering.
DesignCAD user since 1987

Dean

#3
Quote from: Dr PR on December 21, 2008, 10:20:42 AM
DesignCAD does not have a way to edit grids after they are formed. In particular, there is no "official" way to make holes in grids. There is a workaround by defining the grid to be a solid and then use the solid boolean functions, but it is not perfect.
I don't experience this behavior. The grid displays as it should . All the surface commands(there are many) work as intended. These are complex drawing commands ,perhaps I am missing something.I can create boolean subtract commands with squares circles where ever i like on the existing grid. The picture below was created with a surface connect-solid define grid then a boolean subtract. Though I have used the contour lines as well on grids that were not defined as a solid. Oh ,I see you have to be logged in to view any picture.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

Dr PR

Dean,

Are you saying you used 2D "Edit/Polygon Edit" commands to subtract from 3D grids? How do you subtract a square (2D plane) or circle (2D plane) from a 3D grid?

The picture you posted looks pretty much like the second image I posted above. Note how the quadrilaterals are split into triangles - that is part of the problem.

It isn't that the 3D Boolean operations do not work with grids if you define the grids to be solids - they do. The results are far from perfect, however. The resulting grid (a single object in DesignCAD) is exploded into many individual polygons that no longer behave like a grid. If you select the "grid" you posted and explode it with "Solid Explode" you will find it is no longer a grid, but just a bunch of unassociated triangles. That is part of the problem.

One of the odd things (good, in my opinion) about DesignCAD is that it doesn't enforce the structure of solids. You can define anything to be a "solid" even if it bears no resemblance to a real world solid. A simple grid is an example - it has zero thickness even though it may occupy 3D space. A "true" solid would have non-zero thickness and could not have "holes" to allow leaks into or out of the solid. Sometimes it would be good to have a "leak checker" for objects that are defined as solids, but I certainly wouldn't want this to be enforced strictly. If it was, we couldn't define grids to be solids.

I would like to see more tools that were designed specifically to edit grids without exploding them into individual elements, or at least break the grid into parts so that only the edited portions are exploded and the rest remains a true grid.
DesignCAD user since 1987

Dean

#5
Quote from: Dr PR on December 22, 2008, 05:10:28 PM
Dean,


I would like to see more tools that were designed specifically to edit grids without exploding them into individual elements, or at least break the grid into parts so that only the edited portions are exploded and the rest remains a true grid.

The picture below emphasizes what you would like to see. The circle was created with a contour line /solid slice. The area in black is exploded as a result of the slice command.The area in red still exists a s a"grid" The square was created with solid define grid with boolean subtract. That being said the solid grid still maintains the ability to be edited via the "point select mode" you don't have to explode it.  you just can't "change the grid lines" which is what you would like to see, correct? Understanding the stretching ability of surface connect and the ability to fit with surface patch and using "contour lines"along with setting  new workplanes you can "sculpt" the existing grid. Working with a solid grid along with boolean functions works more as a "cookie cutter" the result still leaves you with an editable grid, meaning you can adjust the placement of points in space.Naturally,  I do agree that any added feature would be an improvement.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

Dr PR

Dean,

I have to read between the lines and guess a lot about what you are saying.

1. Apparently you created the round hole with the "Solids/Slice" function. I don't understand how "Draw/Lines/Contour Line" comes into play.

2. You punched the square hole by using "Solid/Subtract" and the grid remained intact? Did you explode the solid afterward? The solid is editable in Point Select mode, just as a grid would be. However, I have never seen a completely intact "true" grid after using the "Solid/Subtract" trick on a grid. The grids are always at least partially exploded and turned into a bunch of disassociated triangles. Usually the whole grid is trashed.

I have seen a few instance in V15.3 where part of a grid remained intact but the part around the hole "fell apart." This hasn't happened with V18 or V19 beta - this may just be coincidence.

Note: I make a distinction between a "true" grid and a bunch of individual quadrilaterals and triangles held together as a solid. True grids are MUCH smaller (file size) and redraw MUCH faster. This becomes important in files that have thousands of surfaces. Just because you can move a collection of points in a solid in Point Select mode does not mean that it is a real grid.
DesignCAD user since 1987

Dean

QuoteI have to read between the lines
I assume no pun intended.
Quote1. Apparently you created the round hole with the "Solids/Slice" function. I don't understand how "Draw/Lines/Contour Line" comes into play.
3d surfaces consist of contour lines (ex. when you use surface connect the result is a "grid "consisting of many facets. All I did was draw a contour line in the x-z plane and a circle was created. Then used solid/slice to create the cut out. The results were described above in the last picture posted. The results were two sets of "grids" and a exploded grid within the plane of the circle
Quote2. You punched the square hole by using "Solid/Subtract" and the grid remained intact? Did you explode the solid afterward? The solid is editable in Point Select mode, just as a grid would be. However, I have never seen a completely intact "true" grid after using the "Solid/Subtract" trick on a grid. The grids are always at least partially exploded and turned into a bunch of disassociated triangles. Usually the whole grid is trashed.
You mean the "solid "not the "grid" correct, a solid is used during solid subtract.The solid remained intact and was not exploded.
QuoteNote: I make a distinction between a "true" grid and a bunch of individual quadrilaterals and triangles held together as a solid. True grids are MUCH smaller (file size) and redraw MUCH faster. This becomes important in files that have thousands of surfaces. Just because you can move a collection of points in a solid in Point Select mode does not mean that it is a real grid.
Solids consist of surfaces and planes.When you explode a solid you expose its surfaces. These surfaces can be edited in many ways to an infinite degree by using the surface commands etc.Your concern with rendering time of many facets is dependent on the processing power of the computer.Any file with a high poly count will take some time to render  perhaps what you would like to see is the support of N.U.R.B.S.
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

Dr PR

Dean,

I was asking (2) if you exploded the solid/grid (the grid had to be defined as a solid before it would work with the solid Boolean functions - after the subtract the subtracted solid no longer existed to be exploded). You can edit the solid/grid in Point Select mode and it will behave as if it was a grid (all points at an intersection move as one). If you explode the solid/grid you will find this is no longer true. If you select a single facet only the points of that one facet will be edited. This is sometimes quite useful, but it illustrates the difference between a true grid (you can't edit a single facet) and a fragmented grid. They definitely are not the same, even if you define the fragmented grid as a group or a solid. However, if you define the facets of a fragmented grid as a group or a solid you can edit each junction in Point Select mode just as if it was a true grid.

You are correct about processing power, redraw speed, etc. However, I suspect you haven't actually worked with really huge grids in DesignCAD - the maximum allowed. I have. The difference between redraw times of the original true grid and the resultant fragmented surface after a solid subtract is surprising. I do not have actual times, but redraw went from virtually instantaneous (less than a second) to a minute or more! Let's say it was 60:1 - this will be true with any processor. One solution would be to get a 100X faster computer. I am running a 3 GHz 32-bit machine and a 2.4 GHz 64-bit machine. So I need a 900 GHz machine (or a 450 GHz 128-bit machine). I had a 20 MHz machine in about '93, or 15 years ago, so It looks like I will have to wait another 10-15 years for a 1 THz box. In the meantime ...

What I am asking for is a way to break grids into sections when they are edited, maintaining as much of the original grid as possible. This would have three benefits:

1. Faster redraw. Even if each fragment took a significant part of a second to redraw it would still take only a second or two - much faster than a minute or two.

2. Smaller file size. Not only do smaller files load/save faster, they are easier to work with. On my XP Pro machine with 1 Gbyte RAM, 35 Mbytes is the maximum editable file size. Above that DesignCAD runs out of resources and gets squirrely. On the Vista 64 machine with 4 Gbytes I have not yet found the upper files size limit - it works OK with a 270 Mbyte file, the largest working file I have created so far. One of these days I will create some really large files and see where the limit is. However, the point is that there is a maximum file size limit on any machine, so anything that reduces file size is a good thing.

3. A major drawback to fragmented grids is the failure of "Draw/Line/Surface Intersection." Surface Intersection will find the intersection between a grid and another surface. After a grid is fragmented Surface Intersection treats each facet of a broken grid as an individual polygon - it does not find the intersection with the entire surface, even if all the facets are grouped or defined as a solid.

Here is an example:

a. Draw a cylinder with 144 facets.
b. Now draw a plane that cuts through the cylinder.
c. Use Surface Intersection to draw a line around the cylinder where the plane intersects the surface of the cylinder. One operation gives you a line with 144 segments, almost instantly.
d. Delete the intersection line - notice that it is a single line and is deleted with a single operation.
e. Now create a solid that passes through the cylinder above or below the surface intersection line.
f. Add or subtract the second solid from the cylinder.
g. Now repeat the Surface Intersection using the original plane. You get a single short line that does not circumscribe the cylinder.
h. Repeat g, over and over again until you have the complete line around the cylinder. Notice that it didn't happen instantly, but likely took you several minutes. In some cases you will have to repeat the operation 144 times.

Intact grids work correctly with the Surface Intersection function, fragmented grids do not. I would like for the solid Boolean functions to minimize fragmentation of grids so as much as possible of the original surface would remain as grids.
DesignCAD user since 1987