The attached code tries to improve the Draft_PointArray command.
Currently the point object is restricted to 3 object types. With the new code any object with a shape and vertices (f.e. a Part_Box) can be used, as well as a mesh and a point cloud.
Point cloud example:
https://forum.freecadweb.org/viewtopic. ... 41#p524233
The new code also fixes this issue:
https://forum.freecadweb.org/viewtopic.php?f=23&t=59359
Target locations of the files:
Mod/Draft/draftguitools/gui_pointarray.py
Mod/Draft/draftmake/make_pointarray.py
Mod/Draft/draftobjects/pointarray.py
For testing: New point array code
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
For testing: New point array code
- Attachments
-
- gui_pointarray.py
- (6.27 KiB) Downloaded 37 times
-
- make_pointarray.py
- (7.12 KiB) Downloaded 34 times
-
- pointarray.py
- (9.36 KiB) Downloaded 32 times
Re: For testing: New point array code
@yorik Please let me know if this is OK with you. Judging by the number downloads there is not a lot of interest.
Re: For testing: New point array code
Firstly, many thanks for your highly regarded contribution to the forum
I am very interested in testing FC. This is my best hobby…
Sorry to be slow in responding… I have never used the draft point array before. I have been studying it.
Now, I feel comfortable using Draft PointArray.
I have deleted an earlier post (I misunderstood part of the issue) and now I am re-posting with better understanding
I have saved your model to “Draft_PointArray-R2.FCStd” and attached a copy.
I was able to reproduce the Error (Image 1 - Before patching with the 3 new files you have listed)
I have created a variety of separate solids (Image 2) and different shapes (all extruded using Trimex):
- Extrusion
- Extrusion001
- Extrusion002
- Fusion (Box & Box001)
One observation, Changing the Sphere colour will not be reflected into the produced arrays (it is not parametric). It does not matter => hide the object (Extrusion002) => right click for the Context menu => Appearance ==> Shape Color to change the color => Close (Image 3)
Alternatively, Set the color of the Sphere before applying Draft_PointArray
- Attachments
-
- Draft_PointArray-R2.FCStd
- (61.27 KiB) Downloaded 25 times
-
- Image 1.jpg (527.65 KiB) Viewed 1105 times
-
- Image 2.jpg (559.17 KiB) Viewed 1105 times
-
- Image 3.jpg (545.19 KiB) Viewed 1105 times
Re: For testing: New point array code
Thanks for testing.
The color issue you mention is the 'normal' behavior for non-Link arrays. They have their own (point, line, shape) color settings. Upon creation they receive the colors from their base object, but there is no dynamic link. If you want that should use Link arrays, in this case Draft_PointLinkArray.
The color issue you mention is the 'normal' behavior for non-Link arrays. They have their own (point, line, shape) color settings. Upon creation they receive the colors from their base object, but there is no dynamic link. If you want that should use Link arrays, in this case Draft_PointLinkArray.
Re: For testing: New point array code
Related PR has meanwhile been merged:
https://github.com/FreeCAD/FreeCAD/pull/7597
https://github.com/FreeCAD/FreeCAD/pull/7597