Author Topic: BPOLY using .NET  (Read 4545 times)

0 Members and 1 Guest are viewing this topic.

MaksimS

  • Guest
BPOLY using .NET
« on: April 21, 2007, 07:52:56 AM »
Dear all,

Is there any .NET example of creating boundaries (polylines) by picking a point inside a closed contour - similar to BPOLY command?

Regards,
Maksim Sestic

MaksimS

  • Guest
Re: BPOLY using .NET
« Reply #1 on: April 24, 2007, 09:07:25 AM »
I see, noone's interested in how BOUNDARY command works... Still, we can always use half-working solution from command line :-) Actually, I don't like the way current boundary command works - it depends on too many factors and frequently reports correct geometries as incorrect, which is not an option.

I've been thinking of polygonizing geometries that form edges, then optmizing point-in-polygon test to see which edges (if any) take part in output boundary. Any thoughts on what approach to take?

Regards,
Maksim Sestic

deegeecees

  • Guest
Re: BPOLY using .NET
« Reply #2 on: April 24, 2007, 09:10:13 AM »
... waiting for LE to respond here ...

Glenn R

  • Guest
Re: BPOLY using .NET
« Reply #3 on: April 24, 2007, 09:40:09 AM »
Ahhh...ray-tracing...

Glenn R

  • Guest
Re: BPOLY using .NET
« Reply #4 on: April 24, 2007, 10:14:46 AM »
Go Luis!

MaksimS

  • Guest
Re: BPOLY using .NET
« Reply #5 on: April 25, 2007, 08:46:42 AM »
I understand, I was just in doubt whether to use available ACAD libraries (possibly managed) or to start searching for some other solution.

The trick is - geometry I'm dealing with needs to conform to certain OGIS rules. In that way it's reusable on other platforms, while managed code dealing with it is at the same time easily portable, too. I.e. geometry/functions utilized by AutoCAD also work with, say, Oracle RDBMs (it's just a matter of spatial provider inbetween).

Regards,
Maksim Sestic


I have done several solutions BETTER than the BPOLY command and I do not think there can be one available as an open source or for free.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: BPOLY using .NET
« Reply #6 on: April 26, 2007, 06:20:13 PM »
We bought and use Luis' program and it definately fills a gap in acad.
There was one called GBound before Luis by Tovna.com I think.

I am very interested in this subject as I could use such a program in several apps I have done.
I thought through it and it came down to breaking up all crossing objects into pieces (in memory), then assembling them into closed shapes.
Its very intensive though the more lines you have.
Do other disciplines than CAD have algorithms for this?
James Maeding

TonyT

  • Guest
Re: BPOLY using .NET
« Reply #7 on: April 26, 2007, 07:08:18 PM »
Nothing against Luis, but in general, licensing code from someone,
somewhere, without source, is a very unwise business decision.

There are no reasonable guarantees that bugs will be fixed.
There are no reasonable guarnatees that vendor will continue
to maintain the code and provide updates if changes to the
underlying APIs require it.
There are no reasonable guarantees that the vendor will
always be in business and available.

Licensing components without source, is foolish at best.
If the vendor wants to license the source to you, then
that's another story. Otherwise, and regardless of whose
code it is, I wouldn't go near it.

I understand, I was just in doubt whether to use available ACAD libraries (possibly managed) or to start searching for some other solution.

The trick is - geometry I'm dealing with needs to conform to certain OGIS rules. In that way it's reusable on other platforms, while managed code dealing with it is at the same time easily portable, too. I.e. geometry/functions utilized by AutoCAD also work with, say, Oracle RDBMs (it's just a matter of spatial provider inbetween).

Regards,
Maksim Sestic


I have done several solutions BETTER than the BPOLY command and I do not think there can be one available as an open source or for free.

MaksimS

  • Guest
Re: BPOLY using .NET
« Reply #8 on: April 27, 2007, 04:02:47 AM »
That's true, Tony. Present company policy strictly forbids licensing externally licensed apps/code, it's not just a question of coding/functionality per se. Sometimes it may get rough when it comes to licensing terms (mis)interpretation, having in mind various interpretations of intellectual property rights among different countries :-)

Talking of BPOLY, I was thinking of either using present ACAD (managed?) libraries or taking some other way round:

1) exploding entities down to primitives
2) optimization of candidate geometries
3) noding and polygonizing resulting geometry
4) point-in-polygon testing for picked point
5) re-creating boundary using positive candidate geometries

Regards,
Maksim Sestic

Nothing against Luis, but in general, licensing code from someone,
somewhere, without source, is a very unwise business decision.
« Last Edit: April 27, 2007, 04:08:14 AM by MaksimS »

SpeedCAD

  • Guest
Re: BPOLY using .NET
« Reply #9 on: August 12, 2007, 08:17:24 PM »
Dear all,

Is there any .NET example of creating boundaries (polylines) by picking a point inside a closed contour - similar to BPOLY command?

Regards,
Maksim Sestic

Hi...

I did it thus:

Code: [Select]
<CommandMethod("sBpoly")> _
    Public Sub sBpoly()
        Dim sExpresion As String = "(bpoly (getpoint ""\nSelect point: "")) "
        ed.Document.SendStringToExecute(sExpresion, True, False, False)
    End Sub