Author Topic: Triangulation (re-visited)  (Read 317762 times)

0 Members and 1 Guest are viewing this topic.

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #540 on: February 15, 2016, 08:55:44 AM »
I wanted to test my idea that the former TopoWar crash was by too many tins. I took some points that did not have any whole contour elevations and copied them over and over to build a big topo. Then I built a TIN and CONTOURS at the same time...
******************************************************
Select objects: Specify opposite corner: 7786 found

Select objects:
; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on exception
******************************************************
I repeated the selection without doing the CONTOURS and had the same results.

Then I did a partial segment and had success at building a TIN...
******************************************************
Select objects: Specify opposite corner: 554 found

Select objects:

       TIN V0.6.7 - Elapsed time: 0.469 secs, 1087 3DFACES
******************************************************

I also tried selecting half of the points, and again had success...
******************************************************
Select objects: Specify opposite corner: 3822 found

Select objects:

       TIN V0.6.7 - Elapsed time: 5.954 secs, 7625 3DFACES
******************************************************

Then I drew several break lines across the points at a 650' elevation. No crash.
******************************************************
Select objects: Specify opposite corner: 560 found

Select objects:

       TIN V0.6.7 - Elapsed time: 0.469 secs, 1110 3DFACES
     CDT V0.6.7 - Elapsed time: 1.360 secs, 3 Constraints
******************************************************

Then I drew contours on the same group with the 650 break lines. No crash...
******************************************************
Select 3DFACES
Select objects: Specify opposite corner: 1110 found

Select objects:

   CONTOUR V0.6.7 - Elapsed time: 12.766 secs, 1375 LWPOLY, 18241 Vertices.
DEPRESSION V0.6.7 - Elapsed time: 2.781 secs, 1354 Closed Poly
******************************************************

Lastly I selected a larger group that included the 650 break lines. It crashed...
******************************************************
Select 3DFACES
Select objects: Specify opposite corner: 14426 found

Select objects:

Error: bad argument type: 2D/3D point: nil
******************************************************

Conclude what you will, but it looks like the 650 break lines are not the problem. It looks like too many TIN's to me.
Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

schoeller

  • Mosquito
  • Posts: 12
Re: Triangulation (re-visited)
« Reply #541 on: February 15, 2016, 10:12:46 AM »
Hello YMG,

thanks for letting me try your code. I loaded version 0.6.5.5 with Bricscad version 15.3.05 ( (x64) revision 39062). When calling the TIN command from the command line I receive the error:

***
tinV0.6.5.5.dcl 371: context error - invalid attribute value 'Left'
***

Any assistance would be appreciated in order to be able to go further.

Best wishes

Sebastian

ymg

  • Guest
Re: Triangulation (re-visited)
« Reply #542 on: February 15, 2016, 12:12:04 PM »
schoeller,

Try by removing line 895 and 907 in the lisp and see If you can load.

Make sure you remove the file tin6.5.5.dcl from the temp directory
before running.

Maybe Briscad is more rigid when parsing dcl than autocad

ymg

ymg

  • Guest
Re: Triangulation (re-visited)
« Reply #543 on: February 15, 2016, 01:43:56 PM »
Rick,

Just checked with topowar's dwg and Version 6.7 and could not reproduce
what you are describing.

The triangulation comes out OK, however the contour do crash.

ymg

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Triangulation (re-visited)
« Reply #544 on: February 15, 2016, 02:10:45 PM »
Maybe Briscad is more rigid when parsing dcl than autocad
FWIW: BricsCAD only accepts values in lower case here. In general DCL is case-sensitive.

ymg

  • Guest
Re: Triangulation (re-visited)
« Reply #545 on: February 15, 2016, 02:21:45 PM »
Roy,

Quote
FWIW: BricsCAD only accepts values in lower case here. In general DCL is case-sensitive.

Thanks, seems to be the problem as the line were reading:

Code: [Select]
(write-line "              alignment = Left;                             "f)
should be changed to:

Code: [Select]
(write-line "              alignment = left;                             "f)
ymg

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Triangulation (re-visited)
« Reply #546 on: February 16, 2016, 03:56:42 AM »
@ ymg:
Yes that is correct. After changing the values as you have indicated, BricsCAD will accept the dcl. Because BC uses its own DCL engine there are some minor alignment issues. But I don't think these are very important.

schoeller

  • Mosquito
  • Posts: 12
Re: Triangulation (re-visited)
« Reply #547 on: February 16, 2016, 04:14:18 AM »

Code: [Select]
(write-line "              alignment = Left;                             "f)
should be changed to:

Code: [Select]
(write-line "              alignment = left;                             "f)

Thanks YMG,

after updating either 0.6.5.5 or 0.6.7 work for triangulation.

Best

Sebastian

ribarm

  • Gator
  • Posts: 3279
  • Marko Ribar, architect
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #549 on: February 18, 2016, 09:31:25 AM »
YMG,

I didn't use TopoWar's drawing because I wanted control over the contour elevations. So I created my own where only the break lines have contour grades. I have attached the drawing.

Rick
Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

ymg

  • Guest
Re: Triangulation (re-visited)
« Reply #550 on: February 19, 2016, 10:31:21 PM »
Rick,

I've explained many times that there is still a problem
when triangle lays exactly on the contours level.

Inserting your break line at exact elevation 655 pretty
much insure that it will not work, at least pending that
I find a solution to that bug.

If you change the elevation of your breaklines by raising it
1 cm, program completes normally.

I find your example not very useful.

Look at the following image of a Tin formed with 3 square breaklines
at elevation 0  5 and 0

The tin is correct but the contour even though they did not crash
are incorrect.  I should end up with squares at 0 5 and 0



ymg
« Last Edit: February 19, 2016, 11:54:10 PM by ymg »

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #551 on: February 20, 2016, 03:57:05 PM »
YMG,

Sorry it wasn't helpful. I thought it demonstrated that the contours don't crash until there is a large number TIN's. Maybe I can be helpful at another time. Thanks for considering it.

Rick
Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

ymg

  • Guest
Re: Triangulation (re-visited)
« Reply #552 on: February 21, 2016, 11:59:40 AM »
Rick,

In other word what I am saying is that the number of triangles
is not the culprit here except for increasing the chances of having
a crash.

The real reason is that the routine threading through the 3dfaces
following a given level gets lost when one or more of the points
forming the faces have a z value equal to the contour being threaded.

I've try many different ways to resolve it, but so far still haven't find
the correct one.

ymg

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #553 on: February 23, 2016, 02:46:03 PM »
YMG,

Don't get mad at me.

I edited my point list to insure there are no decimal 0's. There were a couple were that "x.004". That may have entered your round out tolerance. Just for perspective... the topo area is at about 140 acres.

I did not insert any break lines. Built the TIN and it was fine. But when doing contours I noticed sticks everywhere. Contours were busted with throw outs... the sticks. I looked closer and they were all depression contours. Additionally, the depression contours weren't depressions. Something is wrong.

So I took the depression code out of the lisp. Rebuilt the TIN, and built the contours. The contours built perfectly.

To go a little further, I inserted the 650' break lines, rebuilt the TIN, then did the contours again. It did not crash, and again, it built the contours perfectly... giving full respect to the break lines. No sticks anywhere.

My conclusion is that the depression code has the fault, and is causing the crash.

By the way... and it is just my opinion, but I would like the depression lines to be optional. I wouldn't usually want them.

Rick.

Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

ymg

  • Guest
Re: Triangulation (re-visited)
« Reply #554 on: February 24, 2016, 01:18:39 PM »
Rick,

If there are no points that are exactly on the contours. Yes it builds correctly.

The depression contours could be at fault in your particular case, I will have to check.

For making it optionnal, I agreed that we would in the next version.

However having a restriction on the point level is not acceptable.  Means that we must find a solution
to the point equal to contour level.

I am traveling at the moment, so progress is slow.

By the way where do you get the notion that I am mad at you ? 



ymg
« Last Edit: February 24, 2016, 02:43:18 PM by ymg »