Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

convert step in stl file python OCC.core

from OCC.Core.STEPControl import STEPControl_Reader
from OCC.Core.StlAPI import StlAPI_Writer

input_file  = 'myshape.stp'   # input STEP (AP203/AP214 file)
output_file = 'myshape.stl'   # output X3D file


step_reader = STEPControl_Reader()
step_reader.ReadFile( input_file )
step_reader.TransferRoot()
myshape = step_reader.Shape()
print("File readed")

# Export to STL
stl_writer = StlAPI_Writer()
stl_writer.SetASCIIMode(True)
stl_writer.Write(myshape, output_file)
print("Written")
Comment

PREVIOUS NEXT
Code Example
Python :: Python of if...else 
Python :: To install the C++ and Python Messaging APIs: 
Python :: Python Global variable and Local variable with same name 
Python :: how to vreate a list in python 
Python :: Python Raw String to ignore escape sequence 
Python :: check it two words are anagram pyhton 
Python :: Regular Expressions In Practical NLP example 
Python :: what does bin do in python 
Python :: can we use for loop inside if statement 
Python :: django q and f 
Python :: paraphrase tool free online 
Python :: Python send sms curl 
Python :: Complete the function that accepts a string parameter, and reverses each word in the string. All spaces in the string should be retained. 
Python :: truncated float python 
Python :: parsing date columns when reading csv 
Python :: BMI CALCULATOR CODE IN PYTHON 
Python :: th most effective search methods in python with example 
Python :: csv/gpd to shapefile python 
Python :: Implementing the hashing trick 
Python :: simulieren mit python 
Python :: barplot hatch 
Python :: 100 days of python 
Python :: Mapping using dictionary 
Python :: python code optimization 
Python :: asdfghjkl 
Python :: examples of function decorators in Python 
Python :: monthly precipitation in python 
Python :: numpy documentation realpython 
Python :: python pyinstler not found 
Python :: python run scp command 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =