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

0 Members and 1 Guest are viewing this topic.

rw2691

  • Newt
  • Posts: 131
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: 131
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: 8405
  • 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: 131
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: 8405
  • 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: 131
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."