Draft WB Path Array Align problem (0.18 14495)
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
Draft WB Path Array Align problem (0.18 14495)
I cannot make the pieces align the path, if I change Align to true, an exclamation mark shows on PathArray.
How to make the align work properly?
How to make the align work properly?
- Attachments
-
- TankTracks.FCStd
- (75.84 KiB) Downloaded 67 times
-
- Veteran
- Posts: 5316
- Joined: Thu Apr 05, 2018 1:53 am
Re: Draft WB Path Array Align problem (0.18 14495)
I think there's a bug in the Draft.py, but there are also other issues with your model according to the Dependency Graph, which shows some red arrows indicating links going out of the allowed scope. For example, you have the Pad as the base of the array, when it should probably be the body instead. You also have a link from a sketch in one body to the array as well as the Pad in the other body to the same array. But despite those issues, it looks "okay" once the bug in Draft.py is fixed and once you modify the attachment of Sketch001, but... you probably need to fix those issues or else they will likely cause more problems later.
First, fix what I believe to be a bug. Open a file called Draft.py in a text editor. This file is found at /Mod/Draft/Draft.py within your FreeCAD folder, wherever you have FreeCAD installed. Go to line 6040 and change it from this:
to this:
These two lines of code do essentially the same thing except in the original case it's looking for an exact match to nullv, which is 0,0,0 whereas the proposed change will look for a match within 1e-7 (.000001) tolerance and figure that's close enough to be getting on with. This check is there to prevent attempting to normalize a null vector. The #was if... bit isn't absolutely necessary since it's only a comment, but if you need to change it back later you'll have that as a reference.
Next step is to close and reload FreeCAD in order for it to reload that module you just changed.
Now it "works", but you still aren't getting the result you probably want:
What's needed now is to adjust Sketch001's placement slightly.
First, fix what I believe to be a bug. Open a file called Draft.py in a text editor. This file is found at /Mod/Draft/Draft.py within your FreeCAD folder, wherever you have FreeCAD installed. Go to line 6040 and change it from this:
Code: Select all
if lnodes != nullv:
Code: Select all
if not lnodes.isEqual(nullv,1e-7): #was if lnodes != nullv:
Next step is to close and reload FreeCAD in order for it to reload that module you just changed.
Now it "works", but you still aren't getting the result you probably want:
What's needed now is to adjust Sketch001's placement slightly.
Re: Draft WB Path Array Align problem (0.18 14495)
Thanks for helping on align the pieces.
I am trying to fix my issue but still not get it. Here is the new dependency graph. No matter how I change the structure I still got red line on PathArray.
I am trying to fix my issue but still not get it. Here is the new dependency graph. No matter how I change the structure I still got red line on PathArray.
- Attachments
-
- TankTracks2.jpg (133.3 KiB) Viewed 1739 times
-
- TankTracks2.FCStd
- (49.8 KiB) Downloaded 48 times
Re: Draft WB Path Array Align problem (0.18 14495)
You must not use anything from inside the body, see TheMarkster's remark.
- You should use Body instead of Pad in the PathArray
- You can create a clone of the sketch Path which lies outside of Body and use that as path for PathArray
- I would rather recommend to place the sketch outside of body and create inside a ShapeBinder.
- You should use Body instead of Pad in the PathArray
- You can create a clone of the sketch Path which lies outside of Body and use that as path for PathArray
- I would rather recommend to place the sketch outside of body and create inside a ShapeBinder.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Draft WB Path Array Align problem (0.18 14495)
I see, the path sketch should not within any Body.
Now no more red lines in dependency path, the the bodies are not follow along the path correctly.
Now no more red lines in dependency path, the the bodies are not follow along the path correctly.
- Attachments
-
- TankTracks3.jpg (179.88 KiB) Viewed 1728 times
-
- TankTracks3.FCStd
- (74.16 KiB) Downloaded 44 times
Re: Draft WB Path Array Align problem (0.18 14495)
Unfortunately, creating a PathArray (or any other Draft or Part object) based on a Body makes it "explode" in the dependency graph as shown in your screen capture, but this is a dependency graph bug that has no incidence on the model; if you delete the PathArray, the Body is restored in the graph.
Re: Draft WB Path Array Align problem (0.18 14495)
How to fix the placement of the array objects to match the path?
So it there other way to make array on path without using Draft WB? I running out of idea.
So it there other way to make array on path without using Draft WB? I running out of idea.
Last edited by flim on Mon Sep 03, 2018 9:13 am, edited 1 time in total.
Re: Draft WB Path Array Align problem (0.18 14495)
You can use the lattice2 add-on, but I don't know how to use it.
Re: Draft WB Path Array Align problem (0.18 14495)
You have either to center the Pad to the origin or you attach a DatumPoint to the center of Pad and move the PathArray with the DatumPoints negative coordinates.
- Attachments
-
- TankTracks_cb.FCStd
- (58.63 KiB) Downloaded 50 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Draft WB Path Array Align problem (0.18 14495)
I see. Thank you!