Giter Site home page Giter Site logo

kecb's Introduction

Where are the symbols?

They are generated in the ./dxf folder when the generate_dxf.py script is run. See 'img' folder for example output.

Design:

Symbols are drawn by default where 1 block = 20 units x 20 units = 1/8" x 1/8" There is no claim that these symbols adhere to any sort of official standard.

Purpose:

This program is intended to bootstrap an electrical CAD symbol library by generating common symbols in .dxf format. The symbols are all aligned to a common 2D grid and have a consistent style. Since they are generated using common building blocks a change to how a Normally Open contact is drawn will require (if kept to the same block dimensions) no changes to the rest of the library and it can easily be proliferated throughout.

External Libraries Used:

kecb's People

Contributors

kozbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kecb's Issues

Title Blocks

Need a couple of title blocks. Use 0.17 paper margin for now (typical on US printers)

Horizontal B Size 2 Column
Horizontal B Size No Columns

Variables:
Drawn By / Date / Initials
Sheet Number
Rev Number
Description
Drawing Number
Standards Block
Legal Block
Wiring Specs

Design considerations for future:
Ability to specify and automatically add Rows / Columns
Ability to specify and add power rails
Import logo

Add multiple pole drawing method

Symbols such as a disconnect, or circuit breaker have variations that are dependent on the number of poles. There should be a multiple pole drawing method and some way of indicating what number of poles are supported. Fallback to using the default draw method multiple times with applicable offset.

Simple Circuits

A simple circuit at first. One line with a NO PB through a NC PB to a relay.

PB left aligned
Relay right aligned
NC PB unaligned

Consider ideal spacing between components and left/right extents.
Also keep in mind how to implement AND within circuit for next step of drawing a simple latching circuit.
Components should be drawn by alignment left->none->right in order they were added.
Raise exception for now if total circuit length would exceed left and right borders.

Extents

Any time a draw method is called it should add to a list for that block rectangle coordinates. From that list we can calculate the actual outer extents plus the block rounded extents which will be needed to implement circuits so symbols don't overlap.

Basic Symbols

Simple:

  • Normally Open Contact
  • Normally Open Contact w/ Inline Terminals
  • Normally Open Device Contact
  • Normally Closed Contact
  • Normally Closed Contact w/ Inline Terminals
  • Normally Closed Device Contact

Limit Switches [Need for Instrumentation]:

  • Normally Open Limit Switch
  • Normally Closed Limit Switch

Instrumentation:

  • Normally Open Temperature Contact
  • Normally Closed Temperature Contact
  • Normally Open Flow Contact
  • Normally Closed Flow Contact
  • Normally Open Pressure Contact
  • Normally Closed Pressure Contact
  • Normally Open Level Contact
  • Normally Closed Level Contact

Components:

  • Thermal
  • Magnetic
  • Circuit Breaker
  • Coil

Pilot Devices:

  • Normally Open PB
  • Normally Closed PB
  • Two Position Switch NO [Left / Right]
  • Two Position Switch NC [Left / Right]
  • Three Position Switch NO [Left / Center / Right]
  • Three Position Switch NC [Left / Center / Right]
  • Pilot Light
  • Push to Test Pilot Light/Pushbutton

SVG Export?

With the exception of arcs being defined differently in SVG and a pain to translate the rest is pretty straightforward so this may be feasible.

Transform already contains scale, why two separate arguments?

Need to take a look at if there is any reason to have a second argument just for scale since it is in transform already. If we just always apply transform the conditional if transform is None sprinkled all over exporter can go. Transform should probably use it's own 'TRANSFORM_SCALE_DEFAULT' set to 'UNIT_SCALE' or something in case I want to change later. Default of 1 makes sense when debugging / creating symbols but probably not the best default for normal running.

Linetype scaling

Still not correct, should default to 0.1 or a function of the block size.

Support proper transformations in Drawable

Currently scaling is done directly on variables and offset by adjusting the origin for the current drawing cycle. It is probably wiser to use a transformation matrix in the builder and utilize that for drawing calls.

Disconnects

Need 3 and 4 pole disconnects, both standard and circuit breaker.

Serialize / Deserialize symbols

Need to explore options for exporting and importing symbols in ascii or binary format. Write some tests to export, import, export again and compare the two exports to make sure they are identical.

Draw Rectangle

Need a helper method to draw polyline rectangle using two points. Raise valueerror if p1.x == p2.x or p1.y == p2.y
Make it irrelevant what two points are supplied, they should just have to be opposing corners and calculate the rest.

House Wiring Symbols?

For some reason that seems to be a common search that leads here. Not something originally intended, but maybe?

PLC I/O json parser

With the number of variables and options this may be the best way to store data for generating PLC blocks and as a bonus the json can be generated via a utility script.

Smaller symbols for terminal strips.

It seems that in general I use 1/2 size symbols on the terminal strip / field wiring drawings. Maybe making a subfolder outputting some at smaller scale for this purpose would be worth it.

Basic linestyles

At minimum the always available linestyles should be dashed (2x, 1x, 0.5x) , dotted, and phantom.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.