First actual parametric model

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!
Post Reply
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

First actual parametric model

Post by Joel_graff »

So I've been playing around with building a box culvert that's parametric.

It's a bit of a mess, but I tried to follow what appear to be best practices for designing 3D models. If anyone is willing to take some time to look, I'd appreciate feedback on problems with my layout or better ways to have managed the geometry.


box_culvert.fcstd
(114.76 KiB) Downloaded 23 times

Screenshot from 2019-07-07 22-28-13.png
Screenshot from 2019-07-07 22-28-13.png (6.86 KiB) Viewed 709 times
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: First actual parametric model

Post by chrisb »

Some remarks / things I would change:

Dependency graph:
- If you look at the dependency graph, you see several links going out of allowed scope.
- there are sketches and even DatumPlanes and axes outside of bodies, something has been going out of whack here, perhaps due to using several part containers.
Bildschirmfoto 2019-07-08 um 06.16.47.png
Bildschirmfoto 2019-07-08 um 06.16.47.png (78.86 KiB) Viewed 699 times
.

Sketches
- master_alignment: I always try to fully constrain sketches. Especially MasterSketches.
- headwall_sketch: instead of repeating dimensions - albeit by using expressions - I would use equality and possibly a construction line. Instead of using a 95° angle on a -5° reference line I would simply use a horizontl constraint

- master_alignment001: It seems to be nothing more than a copy of master_alignment. I would place the latter outside of all bodies and reuse it.
- other sketches seem to be identical too. You can use clones or - especially if you have to change only small parts of it - CarbonCopy.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
papyblaise
Veteran
Posts: 8002
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: First actual parametric model

Post by papyblaise »

Hello
Like Crisb saids, I have some remarqs
If you need draw a symetrical part , start your first sketch on world repers (XY , XZ or YZ ) it's more aesy to do miror or polar
You are hable to draw all parts in the same body
Whith that I redraw your project (don't respect the mesures) and you can see that the tree is better look (less mess :!: )
Attachments
square pipe.FCStd
(125.26 KiB) Downloaded 14 times
square pipe.PNG
square pipe.PNG (20.35 KiB) Viewed 667 times
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: First actual parametric model

Post by Joel_graff »

chrisb wrote: Mon Jul 08, 2019 4:45 am - If you look at the dependency graph, you see several links going out of allowed scope.
I completely forgot about the dependency graph. Whoops. Will take a closer look.
chrisb wrote: Mon Jul 08, 2019 4:45 am - master_alignment: I always try to fully constrain sketches. Especially MasterSketches.
- headwall_sketch: instead of repeating dimensions - albeit by using expressions - I would use equality and possibly a construction line. Instead of using a 95° angle on a -5° reference line I would simply use a horizontl constraint
Master sketches are kinda bothering me. They appear to be a place to throw all of your dimensions that you might re-use in multiple places elsewhere - which makes sense, as I'd rather have all of my named constraints in one place rather than dispersed throughout multiple sketches which depend upon one another. But then I wonder, why not just use a spreadsheet?

As for fully constraining, I usually do that too... Not sure why I didn't here.
chrisb wrote: Mon Jul 08, 2019 4:45 am - master_alignment001: It seems to be nothing more than a copy of master_alignment. I would place the latter outside of all bodies and reuse it.
- other sketches seem to be identical too. You can use clones or - especially if you have to change only small parts of it - CarbonCopy.
Ok, so the tricky part here was the culvert is mirrored along the horizontal axis. So I simply duplicated the first part and rotated it 180 degrees, rather than build the entire thing as a single part. Not sure if that's a good idea, but I don't see any easier or more effective way to mirror an object...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: First actual parametric model

Post by Joel_graff »

papyblaise wrote: Mon Jul 08, 2019 9:21 am If you need draw a symetrical part , start your first sketch on world repers (XY , XZ or YZ ) it's more aesy to do miror or polar
It wasn't clear to me how to mirror the body along an axis, which is why I broke the box culvert into two parts...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
papyblaise
Veteran
Posts: 8002
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: First actual parametric model

Post by papyblaise »

Hare , miror isn't the right tool : your part is oriented SW , if you miror , it's becam oriented NW , the rigth tool is Polar
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: First actual parametric model

Post by Joel_graff »

papyblaise wrote: Mon Jul 08, 2019 10:35 am Hare , miror isn't the right tool : your part is oriented SW , if you miror , it's becam oriented NW , the rigth tool is Polar
Right. I tried it and got the main body to work, but it seemed to make a mess of the rest of it. Probably because I don't know how to design an object to make good use of polar patterns
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
User avatar
Joel_graff
Veteran
Posts: 1949
Joined: Fri Apr 28, 2017 4:23 pm
Contact:

Re: First actual parametric model

Post by Joel_graff »

So one of the other things I've noted about 3D modeling is that it seems a bad idea to build sketches off of faces. That is, the model is more stable if a sketches built from a shapebinder, which is perhaps derived from another sketch.

In order to accommodate that, I used multiple bodies (though probably not enough) so that I could establish a shapebinder, sketch, and necessary datum plane to make it work.

@papyblaise simply built the entire model basing sketches on faces. My only concern would be changing model parameters (like the skew angle of the culvert or it's dimensions...) and having the model explode...
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails

pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Post Reply