|
|
| Menu location |
|---|
| Cables → Cable Connector |
| Workbenches |
| Cables |
| Default shortcut |
| C N |
| Introduced in version |
| 0.1.0 |
| See also |
| Cables Cable, Cables CableBox, Cables CableTerminal, Cables SuppLines |
New concept of Cable Connector Preset with CableTerminal and SuppLines as child objects: introduced in version 0.3.0
The Cable Connector represents a model of an electrical connector. Its shape can be selected from DANEPreset list upon creation. There are two shape types available: first one fully parametric called 'ParametricTerminal' and second one called 'Fixed'.
The 'ParametricTerminal' type creates a parametric connector object. The connector is a model of electrically conductive metal block (for simplicity without external insulation). From an electrical point of view, all wires connected to a connector form one electrical node. The connector has default size upon creation, but some parameters, like Height, Hole Size, Hole Diameter or Number of Holes can be changed during creation after selection 'Customized' preset or later by changing properties. In this mode the single CableTerminal is created, split to segments passing through each connector hole.
The 'Fixed' type creates non parametric connector object with a shape taken from external STEP file. There are a few predefined STEP connector models shipped together with Cables Workbench. In addition, the user can create their own connector library, this is described in Cable Connector Presets. In this mode the certain number of CableTerminals are created with predefined size and position corresponding to connector pins. Additionally one or more SuppLines objects can be created forming the basis for the cable entering the connector.
The Cable Connector belongs to the Arch Component class and inherits all of its properties.
Cable Connector object can be colored by attaching desired Material to the Material property. MultiMaterial is also supported. It can be used to change the original connector 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 connector.
Example of the Cable Connector of 'ParametricTerminal' type (TerminalStrip x3):
There is a multisegment CableTerminal visible inside connector body (transparent for better explanation)
Example of the Cable Connector of 'Fixed' type (back side of D-Sub DE-9):
There are nine red CableTerminals visible above connector body. There is also orange cross of SuppLines for cable base attachment
Once created the Cable Connector 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 Cable Connector preset available in the task panel can be changed. The currently selected preset is immediately visible in the 3D View.
When the special 'Customized' preset is selected, the task panel shows additional options allowing to change all the properties of a custom parametric Cable Connector.
Cables Workbench comes with several predefined shapes. However, the user is not limited to using the default set (the Cables Create Custom Connector tutorial explains the creation of a custom connector in detail).
An additional CSV file can be created by the user, containing custom Cable Connector Preset definitions. It must be named connectorpresets.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 connectorpresets.csv file must be modeled upon the same rules as the connectorpresets.csv in the Cables Workbench source code. The file is self descriptive and can be used as a template for own Presets creation.
The custom connectorpresets.csv file can be modified without restarting FreeCAD. Any changes made there are immediately visible in the list of Presets when making a new Cable Connector from the GUI.
The connectorpresets.csv can contain two preset types: ParametricTerminal PresetType and Fixed PresetType.
This preset type needs only single line in the connectorpresets.csv file to fully describe all the parameters of the given connector. No additional files are needed. There are some details about this type in the Description.
The definition of this type is more complex than the previous one. The preset line in the connectorpresets.csv file among other parameters defines names of two additional preset files:
This two additional files (STEP and CSV) have to be placed in:
$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 connectors with the same STEP definition but different number of Terminals or their placement if needed.
The single preset line of connectorpresets.csv contains the following information for the software analyzing this file:
Connector and Name=Dummy). This file should exist in a $FREECAD_USER_DIR/Cables/lib/ or $FREECAD_USER_DIR/Mod/Cables/freecad/cables/resources/presets/lib/. If not, an error message will be generated.Fixed. It informs that the shape will be created from an external STEP file.$FREECAD_USER_DIR/Cables/lib/ or $FREECAD_USER_DIR/Mod/Cables/freecad/cables/resources/presets/lib/. If not, an error message will be generated.The above approach to creating presets allows to use the same STEP file for different versions of presets with different CSV description files. It can be useful e.g. for creating connector variants with different pin descriptions, different number of used terminals, supplines etc.
As a template and example the Connector_Dummy preset can be taken:
The preset definition line is in the file connectorpresets.csv:
Dummy,Fixed,Connector,Dummy_Dummy.step,3,1
Where the fields represent the following:
Name,Fixed,ConnectorClass,StepFileName,NrOfTerminals,NrOfSuppLines
From the above definition it follows that the file Dummy_Dummy.step and Connector_Dummy.csv (filename built from ConnectorClass_Name.csv) have to be present in one of the folders mentioned above.
After checking, the Dummy_Dummy.step and Connector_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 Cable Connector with three CableTerminals and single 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.
Probably still some STEP files will not load properly into the connector. To prevent this, import downloaded step file into FreeCAD directly (via File/Import menu) and export it back to STEP file. This will rebuild entire structure of the downloaded file. Reducing the number of shapes in a single STEP file can also help. FreeCAD supports STEP AP242, but in case of problems an older version (e.g AP203) can be tried.
If everything fails, such a problematic STEP files can be reported to the workbench author: SargoDevel for further analysis.
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 connectors.
A Cable Connector 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.Cable Connector
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).Length): Specifies the height of the connector. The default height is 5 mm.Length): Specifies the size of holes in mm2. The default hole size is 2 mm2.Integer): Specifies the number of holes. The default value is 3.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 Cable Connector. The default preset is TerminalStrip_2.5mm2_x3.Length): Specifies the thickness of the wall between the hole and external surface of connector. The default thickness is 1 mm.This workflow shows how to build a connector, a cable box, a cable and how one subwire of cable can be passed through the one of connector holes.
Example of cable subwire passed through the hole of Cable Connector.
Here is the animated image showing the steps described above.