Re: parallel lines still crash program


Adam Richards
 

Chuck,
Please see this video to show how the functions are intended to work. https://www.loom.com/share/1c0e402c4d7c482c9e55d12b383c3bdc.

It is true that we are building on some very simplistic types and operations here. If you think there are gaps now... you should see 5.1.  And, no, given the idiosyncrasies of the code base that has evolved over the many years, choosing someone else's (open source) codebase even if it exists (in C) is no panacea - the work needed to scaffold between models is likely very significant. 

You will recall that V5.2 is in Beta for a reason -> and that reason is bugs - with your help we are pulling them out - but part of the solutions are things (like Parallel Line) that are less baked as they have arisen DURING the Beta in direct response to user input - this makes them even more likely to have issues as they have been tested much less.

1. As you will see in the video, I am able to Delete points fine -> as a bypass you can try using the Command Context Menu and clicking on the Delete function within Modify Mode (see video).  A thought occurs - perhaps Delete is mapped differently in Linux.  We are mapping keycodes 127 and 8 as Delete.  And if you have only 3 points in a PolyGon/Polyline - you can't delete one. 

2. I get why Split is a good idea - I think once you are able to delete points successfully a simple split like the one we have for track that either cuts open a polygon at a point or splits a polyline into two will get the job done. Once combined with Join Line you will be able to construct sequences of lines back into polylines and then close them. Which brings up another point - you may find constructing edges exclusively as lines/polylines first and then joining them all together into a PolyLine is easier as a method. You'll find that Join Lines bridges the end gaps with straight lines so you only need part of the sides to start with.

3. Please see the video for node type setting. They are indeed on the Command Context Menu as well as having shortcuts.  I found that the PolyLine->PolyGon "g" and PolyGon->PolyLine "l" shortcuts only worked from the menu and not the key -> change made

4. The Bezier Parallel function works as you say now (post fixing the bug). It formerly took the view that the first offset angle was the one to use at both ends - the trick is to use the offset in reverse on the second end based on its angles. Now because a Bezier is constructed by just 4 points, if the curve is "extreme" enough, the middle of the curve can be an issue because the ends are closer together and so the control arm lengths might have to be adjusted. To actually achieve a close tolerance along the length of such an arbitrary curve just using another Bezier is a complex task mathematically. However, for most practical curves we use this way will work well enough. 

5. The PolyLine Parallel function now uses an offset at 90 degrees to the median angle between the two sides that meet at the vertex. This allows right-angles and so on to be mirrored precisely. In thinking about it overnight the precise offset will need to adjusted as the vertex angle changes to ensure a constant offset from the sides. At 45 degrees it would need to 1.41x compared to 90. I will make that change. 

Basically, if we wanted to have the effect of using a different (vector) drawing program for non-track items, I would concentrate entirely on the import/export of drawn objects form it - assuming it can import/export the richness of the needed objects. The amount of work needed to "weld" a different UI system onto XTrackCAD would be enormous as would the reverse.  I know there are many facilities that such a system would have in object manipulation that I certainly do not have time (or skill) to devote to achieve.  My personal goal, along with Martin, I know, is to get V5.2 launched and be able to take a real break from coding.  My layout has lain absolutely fallow for 4 years at this point, track down but no scenery and not all kinks worked out electrically and I think my aim of giving something back to the community of the free tool I used to design it has been achieved. 

Adam

Join main@xtrackcad.groups.io to automatically receive all group messages.