Draft PathArray on a Part container fails

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
Post Reply
Raph82
Posts: 17
Joined: Mon Feb 09, 2015 2:07 pm

Draft PathArray on a Part container fails

Post by Raph82 »

Hello,

I just tested the Draft workbench PathArray function with a Part container. It does not show anything. If fails with this in the Report view:

Code: Select all

Running the Python command 'Draft_PathArray' failed:
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Draft/DraftTools.py", line 4772, in Activated
    self.proceed()
  File "/usr/lib/freecad-daily/Mod/Draft/DraftTools.py", line 4786, in proceed
    Draft.makePathArray(base,path,defCount,defXlate,defAlign,pathsubs)
  File "/usr/lib/freecad-daily/Mod/Draft/Draft.py", line 1254, in makePathArray
    if len(obj.Base.ViewObject.DiffuseColor) > 1:

'Gui.ViewProviderDocumentObject' object has no attribute 'DiffuseColor'
I've just started using PathArray, so I might be doing something wrong. My first try with a Part Cube did show the expected result though.

Does PathArray work with a Part container?
If it does, how do I make it work?
If it does not, any suggestions as to alternative workflows? Obviously I could use PathArray on individual parts. I was hoping to use it only once on a group of objects instead.
Also, should I submit a bug to the bugtracker?

Anyway, thanks for your time!

FreeCAD version information:
OS: Linux Mint 18.2 Sonya
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.18.14111 (Git)
Build type: None
Branch: master
Hash: 548f63fd0eb554bb0fe5b23c1970de5fe05e3001
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Attachments
Échafaudage 2018-07-25.fcstd
(153.12 KiB) Downloaded 37 times
Raph82
Posts: 17
Joined: Mon Feb 09, 2015 2:07 pm

Re: Draft PathArray on a Part container fails

Post by Raph82 »

By the way, selecting multiple objects before the path then clicking on the PartArray icon does not produce an array of these objects along the path. Seems like one of the object is used as a path.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Draft PathArray on a Part container fails

Post by TheMarkster »

Looks like draft path array does not work with Part containers as the base.

As a workaround you can make a compound out of the individual objects and use it as the base for the path array.

Select the objects, from Part Workbench Part menu -> Compound -> make compound.
Post Reply