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()