Positioned sketch

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!
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Positioned sketch

Post by Pauvres_honteux »

I'd like to propose an upgrading of the sketch placement and orientation: Positioned sketch.
The big french program have this and I do assure you it's very handy when one work on bigger projects (e.g. you can make sure your project doesn't flip in any other way than you set up from the beginning when you start edit your beloved sketch).
Perhaps a picture says more than ... me? ;)
sketch_position.jpg
sketch_position.jpg (44.3 KiB) Viewed 3490 times
You can select what type of positioning you want.
I usually go for "Positioned" which means I get to choose any plane, in the picture they've choose the YZ-plane while I like to use my own created plane.

The origin type; for maximum freedom I mostly go with "Projection point", that is, I select my own created point. This option also does just that, projects the point of choice on the previously chosen plane parallel to its normal.

And finally the orientation; always parallel to a skeleton line or an axle from my own created (master location) coordinate system (which always differs from the part/file absolute zero).

The orange 2D-coordinate system is the sketch own coordinate system.
Inside the sketch one work in the same way as in today’s FreeCAD.

Search the 'net for "*replace with big french program* positioned sketch" and you'll get heaps of examples of different choices for each position, origin and orientation.

I advocate this gives us users a super powerful tool the day one can use linking between containers, especially between non 3D-containers.
For example. if one builds hers/his model smart enough you only need to change a few points and the whole model remodels into a new shape. Put up a skeleton of points on a plane for screw holes, project them on the contact planes for each screw, place this new "Positioned sketch" on that plane with its origin connected to the projected point, make a circle, extrude and voila! You've got a bunch of holes following your hole pattern exactly as you wish!
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Positioned sketch

Post by DeepSOIC »

Big French Program == Lord Voldemort :twisted:
I honestly don't know, what program you are talking about.

Apart from that, most of this functionality is provided by attachment dialog, just presented very differently. Sketches can have custom attachment, just like Datum planes, except it's not easily accessible. You need to select the already created sketch, and on Part Workbench, in menu, choose Part->Attachment.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Positioned sketch

Post by Pauvres_honteux »

Lord Voldemort
:lol: absolutely spot on !

Your suggestion: "Part Workbench, in menu, choose Part->Attachment." it refuses to take the point as an argument. :(
Having the sketch attached to a plane work for one point, one datum plane and one sketch in one body. After that everything breaks badly. Closing the program and opening the file again messes it up even more.
It seams there's a huge leakage between features and between containers?
I hope this can be a start for a bug report.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Positioned sketch

Post by DeepSOIC »

Pauvres_honteux wrote:After that everything breaks badly.
Waiting for a proper bug report. :)
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Positioned sketch

Post by Pauvres_honteux »

Proper bug report you say?
Hmm, gotta sleep on that one. There are so many steps to show... maybe I can dream up some smart solution during the night.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Positioned sketch

Post by NormandC »

DeepSOIC wrote:I honestly don't know, what program you are talking about.
If you were not kidding, it's CATIA (V5) by Dassault Systèmes. Widely used in aerospace and automobile/transportation industries, possibly other fields. Not so much in small & medium businesses because of its insane price (I believe it's the same with its competitor Siemens PLM NX).
Pauvres_honteux wrote:The big french program have this
Let's not copy too much that program, shall we... I understand that people would like FreeCAD to behave or have the same features as the commercial programs they're familiar with, it's just human nature and I myself have been guilty of it. ;) But FreeCAD needs to find its own way. :)
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Positioned sketch

Post by Pauvres_honteux »

@DeepSOIC
... had to reinstall my computer due to broken graphics driver updating mechanism...
But here I am with the open source driver Nouveau, while not as snappy as the proprietary driver, at least it doesn't brake the whole computer after a kernel update!

The sketch support DatumPlane and its DatumPoint:
1) Create a DatumPoint and set its coordinates to X=5, Y=10, Z=15.
2) Create a DatumPlane1 connected to that DatumPoint and make it parallel to YZ plane.
3) Create yet another DatumPlane2 through the DatumPoint and make it parallel to XZ plane.
4) Create sketch1 connected to DatumPlane1. It automagically snaps to the DatumPoint. Make a circle according to picture "Circle1.png". Pad it to 10mm in negative X-direction.
5) Create sketch2 connected to DatumPlane2. It automagically snaps to the DatumPoint. Make a circle according to picture "Circle2.png". Pad it to 10mm in negative Y-direction.
Circle1.png
Circle1.png (35.94 KiB) Viewed 3321 times
Circle2.png
Circle2.png (37 KiB) Viewed 3321 times
Happy days! Save and close the program.
Wait a few seconds, open the program and open your precious micro experiment and ... drum roll... and total disaster!
Now the DatumPoint is at x=0, Y=0, Z=0. The DatumPlanes are twice the distance from the DatumPoint as the DatumPoint itself would have been from the overall centre. The two pads are the same and originates from the same sketch. The sketches themselves have moved twice the distance (in both directions) from the original position (before saving and closing).

It seems all connections are lost? Anything to do with Topological naming?

OS: "openSUSE Leap 42.1 (x86_64)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8577 (Git) (Packman)
Build type: Release
Branch: master
Hash: c833136cde65b90bdc2809c3022afdfa4a3a4bb6
Python version: 2.7.12
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18-dev
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Positioned sketch

Post by DeepSOIC »

Thanks, so far I see only one bug. The coordinates of free-floating datum point are lost on save->restore.
1. New body
2. Datum point. Just click OK, and accept warning dialog.
3. Select Datum point, and edit its Placement property.
4. Save file
5. Load file
-> Placement of point is zero, and the point itself is at the origin.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Positioned sketch

Post by DeepSOIC »

Actually, I see a similar but slightly different problem of Part Vertex primitive. Except, there, the vertex is displayed in the right place after save->load, but properties of Vertex say otherwise (all zero, both Vertex.Placement.Base.XYZ and Vertex.XYZ). Changing any of them causes the point to update to become compliant with zero-value properties.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Positioned sketch

Post by Pauvres_honteux »

Fair enough, now try to change the position of the point. It moves but what was suposed to be connected to it doesn't move.
Post Reply