Hi,
is there any common function available to move Z of an Edge to a given value?
I used translate() and minus the original Z value, but that's not sufficient in all cases it seems.
Sometimes there's an ARC with a floating point inaccuracy.
Vector (46.298862999999955, -58.933671553031985, -7.100000000000369)
(the last one should be -7.1 and nothing else)
But that seems to be enough to make eg. Part.__sortEdges__ fail on my side.
I even had following situation:
return [Part.Wire(e) for e in EdgeList] -- fails (and listing the edges showed up floating point inaccuracies as well)
return [Part.Wire(EdgeList)] -- succeeds (listing clearly showed up that everything was ok)
----
Update:
__sortEdges__ seems to be very troublesome, I have replaced it with a function that allows some tolerance and it's fine now.
In my case __sortEdges__ sometimes even decreased the number of Edges inside the list (from 18 to 9 for some reason).
My problem is solved.
Modifying Z of an Edge
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Modifying Z of an Edge
You could try to round the values, maybe using python round functions, with enough decimals:
https://docs.python.org/3.9/library/fun ... ound#round
Regards
Carlo D.
https://docs.python.org/3.9/library/fun ... ound#round
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/