[fast gelöst] Trennfläche für Formenbau, Trimmen an Silhouette - wie?

In diesem Forum Fragen und Diskussionen in Deutsch
Forum rules
Foren-Regeln und hilfreiche Informationen

WICHTIG: Bitte zuerst lesen, bevor Sie posten
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: [fast gelöst] Trennfläche für Formenbau, Trimmen an Silhouette - wie?

Post by freecad-heini-1 »

wmayer wrote: Tue Feb 26, 2019 2:27 pm

Code: Select all

from pivy import coin

rot=Gui.ActiveDocument.ActiveView.getCameraOrientation()
vdir=App.Vector(0,0,-1)
vdir=rot.multVec(vdir)
udir=App.Vector(0,1,0)
udir=rot.multVec(udir)

pos=Gui.ActiveDocument.ActiveView.getCameraNode().position.getValue().getValue()
pos=App.Vector(*pos)

# Select sub-elements of one model or the whole model
sel=Gui.Selection.getSelectionEx()[0]
if sel.HasSubObjects:
    shapes=sel.SubObjects
else:
    shapes=[sel.Object.Shape]

for i in shapes:
    reflect=i.reflectLines(ViewDir=vdir, ViewPos=pos, UpDir=udir)
    if not reflect.isNull():
        Part.show(reflect)
Vielen lieben Dank Werner. Hab ein paar krumme Flächen gewählt und das Makro gestartet, die Silhouette wird an diesen Flächen erzeugt und sieht gut aus. Shape wird jetzt auch für Loft und Sweep akzeptiert. Das ist sehr hilfreich. Ob das noch mehr Formkonstrukteure anlockt?

Viele Grüße
Wilfried
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: [fast gelöst] Trennfläche für Formenbau, Trimmen an Silhouette - wie?

Post by saso »

I was now able test this, yes this way to also have the option to select individual faces is indeed very useful, thank you both for making this work! :)
Post Reply