Another Utility: Cylinder Generator

View previous topic View next topic Go down

Another Utility: Cylinder Generator

Post by leezer3 on Thu Aug 07, 2014 2:00 pm

I've been cooking again  Razz 
This time, it's a cylinder generator, which will generate you a cylinder of a given radius between two arbitrary points.


Options are available to add custom normals, end caps, & to generate as either the internal faces or the external faces, as well as texture mapping etc.


Licence is again BSD-2 Clause, and source is available from my github:
http://github.com/leezer3

[I was building a boiler barrel and decided this might be of use to someone else]

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by Dexter on Thu Aug 07, 2014 6:31 pm

Well, I will definitely be using this one, as I am trying to eliminate cylinders in my route.

To avoid any misunderstandings - this is an original tool, written from scratch.

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

cylinder generator

Post by mobile1 on Fri Aug 08, 2014 4:55 pm

THINGS TO DO LIST.........must read posts in forums more often....just spent a week producing the gas holder objects for the mml (midland main Line), then i find this....thanks Chris...feel a bit deflated now..made the gas holders in about 25 seconds..probably 30.....using the cylinder generator....no more to be said......p.s. take this as a complement Chris.

mobile1

Posts : 133
Join date : 2011-08-22

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by leezer3 on Sun Aug 10, 2014 10:57 pm

Apologies, typographical error in cylinders moving in the Z-axis (All Z-values set to zero, instead of just the custom normal's Z-values)
Corrected version attached Smile

Edit:
Sorry, another bug squashed.....
Another version attached.


Cheers

Chris Lees

http://www.bvecornwall.co.uk
Attachments
CylinderGen.zip You don't have permission to download attachments.(13 Kb) Downloaded 6 times

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by Dexter on Sat Dec 20, 2014 12:32 pm

Hi Chris,

finally got to using this program. I have to convert everything to csv format, since some long time ago I started building objects in that format. Don't ask me why, I am not sure about the answer. Very Happy However, I might be missing something, I am trying to create a 30m high cylinder as a support of the wind powerplant and I get a b3d with about 70 errors... as graymac might say, I must be thick. Very Happy

Thank you for this useful utilty!

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by graymac on Sat Dec 20, 2014 1:54 pm

If the .csv file works without errors before conversion then I would suggest there is most likely a syntax error when converting, probably a simple single error repeated throughout about 70 time.
Without looking at the file its only possible to guess, do you want to post it?

graymac

Posts : 1708
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by Dexter on Sat Dec 20, 2014 2:01 pm

That actually is not the problem - I have written it confusingly. The generated b3d itself already contains those errors. They are quantity errors - too many vertices in "face" command etc.

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by mobile1 on Sat Dec 20, 2014 3:08 pm

How about a cab roof generator Chris, that would make life a lot easier...on my wish list..regards

mobile1

Posts : 133
Join date : 2011-08-22

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by leezer3 on Sun Dec 21, 2014 7:25 pm

Dexter wrote:That actually is not the problem - I have written it confusingly. The generated b3d itself already contains those errors. They are quantity errors - too many vertices in "face" command etc.

Dunno Sad
Try this one for starters:
http://www.bvecornwall.co.uk/downloads/utilities/CylinderGen.zip

(Slightly newer than the one attached above, but all it really fixes is a couple of cases where cylinders were generated inside-out if on a diagonal)

Otherwise, let me have your settings or a copy of the generated file and I'll step it in the debugger and fix it.

mobile1 wrote:How about a cab roof generator Chris, that would make life a lot easier...on my wish list..regards

Unfortunately, that's a whole other kettle of fish Razz
Cylinders are only really a very simple relationship to Pi plus a little addition & subtraction.
I suppose it'd be technically possible to build something that generated a complete roof profile, but that would have to make far too many assumptions about the eventual shape of the loco to be worth it for anything other than identikit diesels.
Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by Stevegr on Sun Dec 21, 2014 8:36 pm

Well, there's nothing as simple as a cab roof, all only have one thing that's the same in that they are often made of fibreglass or a more modern version of.

It would mean writing the coding for many different ones and you can only really do that if you also make the rest of the object!

Stevegr

Posts : 119
Join date : 2013-01-01
Location : CARDIFF

https://sites.google.com/a/bve4trains.com/bve4trains/

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by thehoviskid on Sun Dec 21, 2014 11:09 pm

Some Brush products (31,47 and 56) maybe class 50s and to an extent the AC electrics could possibly be do-able, there's a certain amount of similarity in shape (ignoring vents, which can be built separately), and you could maybe use SCALE to make it the right size but they have a roughly straight cantrail.

Classes 24,25,26,27 and 33 all have a domed cab roof, but with varying shapes of cantrail, and that's where you'd struggle

thehoviskid

Posts : 128
Join date : 2011-07-09
Age : 39
Location : Heysham

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by cris_smith14 on Wed Dec 24, 2014 11:10 am

MMM looking good there i will certainly have too try this out for when im putting buildings into my new route. What a Face

cris_smith14

Posts : 66
Join date : 2011-07-14
Age : 32
Location : leeds

Back to top Go down

Re: Another Utility: Cylinder Generator

Post by Sponsored content Today at 10:27 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum