FreeCAD Part Scripting in Python Episode 025

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

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

  • @lukealchinsmith
    @lukealchinsmith 9 месяцев назад +8

    You, Sir, are criminally under-subbed. High production quality, easy to understand, highly educational, warm demeanor, and most importantly - pleasant to listen to.

    • @betterenlightened
      @betterenlightened  9 месяцев назад

      Thank you, @lukealchinsmith. Please share; perhaps there are others out there that would enjoy these videos!

  • @rickhoro
    @rickhoro День назад +1

    You have an incredibly engaging presentation style and I really appreciate how you explain why you do each code step and the changes along the way.

    • @betterenlightened
      @betterenlightened  День назад

      Thank you @rickhoro. I appreciate the positive feedback!

  • @seanbosse
    @seanbosse Месяц назад +1

    Definitely a hidden gem of a channel. Thank you for this. Can't believe you dont have a 100k+ subs. The algo will eventually catch on. Keep up the great work!

  • @Gabriel_CeS
    @Gabriel_CeS 8 месяцев назад +1

    I truly enjoyed your video-thank you! I wish you success. Your emphasis on the journey of learning and implementing to achieve a goal deeply resonated with me. The excellent visualization of each step, the well-paced delivery, and compelling storytelling were particularly noteworthy. I look forward to more of your content here.

  • @justinahrens1868
    @justinahrens1868 9 месяцев назад +3

    Thanks for your video! Perfect timing for me as I am working on some python driven tools for FreeCad and this video gave me some other approaches to try. Thanks!

    • @betterenlightened
      @betterenlightened  9 месяцев назад

      I’m glad you found it helpful @justinahrens1868

  • @slaesh
    @slaesh 7 месяцев назад +1

    well done arif, nice video! :) didnt know freecad could do this. one hint, maybe create variables for your tolerances, aka as "fit-gaps". so you have one place to adjust them and do not repeat them everywhere ;)

    • @betterenlightened
      @betterenlightened  7 месяцев назад

      Thanks for the feedback @slaesh! I'm glad you discovered something.
      Your hint intrigues me; in the code I create a "fitgap" dictionary: f{"tight"=A, "close"=B}, then reference it in various parts of the code: f["tight"] or f["close"] to represent the values A, and B respectively. This way, I only adjust the value in the dictionary, then call the dictionary wherever I need that value; just like a variable. I have defined a few different fitgaps, so it's the same as using multiple variables, but arguably packaging them in a dictionary can be cleaner way of doing it, especially since the specific value I an assigning to the fitgap is not a single value, rather its a 3D vector, each of which has x, y, and z "properties".
      So I'm thinking I need some help to better understand your hint; is there a cleaner, more clever, way to do this?

    • @slaesh
      @slaesh 7 месяцев назад +1

      @@betterenlightened I did not watched it fully, good to know you did it already! :) I just saw here and there same values "hard-coded".. like "Vector(0.4, 0.4, 0.16)" .. which was the half of your fitgap values :) or in some places, at least at the beginning were additions x+0.8, y+0.8 and so on.. but if you had this in mind, ignore my comment ;) great stuff anyways, keep on! in general it looks quite complicated.. everytime loading these python scripts.. did you used OpenSCAD yet?

    • @betterenlightened
      @betterenlightened  7 месяцев назад

      Thank you @slaesh - yes, the FreeCAD user interface leaves much to be desired when it comes to loading and running these Python scripts; I wish there was a simpler way to do it. I am aware of OpenSCAD but I have not yet tried it. I started with FreeCAD because I needed to familiarize myself with 3D modelling the traditional way before scripting it in code. Do you think OpenSCAD is more appropriate to use for script-based 3D modelling than FreeCAD?

  • @chickengoatfish
    @chickengoatfish Месяц назад +1

  • @mitchellquinn
    @mitchellquinn 5 месяцев назад +1

    Hmm. Thank you; this may actually make FreeCAD usable for me.

    • @betterenlightened
      @betterenlightened  5 месяцев назад

      I’m glad you found this useful @mitchellquinn.

  • @MarkusRoleke
    @MarkusRoleke 5 месяцев назад +1

    Hey, great video. C
    an you share the python scripts?

    • @betterenlightened
      @betterenlightened  5 месяцев назад

      Thanks for the suggestion @MarkusRoleke, I have been considering it. Let me publish my next video, after which I will choose a suitable method for sharing.

  • @cahenr5045
    @cahenr5045 8 месяцев назад +1

    Hi, Rafiq: at 38:23 you included one more argument in BeBox (line 126), but I can't see any modification at BeBox class to support this new argument ([FreeCAD.Vector(12, 12, 0)]). I follow all the process repeating same script into Freecad and stopped in this moment of the video as Freecad returned a message that the BeBop class does not support 4 arguments. I can see that BeFlat is not being called too. I suppose there are some modifications on BeBox class that you did not put into video. Am I wrong?

    • @betterenlightened
      @betterenlightened  8 месяцев назад +1

      You're absolutely correct @cahenr5045! It seems I skipped that explanation in the video; thank you for catching it. The original BeBox() class creates the object by defining a "list" of edges, then creating a "wire" out of it, from which a "face" is created and then "extruded". Those commands in BeBox() are replaced with a call to BeFlat(), using the WSD, ESD, END and WND vertices and the JOINTS "list" which define the curvature of each vertex. Of course, the additional argument to accept the JOINTS "list" is also added as an optional parameter to the BeBox() class which simply gets passed to BeFlat(). I may have to include this explanation in my next video! :)

    • @cahenr5045
      @cahenr5045 8 месяцев назад +1

      @@betterenlightened Thanks, I will wait for it!

    • @betterenlightened
      @betterenlightened  7 месяцев назад +1

      Hi @cahenr5045, the latest episode is now up. I cover this discussion at around the 48:16 mark. ruclips.net/video/JL-Li1j0gow/видео.html

    • @cahenr5045
      @cahenr5045 7 месяцев назад +1

      @@betterenlightened thank you!

  • @rickhoro
    @rickhoro День назад

    Arif, do you have the code somewhere for download? Thanks again.

    • @betterenlightened
      @betterenlightened  День назад

      @rickhoro, I’ve been considering some options on how to share the code. I will strive to make this available soon - stay tuned.

    • @rickhoro
      @rickhoro День назад

      ​@@betterenlightened Thanks, that would be very helpful. The video is great as an overview of how to think through a design with the FreeCAD API, but there are so many details that it's really not feasible to understand them all without being able to open the code in VS Code or some other code editor. GitHub, perhaps? Or maybe just post it on a free cloud service in the mean time, which would be very simple to do. Any of the LLMs will list out free cloud services.

  • @Ritojunior
    @Ritojunior 9 месяцев назад

    Impressive! Can I get a shout out? Hehehe

    • @betterenlightened
      @betterenlightened  9 месяцев назад

      Thanks for the comment, @Ritojunior. What projects are you working on?