Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by onekk »

Hello, I'm trying to replicate the workflow on:

https://wiki.freecadweb.org/Basic_Part_Design_Tutorial


And I've some difficulties on replicate some passages.

Probably It's my fault as I'm not skilled enough, but I've found at least a couple of missing things:

1) A reference to a file more modern than v0.17, now we are at 0.20 so probably something is changed.
There is a reference at bottom to the 0.17 version file implying that there is also a more updated version.

2) Also linked video are for the old v0.17

Regards

Carlo D.
Last edited by onekk on Thu Nov 10, 2022 12:18 pm, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Roy_043
Veteran
Posts: 8449
Joined: Thu Dec 27, 2018 12:28 pm

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by Roy_043 »

Which passages do you mean exactly?
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by Shalmeneser »

Too much TNP imho.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by onekk »

Roy_043 wrote: Sat Oct 01, 2022 2:53 pm Which passages do you mean exactly?
Select PartDesign NewSketch.svg New Sketch from the toolbar or Part Design menu. Now in sketch edit mode, we do not see the sketched rectangle on the slope. To make it selectable , we switch the combo view to model tab and select the last sketch made (Sketch003) on the sloped plane. Then using the spacebar, make it visible. Next, select the mirror feature above (mirrored001) and again using the spacebar, hide it. Then you should see the sloped rectangle inside the 3D View. You may continue to work with the model tab visible, or switch back to tasks tab. Using the Sketcher External.svg External geometry tool, select the upper and lower horizontal edges of the sloped rectangle. Then, add a new rectangle to the sketch using the Sketcher CreateRectangle.svg Rectangle tool.

As a premise I'm a beginner with PD.

I've approached it as an evolution of my usual "all scripting workflow", with the goal to guess the correct workflow and replicate it with scripting.

I've found this passage is somewhat difficult to follow with GUI, and almost impossible to replicate with scripting, as I'm trying to replicate it in:

https://forum.freecadweb.org/viewtopic.php?f=22&t=72207

But in general as noted by @Shalmeneser it rely on some "old ways" to refer to objects.

I wonder if using "datum planes" or "datum lines"or more recent things could be a viable solution

But the whole question could be only my fault and lack of patience on following directions.

Regards

Carlo D.
Last edited by onekk on Tue Oct 04, 2022 8:55 am, edited 2 times in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Roy_043
Veteran
Posts: 8449
Joined: Thu Dec 27, 2018 12:28 pm

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by Roy_043 »

The tutorial attaches sketches to faces, which is indeed not a good idea while the TNP problem is still around. Keeping in mind it is a tutorial for beginners, and assuming the model stays the same, which changes would you propose? Introducing attachments (for the sketch on the sloped face) or using expressions (trigonometry) are both perhaps too advanced?
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by onekk »

Roy_043 wrote: Sun Oct 02, 2022 5:23 pm ...
As Attachments seems the way to be used instead of "External Geometries" this probably seems to be a good way, I have seen as a totally newbie the "Datum Plane" and the "Datum Line" but I wonder how to use them.

FOLLOWING IS TOTALLY OFF TOPIC:

Do you have some hints about the Scripting part too?

I think, (being totally off topic here), that if a Script that will mimic the GUI will produce a file that is "the same" as using GUI, it will be a good way to automate creation of some tutorials when version change. (An further advance would be adding some code to make automatic screenshots so even the images are automatically created, but this is more a "dream" than a reality, but someone is trying to achieve something similar with MOOC WB https://wiki.freecadweb.org/MOOC_Workbench).


TIA and Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
Roy_043
Veteran
Posts: 8449
Joined: Thu Dec 27, 2018 12:28 pm

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by Roy_043 »

To create the result of the tutorial programmatically you will probably also have to deal with the TNP problem. For example, before attaching a sketch to the sloped face you will have to analyze the existing solid to find out the correct face index of that face, etc.
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by onekk »

Roy_043 wrote: Mon Oct 03, 2022 7:45 am To create the result of the tutorial programmatically you will probably also have to deal with the TNP problem. For example, before attaching a sketch to the sloped face you will have to analyze the existing solid to find out the correct face index of that face, etc.
Thanks, but I have tried to address this problem, not caring too much on the TNP for now, only to obtain a correct solid.

Now I have addressed to make the external Geometry work, hoping to have done a right thing:

https://forum.freecadweb.org/viewtopic. ... 28#p629428

I appreciate if you could see the final FCStd file and see if all is correct and maybe give me some assistance in making a "Scripting PartDesign WB" page, that could be a decent example.

Eventually with some help we could "modernize the code" to port it to "new and more modern workflow".

Thanks having answered and Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by onekk »

Following some discussion in the "Python scripting and macro":

https://forum.freecadweb.org/viewtopic. ... 70#p632170

@edwilliams16 could we continue to discuss here, as it could end in a modified "Basic Part Design Tutorial" with more modern approach.

From the little I could see at a first glance you have used Sketch004 to be a Sketch that contains dimensions and you have used "reference in Expressions"

to the Edge2 and Length Constraints to store and retrieve data fo other operations.

It is more safe than referring to faces? or it is safe enough as you don't modify Skethc004 (shape) and use only the constraints and edge data to model the "final soilid"?

I have put together some code, but I have some problem to make the sketch1 (your Sketch005), how to code the coincident constraints. I have to cheat assigning the coincident point of every lines, bu then delete one constraints and make it coincident with the external geometry.

But it is clearly a cheat, do you have some hints on how to code the constraints in a more elegant way?


EDIT: new code below and in:

https://forum.freecadweb.org/viewtopic.php?f=22&t=72207


More to come.

Regards

Carlo D.
Last edited by onekk on Thu Oct 13, 2022 6:42 am, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Is "Basic Part Design Tutorial" in line with actual Part Design workflow?

Post by edwilliams16 »

I'm not sure how to quantify "safer against TNP" - particularly in this particular model, as it depends on what modifications to the model you would like to be able to make without breaking it with TNP. I can make dimensional changes to the sketches without breaking anything - but that may also be true of the wiki version. But, if I, say, add a fillet to an early sketch, then it typically breaks the model because any external references to it get scrambled.

My proposed modeling flow may not be much more stable than the wiki version, but it has the virtue of being consistent (I believe) with the recommendations of forum experts like @Shalmeneser. It must be confusing to newcomers to be told that the wiki workflow is not recommended.
Post Reply