help on sheet metal script

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: help on sheet metal script

Post by chrisb »

Looks good, but I would not like to see the dashed line cluttering the tree, if possible I would rather see it as a property "ShowDashedLine" or similar set to true or false.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Post by easyw-fc »

jaisejames wrote: Thu Jun 21, 2018 5:30 am One suggestion or Idea. During unfold, bend is created. we can also create a bend line & append it to new compound. show it as another item.
Hi @jaisejames
this would be a very useful feature...
We have a thread about this request:
https://forum.freecadweb.org/viewtopic. ... 31#p229621
and there are some more info here
https://github.com/shaise/FreeCAD_SheetMetal/issues/33

I agree with @chrisb that it also would be useful to have the option to choose if the line is dashed or not. When giving it to bending machine, normally they ask for non dashed line.

Thx a lot for having a look at :D
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Does anyone have an idea how to accomplish that without clogging the tree view with extra items?
What happens if I add extra dummy edges to the model? will it work?

shai
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Post by easyw-fc »

shaise wrote: Thu Jun 21, 2018 8:37 am What happens if I add extra dummy edges to the model? will it work?
Hi @shaise
it would be nice if the unfolding algo would produce also 2 sketches:
  • the first with the external outline of the unfolded part (the blue sketch)
  • the second with the bending lines (generated in the middle of the bend) (the white sketch)
That could work without adding any extra dummy edges to the part. The sketches can be generated when the Unfold button is clicked, and will not be linked to the part itself, in the same way in which the Unfold object is not linked to the Bend object.
unfolding-with-sketches.png
unfolding-with-sketches.png (178.04 KiB) Viewed 1692 times
unfolded-with-sketches.FCStd
(16.4 KiB) Downloaded 42 times
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

easyw,

Can you explain what manual steps did you use to generate this example,
also, how can I activate this nice axis thingy on the top right of the image?

shai
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Post by easyw-fc »

Hi shai
shaise wrote: Thu Jun 21, 2018 10:20 am easyw,

Can you explain what manual steps did you use to generate this example,
I used Draft WB, Shape 2D view from Top View.
it can be called by python as Draft.makeShape2DView function(obj, vector_view)

After that, from the Shape2DView you can use 'Draft to Sketch' to create the sketch.
it can be called by python as Draft.makeSketch(shape)

If the Unfolded part could be 'refined' correctly, only external edges would be present to then generate the main sketch.

The bending lines should be instead generated by a smart python code ;)
unfolding-with-sketches-refined.png
unfolding-with-sketches-refined.png (156.91 KiB) Viewed 1673 times
unfolded-with-sketches-refined.FCStd
(17.81 KiB) Downloaded 50 times
shaise wrote: Thu Jun 21, 2018 10:20 am also, how can I activate this nice axis thingy on the top right of the image?

shai
it is the NaviCube
https://forum.freecadweb.org/viewtopic. ... 79#p236405
show-nc.png
show-nc.png (27.62 KiB) Viewed 1673 times
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Great, thanks!
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Hi,

I have started implementing the "show bending lines" feature.
can anyone try the new feature and let me know if it works, before I continue?
(replace the SheetMetalUnfolder.py by the attached one)
The generated projection is a part, not a sketch. It looks like if I try to unfold by selecting a standing wall as a seed to unfold, the outcome projection can not be converted to sketch (I get a c++ error. bug?)

Thanks!
shai
Attachments
SheetMetalUnfolder.py
(63.62 KiB) Downloaded 44 times
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: help on sheet metal script

Post by chrisb »

It seems to work here. I can convert the UnfoldProjection into a Sketch using Draft->DraftToSketch.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
shaise
Posts: 470
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Post by shaise »

Hi chrisb,

Thanks for trying.
Can try selecting different faces for the unfold, then try converting to sketch?

shai
Post Reply