Tutorial: Importing and Using Scaled Reference Images

Often we might need to cre­ate geom­e­try to fit real world objects that we don’t have a CAD mod­el for. Whilst we might jump to com­plex 3D scan­ning meth­ods and more, some­times a sim­ple ref­er­ence image, or images, can real­ly help the process. Even more so if we can accu­rate­ly scale the image. 

In this mini tuto­r­i­al we are using ver­sion 1.1.0 and as a reminder in all our tuto­ri­als we refer to tools using the “tool tip” text which is the text that appears when you hov­er over a tool icon. First of all, launch FreeCAD and from the start page select “Cre­ate an Emp­ty Project” to begin. 

Next we need a ref­er­ence image for our object. It’s also real­ly use­ful to have a known dimen­sion with­in the image. This might just be that you mea­sure a par­tic­u­lar sec­tion of your tar­get object, but if pos­si­ble, adding some form of scale, a ruler or such, to your image can be real­ly handy. As an exam­ple we grabbed a BBQ lighter as our object and placed it on our sewing table which has a handy mea­sure on it! Also of note with pho­tographs, it’s a real­ly good idea to make sure your image is par­al­lel to the cam­era. In this instance we did this by eye, but it isn’t unknown to break out a tri­pod and a spir­it lev­el. Final­ly, it does­n’t have to be a pho­to­graph, import­ing images of plans or tech­ni­cal dia­grams can be real­ly pow­er­ful also. 

With our ref­er­ence image cre­at­ed we can import it into our emp­ty FreeCAD project in a cou­ple of dif­fer­ent ways. We can use “File > Import” and then nav­i­gate to the image, or we can also just drag and drop the image file onto the pre­view window. 

Once import­ed you’ll see the image in the pre­view win­dow and see an image item in the mod­el tree view. You can switch the view to “Top” not­ing that by default an image is loaded onto the XY plane. If we dou­ble click on the image item in the mod­el tree we launch the “Image Plane Set­tings” dialogue. 

First task in the dia­logue is to slight­ly adjust the posi­tion of the image. We are going to leave it in the XY plane (note we can swap it to oth­er planes using this dia­logue) but we are going to apply a very small neg­a­tive off­set. In the Off­set input box we are going to set it to ‑0.1mm. This moves the image very slight­ly below the XY plane mean­ing that if we then cre­ate a sketch on the XY plane we will sketch over the image and not into the image which can cre­ate conflicts. 

Next, still in the Image Plane Set­tings dia­logue, let’s click the “Cal­i­brate” but­ton at the bot­tom. Once clicked we can move across to the image and click 2 points at either end of a know dis­tance. We opt­ed to click on the 5cm and 10cm marks of the rule and then we set this cal­i­bra­tion dis­tance to 50mm. Notice this changes the dimen­sions of the image to match the cal­i­brat­ed size. 

That’s our ref­er­ence image set up. We can now Okay the Image Plane Set­tings dia­logue. We can then move to the Part Design work­bench, click to cre­ate a new body and then click to cre­ate a new sketch in the XY plane and begin to use the sketch tools to draw geom­e­try sized to our tar­get object. 

This sim­ple exam­ple should be enough to get you going with this tech­nique, you can also explore import­ing mul­ti­ple images on mul­ti­ple planes. This is incred­i­bly use­ful when you have mul­ti view tech­ni­cal draw­ings of objects you can set up on each plane for example. 


Discover more from FreeCAD News

Subscribe to get the latest posts sent to your email.

4 responses to “Tutorial: Importing and Using Scaled Reference Images”

  1. Carl Avatar
    Carl

    Not to re-dirct folks, but I have used https://shapescan.pt/ … it cre­ates a scaled svg file that FreeCad can read. For now at least this seems to be free to use.

  2. freesupernaturallydc567df601 Avatar
    freesupernaturallydc567df601

    Scale image using 2 dimen­sions (ver­ti­cal and hor­i­zon­tal) for a lit­tle more accu­ra­cy, if that is impor­tant to your project.

  3. Thovthe Avatar
    Thovthe

    Is there a way to turn off the dark­en­ing of the back­ground when mak­ing a sketch over the ref­er­ence image? It can make it hard to match to low con­trast edges.

  4. Old-School Physicist Avatar
    Old-School Physicist

    Just a lit­tle reminder.
    (Require­ments-depen­dent, obvi­ous­ly, but…)
    Not mere­ly “par­al­lel to the camera.”
    As every expe­ri­enced pho­tog­ra­ph­er knows, and basic geo­me­tri­cians too, per­spec­tive and par­al­lax also need to be con­sid­ered, espe­cial­ly with “thick” objects (front-to-back depth).
    Bet­ter pho­tographed from a greater dis­tance (with a longer focal-length to fill the frame, aka zoomed-in) to flat­ten the per­spec­tive and make the entire object-to-tape-mea­sure rela­tion­ship more accurate.
    It’s the same prin­ci­ple as switch­ing to “Ortho­graph­ic” ren­der­ing (aka view-from-infin­i­ty) in the FreeCAD mod­el­ling window.
    Hope that helps someone. 🙂

Discover more from FreeCAD News

Subscribe now to keep reading and get access to the full archive.

Continue reading