Compilied Watertank project

Today, I compiled Water tank project code and trying to open .g format file in FreeCAD by converting .g format file to other format but unable to open it.

Other files include brep-files for objects and thumbnail of drawing. BesidesFreeCAD’s own file format, files could be exchanged by the following file formats: DXF, SVG (Scalable Vector Graphics), STEP, IGES, STL (STereoLithography), OBJ (Wavefront), DAE (Collada), SCAD (OpenSCAD), IV (Inventor) and IFC. (

Output of Water tank project after compilation:


Learning too many new things today

Today, I installed Gitlab server on the experimental server (link) and solved the Monisha’s problem in BuildD project

Few new things that I have learned today:

  • Run Nginx on different ports instead of 80
  • Virtual site configuration with Nginx
  • Port forwarding by using Iptables command
  • Little C++ stuff
  • Working on dictionary list ( keys and values ) in Python
  • jQuery: Conditional show an element based on drop down box selection

Export drawing sheets of FreeCAD into PDF and SVG format from Python console – Done

Finally, I found the answer that how to save the drawing sheets in FreeCAD from Python console. In FreeCAD, whenever we created a new drawing sheet its get stored as temporary file in our system. The below code is used to find the location of the drawing from Python console:

import os
import subprocess

obj = App.ActiveDocument.getObject("Page")
page = getattr(obj, 'PageResult')

The page variable stored the location of the drawing sheet in SVG format.

Converting SVG format to PDF format by using Inkscape:

import os
import subprocess

obj = App.ActiveDocument.getObject("Page")

# Path to Inkscape executable
inkscape_path = "/usr/bin/inkscape"

# Exported PDF file location
file_location = os.path.expanduser("~" + os.sep + obj.Label + ".pdf")

page = getattr(obj, 'PageResult')
call_inkscape = [inkscape_path, "-f", obj.PageResult, "-A", file_location]

Daily dairy

Today, my friend Harpreet installed a new desktop environment (Lubuntu) and he found that after the installation new desktop environment some Lubuntu desktop packages conflict with each Unity packages and he couldn’t login from GUI. When he typed the password from GUI then computer asked again for typing the password (like a loop). Then he discussed his problem with me. I know it was the login loop problem (i.e. Ubuntu gets stuck in a login loop). But first, I fixed conflict packages problem and then I fixed login loop problem.

Here is the detail description that how to fixed the above problem.

Ubuntu gets stuck in a login loop

When I solved the Harpreet’s problem I learnt many new things. Thanks Harpreet for gave me the opportunity to learnt something new.

Presentation day

Today, I gave my presentation on making the drawing of the 3D object on the drawing sheet by using FreeCAD macro. I think my overall presentation is good and gave the answer to every question put by the listeners. When my presentation is over I discuss some dimensioning stuff with the civil student.

Special thanks to Daman (fumblehool).

Draw sectional view of object – Done

Today, I wrote the below code and by using this code, user can easily draw the sectional view of the object by simply write only two commands.

sec_obj = section_view_specs("Compound", 10, 10, 0, 0, 0, 1, 0, 100, 100, 2, 0)
draw_section_view(sec_obj, "Page")

In the below code I made a one constructor in class section_view_specs which will store all the information which will require to draw the sectional view of the object and function draw_section_view actually draw the sectional view of the given object by the information section_view_specs object.

class section_view_specs:
    def __init__(self, obj, x_dir, y_dir, z_dir, axis_x, axis_y, axis_z,
            angle2axis, x_pos, y_pos, scale, rotation):
        self.obj = obj
        self.x_dir = x_dir
        self.y_dir = y_dir
        self.z_dir = z_dir
        self.axis_x = axis_x
        self.axis_y = axis_y
        self.axis_z = axis_z
        self.angle2axis = angle2axis
        self.x_pos = x_pos
        self.y_pos = y_pos
        self.scale = scale
        self.rotation = rotation

def draw_section_view(view, page_name):
    obj_ref = App.ActiveDocument.getObject(view.obj)
    view_ref = Arch.makeSectionPlane([obj_ref])
    view_ref.Placement = App.Placement(App.Vector(view.x_dir, view.y_dir,
        view.z_dir), App.Rotation(App.Vector(view.axis_x, view.axis_y,
            view.axis_z), view.angle2axis))
    page_ref = App.ActiveDocument.getObject(page_name)
    draw_ref = Draft.makeDrawingView(view_ref, page_ref)
    draw_ref.X = view.x_pos
    draw_ref.Y = view.y_pos
    draw_ref.Scale = view.scale
    draw_ref.Rotation = view.rotation

Daily diary (Sectional View)

Today, I explored how to draw a sectional view of the object in FreeCAD. My many basic concepts related to drawing is clear now. To draw the drawing of a sectional view of the object on the drawing sheet, FreeCAD use three workbenches (Arch, Draft, and Drawing). I made a simple rough algorithm which will do my job simpler when I write the program for doing all the task.