|
|
| 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 |
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.
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).
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.
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.
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:
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.
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.
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.
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.
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.
An Electrical Device object shares the common properties and behaviors of all Arch Components.
Component
Some most frequently used properties from the group are described here. The rest is available at Arch Component
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
Integer): (hidden by default) Specifies the number of a SuppLines child objects. The default value is 0.Integer): (hidden by default) Specifies the number of a CableTerminal child objects. The default value is 1.Enumeration): Specifies the predefined set of parameters for Electrical Device. The default preset is MCB_1-Pole.The way of building a Electrical Device is very similar to the Cable Box Typical workflow or Cable Connector Typical workflow