Author Topic: Straight Skeletons for Roofs  (Read 18726 times)

0 Members and 1 Guest are viewing this topic.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16874
  • Superior Stupidity at its best
Straight Skeletons for Roofs
« Reply #30 on: October 13, 2004, 10:39:37 PM »
would be good if it happened... I have seen the need for such a routine in recent months...
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

LE

  • Guest
Re: Straight Skeletons for Roofs
« Reply #31 on: December 01, 2005, 12:02:39 AM »
Once I finish my new arcdraw objectarx project.... I will give this a try.

I did not read all the previous posts... but we can draw the roof automatically [normal shapes] if we use a closed polyline, extrude, with a large height and 45 as an angle of taper....

CAB

  • Global Moderator
  • Seagull
  • Posts: 10397
Re: Straight Skeletons for Roofs
« Reply #32 on: December 01, 2005, 07:43:10 AM »
I hope Serge is still interested in this one.

But if not i am.
You know, I still have my notes & pseudo code on my desk as we speak.
Could not file it away just yet. Only been a year :-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Straight Skeletons for Roofs
« Reply #33 on: December 01, 2005, 11:47:18 AM »
Here are two commands to run some tests:

TST1 and TST
It has an offset distance of 0.5
For now, it will require the selection of some of the resultant polylines, and maybe one of these days to come up with the other part [to connect all the points to draw the valleys and crests]

The commands are compiled as FAS.

Have fun.

LE

  • Guest
Re: Straight Skeletons for Roofs
« Reply #34 on: December 01, 2005, 11:59:41 AM »
Here is a demo image:

Serge J. Gianolla

  • Guest
Re: Straight Skeletons for Roofs
« Reply #35 on: December 02, 2005, 01:00:53 AM »
Yes CAB, still definitely IN TE RE ST ED :lol:
Luis, I tried your FAS file, and for a while nothing appears to happen - I realised why, we work in metric and when using offset distance of 0.5 for us it is 1/2 mm! Maybe a better value of 50mm at this stage, then can be refined, and possibly checking variable MeasureInit to see if dwg is in imperial or metric.
P.S: this got you hooked, didn'it?  :-D
Ta

LE

  • Guest
Re: Straight Skeletons for Roofs
« Reply #36 on: December 02, 2005, 10:51:27 AM »
P.S: this got you hooked, didn'it?  :-D
Ta

 :-)

That, was a quick solution.... let me make some minor changes and I'll posted back..... as soon I can.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10397
Re: Straight Skeletons for Roofs
« Reply #37 on: December 02, 2005, 11:12:38 AM »
Luis
I assume you have a plan in mind to actually draw the skeleton.
Connect the dots so to speak. :-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Straight Skeletons for Roofs
« Reply #38 on: December 02, 2005, 11:27:36 AM »
Luis
I assume you have a plan in mind to actually draw the skeleton.
Connect the dots so to speak. :-)

Hi Charles,

The first, try was exactly that.... for example, on what I did on GBPoly the entities are there, and a geometry engine can follow the graphical structure... to find all the possible loops.

Here, is different, we have a closed area, that requires to smash or have a collision to the geometric center or at an internal point.

By looking on the demos applet's that's what they are doing..... maybe instead of creating all the internal loops.... just find the vector direction, that's is created from the intersections..... the problem with this is how to tell the vector to turn.

That [the turn] is the hard part.....

So, if we can simple generate those internal loops.... none graphical ... grab those points, connect them [not to hard].... I think would work.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10397
Re: Straight Skeletons for Roofs
« Reply #39 on: December 02, 2005, 01:05:47 PM »
maybe instead of creating all the internal loops.... just find the vector direction, that's is created from the intersections..... the problem with this is how to tell the vector to turn.

That [the turn] is the hard part.....

So, if we can simple generate those internal loops.... none graphical ... grab those points, connect them [not to hard].... I think would work.

That was my approach to the solution, but a year ago I did not have the programing skill to make it happen. I think today I may have a chance at it.

My thought was to go from vertex to vertex around the closed pline.
Working with 3 vertex at a time, find the bisecting angle to create an imaginary line for the center vertex.
Then move to the next vertex & get that bisecting angle & line, continue till all are in a list.
The process this list, finding all the intersect point of lines that are next to each other.
Ignore lines that are not from an adjacent vertex.
Then looking at the lines next to each other pick the intersect point that produces the shortest distance from the original vertex.
Remove any point in the list that produces a too long condition.
Then from the new list of points bisect the angle of the new line intersects which would give you the ridge lines.
Extend the new ridge lines out until they intersect with an adjoining original bisect line.

Well it's getting complicated at this point and that was my though a year ago.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

LE

  • Guest
Re: Straight Skeletons for Roofs
« Reply #40 on: December 02, 2005, 01:14:10 PM »
Yes, we are in the same boat.... I almost finish what I am doing for arcdraw.... I am going to leave the MFC dialog, for the next days.... and would try to do something on this....

[Lately I have a hard time to open some of my code..... as you and other have noticed...]

Serge J. Gianolla

  • Guest
Re: Straight Skeletons for Roofs
« Reply #41 on: March 07, 2006, 04:38:17 PM »
This baby needs a blood transfusion to revive.

Please donate generously.

whdjr

  • Guest
Re: Straight Skeletons for Roofs
« Reply #42 on: March 07, 2006, 04:43:41 PM »
I'm not trying to be a smart a$$ but my donation would be "move to ADT".  It has this functionality already.

Serge J. Gianolla

  • Guest
Re: Straight Skeletons for Roofs
« Reply #43 on: March 07, 2006, 04:49:53 PM »
Will, Will, Will,

Many Architectural draftsmen are working from home, all over the world and cannot afford ADT. So offering a cheaper package would benefit them.

Quote
It has this functionality already.
Otherwise stop 80% of the coding posted here because it is built-in somewhere. :-D

whdjr

  • Guest
Re: Straight Skeletons for Roofs
« Reply #44 on: March 07, 2006, 04:53:43 PM »
 :pissed:










 :-)