Adding custom Line Types

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding custom Line Types

mmikulka
I am looking for instructions to upload a file with custom line types.  is this possible?  If so, is the formatting of the file the same as other CAD programs?
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom Line Types

dxli
The current code base doesn't allow user defined line types:

https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/lib/gui/rs_linetypepattern.cpp

If needed, we can design a way to allow customized line types.

Reply | Threaded
Open this post in threaded view
|

Re: Adding custom Line Types

dougp
Hi dxli.

I see the same request was made 13 years ago (https://forum.librecad.org/Creating-Custom-Linetypes-td4974845.html), but this feature is still not incorporated.

I don't speak C++, but from a quick inspection of https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/lib/gui/rs_linetypepattern.cpp it looks like the RS_LineTypePattern type allows a pattern of on-off-on-off lengths.

What I'm looking for (and what I think Steve was asking for) is a way to define a linestyle that includes text or graphics.  This is a feature critical to developing a site plan for building construction.  

Examples:

Buried Power Cable:          
-------BP--------------BP------
Buried Television Cable:    
-------BTV-------------BTV-----
Existing Buried Telephone:  
--- ---BT--- --- --- ---BT--- ---
Fence:                          
-------x---------------x-------
Existing Fence:                
--- ---x--- --- --- ---x--- ---

The line should not only incorporate text or graphics, but also it should be possible to choose the style for the line portion.

By incorporating graphics into a linestyle, Steve could use a linestyle to approximate his corrugated roofing by simply drawing a line offset (line -> parallel) an inch or two from the top of the framing rather than over-complicating his drawing by making numerous copies of arcs.
 
Like Steve, I was using custom linestyles in CAD software as a draftsperson 30 years ago.  But -- you know how software vendors and for-profit companies are -- the software I was using no longer exists.

Is this something that is possible in LibreCAD now by editing rs_linetypepattern.cpp, or would it require a change to the definition of the RS_LineTypePattern type?  As Steve asked, Would it be possible for this to be referenced or uploaded into the software from a user-defined file?  Because we certainly won't imagine all possible linestyles when developing the CPP code.

Is this forum not the correct place to make feature requests?  Can you please provide the URL where I would make such a request?
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom Line Types

flywire
dougp wrote
Examples:
Normally existing symbology is solid and proposed is broken.
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom Line Types

dougp
I understand that.  That's what I was trying to depict.  This font has limitations.  I can upload an image if needed, but I figured the differences in the text would make the problem statement relatively clear.
Reply | Threaded
Open this post in threaded view
|

Re: Adding custom Line Types

dougp
In reply to this post by flywire
It looks like I read your post backwards.

That's not what I remember from my experience, but I could be wrong.  Regardless, it would be nice to incorporate user-defined linestyles.