Skip to content

Trying to export STL file in python demos #913

Answered by joergbrech
JinZjt asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for opening an issue here! I will move this issue to the discussion board if you don't mind.

I think this demo could help you along: https://github.com/rainman110/tigl-workshop/blob/master/Exercises/solutions/Exercise1_Basics_Solution.ipynb.

Basically, you would use pythonocc to create a TopoDS_Face from your Geom_BSplineSurface. Then you can pass this face to a CNamedShape. The latter is a tigl class that can be added to an exporter:

from tigl3 import curve_factories as cf
from tigl3 import surface_factories as sf
from tigl3.exports import create_exporter

from tigl3.geometry import CNamedShape
from OCC.BRepBuilderAPI import BRepBuilderAPI_MakeFace

# list of points on NACA2412 pr…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JinZjt
Comment options

Answer selected by JinZjt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #912 on July 18, 2022 09:35.