hoiw to reuse sketches

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
microelly2
Posts: 4329
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

hoiw to reuse sketches

Postby microelly2 » Sun May 18, 2014 12:06 pm

I want to reuse a sketch on a place where the part design::pattern features can not be applied.

If I make a clone of the sketch an try to pad it, it does not work with this message:
Please create a sketch or 2D object first
However lofts can be created with sketches and clones of sketches.
I do not wish to make a copy of my sketch because I then lose the dependency to the lenght constraints.
Is there a trick or is it a easy to implement feature request?

thank in advance.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: hoiw to reuse sketches

Postby NormandC » Sun May 18, 2014 12:50 pm

microelly2 wrote:I do not wish to make a copy of my sketch because I then lose the dependency to the lenght constraints.
I don't understand that statement.

When copy-pasting a sketch (Ctrl+C / Ctrl+V), everything in it is duplicated. You should lose nothing...
User avatar
bejant
Posts: 5810
Joined: Thu Jul 11, 2013 3:06 pm

Re: hoiw to reuse sketches

Postby bejant » Sun May 18, 2014 12:54 pm

I select the Sketch from the tree view then use Ctrl +C (or Edit -> Copy), click No in the pop-up about copying dependent objects too, then Ctrl +V (or Edit -> Paste). After this you need to use the Map Sketch to Face tool.
User avatar
bejant
Posts: 5810
Joined: Thu Jul 11, 2013 3:06 pm

Re: hoiw to reuse sketches

Postby bejant » Sun May 18, 2014 12:56 pm

Sorry, Norm posted in the meantime...as he said the Constraints will be copied too, but of course you'll have to Edit the Sketch to see them
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: hoiw to reuse sketches

Postby NormandC » Sun May 18, 2014 12:58 pm

Unless microelly is talking about length constraints placed against reference geometry. After you remap the copied sketch that would of course create trouble.
jmaustpc
Posts: 9558
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: hoiw to reuse sketches

Postby jmaustpc » Sun May 18, 2014 1:36 pm

microelly2 wrote:I do not wish to make a copy of my sketch because I then lose the dependency to the lenght constraints.
Is there a trick or is it a easy to implement feature request?
Hi microelly2
do you mean that if you copy paste or duplicate a sketch then they become independent sketches, i.e. the copies not linked to any changes in a constraint of the original?

For example lets say your sketch has just a circle with a 10mm radius...you copy it, now you have two sketches with each 1 circle 10mm diameter.....then you decide to change to 12mm....with copy/paste you would have to open each copy and also change it after you changed the original...so you could not make one simple change in one place and have all sketches update.

The only way I know to do that is to use Draft Clone or similar tools...if possible use it on the result of the sketch (I mean the solid created from it) rather than the sketch itself, and use mostly non-PartDesign tools....thus making independent solids and then Booleans as needed.

Something like this where all the cylinders are the same diameter but their placements and lengths vary.
clonesketch.png
clonesketch.png (127.57 KiB) Viewed 2607 times

here is the file
clonesketch.fcstd
(12.65 KiB) Downloaded 27 times


Jim
User avatar
microelly2
Posts: 4329
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: hoiw to reuse sketches

Postby microelly2 » Sun May 18, 2014 3:48 pm

thank you all.
I think i will follow Jim's idea. The use of Part Extrusion on a clone works fine
and I can change the size constraints in my sketch whenever I want.

However a problem still remains.
When I change the size of the underlining part (example increase the height)
then I have to move my clones/extrusions by hand too:
A nice property of a sketch was that it moves with the underlying face.
When I modify the underlying geometry the sketch/feature moves accoring to the connected external geometry

Is there something like the "Copy Location Constraint" in blender or another trick?
jmaustpc
Posts: 9558
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: hoiw to reuse sketches

Postby jmaustpc » Mon May 19, 2014 12:32 am

microelly2 wrote:However a problem still remains.
When I change the size of the underlining part (example increase the height)
then I have to move my clones/extrusions by hand too:
A nice property of a sketch was that it moves with the underlying face.
When I modify the underlying geometry the sketch/feature moves accoring to the connected external geometry

Is there something like the "Copy Location Constraint" in blender or another trick?
The general answer is probably the Assembly wb when the branch is generally available.

There are various ways for specific situations, like if the layout has some sort of regular spacing to the layout, you can use Draft Arrays of Arrays e.g. polar array of lineal array etc., or a draft Path Array

If there is nothing regular about placements then at least you can multi-select then go to edit menu and run Placement tool but tick relative mode, then you can for example move them all 10mm in some direction manually.

Or in the Part wb you can create a compound or a fuse of a group of objects then their placement can be set manually for the whole group while retaining their individual local relative placement.
jmaustpc
Posts: 9558
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: hoiw to reuse sketches

Postby jmaustpc » Mon May 19, 2014 12:40 am

Part WB compound is available from the Part menu.

A part Fuse of non intersecting solids is actually a compound underneath.

The difference at a FreeCAD level is that a compound will not effect the appearance of the objects, where as a fuse will make all the colours of the objects the same.
jmaustpc
Posts: 9558
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: hoiw to reuse sketches

Postby jmaustpc » Mon May 19, 2014 12:55 am

jmaustpc wrote:If there is nothing regular about placements then at least you can multi-select then go to edit menu and run Placement tool but tick relative mode,
When I wrote the above, I was referring to the tick box "Apply incremental changes to object placement" towards the bottom of the edit menu, placement tool. :-)
placementincremental.png
placementincremental.png (32.17 KiB) Viewed 2578 times