Macro Cupola Geodetica

From FreeCAD Documentation
Revision as of 19:03, 16 June 2019 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Other languages:

Cupola Geodetica

Descrizione
Questa macro crea il guscio parametrico di una cupola geodetica

Versione macro: 01.00
Ultima modifica: 2019-03-24
Autore: Ulrich Brammer, DeepSOIC, galou
Autore
Ulrich Brammer, DeepSOIC, galou
Download
None
Link
Versione macro
01.00
Data ultima modifica
2019-03-24
Versioni di FreeCAD
None
Scorciatoia
Nessuna
Vedere anche
Nessuno

Descrizione

Questa macro crea il guscio di una cupola (sfera) geodetica parametrica. Il raggio della cupola e il parametro di frequenza (fattore d'arco) sono definiti al momento della creazione.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://raw.githubusercontent.com/FreeCAD/FreeCAD-macros/master/ParametricObjectCreation/geodesic_dome/geodesic_dome.py" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://raw.githubusercontent.com/FreeCAD/FreeCAD-macros/master/ParametricObjectCreation/geodesic_dome/geodesic_dome.py")


Utilizzo

1. Installare la macro usando Addon Manager (menu Strumenti → Addon Manager). Nella scheda "Macro", selezionare "GeodesicDome", fare clic su "Installa". Quindi chiudere Addon manager.

2. Avviare GeodesicDome.FCMacro. Dovrebbe apparire una finestra di dialogo

3. Specificare i parametri, e poi fare clic su OK.

dovrebbe apparire una forma a cupola. È quindi possibile modificare i parametri della cupola modificando le proprietà dell'oggetto GeoDome.

Script

(questa è una vecchia versione non parametrica dello script. La versione aggiornata è nel repository delle macros di FreeCAD, qui! )

Macro_Geodesic_Dome.FCMacro

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'geodesic_dialog.ui'
# And changed manually to use FreeCAD "Gui::InputField"
# Created: Sun Jan  4 22:20:58 2015
#      by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# Upgrade 2019/06/16 for use with FreeCAD 0.19 version
#OS: Windows 10 (10.0)
#Word size of OS: 64-bit
#Word size of FreeCAD: 64-bit
#Version: 0.19.16993 (Git)
#Build type: Release
#Branch: master
#Hash: 5ea062f6699666b2f284f6a52105acf20828b481
#Python version: 3.6.8
#Qt version: 5.12.1
#Coin version: 4.0.0a
#OCC version: 7.3.0

'''
************************************************************************
* Copyright (c)2015 2019 Ulrich Brammer <ulrich1a[at]users.sourceforge.net> *
*                                                                      *
* This file is a supplement to the FreeCAD CAx development system.     *
*                                                                      *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL)   *
* as published by the Free Software Foundation; either version 2 of    *
* the License, or (at your option) any later version.                  *
* for detail see the LICENCE text file.                                *
*                                                                      *
* This software is distributed in the hope that it will be useful,     *
* but WITHOUT ANY WARRANTY; without even the implied warranty of       *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
* GNU Library General Public License for more details.                 *
*                                                                      *
* You should have received a copy of the GNU Library General Public    *
* License along with this macro; if not, write to the Free Software    *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 *
* USA                                                                  *
*                                                                      *
************************************************************************
'''


from PySide import QtCore, QtGui
import FreeCAD, FreeCADGui, math, Part
from FreeCAD import Base

class Ui_Dialog(object):
  def setupUi(self, Dialog):
    Dialog.setObjectName("Dialog")
    Dialog.resize(477, 188)
    self.dia = Dialog
    self.gridLayoutWidget = QtGui.QWidget(Dialog)
    self.gridLayoutWidget.setGeometry(QtCore.QRect(19, 19, 440, 141))
    self.gridLayoutWidget.setObjectName("gridLayoutWidget")
    self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget)
    self.gridLayout.setContentsMargins(0, 0, 0, 0)
    self.gridLayout.setObjectName("gridLayout")
    self.label = QtGui.QLabel(self.gridLayoutWidget)
    self.label.setObjectName("label")
    self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
    #self.lineEdit = QtGui.QLineEdit(self.gridLayoutWidget)
    fui = FreeCADGui.UiLoader()
    self.lineEdit = fui.createWidget("Gui::InputField")
    
    self.lineEdit.setObjectName("lineEdit")
    self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1)
    self.label_2 = QtGui.QLabel(self.gridLayoutWidget)
    self.label_2.setObjectName("label_2")
    self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
    self.lineEdit_2 = QtGui.QLineEdit(self.gridLayoutWidget)
    self.lineEdit_2.setObjectName("lineEdit_2")
    self.gridLayout.addWidget(self.lineEdit_2, 1, 1, 1, 1)
    self.label_3 = QtGui.QLabel(self.gridLayoutWidget)
    self.label_3.setObjectName("label_3")
    self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
    self.buttonBox = QtGui.QDialogButtonBox(self.gridLayoutWidget)
    self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
    self.buttonBox.setStandardButtons \
      (QtGui.QDialogButtonBox.Cancel

Link

Forum Designing geodesic dome