Electrical, Electronics Wiring

Just a walk through of how I accomplished this silly thing. This is not a fully fleshed out article just sort of notes.

Warning: This is a more advanced topic than most articles on this site.

A routable, easy to use wiring solution within FreeCAD is, at this moment, an elusive beast. There is no simple tool to create a 3 dimensional wire that can easily moved into position. We can however get a little closer to that end.

3 Sketch Approach

To begin we will create 3 Sketches one on each plane.

Create the first Sketck with its orientation on the XY_Planer

The XY_Plane will be the control plane. Create a B-Spline with 2 “Knots”. For each axis a Knot and a Pole should be coincident with the Axis. If understand the terminology the “Pole” is the end point and the “knot” is the point that defines the curve. The example below shows a “Pole” and a “Knot” on each axis

Place Horizontal and Vertical distance constraints between the Knot-Pole pairs.

Name the Constraints and select reference mode. ( these will drive the knots in the other two sketches )

Name this sketch the XY_Wire

create the XZ_Wire Segment

Create a second sketch with the sketch orientation on the XZ_Plane.

Create an “External Geometry” contsraint using the Vertex sitting on the X Axis

Add a B-Spline starting at the External Constraint. be certain to constrain the first “Knot” to the X axis.

Add a distance constraint between the Pole and knot on the X axis. Use the Blue Circle formula editor to retrieve the value of the x_tangency constraint.

The YZ_wire, will be completed in the same many but the sketch will be oriented to the YZ_Plane and the knots will be constrained against the Y axis of the sketch. Add a construction line to the “Free” end of the XZ and YZ wire. This makes for an easier sweep and sweep profile alignment.

Create the wire profile. For easier alignment choose the XY plane for sketch orientation. The wire profile can be any shape but it has to be closed and result in a single edge.

Map the Sweep Profile to an Endpoint Vertex, use the Ellipsis from the Map Mode property.

Select the Vertex at the end of the entire “Wire” and select Translate Origin as the Attachment mode.

Select the second selection in the Attachment dialog ands elect the edge. The mode should change to Frenet NB, this keeps the SweepProfile perpendicular to the wire ( I think, for now )

Move to the Draft Workbench. With all three wire sketches selected click the convert to draft wire button

Now comes the crazy part

You can avoid this step f you create 3 Sweeps in Part or Part Design. But I am angling for a single Sweep.

Select the three resulting Draft Objects. Named Sketch00x, etc.,

Click the Draft Downgrade Tool

The result will be three edges

Click the Draft Upgrade Tool ( with the three edges selected ) the result will be a Wire.

Now we can Sweep. Go to the Part Work Bench

Before we create the sweep, we will need to hide the sketches so it is easier to select the wire. You should have a visible Draft Wire and the SweepProfile sketch.

Click the Sweep Tool

in the sSweep dialog add the “Sweep Profile” sketch using the right arrow.

Next Create the sweep Path by clicking the “Sweep Path” Button. The button will become greyed out and change to “done”, it is WAITING for you to select a path ( wire, line, edge etc. )

The secret sauce !

To sweep the entire wire, ( after you start selecting Sweep Path ) Click on the model Tab and click the “Wire”

With the WHOLE Wire selected, Click back on the Tasks Tab and Click Done then ok.

The result is a 3d sweep, in one sweep.

To re run the sweep all we have to do create a new wire and swap out the old wire.

Moving two points on the XY Sketch results in a different sweep path.

Create our Draft Version and Downgrade+Upgrade to get new wire

With the sweep selected, click the Ellipses of the “Spine” property.

Change the link to the new wire.

On the next rec-calculation you will have a new wire.


If you try to do a Part Workbench sweep and select all three sketchs, it fails as the edges are not considered connected.

If you try the Tab switch trick you get and error:

Trying to re-link using all three sketches fails as well.

Using 3 Sweeps in Part Design is problematic due to the lack of actual tangency.

2 Replies to “Electrical, Electronics Wiring”

Leave a Reply