Sezione Dinamica

Forum per le domande e le discussioni in Italiano
Forum rules
regole del forum e le informazioni utili

Importante: PRIMA di chiedere aiuto leggete qui!
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

hi

single cube, i tray now the version not modified and i cause the same problem ??? certainly my configuration ??
i have upgrade the macro in the wiki

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Sam
Posts: 177
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Post by Sam »

ciao mario,

I'd only tested it with some simple PDN things before I posted here. It certainly works for a simple cube for me. I should mention that I'm running a debug build. I do not know if that will make a difference.

However, I've been experimenting with more complex drawings, and the macro does actually have some more issues. For instance App.Part does not have a bounding box, so some more tweaking needs to be done.

I'll have a fool around with more over the next few days.
leoheck
Veteran
Posts: 1223
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Sezione Dinamica

Post by leoheck »

Hello, I don't understand this thread. But I came here from the Cross Section macro. It doesn't work with Freecad 0.18.3 and 0.19. There is not a window like this. When I execute it nothing happens.

Image
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Sezione Dinamica

Post by renatorivo »

leoheck wrote: Tue Aug 20, 2019 8:11 pm It doesn't work with Freecad 0.18.3 and 0.19
cross-section-18.03.PNG
cross-section-18.03.PNG (45.33 KiB) Viewed 5283 times
OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16131 (Git)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
g.becu
Posts: 1
Joined: Thu Aug 29, 2019 3:48 pm

Re: Sezione Dinamica

Post by g.becu »

leoheck wrote: Tue Aug 20, 2019 8:11 pm Hello, I don't understand this thread. But I came here from the Cross Section macro. It doesn't work with Freecad 0.18.3 and 0.19. There is not a window like this. When I execute it nothing happens.
Hi leoheck,
I must confess I'm new to FreeCAD, but I had the same issue and I wasn't able to find any solution googling. I managed to fix it by adding the following line:

Code: Select all

            self.oblist = [obj for obj in self.oblist if hasattr(obj,"Shape")]
after line 334 of the code, so that you have:

Code: Select all

		[...]
	    # Make a list of the user's objects
            # WARNING!!
            # This list is persistent. We'll get confused if the user deletes or
            # adds objects while the macro is active
            self.oblist = App.ActiveDocument.Objects
            self.oblist = [obj for obj in self.oblist if hasattr(obj,"Shape")]
            
            # Create the cross-section object
             [...]
(macro version 0.08, the one currently available by add-on manager).
My knowledge of the FreeCAD APIs are zero but i figured out that it has something to do with the listing of the objects. In fact most of them don't have a "Shape" attribute.

OS: Linux Mint 19
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.3.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Italian/Italy (it_IT)
leoheck
Veteran
Posts: 1223
Joined: Tue Mar 13, 2018 5:56 pm
Location: Coffee shop

Re: Sezione Dinamica

Post by leoheck »

@g.becu I didn't see it before. Cool, your solution fixed this issue. Thank you dude!

I need to know how to submit this to the maintainer of this macro.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

Saluti

fato Macro_cross_section grazie g.becu e benvenuto

ver 00.09 31/08/2019 : upgrade by g.becu adding line 334

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
cadcam
Posts: 273
Joined: Thu Apr 02, 2020 10:39 am

Re: Sezione Dinamica

Post by cadcam »

I wondered if anyone had extended this useful
macro, so that an arbitary face can be selected
and the unit normal used to define the plane of the
section?

Best Wishes
Luixx
Posts: 213
Joined: Thu Jan 25, 2018 9:12 am

Re: Sezione Dinamica

Post by Luixx »

mario52 wrote: Sat Aug 31, 2019 10:28 am Saluti

fato Macro_cross_section grazie g.becu e benvenuto

ver 00.09 31/08/2019 : upgrade by g.becu adding line 334

mario
salve, mario52 protesti fare una piccola guida come si creano le macro con la gui e anche quelle senza.
perché sto leggendo la guida di onekk .. ma lui parte dai file .py, ed invece tu parti dai file ..FCMacro.
Hai qualche guida al riguardo oltre ad quella di onekk.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

salve
Luixx wrote: Fri Oct 30, 2020 4:45 pm ma lui parte dai file .py, ed invece tu parti dai file ..FCMacro.
potete rinominare .py in .FCMacro sonno tutti e due lo stesso per FreeCAD

(FCMacro e usato per distinguere una macro dedicata per FreeCAD)

ma se fate un import miofile il file "miofile" da importare deve avere l'estensione "miofile.py" sino non funziona perché diventa uno file Python

su la mia segnatura avete qualunque pagine interessante ma non tutte sono aggiornata
cadcam wrote: Fri Oct 30, 2020 8:27 am I wondered if anyone had extended this useful
macro, so that an arbitary face can be selected
and the unit normal used to define the plane of the
more explanation or image example

(select a face and the "cut" is operate by its normal ? )

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply