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
Posts: 3222
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » Sat Aug 19, 2017 10:30 am

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, Dialog creation. My macros on Gist.github.
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Postby Sam » Sat Aug 19, 2017 7:23 pm

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
Posts: 481
Joined: Tue Mar 13, 2018 5:56 pm

Re: Sezione Dinamica

Postby leoheck » 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.

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

Re: Sezione Dinamica

Postby renatorivo » Wed Aug 21, 2019 9:36 pm

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 717 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

Postby g.becu » Thu Aug 29, 2019 4:23 pm

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
Posts: 481
Joined: Tue Mar 13, 2018 5:56 pm

Re: Sezione Dinamica

Postby leoheck » Fri Aug 30, 2019 1:00 am

@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
Posts: 3222
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » 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
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
cadcam
Posts: 73
Joined: Thu Apr 02, 2020 10:39 am

Re: Sezione Dinamica

Postby cadcam » 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
section?

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

Re: Sezione Dinamica

Postby Luixx » Fri Oct 30, 2020 4:45 pm

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
Posts: 3222
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » Fri Oct 30, 2020 9:01 pm

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, Dialog creation. My macros on Gist.github.