parametric pants

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

parametric pants

Post by looo »

This is a project I had in my mind for a long time. Several attempts lead to no result but finally, I was able to do so with the help of assembly3 (placing sketches at points created by a "master-sketch", lattice2 to extract geometry in a parametric way. The creation of patterns and additional modifications (seam-allowances, pockets) are not done in a parametric way. But I am totally happy everything was doable with FreeCAD. And the work with Draft-workbench was a really enjoyable adventure. I was used to a very buggy experience (py3) from the last attempts, but this time there was no crash at all :o .
The real result is also already wearable, but still has some small issues which will be optimized in the next generation and due to the parametric geometry definition and the intuitive work with the draft module, I am already looking forward to this.

So thanks everyone involved in this project. Keep on doing this great work!
Bildschirmfoto von 2019-11-14 15-06-57.png
Bildschirmfoto von 2019-11-14 15-06-57.png (67.13 KiB) Viewed 2812 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: parametric pants

Post by vocx »

LOL.

My first thought was just LOL.

Amazing! Parametric pants.

When I think of parametric clothing the first thing that comes to mind are running shoes, for athletes, footballers, basketballers, and the like.

Is there a huge variation with pants? On first impression I think having parametric dress shirts would be more important. I feel that people tend to vary in arm length, torso size, belly, etc., more than they do with their legs, where basically the waist size is the critical part.
looo wrote: Sun Nov 17, 2019 4:05 pm and the intuitive work with the draft module,...
How did you use the Draft Workbench? I feel in the forum the Draft workbench doesn't get a lot of love, because most people are doing product design so they go for Sketcher and PartDesign. I tell people Draft is not a substitute for Sketcher, it's a different concept, more like traditional Autocad drafting.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: parametric pants

Post by looo »

vocx wrote: Sun Nov 17, 2019 5:21 pm
When I think of parametric clothing the first thing that comes to mind are running shoes, for athletes, footballers, basketballers, and the like.

Is there a huge variation with pants? On first impression I think having parametric dress shirts would be more important. I feel that people tend to vary in arm length, torso size, belly, etc., more than they do with their legs, where basically the waist size is the critical part.
Whatever makes sense to you, I don't care much, for me it makes sense. :D
vocx wrote: Sun Nov 17, 2019 5:21 pm How did you use the Draft Workbench? I feel in the forum the Draft workbench doesn't get a lot of love, because most people are doing product design so they go for Sketcher and PartDesign. I tell people Draft is not a substitute for Sketcher, it's a different concept, more like traditional Autocad drafting.
Autocad-like tools are still used everywhere. So Draft-workbench is definitely useful.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: parametric pants

Post by triplus »

Nice!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: parametric pants

Post by bernd »

What do you need the mesh for?
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: parametric pants

Post by microelly2 »

what is your workflow to get the subfaces which are developed to the planar pieces?
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: parametric pants

Post by looo »

bernd wrote: Fri Nov 22, 2019 9:48 am What do you need the mesh for?
As you cannot unwrap the pants in a direct way (doubled curved sections) there is a need for a "as good as possible" unwrapping which is done with the unwrap tools from mesh-design workbench. It's a very simple FE-method which minimize the total deformation energy introduced by the flattening process (with some assumption of the material behaviour) Similar to other FE-methods a mesh is the basic representation of the geometry upon which the differential-equation is formulated.
microelly2 wrote: Fri Nov 22, 2019 10:07 am what is your workflow to get the subfaces which are developed to the planar pieces?

Workflow is like this:
1. create center bspline. (A 3d-curve would be best, but I used only a sketch)
2. create vertical sections (another sketch)
3. create intersections (points by boolean fragment) *1
4. create sketches of the profiles at the given intersections (by measuring body + adding some amount of extra lengths) *1
5. create assembly and put all part-containers into the assembly
6. align all profiles (2 times point-on-axis for every profile-section)
7. solve and additionally add an angle (if needed, I didn't do this, but afterward realized that the upper back should be longer than the upper front, therefore the uppermost profile-sketch should be rotated a bit)
8. use a simple skript to get part-shapes from an assembly in a parametric way *2
9. create loft of the extracted profiles
10. cut the loft into front and back (boolean-fragments)
11. join all fron and all back faces with lattice2 parametric subelements
-------------- until here everything should be parametric------------
11. go to mesh-design and create mesh with netgen
12. unwrap mesh
13. use the patterns to design the pockets (maybe it's also possible to do this in 3d but I don't think this is absolutely necessary)
14. add seam-allowences (This needs a lot of thinking if you are not used to textil work)

*1 every object used for the assembly is placed inside an part-container.
*2

Code: Select all

import FreeCAD as app
import FreeCADGui as gui

class ProxyAssemblyPart(object):
    def __init__(self, obj, part_container):
        obj.addProperty("App::PropertyLink","part_container","assembly","linked part").part_container = part_container
        obj.Proxy = self

    def execute(self, fp):
        # assume there is only one shape in part!
        fp.Shape = fp.part_container.Shape
        fp.Placement = fp.part_container.Placement

def make_assembly_shapes():
    assembly = gui.Selection.getSelection()[0]
    for part_container in assembly.Group[2].Group:
        assembly_part = app.ActiveDocument.addObject("Part::FeaturePython", "assembly_part")
        ProxyAssemblyPart(assembly_part, part_container)
        assembly_part.ViewObject.Proxy = 0
    app.ActiveDocument.recompute()
Post Reply