Questions tagged [freecad]

FreeCAD is a parametric 3D modeler. Parametric modeling allows you to easily modify your design by going back into your model history and changing its parameters. FreeCAD is open source (LGPL license) and completely modular, allowing for very advanced extension and customization. FreeCAD is multiplatfom, and reads and writes many open file formats such as STEP, IGES, STL and others.

FreeCAD is a parametric 3D modeler. Parametric modeling allows you to easily modify your design by going back into your model history and changing its parameters.

FreeCAD is open source (LGPL license) and completely modular, allowing for very advanced extension and customization. FreeCAD is multiplatfom, and reads and writes many open file formats such as STEP, IGES, STL and others.

91 questions
6
votes
1 answer

How to create an arch in FreeCAD for architecture?

I'd like to create an arch in FreeCAD to be used in the architecture module. In OpenSCAD it'd look like this: Source: rotate(270, v=[1,0,0]) {difference() {rotate_extrude(fn=500) {translate([750, 0, 0])square([400,400]);}; translate([-2000, 0, 0])…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
5
votes
1 answer

How to embed FreeCAD in a Python virtual environment?

How do I setup a Python virtual environment with the FreeCAD library embedded as to enable import as a module into scripts? I would like to avoid using the FreeCAD GUI as well as being dependent on having FreeCAD installed on the system, when…
tompi
  • 291
  • 3
  • 10
5
votes
1 answer

Convert STEP file type to STL

I want to convert a STEP file into an STL file format using Python. I have looked online and it looks like the best option is to either use FreeCAD or OpenCascade (OCC). However, I am a beginner and do not know where to start from. I did some search…
Umar Dastgir
  • 688
  • 9
  • 25
5
votes
2 answers

Method ignored when subclassing a type defined in a C module

I am subclassing a type defined in a C module to alias some attributes and methods so that my script works in different contexts. How is it that to get this to work, I have to tweak the dictionary of my class manually ? If I don't add a reference…
Jacques Gaudin
  • 15,779
  • 10
  • 54
  • 75
4
votes
1 answer

how to update Spreadsheet values using FreeCAD python module

Let's say I have a FreeCAD model that defines a certain geometry with dimensions height, width, and length that are defined in cells of the model's spreadsheet. I want to build an automation pipeline in a stand-alone Python script using the FreeCAD…
Stefan Reisner
  • 607
  • 5
  • 12
3
votes
3 answers

Cannot display Mesh in Freecad after exporting Mesh from Python using the ezdxf interface

This is my first time posting here. I am making 3D models of houses using python and I would like to visualise the output using FreeCAD. I found the ezdxf interface (https://pypi.org/project/ezdxf/) which writes to dxf format and I ran the below…
lukecoburn
  • 31
  • 3
3
votes
1 answer

Opencascade crash when calling calling Transfer()

I have tested two cases: I use STEPCAFControl_Reader then STEPControl_Reader to read my step file but both methods crash when I call STEPCAFControl_Reader::Transfer, repsectively STEPControl_Reader:: TransferRoots. By using STEPControl_Reader, I…
Valimo Ral
  • 381
  • 2
  • 15
3
votes
2 answers

How to auto-generate mesh from .step file using GMSH or similar?

I need to produce simulation data for randomly generated cantilever beams, and save their maximum deflection given a load, and/or perform frequency-response analysis. To do this the body needs to be meshed as an FEM mesh. Hence, I would like to…
avgJoe
  • 832
  • 7
  • 24
3
votes
3 answers

Are IFC entity type names case sensitive or not?

Can anybody help in knowing whether IFC entity type names are case sensitive or case insensitive. For example: Can we replace IFCPERSON with IfcPerson (camel case) or ifcperson (small) in an *.ifc file?
3
votes
3 answers

Python-Regular expressions: extract a list of tuples after a keyword from a text file

I want to implement a simplified version of what I have suggested here to import some vertices from an OpenFOAM blockMeshDict file and then visualize them with FreeCAD. the part of the file I'm interested in is a list of tuples (xi yi zi)s of…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
3
votes
3 answers

Import CAD object in Python and store as array

I am using Autodesk Fusion 360 to model a 3D part (see figure below), which I can then export and save as either a .step, .iges, .sat or .smt file. What I am trying to achieve is to convert this part into a 3D numpy array in Python. Every element…
DimP
  • 216
  • 3
  • 9
2
votes
2 answers

Coding library to convert STEP to STL without large output file sizes

I am building a service to convert STEP files to STL files for user viewing. This conversion is just so the user can view the file uploaded to the server. It is not used to modify the file. However, the tested conversion libraries can not…
M. Nicol
  • 73
  • 1
  • 5
2
votes
0 answers

ImportError: cadquery was unable to determine freecad library path

I am trying to run code from this source. The code is written in python 2, so I am using virtual environment with anaconda. The code replies on rather old versions of cadquery 1.2.0, which I installed into conda environment using pip. I also…
Vid
  • 151
  • 1
  • 5
2
votes
0 answers

How have FreeCAD screwed inheritancy from a python class?

I would like to inherit from Vector, a FreeCAD python class. In the following test code, I either use my own Vector class or import the Vector class from FreeCAD. It works fine with my own Vector class, but prints a vector of zeroes and then crashes…
Pete D.
  • 165
  • 1
  • 12
2
votes
2 answers

Create a simple cylinder using command-line FreeCAD

I would like to create a simple pillar in FreeCAD using python and the export it as .stl file What have I done so far? Recorded a macro of me creating a cylinder (Part) and exporting it as an stl file. I copy and paste the text from the macro…
henry
  • 875
  • 1
  • 18
  • 48
1
2 3 4 5 6