SolveSpace Logo SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

DXF import scaling (by Ryan)
Hello,
First off, what a wonderful program solve space is. I believe open source parametric cad modeling is a critical component needed for distributed on demand manufacturing. A change from mass manufacturing that stands to improve much of our manufacturing efficiency by 80% or more. Inadequate mesh or proprietary part capture methods impede overall process change adoption and progress. Solve space is the first reasonable to use free parametric CAD I've come across that starts to solve this problem. Now somebody with a low cost computer and 3d printer can make all kinds of stuff. SolveSpace with slic3r are the needed software pieces. The mesh files are still problematic which further integration could solve, but it works now.

Ok, now for the "please help".
I'm having a problem importing dxf files. I think it is because I'm importing SAE(inches) into a metric, is there a switch for this?
I discovered a 25.4 scaling factor mentioned in some of the other forum discussions about importing dxf that was related to metric/standard files. I came up with a partial solution. If the dxf is fairly simple I can copy and paste transformed with a 25.4 scale and get the reference sketch I'm after. I haven't figured out what the copy paste item limit is yet, but it does limited this solution. The line wieght to scale is also problem as it often shows as a blurry spot. I think I've also run into a items in a sketch limit too. Is there a way to adjust the copy paste count and/or the number of items in a sketch?

A common building block I'm trying to model are aluminum extruded t-slots. 80/20 for example has design dxf files for their components. I'd like to import the dxf as a reference sketch. Then build my sketch and model from there.
151ls.dxf is an example file. If the zip came through it's there whole line, and oops. These look just like other SolidWorks exported dxf if that helps.

Thanks for any help and your great contribution to our world.
Mon Jan 17 2022, 14:08:14, download attachment 1515-LS.dxf
(no subject) (by Andrew)
You could try cut and then paste transformed on the imported dxf, where one of the transformations is scale.
Mon Jan 17 2022, 14:30:02
(no subject) (by Paul)
You might also try changing the Solvespace units to inches prior to importing the DXF. This is a guess on my part, since on the surface this sounds like the units in the DXF are getting ignored?

Once you've got your cross-section in solvespace you can save the 2D version as an .slvs file. Then you can link that file multiple times into an assembly and extrude each one to whatever length you need.
Mon Jan 17 2022, 15:15:38
(no subject) (by Ryan)
I haven't observed different behavior by changing units when importing dxf. what's imported is always 25.4 times too small. Haven't tried metric dxf from solidworks yet though.
Mon Jan 17 2022, 16:39:47
(no subject) (by Ryan)
Ok just tried a metric dxf from the same place and it comes in fine. So it looks like dxf always imports using metric units even if they are SAE.

Scaling the import would be an acceptable solution in my eyes.
Mon Jan 17 2022, 16:49:59
(no subject) (by Ryan)
The metric scalling issue only appears to be a problem with the dxf, as dwg's import correctly.
Wed Jan 19 2022, 12:16:28
(no subject) (by Ryan)
Oops, I miss typed. There is a scaling issue with dwg as well as dxf it's just not the same always the same for some reason. Not sure of the why yet, but looks like sometimes there is a 25.4 scaling other times there is a 38.1. There are rounding issues with related to scaling this far too(in the 10^-6 range). Just enough to cause loss of precision and be bothersome.
Wed Jan 19 2022, 12:42:10
(no subject) (by ruevs)
Ryan,

Is 1515-LS.dxf supposed to be a 38.1mm (1.5") square extrusion?

If so the missing scaling is definitely a potential bug. Inkscape seems to be able to get the scaling factor from the DXF when importing but it seems to get is slightly wrong.

The workaround (as Paul mentioned) is to import the DXF into an empty project and save it as a SLVS file. Then "New Group | Link / Assemble..." (Shift-I) the file into another file and set the "scaled by" value to 25.4

See the attached screen shot.

When you start re-drawing it in SolveSpace take a look here for some hints ;-)

https://github.com/solvespace/...ues/841#issuecomment-742153838
Thu Jan 20 2022, 11:45:21, download attachment SolveSpace_LinkScaledFile.png
(no subject) (by Ryan)
Sweet, I didn't realize you could scale an imported group. Thank you so much for your input. Any word if anybody might take on the problem in the code?
Fri Jan 21 2022, 00:45:07
(no subject) (by Ryan)
Here is part of what I was building and neat enough that is should be shared. It's a telescoping tube assemble(parts from mcmaster carr). To change the tube lengths open the rail file and back it up to the extrude feature that says lengthcontrol.
Still think it could use some restructuring so it was easier to apply length differences, but it's functional. I would also love to have a linear limiting constraint (set stops on the travel, any ideas welcome to apply to shared model).

Enjoy, and thank you for your contributions:-)
Fri Jan 21 2022, 01:34:55, download attachment telescopingTube.zip
(no subject) (by Andrew)
I have managed to implement slide stops by using two construction lines of fixed length from a fixed anchor point to a point on the sliding object. The anchor point need to be on a normal to the midpoint of the motion of the controlled point, Slidi9ng movement is limited to the lock points when both lines lie on a single line..
Fri Jan 21 2022, 06:25:52
(no subject) (by ruevs)
Andrew,

I can make a sliding assembly that becomes red (solve failed) when you slide it beyond the "stops" but I am curious how you made one that can not be moved beyond the "stops"?

Mine is attached.
Mon Jan 24 2022, 02:27:21, download attachment TelescopicTubes.zip
(no subject) (by Andrew)
Here is a modified assembly that does what you want, though dimensions controlling the movement may need adjusting. The mechanism is in the added sketch, with the line and rightmost point added as convenient handles to move the assembly by giving an easy to select point.
Mon Jan 24 2022, 08:10:25, download attachment constrained_slide_asembly.slvs
(no subject) (by app4soft)
> Here is a modified assembly that does what you want

Andrew, you forgot to include "Outer.slvs" and "Inner.slvs", which are required for "constrained_slide_asembly.slvs".

May you package all three files of this assembly into ZIP and upload it?
Tue Jan 25 2022, 23:38:58
(no subject) (by ruevs)
The "missing" files are in my TelescopicTubes.zip above.
Wed Jan 26 2022, 03:29:17
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2022 SolveSpace contributors. Most recent update June 2 2022.