To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8778
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 13:00:30 GMT
Viewed: 
748 times
  
Kevin

I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a flex
tubing in that it will usually be open ended.

Usually I would want it to be taut, with all segments tangent except where
wound around a constraint, but sometimes not taut (for example if shown
coiled out of the way)

I read the instructions for LSynth and I even have a copy of your book, like
the instructions suggest (grin), but I didn't see this topic covered in the
LSynth chapter.

For reference, here's the string segment model I use.  This segment is NOT
very accurately modeling a 3 strand twisted string but it has enough non
black in it from a distance to sort of give the impression of highlights. I
abut two of these, one rotated 180 degrees so the triangles face the other
way, to give a diamond reflective effect.

You can see my use of string in the POV render at the top of this page
http://www.miltontrainworks.com/item_info_1004.html#MTW-1004-by
as well as in the instructions fragment partway down the page. At these
magnifications it is good enough. All the string segments were pieced
together by hand, including transitions from tangent to curved around
bushings and so forth.

A generic way to use LSynth would be very welcome!

- start dat -

0 Short Straight String Segment
0 Name: StrSegHex2x.dat
0 Author: Larry Pieniazek with MLCad
0 Unofficial Model
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
3 0 0 0 1 1 0 1 0.5 0.866026 1
3 0 0.866026 0.5 -1 0.866026 -0.5 -1 1 0 1
3 8 0.866026 0.5 -1 1 0 1 0.5 0.866026 1
3 0 0.866026 0.5 -1 0.866026 -0.5 -1 0 0 -1
3 0 0 0 1 0.5 0.866026 1 -0.5 0.866026 1
3 0 0 1 -1 0.866026 0.5 -1 0.5 0.866026 1
3 8 0 1 -1 0.5 0.866026 1 -0.5 0.866026 1
3 0 0 1 -1 0.866026 0.5 -1 0 0 -1
3 0 0 0 1 -0.5 0.866026 1 -1 0 1
3 0 -0.866026 0.5 -1 0 1 -1 -0.5 0.866026 1
3 8 -0.866026 0.5 -1 -0.5 0.866026 1 -1 0 1
3 0 -0.866026 0.5 -1 0 1 -1 0 0 -1
3 0 0 0 1 -1 0 1 -0.5 -0.866026 1
3 0 -0.866026 -0.5 -1 -0.866026 0.5 -1 -1 0 1
3 8 -0.866026 -0.5 -1 -1 0 1 -0.5 -0.866026 1
3 0 -0.866026 -0.5 -1 -0.866026 0.5 -1 0 0 -1
3 0 0 0 1 -0.5 -0.866026 1 0.5 -0.866026 1
3 0 0 -1 -1 -0.866026 -0.5 -1 -0.5 -0.866026 1
3 8 0 -1 -1 -0.5 -0.866026 1 0.5 -0.866026 1
3 0 0 -1 -1 -0.866026 -0.5 -1 0 0 -1
3 0 0 0 1 0.5 -0.866026 1 1 0 1
3 0 0.866026 -0.5 -1 0 -1 -1 0.5 -0.866026 1
3 8 0.866026 -0.5 -1 0.5 -0.866026 1 1 0 1
3 0 0.866026 -0.5 -1 0 -1 -1 0 0 -1
0


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 13:19:50 GMT
Viewed: 
671 times
  
In lugnet.cad.dev, Larry Pieniazek writes:
Kevin

I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a flex
tubing in that it will usually be open ended.

Not currently.


Usually I would want it to be taut, with all segments tangent except where
wound around a constraint, but sometimes not taut (for example if shown
coiled out of the way)

I read the instructions for LSynth and I even have a copy of your book, like
the instructions suggest (grin), but I didn't see this topic covered in the
LSynth chapter.

Thanks for buying the book.  You are right, it does not cover this.

Currently LSynth only supports either open ended or closed loop.  No mixing.


For reference, here's the string segment model I use.  This segment is NOT
very accurately modeling a 3 strand twisted string but it has enough non
black in it from a distance to sort of give the impression of highlights. I
abut two of these, one rotated 180 degrees so the triangles face the other
way, to give a diamond reflective effect.

You can see my use of string in the POV render at the top of this page
http://www.miltontrainworks.com/item_info_1004.html#MTW-1004-by
as well as in the instructions fragment partway down the page. At these
magnifications it is good enough. All the string segments were pieced
together by hand, including transitions from tangent to curved around
bushings and so forth.

A generic way to use LSynth would be very welcome!

Yes.  It would.  There are a *number* of things it cannot do.... yet!
(chains with sag, string with sag, user created synthesis things.....

It is a very good idea you have, and I'll work on both ideas, mixable
splines/tangent/arcs as well as user defined beginning,middle and end parts.

As you may be able to tell, I'm on an LPub burn right now, but LSynth will
get its time.

Kevin


- start dat -

0 Short Straight String Segment
0 Name: StrSegHex2x.dat
0 Author: Larry Pieniazek with MLCad
0 Unofficial Model
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
3 0 0 0 1 1 0 1 0.5 0.866026 1
3 0 0.866026 0.5 -1 0.866026 -0.5 -1 1 0 1
3 8 0.866026 0.5 -1 1 0 1 0.5 0.866026 1
3 0 0.866026 0.5 -1 0.866026 -0.5 -1 0 0 -1
3 0 0 0 1 0.5 0.866026 1 -0.5 0.866026 1
3 0 0 1 -1 0.866026 0.5 -1 0.5 0.866026 1
3 8 0 1 -1 0.5 0.866026 1 -0.5 0.866026 1
3 0 0 1 -1 0.866026 0.5 -1 0 0 -1
3 0 0 0 1 -0.5 0.866026 1 -1 0 1
3 0 -0.866026 0.5 -1 0 1 -1 -0.5 0.866026 1
3 8 -0.866026 0.5 -1 -0.5 0.866026 1 -1 0 1
3 0 -0.866026 0.5 -1 0 1 -1 0 0 -1
3 0 0 0 1 -1 0 1 -0.5 -0.866026 1
3 0 -0.866026 -0.5 -1 -0.866026 0.5 -1 -1 0 1
3 8 -0.866026 -0.5 -1 -1 0 1 -0.5 -0.866026 1
3 0 -0.866026 -0.5 -1 -0.866026 0.5 -1 0 0 -1
3 0 0 0 1 -0.5 -0.866026 1 0.5 -0.866026 1
3 0 0 -1 -1 -0.866026 -0.5 -1 -0.5 -0.866026 1
3 8 0 -1 -1 -0.5 -0.866026 1 0.5 -0.866026 1
3 0 0 -1 -1 -0.866026 -0.5 -1 0 0 -1
3 0 0 0 1 0.5 -0.866026 1 1 0 1
3 0 0.866026 -0.5 -1 0 -1 -1 0.5 -0.866026 1
3 8 0.866026 -0.5 -1 0.5 -0.866026 1 1 0 1
3 0 0.866026 -0.5 -1 0 -1 -1 0 0 -1
0


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 13:32:06 GMT
Viewed: 
683 times
  
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a flex
tubing in that it will usually be open ended.

Not currently.

But since you've made the source for lsynth available, there's no reason
why Larry couldn't attempt to add the string part to the code himself
and then submit the patches to you for official approval.  Right?  Isn't
that the whole point of opening up the source code?

Don


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 13:56:02 GMT
Viewed: 
697 times
  
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a flex
tubing in that it will usually be open ended.

Not currently.

But since you've made the source for lsynth available, there's no reason
why Larry couldn't attempt to add the string part to the code himself
and then submit the patches to you for official approval.  Right?  Isn't
that the whole point of opening up the source code?

Absolutely!  Good point!


Don

Kevin


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 16:56:13 GMT
Viewed: 
763 times
  
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a flex
tubing in that it will usually be open ended.

Not currently.

But since you've made the source for lsynth available, there's no reason
why Larry

Except for time/skill/interest. (mostly time)

couldn't attempt to add the string part to the code himself
and then submit the patches to you for official approval.  Right?  Isn't
that the whole point of opening up the source code?

I'm thinking that just allowing for a level of indirection might do the
trick. If you added a way to just specify what part you wanted used for the
stringing together, and allowed it to be used instead of one of the defined
types, that might do the trick. Haven't actually looked at the code to see
if that makes sense or not.


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 17:28:12 GMT
Viewed: 
854 times
  
In lugnet.cad.dev, Larry Pieniazek writes:
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a • flex
tubing in that it will usually be open ended.

Not currently.

But since you've made the source for lsynth available, there's no reason
why Larry

Except for time/skill/interest. (mostly time)

I assume the lack of interest is in the coding, not the using :^)

I have a similar lack of time.

Kevin




couldn't attempt to add the string part to the code himself
and then submit the patches to you for official approval.  Right?  Isn't
that the whole point of opening up the source code?

I'm thinking that just allowing for a level of indirection might do the
trick. If you added a way to just specify what part you wanted used for the
stringing together, and allowed it to be used instead of one of the defined
types, that might do the trick. Haven't actually looked at the code to see
if that makes sense or not.


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 17:54:18 GMT
Viewed: 
838 times
  
In lugnet.cad.dev, Larry Pieniazek writes:
In lugnet.cad.dev, Don Heyse writes:
But since you've made the source for lsynth available, there's no reason
why Larry

Except for time/skill/interest. (mostly time)

If I recall, it was Kevin's lack of time that prompted him to open up
the lsynth code and solicit your help.  (I think he may have mentioned
you specifically ;)

Also, I imagine you could argue that contributing to lsynth satisfies
requirement 3 of the "Requirements for Membership" section of the
recently posted "LDraw.org Standards Committee (LSC) Draft Proposal":

  Authored a software program that is compliant with either the
  LDraw 0.2.7 spec or another spec published by the LSC

After which I'm sure you'd be a shoe-in for the upcoming elections...

couldn't attempt to add the string part to the code himself
and then submit the patches to you for official approval.  Right?  Isn't
that the whole point of opening up the source code?

I'm thinking that just allowing for a level of indirection might do the
trick. If you added a way to just specify what part you wanted used for the
stringing together, and allowed it to be used instead of one of the defined
types, that might do the trick. Haven't actually looked at the code to see
if that makes sense or not.

Why not take a peek then?

  http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/lsynth/lsynth/lsynth/

Enjoy,

Don


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 17:57:10 GMT
Viewed: 
882 times
  
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:

Except for time/skill/interest. (mostly time)

I assume the lack of interest is in the coding, not the using :^)

Ya. I have made good use of LSynth for hoses and for rubber bands in my
current project and found it easy to use so I'm definitely interested in
using it!!!!

I have a similar lack of time.

OK, well maybe you've shamed me into taking a look. I just went to sourceforge
(http://sourceforge.net/projects/lsynth/) but I'm not seeing the code there.
Am I looking in the wrong place? Not saying I'll GET any time to look at
this anytime soon, mind you.


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 18:49:09 GMT
Viewed: 
911 times
  
In lugnet.cad.dev, Larry Pieniazek writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:

Except for time/skill/interest. (mostly time)

I assume the lack of interest is in the coding, not the using :^)

Ya. I have made good use of LSynth for hoses and for rubber bands in my
current project and found it easy to use so I'm definitely interested in
using it!!!!

I have a similar lack of time.

OK, well maybe you've shamed me into taking a look. I just went to sourceforge
(http://sourceforge.net/projects/lsynth/) but I'm not seeing the code there.
Am I looking in the wrong place? Not saying I'll GET any time to look at
this anytime soon, mind you.

Sorry, not intending to shame you.

You are looking in the right place, but I'm a neophyte on source forge.

Don,  what have I failed to do?

Thanks,
Kevin


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 19:14:05 GMT
Viewed: 
926 times
  
In lugnet.cad.dev, Larry Pieniazek writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:

Except for time/skill/interest. (mostly time)

I assume the lack of interest is in the coding, not the using :^)

Ya. I have made good use of LSynth for hoses and for rubber bands in my
current project and found it easy to use so I'm definitely interested in
using it!!!!

I have a similar lack of time.

OK, well maybe you've shamed me into taking a look. I just went to sourceforge
(http://sourceforge.net/projects/lsynth/) but I'm not seeing the code there.
Am I looking in the wrong place? Not saying I'll GET any time to look at
this anytime soon, mind you.

I found the code (I was looking for released files, not in the CVS tree) and
have extracted it (via WinCVS) to take a look...


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 19:26:35 GMT
Viewed: 
1127 times
  
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
OK, well maybe you've shamed me into taking a look. I just went to >>sourceforge (http://sourceforge.net/projects/lsynth/) but I'm not
seeing the code there.  Am I looking in the wrong place?

You are looking in the right place, but I'm a neophyte on sourceforge.

Don,  what have I failed to do?

I'm not sure.  What are you trying to do?  If just you're looking to
browse the code, then follow the "Browse CVS" link near the bottom
of the page at the URL given above.  If you want upload changes to
the code you'll have to get a CVS program of some type.  I use tkCVS
because it's a platform neutral GUI and includes the fabulous tkDiff
program, but there's also WinCVS, plain old command line CVS, and
several others.

Speaking of changes.  Apparently I made some changes to my local copy
of main.c a while back, but didn't check the changes into the CVS
archive because you never came up with a policy for that.  Do you
want to verify official changes via email before check in?  Or would
you prefer to allow experimental code in the CVS archive and then
back it out if you don't like it?

Also, what do you want to do about releases?  Do you want me to
package a source release for the 1.0 code?  For executable packages
I set the homepage link to go to your website.

Don


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 19:34:27 GMT
Viewed: 
933 times
  
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
OK, well maybe you've shamed me into taking a look. I just went to • sourceforge (http://sourceforge.net/projects/lsynth/) but I'm not
seeing the code there.  Am I looking in the wrong place?

You are looking in the right place, but I'm a neophyte on sourceforge.

Don,  what have I failed to do?

I'm not sure.  What are you trying to do?  If just you're looking to
browse the code, then follow the "Browse CVS" link near the bottom
of the page at the URL given above.  If you want upload changes to
the code you'll have to get a CVS program of some type.  I use tkCVS
because it's a platform neutral GUI and includes the fabulous tkDiff
program, but there's also WinCVS, plain old command line CVS, and
several others.

Speaking of changes.  Apparently I made some changes to my local copy
of main.c a while back, but didn't check the changes into the CVS
archive because you never came up with a policy for that.  Do you
want to verify official changes via email before check in?  Or would
you prefer to allow experimental code in the CVS archive and then
back it out if you don't like it?

Letting me peek at the changes would be cool, but feel to check it in.


Also, what do you want to do about releases?  Do you want me to
package a source release for the 1.0 code?  For executable packages
I set the homepage link to go to your website.

Will you package a source release please?


Don

Thanks,
Kevin


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:07:06 GMT
Viewed: 
964 times
  
In lugnet.cad.dev, Larry Pieniazek writes:

I found the code (I was looking for released files, not in the CVS tree) and
have extracted it (via WinCVS) to take a look...

OK, I did a little digging. If I understand what I am reading, the various
types of things that can be synthesized are defined with constants in the
lsynth.h include.

Elsewhere in the code these constants are checked (driven by what's found in
the .dat file being processed) to determine various things. For example the
function calc_angles in band.c uses these constants to determine angles of
things (based on the constraint that's being rounded)... this sort of
decision making appears in a number of places, but the numbers used depend
on the type of the thing being synthesized.

If I'm reading things right, to hack another type of synthesized thing in
would mean merely finding all the places where these constants are evaluated
and adding an additional elseif to honor the new type (depending on if it
was band or tube).

All that needs to be done (for string) to do that is decide what a good
element to represent a string segment is, and what the basic geometry of it
is (x,y,z dimensions).

But I don't HAVE a good element! The one I use is crappy, it's just an
approximation and just something I hacked up quickly. If committment to that
element is made, we all would regret it later. Better to allow that we swap
out definitions once someone does a better job of modeling string than I
did. The dimensions of a better string element may vary significantly from
the dimensions I chose... (because modeling the triplestrandedness may
require it to be smaller! or larger if you think about how one element has
to abut the next... unless the element includes 120 degrees of string
rotation you also have to handle rotating each instance of the element by
the right amount)

So the better way to do this would be to let the element itself be
parameterized, that is, supply the element definition (it's dimensions and
desired rotational orientation) in an external file. I suspect that adding
that functionality is quite a bit harder as it's not merely hacking in new
constants in a new elseif block, but actually changing the program to get
parms from an external file for some (or all?? that would allow other
elements to be improved if there ever was a need) element types...

That seems pretty hard to me, at this juncture, given that I haven't coded
in C in years (although one never forgets, it's like riding a bicycle). But
not undoable.

On that note, I've installed MinGW to give me gcc (because I see the
makefule specs gcc as the compiler)... but it didn't come with a make...
what's a good recommendation for a make? make-3.79.1 ?? Would I need MSys
too? (win 2k platform)


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:23:16 GMT
Viewed: 
968 times
  
"Larry Pieniazek" <lpieniazek@mercator.com> wrote in message
news:HDrH7u.1FKp@lugnet.com...

[ ... snipped ... ]


On that note, I've installed MinGW to give me gcc (because I see the
makefule specs gcc as the compiler)... but it didn't come with a make...
what's a good recommendation for a make? make-3.79.1 ?? Would I need MSys
too? (win 2k platform)

You can get a full complemnt of Unix utilities for your PC (including Make)
by installing Cygwin (which is free):  http://www.cygwin.com  It has a hokey
install process but it works well once installed.

Mike


--
Mike Walsh - mike_walsh at mindspring.com
http://www.ncltc.cc - North Carolina LEGO Train Club
http://www.carolinatrainbuilders.com - Carolina Train Builders
http://www.bricklink.com/store.asp?p=mpw - CTB/Brick Depot


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:24:02 GMT
Viewed: 
957 times
  
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
OK, well maybe you've shamed me into taking a look. I just went to • sourceforge (http://sourceforge.net/projects/lsynth/) but I'm not
seeing the code there.  Am I looking in the wrong place?

You are looking in the right place, but I'm a neophyte on sourceforge.

Don,  what have I failed to do?

I'm not sure.  What are you trying to do?  If just you're looking to
browse the code, then follow the "Browse CVS" link near the bottom
of the page at the URL given above.  If you want upload changes to
the code you'll have to get a CVS program of some type.  I use tkCVS
because it's a platform neutral GUI and includes the fabulous tkDiff
program, but there's also WinCVS, plain old command line CVS, and
several others.

Speaking of changes.  Apparently I made some changes to my local copy
of main.c a while back, but didn't check the changes into the CVS
archive because you never came up with a policy for that.  Do you
want to verify official changes via email before check in?  Or would
you prefer to allow experimental code in the CVS archive and then
back it out if you don't like it?

Letting me peek at the changes would be cool, but feel to check it in.

I think I'll email it to you first this time.  It looks like I must have
implemented some of the changes mentioned in this thread here.

  http://news.lugnet.com/cad/dev/?n=8250

There's a fix for the UPPERCASING bug and some stuff for UNITS, LENGTH
and subfile NAMEs, but I don't remember all the details, such as whether
or not I actually finished.

Do you have a nice colorized diff program so you can quickly asses
the changes?  I use tkDiff myself.

Also, what do you want to do about releases?  Do you want me to
package a source release for the 1.0 code?  For executable packages
I set the homepage link to go to your website.

Will you package a source release please?

Ouch.  I was afraid you'd ask for that.  Packaging official sourceforge
release files is one of those things I haven't done often enough to
remember how.


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:26:24 GMT
Viewed: 
980 times
  
In lugnet.cad.dev, Larry Pieniazek writes:
In lugnet.cad.dev, Larry Pieniazek writes:

I found the code (I was looking for released files, not in the CVS tree) and
have extracted it (via WinCVS) to take a look...

OK, I did a little digging. If I understand what I am reading, the various
types of things that can be synthesized are defined with constants in the
lsynth.h include.

Elsewhere in the code these constants are checked (driven by what's found in
the .dat file being processed) to determine various things. For example the
function calc_angles in band.c uses these constants to determine angles of
things (based on the constraint that's being rounded)... this sort of
decision making appears in a number of places, but the numbers used depend
on the type of the thing being synthesized.

You read undocumented code quite well!


If I'm reading things right, to hack another type of synthesized thing in
would mean merely finding all the places where these constants are evaluated
and adding an additional elseif to honor the new type (depending on if it
was band or tube).

Yup.  But unfortunatly you want to combine open things (tubes) with closed
loops (bands), and the program is fundamentally *not* written for that.
Bummer.


All that needs to be done (for string) to do that is decide what a good
element to represent a string segment is, and what the basic geometry of it
is (x,y,z dimensions).

But I don't HAVE a good element! The one I use is crappy, it's just an
approximation and just something I hacked up quickly. If committment to that
element is made, we all would regret it later. Better to allow that we swap
out definitions once someone does a better job of modeling string than I
did. The dimensions of a better string element may vary significantly from
the dimensions I chose... (because modeling the triplestrandedness may
require it to be smaller! or larger if you think about how one element has
to abut the next... unless the element includes 120 degrees of string
rotation you also have to handle rotating each instance of the element by
the right amount)

Will the element do for now?  Maybe we can enhance it later.  As the part
author, you have the right to change it later.


So the better way to do this would be to let the element itself be
parameterized, that is, supply the element definition (it's dimensions and
desired rotational orientation) in an external file. I suspect that adding
that functionality is quite a bit harder as it's not merely hacking in new
constants in a new elseif block, but actually changing the program to get
parms from an external file for some (or all?? that would allow other
elements to be improved if there ever was a need) element types...

That seems pretty hard to me, at this juncture, given that I haven't coded
in C in years (although one never forgets, it's like riding a bicycle). But
not undoable.

Then your generic approach is the wrong one for you.  Why not just hard code
what you want now in your own private copy (as a make shift tube I guess), and
do with it what you will.

I plan on whacking on LSynth pretty hard after I get to a good pausing point in
LPub.  I'm a good candidate for adding what you want.

In the mean time, you can have what you want (sort of.)


On that note, I've installed MinGW to give me gcc (because I see the
makefule specs gcc as the compiler)... but it didn't come with a make...
what's a good recommendation for a make? make-3.79.1 ?? Would I need MSys
too? (win 2k platform)

Kevin


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:28:29 GMT
Viewed: 
971 times
  
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Don Heyse writes:
In lugnet.cad.dev, Kevin L. Clague writes:
In lugnet.cad.dev, Larry Pieniazek writes:
OK, well maybe you've shamed me into taking a look. I just went to • sourceforge (http://sourceforge.net/projects/lsynth/) but I'm not
seeing the code there.  Am I looking in the wrong place?

You are looking in the right place, but I'm a neophyte on sourceforge.

Don,  what have I failed to do?

I'm not sure.  What are you trying to do?  If just you're looking to
browse the code, then follow the "Browse CVS" link near the bottom
of the page at the URL given above.  If you want upload changes to
the code you'll have to get a CVS program of some type.  I use tkCVS
because it's a platform neutral GUI and includes the fabulous tkDiff
program, but there's also WinCVS, plain old command line CVS, and
several others.

Speaking of changes.  Apparently I made some changes to my local copy
of main.c a while back, but didn't check the changes into the CVS
archive because you never came up with a policy for that.  Do you
want to verify official changes via email before check in?  Or would
you prefer to allow experimental code in the CVS archive and then
back it out if you don't like it?

Letting me peek at the changes would be cool, but feel to check it in.

I think I'll email it to you first this time.  It looks like I must have
implemented some of the changes mentioned in this thread here.

http://news.lugnet.com/cad/dev/?n=8250

There's a fix for the UPPERCASING bug and some stuff for UNITS, LENGTH
and subfile NAMEs, but I don't remember all the details, such as whether
or not I actually finished.

Do you have a nice colorized diff program so you can quickly asses
the changes?  I use tkDiff myself.

I'll have to scope it out.


Also, what do you want to do about releases?  Do you want me to
package a source release for the 1.0 code?  For executable packages
I set the homepage link to go to your website.

Will you package a source release please?

Ouch.  I was afraid you'd ask for that.  Packaging official sourceforge
release files is one of those things I haven't done often enough to
remember how.

:^) by your ownb admission you have more experience than me, because I've never
done it at all!

If you would please I would be eternally gratefull.

Kevin


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:30:38 GMT
Viewed: 
978 times
  
In lugnet.cad.dev, Mike Walsh writes:

"Larry Pieniazek" <lpieniazek@mercator.com> wrote in message
news:HDrH7u.1FKp@lugnet.com...

[ ... snipped ... ]


On that note, I've installed MinGW to give me gcc (because I see the
makefule specs gcc as the compiler)... but it didn't come with a make...
what's a good recommendation for a make? make-3.79.1 ?? Would I need MSys
too? (win 2k platform)

You can get a full complemnt of Unix utilities for your PC (including Make)
by installing Cygwin (which is free):  http://www.cygwin.com  It has a hokey
install process but it works well once installed.

Thanks Mike.

Meanwhile I just installed make-3.79.1 and it makes lsynthcp OK without
needing to install MSys. Gotta think about whether I want Cygwin or not...
it's not like I don't have a bazillion other things I should be working on
instead. :-)


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:57:13 GMT
Viewed: 
1032 times
  
In lugnet.cad.dev, Kevin L. Clague writes:

Yup.  But unfortunatly you want to combine open things (tubes) with closed
loops (bands), and the program is fundamentally *not* written for that.
Bummer.

Not to worry, combining things is more of a stretch goal (if you'll pardon
the pun). Just one is good enough for now.

Then your generic approach is the wrong one for you.  Why not just hard code
what you want now in your own private copy (as a make shift tube I guess), and
do with it what you will.

Maybe that's the way to go. I think actually I would go with Band and then
hand edit away the 1/2 (of the synthesized elements generated) that wasn't
needed because in most of my string uses, the string is taut.

I plan on whacking on LSynth pretty hard after I get to a good pausing
point in LPub.  I'm a good candidate for adding what you want.

Let me think more on requirements for specifying elements to be used in
synthesis generically, then. At first blush I think the key things are:

- x,y,z dimensions of the element (with one axis assumed to be the
centerline axis, either always by convention or you have to specify which
axis it is)
- center point of the element (to allow for non symmetric elements)
- Do successive usages of the element have to be mirrored (or placed back to
back)? (my string does)
- Do successive usages of the element have to be rotated around the
centerline of the element and if so, by how much (a high fidelity string
element that properly models triplestrandedness but is short enough to
conform to small radius things may well need to do so as it will be too
short for 120 degrees worth of strand being within the element)

any others?


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 15 Feb 2005 23:55:00 GMT
Viewed: 
2318 times
  
In lugnet.cad.dev, Larry Pieniazek wrote:
Kevin

I've created an element that represents a small segment of string. It's not
a real, legitimate LDraw part, per se, but I find it useful in my modeling.

Is it possible to get LSynth to use this element? I'm looking for it to be
treated similar to a rubber band in that I may want it to be (partly) wound
around constraining things like bushings or pulleys, but similarly to a flex
tubing in that it will usually be open ended.

Usually I would want it to be taut, with all segments tangent except where
wound around a constraint, but sometimes not taut (for example if shown
coiled out of the way)

I read the instructions for LSynth and I even have a copy of your book, like
the instructions suggest (grin), but I didn't see this topic covered in the
LSynth chapter.

For reference, here's the string segment model I use.  This segment is NOT
very accurately modeling a 3 strand twisted string but it has enough non
black in it from a distance to sort of give the impression of highlights. I
abut two of these, one rotated 180 degrees so the triangles face the other
way, to give a diamond reflective effect.

You can see my use of string in the POV render at the top of this page
http://www.miltontrainworks.com/item_info_1004.html#MTW-1004-by
as well as in the instructions fragment partway down the page. At these
magnifications it is good enough. All the string segments were pieced
together by hand, including transitions from tangent to curved around
bushings and so forth.

A generic way to use LSynth would be very welcome!

Hi all,
  I have rewritten much of LSynth's code so that it is table driven.  Currently
the tables are coded in the program, but the important thing is that definitions
of synthesized things are tabular.

  I've added a string type that uses your string segment, Larry.  It synthesized
as a tube made out of fixed size segments, just like ribbed and rubber hose.  I
don't have support for string with slack pulled down by gravity.  Sorry.

  I've modified pneumatic hose, electric cable, flex system hoses, flex system
cables, flexible axles and fiber optic cable are synthesized with parts that are
scaled in length.  I provide a parameter that lets you define the angular
resolution.

  LSynth synthesizes the curve between any two constraints.  LSynth starts at
the first segment, and compares the angle between the first segment and the
second segment.  If the angle between the two segments are lower than the
angular rsolution, then the two segments are merged.

  The effect is that high curvature requires a log of short segments, but long
straight stretches just takes a single segment.  This has a dramatic effect on
file size reduction.  Also modified code to only put out part usage lines with
only to decimal places.  Synthesized files are much smaller.

  As soon as I remember how I'll put this back on sourceforge, and do a release.

  I also fixed the spacing associated ribbed hose.  I also fixed issues with
ribbed hose, rubber hose, string specified with more than two constraints.  Now
the boundaries between constraints are seemless on these tubes composed of fixed
lengths.

  I did some minor fixing in the rubber band/chain area too.  I made it tabular
as well.  I fixed some issues with boundaries between curves and tangent lines
(sometimes they didn't meet).  For rubber bands, the tangent lines between
pulleys are one long piece, conserving on file size.

  Where possible in all of the above, I used primitives or S parts, instead of
using parts created and used by LSynth in the past.

  I need to give Willy's tutorial page again to make sure to address the issues
he raised there.

  There is still the issue of LDraw parts used by LSynth that are not officially
parts of anything.  Maybe they should be put in parts/s directory.

  Chris, Orion, feedback on this last part?

Kevin


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 28 Sep 2005 17:24:28 GMT
Viewed: 
2068 times
  
In lugnet.cad.dev, Kevin L. Clague wrote:
Hi all,
  I have rewritten much of LSynth's code so that it is table driven.  Currently
the tables are coded in the program, but the important thing is that definitions
of synthesized things are tabular.

  I've added a string type that uses your string segment, Larry.  It synthesized
as a tube made out of fixed size segments, just like ribbed and rubber hose.  I
don't have support for string with slack pulled down by gravity.  Sorry.

  I've modified pneumatic hose, electric cable, flex system hoses, flex system
cables, flexible axles and fiber optic cable are synthesized with parts that are
scaled in length.  I provide a parameter that lets you define the angular
resolution.

  LSynth synthesizes the curve between any two constraints.  LSynth starts at
the first segment, and compares the angle between the first segment and the
second segment.  If the angle between the two segments are lower than the
angular rsolution, then the two segments are merged.

  The effect is that high curvature requires a log of short segments, but long
straight stretches just takes a single segment.  This has a dramatic effect on
file size reduction.  Also modified code to only put out part usage lines with
only to decimal places.  Synthesized files are much smaller.

  As soon as I remember how I'll put this back on sourceforge, and do a release.

  I also fixed the spacing associated ribbed hose.  I also fixed issues with
ribbed hose, rubber hose, string specified with more than two constraints.  Now
the boundaries between constraints are seemless on these tubes composed of fixed
lengths.

  I did some minor fixing in the rubber band/chain area too.  I made it tabular
as well.  I fixed some issues with boundaries between curves and tangent lines
(sometimes they didn't meet).  For rubber bands, the tangent lines between
pulleys are one long piece, conserving on file size.

  Where possible in all of the above, I used primitives or S parts, instead of
using parts created and used by LSynth in the past.

  I need to give Willy's tutorial page again to make sure to address the issues
he raised there.

  There is still the issue of LDraw parts used by LSynth that are not officially
parts of anything.  Maybe they should be put in parts/s directory.

  Chris, Orion, feedback on this last part?

Kevin

Kevin-

Is this enhanced LSynth program available for download anywhere yet?  All I can
find so far is 2.0 on your web site here
http://www.kclague.net/LSynth/index.htm.  I'm looking forward to things like
string!

-Matt :)


Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 28 Sep 2005 21:13:51 GMT
Viewed: 
2436 times
  
In lugnet.cad.dev, Matthew J. Chiles wrote:

I'll go home and release it.  I have an LPub with fixes too.

Kevin


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR