Search found 173 matches

by llll
Wed Sep 28, 2022 12:19 pm
Forum: Python scripting and macros
Topic: [solved] Py basics question. reformatting text
Replies: 8
Views: 912

Re: Py basics question. reformatting text

onekk wrote: Wed Sep 28, 2022 8:28 am Probably you are missing "the point".
This is the concept of "Minimal Working Example".
An helper must not guess thing, it has to solve (if possible) problems.
Agreed. it took me 90 minutes to get the point. Still after a solution should someone have the motivation.

ty
by llll
Wed Sep 28, 2022 6:34 am
Forum: Python scripting and macros
Topic: [solved] Py basics question. reformatting text
Replies: 8
Views: 912

Re: Py basics question. reformatting text

. That's all I have + some draft squiggles in file... It shows list problem I wanted help with The eval is used only since idk how to do this: for i in objects: loc = doc.i.Placement? edit: Does it help to know I was playing around with console: first block is only to show second block failure.
by llll
Wed Sep 28, 2022 6:08 am
Forum: Python scripting and macros
Topic: [solved] Py basics question. reformatting text
Replies: 8
Views: 912

Re: Py basics question. reformatting text

Check variables. In 2nd 'for' loop, you use 'lol' which doesn't exist. At the end you print 'place_', which is initialized to empty list then never touch again. A residual error made when posting, srry, was using "lol" as list of lists. newL[num].append(j) == place_.append(j) == same error
by llll
Wed Sep 28, 2022 4:57 am
Forum: Python scripting and macros
Topic: [solved] Py basics question. reformatting text
Replies: 8
Views: 912

[solved] Py basics question. reformatting text

Task: get some data (1st block) if there's Vector tuples, replace "Vector" with "App.Vector" (2nd block) Text is printed to console (unintended) with corrected formatting, but new list is not being remembered place = [] length = [] objects = [o.Label for o in App.ActiveDocument.O...
by llll
Sat Sep 03, 2022 12:46 pm
Forum: Python scripting and macros
Topic: Vertex Edge placement sketcher
Replies: 3
Views: 449

Vertex Edge placement sketcher

Hi Problem 1 - Vertex list shows [20] - Vertex gui shows [60] How to find true list value of vertex 60? I.e. pick a vertex in GUI then get its placement. 60 is out of range. Problem 2 var = doc.Sketch.Shape.Vertexes[9] var.Placement.Base var = doc.Sketch.Shape.Edges[8] var.Placement.Base Is this wro...
by llll
Sun Aug 14, 2022 3:18 am
Forum: Assembly
Topic: Get placement of Link obj in Assembly3 parts
Replies: 2
Views: 834

Get placement of Link obj in Assembly3 parts

When a Link placement is changed in Assembly, placement of the Link outside of assembly doesn't change. and, Link placement inside assembly doesnt change either!.. despite its position in GUI changing... Recomputes don't help. Is this normal behaviour? If not, can you suggest why this could be happe...
by llll
Wed Aug 03, 2022 6:10 am
Forum: Help on using FreeCAD
Topic: Successive rotations overwrite previous rotations
Replies: 1
Views: 318

Successive rotations overwrite previous rotations

What's the correct way to do this in GUI with placement?
How do I "accept" rotation, and continue with new rotation?
There is no recompute symbol waiting
Note: cannot use new transform feature as the assumed center of rotation is not wanted.
It works fine in-scriptu

ty
by llll
Sat Jul 30, 2022 4:55 am
Forum: Python scripting and macros
Topic: [solved] Set CoG to point XYZ
Replies: 10
Views: 1365

Re: Set CoG to point XYZ

So isn't this what you wanted - rotate the cone 20 degrees about a vertical axis through the attached point? If not, what are you trying to achieve? It worked on the test object fine. this video demonstrates issue ... https://youtu.be/KdaP-P2SIP8 Does it provide any clues? Placement, & two diff...
by llll
Fri Jul 29, 2022 12:32 pm
Forum: Python scripting and macros
Topic: Placement.rotate(center, axis, angle): wrong handling of center?
Replies: 29
Views: 2871

Re: Placement.rotate(center, axis, angle): wrong handling of center?

I am still unable to pivot about a point without the influence of CentreofGravity.

How do I turn off CentreofGravity so I can set the real center of rotation matrix?
Has me crawling up the walls

I assume its caused by CoG since the pivot about point works on simpler objects
by llll
Thu Jul 28, 2022 8:00 am
Forum: Python scripting and macros
Topic: [solved] Set CoG to point XYZ
Replies: 10
Views: 1365

Re: Set CoG to point XYZ

trying to understand it's not going well. I think this is it import Part doc = App.ActiveDocument obj = doc.Cone objB = obj.Placement.Base ## Get center centre = doc.AttachedPoint.Placement.Base center = App.Vector(centre.x,centre.y, objB.z) center axis = App.Vector(0, 0, 1) trans = App.Vector(0, 0...