FreeCAD Logo FreeCAD 1.0
  • English Afrikaans Arabic Belarusian Catalan Czech German Greek Spanish Spanish Basque Finnish Filipino French Galician Croatian Hungarian Indonesian Italian Japanese Kabyle Korean Lithuanian Dutch Norwegian Bokmal Polish Portuguese Portuguese Romanian Russian Slovak Slovenian Serbian Swedish Turkish Ukrainian Valencian Vietnamese Chinese Chinese
  • Features
  • Download
  • Blog
  • Documentation
    Documentation index Getting started Users documentation The FreeCAD manual Workbenches documentation Python coding documentation C++ coding documentation Tutorials Frequently asked questions Privacy policy About FreeCAD
  • Contribute
    How to help Sponsor Report a bug Make a pull request Jobs and funding Contribution guidelines Developers handbook Translations
  • Community
    Code of conduct Forum The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Calendar
  • ♥ Donate

Donate

$
SEPA Information
Please set up your SEPA bank transfer to:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Bank agency: BNP Paribas Fortis
Address: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

CableLightPoint
Material
Cables

Cables ElectricalDevice

Menu location
Cables → Electrical Device
Workbenches
Cables
Default shortcut
C E
Introduced in version
0.3.0
See also
Cables Cable, Cables CableBox, Cables CableTerminal, Cables SuppLines

Description

The Electrical Device represents a model of any electrical device that has the possibility of direct cable connection. Its shape can be selected from DataPreset list upon creation. There is only non parametric shape type available. It is called 'Fixed'.

The 'Fixed' shape type creates non parametric device object with a shape taken from external STEP file. There are a few predefined STEP device models shipped together with Cables Workbench. Moreover, the user can create their own device library, this is described in Electrical Device presets. In addition to the shape the certain number of CableTerminals are created with predefined size and position corresponding to connection points. Additionally one or more SuppLines objects can be created forming the basis for the cable entering the device.

The Electrical Device belongs to the Arch Component class and inherits all of its properties.

Electrical Device object can be colored by attaching desired Material to the Material property. MultiMaterial is also supported. It can be used to change the original device colors to those defined in the multimaterial composition. Important: the number of colors in the multimaterial must match the number of original colors of the device.

Example of the Electrical Device (Miniature Circuit Breaker 1-Pole):
There are two red CableTerminals positioned on both sides of a device body.

Usage

  1. Select the vertex, point on surface or object in the 3D View or select nothing.
  2. Create Electrical Device by one of these methods:
    • Press the Electrical Device button.
    • Select the Cables → Electrical Device option from the menu.
    • Right-click in the Tree View or the 3D View and select the Cables → Electrical Device option from the context menu.
    • Use the keyboard shortcut: C then E.
  3. The Electrical Device task panel opens. See Options for more information.

Once created the Electrical Device is placed at the position of selected vertex, point or object in the 3D space (or at the point (0,0,0) if nothing was selected).

Options

The Electrical Device preset available in the task panel can be changed. The currently selected preset is immediately visible in the 3D View.

Currently the task panel doesn't show any additional options when the special 'Customized' preset is selected.

Electrical Device presets

Cables Workbench comes with several predefined shapes. However, the user is not limited to using the default set.

An additional CSV file can be created by the user, containing custom Electrical Device Preset definitions. It must be named devicepresets.csv, and placed in:

$FREECAD_USER_DIR/Cables/

The $FREECAD_USER_DIR can be obtained from the Python Console:

FreeCAD.getUserAppDataDir()

The contents of the custom devicepresets.csv file must be modeled upon the same rules as the devicepresets.csv in the Cables Workbench source code. The file is self descriptive and can be used as a template to create custom Presets.

The custom devicepresets.csv file can be modified without restarting FreeCAD. Any changes made there are immediately visible in the list of Presets when making a new Electrical Device from the GUI.

Currently the devicepresets.csv can contain only one preset type: Fixed PresetType.

Fixed PresetType

The definition of this type needs two additional files. The line in the devicepresets.csv file among other parameters defines names of these two additional preset files:

  • STEP file with the shape and colors of the device. The name of this file has to be put directly (file example: Dummy_Dummy.step)[1].
  • CSV file with placements of the device body, parameters for all attached CableTerminals and SuppLines. The name of this file is made from concatenation of DeviceClass and Name fields (file example: Device_Dummy.csv).

This two additional files (STEP and CSV) have to be placed in the:

$FREECAD_USER_DIR/Cables/lib

In fact the software will look for these files in one more place (which should be treated as read only):

$FREECAD_USER_DIR/Mod/Cables/freecad/cables/resources/presets/lib/

So it is possible to define similar devices with the same STEP definition but different number of Terminals or their placement if needed.

More details about fixed PresetType in devicepresets.csv file

The single preset line of devicepresets.csv contains several information for the software analyzing this file. For precise description, see CableConnector More details about Fixed PresetType in connectorpresets.csv file, where the same rules as here are applied.

Example of fixed PresetType

As a template and example the Device_Dummy preset can be taken:

The preset definition line is in the file devicepresets.csv:

Dummy,Fixed,Device,Dummy_Dummy.step,2,2

Where the fields represent the following:

Name,Fixed,DeviceClass,StepFileName,NrOfTerminals,NrOfSuppLines

From the above definition it follows that the file Dummy_Dummy.step and Device_Dummy.csv (filename built from DeviceClass_Name.csv) have to be present in one of the folders mentioned above.

After checking, the Dummy_Dummy.step and Device_Dummy.csv files can be found in $FREECAD_USER_DIR/Mod/Cables/freecad/cables/resources/presets/lib/.

As a result of definitions from these three files the new Electrical Device with two CableTerminals and two SuppLines can be created.

STEP file

Since Cables Workbench version 0.3.2 any of properly made STEP file should load into connector without errors. This includes multishape STEP files and STEP files without color defined.

In case of problems see CableConnector STEP File for which the same rules apply as here.

STEP source

Each STEP file from predefined preset has also its source file attached (example: Dummy_Dummy.FCStd). Inside each source file there is information on how to correctly generate a STEP file with colors from the source shape. These source files can be used as a base for creating shapes for new devices.

Notes

  • The CableTerminal and SuppLines objects have reversed relation with their Electrical Device parent to avoid cyclic dependencies. They are shown as a children in the Tree View only for visual organization of objects. Undesirable consequence: when the Electrical Device is copied, all its child CableTerminal and SuppLines objects must always be manually copied with it.
  • SuppLines or CableTerminal child objects are created automatically depending on Preset, their shape and placement are controlled by Electrical Device.

Properties

An Electrical Device object shares the common properties and behaviors of all Arch Components.

Data

Component

Some most frequently used properties from the group are described here. The rest is available at Arch Component

  • DataBase (Link): An external shape of any Shape-based base object can be used here. This will replace the default method of shape creaction and an external shape will be used. Number Of Terminals and Number Of Supp Lines parameters become visible and can be changed if Base property is not None.

Electrical Device

  • DataClaim Children (Bool): If set to true it will claim the linked Terminals and SuppLines as children in the Tree View (introduced in version 0.3.3).
  • DataNumber Of Supp Lines (Integer): (hidden by default) Specifies the number of a SuppLines child objects. The default value is 0.
  • DataNumber Of Terminals (Integer): (hidden by default) Specifies the number of a CableTerminal child objects. The default value is 1.
  • DataPreset (Enumeration): Specifies the predefined set of parameters for Electrical Device. The default preset is MCB_1-Pole.

Tutorials

  • Cables Create Custom Connector describes the creation of a connector with a Fixed PresetType. The creation of a custom ElectricalDevice is very similar.
    • In the step Main presets file instead of connectorpresets.csv the devicepresets.csv should be used.
    • In the step CSV description file for STEP file instead of Connector_Dummy.csv the Device_Dummy.csv should be used.

Typical workflow

The way of building a Electrical Device is very similar to the Cable Box Typical workflow or Cable Connector Typical workflow


CableLightPoint
Material
Cables

This page is retrieved from https://wiki.freecad.org/Cables_ElectricalDevice

Get in touch!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

© The FreeCAD Team. Homepage image credits (top to bottom): ppemawm, r-frank, epileftric, regis, rider_mortagnais, bejant.

This project is supported by: , KiCad Services Corp. and other sponsors

GitHubImprove this page on GitHub