Search found 160 matches

by crobar
Fri Oct 10, 2014 3:14 pm
Forum: Python scripting and macros
Topic: How to 'Refine' solid with python API [SOLVED]
Replies: 5
Views: 1741

Re: How to 'Refine' solid with python API

shoogen wrote:it's called shape.removeSplitter()
Great, thanks!
by crobar
Fri Oct 10, 2014 2:16 pm
Forum: Python scripting and macros
Topic: How to 'Refine' solid with python API [SOLVED]
Replies: 5
Views: 1741

How to 'Refine' solid with python API [SOLVED]

Hi,

The FreeCAD GUI has an option:

Part->Refine Shape

Is there a way of doing the same thing through to a TopoShape object through the python API? I haven't come across it in the API docs in Part or TopoShape etc.
by crobar
Mon Sep 01, 2014 12:17 pm
Forum: Python scripting and macros
Topic: Why can't I create a line from two points?
Replies: 2
Views: 960

Re: Why can't I create a line from two points?

Hello, it seems the documentation is missleading, the Point should be given as Vector and not as Part.Point, something like this: Part.Line (App.Vector (-0.500000, -0.500000, -0.500000), App.(Vector (-0.500000, -0.500000, -0.0)) I think the documentation should be changed in any case and IMHO we sh...
by crobar
Mon Sep 01, 2014 11:07 am
Forum: Python scripting and macros
Topic: Why can't I create a line from two points?
Replies: 2
Views: 960

Why can't I create a line from two points?

Could someone tell me what exactly I am doing wrong here to generate the error? >>> Part.Line (Part.Point (Vector (-0.500000, -0.500000, -0.500000)), Part.Point (Vector (-0.500000, -0.500000, -0.0))) Traceback (most recent call last): File "<input>", line 1, in <module> TypeError: Line con...
by crobar
Sat Aug 30, 2014 12:21 am
Forum: Developers corner
Topic: Easy to generate file format for efficient FreeCAD import
Replies: 11
Views: 5317

Re: Easy to generate file format for efficient FreeCAD impor

wmayer wrote:Here is a Python macro that might be useful
Thanks! This will certainly be useful for this particular case, but a more general solution, where it's not in fact a simple linear extrusion is still something I'd want ideally.
by crobar
Sat Aug 30, 2014 12:16 am
Forum: Developers corner
Topic: Easy to generate file format for efficient FreeCAD import
Replies: 11
Views: 5317

Re: Easy to generate file format for efficient FreeCAD impor

If you are working with linear segments there is no point in importing the data into CAD program, besides using the present mesh interfaces. If I understand you correctly, you currently do not intend to use the model in FreeCAD. But there is no purpose in saving a STEP file which bears the same inf...
by crobar
Fri Aug 29, 2014 9:38 pm
Forum: Developers corner
Topic: Easy to generate file format for efficient FreeCAD import
Replies: 11
Views: 5317

Re: Easy to generate file format for efficient FreeCAD impor

I have developed an interface for CGAL from Matlab/Octave. FreeCAD can use OpenSCAD scripts (Shoogen, please correct me, if I am wrong!) to convert them to FreeCAD-shapes. OpenSCAD uses also the CGAL library. So I would thing, it will be easier to use directly your Matlab-commands and interpret the...
by crobar
Fri Aug 29, 2014 9:22 pm
Forum: Developers corner
Topic: Easy to generate file format for efficient FreeCAD import
Replies: 11
Views: 5317

Re: Easy to generate file format for efficient FreeCAD impor

A plot of the shape before triangulation is shown below: extruded_part_matlab_untriangulated.png It is extruded from the end polygon which has about 1000 vertices. This shape has about 1000 faces. Below is the part after triangulation, export to stl, and import to FreeCAD. It has many more faces. tr...
by crobar
Fri Aug 29, 2014 2:50 pm
Forum: Developers corner
Topic: Easy to generate file format for efficient FreeCAD import
Replies: 11
Views: 5317

Re: Easy to generate file format for efficient FreeCAD impor

The input data is a set of vertices (x,y,z locations), and a set of faces represented by sets of indices of the vertices. The faces are polygons of any number of vertices. The set of faces can be assumed to form a closed surface (e.g. it might be created from an extruded polygon). This surface mesh ...
by crobar
Fri Aug 29, 2014 2:09 pm
Forum: Developers corner
Topic: Easy to generate file format for efficient FreeCAD import
Replies: 11
Views: 5317

Easy to generate file format for efficient FreeCAD import

Hello, Apologies if this is not the right forum to ask. I have developed an interface for CGAL from Matlab/Octave. I would like to efficiently import the meshes created using CGAL to FreeCAD. Currently I have a setup which triangulates the surface and writes it to an STL file. However, some of my me...