help on sheet metal script

Need help, or want to share a macro? Post here!
chrisb
Posts: 27082
Joined: Tue Mar 17, 2015 9:14 am

Re: help on sheet metal script

Postby chrisb » Thu Jun 21, 2018 6:08 am

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.
User avatar
easyw-fc
Posts: 2892
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Thu Jun 21, 2018 7:21 am

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: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Thu Jun 21, 2018 8:37 am

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
Posts: 2892
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Thu Jun 21, 2018 9:32 am

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 636 times
unfolded-with-sketches.FCStd
(16.4 KiB) Downloaded 16 times
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Thu Jun 21, 2018 10:20 am

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
Posts: 2892
Joined: Thu Jul 09, 2015 9:34 am

Re: help on sheet metal script

Postby easyw-fc » Thu Jun 21, 2018 11:05 am

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 617 times
unfolded-with-sketches-refined.FCStd
(17.81 KiB) Downloaded 17 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 617 times
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Thu Jun 21, 2018 12:58 pm

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

Re: help on sheet metal script

Postby shaise » Sat Jun 23, 2018 8:47 pm

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 17 times
chrisb
Posts: 27082
Joined: Tue Mar 17, 2015 9:14 am

Re: help on sheet metal script

Postby chrisb » Sat Jun 23, 2018 8:59 pm

It seems to work here. I can convert the UnfoldProjection into a Sketch using Draft->DraftToSketch.
User avatar
shaise
Posts: 372
Joined: Thu Jun 11, 2015 8:11 am

Re: help on sheet metal script

Postby shaise » Sat Jun 23, 2018 9:04 pm

Hi chrisb,

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

shai