Jump to content

Help to calculate Area!


lossan805

Recommended Posts

  • Replies 26
  • Created
  • Last Reply

Top Posters In This Topic

  • lossan805

    8

  • Lee Mac

    6

  • Dadgad

    5

  • amarcon

    4

Top Posters In This Topic

Posted Images

Lee Mac, brilliant, you interpreted corectly, this is what I was after. Thanks for another generous contribution. I'm off to dissect your code and learn :D

Link to comment
Share on other sites

You're entirely welcome amarcon - if you have any questions about the algorithm I have implemented in the program, just ask and I'll do my best to explain my methodology.

Link to comment
Share on other sites

Lee,

 

Was using your routine in 'real world' today and discovered an abnormality with the results. Have attached info for you to see.

With regular 'dummy' testing I have got good results. This one perplexes me :o

You have any thoughts why it gets funny results?

polyarea_query.zip

Link to comment
Share on other sites

amarcon, test it now on this dwg - with my hatches (all outer panels have to have hatch, and the one that have openings must not have hatch as also openings shouldn't have hatch)... Test it with my code...

 

M.R.

polyarea-panels.zip

Edited by marko_ribar
Link to comment
Share on other sites

Lee,

 

Was using your routine in 'real world' today and discovered an abnormality with the results. Have attached info for you to see.

With regular 'dummy' testing I have got good results. This one perplexes me :o

You have any thoughts why it gets funny results?

 

Hi amarcon,

 

Looking at your drawing, I don't think my program is suited to your task, since the ray-casting algorithm is likely to return anomalous results if the ray intersects paralell to an edge of another polyline.

Link to comment
Share on other sites

Lee,

 

Thanks for your efforts. The example was not 'the norm' but it was good to find that there are limitations with your ray-casting algorithm. With 90% of other projects they are all rectangles and your routine seems to work fine. It's just a matter of horses for courses.... lol..... I know I can use it confidently knowing this issue.

 

M.R.

 

Thank you for your routine, also looks a very useful tool. It seems to give good results on the test. However, even with my single click hatch routine it can be cumbersome to hatch 200 panels and not hatch 10-20 that have openings. Any chance your routine could work opposite? Meaning just hatch the 'openings' ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...