Author Topic: bounding box along direction  (Read 4891 times)

0 Members and 1 Guest are viewing this topic.

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: bounding box along direction
« Reply #30 on: November 21, 2023, 03:51:41 AM »
but it also fails when there are blocks that are not uniformly scaled
(even if they do not contain solid hatches)...

xdcad

  • Bull Frog
  • Posts: 493
Re: bounding box along direction
« Reply #31 on: November 21, 2023, 05:26:57 AM »
but it also fails when there are blocks that are not uniformly scaled
(even if they do not contain solid hatches)...

Pls Upload a DWG that encounters problems。
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

xdcad

  • Bull Frog
  • Posts: 493
Re: bounding box along direction
« Reply #32 on: November 21, 2023, 05:33:01 AM »
anyway, when there is a solid hatch, there are allways problems...
... but it doesn't depend from your great xdrx-entity-box function ...
which maybe should be called xdrx-ss-box

In order not to classify so many names, they are all classified as entity.
Entity can handle a single entity, but also supports tables or selection sets of multiple entities.

If it is called ss, will the same problem still occur when only one is processed? :smitten:
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

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: bounding box along direction
« Reply #33 on: November 21, 2023, 06:13:18 AM »
Quote
Pls Upload a DWG that encounters problems。

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: bounding box along direction
« Reply #34 on: November 21, 2023, 06:25:56 AM »
Quote
If it is called ss, will the same problem still occur when only one is processed ?
No.
It will be a selection set that contains only 1 entity.

a rule could be that
when a function processes only 1 entity name,
its name has to contain the word "entity",
while if it processes a selection set,
its name must contain the word "ss" or "sset" . . .

. . .
however this is not a big problem
. . .







xdcad

  • Bull Frog
  • Posts: 493
Re: bounding box along direction
« Reply #35 on: November 21, 2023, 09:51:46 AM »
but it also fails when there are blocks that are not uniformly scaled
(even if they do not contain solid hatches)...

Solved, it is a problem that has always existed in AUTOCAD itself, that is, there is a deviation in the SPLINE bounding box.
Ordinary SPLINE, API has been solved,
However, in the block, the method of finding the bounding box is to use ARX's AcDbSpatialFilter::queryBounds(...) method, but there is still a problem.

Now I use my own method to process SPLINE in Block separately.

The API has been updated, please try downloading it again.

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

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: bounding box along direction
« Reply #36 on: November 21, 2023, 11:55:25 AM »
yes, with splines contained in a not uniformly scaled insert, works ...

but still not, with a solid hatch !

xdcad

  • Bull Frog
  • Posts: 493
Re: bounding box along direction
« Reply #37 on: November 21, 2023, 12:44:19 PM »
yes, with splines contained in a not uniformly scaled insert, works ...

but still not, with a solid hatch !

That's because your HATCH has a border, and the grip points of the border SPLINE are all within the range, and the data is stored in the HATCH object.
So that's all it takes, the result is correct.
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