Date   

Re: parallel lines still crash program

Adam Richards
 
Edited

A couple of notes on PolyLines. 

1. You can't delete the endpoints (today). 
2. You can only delete a mid point if it is selected.
3. Also there is no line/polyline split function (one has just been requested as a new feature). The Draw object support in the program has been less advanced than tracks and it will take time to sort out. You can "split" a Polygon by making it into a Polyline "open" but it only works by omitting the line from last to first point.

About Parallel Line itself:

1. If a Draw element was moved or rotated, Parallel Line would ignore the origin and angle. This alone explains a lot of the results complained about. The new code acts appropriately when the origin is non-zero, or the angle is set.
2. Bezier Lines were completely missing from Parallel Line function - although they would highlight as though they could be paralleled. So a Bezier Track Parallel Line could produce a Bezier line that that the same function could not then use for another line - (would do nothing with no error messages).  I have added the needed function call.
3. The Parallel Bezier function was also imprecise in point setting - especially if the end point angles were not roughly co-linear.  I think the right way to do this has now been discovered - by moving each control point separately based on its own end's angle. 
4. I was in a quandary about how to do parallel Polylines (or Polygons) properly when it was written so the current code punted and essentially did an offset copy. I think the right answer is to offset each point to the same hand side as cursor by looking at the two line segment angles at the point individually and moving the point based on the split of the vertex angle. I have put up new code for this - it seems to work well in test. 
5. As a bonus I supported Polygons (and filled polygons) with Parallel Lines - so now you can have concentric rectangles and so forth.

Adam


Re: parallel lines still crash program

scenicsRme
 

By the way, the reason I need to modify the lines is the way draw a parallel line seems to work. It doesn't actually draw a second line parallel to the first like a track, but just makes a copy of the line the offset over. So if you have a line shaped like a "C" for example and say to draw a parallel line 1 unit over, it will simply place another "C" with the center 1 unit apart, the ends will not be parallel, but rather will be closer together.


Re: parallel lines still crash program

scenicsRme
 

OK, I got the crashing stopped (I did a reinstall. It said it was already installed did I want to delete previous install? I said yes and it reinstalled) with the new install parallel lines to tracks, and to other lines works without crashing. Now I am having trouble modifying the lines. If I select modify (track) button and select a line I want to modify, the open node dots appear. I can select one and move it ok, but if I select one at the end or in the middle and hit delete nothing happens. If I right click after selecting a long menu pops up, but delete is not on it. Is there a way to split a line, like to add an intersection of two streets in the middle of it? I don't want to change the line shape or location, just cut it or snip out a section so I can join it to the intersecting lines?


parallel lines still crash program

scenicsRme
 

I downloaded and installed the latest build of 5.2 B2 for windows a couple days ago and am trying to draw roads. I set up a layer for roads, and set it as the working layer. I was able to draw a parallel line to a few track sections, but if I try to draw a second line parallel to the first (the other side of the road) I can highlight the first section of the first line I want to parallel, but as soon as I click the mouse button, the program shuts down.


Re: Is there a way to group a set of layers related to a single theme and hide the rest of the layout and then work on those layers? #FeatureRequest

Adam Richards
 

So I have some rough stuff together on two things on a code branch.

1. Layers can hide their button on the toolbar. This preserves toolbar real-estate.
2. A Layer can have a comma delimited list of layer numbers that will show/hide when it does.  There is no checking of unique-ness and no recursion (so a layer that hides another layer does not look to see if that layer has such a list) -> this stops loops. 

The net effect is that you can have some layers act as toggle show/hide for a group of other layers that optionally do not show their show/hide buttons.

Nothing stops you from selecting and showing any layer individually even if it is in a list - it will resync the next time the group layer is shown/hidden. 

I have worked out how to save/restore in the layout - I still have to work this out for the Layer profile. 

I know there is much more to do in terms of naming Settings profiles that harden some key settings, linking layers to named Settings profiles - more to do in other words, more to do.

Adam


Re: wishes for 5.2 windows #FeatureRequest

Adam Richards
 

Martin and I just added auto-repeat to the hotbar scroll buttons while the button is held down. Two speeds -> slower for 10 units and then 1.5x as fast as that.

Adam


3 files uploaded #file-notice

main@xtrackcad.groups.io Notification <main@...>
 

The following files have been uploaded to the Files area of the main@xtrackcad.groups.io group.

By: Dwyane Ward

Description:
Uploaded 3 Z Track Libraries (RealZJ, Prim and Eisen Platz)


Re: XtrackCad 3D

Joost van der Waa
 

Hi Charles,

Xtrkcad does indeed not support 3D-views. However, there is a separate 3D viewer program available, called "Xtrkcad viewer". You can download it from http://mwik.altervista.org/
It offers a nice 3D view of your setup. You can switch off/on the various layers and rotate/zoom. The software is compatible with the latest beta-version of Xtrkcad (thanks to the programmer who reacted on my remark that the file format of Xtrkcad had slightly changed).

As Robert Heller points out, there is no z-dimension in the track definition, so tracks will be displayed as flat objects in the viewer. Also objects like lines and circles are not shown in the 3D-view.

I have attached an example of my own setup and 3D-view as an example.




--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Robert Heller
 

At Mon, 03 Aug 2020 13:12:04 -0700 main@xtrackcad.groups.io wrote:


Charles,
There is an importer
https://www.jmri.org/community/connections/XtrkCadReader/index.shtml (
https://www.jmri.org/community/connections/XtrkCadReader/index.shtml )
written in Java that you can find on the JMRI site. It takes the XTrackCAD
track definitions and converts them into JMRI panel graphics. Very
regrettably the tool's creator went to the marshaling yard in the sky about
2 years ago now, but the tool was in their library when I checked about a
year ago.

When I looked it was at a 2010 - V4 level of xtc file format and the code
does not understand either Bezier or Cornu tracks and at the best renders
them as straight lines between the end points (I think). I did talk to the
creator before his demise about being able to read the subsegs info within
these types of definitions (its inside each layout file for this kind of use
case) and so be able to render them into the panel as a set of straights and
curves - but I don't think that came to anything.
The C++ coded XTrackCAD parser included as part of the Model RR System is
up-to-date WRT the current format of XTC files. It makes no attempt to create
a "layout", since the Model RR System's Dispatcher program (sort of like
JMRI's PanelPro, kinda, sorta), is more geared towards the creation of a
proper CTC Panel "schematic" of the layout, rather than something that looks
like the layout. I don't know how the JAVA coded parser is written, but the
Model RR System is written to use Bison++ (a C++ oriented version of Bison,
which is an open source replacement for yacc (Yet Another Compiler Compiler).



Adam




--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services


Re: HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Robert Heller
 

At Mon, 03 Aug 2020 13:15:04 -0700 main@xtrackcad.groups.io wrote:


Also see http://xtrkcad-fork.sourceforge.net/Wikka/XtrkCadReader
And:

https://github.com/RobertPHeller/ModelRRSystem/tree/master/trunk/C%2B%2B/ParserClasses






--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services


Re: HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Adam Richards
 


Re: HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Adam Richards
 

Charles,
There is an importer https://www.jmri.org/community/connections/XtrkCadReader/index.shtml written in Java that you can find on the JMRI site. It takes the XTrackCAD track definitions and converts them into JMRI panel graphics. Very regrettably the tool's creator went to the marshaling yard in the sky about 2 years ago now, but the tool was in their library when I checked about a year ago. 

When I looked it was at a 2010 - V4 level of xtc file format and the code does not understand either Bezier or Cornu tracks and at the best renders them as straight lines between the end points (I think). I did talk to the creator before his demise about being able to read the subsegs info within these types of definitions (its inside each layout file for this kind of use case) and so be able to render them into the panel as a set of straights and curves - but I don't think that came to anything. 

Adam


Re: HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Charles Mulch
 

 
Thanks Adam. I will put all the HOn3 on a separate layer — The last question for today I promise, is How do I best import my XtrackCAD Layout drawing to JMRI’s panel pro??



On Aug 3, 2020, at 9:49 AM, Adam Richards <adamjmrichards@...> wrote:

Charles,

The first point to note is the active scale/gauge is set in the Options->Layout window. It determines which elements show up in the HotBar from the set of parameter files that were added in File->Parameter Files.... (which loaded parameter files are shown). So you need to set that to HOn3 to see those elements. 

Dual gauge is possible to draw, but we don't have special parameter files for it.  The way it works is via a cheat. The two tracks are simply overlaid. You can use the Parallel Track command with an offset of zero to align the second (or third etc) gauge track to the first either on the left or the right rail. The code will ensure that the ties are turned off on the second track (assumed to be the narrower gauge). Likewise we do not have inbuilt support for multi gauge turnouts because a turnout has a (single) gauge. This assumption is deeply rooted in the code. 

There is at least one of our community who does uses dual-guage track (which is how the Parallel feature and noties got added) so they may have more hints and tips.

Adam


Re: XtrackCad 3D

Robert Heller
 

At Mon, 03 Aug 2020 06:53:34 -0700 main@xtrackcad.groups.io wrote:


Charles,
No we don't (directly).  That's a lot of work and we have enough trouble getting it right in 2D!!  I have also noted in the past -> if there is a developer out there who is sufficiently motivated....

I believe, however, that there is an importer to enable the XTrackCAD layout
to be seen in another tool, however.   One thing to note is that only the
tracks have elevations. The Draw objects (lines, arcs, circles, etc) do not.
And nothing (even tracks) has a "Z" dimension. Even though tracks have an
"elevation", the rails and ties themselves have no height. The code does not
have a slot in the data structures to support anything like a three
dimensional view that would have any hope of being realistic. To implement
anything like that would require massive changes in the code. Note: since one
can export selected item to DXF *AND* most 3D CAD programs can import DXF,
that might be a starting place to produce a 3D representation.

Another (totally random) idea: FreeCAD is a free and scriptable 3D CAD
system, mostly written in Python. XTrakCAD files are text and well
documented, so it really should be possible to write a FreeCAD/Python script
to "import" XTrakCAD files into FreeCAD. It would require some help to deal
with benchwork, rail and tie profile, and structures, etc. to create the
inteneded 3D aspects.


Adam




--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services


Re: XtrackCad 3D

Adam Richards
 

Charles,
No we don't (directly).  That's a lot of work and we have enough trouble getting it right in 2D!!  I have also noted in the past -> if there is a developer out there who is sufficiently motivated....

I believe, however, that there is an importer to enable the XTrackCAD layout to be seen in another tool, however.   One thing to note is that only the tracks have elevations. The Draw objects (lines, arcs, circles, etc) do not.

Adam


Re: HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Adam Richards
 
Edited

Charles,

The first point to note is the active scale/gauge is set in the Options->Layout window. It determines which elements show up in the HotBar from the set of parameter files that were added in File->Parameter Files.... (which loaded parameter files are shown). So you need to set that to HOn3 to see those elements. 

Dual gauge is possible to draw, but we don't have special parameter files for it.  The way it works is via a cheat. The two tracks are simply overlaid. You can use the Parallel Track command with an offset of zero to align the second (or third etc) gauge track to the first either on the left or the right rail. The code will ensure that the ties are turned off on the second track (assumed to be the narrower gauge). Likewise we do not have inbuilt support for multi gauge turnouts because a turnout has a (single) gauge. This assumption is deeply rooted in the code. 

There is at least one of our community who does use dual-guage track (which is how the Parallel feature and noties got added) so they may have more hints and tips.

Adam


HOn3 track does not in my layout drawing #HowTo #dual-gauge #jmri

Charles Mulch
 

Hi


I am designing and building a 32X40 Layout in my railroad room above my wood shop. About 50% of the layout was moved in modules from our old home  to here. The layout features an HOn3 and dual gauge HO/HOn3 logging operation.

I have been able to draw the layout in HO but it is now time to add the HOn3 and Dual gauge portions, but the HOn3 track templates don't load and there seems to be no dual gauge track templates at all. Do I need to turn something on to allow the use of multiple gauges of track at the same time??


Thanks for your help in advance


Skip Mulch

Charles G "Skip" Mulch

1stc@cgm1944.com


XtrackCad 3D

Charles Mulch
 

Does XtrackCad support 3d views? if so how do I access my layout Drawing in 3d?


Re: Layers! -- FeatureRequest #FeatureRequest

Jack Haverty.
 

On 7/27/20 11:20 PM, Adam Richards wrote:
Some of these things seem to be items that are best associated with
Scale/Gauge - which might be things that would apply whenever that
scale was selected regardless of Layer, perhaps?  

For example, min radius, parallel offset, max gradient...
My layout is all HO, and it has separate layers for Mainline, Logging,
Branch, EngineYard, and FreightYard, plus others for construction
details - wiring, framework, etc.   Each of those might warrant
different settings for track-related parameters such as radius,
gradient, etc.    Also, there are other program settings that might
warrant different configurations.  E.g., it would be nice to have the
"palette" of drawing elements (the top bar with items from the loaded
parameter files) be different depending on which layer you're working
on.  E.g., a layer of "wiring" might warrant a set of electrical
components while a logging-track layer would be better with a set of
sharp or dual-gauge turnouts.

Right now, settings are sort of scattered all over the UI.   I agree
with the notion of minimizing changes to the UI and profiles.  Perhaps a
new "Profiles" menu item, similar to Layers, which would bring up a
window that contained all, or at least all most useful, settings in one
place for a selected profile.   The settings would still be present in
wherever they are now in the menus, but the Profiles page would provide
another way to view/change/save them.  A drop-down box for "Layers"
might provide a list of all layers, with checkboxes for things like
grouping them, specifying whether they should be
visible/hidden/unchanged or frozen/changeable when that profile is
selected.  Same approach for other multi-valued settings, e.g., which
parameter files are loaded.    Perhaps even the toolbar contents could
change, so tools that are irrelevant to the current task don't clutter
up the screen?   Something like another drop-down with all the available
tools and checkboxes for visible, sticky, etc. with input boxes for
things like default radius for the circle-track tool.

Then depending on what task you're doing, you could select a particular
profile and have all of the settings and behavior you prefer for that
task.  Perhaps each layer would have a setting of profile to be used
when working on that layer.  Maybe even a "revert" which would allow you
to temporarily select a profile and then revert back to whatever profile
was in effect previously.  Each setting should have a way to either set
it, leave it as is (as set before you change the profile), or set it to
the "default" profile (what you get on startup).

The Profiles window would come up populated with the current settings,
and include a "Save/New" button.  That would allow you to set up xtrkcad
as you wanted it using the current settings menus, then hit New to save
everything as a Profile.   A "Load" button would allow bringing in an
existing Profile.

Then if you never use the Profile menu, the program will simply behave
exactly as it does now - no changes to the UI.

Just some thoughts for a Wednesday morning...

/Jack


Beta 2.1 Released #v5dot2

Adam Richards
 

V5.2.0 Beta 2.1 has been released on SourceForge. 

https://sourceforge.net/projects/xtrkcad-fork/files/XTrackCad/Version%205.2.0%20Beta%202.1/

Installation packages are available for Windows, Mac, .deb and .rpm for Linux. 

The changes included were all those current as of Saturday 25th July.  These included fixes for several different issues that caused abnormal program ends (Abends) using Beta 2.0 - especially in the area of the Parallel Line command.  The CHANGELOG.md file contains details of the major changes after Beta 2.0 (and also the changes since 5.2.1a). 

Enjoy,

Martin, Dave and Adam

PS There have been several changes made since Beta 2.1 was cut, in response to user requests and some UI bugs - these will be included in the next release, and, as always, are always available for folks to self-build from source.

761 - 780 of 12355