View Issue Details

IDProjectCategoryView StatusLast Update
0003581DraftBugpublic2019-01-24 12:30
Reporterflim Assigned Towandererfan  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
OSWindowsOS Version10 1803 
Product Version0.18 
Target Version0.18Fixed in Version0.18 
Summary0003581: Draft PathArray Align=True not work on custom sketch path
DescriptionIt is OK to create an array of objects on a custom sketch using Draft PathArray, but cannot change the objects alignment to path when changed the PathArray->Align to True.

Forum thread
Steps To ReproduceIn Sketch WB, create a custom Sketch as the path for object array
Switch to PartDesign WB, create a rectangle body.
Switch to Draft WB, select the body and the path sketch, select PathArray, change the Count, then change the Align=True.
Additional InformationFreeCAD Version:
0.18 14555 (Git)
64-bit

Report view
Traceback (most recent call last): File "D:\FreeCAD_0.18.14555_x64_dev_win\Mod\Draft\Draft.py", line 5978, in execute obj.Shape = self.pathArray(obj.Base.Shape,w,obj.Count,obj.Xlate,obj.Align) File "D:\FreeCAD_0.18.14555_x64_dev_win\Mod\Draft\Draft.py", line 6079, in pathArray ns = self.orientShape(shape,path[0],0,pt,xlate,align,normal) File "D:\FreeCAD_0.18.14555_x64_dev_win\Mod\Draft\Draft.py", line 6041, in orientShape lnodes.normalize() # Can't normalize null vector. <class 'Base.FreeCADError'>: Cannot normalize null vector]

Python console
Python 2.7.14 (default, Jan 16 2018, 16:11:42) [MSC v.1800 64 bit (AMD64)] on win32 Type 'help', 'copyright', 'credits' or 'license' for more information. >>> MRU="0" >>> exec(open('D:/FreeCAD_0.18.14555_x64_dev_win/data/Mod/Start/StartPage/LoadMRU.py').read()) >>> App.setActiveDocument("ArrayOnCustomSketch") >>> App.ActiveDocument=App.getDocument("ArrayOnCustomSketch") >>> Gui.ActiveDocument=Gui.getDocument("ArrayOnCustomSketch") >>> Gui.activateWorkbench("PartWorkbench") >>> Gui.activateWorkbench("PartDesignWorkbench") >>> Gui.activateWorkbench("DraftWorkbench") >>> import PartDesignGui >>> FreeCAD.getDocument("ArrayOnCustomSketch").getObject("PathArray").Align = False >>> FreeCAD.getDocument("ArrayOnCustomSketch").getObject("PathArray").Align = True >>>]
TagsDraft
FreeCAD Information

Relationships

related to 0003389 closedwandererfan Using Draft-PathArray on a Sketcher Arc with Align=True results in "Value out of range" 

Activities

flim

2018-09-04 07:03

reporter  

Kunda1

2018-09-04 14:18

administrator   ~0011697

Fixed broken markup in summary

Kunda1

2018-09-04 14:20

administrator   ~0011698

@yorik is this a dupe of 0003389 ?

TheMarkster

2018-10-06 02:29

reporter   ~0011938

I believe this has been fixed with

https://github.com/FreeCAD/FreeCAD/commit/41102edf674bbcdc7c5f9397b0a6df4b6c3f1b9e

flim

2018-10-06 06:33

reporter   ~0011942

No, not exactly. You can try this drawing and change the PathArray -> Draft -> Align to True but no effect.

I am testing version 14928 (Git)
tank.FCStd (71,283 bytes)

TheMarkster

2018-10-06 18:00

reporter   ~0011948

This is very strange. Align = true does have an effect, it causes an exception in the report view, but that's not the strange part. You can temporarily change the rotation of Sketch from 120 degrees to 119 degrees, and it works (except you also need to rotate Sketch001 90 degrees about the Z axis to get the alignment you're looking for). Then you can put Sketch back to 120 degrees and it works.

wandererfan

2018-12-08 01:59

manager   ~0012243

There is a configuration where the alignment calculation produces infinite solutions. See "Gimbal Lock" in Euler angles.

You need to change the Path (rotate around X/Y/Z) and/or the orientation of the Base shape.

Changing Align has no effect because the recompute fails.
tankNewAngles.FCStd (76,258 bytes)
tankNewAngles.png (13,120 bytes)   
tankNewAngles.png (13,120 bytes)   

wandererfan

2018-12-08 18:09

manager   ~0012246

git commit bf3a1fdaa8 improves the handling of the infinite solutions issue.

wandererfan

2018-12-08 18:10

manager   ~0012247

Marking this one as resolved.

Kunda1

2019-01-22 23:47

administrator   ~0012496

@wandererfan can we close this issue as well ?

wandererfan

2019-01-24 12:30

manager   ~0012504

closed

Issue History

Date Modified Username Field Change
2018-09-04 07:03 flim New Issue
2018-09-04 07:03 flim Tag Attached: Draft
2018-09-04 07:03 flim File Added: ArrayOnCustomSketch.FCStd
2018-09-04 14:17 Kunda1 Additional Information Updated
2018-09-04 14:18 Kunda1 Description Updated
2018-09-04 14:18 Kunda1 Note Added: 0011697
2018-09-04 14:20 Kunda1 Relationship added related to 0003389
2018-09-04 14:20 Kunda1 Note Added: 0011698
2018-10-06 02:29 TheMarkster Note Added: 0011938
2018-10-06 06:33 flim File Added: tank.FCStd
2018-10-06 06:33 flim Note Added: 0011942
2018-10-06 18:00 TheMarkster Note Added: 0011948
2018-12-08 01:59 wandererfan File Added: tankNewAngles.FCStd
2018-12-08 01:59 wandererfan File Added: tankNewAngles.png
2018-12-08 01:59 wandererfan Note Added: 0012243
2018-12-08 18:09 wandererfan Note Added: 0012246
2018-12-08 18:10 wandererfan Assigned To => wandererfan
2018-12-08 18:10 wandererfan Status new => resolved
2018-12-08 18:10 wandererfan Fixed in Version => 0.18
2018-12-08 18:10 wandererfan Target Version => 0.18
2018-12-08 18:10 wandererfan Note Added: 0012247
2019-01-22 23:47 Kunda1 Note Added: 0012496
2019-01-24 12:30 wandererfan Status resolved => closed
2019-01-24 12:30 wandererfan Resolution open => fixed
2019-01-24 12:30 wandererfan Note Added: 0012504