Browse Source

ameliorations après atelier scolaire

Prise en compte des recommandations post atelier scolaire (Greg):

- doublement des équerres aux angles
- raccourcissement de T101 pour pouvoir mettre des bouchons (sécurité
enfants)
- certaines vis de 35 passées en 40
master
Christian 3 weeks ago
parent
commit
b8b304e7b2
  1. 15
      README.md
  2. 19000
      Remorque_PM_v0-Assembly_2025-09-09_21h38.step
  3. BIN
      Remorque_PM_v0.FCStd
  4. BIN
      chaudronnerie/CHO17.FCStd
  5. 4010
      dist/STEP/tubes/L101.step
  6. 4464
      dist/STEP/tubes/L102.step
  7. 3230
      dist/STEP/tubes/M101.step
  8. 3934
      dist/STEP/tubes/T101.step
  9. BIN
      quincaillerie/boulons/Boulon_M6x35Hex_xx_R_EF.FCStd
  10. BIN
      quincaillerie/boulons/Boulon_M6x40Hex_xx_EF.FCStd
  11. BIN
      quincaillerie/visserie/QIN35.FCStd
  12. BIN
      steps_kids.FCStd
  13. 167
      tools/export-all-parts.py
  14. 21
      tools/export-all-parts.sh
  15. 24
      tools/export_parts_step.bat
  16. BIN
      tubes/T101.FCStd
  17. 1206
      tubes/T101.svg

15
README.md

@ -6,20 +6,23 @@ sur la base du travail de Macéo.
FreeCad v0.21.2
état au **02/06/2025** - 14h30
état au **09/09/2025** - 17h30
les fichiers STEP des tubes sont dans le répertoire ``dist/STEP/tubes``
les fichiers SVG des tubes sont dans le répertoire ``tubes``
les images (techdraw) de la remorque entière sont maintenant dans un fichier FreeCad séparé (évite d'alourdir le fichier principal)
Prise en compte des retours de Greg après montage du premier proto
Prise en compte des retours de Greg après atelier scolaire
- rajout d'une équerre inférieure à chaque coin (rigidité accrue)
- raccourcissement de 2x5mm des traverses pour y mettre un embout plastique par sécurité avant montage
- passage à des boulons de 40 pour les équerres d'angle
début de Notice de Montage dans la branche "Kids" (Git).
la branche "Kids" (Notice de Montage) est maintenant fusionnée (Git).
Les templates A3 utilisés sont dans le répertoire ``lib``
### Dimensions:
- timon raccourci à 61 cm en longueur
- traverse T101 raccourcie à 36cm pour une largeur totale de la remorque de 41cm
- traverse T101 raccourcie à 35cm pour une largeur totale de la remorque de 41cm et la place pour des embouts de sécurité
### Roulette frontale:
- la roulette est une roulette de roller junior de 63mm facile à trouver (axe 6mm)
@ -28,7 +31,7 @@ Les templates A3 utilisés sont dans le répertoire ``lib``
### Timon:
- l'équerre de fixation est positionnée pour un timon soit horizontal (traction) soit vertical (caddy). Le timon L102 dispose des deux trous nécessaires.
- la poignee de timon provisoire a été supprimée. Il reste à déterminer comment fixer l'attache vélo.
- Il reste à déterminer comment fixer l'attache vélo.
## reste à faire :
@ -39,5 +42,5 @@ Les templates A3 utilisés sont dans le répertoire ``lib``
### GIT :
<https://git.vhelio.org/christian/Remorque_PM_v0>
(la branche "Drawings" est inactive)
(les branches "Drawings" et "kids" sont inactives)

19000
Remorque_PM_v0-Assembly_2025-09-09_21h38.step

File diff suppressed because it is too large Load Diff

BIN
Remorque_PM_v0.FCStd

Binary file not shown.

BIN
chaudronnerie/CHO17.FCStd

Binary file not shown.

4010
dist/STEP/tubes/L101.step vendored

File diff suppressed because it is too large Load Diff

4464
dist/STEP/tubes/L102.step vendored

File diff suppressed because it is too large Load Diff

3230
dist/STEP/tubes/M101.step vendored

File diff suppressed because it is too large Load Diff

3934
dist/STEP/tubes/T101.step vendored

File diff suppressed because it is too large Load Diff

BIN
quincaillerie/boulons/Boulon_M6x35Hex_xx_R_EF.FCStd

Binary file not shown.

BIN
quincaillerie/boulons/Boulon_M6x40Hex_xx_EF.FCStd

Binary file not shown.

BIN
quincaillerie/visserie/QIN35.FCStd

Binary file not shown.

BIN
steps_kids.FCStd

Binary file not shown.

167
tools/export-all-parts.py

@ -0,0 +1,167 @@
from pathlib import Path
import os
import FreeCAD as App
import Import
import ImportGui
project_folder = os.getcwd()
output_folder = project_folder + '/dist/STEP'
assemblies_output_folder = project_folder + '/dist/FCStd'
def close_all_docs():
while len(App.listDocuments().values()) > 0:
App.closeDocument(list(App.listDocuments().values())[0].Name)
def convert_file(file_name, output_format):
doc = App.open(project_folder + '\\' + file_name)
root_objects = []
main_object = None
#print("document: " + doc.Name)
print("document: " + doc.Name)
for obj in doc.Objects:
if len(obj.Parents) == 0:
#print(obj.Label)
print("Object Label : " + obj.Label)
root_objects.append(obj)
if obj.Label == doc.Name or obj.Label == doc.Name + ' (experimental)':
main_object = obj
if main_object is None and len(root_objects) == 1:
main_object = root_objects[0]
if main_object is None:
raise Exception("Can't find main object in file " + file_name + " (found " + str(len(root_objects)) + " root object(s), none named like the document " + doc.Name + ")")
if 'experimental' in main_object.Label or 'expérimental' in main_object.Label:
print('Document ' + doc.Name + ' is marked as experimental and will be ignored')
close_all_docs()
return
secondary_objects = []
code_obj = doc.getObjectsByLabel('Code_Tube_Draft')
#
print("len(code_obj) : " + str(len(code_obj)))
if len(code_obj) == 1:
code_obj = code_obj[0]
#code_obj.Label = 'Code_Tube'
#secondary_objects.append(code_obj)
# engrave code on tube
#code_pocket = main_object.newObjectAt('PartDesign::Pocket','Pocket', [code_obj])
code_pocket = main_object.newObject('PartDesign::Pocket','Pocket')
code_pocket.Profile = code_obj
code_pocket.Length = 0.2
code_pocket.recompute()
main_object.recompute()
if len(secondary_objects) > 0:
group = doc.addObject('App::Part', 'Groupe')
group.addObject(main_object)
for obj in secondary_objects:
group.addObject(obj)
main_object = group
output_path = output_folder + '/' + os.path.dirname(file_name) + '/' + Path(file_name).stem + '.' + output_format
output_dir = os.path.dirname(output_path)
if not os.path.exists(output_dir):
os.makedirs(output_dir)
if output_format.lower() == 'stpz':
import stepZ
stepZ.export([main_object], output_path)
else:
Import.export([main_object], output_path)
close_all_docs()
def convert_assembly(file_name, output_format):
print("Exporting assembly " + file_name + "...")
doc = App.open(project_folder + '/' + file_name)
root_objects = []
main_object = None
# remove all objects that are not visible, or not in the TypeId whitelist, because we don't want to export those
need_check_objects = True
while need_check_objects:
need_check_objects = False
for obj in doc.Objects:
if not obj.Visibility or obj.TypeId not in ['Part::Feature', 'Part::FeaturePython', 'PartDesign::Body', 'Part::Mirroring', 'Part::Cut', 'Part::Part2DObjectPython', 'Part::MultiFuse', 'Part::Loft', 'Part::Torus', 'Part::Cylinder', 'App::DocumentObjectGroup', 'App::Part', 'App::Link']:
#print('removing ' + obj.Name + ' ('+obj.Label+')')
doc.removeObject(obj.Name)
need_check_objects = True
break
for obj in doc.Objects:
if len(obj.Parents) == 0:
#print(obj.Label)
root_objects.append(obj)
if obj.Label == doc.Name:
main_object = obj
if main_object is None and len(root_objects) == 1:
main_object = root_objects[0]
if main_object is None:
raise Exception("Can't find main assembly in file " + file_name + " (found " + str(len(root_objects)) + " root object(s), none named like the document " + doc.Name + ")")
output_path = output_folder + '/' + os.path.dirname(file_name) + '/' + Path(file_name).stem + '.' + output_format
output_dir = os.path.dirname(output_path)
if not os.path.exists(output_dir):
os.makedirs(output_dir)
if output_format.lower() == 'stpz':
import stepZ
stepZ.export([main_object], output_path)
else:
ImportGui.export([main_object], output_path)
close_all_docs()
def export_configuration(doc, config_name, output_filename):
print('Generating assembly for configuration '+config_name+'...')
Gui.Selection.clearSelection()
Gui.Selection.addSelection('vheliotech','Model','Configurations.'+doc.getObjectsByLabel(config_name)[0].Name+'.')
Gui.runCommand('Asm4_applyConfiguration')
Gui.Selection.clearSelection()
doc.saveAs(assemblies_output_folder + '/' + output_filename + '.FCStd')
try:
folders = [
#'chaudronnerie',
'tubes'
]
for folder in folders:
files = os.listdir(project_folder + '\\' + folder)
for source_file in files:
if not source_file.endswith('.FCStd'): continue
source_path = folder + '\\' + source_file
print(source_path)
convert_file(source_path, 'step')
#
print ("back from convert")
# convert_assembly('vheliotech.FCStd', 'step')
# '''doc = App.open(project_folder + '/vheliotech.FCStd')
# export_configuration(doc, 'Config_Integrale', 'vheliotech-config-integrale')
# export_configuration(doc, 'Config_Solaire', 'vheliotech-config-solaire')
# export_configuration(doc, 'Config_Motorisee', 'vheliotech-config-motorisee')
# export_configuration(doc, 'Config_Basique', 'vheliotech-config-basique')
# close_all_docs()'''
except Exception as e:
print(e)
# exit FreeCAD
close_all_docs()
# FreeCADGui.getMainWindow().close()
Gui.runCommand('Std_Quit')

21
tools/export-all-parts.sh

@ -0,0 +1,21 @@
#!/bin/bash
set -e
# Set the path to your FreeCAD executable here
FREECAD=~/dev/FreeCAD-asm3-Daily-Conda-Py3.10-20221128-glibc2.12-x86_64.AppImage
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
rm -rf ./dist
# Check script syntax before starting freecad
python3 -m py_compile tools/export-all-parts.py
# Export all versioned files
mkdir -p dist/FCStd
git archive HEAD . | tar -x -C dist/FCStd
# Start freecad to run the script. We must start freecad with GUI (otherwise we can't export colors). We start it hidden in a virtual framebuffer (xvfb) so that it can run cleanly in the background.
xvfb-run $FREECAD tools/export-all-parts.py

24
tools/export_parts_step.bat

@ -0,0 +1,24 @@
:: Set the path to your FreeCAD executable here
set FREECAD=C:\Program Files\FreeCAD 0.21\bin\freecad.exe
set SCRIPT_DIR=%~dp0
echo %SCRIPT_DIR% >>%TMP%\toto.txt
cd %script_dir%
echo %cd% >>%TMP%\toto.txt
cd ..
echo %cd% >>%TMP%\toto.txt
:: rm -rf ./dist
:: Check script syntax before starting freecad
:: python3 -m py_compile tools/export-all-parts.py
:: Export all versioned files
:: mkdir -p dist/FCStd
:: git archive HEAD . | tar -x -C dist/FCStd
:: Start freecad to run the script. We must start freecad with GUI (otherwise we can't export colors). We start it hidden in a virtual framebuffer (xvfb) so that it can run cleanly in the background.
:: xvfb-run $FREECAD tools/export-all-parts.py
:: %freecad%/freecad.exe tools/export-all-parts.py
echo %freecad%
start "" "%freecad%" tools/export-all-parts.py

BIN
tubes/T101.FCStd

Binary file not shown.

1206
tubes/T101.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Loading…
Cancel
Save