Author Topic: AREA BUG with complex SPLINE curves?  (Read 1979 times)

0 Members and 1 Guest are viewing this topic.

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
AREA BUG with complex SPLINE curves?
« on: June 21, 2016, 08:15:28 AM »
I just run across this bug - see attached DWG...

When converted to REGIONS the area is correct, but like they are - complex SPLINES they both give AREA=1.0... I solved my task prior they are created when they were REGIONS, but I know this shouldn't happen... (vlax-curve-getarea curve) is also not helping and also (vla-get-area (vlax-ename->vla-object curve))... Have you seen this, some opinion?

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

:)

M.R. on Youtube

hmspe

  • Bull Frog
  • Posts: 362
Re: AREA BUG with complex SPLINE curves?
« Reply #1 on: June 21, 2016, 10:06:08 AM »
With Bricscad V16.2.09-3 I get 305.342663861799 and 385.598927810657 with the two functions you posted.  If I hatch the areas then list the hatches I get 305.34298616 and 385.60150855.  With Autocad 2013 I get -1.0 and -1.0 with the two functions.

I ran dump.lsp from Lee Mac on the left entity in both Autocad and Bricscad.  The significant difference appears to be that Autocad reports

;   EndTangent = AutoCAD.Application: General modeling failure
;   StartTangent = AutoCAD.Application: General modeling failure

Bricscad reports nil for both.
"Science is the belief in the ignorance of experts." - Richard Feynman

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: AREA BUG with complex SPLINE curves?
« Reply #2 on: June 21, 2016, 10:32:15 AM »
With Bricscad V16.2.09-3 I get 305.342663861799 and 385.598927810657 with the two functions you posted.  If I hatch the areas then list the hatches I get 305.34298616 and 385.60150855.  With Autocad 2013 I get -1.0 and -1.0 with the two functions.

I ran dump.lsp from Lee Mac on the left entity in both Autocad and Bricscad.  The significant difference appears to be that Autocad reports

;   EndTangent = AutoCAD.Application: General modeling failure
;   StartTangent = AutoCAD.Application: General modeling failure

Bricscad reports nil for both.

So the bug is confirmed... Now just to fix it... Easier said than to be done... I don't know how to report it to Adesk, but maybe someone will do it for me... Of course if he/she find it appropriate...

Thanks for reply...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

rw2691

  • Newt
  • Posts: 133
Re: AREA BUG with complex SPLINE curves?
« Reply #3 on: June 22, 2016, 12:07:44 PM »
Sirs,

I think I have encountered a similar problem with splines. I noticed it by snapping to them. They have a ghost line that it can snap too... not every time, but frequently enough that I no longer rely on any math function performed on a spline. They are only pretty. Not technical.

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

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: AREA BUG with complex SPLINE curves?
« Reply #4 on: June 22, 2016, 02:56:50 PM »
I was just pointing to an lack of software... I don't say that it should be fixed right away, but I think that some sort of accuracy for calculating areas of this kind should exist... Is region entity that was based on SPLINE technical? If you use curves as references for comparison in routine like I did, I firstly encountered that this lack may lead to all kind of mistakes - when you think it's correct as it's supposed to be you may be fooled by program and moreover someone may rely on this calculations thinking that it's good, but in fact it may produce problems in all kind of aspects and fields this results are used... This is no question is some curve technical, pretty or not, sooner or later you'll find that you may just need such elegance in technical and other aspects and instead of improvement and develop on previous achievements like the one in case of SPLINE (when it was first introduced in CAD), the art of making and managing correctness of calculations in field of production will be questionable...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

rw2691

  • Newt
  • Posts: 133
Re: AREA BUG with complex SPLINE curves?
« Reply #5 on: June 23, 2016, 12:52:37 PM »
The SPLINE that I am referring to is the one that has an icon on your toolbar. Within Pline is a different function that is also called spline, and I believe it is rigorous. The ICON SPLINE is not, but it is prettier.  I don't know which function is used by REGION. The snap issue on the ICON SPLINE can be viewed by trying to nearest snap along its entire body. There will be some blind spots. I never use SPLINE for anything that is position critical, even though it holds to all your construction points. I only use it for visual applications.

As Autocad fixing it... you can probably forget about it. I use ACAD 2006. If you have a later version, and it has the same problem, it is evidence that they don't care. I have rarely seen ACAD fix anything. They just make a new version.

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

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: AREA BUG with complex SPLINE curves?
« Reply #6 on: June 24, 2016, 03:17:04 AM »
You're probably right ab fixing and now I suddenly don't care anymore as I test it with manually creating complex SPLINE like in example posted and it had AREA, tried also with 3DPOLY - closed one - it has AREA... Then I did once again with routine and it was with BUG... It seems that it has to do something with these steps : LINES+SPLINES (connected) => REGION (applied REGION command on them) => CONVTOSURFACE (applied to REGION) => OFFSETEDGE (applied to SURFACE with offset 0.0)... Then (entdel surface)... Left SPLINE after OFFSETEDGE is buggy... But in fact I firstly thought that and manual approach will throw bug, but it seems its fine - it has AREA... So it was my experimenting after all, and who knows maybe sometime and this may be resolved... M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube