draw on arbitrary face (as in Sketchup)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!

draw on arbitrary face (as in Sketchup)

Postby Jerome » Sat Feb 13, 2010 8:19 pm

I am experimenting with adding more sketching functions to the draft module. The restriction to a single drawing plane is too limited. Don't you think it should be possible to draw on the faces of any 3D object as it is possible with Google Sketchup?

For the start I am looking for available functions to transform mouse coordinates into corresponding 3D points on existing faces. I have solved the step how to select the face below the mouse cursor. But how do I project mouse (integer x,y) into (float x,y,z) in object space? Does either Opencascade or Freecad offer such functions?

Posts: 56
Joined: Tue Dec 29, 2009 11:43 pm

Re: draw on arbitrary face (as in Sketchup)

Postby cline » Sat Feb 13, 2010 11:56 pm

The ability to select a drawing plane strikes me as essential.

Currently, Draft creates geometry in planes perpendicular to the current view direction, though a few of the tools are still rooted in the XY plane (we can consider these to be bugs). I like the idea of adding a plane selection tool to draft. The tools would be updated to constrain creation to the selected plane, with an offset box for switching to parallel planes.

This assumes Yorik likes the idea. I am used to working with either a 2D sketcher, or full 3D geometry creation tools (which are painful if you are creating several objects in a single plane).

FreeCAD will certainly feature a 2D sketcher with the ability to define the working plane by selecting a planar face. I am encouraged that the pieces for this are coming together, but it will take some time to make it a reality.

Re: draw on arbitrary face (as in Sketchup)

Postby Guest » Sun Feb 14, 2010 12:36 am

This is like an arbitrary UCS or an arbitrary/user defined "working plane". Yes this is essential to any 3D CAD/BIM.
Relatively to this UCS, user will work - as very, very few times user works in absolute coordinates ... and how is defined absolute (still, that is an arbitrary UCS).

Re: draw on arbitrary face (as in Sketchup)

Postby Guest » Sun Feb 14, 2010 4:32 pm

Hahaha! Seems like you are confusing FreeCAD with a CAD program. It is designed for world domination. Only after this goal it will be extended to be a usable CAD program.

Seriously, the FreeCAD developers wanted to make everything better, more intelligent than provided by OCC. So they replaced the builtin Viewers with something they understood. The result is that basic CAD functions like you describe them are made impossible. It would be easy to use the OCC AIS services in HeeksCAD for example. But here you won't find a solution. Here we are only dreaming about being as smart as we think we are. Let's dominate the world!
User avatar
Site Admin
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany

Re: draw on arbitrary face (as in Sketchup)

Postby jriegel » Mon Feb 15, 2010 11:40 am

The decision for using not ALL components of OCC was made after some years using this components.

As I laid out in earlier posts, we decided to use best of bread open source components.
And the OCC AIS service is usably to some extend but compared to modern 3D graphic libs
like VTK or Coin3D not a big hit. Its the decision of the project to use the best components.

OCC decided sometime to support Jave, we use Python. It has a document service
based on labels, we use Objects. We made a lot of decisions since 2001 when this
projects starts, some I might regrade most of them not. For sure I don't regrade
using Coin3D instead of AIS.

So its not about world domination, its about using the best library for the job.
And not using OCC complete....
Stop whining - start coding!
Posts: 19
Joined: Mon Apr 27, 2009 1:09 pm

Re: draw on arbitrary face (as in Sketchup)

Postby studioa » Mon Feb 15, 2010 2:01 pm

So since not all of us understand what is under the hood of FC, we are focusing on the "top", as end users: is it possible at this moment to define an arbitrary UCS and work on that? if yes, how is it done? if not, hope it is planned. thanks for your hard work! _a_
User avatar
Site Admin
Posts: 11645
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil

Re: draw on arbitrary face (as in Sketchup)

Postby yorik » Tue Feb 16, 2010 2:23 pm

My opinion is that a "ucs" is an autocad concept that is not too useful in freecad, but surely I agree that it would be cool to be able to select the work plane. I like the sketchup system, where working plane selection is almost automatic, depending on where you move your mouse... There is a similar system in the Shift-snapping of the draft module, it chooses automatically which axis (X,Y or Z) to follow based on which one your mouse cursor is closest. It doesn't work 100%, because your mouse cursor position is actually a ray in the 3D space, but I think that system might be extended in order to "lock" a certain work plane.

One other thing I believe is that in 90% of the cases, the work planes will be orthogonal (XY, XZ or YZ), so we might start with those...

Ah and something else, the draft module already allows you to draw on existing faces, but the shift-snapping doesn't work fully in those cases...