Author Topic: ==={Challenge}===Find the ridge lines of sloped roof  (Read 72909 times)

0 Members and 1 Guest are viewing this topic.

pkohut

  • Bull Frog
  • Posts: 459
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #210 on: February 27, 2023, 07:41:01 AM »


@Lee, @Daniel, @Gilles, @Evgeniy, @Owen, @Highflybird, ... and others, tell me how to continue, but not to loose speed too much...

Where are the code comments?
Want speed - get out of lisp.
Want speed - keep nested loops to a minimum.
Want speed - don't do heavy calculations deep in the loops.
Want speed - don't do if checks deep in the loops.
Want speed - learn algorithms and data structures.

retread - public repo at https://github.com/pkohut

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #211 on: February 27, 2023, 07:58:43 AM »


@Lee, @Daniel, @Gilles, @Evgeniy, @Owen, @Highflybird, ... and others, tell me how to continue, but not to loose speed too much...

Where are the code comments?
Want speed - get out of lisp.
Want speed - keep nested loops to a minimum.
Want speed - don't do heavy calculations deep in the loops.
Want speed - don't do if checks deep in the loops.
Want speed - learn algorithms and data structures.



Why do you need code comments?
For other opinions I agree, but not my field of knowledge...
It could be written in lisp for sure to be fast enough - look at chlh_jd's example...
The problem is that complexity may grow - ultimate roofs - 100 and more vertices...

If you test it, you'll see what it do till now... The problem arises with widening code - finding correct solution based on offsetting...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #212 on: February 28, 2023, 01:19:58 PM »
And here is it classical example of how topic get overcrowded with other new ones...

Have someone thought ab this examples, especially the ones posted at cadtutor.net - download section...

I would like to see something new that may be better than my attempts...

M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

pkohut

  • Bull Frog
  • Posts: 459
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #213 on: February 28, 2023, 02:48:52 PM »
And here is it classical example of how topic get overcrowded with other new ones...

Have someone thought ab this examples, especially the ones posted at cadtutor.net - download section...

I would like to see something new that may be better than my attempts...

M.R.

Fair enough.  Your playground, your rules.  Take my non-lisp ball to another field.   :2funny:
retread - public repo at https://github.com/pkohut

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #214 on: March 01, 2023, 10:18:03 AM »
 :-D :knuppel2:
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #215 on: March 06, 2023, 10:53:05 AM »
To all users, or else watching...

Can this routine here in attachment work faster with ultimate roof example, and not to depend on PC hardware architecture configuration...

I am not searching translation to ARX, BRX, (but I suppose it would be perfect) or something else, though and DLL for latest versions of Auto/BricsCAD would be very welcomed, I also need tweaks if someone operates with *.LSP on higher level of intelligence...

Link for ultimate roof DWG : https://www.theswamp.org/index.php?topic=41837.msg613477#msg613477
« Last Edit: March 10, 2023, 02:45:15 PM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #216 on: March 06, 2023, 12:11:08 PM »
Letter to programmer masters...
Quote
Is my routine hardware dependent... (roof2d-new-new-offset.lsp)... If so, which is mostly the case, then the job is done... I don't know how to tweak for ultimate roofs (100 and more vertices)... If it doesn't depend on the hardware, then let someone more expert than me take a look... It doesn't matter if it's *.lsp, *.arx, *.brx, * .dll... it's only important that it works optimally, which I doubt... I don't know, if you care, ask around, maybe by chance a solution for slowness will be found... I took all the parameters into circulation and matched them with each other ... Perhaps I should have left something out, but then not all the tests would have passed... See what you can do, if you have the time and interest...

Testing *.DWG is in attachment...
« Last Edit: March 10, 2023, 01:57:40 PM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #217 on: March 07, 2023, 10:35:30 AM »
 :-( :-( :-(
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 2940
  • Marko Ribar, architect
Re: ==={Challenge}===Find the ridge lines of sloped roof
« Reply #218 on: March 11, 2023, 11:56:24 AM »
I've found some workaround... It was all the time in front of my(ours) nose...
As for the ultimate roofs, test for 1 full rotation of vertices, so if it is not found the first time, trim one of the sides of the lwpoly, turn it closed through palette, which changes the initial vertex... After a bit of hacking in this way, 2droof-final.lsp should find solution within 1 to 2 seconds... Just don't forget that errm doesn't even need to iterate... The solution should be solvable during the first iteration of errn...

New update is here : https://www.cadtutor.net/forum/files/file/36-hipped-roof-routines/
« Last Edit: March 20, 2023, 12:15:27 PM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube