How to use Variables and Equations to Design in FreeCAD|JOKO ENGINEERING|

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 มิ.ย. 2024
  • Download this model:
    grabcad.com/library/freecad-e...
    FREE SolidWorks Certification Course
    alison.com/course/solidworks-...
    Questions?
    jokoengineering
    jokoengineeringhelp@gmail.com
    If there is music in this video, it is legally used.

ความคิดเห็น • 86

  • @dalecooper7218
    @dalecooper7218 5 หลายเดือนก่อน +2

    This bit of python can be added to the python console
    def auto_alias(spreadsheet_name="Spreadsheet"):
    doc = FreeCAD.ActiveDocument
    ss = doc.getObject(spreadsheet_name)
    # Iterate over the rows
    empty_limit = 3
    empty = 0
    for row_id in range(2, 100):
    label_cell_ref = f'A{row_id}'
    label_val_ref = f'B{row_id}'
    try:
    name = ss.get(label_cell_ref)
    value = ss.get(label_val_ref)
    except ValueError as err:
    empty += 1
    if empty_limit >= 2:
    break
    continue
    print(f"{label_val_ref}: {name} ... {value}")
    ss.setAlias(label_val_ref, name)
    doc.recompute()
    aa=auto_alias
    aa()
    This will apply the label in column 'a' as the alias for the value or expression result in column 'b'. I'm looking for a way to add it automatically at launch. It stops as soon as it finds an empty row.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  5 หลายเดือนก่อน

      I'm not a python wizard, but I pinned this in case someone else can support that. Thanks for the handy code here.

  • @joshuaboerger7965
    @joshuaboerger7965 ปีที่แล้ว +6

    WOW. I wish other channels were like this. No discourse. Straight up quick basic and essential instruction. Subbed.

  • @olivierolebowski8671
    @olivierolebowski8671 5 ปีที่แล้ว +18

    Hello, thanks for this video!
    I give you a little trick ... At 2m47s you make a diagonal with 2 lines
    and several constraints !!! An easier way to center the rectangle, is to
    constraint the two corners and the origin with a symmetry constraint !
    (Yes a point can be a center of symmetry between 2 others points in
    FreeCad)
    Procedure: With [Ctrl] hold, select the two corners points and after,
    the origin point, then just apply the symmetry constraint !

  • @Abodroc94
    @Abodroc94 2 หลายเดือนก่อน +1

    THIS is a game changer my sir

  • @Mr76Pontiac
    @Mr76Pontiac 3 ปีที่แล้ว +3

    I wish I knew of this about 5 hours ago when I started to redesign a cartridge holder for my 2600. Retyping the numbers for certain dimensions was a pain. And when you can throw formulas at a spreadsheet.. man... LIKE!

  • @theotherotherBrian
    @theotherotherBrian 4 ปีที่แล้ว +21

    Great tutorial! This seems very useful! Also, I found that aliases can be used for calculations in the spreadsheet as well. When calculating the area, the equation "=width * length" can be used instead of "=B1 * B2".

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  4 ปีที่แล้ว +3

      THIS.

    • @0LoneTech
      @0LoneTech 4 ปีที่แล้ว +1

      Also note that = is the shortcut to enter formulae in fields too, not just the spreadsheet. They use the same expression engine (wiki.freecadweb.org/Expressions ). Incidentally, the button is f(x) for "function of variable", not a sine wave.

  • @wisefix9256
    @wisefix9256 3 ปีที่แล้ว +2

    Loved this tutorial. Clear explanations, short and direct to the point. You are assumed to know just the very basics.
    Suggestion: Use less associated-keystrokes/keyboard-shortcuts and more visually explicit cues (like icons and menus) as many of us newbies are not as familiar with the associated keystrokes/keyboard-shortcuts and visual cues are more consistent with a visually-dominant media like videos.

  • @JohnUllrey
    @JohnUllrey 6 หลายเดือนก่อน

    Thanks! This is a game changing feature, especially for someone who doesn't have any other CAD experience. I run Linux on all my computers at home and have been teaching myself FreeCAD for the past several years, ever since I bought a 3D printer.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  6 หลายเดือนก่อน +1

      Linux is king. Good luck with your projects

  • @michaeldevlin5101
    @michaeldevlin5101 ปีที่แล้ว

    That was great. I'm trying to figure out how to make a parametric tool for making boxes and lids out of sheet metal for bending on a brake, and your videos are helping a lot.

  • @andrewroby1130
    @andrewroby1130 4 ปีที่แล้ว +1

    Great video! This short explanation of parameterization was exactly what I was looking for

  • @Danielresantana
    @Danielresantana 3 ปีที่แล้ว

    Thank you very much, I was able to use the formulas feature in dimensions with the constraints.
    helped me a lot.

  • @MatthiesWesche
    @MatthiesWesche 4 ปีที่แล้ว

    Thank you for this straight forward video!

  • @oliviercador7713
    @oliviercador7713 2 ปีที่แล้ว

    Merci beaucoup c’a m'a permis de faire ce que je voulais !! Thanks you from France.

  • @oakld
    @oakld 6 หลายเดือนก่อน

    You can center a rectangle on a point simply by selecting 2 opposite points and then the center point and applying symmetry constraint. But that's only a small detail. Tis channel is awesome! ❤👏👍

  • @benpracht2655
    @benpracht2655 3 ปีที่แล้ว +1

    Another great video from you. I want to thank you for pointing out the case sensitivity on your functions. It was helpful to see you type in pi as a constant and not a function like I believe Excel treats it. However, you did not cover units. I wanted to be able to specify my values in inches (sorry). I put in 0.75 then specified a unit string of in, and it showed a value of 0.03. I don't know how it got that. But overall, you cover what needs to be said, and usually is not covered. A thousand thank yous.

  • @thefekete
    @thefekete 4 ปีที่แล้ว +1

    Awesome.. I always hated to have MS Office installed just to do this in SolidWorks.. thanks for another great vid!

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  4 ปีที่แล้ว +1

      You're right, I've run into issues with excel and design tables in SolidWorks too. Thanks

  • @federicolopezbervejillo7995
    @federicolopezbervejillo7995 4 ปีที่แล้ว

    Very useful, nice video!

  • @andrewsponer7973
    @andrewsponer7973 2 ปีที่แล้ว

    great video, thanks

  • @lauriehartley9808
    @lauriehartley9808 4 ปีที่แล้ว +2

    Great straight forward tutorial.
    I am a relative newcomer to FreeCAD but when I was working I used quite complex spreadsheets extensively. This therefore opens up a whole new realm of possibilities for me.
    I also find your display theme most pleasing - can you give me a pointer tow where I can find how to set this up. Thanks.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  4 ปีที่แล้ว +1

      Thanks for the comment. I enjoy the 'black'n'green' display. I've done this display not within FreeCAD, but rather on the operating system. I'm running Ubuntu 16.04 and installed the noobslab obsidian theme, which changes the appearance of FreeCAD. Hope that helps

  • @itsbeenmacgyvered5916
    @itsbeenmacgyvered5916 3 ปีที่แล้ว

    Great video.

  • @Baron-digit
    @Baron-digit 3 ปีที่แล้ว

    Uh, that's really neat!

  • @froggysoft
    @froggysoft 3 ปีที่แล้ว

    Thank you so much!!!

  • @steveu235
    @steveu235 3 ปีที่แล้ว

    Thanks makes freecad fun to work with

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @hermansnijders2326
    @hermansnijders2326 5 ปีที่แล้ว +1

    Super!

  • @hesperaux
    @hesperaux 4 ปีที่แล้ว

    Fantastic. I didn't know about this.

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @roguethink
    @roguethink 3 ปีที่แล้ว

    wonderful

  • @jojojorisjhjosef
    @jojojorisjhjosef 2 ปีที่แล้ว

    Thank you so much

  • @airbeast5671
    @airbeast5671 3 ปีที่แล้ว

    crème de la crème of parametric design, big kudos!

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @rpocc
    @rpocc 7 หลายเดือนก่อน

    I'm curious if this Spreadsheet feature can use relative references like R2C[-1] in Excel.

  • @ChazmillsADLT
    @ChazmillsADLT 9 หลายเดือนก่อน

    Older post but very useful. Thanks. The questions are numerous but let’s say you want to prepare a box for a pack of cards with lid, can this spreadsheet dimensions be used?

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  9 หลายเดือนก่อน

      It can be used indeed, but it shouldn't be necessary unless you would like your container to change dimensions frequently

  • @lovizio93
    @lovizio93 3 ปีที่แล้ว

    Very useful video and comments! Quick question here: How do you do the reverse? read values from cad data?, For example I need to read dynamically the dimension of an edge or constrain in the sketch in my spreadsheet

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว +1

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @striveupward
    @striveupward 15 วันที่ผ่านมา

    Excellent! Thank you. Is there a way to reference a previously, automatically-defined constraint (e.g.: Constraint12) in the definition of a second constraint. (without defining a "spreadsheet")? I'm looking for something like: "=Constraints.Constraint12 + 2mm". Blessings.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  14 วันที่ผ่านมา

      Thanks. I have not found a way to do that, but there might be something in the freecad expressions documentation that makes it possible
      wiki.freecad.org/Expressions

  • @ericortolan3048
    @ericortolan3048 3 ปีที่แล้ว

    Very usefull, thank you

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @ahmedhh2652
    @ahmedhh2652 4 ปีที่แล้ว

    Thank you very very much

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html ..💐

  • @tomthompson7400
    @tomthompson7400 3 ปีที่แล้ว

    outstanding

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @penamapena
    @penamapena 3 ปีที่แล้ว

    Thanks for this video sir

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐.

  • @video-carl
    @video-carl 3 ปีที่แล้ว

    Thank you for the video. I've missed a detail about using polylines to constrain the frame sides. When I add a polyline from corner-to-centre-to-corner the polyline isn't attached to the frame. So when I "E" to equal their lengths, my frame dimensions don't change. FreeCAD moves the polyline's centre point away from the frame's centre point instead.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  3 ปีที่แล้ว

      Does this help?
      th-cam.com/video/suFp5-SWSA4/w-d-xo.html

    • @video-carl
      @video-carl 3 ปีที่แล้ว

      @@JokoEngineeringhelp thanks. That did indeed do the trick. Do you still use PolyLine to "square-off" your boxes?

  • @DPTech_workroom
    @DPTech_workroom 3 ปีที่แล้ว

    👍

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html .💐

  • @antoninperbosc1532
    @antoninperbosc1532 3 ปีที่แล้ว

    at 3:07 you draw a diagonal line inorder to constraint this appear in bleu but how under freecad change the look of this line for a bleu tacts line ? i am a catia V5 user since a long time and not be able to have a construct line with tacts or a symetry with dots and tacts damage a lot my brain ! thanks for your help !

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  3 ปีที่แล้ว

      There is a button in the ribbon that toggles construction geometry, the button has a white square with a blue dotted line square behind it.

    • @antoninperbosc1532
      @antoninperbosc1532 3 ปีที่แล้ว

      ​@@JokoEngineeringhelp thanks for your reply Joko yes with this button i can toggle from construction to other type of line, i can do it directly from the task tab too but ... the line style is still the same (plain line and color are still white, green or bleu) no tact / dash/ dot line style and this is not compliant with our cad conventions for axes lines , construction lines ... as freecad use python i am pretty sure that some wherere we can change this line style to be compliant with drawing habits. Have a nice day !

  • @andrey730
    @andrey730 9 หลายเดือนก่อน

    When I'm trying to change values in spreadsheet after 4:11 it doesn't change the sketch - it throws "Recompute Failed" for some reason.

  • @russhensel
    @russhensel 3 ปีที่แล้ว +1

    You video has been referenced on the FreeCad Wiki on a page: '''[wiki.freecadweb.org/Best_Practices_with_SpreadSheets Best Practices with SpreadSheets - FreeCAD Documentation ]'''.
    Your or your viewers may want to take a look at that page and read/evaluate/learn from it. It is a wiki so you can change the page, or comment in its discussion tab. You can message me, the guy who made
    this comment.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  3 ปีที่แล้ว

      Hey thanks I would not have seen this! That's really neat

  • @tomr9113
    @tomr9113 2 ปีที่แล้ว

    In your equations you can use the aliases as well.

  • @dbudnymt
    @dbudnymt 4 ปีที่แล้ว +1

    Love your videos they have helped me immensely. However how can someone use inches in the spreadsheet? Example. I want to have a width and length that can be changed. If the width is 1 than BoxTopWidth is 2.5" (width * 2.5) and the BoxBottomWidth is 2.375" ((width * 2.5) - .125) so that I can assign Spreadsheet.BoxTopWidth and Spreadsheet.BoxBottomWidth to a sketch? Every video I watch assumes metric and it's kinda frustrating.

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  4 ปีที่แล้ว +2

      Hi Doug;
      I'm an inch man myself too, that's my preferred unit. It seems like when I run inches, there is an error in getting an accurate dimension to the part. I think the development side made the sheet only support metric, but that's only speculation on my end.
      What I've settled for is creating the user input on the spreadsheet to be inches, then converting the user input by a factor of 25.4 for a metric part. I haven't been able to get inches to work in any other way so far.
      Hope that helps

    • @dbudnymt
      @dbudnymt 4 ปีที่แล้ว

      @@JokoEngineeringhelp That's what I was afraid of. I was considering just doing a conversion like you suggested but wanted to know if there was another way. Thanks for your help and quick response. Keep up the awesome videos

    • @0LoneTech
      @0LoneTech 4 ปีที่แล้ว

      What sort of error do you get? There should be nearly 16 digits of precision in the calculations (double precision floating point). Inches are literally defined by the metric system, as 25.4mm, but the binary numbers do cause small rounding errors and there may be places those aren't hidden. Notably those errors occur for metric values too, since decimal fractions don't match binary fractions exactly. They just rarely grow to sizes that matter.
      Also, FreeCAD's internal unit conversion means you can enter values in a variety of units. Just put e.g. "2 in" or "5 cm", doesn't matter what your display or default units are (which can be selected in Edit - Preferences - General - Units). Including the unit inside your spreadsheet will help ensure values are used for appropriate fields.

  • @KevinSmith-dx6xq
    @KevinSmith-dx6xq 3 ปีที่แล้ว

    I swear I learned this from another of your videos. You can use the alias in the spreadsheet. area = length * width.

  • @dominicgoodwin1147
    @dominicgoodwin1147 2 ปีที่แล้ว +1

    Is there really no way to automatically assign the alias to a whole range of numbers by refering to the cell immediately to the left, like you can in Excel? That seems a really glaring omission because the process you show lends itself to errors and inconsistencies, as well as being really time consuming.

  • @tomthompson7400
    @tomthompson7400 3 ปีที่แล้ว

    Can I ask a really basic question .. sorry for being a pita , i have made three parts in three separate files , and can open them all from the separate tabs at the bottom of the main window , in freecad 1.8 , but how on earth do i get the three parts into the same window so i can join them to each other ,,, I know this is probably so easy but I cant find a video or anything about how to do it I know its basic day one stuff to you , but a pointer would be appreciated . thanks in advance t

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  3 ปีที่แล้ว +1

      You would join the parts in an assembly. I use the A2+ workbench as my preferred one though there are other options. You can find more information here:
      th-cam.com/video/gV7jK0c7m40/w-d-xo.html
      If you have trouble adding workbenches I have a video on the addon manager that can help.
      Best

    • @tomthompson7400
      @tomthompson7400 3 ปีที่แล้ว

      @@JokoEngineeringhelp hi , i can add work benches ,,ill go watch the video , its got me stumped , but thanks for the time youve taken to reply , ill let you know how it goes

    • @tomthompson7400
      @tomthompson7400 3 ปีที่แล้ว

      @@JokoEngineeringhelp yep seen it , i just cant get the bits from two bottom tabs into the same place ,,, say i make a nut as one piece , , and a washer as a totally separate piece , and have two bottom tabs open , one called nut , and one called washer , for the love of me I cant seem to work out how to get the nut and the washer into the same picture ,,, sorry for being dim .

    • @JokoEngineeringhelp
      @JokoEngineeringhelp  3 ปีที่แล้ว

      @@tomthompson7400 If you're in the A2+ workbench, click the button 'add a part from an external file' and that allows for putting multiple parts in the same environment

    • @tomthompson7400
      @tomthompson7400 3 ปีที่แล้ว

      @@JokoEngineeringhelp off I go again to play ,, many many thanks .

  • @crossthreadaeroindustries8554
    @crossthreadaeroindustries8554 ปีที่แล้ว

    I found a bug - my design file is in inches, I put an inch dimension in the spreadsheet, and FreeCAD interprets it as millimeters. Anyone else see this problem?

  • @steveu235
    @steveu235 3 ปีที่แล้ว

    it seems to be changed with version .19

  • @fandiwidinata2642
    @fandiwidinata2642 3 ปีที่แล้ว

    you indonesia people

    • @beoptimistic5853
      @beoptimistic5853 3 ปีที่แล้ว

      th-cam.com/video/vFDMaHQ4kW8/w-d-xo.html ..💐