Comments (15)
@selvakarna Assuming you're running Ubuntu, you can follow the instructions here to add the FreeCAD stable PPA. Once you're followed the instructions there, you can just run sudo apt-get install freecad
.
from cadquery-freecad-module.
@selvakarna I'm not sure that CadQuery 1.0, which is what's bundled with this workbench, is capable of exporting a surface to a STEP file. If you want to export a volume, here is an example from the tests that shows the syntax. You could try it with a surface, I'm just not sure if it will work properly.
You could always generate the model, then export it using FreeCAD's File > Export
menu option.
The majority of the community has moved to CadQuery 2.0, and that's where most effort will be placed from now on. You might want to consider switching to it.
from cadquery-freecad-module.
Hi @jmwright , i don't wont menu option and all, i m asking supporting python scripts ?
from cadquery-freecad-module.
@selvakarna The code below works for me.
import cadquery as cq
shape = cq.Workplane("XY").box(1, 1, 1)
shape.val().exportStep("/home/jwright/Downloads/mymodel.step")
from cadquery-freecad-module.
Okay thank you @jmwright , i will update you ..........
from cadquery-freecad-module.
Hi @jmwright , when i import cadquery i got error :
Error:
import FreeCAD
ImportError: dynamic module does not define module export function (PyInit_FreeCAD)
so how to install FreeCAD? i have always installed freecad ? not like FreeCAD?
from cadquery-freecad-module.
windows also showing error?
can you share just commands :
how to install FreeCAD package in windows flatform ? you dont know?????????????//
from cadquery-freecad-module.
@selvakarna I asked you questions on the second issue you created related to this: #144
I need more information.
Are you trying to run this script with Python 3? Are you running your script from within FreeCAD, or on the command line? What version of FreeCAD are you using? You can start the FreeCAD GUI and go to Help > About FreeCAD
Does "windows also showing error" mean that the error happens in the Windows operating system as well as another? Is the other operating system Linux?
from cadquery-freecad-module.
@jmwright , Can you share FreeCAD Version with Python Version compatibility for installation, with WINDOWS & Linux OS.
from cadquery-freecad-module.
I have installed cadquery 2.3.1 in Linux Machine ? when i import cadquery its show error ?
Error:
import cadquery
Traceback (most recent call last):
File "/home/hp/.local/lib/python3.6/site-packages/cadquery/freecad_impl/init.py", line 151, in
import FreeCAD
ModuleNotFoundError: No module named 'FreeCAD'
So, what solution to solve this ?
from cadquery-freecad-module.
It should work with FreeCAD 0.17, 0.18 and 0.19, and Python 2 and Python 3, but 0.19 is still in development so it's changing, and each OS can act differently.
When you run which freecad
on your Linux system, what does it show?
from cadquery-freecad-module.
Hi @jmwright , when i import cadquery package , i get following error
Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import cadquery
Traceback (most recent call last):
File "/home/hp/.local/lib/python3.6/site-packages/cadquery/freecad_impl/init.py", line 151, in
import FreeCAD
ModuleNotFoundError: No module named 'FreeCAD'
During handling of the above exception, another exception occurred:
from cadquery-freecad-module.
Hi @jmwright , Can you Please share FreeCAD installation producer PIP python using commands.
from cadquery-freecad-module.
@jmwright , i followed above your instruction , but after that above installation i get some error, please check this below error.
Error:
Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import freecad
import cadquery
Traceback (most recent call last):
File "/home/hp/.local/lib/python3.6/site-packages/cadquery/freecad_impl/init.py", line 151, in
import FreeCAD
ModuleNotFoundError: No module named 'FreeCAD'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/home/hp/.local/lib/python3.6/site-packages/cadquery/init.py", line 2, in
from .freecad_impl.geom import Plane,BoundBox,Vector,Matrix,sortWiresByBuildOrder
File "/home/hp/.local/lib/python3.6/site-packages/cadquery/freecad_impl/init.py", line 155, in
import FreeCAD
ImportError: dynamic module does not define module export function (PyInit_FreeCAD)
from cadquery-freecad-module.
@selvakarna If you run which freecad
from the terminal, what does it show?
from cadquery-freecad-module.
Related Issues (20)
- 'NoneType' object has no attribute 'addObject' HOT 18
- save dialog on exit HOT 3
- Soliciting Community Feedback: Do You Use the Built-In Code Editor? HOT 9
- show cqparts within FreeCad HOT 9
- Certain imports break on script re-execution. HOT 4
- os.environ.get("MYSCRIPT_DIR") is None HOT 9
- Update Settings Documentation
- error on startup CQ_Logo.svg does not exists HOT 15
- FreeCAD Addon Manager needs a proper .svg icon for this WB/Addon HOT 1
- ImportError: dynamic module does not define module export function (PyInit_FreeCAD) HOT 1
- ModuleNotFoundError: No module named 'FreeCAD' HOT 5
- Update to support of CQ 2.0 HOT 8
- Examples not running - module 'time' has no attribute 'clock' HOT 8
- show() not defined HOT 7
- suppress_stdout_stderr seems to suppress too much
- Cannot import name 'Assembly' from 'cadquery' HOT 4
- No module named 'ExportCQ' HOT 7
- Rotation of assembly or imported step HOT 2
- module 'collections' has no attribute 'MutableMapping' HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cadquery-freecad-module.