Does anyone know how to mace a circle with:
DraftGeomUtils.circleFrom1tan2pt ?
The python help doesn't indicate type or units:
circleFrom1tan2pt(tan1, p1, p2)
Is tan1 a line or point or angle? Degrees or radians? Is it referring to the angle at p1 or p2?
Are p1 and p2 supposed to be vectors?
I've tried:
line, vector, vector
angle rad, vector, vector
angle deg, vector, vector
All to no avail.
The command fails with no error messages.
Thank you much.
circleFrom1tan2pt help?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- wandererfan
- Veteran
- Posts: 6321
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: circleFrom1tan2pt help?
I've never used it, but the source is:
I'd guess (edge,vector,vector).
wf
Code: Select all
def circleFrom1tan2pt(tan1, p1, p2):
if (geomType(tan1) == "Line") and isinstance(p1, FreeCAD.Vector) and isinstance(p2, FreeCAD.Vector):
return circlefrom1Line2Points(tan1, p1, p2)
wf
Re: circleFrom1tan2pt help?
Since it says "geomType" I was wondering if there any chance that its wanting Lines and points rather than Edges and vertices?wandererfan wrote:I've never used it, but the source is:I'd guess (edge,vector,vector).Code: Select all
def circleFrom1tan2pt(tan1, p1, p2): if (geomType(tan1) == "Line") and isinstance(p1, FreeCAD.Vector) and isinstance(p2, FreeCAD.Vector): return circlefrom1Line2Points(tan1, p1, p2)
wf
Jim
- wandererfan
- Veteran
- Posts: 6321
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: circleFrom1tan2pt help?
Don't think so. It doesn't like Draft Features.jmaustpc wrote:Since it says "geomType" I was wondering if there any chance that its wanting Lines and points rather than Edges and vertices?
>>> l = App.ActiveDocument.Line
>>> p = App.ActiveDocument.Point
>>> p1 = App.ActiveDocument.Point001
>>> x = DraftGeomUtils.circleFrom1tan2pt(l,p,p1)
>>> print x
None
Re: circleFrom1tan2pt help?
All those circle functions at the end of DraftGeomUtils were half-implemented a long time ago by a guy who never totally finished the job... so i'm afraid several are not functionning properly