Search found 27 matches

Go to advanced search

by mrrclb48z
Tue May 15, 2018 1:13 pm
Forum: Python scripting and macros
Topic: how to? (Check geometry-->macro-->makeText)
Replies: 1
Views: 97

how to? (Check geometry-->macro-->makeText)

how to? (Check geometry-->macro-->makeText) Thank you in advance and sorry for the bad english! # -*- coding: utf-8 -*- #how to? (Check geometry-->macro-->makeText) import FreeCAD import Part import DraftTools import Draft def myTxtOut(P5x,P5y,P5z,myStr): p5 = FreeCAD.Vector(P5x,P5y,P5z) myText = Dr...
by mrrclb48z
Sat May 12, 2018 4:00 pm
Forum: Python scripting and macros
Topic: I want to find Line-Connection macro
Replies: 1
Views: 99

I want to find Line-Connection macro

Line P0->P1->P2...->PN Which of the 4 should be used? Please tell me the difference. Thank you in advance and sorry for the bad english! Partial Script: h=10 dx1=30*1 dx2=30*2 dx3=30*3 dx4=30*4 Connection1=[[dx1+0,0,h], #0(1) [dx1+h,0,h], #1(2) [dx1+h,h,h], #2(3) [dx1+0,h,h], #3(4) [dx1+0,0,0], #4(5...
by mrrclb48z
Thu May 10, 2018 2:20 pm
Forum: Python scripting and macros
Topic: How to? Text(A=) On FaceP1P2P3
Replies: 1
Views: 165

How to? Text(A=) On FaceP1P2P3

1.where Web? rotate mouse operation Introducing.I want to macro recording 2.How to? macro Thank you in advance and sorry for the bad english! full script : import FreeCAD import Part import DraftTools import Draft import Mesh def myPyramidCal(xIn,yIn,bIn,hIn): x = float(xIn) y = float(yIn) b = float...
by mrrclb48z
Thu May 10, 2018 2:14 pm
Forum: Python scripting and macros
Topic: list indices must be integers, not tuple?
Replies: 3
Views: 382

Re: list indices must be integers, not tuple?

Sorry (expect a sequence of floats or Vector) full script : import FreeCAD import Part import DraftTools import Draft import Mesh def myTetrahedronSld(P1x,P1y,P1z,P2x,P2y,P2z,P3x,P3y,P3z,P4x,P4y,P4z): xDummy=0 yDummy=0 zDummy=0 a =[[xDummy,yDummy,zDummy], [P1x,P1y,P1z], [P2x,P2y,P2z], [P3x,P3y,P3z],...
by mrrclb48z
Tue May 08, 2018 1:36 pm
Forum: Python scripting and macros
Topic: list indices must be integers, not tuple?
Replies: 3
Views: 382

list indices must be integers, not tuple?

What am I doing wrong with the macro? Thanks in advance full script: import FreeCAD import Part import DraftTools import Draft import Mesh def myTetrahedronSld(P1x,P1y,P1z,P2x,P2y,P2z,P3x,P3y,P3z,P4x,P4y,P4z): xDummy=0 yDummy=0 zDummy=0 a =[[xDummy,yDummy,zDummy], #dummy [P1x,P1y,P1z], [P2x,P2y,P2z]...
by mrrclb48z
Tue May 08, 2018 1:32 pm
Forum: Python scripting and macros
Topic: why 1pyramid?(4)array or class
Replies: 4
Views: 253

Re: why 1pyramid?(4)array or class

Thank you. full script: import FreeCAD import Part import DraftTools import Draft import Mesh def myPyramidCal(xIn,yIn,bIn,hIn): x = float(xIn) y = float(yIn) b = float(bIn) h = float(hIn) x2 = x+b*0.5 y2 = y+b*0.5 x3 = x+b y3 = y+b z = 0 z2 = h P1x=x P1y=y P1z=z P2x=x P2y=y3 P2z=z P3x=x3 P3y=y3 P3z...
by mrrclb48z
Mon May 07, 2018 4:04 pm
Forum: Python scripting and macros
Topic: my python version?
Replies: 2
Views: 209

Re: my python version?

Thank you. try this: Python Console---------------------------------------------------------------------------- >>> import sys >>> print(sys.version) >>> sys.version >>> 2.7.8 (default, Nov 17 2014, 20:37:05) [MSC v.1800 64 bit (AMD64)] >>> Report view------------------------------------------------...
by mrrclb48z
Wed May 02, 2018 6:53 am
Forum: Python scripting and macros
Topic: my python version?
Replies: 2
Views: 209

my python version?

my python version? full script : import sys print "123" #out:Report view print sys.version Gui.doCommand("print(sys.version)") Gui.doCommand("sys.version") Gui.doCommand(sys.version) #Traceback (most recent call last): File "C:/xxxx/MyPythonVersion.FCMacro", #line 4, in Gui.doCommand("print(sys.vers...
by mrrclb48z
Wed May 02, 2018 6:42 am
Forum: Python scripting and macros
Topic: why 1pyramid?(4)array or class
Replies: 4
Views: 253

Re: why 1pyramid?(4)array or class

Thank you. full script : import FreeCAD import Part import DraftTools import Draft import Mesh def myPyramidCal(xIn,yIn,bIn,hIn): x = float(xIn) y = float(yIn) b = float(bIn) h = float(hIn) x2 = x+b*0.5 y2 = y+b*0.5 x3 = x+b y3 = y+b z = 0 z2 = h P1x=x P1y=y P1z=z P2x=x P2y=y3 P2z=z P3x=x3 P3y=y3 P3...
by mrrclb48z
Fri Apr 27, 2018 1:39 pm
Forum: Python scripting and macros
Topic: why 1pyramid?(4)array or class
Replies: 4
Views: 253

why 1pyramid?(4)array or class

?1. global name? ?2. I want argument ----> array or class macro---->short source I do not understand Python. Thank you in advance and sorry for the bad english! import FreeCAD import Part import DraftTools import Draft import Mesh def myPyramidCal(xIn,yIn,bIn,hIn): x = float(xIn) y = float(yIn) b = ...

Go to advanced search