Subscribe to this thread
Home - General / All posts - Priority of Multidimensional RS Functions
KlausDE
6,043 post(s)
#26-Aug-17 11:02

It seems it's too early to start testing the DWG/DXF importer let alone datasource links.

According to the new facilities of 3D-objects the Mfd8-way to import z as a column is stripped off but not jet replaced. I ask because it's hard to create a map and scenario to test the new 3D facilities like calculation of mass balances and to sharpen feature requests.

Dimitri


4,271 post(s)
#26-Aug-17 21:04

It seems it's too early to start testing the DWG/DXF importer let alone datasource links.

Why? All the DXFs I've tried to import or link as a data source come in fine.

Tell us more about what you are doing. Can you post a sample of your data, what you would like to do and what the workflow is that you are currently using?

KlausDE
6,043 post(s)
#26-Aug-17 23:16

The first test show that the DWG importer is restricted to ACAD2000 file format. Newer versions are rejeced as "unknown file format". Same as Mfd8.

I had tested a complex ACAD 2013.DWG with splines and solid fills whose boundaries in part had curved segments ans splines. I've downgraded the file version to ACAD 2000 with AutoCAD MAP 2017 but neither Mfd8 nor Mfd future .163.1 could open it.

This experience lets me start tests systematically with simple objects and small files:

My first test imports lines and blocks made of lines only that have different Z values.

  • Mfd8 imports the lines and a Drawing Z with points and a column Z with correct values
  • Mfd8 imports blocks exploded into simple lines and points with Z
  • Mfd future .163.1 imports lines and blocks exploded into simple lines. OK

But

-- SQL

SELECT GeomHasZ([Geom]FROM [0 Table];

results in false for every single object whether all Z-coordinates of a single geom are equal or different.

  • Mfd future .163.1 creates an additional Labels component for every layer, which is directed to a column [Text] of the corresponding Table but not aligned along the geom of that record.
  • Changing the contents of a [Text] field in the Table manually from NULL to some Text doesn't show the text in the Lables component.
  • Mfd future .163.1 creates a datasource without the spatial index that import creates automatically
  • geoms in the datasource have no Z-coordinates as well

So far for now.

adamw


7,215 post(s)
#27-Aug-17 06:26

Z coordinates should be embedded into geoms. If you have a file that imports with Z values in Manifold 8 but without Z values in Future, post it and we will take a look.

Labels with non-NULL text likely do not appear because they are bound to lines that are too short at the current zoom. Zoom to see more of a line and its label should show. This is going to be improved, we are going to have options to render labels bound to short lines as if they were points, etc.

We can now work with DWG files of versions later than AutoCAD 2000 through GDAL. In general, support for DWG is a never-ending battle because the format does not have a public spec.

KlausDE
6,043 post(s)
#27-Aug-17 08:50

Here is the file.

BTW there is only one rotated MText object in the file, the one that imports as a point object without rotation. But in this case the text additionally imports and displays as attribute of 10 line objects that are line objects originally. Not to at lines and at different lines on Import and Create Datasource. I have the feeling that Labels import rather erratically.

There are negativ ObjIDs that seem to coincide with the appearance of Lables.

Reproducible Geoms miss Z, at least GeomHasZ() doesn't report them.

Attachments:
Pyramids_2000.dwg

KlausDE
6,043 post(s)
#30-Aug-17 09:38

Here is another simple ACAD_2000.DWG created with ADAC D3 2017 Map containing splines - one with and one without Z <> 0

Mfd8 imports Z, Mfd future 9.0.163.2 imports them correct in XY but again

GeomHasZ() returns false and GeomCoordXYZ() returns NULL for both.

Same for ACAD_2000.DXF import or link datasource

When I use Transform Set Z() on the splines and on closed splines converted to areas the objects are degraded from spline to one line segment of endpoints or in the case of an area degraded to a center point.

So the problems seem not relateted to the importer but to some basic failure in XYZ handling.

Attachments:
splines_2000.dwg

KlausDE
6,043 post(s)
#30-Aug-17 09:57

BTW those objects degraded in XY by Transform Set Z have a correct GeomCoordXYZ()

adamw


7,215 post(s)
#30-Aug-17 11:38

Thanks for the files.

We already found the reason for missing Z values (and too many labels) with the first file, we will check the second file as well.

The issues are with the import, not with the handling of XYZ geometry. Converting a 2D geom to a 3D geom removes curves mostly because converting a 3D geom to a 2D geom removes them (converting a 3D curve to a 2D projection of it is not trivial in the general case and we don't want to spend any effort on that until we have 3D maps and 3D tools). If an area is made out entirely of one curve, it will collapse into a point, yes. The solution is to linearize objects prior to converting them to 3D.

KlausDE
6,043 post(s)
#12-Sep-17 20:52

Adding this report to the wrong title but to the correct file uploads.

With MF9.0.163.3 the DWG importer handles Z coordinates and stopped to duplicate labels.

  • But labels still loose direction of the original MTEXT object and
  • now curved 3D segments come in with straight line segments that don't get smoother when you zoom in although reported as curved. 9.0.163.0 imported those as curved but lost Z.

Attachments:
spline import MF9_0_163_0 vs 3.jpg

KlausDE
6,043 post(s)
#12-Sep-17 21:10

GeomCoordXYZ() returns NULL for all but the first two Coordinates.

adamw


7,215 post(s)
#13-Sep-17 08:02

Thanks. We aren't yet finished with DWG / DXF, we will check the things above specifically.

Dimitri


4,271 post(s)
#13-Sep-17 13:36

Just an idea...

The ideal solution, as is underway, for Manifold's DWG and DXF importers to digest whatever you have by way of DWG or DXF. However, while underway to that happy future an extremely useful tool is the freeware Teigha converter that can convert various versions of DWG or DXF into other versions.

Download it from https://www.opendesign.com/guestfiles/teigha_file_converter

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.