For testing: New point array code

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

For testing: New point array code

Post by Roy_043 »

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
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
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: For testing: New point array code

Post by Roy_043 »

@yorik Please let me know if this is OK with you. Judging by the number downloads there is not a lot of interest. :mrgreen:
User avatar
Palmtree
Posts: 104
Joined: Wed Apr 08, 2020 5:06 am

Re: For testing: New point array code

Post by Palmtree »

Roy_043 wrote: Wed Sep 21, 2022 11:35 am Judging by the number downloads there is not a lot of interest. :mrgreen:
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)
Congratulations, it works well. :) :D

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
Image 1.jpg (527.65 KiB) Viewed 1105 times
Image 2.jpg
Image 2.jpg (559.17 KiB) Viewed 1105 times
Image 3.jpg
Image 3.jpg (545.19 KiB) Viewed 1105 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: For testing: New point array code

Post by Roy_043 »

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.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: For testing: New point array code

Post by Roy_043 »

Related PR has meanwhile been merged:
https://github.com/FreeCAD/FreeCAD/pull/7597
Post Reply