miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

How to make a csg from complicated svg? #47

Open giloh728 opened 6 years ago

giloh728 commented 6 years ago

I really appreciate your effort.

I am going to try to make a 3D viewport with CSG function.

It is very important to me about extrusion from DXF section or SVG such as complicated shape.

May I ask why fail to extrude these svg files?

2D section.zip

miho commented 6 years ago

What exactly doesn't work? Is the result unexpected? It's easier to find bugs if you send a minimal working example that demonstrates the bug.

madhephaestus commented 6 years ago

If you are just looking for functions that load a complex SVG to a CSG (including hole detection and auto differencing), check out https://github.com/NeuronRobotics/JCSG/blob/development/src/main/java/eu/mihosoft/vrl/v3d/svg/ My fork includes SVG loading and export through a GPU accelerated slicing engine.

giloh728 commented 6 years ago

Thanks for reply all.

@miho https://github.com/giloh728/CSGExample/blob/master/src/main/java/kr/co/giloh/example/SVGExtrudeExample.java

This is the simple example.

@madhephaestus thanks a lot for suggestion. My project refered to [ JavaCad(compile group: 'com.neuronrobotics', name: 'JavaCad', version: '0.15.0') ]. But It couldn't work to me.

miho commented 6 years ago

It looks like you are using a JCSG fork. @madhephaestus might be able to help you out. JCSG only provides limited SVG functionality via https://github.com/miho/JCSG-PathExtensions. If you encounter problems with that please open an issue there and reference this issue.

madhephaestus commented 6 years ago

@giloh728 The Imports for my fork are different, I forked before they all changed in the mainline. Ill get it harmonized one of these days...

In the mean time, you can just erase the import statements and let the IDE find the new imports.

giloh728 commented 6 years ago

I understood!!

I didn't know about fork function.

I will try test using a JCSG fork(JCSG-PathExtensions).

I really appreciated helpers.