FreeCAD Tip - Expressions

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024

Комментарии • 10

  • @CrapE_DM
    @CrapE_DM Год назад +2

    Clicked on this because the thumbnail made me think that it was a video about the differences between using f(x) and =. Then I saw that you were going to do a conditional expression, which I was wondering for a while if FreeCAD could do. Don't know why I didn't just look it up :)
    Thanks for sharing

  • @bmarvin6339
    @bmarvin6339 8 месяцев назад

    Thank you for this easy to follow example. Constraints as expressions of other dimensions is what truly makes FreeCAD a parametric modeler. It seams like 90% of the FreeCAD videos are “for beginners” and only show each constraint being given a fixed constant value. I can make those kind of parts in plain AutoCAD 3D solids that are fixed with the “parameters” determined at original solid primitives creation. Expressions of constraints, in my mind, is what makes FreeCAD a true parametric 3D CAD modeler. Your explanations were very clear and well presented. Also, thank you for referencing the FreeCAD documentation of “expressions”. I wanted a model of a netting gauge that is simply a rectangle where the length is twice the width. A very simple relationship used for making various size nets of different opening sizes for cargo netting in either paracord or elastic cord (bungee cord). Now I have one netting gauge model that can create STL files to print for many netting gauge sizes.

  • @viesic
    @viesic Год назад +11

    You could name original diameter something like: "outside_diameter" and then in other constraints use that name and not numerical value. Something like ".Constraints.outside_diameter * 0.5"

  • @WatchesTrainsAndRockets
    @WatchesTrainsAndRockets 11 месяцев назад +5

    You are doing it the hard way. Just create a Freecad spreadsheet and put all of the dimensions in there. You can use expressions to derive one dimension from another there. That way the sketches, pads, pockets, etc. are always dependent on a single value from the spreadsheet. That way if you need to change the derivation of a given value, it is done in only the spreadsheet. No references need to be touched. In your method, if you have multiple dimensions with the same derivation, each would still have to be changed. Yes, it works, but the spreadsheet method is infinitely more maintainable.

  • @yootoobgoog
    @yootoobgoog 4 месяца назад

    Great example. Exactly what I was looking for. Thanks

  • @ccmoonie
    @ccmoonie Год назад +1

    I enjoyed this. Good stuff!

  • @yuriyyatsyshyn9717
    @yuriyyatsyshyn9717 6 месяцев назад

    Nice work. How about names for size? And use it in formulas.

  • @edderohanes4264
    @edderohanes4264 23 дня назад

    Is there a way to call a constraint's reference name rather than the number. I have a dimension (Constraints[11]) referenced as "H". The expression "Constraints.H*0.25" gives me a "Failed to parse expression" error. I tried it with ".Constraints...." with the same error. It is in the same sketch.