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.

zoom command causing crashes

Started by terrylopeman, April 20, 2010, 02:00:31 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Lar

#15
I think you problem is that you curves have a great many points. When paralleling or cutting curve entities I suggest you convert to line first, do the operation, then convert back to a curve. This way you keep the curvature as well as the point count.

I've uploaded my approach to the situation.

I was able to follow your steps and delete the left side and zoom out without dcad crashing. However, if I zoomed back in then selected the right side and try to manipulate the endpoints that's when dcad crashes.

Lar

Note: see my second post below for my revised advice on the merits of using the Edit menu> Selection Edit>Smooth Line by Point Reduction (or Slope Detection) commands over the Curve to Line command when dealing with curves.

testpilot

Thanks Lar,

Well, I never thought about counting points on my curves... I thought a program that is able to handle 3D solids would just do these trivial things in Autopilot.

These curves need to be somewhat accurate, and they come from computer coordinates which are plotted by from an XYZ file to CAD through the "Import" command. Normally these curves are about 10 - 20 points on each surface (top and bottom). Up to this point, things are fine.

The problem is that I need to cut these lines a couple of times (as you can see on the right hand side, to introduce structural elements like Spars and Leading Edges for the Ailerons/Flaps etc). When you start cutting these 10 or 20 point lines, the program multiplies the point count without control. It just maybe that it comes to a point where the line just has too many points and the program can't handle them anymore, so it crashes ??

I wonder if there's a way to control this from the options given to us as users?

You are right, and if manipulating lines works, and probably that's part of the cues the designers should look at to solve the issue with the curves. I did not have this problem with the V16 on the same exercise, which I've done it many times in the past.

Thanks for your suggestion.

Alex

Rob S

FYI, I tried the same split with DCAD 19 and 17, and both of those produce some spurious lines and fail to perform the split.

In V20 I was able to trim the parallel curve  to the the vertical line with no problem.

It would be easy to do another parallel, and then trim the opposite end of that one.
User since forever

Adrian 2.0

I also get a crash as soon as I tryto select the new line.
Lar's comments on the number of points is the key to the problem, I think. Normally when you offset a curve the number of points multiplies by maybe 500%, in this case you start with a curve of 12XX points & the new curve also has 12XX points - I suspect the program is trying to create a curve with maybe 5000 points first - exceeding it's parameters somehow & creatinig a curve that is illigitimate in some way.

Normally I would reduce the points on a curve to way less than you have, just to keep my filesize down.
I would also convert the curve to a line before offsetting it, that will give you a new line with equal points, then convert them both back to curves to smooth them.

If you convert your origin curve to a line before offsetting, your problem is resolved.

testpilot

Dear Adriank,

Thanks for your input, and I agree. I think we've gotten to the root of this problem.

Now that you mention it, once I had to put together a CNC laser cutting pattern (I was on V16 still), and I did an array of several of these "modified curves" into a single material piece (to make it material efficient), and the file size just became huge...now I understand why. The number of points must have been absurd...I think I recall the program froze at one point, probably due to the number of points.

In any case, I think Design-CAD should work for me, not the other way around. If when working on a curve, I have to be converting to line first, cut/edit, and then back to curve again, etc, then I'd be waisting too much of my time. I think the designers should come out with a correction so D-CAD just adds points to the segment that has to be manipulated, between two existing points, just as many as needed so that when you cut the line, you preserve the integrity of the original. Adding so many points to the whole line is not really necessary.

I appreciate all the input from the Forum, and yes these are good ideas to avoid crashes, but we should ask IMSI to solve the Bug anyway. It's very annoying.

By the way, I just discovered the program crashes on simple squares also, doing parallels of small rectangles (zooming in again) and re-sizing with the handles. I just have not isolated the problem yet. I am sure there'll be a way around this Bug also, but there's still the Bug to shake off, don't you guys think?

What options do we have as far as getting IMSI's attention to these details? I'd help with as many calls/mails as necessary.

Regards and a good day to all,

Alex

Rob S


QuoteWhat options do we have as far as getting IMSI's attention to these details?

That is a very good question, considering how useful we all think designcad is, and how much better it could be.

Maybe if you confirm to them that you'll be buying 10,000 copies of the program when they get it fixed, that might get their attention.

We are the smallest iron in their fire, we are the poor ugly cousin in the family, we get crumbs when they have nothing better to do, we are lucky if we get a couple of weeks of attention a year,

We try hard to prioritize the bugs we ask to have fixed primarily so they don't break anything more insurmountable in the process, and don't waste precious time fixing things we can fairly easily work around.

User since forever

testpilot

Thanks Rob,

Reality check: ... no big hope.

We are really dealing with a cheap program to say the truth, so probably this has also an influence on the time they'll be willing to invest on it to keep it neat.

Maybe like you say, we just have to accept the Bugs as an "thrill and excitment" element to the program, which keep our minds busy and active...and be happy they don't charge us extra for these!

Alex

Rob S

#22
Quotebe happy they don't charge us extra for these!

Don't be giving them any ideas, now  ;D
User since forever

testpilot

Aha!

The thing is as follows, the curves you create (be it imported, drawn, etc) are defined by a series of points (3 min), so if you want to cut the curve on any particular segment, DCad adds more points to preserve the same trace. This is the reason for the increasing of point count.

If the same points were used (example: just adding only 2 points to the new lines at the cut), there would be a discontinuity at the cut. The two new curves would end at this new "cut" point, but with different angles of incidence, because the new curves would have different points defining their new shapes, and they would not be continuous. What DCad does is create more points to compensate for this, and try to keep your line trace the same, without an inflection point at the cut, thus adding more points and weight to it.

As you keep cutting the curve (try this at home) at any of the ends, you will see the number of points multiply x 10 aprox for every cut, until you get to a point where no matter how many more cuts you make, the line has enough points to keep the original resolution, so the "points per inch" stay the same. Say you start with a curve of 5 points, and you cut it 4 times, it will go from 5 points to 50 to 500 to 5,000 and it will stay at 5,000 from there on...

...UNLESS you decide to zoom in (like to do fine triming of the line against another reference line), and in this case, once you zoom in, the program starts over with this same logic, multiply the number of points again until the new resolution for that zoom pan is acceptable for no discontinuity.  The problem is that if you keep manipulating the same curve, and the main segment remains rather long, after you zoom in and keep manipulating the points, it just keeps adding exponentially until DCad is not able to handle the curve anymore, thus collapsing.

My example file contains a line which has already been manipulated a couple of times, thus it is already heavy. That's why when you zoom in, and cut it, it collapses.

Going from "Curve to Line" will help, because the number of points remains the same, but a discontinuity will still exist when you cut/trim the line. As you get back to Curve again, you will see this discontinuity. Probably if the resolution is good enough, and the application is not critical, this little discontinuity might be acceptable.

As Adriank mentioned, is there a way to re-define a curve as to reduce the number of points? or is this done manually (re-drawing)? I tried but I can't find a command for this.

Alex

Lar

Note: The following was being typed before testpilot's previous post was entered and it covers a similar insight to his and actually answers his final question, ie, use the Edit menu> Selection Edit>Smooth Line by Point Reduction (or Slope Detection) commands as opposed to the Curve to Line command


Quote from: testpilot on July 06, 2010, 07:29:13 AM
...
In any case, I think Design-CAD should work for me, not the other way around. If when working on a curve, I have to be converting to line first, cut/edit, and then back to curve again, etc, then I'd be waisting too much of my time. I think the designers should come out with a correction so D-CAD just adds points to the segment that has to be manipulated, between two existing points, just as many as needed so that when you cut the line, you preserve the integrity of the original. Adding so many points to the whole line is not really necessary.
...

Actually, thinking about it, dcad does the all around best function when you cut and parallel curves entities and my advice about using the curve to line function may not be the absolute best.

Imagine the following scenario: draw a 4 point curve in the general shape of a sine wave, with a point at each peak and valley. The curve would bend through each point, right. Now select it, duplicate it on top of itself then use curve-to-line (on the original only). The bends becomes sharp at each point. Now break the line at the 2nd point and convert the two resulting parts back into curves. The first part, which only has 2 points, would remain straight. The 2nd part (3 points) would not match the curvature of the duplicated curve. In fact, it would be way off.

The new split curves generated from the original may have more points but they keep the curvature of the original.

Now do the same sort of test with the parallel (by distance) command. This time parallel the curve, 'curve2line' the original, parallel that (by the same amount, of course) then 'line2curve' the 2nd line. It would not sit exactly on top of the first parallel curve.

In this case, the new parallel curves use enough points, I'm assuming, to generate a mathematically correct parallel curve.

Like adriank said, paralleling a curve cranks the new point count up like crazy so I guess my advice should be to use the point reduction command after you parallel or break a curve if accuracy is important. If not, and you are concerned about keeping the point count and therefor filesize (and potential crashes) down, then use the curve2line before paralleling and line2curve them back afterwards.

Lar

testpilot

Dear Lar,

The Smooth by Point Reduction command is a great tool, and will be very helpful from now on. I do need to cut/trim these curves a lot, and I also need the accuracy. This trick will save me from crashing DCad during these operations.

I see this Function doesn't have a keyboard command assigned, so I added the ALT/P to run a "Point Reduction" with a default "10" point grouping. This will speed up the process. I will also get into the habit of quick-checking point separation, and if the curve looks crowded, I will just run a quick ALT/P on it to keep them at safe levels.

Thanks to all for your great contributions! This is a great Forum.

Alex

Dr PR

The problem with all the additional points is that most are not needed to maintain the original curve shape. The best way to solve the problem in the program would be to implement a "point density" algorithm to add lots of points at sharp curves and curve ends, and few points along relatively straight sections. But the program doesn't do this automatically so we must do it ourselves.

1. Lock the original layer.
2. On another layer draw a new curve (C) over the original.
3. Zoom in and look for parts of the new curve that do not fall exactly on top of the original - this happens at sharply curved sections or near curve ends.
4. In Point Select mode select the new curve.
5. Add new points where needed (point at the curve and click when the "+" in a circle target appears in the cursor). Drag the new point over the original curve and use the "K" snap to a line function to snap these new points to the original curve.

Yes it is extra work, but you learn quickly how to set a few points to force the new curve segment to fall on top of the original, and you do not get curves with enormous numbers of points. I think it is much less work than trying to repair the bloated curve fragments.

I rarely, if ever, keep the original curve segments that result after cutting a curve. They cause drawing size to bloat rapidly, and I already have trouble with file sizes too large to edit. I just use the cut curve segments as templates for new curves with many fewer points and delete the originals. I guess that is why I have never seen the problem with the program crashing.
DesignCAD user since 1987

paulerens

#27
Dr PR,
[few points along relatively straight sections. But the program doesn't do this automatically so we must do it ourselves.]

EDIT>SELECTION EDIT>CONVERT>VECTOR CONVERT > Does that.
But the line has become a vector.

Paul.

Dr PR

paulerens,

You are right. After you vector convert the line you can use "Edit/Selection Edit/Convert/Line to Curve" to regenerate a curve using the same points created with the Vector Convert function. However, Vector Convert places a huge number of points in the more sharply curved sections.

You can use "Edit/Selection Edit/Smooth Line By Slope Detection" to create a new curve from the vector line and reduce the number of points (select the "Convert to curve for line smoothing" option). The attached image shows the results. Increasing the angle between points reduces the number of points, but also increases the inaccuracy compared to the original curve. The algorithm doesn't actually examine the curve and place points "intelligently."

Of course the result is a new curve with more points that doesn't fit the original curve perfectly. I can get as good or better results manually by editing the curve in Point Select mode, with a lot fewer points.
DesignCAD user since 1987

Dempsey

Still dies in V20.1. Refusing to execute a command is acceptable, whatever we do in DesignCAD, it should never crash/abort.

I filed it as Problem Report P-197.
Dempsey