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

0 Members and 1 Guest are viewing this topic.

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #810 on: October 14, 2023, 05:07:08 AM »
ribarm,

I have previously tried your system, and it is also failing to use the breaklines.

I need to know what sections of the code are handling the breaklines, so that I may examine it and fix the issue. It has to be a naming conflict with the BricsCAD system.
Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #811 on: November 02, 2023, 01:19:53 PM »
To all,

I finally found where and how YMG was handling the break lines.

But I have disturbing news about BricsCAD. Versions 22 thru 24 have produced identical conflicts with LISP and OLE construction.

1) They will not process DXF methods that relate to self made TIN constructs, and they don't post any error messages about them either.

2) You cannot name your code TIN, because their TIN construct has that name, and they ignore your LISP code.

3) I had to resort to version 21 in order to precede these conflicts.

4) I have also found BricsCAD support to be rude toward anyone that does their own LISP and OLE coding, instead of using their tools or those of an endorsed programmer. So their "maintenance contract" is useless, because they consider that their software has a malfunction.

Nevertheless, they used to produce better work, and version 21 seems to be OK. I just hate that I wasted my money by upgrading to the newer versions.

In contrast, YMG's work has been very high quality ... so we can rely on what he has given us. Moreover, we can customize his code if we want something to operate differently.

However, his code for breaklines still had a problem. He was doing the breaks correctly, but it wasn't deleting the TINs that were crossing the breaklines. So I added some code that deleted all of the TINs, and then rebuilt the TINs per his corrections. The following is what I did...

Code: [Select]
;; Insertion of Constraints                                          ;
              (if cdtl   ;; cdtl, List of Points (3d) Forming Constraints 
                  (progn
                      (setq ti (time))
                      (acet-ui-progress "Inserting Constraint:" (length cdtl))  ;; starts acet-ui-progress bar

                      (mk_layer (list ".SRF-NET" 9))  ;;   color 9: ashes
      (rw_disablesnap)
 
                      (foreach k cdtl
                          (rw_FlipEdge (car k) (cadr k)) ;; sends x & y only
                          (progress-step nil)                 ;; rw_FlipEdge is a rename for ADDEDGE
                          )                                             ;; I was avoiding a possible naming conflict
 
      (rw_RebuildNet)  ;; THIS IS HOW I REBUILT THE TIN NETWORK ... I ADMIT IT IS A HACK!
 
                      (rw_enablesnap)
                      (acet-ui-progress) ;; ends acet-ui-progress bar                     
                      (if *bounden* (erase-outside *bounden*))

Code: [Select]
(defun rw_RebuildNet ()  ;; I USED COMMAND METHOD TO AVOID THE DXF ISSUE WITH BRICSCAD
       (C:JNK)
       (foreach tr tl  
      (cond
  ((= (length tr) 3)  ;; triangle   *** CONSTRUCT TIN ***
(setq p1 (nth (car tr) pl))
(setq p2 (nth (cadr tr) pl))
(setq p3 (nth (caddr tr) pl))
(command "3dface" p1 p2 p3 "" "") 
(setq 3DFL (cons (cadddr tr) 3DFL)) ;; update 3dfl
)
  ((= (length tr) 4)  ;; rectangle  *** CONCTRUCT SHEET *** NOT USED ***
(setq p1 (nth (car tr) pl))
(setq p2 (nth (cadr tr) pl))
(setq p3 (nth (caddr tr) pl))
(setq cutlist (cdr tr))
(setq p4 (nth (caddr cutlist) pl))
(command "3dface" p1 p2 p3 p4 "")
(setq 3DFL (cons (cadddr tr) 3DFL)) ;; update 3dfl
)
  )
  )
       )

Code: [Select]
(defun C:JNK ( / Target_Lyr)   ;; Junk: deletes TIN group   ;; IMP: rebuilds the TIN group
   (setq *osm* (getvar 'osmode))

   (defun *error* (errmsg)
   (if *osm* (setvar 'osmode *osm*))
   (if (not (member msg '("Function cancelled" "quit / exit abort")))
   (princ (strcat "\nError: " msg))
   )
   (princ)
   )
;;
   (setq LstLyr (getvar 'clayer))
   
   (setq Target_Lyr ".SRF-NET")   
   (Delete_Lyr_Items Target_Lyr)
   
   (setvar 'clayer LstLyr)
   )

Rick

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

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Triangulation (re-visited)
« Reply #812 on: November 03, 2023, 12:13:05 AM »
Maybe you can you undefine/redefine BricsCAD’s TIN command?

Re BricsCAD’s support, you probably got some one that didn’t understand the problem. It’s best to provide a simple function that illustrates the issue. I.e.  like a unit test. You probably got sent to the team the developed the tin and not the API team.



rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #813 on: November 03, 2023, 10:42:53 AM »
It was the manager of the Support Team. In my experience, I have found only one support person whom I feel is capable of "thinking outside the box," and that is Torsten Moses. Unfortunately, the manager won't let him talk to me anymore. The support department has become unhealthy, and in my opinion, three versions (22, 23 & 24) are proof of that. They have never fixed their problems. Actually, it reminds me of AutoCAD.

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

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8712
  • AKA Daniel
Re: Triangulation (re-visited)
« Reply #814 on: November 03, 2023, 08:26:39 PM »
Yikes, they’re probably flooded with stuff since v24 was just released. I’m sure they didn’t mean to be rude; they’re just being crushed, Torsten is probably being stretched thin.
If you post the bug, maybe someone here at the swamp can find a workaround


rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #815 on: November 13, 2023, 09:09:56 AM »
RibArm

I tried your BUBBLE function. I think that it helped the contours, but when I looked at the code, I was surprised that you are only calculating an average between existing points. How will an average of a triangular plate create a "bubble?" Shouldn't you take the neighboring tins and project the elevation curve that a group of tins would infer?

Rick
« Last Edit: November 14, 2023, 09:49:32 AM by rw2691 »
Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #816 on: December 25, 2023, 07:55:59 AM »
Good news ...

I had changed a lot of functions in the Triangulation program which involved PLINE and POLYLINE, and fixed it so that BricsCAD version 21 would be completely compatible with Triangulation.

Now better news ... BricsCAD version 24 has been updated to function perfectly with PLINE and POLYLINE functions. They also fixed it so that LISP and external OLE apps are totally compatible.

No more problem! Moreover, I have not wasted my money on their improvements to date. That had been depressing.

Rick
« Last Edit: December 26, 2023, 12:39:09 PM by rw2691 »
Hippocrates (400BC), "Life is short, craft long, opportunity fleeting, experiment treacherous, judgment difficult."

mhy3sx

  • Newt
  • Posts: 120
Re: Triangulation (re-visited)
« Reply #817 on: December 29, 2023, 10:44:39 AM »
Hi rw2691. Can you post the new code?

Thanks

xdcad

  • Bull Frog
  • Posts: 492
Re: Triangulation (re-visited)
« Reply #818 on: December 29, 2023, 11:14:54 AM »
The code I wrote uses XDRX-API,which can be downloaded from github.com and is updated at any time.
===================================
https://github.com/xdcad
https://sourceforge.net/projects/xdrx-api-zip/
http://bbs.xdcad.net

rw2691

  • Newt
  • Posts: 133
Re: Triangulation (re-visited)
« Reply #819 on: January 18, 2024, 01:31:47 PM »
@mhy3sx

I work with a trimmed down version that only does the things that I need done. Plus, I have interfaced with my COGO code. You might not be very happy with it. So I say ... if the version that you have is not giving you any trouble, you should stay with that.

I was posting because BricsCAD had caused what used to work, to not work. But now they have fixed BricsCAD, and Triang works again. But I have not gone back to the previous version that I was using (it was also very trimmed down).

I like the changes that I had to do in order to keep working with BricsCAD. I think that my version of Triang is much healthier. To fix it for BricsCAD I had to remove the DXF codes, and replace them with standard command line objects. It is slower than DXF, but that is only significant on very large properties. On the practical side, as well, most projects are from 1 to 30 acres. I don't notice the slowing.

However, what I have cut out of the software are things that I am not Professionally allowed to do in my State and Country. They are things that Engineers have reserved for their practice. I am a Land Surveyor, and all that I need are contours. I am not even supposed to do earthwork designs ... that is also Engineering; but Engineers do not want to collect data or chop trees down. So they are happy that I will, and they hire me to do so.

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

PrinceLISPalot

  • Newt
  • Posts: 36
  • perfectionist trapped inside the mind of an idiot.
Re: Triangulation (re-visited)
« Reply #820 on: January 18, 2024, 09:57:11 PM »
Maybe you can you undefine/redefine BricsCAD’s TIN command?

Possibly better to create an alias for the LISP command.

Code - Auto/Visual Lisp: [Select]
  1. (defun C:TN ()(C:TIN))